Nektar++
|
Peng-Robinson equation of state: p = RT/(1/rho - b) - a*Alpha(T/Tc) / (1/rho^2 + 2*b/rho - b^2) with a = 0.45724 * (R*Tc)^2 / Pc b = 0.0778 * (R*Tc) / Pc Alpha(T/Tc) = [1 + fw * (1 - sqrt(T/ Tc))]^2 fw = 0.37464 + 1.54226*omega - 0.2699*omega*omega. More...
#include <PengRobinsonEoS.h>
Static Public Member Functions | |
static EquationOfStateSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Attributes | |
NekDouble | m_a |
NekDouble | m_b |
NekDouble | m_Tc |
NekDouble | m_Pc |
NekDouble | m_omega |
NekDouble | m_fw |
Protected Attributes inherited from Nektar::EquationOfState | |
NekDouble | m_gamma |
NekDouble | m_gasConstant |
NekDouble | m_gammaMone |
NekDouble | m_gammaMoneOgasConst |
Private Member Functions | |
PengRobinsonEoS (const LibUtilities::SessionReaderSharedPtr &pSession) | |
~PengRobinsonEoS (void) override | |
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type> | |
T | Alpha (const T &temp) |
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type> | |
T | LogTerm (const T &rho) |
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type> | |
T | GetTemperatureKernel (const T &rho, const T &e) |
template<class T , typename = typename std::enable_if< std::is_floating_point<T>::value || tinysimd::is_vector_floating_point<T>::value>::type> | |
T | GetPressureKernel (const T &rho, const T &e) |
Friends | |
class | MemoryManager< PengRobinsonEoS > |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::EquationOfState | |
virtual | ~EquationOfState () |
NekDouble | GetTemperature (const NekDouble &rho, const NekDouble &e) |
Calculate the temperature. More... | |
vec_t | GetTemperature (const vec_t &rho, const vec_t &e) |
NekDouble | GetPressure (const NekDouble &rho, const NekDouble &e) |
Calculate the pressure. More... | |
vec_t | GetPressure (const vec_t &rho, const vec_t &e) |
NekDouble | GetSoundSpeed (const NekDouble &rho, const NekDouble &e) |
Calculate the sound speed. More... | |
NekDouble | GetEntropy (const NekDouble &rho, const NekDouble &e) |
Calculate the entropy. More... | |
NekDouble | GetDPDrho_e (const NekDouble &rho, const NekDouble &e) |
Calculate the partial derivative of P(rho,e) with respect to rho. More... | |
NekDouble | GetDPDe_rho (const NekDouble &rho, const NekDouble &e) |
Calculate the partial derivative of P(rho,e) with respect to e. More... | |
NekDouble | GetEFromRhoP (const NekDouble &rho, const NekDouble &p) |
Obtain the internal energy from rho and P. More... | |
NekDouble | GetRhoFromPT (const NekDouble &p, const NekDouble &T) |
Obtain the density from P and T. More... | |
Peng-Robinson equation of state: p = RT/(1/rho - b) - a*Alpha(T/Tc) / (1/rho^2 + 2*b/rho - b^2) with a = 0.45724 * (R*Tc)^2 / Pc b = 0.0778 * (R*Tc) / Pc Alpha(T/Tc) = [1 + fw * (1 - sqrt(T/ Tc))]^2 fw = 0.37464 + 1.54226*omega - 0.2699*omega*omega.
Definition at line 51 of file PengRobinsonEoS.h.
|
private |
Definition at line 47 of file PengRobinsonEoS.cpp.
References m_a, m_b, m_fw, Nektar::EquationOfState::m_gasConstant, m_omega, m_Pc, and m_Tc.
|
inlineoverrideprivate |
Definition at line 97 of file PengRobinsonEoS.h.
|
inlineprivate |
Definition at line 103 of file PengRobinsonEoS.h.
References m_fw, m_Tc, and tinysimd::sqrt().
Referenced by GetPressureKernel(), v_GetDPDe_rho(), v_GetDPDrho_e(), v_GetEFromRhoP(), v_GetEntropy(), and v_GetRhoFromPT().
|
inlinestatic |
Creates an instance of this class.
Definition at line 57 of file PengRobinsonEoS.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
inlineprivate |
Definition at line 147 of file PengRobinsonEoS.h.
References Alpha(), GetTemperatureKernel(), m_a, m_b, Nektar::EquationOfState::m_gasConstant, and CellMLToNektar.cellml_metadata::p.
Referenced by v_GetPressure().
|
inlineprivate |
Definition at line 122 of file PengRobinsonEoS.h.
References LogTerm(), m_a, m_b, m_fw, Nektar::EquationOfState::m_gamma, Nektar::EquationOfState::m_gasConstant, m_Tc, and tinysimd::sqrt().
Referenced by GetPressureKernel(), and v_GetTemperature().
|
inlineprivate |
Definition at line 113 of file PengRobinsonEoS.h.
References tinysimd::log(), m_b, and tinysimd::sqrt().
Referenced by GetTemperatureKernel(), v_GetDPDe_rho(), v_GetEFromRhoP(), and v_GetEntropy().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 126 of file PengRobinsonEoS.cpp.
References Alpha(), Nektar::EquationOfState::GetTemperature(), LogTerm(), m_a, m_b, m_fw, Nektar::EquationOfState::m_gamma, Nektar::EquationOfState::m_gasConstant, m_Tc, and tinysimd::sqrt().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 101 of file PengRobinsonEoS.cpp.
References Alpha(), Nektar::EquationOfState::GetDPDe_rho(), Nektar::EquationOfState::GetTemperature(), m_a, m_b, m_fw, Nektar::EquationOfState::m_gasConstant, and tinysimd::sqrt().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 150 of file PengRobinsonEoS.cpp.
References Alpha(), LogTerm(), m_a, m_b, m_fw, Nektar::EquationOfState::m_gamma, Nektar::EquationOfState::m_gasConstant, m_Tc, CellMLToNektar.cellml_metadata::p, and tinysimd::sqrt().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 82 of file PengRobinsonEoS.cpp.
References Alpha(), Nektar::EquationOfState::GetTemperature(), tinysimd::log(), LogTerm(), m_a, m_b, m_fw, Nektar::EquationOfState::m_gamma, Nektar::EquationOfState::m_gasConstant, m_Tc, and tinysimd::sqrt().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 71 of file PengRobinsonEoS.cpp.
References GetPressureKernel().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 77 of file PengRobinsonEoS.cpp.
References GetPressureKernel().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 178 of file PengRobinsonEoS.cpp.
References Alpha(), m_a, m_b, Nektar::EquationOfState::m_gasConstant, and CellMLToNektar.cellml_metadata::p.
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 60 of file PengRobinsonEoS.cpp.
References GetTemperatureKernel().
|
finalprotectedvirtual |
Implements Nektar::EquationOfState.
Definition at line 66 of file PengRobinsonEoS.cpp.
References GetTemperatureKernel().
|
friend |
Definition at line 1 of file PengRobinsonEoS.h.
|
static |
Name of the class.
Definition at line 66 of file PengRobinsonEoS.h.
|
protected |
Definition at line 69 of file PengRobinsonEoS.h.
Referenced by GetPressureKernel(), GetTemperatureKernel(), PengRobinsonEoS(), v_GetDPDe_rho(), v_GetDPDrho_e(), v_GetEFromRhoP(), v_GetEntropy(), and v_GetRhoFromPT().
|
protected |
Definition at line 70 of file PengRobinsonEoS.h.
Referenced by GetPressureKernel(), GetTemperatureKernel(), LogTerm(), PengRobinsonEoS(), v_GetDPDe_rho(), v_GetDPDrho_e(), v_GetEFromRhoP(), v_GetEntropy(), and v_GetRhoFromPT().
|
protected |
Definition at line 74 of file PengRobinsonEoS.h.
Referenced by Alpha(), GetTemperatureKernel(), PengRobinsonEoS(), v_GetDPDe_rho(), v_GetDPDrho_e(), v_GetEFromRhoP(), and v_GetEntropy().
|
protected |
Definition at line 73 of file PengRobinsonEoS.h.
Referenced by PengRobinsonEoS().
|
protected |
Definition at line 72 of file PengRobinsonEoS.h.
Referenced by PengRobinsonEoS().
|
protected |
Definition at line 71 of file PengRobinsonEoS.h.
Referenced by Alpha(), GetTemperatureKernel(), PengRobinsonEoS(), v_GetDPDe_rho(), v_GetEFromRhoP(), and v_GetEntropy().