Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constants #443

Open
Yurlungur opened this issue Dec 9, 2024 · 4 comments
Open

Constants #443

Yurlungur opened this issue Dec 9, 2024 · 4 comments
Labels
discussion help wanted Extra attention is needed question Further information is requested

Comments

@Yurlungur
Copy link
Collaborator

singularity-opac has a constants and unit systems infrastructure. singularity-eos does not. These are inconsistent and also should ideally be shared. I wonder if this infrastructure should in fact live in ports-of-call?

@Yurlungur Yurlungur added help wanted Extra attention is needed question Further information is requested discussion labels Dec 9, 2024
@jhp-lanl
Copy link
Collaborator

jhp-lanl commented Dec 9, 2024

What is the functional difference between a 'unit system' and the units modifier we have?

@Yurlungur
Copy link
Collaborator Author

So there are a few independent concepts, that I think are getting confused

  1. Physical constants like $k_b$
  2. We may wish to pass in quantities in different unit systems
  3. For some tests problems (at least in radiation), its sometimes useful to set physical constants (like the stefan-boltzmann constant) to weird numbers

Concept (2) is completley handled in singularity-eos by the UnitSystem modifier. Concepts (1) and (3) are both handled in singularity-opac by a compile time constants object where you set constants to be whatever you like.

What I'm wondering about is whether or not we should also add a (1) capability to singularity-eos. We could provide a set of physical constants in cgs.

@jhp-lanl
Copy link
Collaborator

jhp-lanl commented Dec 9, 2024

If you're just talking about adding constants in CGS units, I think that's fine.

I'd also support a discussion about compile time unit systems to better mesh with host codes, but I'd want to learn more about how other codes handle unit system changes. For example, if a code is cg$\mu$ ($\mu$ being microseconds), then I can see how it would be really nice to just avoid unit conversions entirely and have everything self-consistent.

@Yurlungur
Copy link
Collaborator Author

Yeah we're on the same page. I don't want to go down the compile time unit system path right now, or at least I don't want to spend time building something as we've got other fish to fry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants