36 #include <boost/algorithm/string/predicate.hpp>
37 #include <boost/core/ignore_unused.hpp>
49 pSession->LoadSolverInfo(
"EquationOfState", eosType,
"IdealGas");
52 m_idealGas = boost::iequals(eosType,
"IdealGas");
73 for (
size_t i = 0; i < Fwd[0].size(); ++i)
76 Bwd[0][i], Bwd[1][i], 0.0, 0.0, Bwd[2][i],
77 flux[0][i], flux[1][i], rhouf, rhovf, flux[2][i]);
82 for (
size_t i = 0; i < Fwd[0].size(); ++i)
84 v_PointSolve(Fwd[0][i], Fwd[1][i], Fwd[2][i], 0.0, Fwd[3][i],
85 Bwd[0][i], Bwd[1][i], Bwd[2][i], 0.0, Bwd[3][i],
86 flux[0][i], flux[1][i], flux[2][i], rhovf,
92 for (
size_t i = 0; i < Fwd[0].size(); ++i)
95 Fwd[4][i], Bwd[0][i], Bwd[1][i], Bwd[2][i],
96 Bwd[3][i], Bwd[4][i], flux[0][i], flux[1][i],
97 flux[2][i], flux[3][i], flux[4][i]);
112 boost::ignore_unused(HL, srL, HR, srR, srLR);
118 cRoe =
sqrt((gamma - 1.0) * (HRoe - 0.5 * URoe2));
133 NekDouble chiL = dpdrhoL - eL / rhoL * dpdeL;
135 NekDouble chiR = dpdrhoR - eR / rhoR * dpdeR;
147 NekDouble avgKappa = 0.5 * (kappaL + kappaR);
148 NekDouble avgKappaH = 0.5 * (kappaL * hL + kappaR * hR);
153 NekDouble deltaRhoe = rhoR * eR - rhoL * eL;
156 NekDouble dP = deltaP - avgChi * deltaRho - avgKappa * deltaRhoe;
160 NekDouble D = (s * deltaRho) * (s * deltaRho) + deltaP * deltaP;
166 chiRoe = (D * avgChi + s * s * deltaRho * dP) / fac;
167 kappaRoe = D * avgKappa / fac;
175 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)
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)
CompressibleSolver()
Programmatic ctor.
EquationOfStateSharedPtr m_eos
virtual 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
The above copyright notice and this permission notice shall be included.
EquationOfStateFactory & GetEquationOfStateFactory()
Declaration of the equation of state factory singleton.
scalarT< T > abs(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)