35 #include <boost/core/ignore_unused.hpp> 44 std::string VanDerWaalsEoS::className =
46 "VanDerWaals", VanDerWaalsEoS::create,
47 "Van der Waals equation of state.");
49 VanDerWaalsEoS::VanDerWaalsEoS(
54 pSession->LoadParameter(
"Tcrit", Tcrit);
55 pSession->LoadParameter(
"Pcrit", Pcrit);
89 result = result / ((1 -
m_b * rho) * (1 -
m_b * rho));
90 result = result - 2 *
m_a * rho;
98 boost::ignore_unused(e);
105 return (p +
m_a * rho * rho) * (1.0 / rho -
m_b) / (
m_gamma - 1) -
130 unsigned int cnt = 0;
131 while (abs(residual) > tol && cnt < maxIter)
133 f = Z * Z * Z + k1 * Z * Z + k2 * Z + k3;
134 df = 3 * Z * Z + 2 * k1 * Z + k2;
141 cout <<
"Newton-Raphson in VanDerWaalsEoS::v_GetRhoFromPT did not " 143 << maxIter <<
" iterations (residual = " << residual <<
")"
virtual NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p)
Encapsulates equations of state allowing us to obtain thermodynamic properties: most relations are in...
virtual NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e)
virtual NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e)
virtual NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e)
virtual NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e)
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
virtual NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p)
virtual NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e)
NekDouble GetTemperature(const NekDouble &rho, const NekDouble &e)
Calculate the temperature.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< SessionReader > SessionReaderSharedPtr