Weak Constraints
The standard method to enforce constraints in the COMSOL Multiphysics software applies the constraints pointwise at node points in the mesh. At each node point, only local values of the dependent variables are affected by the constraint, making the constraints independent of each other. The solvers can therefore eliminate both the constrained degrees of freedom and the constraint force terms, effectively reducing the system of equations and decreasing the number of degrees of freedom being solved for.
Weak constraints enforce the constraint in a local average sense, using shape functions as weights. Reaction terms are explicitly included in the system of equations, which is extended with Lagrange multiplier variables. These Lagrange multipliers in general have a physical meaning and an interpretation as a constraint force or flux. Whereas a standard constraint decreases the number of degrees of freedom by the number of unique constraints, weak constraints increase the degrees of freedom by the same number.
A weak constraint is respected only on average over each Lagrange multiplier shape function, rather than pointwise at mesh nodes. When it is possible to satisfy the constraint everywhere on each mesh element, standard and weak constraints in general lead to the same solution. Conversely, when constraints are contradictory or impossible to satisfy everywhere, standard and weak constraints can distribute the error differently, and therefore lead to slightly different solutions.
Weak constraints can be of use in the following situations:
When the reaction force or flux is needed during a solution, because it enters into a coefficient somewhere, the Lagrange multiplier from a weak constraint can provide an accurate value (see Computing Accurate Fluxes). The corresponding variables computed from derivatives of the dependent variables are not as accurate and can, if used, introduce considerable errors in the solution.
Compared to standard, eliminated, constraints, weak constraints can also have the following drawbacks: