# Constraints System

## MortarConstraints

### Overview

An excellent overview of the conservative mortar constraint implementation in MOOSE is given in Peterson (2018). We have verified that the MOOSE mortar implementation satisfies *a priori* error estimates (see discussion and plots on this github issue):

Primal FE Type | Lagrange Multiplier (LM) FE Type | Primal L2 Convergence Rate | LM L2 Convergence Rate |
---|---|---|---|

Second order Lagrange | First order Lagrange | 3 | 2.5 |

Second order Lagrange | Constant monomial | 3 | 1 |

First order Lagrange | First order Lagrange | 2 | 1.5 |

First order Lagrange | Constant monomial | 2 | 1.5 |

### Parameters

There are four required parameters the user will always have to supply for a constraint derived from `MortarConstraint`

:

`primary_boundary`

: the boundary name or ID assigned to the primary side of the mortar interface`secondary_boundary`

: the boundary name or ID assigned to the secondary side of the mortar interface`primary_subdomain`

: the subdomain name or ID assigned to the lower-dimesional block on the primary side of the mortar interface`secondary_boundary`

: the subdomain name or ID assigned to the lower-dimensional block on the secondary side of the mortar interface

As suggested by the above required parameters, the user must do some mesh work before they can use a `MortarConstraint`

object. The easiest way to prepare the mesh is to assign boundary IDs to the secondary and primary sides of the interface when creating the mesh in their 3rd-party meshing software (e.g. Cubit or Gmsh). If these boundary IDs exist, then the lower dimensional blocks can be generated automatically using the `LowerDBlockFromSideset`

mesh modifiers as shown in the below input file snippet:

```
[MeshModifiers]
[./primary]
type = LowerDBlockFromSideset
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
type = LowerDBlockFromSideset
sidesets = '1'
new_block_id = '10'
[../]
[]
```

There are also some optional parameters that can be supplied to `MortarConstraints`

. They are:

`variable`

: Corresponds to a Lagrange Multipler variable that lives on the lower dimensional block on the secondary face`secondary_variable`

: Primal variable on the secondary side of the mortar interface (lives on the interior elements)`primary_variable`

: Primal variable on the primary side of the mortar interface (lives on the interior elements). Most often`secondary_variable`

and`primary_variable`

will correspond to the same variable`compute_lm_residuals`

: Whether to compute Lagrange Multiplier residuals. This will automatically be set to false if a`variable`

parameter is not supplied. Other cases where the user may want to set this to false is when a different geometric algorithm is used for computing residuals for the LM and primal variables. For example, in mechanical contact the Karush-Kuhn-Tucker conditions may be enforced at nodes (through perhaps a`NodeFaceConstraint`

) whereas the contact forces may be applied to the displacement residuals through`MortarConstraint`

`compute_primal_residuals`

: Whether to compute residuals for the primal variables. Again this may be a useful parameter to use when applying different geometric algorithms for computing residuals for LM variables and primal variables.`periodic`

: Whether this constraint is going to be used to enforce a periodic condition. This has the effect of changing the normals vector, for mortar projection, from outward to inward facing.

At present, either the `secondary_variable`

or `primary_variable`

parameter must be supplied.

### Limitations

Unfortunately the mortar system does not currently work in three dimensions. It is on the to-do list, but it will require a significant amount of work to get all the projections correct.

## Available Objects

- Moose App
- CoupledTiedValueConstraint
- EqualGradientConstraintEqualGradientConstraint enforces continuity of a gradient component between secondary and primary sides of a mortar interface using lagrange multipliers
- EqualValueBoundaryConstraint
- EqualValueConstraintEqualValueConstraint enforces solution continuity between secondary and primary sides of a mortar interface using lagrange multipliers
- EqualValueEmbeddedConstraintThis is a constraint enforcing overlapping portions of two blocks to have the same variable value
- LinearNodalConstraintConstrains secondary node to move as a linear combination of primary nodes.
- NodalFrictionalConstraintFrictional nodal constraint for contact
- NodalStickConstraintSticky nodal constraint for contact
- NormalMortarMechanicalContactThis class is used to apply normal contact forces using lagrange multipliers
- NormalNodalLMMechanicalContactImplements the KKT conditions for normal contact using an NCP function. Requires that either the gap distance or the normal contact pressure (represented by the value of
`variable`

) is zero. The LM variable must be of the same order as the mesh - OldEqualValueConstraintOldEqualValueConstraint enforces solution continuity between secondary and primary sides of a mortar interface using lagrange multipliers
- TangentialMortarLMMechanicalContactEnsures that the Karush-Kuhn-Tucker conditions of Coulomb frictional contact are satisfied
- TangentialMortarMechanicalContactUsed to apply tangential stresses from frictional contact using lagrange multipliers
- TiedValueConstraint
- Heat Conduction App
- GapConductanceConstraintComputes the residual and Jacobian contributions for the 'Lagrange Multiplier' implementation of the thermal contact problem. For more information, see the detailed description here: http://tinyurl.com/gmmhbe9
- Contact App
- MechanicalContactConstraintApply non-penetration constraints on the mechanical deformation using a node on face, primary/secondary algorithm, and multiple options for the physical behavior on the interface and the mathematical formulation for constraint enforcement
- NormalMortarLMMechanicalContactEnforces the normal contact complementarity conditions in a mortar discretization
- NormalNodalMechanicalContactApplies the normal contact force to displacement residuals through a Lagrange Multiplier
- RANFSNormalMechanicalContactApplies the Reduced Active Nonlinear Function Set scheme in which the secondary node's non-linear residual function is replaced by the zero penetration constraint equation when the constraint is active
- TangentialNodalLMMechanicalContactImplements the KKT conditions for frictional Coulomb contact using an NCP function. Requires that either the relative tangential velocity is zero or the tangential stress is equal to the friction coefficient times the normal contact pressure.
- XFEMApp
- XFEMEqualValueAtInterfaceEnforce that the solution have the same value on opposing sides of an XFEM interface.
- XFEMSingleVariableConstraintEnforce constraints on the value or flux associated with a variable at an XFEM interface.

## Available Actions

- Moose App
- AddConstraintAction

## References

- John W. Peterson.
Progress toward a new implementation of the mortar finite element method in moose.
2 2018.
doi:10.2172/1468630.[BibTeX]