38 const std::vector<ADReal> & UR,
39 const RealVectorValue & nLR,
40 const RealVectorValue & t1,
41 const RealVectorValue & t2,
42 std::vector<ADReal> & FL,
43 std::vector<ADReal> & FR)
const
65 const ADReal rhoL = rhoAL / AL;
67 const ADReal unL = uvecL * nLR;
68 const ADReal ut1L = uvecL * t1;
69 const ADReal ut2L = uvecL * t2;
70 const ADReal rhoEL = rhoEAL / AL;
71 const ADReal vL = 1.0 / rhoL;
72 const ADReal EL = rhoEAL / rhoAL;
73 const ADReal eL = EL - 0.5 * uvecL * uvecL;
74 const ADReal xiL = xirhoAL / rhoAL;
75 const ADReal pL =
_fp.p_from_v_e(vL, eL, {xiL});
76 const ADReal TL =
_fp.T_from_v_e(vL, eL, {xiL});
77 const ADReal cL =
_fp.c_from_p_T(pL, TL, {xiL});
79 const ADReal rhoR = rhoAR / AR;
81 const ADReal unR = uvecR * nLR;
82 const ADReal ut1R = uvecR * t1;
83 const ADReal ut2R = uvecR * t2;
84 const ADReal rhoER = rhoEAR / AR;
85 const ADReal vR = 1.0 / rhoR;
86 const ADReal ER = rhoEAR / rhoAR;
87 const ADReal eR = ER - 0.5 * uvecR * uvecR;
88 const ADReal xiR = xirhoAR / rhoAR;
89 const ADReal pR =
_fp.p_from_v_e(vR, eR, {xiR});
90 const ADReal TR =
_fp.T_from_v_e(vR, eR, {xiR});
91 const ADReal cR =
_fp.c_from_p_T(pR, TR, {xiR});
94 const ADReal sL = std::min(unL - cL, unR - cR);
95 const ADReal sR = std::max(unL + cL, unR + cR);
96 const ADReal sm = (rhoR * unR * (sR - unR) - rhoL * unL * (sL - unL) + pL - pR) /
97 (rhoR * (sR - unR) - rhoL * (sL - unL));
100 const ADReal omegL = 1.0 / (sL - sm);
101 const ADReal omegR = 1.0 / (sR - sm);
104 const ADReal ps = rhoL * (sL - unL) * (sm - unL) + pL;
108 const ADReal rhoLs = omegL * (sL - unL) * rhoL;
109 const ADReal rhounLs = omegL * ((sL - unL) * rhoL * unL + ps - pL);
110 const ADReal rhoELs = omegL * ((sL - unL) * rhoEL - pL * unL + ps * sm);
112 const ADReal rhoRs = omegR * (sR - unR) * rhoR;
113 const ADReal rhounRs = omegR * ((sR - unR) * rhoR * unR + ps - pR);
114 const ADReal rhoERs = omegR * ((sR - unR) * rhoER - pR * unR + ps * sm);
145 else if (sL <= 0.0 && sm > 0.0)
156 else if (sm <= 0.0 && sR >= 0.0)
179 std::fill(FL.begin(), FL.end(),
getNaN());
183 const ADReal A_wall_L = AL - A_flow;
186 const ADReal A_wall_R = AR - A_flow;
virtual void calcFlux(const std::vector< ADReal > &UL, const std::vector< ADReal > &UR, const RealVectorValue &nLR, const RealVectorValue &t1, const RealVectorValue &t2, std::vector< ADReal > &FL, std::vector< ADReal > &FR) const override
Calculates the 3D flux vectors given "left" and "right" states.