20 "Functor describing a diagonal diffusion tensor.");
22 "use_two_term_expansion",
24 "Whether to reconstruct the boundary value using the prescribed flux and cell gradient. If " 25 "false, the boundary value is approximated by the adjacent cell value.");
27 "Adds a prescribed anisotropic diffusive flux boundary condition to a linear finite " 28 "volume system and reconstructs the boundary value using a diagonal diffusion tensor.");
35 _two_term_expansion(getParam<bool>(
"use_two_term_expansion")),
52 const auto boundary_normal =
56 const auto tangential_cell_to_face =
57 cell_to_face - (cell_to_face * boundary_normal) * boundary_normal;
60 _var.
gradSln(*elem_info, state) * tangential_cell_to_face;
73 const auto boundary_normal =
80 normal_scaled_diffusion(i) = boundary_normal(i) * diffusion_tensor(i);
82 const Real normal_diffusion = normal_scaled_diffusion * boundary_normal;
83 if (normal_diffusion <= 0.0)
84 mooseError(
"The boundary-normal diffusion coefficient must be positive, but its value is ",
88 const auto tangential_diffusion = normal_scaled_diffusion - normal_diffusion * boundary_normal;
89 const Real tangential_flux = tangential_diffusion *
_var.
gradSln(*elem_info, state);
RealVectorValue computeCellToFaceVector() const
Computes the vector connecting the cell and boundary face centers.
LinearFVAnisotropicDiffusionFunctorNeumannBC(const InputParameters ¶meters)
Class constructor.
static InputParameters validParams()
virtual Real computeBoundaryValueRHSContribution() const override
Computes the boundary value's contribution to the linear system right hand side.
Real computeCellToFaceDistance() const
Compute the distance between the cell center and the face.
registerMooseObject("MooseApp", LinearFVAnisotropicDiffusionFunctorNeumannBC)
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
const ElemInfo * neighborInfo() const
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
const ElemInfo * elemInfo() const
VectorValue< Real > gradSln(const ElemInfo &elem_info, const StateArg &state) const
Get the variable gradient at a cell center.
const bool _two_term_expansion
Whether to reconstruct the boundary value with the prescribed flux and cell gradient.
FaceInfo::VarFaceNeighbors _current_face_type
Face ownership information for the current face.
Class implementing a Neumann boundary condition for linear finite volume variables.
virtual Real computeBoundaryValue() const override
Computes the boundary value of this object.
const Point & normal() const
Returns the unit normal vector for the face oriented outward from the face's elem element...
MooseLinearVariableFV< Real > & _var
Reference to the linear finite volume variable object.
virtual Real computeBoundaryNormalGradient() const override
Computes the normal gradient (often used in diffusion terms) on the boundary.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
const Moose::Functor< Real > & _functor
The functor for this BC (can be variable, function, etc)
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...
IntRange< T > make_range(T beg, T end)
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...
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
Determine the single sided face argument when evaluating a functor on a face.
const Moose::Functor< RealVectorValue > & _diffusion_tensor
The functor for the diagonal diffusion tensor.
A Neumann boundary condition for linear finite volume anisotropic diffusion problems.