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]
[u]
order = FIRST
family = LAGRANGE
[]
[v]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[bounds_dummy]
order = FIRST
family = LAGRANGE
[]
[]
[Bounds]
[u_upper_bound]
type = ConstantBoundsAux
variable = bounds_dummy
bounded_variable = u
bound_type = upper
bound_value = 1
[]
[u_lower_bound]
type = ConstantBoundsAux
variable = bounds_dummy
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[v_upper_bound]
type = ConstantBoundsAux
variable = bounds_dummy
bounded_variable = v
bound_type = upper
bound_value = 3
[]
[v_lower_bound]
type = ConstantBoundsAux
variable = bounds_dummy
bounded_variable = v
bound_type = lower
bound_value = -1
[]
[]
(moose/test/tests/auxkernels/bounds/constant_bounds.i)Available Objects
- Moose App
- ADDivergenceAuxComputes the divergence of a vector of functors.
- ADFunctorElementalAuxEvaluates a functor (variable, function or functor material property) on the current element or quadrature point.
- ADFunctorElementalGradientAuxEvaluates the gradient of a functor (variable, function or functor material property) on the current element or quadrature point.
- ADFunctorVectorElementalAuxEvaluates a vector functor (material property usually) on the current element.For finite volume, this evaluates the vector functor at the centroid.
- ADMaterialRankTwoTensorAuxAccess a component of a RankTwoTensor for automatic material property output
- ADMaterialRateRealAuxOutputs element material properties rate of change
- ADMaterialRealAuxOutputs element volume-averaged material properties
- ADMaterialRealVectorValueAuxCapture a component of a vector material property in an auxiliary variable.
- ADMaterialStdVectorAuxExtracts a component of a material type std::vector<Real> to an aux variable. If the std::vector is not of sufficient size then zero is returned
- ADVectorMaterialRealVectorValueAuxConverts a vector-quantity material property into a vector auxiliary variable
- AdvectiveFluxAuxCompute components of flux vector for advection problems .
- ArrayParsedAuxSets field array variable values to the evaluation of a parsed expression.
- ArrayVarReductionAuxTakes an array variable and performs a reduction operation on it (max, min, sum, average) and stores as a standard variable.
- ArrayVariableComponentCopy a component of an array variable.
- BuildArrayVariableAuxCombines multiple standard variables into an array variable.
- ConstantAuxCreates a constant field in the domain.
- ConstantBoundsAuxProvides constant bound of a variable for the PETSc's variational inequalities solver
- ContainsPointAuxComputes a binary field where the field is 1 in the elements that contain the point and 0 everywhere else
- CopyValueAuxReturns the specified variable as an auxiliary variable with a simple copy of the variable values.
- DebugResidualAuxPopulate an auxiliary variable with the residual contribution of a variable.
- DiffusionFluxAuxCompute components of flux vector for diffusion problems .
- DivergenceAuxComputes the divergence of a vector of functors.
- ElemExtraIDAuxPuts element extra IDs into an aux variable.
- ElementH1ErrorFunctionAuxComputes the H1 or W^{1,p} error between an exact function and a coupled variable.
- ElementIntegerAuxCreates a field showing the element integer.
- ElementL2ErrorFunctionAuxA class for computing the element-wise L^2 (Euclidean) error between a function and a coupled variable.
- ElementLengthAuxCompute the element size using Elem::hmin() or Elem::hmax() from libMesh.
- ElementLpNormAuxCompute an elemental field variable (single value per element) equal to the Lp-norm of a coupled Variable.
- ElementQualityAuxGenerates a field containing the quality metric for each element. Useful for visualizing mesh quality.
- ElementUOAuxAux Kernel to display generic spatial (elemental) information from a UserObject that satisfies the underlying ElementUOProvider interface.
- ExtraElementIDAuxPuts element extra IDs into an aux variable.
- ForcingFunctionAuxAuxiliary Kernel that adds a forcing function to the value of an AuxVariable from the previous time step.
- FunctionArrayAuxAuxiliary Kernel that creates and updates an array field variable by sampling functions through space and time.
- FunctionAuxAuxiliary Kernel that creates and updates a field variable by sampling a function through space and time.
- FunctorADMatPropElementalAuxEvaluates a functor (variable, function or functor material property) on the current element or quadrature point.
- FunctorElementalAuxEvaluates a functor (variable, function or functor material property) on the current element or quadrature point.
- FunctorElementalGradientAuxEvaluates the gradient of a functor (variable, function or functor material property) on the current element or quadrature point.
- FunctorMatPropElementalAuxEvaluates a functor (variable, function or functor material property) on the current element or quadrature point.
- FunctorVectorElementalAuxEvaluates a vector functor (material property usually) on the current element.For finite volume, this evaluates the vector functor at the centroid.
- GapValueAuxReturn the nearest value of a variable on a boundary from across a gap.
- GhostingAuxColors the elements ghosted to the chosen PID.
- HardwareIDAuxCreates a field showing the assignment of partitions to physical nodes in the cluster.
- InterfaceValueUserObjectAuxGet stored value from the specified InterfaceQpUserObjectBase.
- MaterialRankFourTensorAuxAccess a component of a RankFourTensor for automatic material property output
- MaterialRankTwoTensorAuxAccess a component of a RankTwoTensor for automatic material property output
- MaterialRateRealAuxOutputs element material properties rate of change
- MaterialRealAuxOutputs element volume-averaged material properties
- MaterialRealDenseMatrixAuxPopulate an auxiliary variable with an entry from a dense matrix material property.
- MaterialRealTensorValueAuxObject for extracting a component of a rank two tensor material property to populate an auxiliary variable.
- MaterialRealVectorValueAuxCapture a component of a vector material property in an auxiliary variable.
- MaterialStdVectorAuxExtracts a component of a material type std::vector<Real> to an aux variable. If the std::vector is not of sufficient size then zero is returned
- MaterialStdVectorRealGradientAuxExtracts a component of a material's std::vector<RealGradient> to an aux variable. If the std::vector is not of sufficient size then zero is returned
- NearestNodeDistanceAuxStores the distance between a block and boundary or between two boundaries.
- NearestNodeValueAuxRetrieves a field value from the closest node on the paired boundary and stores it on this boundary or block.
- NormalizationAuxNormalizes a variable based on a Postprocessor value.
- ParsedAuxSets a field variable value to the evaluation of a parsed expression.
- ParsedVectorAuxSets a field vector variable value to the evaluation of a parsed expression.
- PenetrationAuxAuxiliary Kernel for computing several geometry related quantities between two contacting bodies.
- ProcessorIDAuxCreates a field showing the processors and partitioning.
- ProjectionAuxReturns the specified variable as an auxiliary variable with a projection of the source variable. If they are the same type, this amounts to a simple copy.
- QuotientAuxDivides two coupled variables.
- SecondTimeDerivativeAuxReturns the second order time derivative of the specified variable as an auxiliary variable.
- SelfAuxReturns the specified variable as an auxiliary variable with a projection of the source variable. If they are the same type, this amounts to a simple copy.
- SolutionAuxCreates fields by using information from a SolutionUserObject.
- SpatialUserObjectAuxPopulates an auxiliary variable with a spatial value returned from a UserObject spatialValue method.
- TagMatrixAuxCouple the diagonal of a tag matrix, and return its nodal value
- TagVectorArrayVariableAuxCouple a tagged vector, and return its evaluations at degree of freedom indices corresponding to the coupled array variable.
- TagVectorArrayVariableValueAuxCouple a tagged vector, and return its array value.
- TagVectorAuxCouple a tag vector, and return its nodal value
- TimeDerivativeAuxReturns the time derivative of the specified variable/functor as an auxiliary variable.
- VariableGradientComponentCreates a field consisting of one component of the gradient of a coupled variable.
- VariableOldValueBoundsAuxUses the old variable values as the bounds for the new solve.
- VariableTimeIntegrationAuxIntegrates a field variable in time.
- VectorFunctionAuxAuxiliary Kernel that creates and updates a vector field variable by sampling a Function object, via the vectorValue method, through space and time.
- VectorMagnitudeAuxCreates a field representing the magnitude of three coupled variables using an Euclidean norm.
- VectorMaterialRealVectorValueAuxConverts a vector-quantity material property into a vector auxiliary variable
- VectorPostprocessorVisualizationAuxRead values from a VectorPostprocessor that is producing vectors that are 'number of processors' * in length. Puts the value for each processor into an elemental auxiliary field.
- VectorVariableComponentAuxCreates a field consisting of one component of a coupled vector variable.
- VectorVariableMagnitudeAuxCreates a field consisting of the magnitude of a coupled vector variable.
- VolumeAuxAuxiliary Kernel that samples volumes.
- WeightedGapAuxReturns the specified variable as an auxiliary variable with the same value.
- Tensor Mechanics App
- ADKineticEnergyAuxCompute the kinetic energy of continuum-based finite elements
- ADRankFourAuxAccess a component of a RankFourTensor
- ADRankTwoAuxAccess a component of a RankTwoTensor
- ADRankTwoScalarAuxCompute a scalar property of a RankTwoTensor
- AccumulateAux
- CylindricalRankTwoAuxTakes RankTwoTensor material and outputs component in cylindrical coordinates
- DomainIntegralQFunctionComputes the q-function for a segment along the crack front, used in the calculation of the J-integral
- DomainIntegralTopologicalQFunctionDetermines if a node is within the ring of the crack front defintion; this object is normally created by the DomainIntegralAction.
- ElasticEnergyAuxCompute the local elastic energy
- GlobalDisplacementAuxAuxKernel to visualize the displacements generated by the global strain tensor
- KineticEnergyAuxCompute the kinetic energy of continuum-based finite elements
- NewmarkAccelAuxComputes the current acceleration using the Newmark method.
- NewmarkVelAuxCalculates the current velocity using Newmark method.
- NodalPatchRecoveryAuxThis Auxkernel solves a least squares problem at each node to fit a value from quantities defined on quadrature points.
- RadialDisplacementCylinderAuxCompute the radial component of the displacement vector for cylindrical models.
- RadialDisplacementSphereAuxCompute the radial component of the displacement vector for spherical models.
- RankFourAuxAccess a component of a RankFourTensor
- RankTwoAuxAccess a component of a RankTwoTensor
- RankTwoScalarAuxCompute a scalar property of a RankTwoTensor
- RotationAngleCompute the field of angular rotations of points around an axis defined by an origin point and a direction vector
- TestNewmarkTIAssigns the velocity/acceleration calculated by time integrator to the velocity/acceleration auxvariable.
Available Actions
- Moose App
- AddBoundsVectorsActionAction to add vectors to nonlinear system when using the Bounds syntax.
- AddKernelActionAdd a Kernel object to the simulation.