22 "advection term for a passive scalar.");
24 "rhie_chow_user_object",
25 "The rhie-chow user-object which is used to determine the face velocity.");
27 "advected_interp_method_name",
28 "Name of the FVInterpolationMethod to use for the advected quantity.");
29 params.
addParam<MooseFunctorName>(
"u_slip",
"The slip-velocity in the x direction.");
30 params.
addParam<MooseFunctorName>(
"v_slip",
"The slip-velocity in the y direction.");
31 params.
addParam<MooseFunctorName>(
"w_slip",
"The slip-velocity in the z direction.");
38 _mass_flux_provider(getUserObject<
RhieChowMassFlux>(
"rhie_chow_user_object")),
39 _adv_interp_method(getFVAdvectedInterpolationMethod(
40 getParam<InterpolationMethodName>(
"advected_interp_method_name"))),
41 _gradient_field(_adv_interp_method.needsGradients()
42 ? &_var.requestCellGradients(_adv_interp_method.gradientMethodName())
44 _volumetric_face_flux(0.0),
45 _u_slip(isParamValid(
"u_slip") ? &getFunctor<
ADReal>(
"u_slip") : nullptr),
46 _v_slip(isParamValid(
"v_slip") ? &getFunctor<
ADReal>(
"v_slip") : nullptr),
47 _w_slip(isParamValid(
"w_slip") ? &getFunctor<
ADReal>(
"w_slip") : nullptr),
48 _add_slip_model(isParamValid(
"u_slip") ? true : false)
81 const auto *
const adv_bc = cast_ptr<const LinearFVAdvectionDiffusionBC *>(&bc);
82 mooseAssert(adv_bc,
"This should be a valid BC!");
84 const auto boundary_value_matrix_contrib = adv_bc->computeBoundaryValueMatrixContribution();
87 const auto factor = (
_current_face_type == FaceInfo::VarFaceNeighbors::ELEM) ? 1.0 : -1.0;
95 const auto *
const adv_bc = cast_ptr<const LinearFVAdvectionDiffusionBC *>(&bc);
96 mooseAssert(adv_bc,
"This should be a valid BC!");
99 const auto factor = (
_current_face_type == FaceInfo::VarFaceNeighbors::ELEM ? 1.0 : -1.0);
101 const auto boundary_value_rhs_contrib = adv_bc->computeBoundaryValueRHSContribution();
122 Moose::FV::LimiterType::CentralDifference,
128 RealVectorValue velocity_slip_vel_vec;
130 velocity_slip_vel_vec(0) = (*_u_slip)(face_arg, state).
value();
132 velocity_slip_vel_vec(1) = (*_v_slip)(face_arg, state).
value();
134 velocity_slip_vel_vec(2) = (*_w_slip)(face_arg, state).
value();
151 mooseAssert(
_gradient_field,
"Gradient field should be registered when gradients are needed.");
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", LinearFVScalarAdvection)
virtual AdvectedSystemContribution advectedInterpolate(const FaceInfo &face, Real elem_value, Real neighbor_value, const VectorValue< Real > *elem_grad, const VectorValue< Real > *neighbor_grad, Real mass_flux) const=0
virtual bool needsGradients() const
const Point & normal() const
const Elem * neighborPtr() const
const ElemInfo * elemInfo() const
const ElemInfo * neighborInfo() const
FaceInfo::VarFaceNeighbors _current_face_type
virtual void setupFaceData(const FaceInfo *face_info)
const FaceInfo * _current_face_info
static InputParameters validParams()
RealVectorValue gradient(const ElemInfo &elem_info) const
MooseLinearVariableFV< Real > & _var
An advection kernel that implements the advection term for the passive scalar transport equation.
virtual Real computeNeighborMatrixContribution() override
virtual Real computeNeighborRightHandSideContribution() override
virtual Real computeElemRightHandSideContribution() override
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
LinearFVScalarAdvection(const InputParameters ¶ms)
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
virtual void setupFaceData(const FaceInfo *face_info) override
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
const Moose::Functor< ADReal > *const _v_slip
slip velocity in direction y
const Moose::Functor< ADReal > *const _u_slip
slip velocity in direction x
const Moose::Functor< ADReal > *const _w_slip
slip velocity in direction z
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Cached weights/correction for the current face (refreshed in setupFaceData)
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
VectorValue< Real > _neighbor_grad_storage
virtual Real computeElemMatrixContribution() override
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
Real _volumetric_face_flux
Container for the velocity on the face which will be reused in the advection term's matrix and right ...
const LinearFVGradientReader *const _gradient_field
Gradient field used by advected interpolations that require gradients.
static InputParameters validParams()
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
virtual const OutputTools< Real >::VariableValue & value()
User object responsible for determining the face fluxes using the Rhie-Chow interpolation in a segreg...
Real getVolumetricFaceFlux(const FaceInfo &fi) const
Get the volumetric face flux (used in advection terms)
Moose::StateArg determineState() const
std::pair< Real, Real > weights_matrix