36 #include <boost/core/ignore_unused.hpp>
37 #include <boost/algorithm/string/predicate.hpp>
49 pSession->LoadSolverInfo(
"EquationOfState",
54 m_idealGas = boost::iequals(eosType,
"IdealGas");
72 int nvariables = Fwd.size();
78 for (
int i = 0; i < Fwd[0].size(); ++i)
81 Fwd [0][i], Fwd [1][i], 0.0, 0.0, Fwd [2][i],
82 Bwd [0][i], Bwd [1][i], 0.0, 0.0, Bwd [2][i],
83 flux[0][i], flux[1][i], rhouf, rhovf, flux[2][i]);
88 for (
int i = 0; i < Fwd[0].size(); ++i)
91 Fwd [0][i], Fwd [1][i], Fwd [2][i], 0.0, Fwd [3][i],
92 Bwd [0][i], Bwd [1][i], Bwd [2][i], 0.0, Bwd [3][i],
93 flux[0][i], flux[1][i], flux[2][i], rhovf, flux[3][i]);
98 for (
int i = 0; i < Fwd[0].size(); ++i)
101 Fwd [0][i], Fwd [1][i], Fwd [2][i], Fwd [3][i], Fwd [4][i],
102 Bwd [0][i], Bwd [1][i], Bwd [2][i], Bwd [3][i], Bwd [4][i],
103 flux[0][i], flux[1][i], flux[2][i], flux[3][i], flux[4][i]);
118 boost::ignore_unused(HL, srL, HR, srR, srLR);
124 cRoe =
sqrt((gamma - 1.0)*(HRoe - 0.5 * URoe2));
139 NekDouble chiL = dpdrhoL - eL / rhoL * dpdeL;
141 NekDouble chiR = dpdrhoR - eR / rhoR * dpdeR;
153 NekDouble avgKappa = 0.5 * (kappaL + kappaR);
154 NekDouble avgKappaH = 0.5 * (kappaL*hL + kappaR*hR);
162 NekDouble dP = deltaP - avgChi * deltaRho - avgKappa * deltaRhoe;
166 NekDouble D = (s*deltaRho)*(s*deltaRho) + deltaP*deltaP;
172 chiRoe = (D*avgChi + s*s*deltaRho*dP) / fac;
173 kappaRoe = D*avgKappa / fac;
181 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
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)