47 EquationOfState::EquationOfState(
50 pSession->LoadParameter(
"Gamma", m_gamma, 1.4);
51 pSession->LoadParameter(
"GasConstant", m_gasConstant, 287.058);
53 m_gammaMone = m_gamma - 1.0;
54 m_gammaMoneOgasConst = m_gammaMone / m_gasConstant;
57 EquationOfState::EquationOfState(
const NekDouble &gamma,
58 const NekDouble &gasConstant): m_gamma{gamma}, m_gasConstant{gasConstant}{}
106 return sqrt(chi + kappa * enthalpy);
NekDouble GetEntropy(const NekDouble &rho, const NekDouble &e)
Calculate the entropy.
virtual NekDouble v_GetSoundSpeed(const NekDouble &rho, const NekDouble &e)
virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p)=0
virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e)=0
NekDouble GetRhoFromPT(const NekDouble &p, const NekDouble &T)
Obtain the density from P and T.
virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e)=0
NekDouble GetDPDrho_e(const NekDouble &rho, const NekDouble &e)
Calculate the partial derivative of P(rho,e) with respect to rho.
NekDouble GetSoundSpeed(const NekDouble &rho, const NekDouble &e)
Calculate the sound speed.
virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p)=0
NekDouble GetDPDe_rho(const NekDouble &rho, const NekDouble &e)
Calculate the partial derivative of P(rho,e) with respect to e.
NekDouble GetEFromRhoP(const NekDouble &rho, const NekDouble &p)
Obtain the internal energy from rho and P.
virtual NekDouble GetPressure(const NekDouble &rho, const NekDouble &e)=0
Calculate the pressure.
virtual NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e)=0
Provides a generic Factory class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
The above copyright notice and this permission notice shall be included.
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
scalarT< T > sqrt(scalarT< T > in)