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