Skip to content

Commit 588beb9

Browse files
authored
Compute pressure for primordial chem EOS (#1301)
1 parent eb5189f commit 588beb9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

EOS/primordial_chem/actual_eos.H

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ void actual_eos (I input, T& state)
266266
state.e = eint;
267267
}
268268

269+
if constexpr (has_pressure<T>::value) {
270+
Real pressure = state.rho * eint / sum_gammasinv;
271+
state.p = pressure;
272+
}
273+
269274
Real dedT = sum_gammasinv * sum_Abarinv * gasconstant;
270275
if constexpr (has_energy<T>::value) {
271276
state.dedT = dedT;

0 commit comments

Comments
 (0)