45 "Van der Waals equation of state.");
52 pSession->LoadParameter(
"Tcrit", Tcrit);
53 pSession->LoadParameter(
"Pcrit", Pcrit);
96 result = result / ((1 -
m_b * rho) * (1 -
m_b * rho));
97 result = result - 2 *
m_a * rho;
111 return (
p +
m_a * rho * rho) * (1.0 / rho -
m_b) / (
m_gamma - 1) -
136 unsigned int cnt = 0;
137 while (
abs(residual) > tol && cnt < maxIter)
139 f = Z * Z * Z + k1 * Z * Z + k2 * Z + k3;
140 df = 3 * Z * Z + 2 * k1 * Z + k2;
147 cout <<
"Newton-Raphson in VanDerWaalsEoS::v_GetRhoFromPT did not "
149 << maxIter <<
" iterations (residual = " << residual <<
")"
Encapsulates equations of state allowing us to obtain thermodynamic properties: most relations are in...
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.
NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final
T GetTemperatureKernel(const T &rho, const T &e)
static EquationOfStateSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final
NekDouble v_GetTemperature(const NekDouble &rho, const NekDouble &e) final
T GetPressureKernel(const T &rho, const T &e)
NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final
VanDerWaalsEoS(const LibUtilities::SessionReaderSharedPtr &pSession)
NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final
NekDouble v_GetRhoFromPT(const NekDouble &rho, const NekDouble &p) final
NekDouble v_GetDPDrho_e(const NekDouble &rho, const NekDouble &e) final
static std::string className
Name of the class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
tinysimd::simd< NekDouble > vec_t
scalarT< T > abs(scalarT< T > in)
scalarT< T > log(scalarT< T > in)