75 cup = 0.25 * (rhoL + rhoR) * (cL + cR);
76 ppv = 0.5 * (pL + pR) + 0.5 * (uL - uR) * cup;
77 ppv = std::max(0.0, ppv);
78 pmin = std::min(pL, pR);
79 pmax = std::max(pL, pR);
82 if (qmax <= quser && pmin <= ppv && ppv <= pmax)
92 (pq * uL / cL + uR / cR + g[4] * (pq - 1.0)) / (pq / cL + 1.0 / cR);
93 NekDouble ptL = 1.0 + g[7] * (uL - um) / cL;
94 NekDouble ptR = 1.0 + g[7] * (um - uR) / cR;
95 return 0.5 * (pL * pow(ptL, g[3]) + pR * pow(ptR, g[3]));
102 return (geL * pL + geR * pR - (uR - uL)) / (geL + geR);
125 f = g[4] * ck * (pow(prat, g[1]) - 1.0);
126 fd = pow(prat, -g[2]) / (dk * ck);
135 fd = (1.0 - 0.5 * (
p - pk) / (bk +
p)) * qrt;
187 (gamma - 1.0) * (EL - 0.5 * (rhouL * uL + rhovL * vL + rhowL * wL));
189 (gamma - 1.0) * (ER - 0.5 * (rhouR * uR + rhovR * vR + rhowR * wR));
193 (gamma - 1.0) / (2.0 * gamma),
194 (gamma + 1.0) / (2.0 * gamma),
195 2.0 * gamma / (gamma - 1.0),
198 (gamma - 1.0) / (gamma + 1.0),
206 ASSERTL0(g[4] * (cL + cR) > (uR - uL),
207 "Vacuum is generated by given data.");
216 for (k = 0; k <
NRITER; ++k)
218 prefun(g, pOld, rhoL, pL, cL, fL, fLd);
219 prefun(g, pOld, rhoR, pR, cR, fR, fRd);
220 p = pOld - (fL + fR + uDiff) / (fLd + fRd);
221 change = 2 * fabs((
p - pOld) / (
p + pOld));
249 NekDouble outRho, outU, outV, outW, outP;
274 outRho = rhoL * pow(
p / pL, 1.0 / gamma);
283 NekDouble c = g[5] * (cL + g[7] * (uL - S));
284 outRho = rhoL * pow(c / cL, g[4]);
285 outU = g[5] * (cL + g[7] * uL + S);
288 outP = pL * pow(c / cL, g[3]);
309 outRho = rhoL * (pmL + g[6]) / (pmL * g[6] + 1.0);
336 outRho = rhoR * (pmR + g[6]) / (pmR * g[6] + 1.0);
365 outRho = rhoR * pow(
p / pR, 1.0 / gamma);
374 NekDouble c = g[5] * (cR - g[7] * (uR - S));
375 outRho = rhoR * pow(c / cR, g[4]);
376 outU = g[5] * (-cR + g[7] * uR + S);
379 outP = pR * pow(c / cR, g[3]);
386 rhof = outRho * outU;
387 rhouf = outP + outRho * outU * outU;
388 rhovf = outRho * outU * outV;
389 rhowf = outRho * outU * outW;
391 (outP / (gamma - 1.0) +
392 0.5 * outRho * (outU * outU + outV * outV + outW * outW) + outP);
#define ASSERTL0(condition, msg)
static std::string solverName
ExactSolverToro(const LibUtilities::SessionReaderSharedPtr &pSession)
static RiemannSolverSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
void v_PointSolve(NekDouble rhoL, NekDouble rhouL, NekDouble rhovL, NekDouble rhowL, NekDouble EL, NekDouble rhoR, NekDouble rhouR, NekDouble rhovR, NekDouble rhowR, NekDouble ER, NekDouble &rhof, NekDouble &rhouf, NekDouble &rhovf, NekDouble &rhowf, NekDouble &Ef) override
Exact Riemann solver for the Euler equations.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
RiemannSolverFactory & GetRiemannSolverFactory()
NekDouble guessp(NekDouble g[], NekDouble rhoL, NekDouble uL, NekDouble pL, NekDouble cL, NekDouble rhoR, NekDouble uR, NekDouble pR, NekDouble cR)
Use either PVRS, two-rarefaction or two-shock Riemann solvers to calculate an initial pressure for th...
void prefun(NekDouble *g, NekDouble p, NekDouble dk, NekDouble pk, NekDouble ck, NekDouble &f, NekDouble &fd)
Evaluate pressure functions fL and fR in Newton iteration of Riemann solver (see equation 4....
scalarT< T > sqrt(scalarT< T > in)