36#include <boost/algorithm/string/predicate.hpp>
49 pSession->LoadSolverInfo(
"EquationOfState", eosType,
"IdealGas");
52 m_idealGas = boost::iequals(eosType,
"IdealGas");
76 for (
size_t i = 0; i < Fwd[0].size(); ++i)
79 Bwd[0][i], Bwd[1][i], 0.0, 0.0, Bwd[2][i],
80 flux[0][i], flux[1][i], rhouf, rhovf, flux[2][i]);
85 for (
size_t i = 0; i < Fwd[0].size(); ++i)
87 v_PointSolve(Fwd[0][i], Fwd[1][i], Fwd[2][i], 0.0, Fwd[3][i],
88 Bwd[0][i], Bwd[1][i], Bwd[2][i], 0.0, Bwd[3][i],
89 flux[0][i], flux[1][i], flux[2][i], rhovf,
95 for (
size_t i = 0; i < Fwd[0].size(); ++i)
98 Fwd[4][i], Bwd[0][i], Bwd[1][i], Bwd[2][i],
99 Bwd[3][i], Bwd[4][i], flux[0][i], flux[1][i],
100 flux[2][i], flux[3][i], flux[4][i]);
123 cRoe =
sqrt((gamma - 1.0) * (HRoe - 0.5 * URoe2));
138 NekDouble chiL = dpdrhoL - eL / rhoL * dpdeL;
140 NekDouble chiR = dpdrhoR - eR / rhoR * dpdeR;
152 NekDouble avgKappa = 0.5 * (kappaL + kappaR);
153 NekDouble avgKappaH = 0.5 * (kappaL * hL + kappaR * hR);
158 NekDouble deltaRhoe = rhoR * eR - rhoL * eL;
161 NekDouble dP = deltaP - avgChi * deltaRho - avgKappa * deltaRhoe;
165 NekDouble D = (s * deltaRho) * (s * deltaRho) + deltaP * deltaP;
171 chiRoe = (D * avgChi + s * s * deltaRho * dP) / fac;
172 kappaRoe = D * avgKappa / fac;
180 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)