From a38ff14efeb203dcb74817e9f2e73c46d501d8da Mon Sep 17 00:00:00 2001 From: psharda Date: Wed, 2 Aug 2023 16:14:04 +0200 Subject: [PATCH] define fundamental derivative G --- EOS/gamma_law/actual_eos.H | 2 +- interfaces/eos_type.H | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EOS/gamma_law/actual_eos.H b/EOS/gamma_law/actual_eos.H index 9274baf447..a225c7d037 100644 --- a/EOS/gamma_law/actual_eos.H +++ b/EOS/gamma_law/actual_eos.H @@ -265,7 +265,7 @@ void actual_eos (I input, T& state) // sound speed state.cs = std::sqrt(eos_gamma * state.p * rhoinv); - state.d2pdr2_s = state.cs * state.cs * (std::pow(state.cs, 2) / state.p - rhoinv); + state.G = 0.5 * (1.0 + (rho / state.p) * state.cs * state.cs); } } diff --git a/interfaces/eos_type.H b/interfaces/eos_type.H index 9267c97d2f..5e030a26fb 100644 --- a/interfaces/eos_type.H +++ b/interfaces/eos_type.H @@ -27,7 +27,7 @@ struct eos_t:eos_base_t { amrex::Real dsdr{}; amrex::Real dpde{}; amrex::Real dpdr_e{}; - amrex::Real d2pdr2_s{}; + amrex::Real G{}; // fundmental derivative (Thompson 1971) amrex::Real cv{}; amrex::Real cp{}; @@ -146,7 +146,7 @@ struct chem_eos_t:eos_base_t { amrex::Real dpdr_e{}; amrex::Real dedT{}; amrex::Real dedr{}; - amrex::Real d2pdr2_s{}; + amrex::Real G{}; amrex::Real mu{}; amrex::Real cs{};