diff --git a/extern/Microphysics b/extern/Microphysics index 249e10983..01dc4faf4 160000 --- a/extern/Microphysics +++ b/extern/Microphysics @@ -1 +1 @@ -Subproject commit 249e1098351c28cf48d3f52eee248c9591fc382c +Subproject commit 01dc4faf4ec1eea410022b0059afe7978860d2bc diff --git a/src/EOS.hpp b/src/EOS.hpp index d9c78ea3d..2a518b894 100644 --- a/src/EOS.hpp +++ b/src/EOS.hpp @@ -243,9 +243,8 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS::ComputeOtherDeriva amrex::Real dRho_dP = NAN; // compute derivative of pressure w/r/t density at constant entropy, given density and pressure (needed for the fundamental derivative G) amrex::Real dP_dRho_s = NAN; - amrex::Real G_gamma = NAN; - // compute second derivative of pressure w/r/t density at constant entropy, given density and pressure (needed for the fundamental derivative G) - amrex::Real d2P_dRho2_s = NAN; + // fundamental derivative + amrex::Real G = NAN; #ifdef PRIMORDIAL_CHEM eos_t chemstate; @@ -268,8 +267,7 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS::ComputeOtherDeriva deint_dP = 1.0 / chemstate.dpde; dRho_dP = 1.0 / (chemstate.dpdr * C::k_B / boltzmann_constant_); dP_dRho_s = chemstate.cs * chemstate.cs; - G_gamma = dP_dRho_s * rho / P; - d2P_dRho2_s = chemstate.d2pdr2_s; + G = chemstate.G; #else if constexpr (gamma_ != 1.0) { @@ -282,11 +280,10 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS::ComputeOtherDeriva deint_dP = 1.0 / estate.dpde; dRho_dP = 1.0 / (estate.dpdr * C::k_B / boltzmann_constant_); dP_dRho_s = estate.cs * estate.cs; - G_gamma = dP_dRho_s * rho / P; - d2P_dRho2_s = estate.d2pdr2_s; + G = estate.G; } #endif - return std::make_tuple(deint_dRho, deint_dP, dRho_dP, dP_dRho_s, G_gamma, d2P_dRho2_s); + return std::make_tuple(deint_dRho, deint_dP, dRho_dP, dP_dRho_s, G); } template diff --git a/src/HLLC.hpp b/src/HLLC.hpp index 21677ebab..57161f7ee 100644 --- a/src/HLLC.hpp +++ b/src/HLLC.hpp @@ -44,8 +44,8 @@ AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLC(quokka::HydroState::ComputeOtherDerivatives(sL.rho, sL.P, sL.massScalar); - auto [dedr_R, dedp_R, drdp_R, dpdr_s_R, G_gamma_R, d2pdr2_s_R] = quokka::EOS::ComputeOtherDerivatives(sR.rho, sR.P, sR.massScalar); + auto [dedr_L, dedp_L, drdp_L, dpdr_s_L, G_L] = quokka::EOS::ComputeOtherDerivatives(sL.rho, sL.P, sL.massScalar); + auto [dedr_R, dedp_R, drdp_R, dpdr_s_R, G_R] = quokka::EOS::ComputeOtherDerivatives(sR.rho, sR.P, sR.massScalar); // equation A.5a of Kershaw+1998 // need specific internal energy here @@ -57,9 +57,6 @@ AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLC(quokka::HydroState