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");
69 int nvariables = Fwd.size();
75 for (
int 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 (
int 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 (
int 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]);
114 boost::ignore_unused(HL, srL, HR, srR, srLR);
120 cRoe =
sqrt((gamma - 1.0) * (HRoe - 0.5 * URoe2));
135 NekDouble chiL = dpdrhoL - eL / rhoL * dpdeL;
137 NekDouble chiR = dpdrhoR - eR / rhoR * dpdeR;
149 NekDouble avgKappa = 0.5 * (kappaL + kappaR);
150 NekDouble avgKappaH = 0.5 * (kappaL * hL + kappaR * hR);
155 NekDouble deltaRhoe = rhoR * eR - rhoL * eL;
158 NekDouble dP = deltaP - avgChi * deltaRho - avgKappa * deltaRhoe;
162 NekDouble D = (s * deltaRho) * (s * deltaRho) + deltaP * deltaP;
168 chiRoe = (D * avgChi + s * s * deltaRho * dP) / fac;
169 kappaRoe = D * avgKappa / fac;
177 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
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)