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

Add AbsorptionCoefficient and Emissivity to MeanOpacity variants. #59

Merged
merged 4 commits into from
Jan 8, 2025

Conversation

RyanWollaeger
Copy link
Collaborator

  • Use gmode input to toggle Rosseland (default) to Planck.
  • Add PlanckDistribution function as member to MeanOpacity.
  • Add the new functions to generic and non-CGS MeanOpacity variants.

Note: the motivation is to use one of the frequency-integrated opacity values as a grey opacity in transport, which requires using it in both absorption and emissivity, for any choice.

Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may eventually be something we want for neutrinos too... in which case, it might be good to add it there too. The API should be identical. That said, if you don't want to attack that right now, that's fine.

@RyanWollaeger
Copy link
Collaborator Author

@brryan @Yurlungur @pdmullen - this is a preliminary attempt for something that might be used in grey transport. I added the Planck function as a member to the MeanOpacity class, which seems a bit overkill for just emissivity.

Copy link
Collaborator

@brryan brryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think the planck/rosseland choice is best made when calling the function, either as you do here with function args, or with different fucntions or a template parameter. What you have here is fine IMO, I just think it's better to not do this in the constructor because we dont want to make the same class twice to call the same data. I'm unconcerned about the different function signatures between mean and non-mean opacity variants, because they have different meanings.

@brryan brryan mentioned this pull request Dec 18, 2024
9 tasks
@Yurlungur
Copy link
Collaborator

@RyanWollaeger what's the status of this MR?

+ Use gmode input to toggle Rosseland (default) to Planck.
+ Add PlanckDistribution function as member to MeanOpacity.
+ Add the new functions to generic and non-CGS MeanOpacity variants.

Note: the motivation is to use one of the frequency-integrated
opacity values as a grey opacity in transport, which requires using
it in both absorption and emissivity, for any choice.
+ Move enum from MeanOpacity class to mean_photon_variant.hpp.
+ Use Rosseland instead of 0 in variant template function defaults.
Copy link
Collaborator

@brryan brryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work @RyanWollaeger!

@brryan brryan merged commit 84ea7a4 into lanl:main Jan 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants