- arrayFalseTrue to make this variable a array variable regardless of number of components. If 'components' > 1, this will automatically be set to true.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to make this variable a array variable regardless of number of components. If 'components' > 1, this will automatically be set to true.
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Unit:(no unit assumed)
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- cache_cell_gradientsTrueWhether to cache cell gradients or re-compute them.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to cache cell gradients or re-compute them.
- components1Number of components for an array variable
Default:1
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:Number of components for an array variable
- face_interp_methodaverageSwitch that can select between face interpolation methods.
Default:average
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Switch that can select between face interpolation methods.
- familyMONOMIALSpecifies the family of FE shape functions to use for this variable.
Default:MONOMIAL
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Specifies the family of FE shape functions to use for this variable.
- fvTrueTrue to make this variable a finite volume variable
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to make this variable a finite volume variable
- orderCONSTANTOrder of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the family).
Default:CONSTANT
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Order of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the family).
- solver_sysnl0If this variable is a solver variable, this is the solver system to which it should be added.
Default:nl0
C++ Type:SolverSystemName
Unit:(no unit assumed)
Controllable:No
Description:If this variable is a solver variable, this is the solver system to which it should be added.
- two_term_boundary_expansionTrueWhether to use a two-term Taylor expansion to calculate boundary face values. If the two-term expansion is used, then the boundary face value depends on the adjoining cell center gradient, which itself depends on the boundary face value. Consequently an implicit solve is used to simultaneously solve for the adjoining cell center gradient and boundary face value(s).
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to use a two-term Taylor expansion to calculate boundary face values. If the two-term expansion is used, then the boundary face value depends on the adjoining cell center gradient, which itself depends on the boundary face value. Consequently an implicit solve is used to simultaneously solve for the adjoining cell center gradient and boundary face value(s).
- use_dualFalseTrue to use dual basis for Lagrange multipliers
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to use dual basis for Lagrange multipliers
MooseVariableFVReal
Base class for Moose variables. This should never be the terminal object type
Overview
The MooseVariableFV
template supports creation of finite volume variable types. At the time of writing there is only one used instantiation of the template which is MooseVariableFVReal
. MOOSE uses cell-centered finite volumes which can be conveniently supported by the CONSTANT MONOMIAL
finite element type in the background.
One important parameter for MooseVariableFV
objects is two_term_boundary_expansion
. By default this is false
. When false
, boundary faces which do not have associated Dirichlet boundary conditions simply use the cell centroid value as the face value. However, when two_term_boundary_expansion
is set to true
in the Variables
sub-block of the finite volume variable, then the cell centroid value and the reconstructed cell centroid gradient (hence the two-term name) will be used to compute the extrapolated boundary face value. Note that care should be taken when setting this parameter to true
. Solving for a two-term extrapolated boundary face value requires simultaneously solving for the attached cell centroid gradient. This creates a system of equations. This system has the potential to be singular if there are multiple extrapolated boundary faces per cell; see MOOSE issue. The only time it's reasonable to expect a cell with multiple extrapolated boundary faces to yield a nonsingular system is if the vectors from the cell centroid to face centroid are parallel to the surface normals and none of the surface normals are parallel to themselves (e.g. imagine an orthogonal quad with three extrapolated boundary faces).
Example Input File Syntax
To create a MooseVariableFVReal
a user can do one of the following in their input file:
[Variables]
[u]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[v]
type = MooseVariableFVReal
[]
[]
Note that a user must specify the type
if they want to be able to set finite volume variable specific parameters like two_term_boundary_expansion
.
Functor spatial evaluation description
For background on the functor system see Functor system.
ElemArg
: returns the cell center valueElemPointArg
: returns a two term expansion that is the sum of the cell center value and the product of the distance of the point from the cell center times the cell center gradientFaceArg
: on internal faces this will return an interpolation defined by theFaceArg
limiter_type
. On external faces this will generally return a two term expansion using the cell center value and gradient unlesstwo_term_boundary_expansion
has been set tofalse
. On Dirichlet faces this will return the Dirichlet valueElemQpArg
: this forwards toElemPointArg
where thepoint
is simply the quadrature point locationElemSideQpArg
: same asElemQpArg
NodeArg
: loops over connected elements, calling to theElemPointArg
overload for each element with the node's location as thepoint
value, and performs an inverse distance weighting of the results
Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- eigenFalseTrue to make this variable an eigen variable
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to make this variable an eigen variable
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Unit:(no unit assumed)
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- scalingSpecifies a scaling factor to apply to this variable
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Specifies a scaling factor to apply to this variable