44 "Roe Riemann solver");
78 double rhoL,
double rhouL,
double rhovL,
double rhowL,
double EL,
79 double rhoR,
double rhouR,
double rhovR,
double rhowR,
double ER,
80 double &rhof,
double &rhouf,
double &rhovf,
double &rhowf,
double &Ef)
94 (EL - 0.5 * (rhouL * uL + rhovL * vL + rhowL * wL));
96 (ER - 0.5 * (rhouR * uR + rhovR * vR + rhowR * wR));
108 NekDouble uRoe = (srL * uL + srR * uR) / srLR;
109 NekDouble vRoe = (srL * vL + srR * vR) / srLR;
110 NekDouble wRoe = (srL * wL + srR * wR) / srLR;
111 NekDouble hRoe = (srL * hL + srR * hR) / srLR;
112 NekDouble URoe = (uRoe * uRoe + vRoe * vRoe + wRoe * wRoe);
113 NekDouble cRoe = sqrt((gamma - 1.0)*(hRoe - 0.5 * URoe));
117 {1, uRoe - cRoe, vRoe, wRoe, hRoe - uRoe * cRoe},
118 {1, uRoe, vRoe, wRoe, 0.5 * URoe},
121 {1, uRoe+cRoe, vRoe, wRoe, hRoe + uRoe*cRoe}
134 NekDouble jumpbar = jump[4] - (jump[2]-vRoe*jump[0])*vRoe -
135 (jump[3]-wRoe*jump[0])*wRoe;
139 alpha[1] = (gamma-1.0)*(jump[0]*(hRoe - uRoe*uRoe) + uRoe*jump[1] -
140 jumpbar)/(cRoe*cRoe);
141 alpha[0] = (jump[0]*(uRoe + cRoe) - jump[1] - cRoe*alpha[1])/(2.0*cRoe);
142 alpha[4] = jump[0] - (alpha[0] + alpha[1]);
143 alpha[2] = jump[2] - vRoe * jump[0];
144 alpha[3] = jump[3] - wRoe * jump[0];
147 rhof = 0.5*(rhoL*uL + rhoR*uR);
148 rhouf = 0.5*(pL + rhoL*uL*uL + pR + rhoR*uR*uR);
149 rhovf = 0.5*(rhoL*uL*vL + rhoR*uR*vR);
150 rhowf = 0.5*(rhoL*uL*wL + rhoR*uR*wR);
151 Ef = 0.5*(uL*(EL + pL) + uR*(ER + pR));
164 for (
int i = 0; i < 5; ++i)
166 uRoeAbs = 0.5*alpha[i]*lambda[i];
168 rhof -= uRoeAbs*k[i][0];
169 rhouf -= uRoeAbs*k[i][1];
170 rhovf -= uRoeAbs*k[i][2];
171 rhowf -= uRoeAbs*k[i][3];
172 Ef -= uRoeAbs*k[i][4];
static std::string solverName
static RiemannSolverSharedPtr create()
virtual void v_PointSolve(double rhoL, double rhouL, double rhovL, double rhowL, double EL, double rhoR, double rhouR, double rhovR, double rhowR, double ER, double &rhof, double &rhouf, double &rhovf, double &rhowf, double &Ef)
Roe Riemann solver.
RiemannSolverFactory & GetRiemannSolverFactory()
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.