22 params.
addParam<MooseFunctorName>(
"advected_variable", 0,
"The name of the variable");
23 params.
addRequiredParam<MooseFunctorName>(
"vel_x",
"x-component of the advecting velocity");
24 params.
addParam<MooseFunctorName>(
"vel_y",
"y-component of the advecting velocity");
25 params.
addParam<MooseFunctorName>(
"vel_z",
"z-component of the advecting velocity");
26 params.
addParam<MaterialPropertyName>(
29 "The advected material property of which to study the flow; " 30 "useful for finite element simulations");
33 "$(\\vec{J} \\cdot \\vec{n} = \\vec{v} u \\cdot \\vec{n})$.");
40 _use_normal(getParam<
MooseEnum>(
"component") ==
"normal"),
41 _component(getParam<
MooseEnum>(
"component")),
42 _advected_quantity(getFunctor<
Real>(
"advected_variable")),
43 _normals(_assembly.normals()),
44 _vel_x(getFunctor<
Real>(
"vel_x")),
45 _vel_y(_mesh.dimension() >= 2 ? &getFunctor<
Real>(
"vel_y") : nullptr),
46 _vel_z(_mesh.dimension() == 3 ? &getFunctor<
Real>(
"vel_z") : nullptr),
47 _advected_quantity_supplied(parameters.isParamSetByUser(
"advected_variable")),
48 _advected_mat_prop_supplied(parameters.isParamSetByUser(
"advected_mat_prop")),
49 _advected_material_property(getMaterialProperty<
Real>(
"advected_mat_prop"))
52 paramError(
"boundary",
"A boundary must be provided if using the normal component!");
54 mooseError(
"AdvectiveFluxAux should be provided either an advected variable " 55 "or an advected material property");
57 mooseError(
"AdvectiveFluxAux is designed for use in finite element simulations.");
68 Real vel_x, vel_y, vel_z = 0;
Auxiliary kernel responsible for computing a component of the advection flux vector.
const Moose::Functor< Real > & _vel_x
Velocity components.
static InputParameters validParams()
const Moose::Functor< Real > & _advected_quantity
Functor for the scalar field advected quantity (for a variable usually)
const unsigned int & _current_side
current side of the current element
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
AdvectiveFluxAux(const InputParameters ¶meters)
virtual Real computeValue()
Compute and return the value of the aux variable.
const Node *const & _current_node
Current node (valid only for nodal kernels)
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
const bool _advected_mat_prop_supplied
Whether an advected material property was supplied in the input.
const bool _use_normal
Whether the normal component has been selected.
const MaterialProperty< Real > & _advected_material_property
Material property storing the advected quantity; used for finite elements.
const MooseArray< Point > & _normals
normals at quadrature points
const bool _advected_quantity_supplied
Whether an advected quantity was supplied in the input.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const Moose::Functor< Real > *const _vel_z
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
Quadrature rule being used.
const Moose::Functor< Real > *const _vel_y
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
unsigned int _qp
Quadrature point index.
static InputParameters validParams()
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const MooseArray< Point > & _q_point
Active quadrature points.
registerMooseObject("MooseApp", AdvectiveFluxAux)
Argument for requesting functor evaluation at quadrature point locations on an element side...
bool isNodal() const
Nodal or elemental kernel?
const int _component
Will hold 0, 1, or 2 corresponding to x, y, or z.