Bounds System
The Bounds
system is designed to bound the value of a nonlinear variable. Whether the bound is an upper or lower bound depends on the parameters passed to the Bounds
object. The bound may be spatially and time-dependent, and even depend on other simulation quantities, as implemented in the particular Bounds
object used.
The auxiliary variable that serves as the variable
parameter of a Bounds
object is not actually used or even set in the computation. However, its type is used to decide if the Bounds
loop will be 'nodal' (loop on all nodes) or 'elemental' (loop on quadrature points in elements). Its block restriction is used to define where the bounds is applied. It may be re-used for multiple bounds objects.
Only nodal and constant elemental variables are supported at this time.
The Bounds
system supports both finite element and finite volume variables. Only elemental bounds should be used for finite volume variables.
Note that in order for Bounds
to have an effect, the user has to specify the PETSc options -snes_type vinewtonssls
or -snes_type vinewtonrsls
. A warning will be generated if neither option is specified. The PETSc manual pages for the vinewtonssls
algorithm can be found here while the manual page for vinewtonrsls
can be found here.
Example syntax
In the following example, a lower and an upper bound are applied to two variables u
and v
using the same auxiliary variable bounds_dummy
and four Bounds
objects.
[Variables<<<{"href": "../Variables/index.html"}>>>]
[u]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[v]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[]
[AuxVariables<<<{"href": "../AuxVariables/index.html"}>>>]
[bounds_dummy]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = FIRST
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = LAGRANGE
[]
[]
[Bounds<<<{"href": "index.html"}>>>]
[u_upper_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy
bounded_variable<<<{"description": "The variable to be bounded"}>>> = u
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = upper
bound_value<<<{"description": "The value of bound for the variable"}>>> = 1
[]
[u_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy
bounded_variable<<<{"description": "The variable to be bounded"}>>> = u
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = 0
[]
[v_upper_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy
bounded_variable<<<{"description": "The variable to be bounded"}>>> = v
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = upper
bound_value<<<{"description": "The value of bound for the variable"}>>> = 3
[]
[v_lower_bound]
type = ConstantBounds<<<{"description": "Provides constant bound of a variable for the PETSc's variational inequalities solver", "href": "../../source/bounds/ConstantBounds.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = bounds_dummy
bounded_variable<<<{"description": "The variable to be bounded"}>>> = v
bound_type<<<{"description": "Type of bound. 'upper' refers to the upper bound. 'lower' refers to the lower value."}>>> = lower
bound_value<<<{"description": "The value of bound for the variable"}>>> = -1
[]
[]
(moose/test/tests/bounds/constant_bounds.i)Available Objects
- Moose App
- ConstantBoundsProvides constant bound of a variable for the PETSc's variational inequalities solver
- ConstantBoundsAuxProvides constant bound of a variable for the PETSc's variational inequalities solver
- VariableOldValueBoundsUses the old variable values as the bounds for the new solve.
- VariableOldValueBoundsAuxUses the old variable values as the bounds for the new solve.
- raccoon App
- ConditionalBoundsAuxThis class conditionally enforces a lower bound. When the variable value is below a given threshold, a constant value is used as the bound; when the variable value is above a given threshold, irreversibility is enforced.
Available Actions
- Moose App
- AddBoundsVectorsActionAction to add vectors to nonlinear system when using the Bounds syntax.
- AddBoundActionAdd a Kernel object to the simulation.