18 params.
addClassDescription(
"Computes the residual of advective term using finite volume method.");
22 "An optional parameter for specifying an advected quantity from a material property. If this "
23 "is not specified, then the advected quantity will simply be the variable that this object "
26 MooseEnum advected_interp_method(
"average upwind skewness-corrected",
"upwind");
28 "advected_interp_method",
29 advected_interp_method,
30 "The interpolation to use for the advected quantity. Options are "
31 "'upwind', 'average', and 'skewness-corrected' with the default being 'upwind'.");
38 _adv_quant(getFunctor<
ADReal>(isParamValid(
"advected_quantity") ?
"advected_quantity"
43 const auto & advected_interp_method = getParam<MooseEnum>(
"advected_interp_method");
44 if (advected_interp_method ==
"average")
46 else if (advected_interp_method ==
"skewness-corrected")
48 else if (advected_interp_method ==
"upwind")
52 static_cast<std::string
>(advected_interp_method));
61 LimiterType::CentralDifference,
65 const auto adv_quant_interface =
72 return _normal * v * adv_quant_interface;
DualNumber< Real, DNDerivativeType, true > ADReal
registerADMooseObject("MooseApp", FVMatAdvection)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
FVFluxKernel is used for calculating residual contributions from numerical fluxes from surface integr...
static InputParameters validParams()
RealVectorValue _normal
This is the outward unit normal vector for the face the kernel is currently operating on.
const FaceInfo * _face_info
This is holds meta-data for geometric information relevant to the current face including elem+neighbo...
static InputParameters validParams()
Moose::FV::InterpMethod _advected_interp_method
The interpolation method to use for the advected quantity.
FVMatAdvection(const InputParameters ¶ms)
virtual ADReal computeQpResidual() override
This is the primary function that must be implemented for flux kernel terms.
const Moose::Functor< ADRealVectorValue > & _vel
const Moose::Functor< ADReal > & _adv_quant
The advected quantity.
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
Create a functor face argument from provided component arguments.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
@ SkewCorrectedAverage
(gc*elem+(1-gc)*neighbor)+gradient*(rf-rf')