16 #include "libmesh/elem.h" 28 std::vector<GenericReal<is_ad>>
37 const auto rho = rhoA /
A;
38 const auto vel = rhouA / rhoA;
39 const auto v = 1.0 / rho;
40 const auto e = rhoEA / rhoA - 0.5 * vel * vel;
41 const auto p =
fp.p_from_v_e(
v, e);
42 const auto T =
fp.T_from_v_e(
v, e);
60 std::vector<GenericReal<is_ad>>
69 const ADReal rho =
fp.rho_from_p_T(p, T);
70 const ADReal e =
fp.e_from_p_rho(p, rho);
71 const ADReal E = e + 0.5 * vel * vel;
90 std::vector<GenericReal<is_ad>>
99 const auto rho =
fp.rho_from_p_T(p, T);
100 const auto e =
fp.e_from_p_rho(p, rho);
101 const auto E = e + 0.5 * vel * vel;
118 template <
bool is_ad>
119 std::vector<GenericReal<is_ad>>
121 const std::vector<MooseVariable *> & U_vars,
124 mooseAssert(elem,
"The supplied element is a nullptr.");
132 mooseAssert(U_vars[i],
"The supplied variable is a nullptr.");
133 U[i] = U_vars[i]->getElementalValue(elem);
136 std::vector<dof_id_type> dof_indices;
139 for (
unsigned int j = 0;
j < ind.size();
j++)
141 const auto i = ind[
j];
142 U_vars[i]->dofMap().dof_indices(elem, dof_indices, U_vars[i]->number());
149 U[i] = U_vars[i]->getElementalValueOld(elem);
Moose::GenericType< Real, is_ad > GenericReal
std::vector< GenericReal< is_ad > > computeConservativeSolutionVector(const std::vector< GenericReal< is_ad >> &W, const GenericReal< is_ad > &A, const SinglePhaseFluidProperties &fp)
Computes the conservative solution vector from the primitive solution vector.
std::vector< GenericReal< is_ad > > computeFluxFromPrimitive(const std::vector< GenericReal< is_ad >> &W, const GenericReal< is_ad > &A, const SinglePhaseFluidProperties &fp)
Computes the numerical flux vector from the primitive solution vector.
static const std::string F
std::vector< GenericReal< is_ad > > computePrimitiveSolutionVector(const std::vector< GenericReal< is_ad >> &U, const SinglePhaseFluidProperties &fp)
Computes the primitive solution vector from the conservative solution vector.
Common class for single phase fluid properties.
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs for 1D.
std::vector< GenericReal< is_ad > > getElementalSolutionVector(const Elem *elem, const std::vector< MooseVariable *> &U_vars, bool is_implicit)
Gets the elemental conservative solution vector.
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs for 1D.
static const unsigned int N_PRIM_VARS
static const std::string v
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")