23 "Adds side fluxes for the 1-D, 1-phase, variable-area Euler equations");
29 params.
addCoupledVar(
"passives_times_area",
"Passive transport solution variables");
31 params.
addRequiredParam<UserObjectName>(
"numerical_flux",
"Name of numerical flux user object");
39 _A_elem(adCoupledValue(
"A_linear")),
40 _A_neig(adCoupledNeighborValue(
"A_linear")),
41 _rhoA1(getADMaterialProperty<Real>(
"rhoA")),
42 _rhouA1(getADMaterialProperty<Real>(
"rhouA")),
43 _rhoEA1(getADMaterialProperty<Real>(
"rhoEA")),
44 _passives_times_area1(getADMaterialProperty<
std::vector<Real>>(
"passives_times_area")),
45 _p1(getADMaterialProperty<Real>(
"p")),
46 _rhoA2(getNeighborADMaterialProperty<Real>(
"rhoA")),
47 _rhouA2(getNeighborADMaterialProperty<Real>(
"rhouA")),
48 _rhoEA2(getNeighborADMaterialProperty<Real>(
"rhoEA")),
49 _passives_times_area2(getNeighborADMaterialProperty<
std::vector<Real>>(
"passives_times_area")),
50 _p2(getNeighborADMaterialProperty<Real>(
"p")),
52 _rhoA_var(coupled(
"rhoA")),
53 _rhouA_var(coupled(
"rhouA")),
54 _rhoEA_var(coupled(
"rhoEA")),
55 _n_passives(isParamValid(
"passives_times_area") ? coupledComponents(
"passives_times_area") : 0),
56 _jmap(getIndexMapping()),
57 _equation_index(_jmap.at(_var.number()))
84 const std::vector<ADReal> & flux_elem =
86 const std::vector<ADReal> & flux_neig =
102std::map<unsigned int, unsigned int>
105 std::map<unsigned int, unsigned int> jmap;
110 jmap.insert(std::pair<unsigned int, unsigned int>(
coupled(
"passives_times_area", i),
registerMooseObject("ThermalHydraulicsApp", ADNumericalFlux3EqnDGKernel)
DualNumber< Real, DNDerivativeType, true > ADReal
const VariableTestValue & _test_neighbor
static InputParameters validParams()
const VariableTestValue & _test
Base class for computing numerical fluxes for FlowModelSinglePhase.
Adds side fluxes for the 1-D, 1-phase, variable-area Euler equations.
const ADMaterialProperty< std::vector< Real > > & _passives_times_area2
virtual ADReal computeQpResidual(Moose::DGResidualType type)
const ADNumericalFlux3EqnBase & _numerical_flux
Numerical flux user object.
const ADMaterialProperty< Real > & _rhouA1
static InputParameters validParams()
const ADVariableValue & _A_elem
Area.
const ADVariableValue & _A_neig
const unsigned int _rhouA_var
const ADMaterialProperty< Real > & _rhouA2
const ADMaterialProperty< std::vector< Real > > & _passives_times_area1
const ADMaterialProperty< Real > & _rhoEA2
std::map< unsigned int, unsigned int > getIndexMapping() const
Creates the mapping of coupled variable index to index in Euler system.
const unsigned int _n_passives
Number of passive transport variables.
const unsigned int _rhoA_var
const ADMaterialProperty< Real > & _rhoA2
ADNumericalFlux3EqnDGKernel(const InputParameters ¶meters)
const ADMaterialProperty< Real > & _rhoEA1
const unsigned int _equation_index
index within the Euler system of the equation upon which this kernel acts
const unsigned int _rhoEA_var
const ADMaterialProperty< Real > & _rhoA1
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
const unsigned int & _current_side
const Elem *const & _current_elem
const std::string & type() const
virtual const std::vector< ADReal > & getFlux(const unsigned int iside, const dof_id_type ielem, bool res_side_is_left, const std::vector< ADReal > &UL_1d, const std::vector< ADReal > &UR_1d, Real nLR_dot_d) const
Gets the 1D flux vector for an element/side combination.
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs for 1D.
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs for 1D.