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

Porting the flux-limiter prescription from r9793 to the latest MESA version #771

Merged

Conversation

JRGarza
Copy link

@JRGarza JRGarza commented Jan 27, 2025

This PR ports the flux-limiter prescription from Levermore & Pomraning (1981), originally available in MESA r9793, to the latest version. It addresses the following:

  • Models radiative transport in the transition from an optically thick to optically thin medium (i.e., from diffusion to free-streaming).
  • Prevents photons from escaping at superluminal velocities in the optically thin regime.

The code introduces the following boolean control:
use_flux_limiting_with_dPrad_dm_form

When set to .true. and use_dPrad_dm_form_of_T_gradient_eqn = .true., it applies the flux-limiter prescription to compute the radiative pressure gradient in terms of the flux-limiter flxLambda as:
flxR = 4 * pi * r^2 * abs(dT^4/dm) / kap
flxLambda = (6 + 3*flxR) / (6 + 3*flxR + flxR^2)
Then, the expected radiative pressure gradient is updated as:
d_Prad_expected = d_Prad_expected / flxLambda

Additionally, the flux-limiter and flux ratio (flxR) values are stored in the stellar properties as:
flux_limit_lambda
flux_limit_R
These values can be saved in profile files by uncommenting the corresponding entries in profile_columns.list

@pmocz pmocz requested review from pmocz and Debraheem January 27, 2025 13:11
@JRGarza
Copy link
Author

JRGarza commented Jan 27, 2025

Resolves #769
Related to #625

@Debraheem
Copy link
Member

Awesome Jaime, I was about to give it a shot only to see that you've done all the leg work! Merging this into a branch for testing.

@Debraheem Debraheem changed the base branch from main to feature/reintroduce_flux_limiter January 27, 2025 14:31
@Debraheem Debraheem merged commit 2a611c4 into MESAHub:feature/reintroduce_flux_limiter Jan 27, 2025
3 checks passed
@JRGarza
Copy link
Author

JRGarza commented Jan 27, 2025

Thanks a lot, hope this is useful for more people.

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