19 params.
addParam<MaterialPropertyName>(
21 "Velocity vector as a material property. Should be provided when we want the velocity value " 22 "to be determined implicitly (e.g. we don't have a Dirichlet condition)");
23 params.
addParam<FunctionName>(
"velocity_function",
24 "Function describing the values of velocity on the boundary.");
26 "Boundary condition for advection when it is integrated by parts. Supports Dirichlet " 27 "(inlet-like) and implicit (outlet-like) conditions.");
28 params.
addParam<MaterialPropertyName>(
"advected_quantity",
29 "An optional material property to be advected. If not " 30 "supplied, then the variable will be used.");
31 params.
addParam<FunctionName>(
"primal_dirichlet_value",
32 "The value of the primal variable on the boundary.");
33 params.
addParam<MaterialPropertyName>(
36 "If a primal Dirichlet value is supplied, then a coefficient may be optionally multiplied " 37 "that multiples the Dirichlet value");
43 _velocity_mat_prop(isParamValid(
"velocity_mat_prop")
46 _velocity_function(isParamValid(
"velocity_function") ? &getFunction(
"velocity_function")
48 _adv_quant(isParamValid(
"advected_quantity")
49 ? getADMaterialProperty<
Real>(
"advected_quantity").
get()
52 isParamValid(
"primal_dirichlet_value") ? &getFunction(
"primal_dirichlet_value") : nullptr),
53 _primal_coeff(getADMaterialProperty<
Real>(
"primal_coefficient"))
57 "This parameter should only be provided when 'primal_dirichlet_value' is provided");
59 mooseError(
"Only one of 'primal_dirichlet_value' or 'advected_quantity' should be provided");
61 mooseError(
"Exactly one of 'velocity_mat_prop' or 'velocity_function' should be provided");
const Function *const _velocity_function
The velocity as a function.
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 ...
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
const Function *const _primal_dirichlet
Dirichlet value for the primal variable.
unsigned int _i
i-th, j-th index for enumerating test and shape functions
virtual ADReal computeQpResidual() override
Compute this IntegratedBC's contribution to the residual at the current quadrature point...
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
ADConservativeAdvectionBC(const InputParameters ¶meters)
unsigned int _qp
quadrature point index
const MooseArray< Point > & _q_point
active quadrature points
registerMooseObject("MooseApp", ADConservativeAdvectionBC)
const ADMaterialProperty< Real > & _primal_coeff
Coefficient for multiplying the primal Dirichlet value.
Base class for deriving any boundary condition of a integrated type.
const ADMaterialProperty< RealVectorValue > *const _velocity_mat_prop
The velocity as a material property.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADTemplateVariableTestValue< T > & _test
test function values (in QPs)
const MooseArray< ADReal > & _adv_quant
The advected quantity.
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...
virtual RealVectorValue vectorValue(Real t, const Point &p) const
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
static InputParameters validParams()
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
libMesh::VectorValue< ADReal > ADRealVectorValue
AD typedefs.
A boundary condition for when the advection term is integrated by parts.
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
const MooseArray< ADPoint > & _normals
normals at quadrature points