28 std::vector<GenericReal<is_ad>>
38 const auto xi = xirhoA / rhoA;
39 const auto rho = rhoA /
A;
40 const auto vel = rhouA / rhoA;
41 const auto v = 1.0 / rho;
42 const auto e = rhoEA / rhoA - 0.5 * vel * vel;
43 const auto p =
fp.p_from_v_e(
v, e, {xi});
44 const auto T =
fp.T_from_v_e(
v, e, {xi});
63 std::vector<GenericReal<is_ad>>
73 const auto rho =
fp.rho_from_p_T(p, T, {xi});
74 const auto rhoA = rho *
A;
75 const auto e =
fp.e_from_p_rho(p, rho, {xi});
76 const auto E = e + 0.5 * vel * vel;
96 std::vector<GenericReal<is_ad>>
106 const auto rho =
fp.rho_from_p_T(p, T, {xi});
107 const auto e =
fp.e_from_p_rho(p, rho, {xi});
108 const auto E = e + 0.5 * vel * vel;
126 template <
bool is_ad>
127 std::vector<GenericReal<is_ad>>
129 const std::vector<MooseVariable *> & U_vars,
132 mooseAssert(elem,
"The supplied element is a nullptr.");
140 mooseAssert(U_vars[i],
"The supplied variable is a nullptr.");
141 U[i] = U_vars[i]->getElementalValue(elem);
144 std::vector<dof_id_type> dof_indices;
146 const std::vector<unsigned int> ind = {
150 const auto i = ind[
j];
151 U_vars[i]->dofMap().dof_indices(elem, dof_indices, U_vars[i]->number());
158 U[i] = U_vars[i]->getElementalValueOld(elem);
164 template <
bool is_ad>
169 mooseAssert(
fp.getNumberOfSecondaryVapors() == 1,
170 "This function assumes there is a single secondary fluid.");
179 return moles_secondary / (moles_primary + moles_secondary);
Base class for fluid properties of vapor mixtures.
Moose::GenericType< Real, is_ad > GenericReal
std::vector< GenericReal< is_ad > > computeFluxFromPrimitive(const std::vector< GenericReal< is_ad >> &W, const GenericReal< is_ad > &A, const VaporMixtureFluidProperties &fp)
Computes the numerical flux vector from the primitive solution vector.
static const unsigned int N_PRIM_VARS
virtual Real molarMass() const
Molar mass [kg/mol].
std::vector< GenericReal< is_ad > > computePrimitiveSolution(const std::vector< GenericReal< is_ad >> &U, const VaporMixtureFluidProperties &fp)
Computes the primitive solution vector from the conservative solution vector.
static const std::string F
GenericReal< is_ad > computeSecondaryMoleFraction(const GenericReal< is_ad > &xi_secondary, const VaporMixtureFluidProperties &fp)
Common class for single phase fluid properties.
static const std::string v
IntRange< T > make_range(T beg, T end)
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs.
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs.
std::vector< GenericReal< is_ad > > computeConservativeSolution(const std::vector< GenericReal< is_ad >> &W, const GenericReal< is_ad > &A, const VaporMixtureFluidProperties &fp)
Computes the conservative solution vector from the primitive solution vector.
std::vector< GenericReal< is_ad > > getElementalSolutionVector(const Elem *elem, const std::vector< MooseVariable *> &U_vars, bool is_implicit)
Gets the elemental conservative solution vector.
auto index_range(const T &sizable)