Skip to content

Feature/radiation vode#1975

Draft
James471 wants to merge 11 commits into
AMReX-Astro:developmentfrom
James471:feature/radiation-VODE
Draft

Feature/radiation vode#1975
James471 wants to merge 11 commits into
AMReX-Astro:developmentfrom
James471:feature/radiation-VODE

Conversation

@James471
Copy link
Copy Markdown

Add radiation variables to enable photochemistry. Bug fix: Last character of eos file is not read if it doesn't end with newline character.

James471 added 7 commits March 2, 2026 23:27
…ion variables

WIP: Add reduced speed of light to burn state and some missing radiation variables

WIP: Add reduced speed of light to burn state and some missing radiation variables
WIP: Minor fixes

WIP: Minor fixes
Simplify photoionization eos implementation, change species masses

Simplify photoionization eos implementation, change species masses
@James471 James471 force-pushed the feature/radiation-VODE branch from 7701e44 to cc5d137 Compare April 20, 2026 10:14
James471 and others added 4 commits May 12, 2026 19:06
…n EOS

The EOS was incorrectly normalizing the total heat capacity
sum_ni_fi_over_2 by dividing by the particle count before using it
for internal energy and temperature calculations. This made the
internal energy per unit mass ~1/n_total times too small, causing
the ionized gas temperature to be ~140x too low for the DTypeFront
test (n_H=139.9), giving an expansion speed of ~750 m/s instead of
the expected ~10 km/s.

Fix: separate the unnormalized sum_ni_fi_over_2 (total heat capacity,
used for e, T, dedT) from fi_over_2_avg = sum_ni_fi_over_2 /
sum_Abarinv (per-particle average, used for pressure, cs, G).

Also fix electron mass: spmasses[Electron] was set to proton mass;
now correctly set to C::m_e = 9.109e-28 g.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: correct energy normalization and electron mass in photoionizatio…
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.

1 participant