22 "advection term in a partial differential equation.");
23 params.
addRequiredParam<RealVectorValue>(
"velocity",
"Constant advection velocity");
25 "advected_interp_method_name",
26 "Name of the FVInterpolationMethod to use for the advected quantity.");
33 _velocity(getParam<RealVectorValue>(
"velocity")),
34 _adv_interp_method(getFVAdvectedInterpolationMethod(
35 getParam<InterpolationMethodName>(
"advected_interp_method_name")))
80 bc.second->type(),
" is not a compatible boundary condition with ", this->
type(),
"!");
113 mooseAssert(adv_bc,
"This should be a valid BC!");
115 const auto boundary_value_matrix_contrib = adv_bc->computeBoundaryValueMatrixContribution();
127 mooseAssert(adv_bc,
"This should be a valid BC!");
132 const auto boundary_value_rhs_contrib = adv_bc->computeBoundaryValueRHSContribution();
registerMooseObject("MooseApp", LinearFVAdvection)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
virtual Moose::FV::GradientLimiterType gradientLimiter() const
Limiter used by interpolations that require limited gradients.
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
Compute the matrix weights for the advected face value.
virtual bool needsGradients() const
Whether advected interpolation requires adjacent-cell gradients.
Helper interface for objects that need access to FVInterpolationMethod instances.
This data structure is used to store geometric and variable related metadata about each cell face in ...
const Point & normal() const
Returns the unit normal vector for the face oriented outward from the face's elem element.
const ElemInfo * elemInfo() const
const ElemInfo * neighborInfo() const
Base class for boundary conditions that are valid for advection diffusion problems.
Kernel that adds contributions from an advection term discretized using the finite volume method to a...
VectorValue< Real > _neighbor_grad_storage
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
Computes the right hand side contribution from a boundary face.
virtual Real computeElemMatrixContribution() override
Computes the system matrix contribution from an element side on an internal face.
VectorValue< Real > _elem_grad_storage
Reusable gradient storage used when advected interpolation requires gradients.
virtual Real computeElemRightHandSideContribution() override
Computes the right hand side contribution from the element side on an internal face.
virtual Real computeNeighborMatrixContribution() override
Computes the system matrix contribution from the neighbor side on an internal face.
const RealVectorValue _velocity
Constant advecting velocity vector.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
FVAdvectedInterpolationMethod::AdvectedSystemContribution _adv_interp_result
Cached weights/correction for the current face (refreshed in setupFaceData)
virtual Real computeNeighborRightHandSideContribution() override
Computes the right hand side contribution from the neighbor side on an internal face.
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
static InputParameters validParams()
LinearFVAdvection(const InputParameters ¶ms)
Class constructor.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc) override
Computes the matrix contribution from a boundary face.
const FVAdvectedInterpolationMethod & _adv_interp_method
The interpolation method to use for the advected quantity.
Base class for boundary conditions for linear FV systems.
Finite volume kernel that contributes approximations of discretized face flux terms to the matrix and...
FaceInfo::VarFaceNeighbors _current_face_type
Face ownership information for the current face.
virtual void setupFaceData(const FaceInfo *face_info)
Set the current FaceInfo object.
Real _current_face_area
The current, coordinate system specific face area.
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
static InputParameters validParams()
MooseLinearVariableFV< Real > & _var
Reference to the linear finite volume variable.
const std::string & type() const
Get the type of this class.
void computeCellGradients()
Switch to request cell gradient computations.
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
Get the solution value for the provided element and seed the derivative for the corresponding dof ind...
const std::unordered_map< BoundaryID, LinearFVBoundaryCondition * > & getBoundaryConditionMap() const
VectorValue< Real > gradSln(const ElemInfo &elem_info, const StateArg &state) const
Get the variable gradient at a cell center.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
std::pair< Real, Real > weights_matrix