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

WIP: Number Moments #168

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

WIP: Number Moments #168

wants to merge 5 commits into from

Conversation

lroberts36
Copy link
Collaborator

@lroberts36 lroberts36 commented Apr 20, 2023

PR Summary

This PR implements the radiation number moment evolution equations. Previously, we just evolved the conserved energy and momentum of the radiation field for each species when using the moments. Now, if the parameter radiation/do_number_evolution is set, the conserved number density and a corresponding number flux are also evolved for each species. See the Phoebus notes for a description of the equations that are being implemented.

This PR also updates to the latest version of Parthenon and changes the type of the integrator to conform with changes made to the Parthenon integration infrastructure.

Things that still need to get done:

  • Update FixFluxes to operate on both number and energy moments (this requires splitting into separate functions for hydro and radiation, at least to minimize code duplication).
  • Update ApplyFloors to operate on both number and energy moments.
  • Add MomentRedshiftingSource task, which includes the extra RHS terms the number flux equation picks up due to redshifting. This requires calculating the expansion, acceleration, and shear of the fluid 4-velocity field. The expansion and acceleration also need to be included in the asymptotic flux expression.
  • Update opacity function to get equilibrium number density. Does singularity provide this?
  • Update source functions to allow for multiple species and for evolution of $Y_e$. This is probably the biggest chunk of work.
  • Run old tests to make sure changes don't break anything.
  • Set up and run $(T, Y_e)$ and redshifting tests

Choices that were made (and that maybe could be unmade):

  • We are using separate fields for the number evolution quantities, rather than including the number and energy moments in the same fields by including an extra tensor index. This makes updating the code simpler, but maybe limits going to higher energy moments (unlikely that anyone wants to do this anyway).
  • The left and right reconstructed state variables are being reused by the number and energy evolution equations. This saves some memory, but adds some extra dependency into the task list.

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.
  • Format your changes by calling scripts/bash/format.sh.
  • Explain what you did.

@brryan
Copy link
Collaborator

brryan commented Apr 25, 2023

Update opacity function to get equilibrium number density. Does singularity provide this?

singularity-opac provides B = \int \frac{1}{h \nu} B_{\nu} d\Omega d\nu as ThermalNumberDistributionOfT; this is what you need right? Although that function will need to be wrapped by phoebus's Opacities class in src/microphysics/opac_phoebus/opac_phoebus.hpp (should work exactly like ThermalDistributionOfTNu without the nu argument). The frequency-dependent version of number distribution can of course just be calculated as ThermalDistributionOfTNu / (h nu)

@lroberts36
Copy link
Collaborator Author

@brryan: Yep, that is exactly what I need. Thanks!

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.

2 participants