74 cup = 0.25 * (rhoL + rhoR) * (cL + cR);
75 ppv = 0.5 * (pL + pR) + 0.5 * (uL - uR) * cup;
76 ppv = std::max(0.0, ppv);
77 pmin = std::min(pL, pR);
78 pmax = std::max(pL, pR);
81 if (qmax <= quser && pmin <= ppv && ppv <= pmax)
91 (pq * uL / cL + uR / cR + g[4] * (pq - 1.0)) / (pq / cL + 1.0 / cR);
92 NekDouble ptL = 1.0 + g[7] * (uL - um) / cL;
93 NekDouble ptR = 1.0 + g[7] * (um - uR) / cR;
94 return 0.5 * (pL * pow(ptL, g[3]) + pR * pow(ptR, g[3]));
101 return (geL * pL + geR * pR - (uR - uL)) / (geL + geR);
124 f = g[4] * ck * (pow(prat, g[1]) - 1.0);
125 fd = pow(prat, -g[2]) / (dk * ck);
134 fd = (1.0 - 0.5 * (
p - pk) / (bk +
p)) * qrt;
186 (gamma - 1.0) * (EL - 0.5 * (rhouL * uL + rhovL * vL + rhowL * wL));
188 (gamma - 1.0) * (ER - 0.5 * (rhouR * uR + rhovR * vR + rhowR * wR));
192 (gamma - 1.0) / (2.0 * gamma),
193 (gamma + 1.0) / (2.0 * gamma),
194 2.0 * gamma / (gamma - 1.0),
197 (gamma - 1.0) / (gamma + 1.0),
205 ASSERTL0(g[4] * (cL + cR) > (uR - uL),
206 "Vacuum is generated by given data.");
215 for (k = 0; k <
NRITER; ++k)
217 prefun(g, pOld, rhoL, pL, cL, fL, fLd);
218 prefun(g, pOld, rhoR, pR, cR, fR, fRd);
219 p = pOld - (fL + fR + uDiff) / (fLd + fRd);
220 change = 2 * fabs((
p - pOld) / (
p + pOld));
248 NekDouble outRho, outU, outV, outW, outP;
273 outRho = rhoL * pow(
p / pL, 1.0 / gamma);
282 NekDouble c = g[5] * (cL + g[7] * (uL - S));
283 outRho = rhoL * pow(c / cL, g[4]);
284 outU = g[5] * (cL + g[7] * uL + S);
287 outP = pL * pow(c / cL, g[3]);
308 outRho = rhoL * (pmL + g[6]) / (pmL * g[6] + 1.0);
335 outRho = rhoR * (pmR + g[6]) / (pmR * g[6] + 1.0);
364 outRho = rhoR * pow(
p / pR, 1.0 / gamma);
373 NekDouble c = g[5] * (cR - g[7] * (uR - S));
374 outRho = rhoR * pow(c / cR, g[4]);
375 outU = g[5] * (-cR + g[7] * uR + S);
378 outP = pR * pow(c / cR, g[3]);
385 rhof = outRho * outU;
386 rhouf = outP + outRho * outU * outU;
387 rhovf = outRho * outU * outV;
388 rhowf = outRho * outU * outW;
390 (outP / (gamma - 1.0) +
391 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)