Skip to content

Commit

Permalink
if rho = 0, pres is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
psharda committed Jul 29, 2023
1 parent 16f441a commit b7c3da0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/EOS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputePressure(am
if constexpr (gamma_ != 1.0) {
chem_eos_t estate;
estate.rho = rho;
estate.e = Eint / rho;
// if rho is 0, pass 0 to state.e
if (rho == 0.0) {
estate.e = 0;
} else {
estate.e = Eint / rho;
}
estate.mu = mean_molecular_weight_ / C::m_u;
eos(eos_input_re, estate);
P = estate.p;
Expand Down

0 comments on commit b7c3da0

Please sign in to comment.