AMReX-Astro / AMReX-Astro/Microphysics

Move electron chemical potential contributions to energy into network RHS

Open
#168 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug reactions
Dominant language
C++
Stars
43
Forks
46
Avg merge
2d 18h
Merged PRs (30d)
15

Description

This issue came up in the context of ECSN and Urca simulations with Maestro/MaestroEx.

These reaction networks do not include the contribution of electron chemical potential to the energy generation RHS, which appears any time Ye is changing. For the ECSN and Urca networks in particular, under some thermodynamic conditions weak reactions are the most important energy generation sources.

Maestro accounts for the electron chemical potential energy generation after the burn by calling the EOS with EXTRA_THERMO defined to get dhdX and dpdX and uses rho_omegadot from the burn to calculate an energy generation contribution to S in addition to rho_Hnuc.

This approach omits the electron chemical potential contribution to energy generation and temperature right hand sides in the network. If energy generation is dominated by reactions that change Ye, the temperature evolution in the network will be incorrect and the rates will be incorrect.

In Castro, this will also give an incorrect temperature after the burn for the same reason, plus the fact that Castro does not add the electron chemical potential energy generation term after the burn so it is omitted entirely.

We can fix this for all networks by writing a subroutine analogous to the temperature RHS or ener_gener_rate to calculate a contribution to ydot(ienuc) as:

#ifdef EXTRA_THERMO
ydot(ienuc) += dedX(1:nspec_evolve) * ydot(1:nspec_evolve)
#endif

And then have temperature_rhs call this subroutine before calculating ydot(itemp).

Thoughts anyone?

@maxpkatz

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the temperature_rhs and ener_gener_rate routines in the reaction networks, then inspect how EXTRA_THERMO and ydot(ienuc) are handled for Maestro and Castro. Done means the electron chemical-potential contribution from dedX and species ydot is included in the network energy and temperature right-hand sides, with the existing network behavior covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Domain
hpc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.