https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LinearFVAdvectionDiffusionFunctorDirichletBC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
16{
19 "Adds a dirichlet BC which can be used for the assembly of linear "
20 "finite volume system and whose face values are determined using a functor. This kernel is "
21 "only designed to work with advection-diffusion problems.");
22 params.addRequiredParam<MooseFunctorName>("functor", "The functor for this boundary condition.");
23 MooseEnum normal_component("x y z none", "none");
24 return params;
25}
26
28 const InputParameters & parameters)
29 : LinearFVAdvectionDiffusionBC(parameters), _functor(getFunctor<Real>("functor"))
30{
31}
32
33Real
38
39Real
48
49Real
51{
52 // Ths will not contribute to the matrix from the value considering that
53 // the value is independent of the solution.
54 return 0.0;
55}
56
57Real
59{
60 // Fetch the boundary value from the provided functor.
61 return computeBoundaryValue();
62}
63
64Real
66{
67 // The implicit term from the central difference approximation of the normal
68 // gradient.
69 return 1.0 / computeCellToFaceDistance();
70}
71
72Real
74{
75 // The boundary term from the central difference approximation of the
76 // normal gradient.
78}
registerMooseObject("MooseApp", LinearFVAdvectionDiffusionFunctorDirichletBC)
const Elem * neighborPtr() const
Definition FaceInfo.h:88
const Elem * elemPtr() const
Definition FaceInfo.h:86
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Helper method to create an elemental argument for a functor that includes whether to perform skewness...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Base class for boundary conditions that are valid for advection diffusion problems.
Class implementing a Dirichlet boundary condition for linear finite volume variables.
virtual Real computeBoundaryGradientRHSContribution() const override
Computes the boundary gradient's contribution to the linear system right hand side.
const Moose::Functor< Real > & _functor
The functor for this BC (can be variable, function, etc)
virtual Real computeBoundaryValueMatrixContribution() const override
Computes the boundary value's contribution to the linear system matrix.
LinearFVAdvectionDiffusionFunctorDirichletBC(const InputParameters &parameters)
Class constructor.
virtual Real computeBoundaryValue() const override
Computes the boundary value of this object.
virtual Real computeBoundaryValueRHSContribution() const override
Computes the boundary value's contribution to the linear system right hand side.
virtual Real computeBoundaryNormalGradient() const override
Computes the normal gradient (often used in diffusion terms) on the boundary.
virtual Real computeBoundaryGradientMatrixContribution() const override
Computes the boundary gradient's contribution to the linear system matrix.
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
Moose::FaceArg functorFaceArg(const FunctorType &functor, const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
Determine a face argument for evaluating a functor on a face.
Real computeCellToFaceDistance() const
Compute the distance between the cell center and the face.
FaceInfo::VarFaceNeighbors _current_face_type
Face ownership information for the current face.
MooseLinearVariableFV< Real > & _var
Reference to the linear finite volume variable object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
Real distance(const Point &p)