35#ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_MISC_PENGROBINSONEOS
36#define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_MISC_PENGROBINSONEOS
101 std::enable_if_t<std::is_floating_point_v<T> ||
102 tinysimd::is_vector_floating_point_v<T>,
108 return sqrtAlpha * sqrtAlpha;
113 std::enable_if_t<std::is_floating_point_v<T> ||
114 tinysimd::is_vector_floating_point_v<T>,
124 std::enable_if_t<std::is_floating_point_v<T> ||
125 tinysimd::is_vector_floating_point_v<T>,
142 T C = f1 * logTerm * f2 * f2 - e;
145 T sqrtT = (
sqrt(B * B - 4 *
A * C) - B) / (2 *
A);
147 return sqrtT * sqrtT;
151 std::enable_if_t<std::is_floating_point_v<T> ||
152 tinysimd::is_vector_floating_point_v<T>,
158 T oneOrho = 1.0 / rho;
161 (oneOrho * oneOrho + 2.0 *
m_b * oneOrho -
m_b *
m_b);
Encapsulates equations of state allowing us to obtain thermodynamic properties: most relations are in...
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Peng-Robinson equation of state: p = RT/(1/rho - b) - a*Alpha(T/Tc) / (1/rho^2 + 2*b/rho - b^2) with ...
static std::string className
Name of the class.
static EquationOfStateSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
T GetTemperatureKernel(const T &rho, const T &e)
T GetPressureKernel(const T &rho, const T &e)
NekDouble v_GetPressure(const NekDouble &rho, const NekDouble &e) final
NekDouble v_GetEFromRhoP(const NekDouble &rho, const NekDouble &p) final
NekDouble v_GetDPDe_rho(const NekDouble &rho, const NekDouble &e) final
NekDouble v_GetTemperature(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
~PengRobinsonEoS(void) override=default
NekDouble v_GetEntropy(const NekDouble &rho, const NekDouble &e) final
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< EquationOfState > EquationOfStateSharedPtr
A shared pointer to an equation of state object.
tinysimd::simd< NekDouble > vec_t
scalarT< T > log(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)