23 "Name for fluid properties user object");
24 params.
addClassDescription(
"Computes internal side flux for the 1-D, 1-phase, variable-area " 25 "Euler equations using the HLLC approximate Riemann solver.");
38 const std::vector<ADReal> & UR,
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});
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;
192 const std::vector<ADReal> & UR)
const
Base class for fluid properties of vapor mixtures.
registerMooseObject("ThermalHydraulicsApp", NumericalFluxGasMixHLLC)
Base class for computing numerical fluxes for FlowModelGasMix.
Real getNaN() const
Throws an error or returns a NaN with or without a warning, with a default message.
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.
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int _last_region_index
Index describing the region last entered, which is useful for testing and debugging.
virtual ADReal computeFlowArea(const std::vector< ADReal > &UL, const std::vector< ADReal > &UR) const
Computes the flow area that is used in the numerical flux.
Computes the numerical flux for FlowModelGasMix using the HLLC approximate Riemann solver...
static InputParameters validParams()
NumericalFluxGasMixHLLC(const InputParameters ¶meters)
static InputParameters validParams()
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs.
const VaporMixtureFluidProperties & _fp
fluid properties user object
Interface class for producing errors, warnings, or just quiet NaNs.
static const std::string cL
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs for 3D.
static InputParameters validParams()