36#include <boost/algorithm/string/predicate.hpp>
48 pSession->LoadSolverInfo(
"EquationOfState", eosType,
"IdealGas");
51 m_idealGas = boost::iequals(eosType,
"IdealGas");
75 for (
size_t i = 0; i < Fwd[0].size(); ++i)
78 Bwd[0][i], Bwd[1][i], 0.0, 0.0, Bwd[2][i],
79 flux[0][i], flux[1][i], rhouf, rhovf, flux[2][i]);
84 for (
size_t i = 0; i < Fwd[0].size(); ++i)
86 v_PointSolve(Fwd[0][i], Fwd[1][i], Fwd[2][i], 0.0, Fwd[3][i],
87 Bwd[0][i], Bwd[1][i], Bwd[2][i], 0.0, Bwd[3][i],
88 flux[0][i], flux[1][i], flux[2][i], rhovf,
94 for (
size_t i = 0; i < Fwd[0].size(); ++i)
97 Fwd[4][i], Bwd[0][i], Bwd[1][i], Bwd[2][i],
98 Bwd[3][i], Bwd[4][i], flux[0][i], flux[1][i],
99 flux[2][i], flux[3][i], flux[4][i]);
122 cRoe =
sqrt((gamma - 1.0) * (HRoe - 0.5 * URoe2));
137 NekDouble chiL = dpdrhoL - eL / rhoL * dpdeL;
139 NekDouble chiR = dpdrhoR - eR / rhoR * dpdeR;
151 NekDouble avgKappa = 0.5 * (kappaL + kappaR);
152 NekDouble avgKappaH = 0.5 * (kappaL * hL + kappaR * hR);
157 NekDouble deltaRhoe = rhoR * eR - rhoL * eL;
160 NekDouble dP = deltaP - avgChi * deltaRho - avgKappa * deltaRhoe;
164 NekDouble D = (s * deltaRho) * (s * deltaRho) + deltaP * deltaP;
170 chiRoe = (D * avgChi + s * s * deltaRho * dP) / fac;
171 kappaRoe = D * avgKappa / fac;
179 cRoe =
sqrt(chiRoe + kappaRoe * (HRoe - 0.5 * URoe2));
virtual void v_PointSolve(ND rhoL, ND rhouL, ND rhovL, ND rhowL, ND EL, ND rhoR, ND rhouR, ND rhovR, ND rhowR, ND ER, ND &rhof, ND &rhouf, ND &rhovf, ND &rhowf, ND &Ef)
ND GetRoeSoundSpeed(ND rhoL, ND pL, ND eL, ND HL, ND srL, ND rhoR, ND pR, ND eR, ND HR, ND srR, ND HRoe, ND URoe2, ND srLR)
CompressibleSolver()
Programmatic ctor.
EquationOfStateSharedPtr m_eos
virtual void v_ArraySolve(const Array< OneD, const Array< OneD, ND > > &Fwd, const Array< OneD, const Array< OneD, ND > > &Bwd, Array< OneD, Array< OneD, ND > > &flux)
void v_Solve(const int nDim, const Array< OneD, const Array< OneD, ND > > &Fwd, const Array< OneD, const Array< OneD, ND > > &Bwd, Array< OneD, Array< OneD, ND > > &flux) override
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
The RiemannSolver class provides an abstract interface under which solvers for various Riemann proble...
bool m_requiresRotation
Indicates whether the Riemann solver requires a rotation to be applied to the velocity fields.
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
static const NekDouble kNekZeroTol
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
scalarT< T > abs(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)