About Explicit Constraint Reaction Terms
In the Weak Constraint and Pointwise Constraint nodes you specify an expression, R, which is forced equal to zero. Optionally, you may also specify how reaction terms are applied. The default setting, All physics (symmetric), applies reaction terms based on the constraint expression in a way that preserves the symmetry of a symmetric unconstrained system of equations. These reaction terms are uniquely defined by the symmetry requirement.
Selecting User defined from the Apply reaction terms on list lets you specify the constraint reaction terms explicitly, using a syntax borrowed from weak form modeling.
Constraint Reaction Term Example
For example, in a three-variable problem for variables u1, u2, and u3, specify the constraints (using the Constraint expression field in two separate Weak Constraint or Pointwise Constraint nodes)
Note that both constraints involve both more than one variable and that to each constraint corresponds a Lagrange multiplier variable, μ1 and μ2, respectively. The weak equation corresponding to these constraints is
where μ1 and μ2 are the test functions corresponding to the Lagrange multipliers.
This integral equation must be respected for every possible value of the Lagrange multiplier test functions. The only difference between a weak constraint and a pointwise constraint in this respect is that the Lagrange multiplier test functions in a weak constraint are nonzero over the elements adjacent to each mesh node, while the pointwise constraint test functions are nonzero only at the nodes. Therefore, weak constraints are enforced in a local weighted average sense, while pointwise constraints are enforced exactly at the mesh nodes. For this discussion, the difference is not important.
The default reaction terms, applied symmetrically to all dependent variables in the model, are defined simply by switching the test operator (here denoted by the circumflex “^”) from the Lagrange multipliers to the constraint expressions. Since the test operator is a linear differential operator, the weak form symmetric reaction term is
The user-defined Constraint force expression to enter in a Weak Constraint or Pointwise Constraint node to explicitly recreate these symmetric reaction terms may be identified as the expressions multiplying the Lagrange multipliers. The test operator is denoted test() in weak expression syntax. Therefore, the constraint force expression for constraint R1 = 2u13u2 = 0 is test(2*u1-3*u2) or, equivalently, 2*test(u1)-3*test(u2). The corresponding expression for R2 is test(2*u2+3*u3) or, after linearization, 2*test(u2)+3*test(u3).
As a general rule, anything that multiplies test(u1) appears as a source term in the u1 equation. Similarly, coefficients of test(u2) and test(u3) are source terms in the u2 and u3 equations, respectively. The symmetric reaction terms from the R1 constraint contain both a test(u1) and a test(u2) term. Therefore, its generalized reaction force affects both these equations, while the reaction terms from R2 affect the u2 and u3 equations.
Now suppose that u1 and u2 in reality represent components of the same vector, u, while u3 can be seen as an external quantity that should affect, but not be affected by, the value of u. The symmetric reaction term from constraint R2 violates this assumption and must be modified. In a user-defined Constraint force expression, write, for example, just test(u2) to apply reaction terms only as a generalized reaction force in the u2 equation and leave the u3 equation unaffected. This corresponds to a weak form integral contribution
Nonsymmetric reaction terms do not always lead to a well-posed problem. If, in the example above, you would also set the Constraint force expression for the first constraint to test(u2), the Lagrange multipliers become nonunique because only their sum enters the u2 equation. At the same time, there is no means to enforce any constraint on u1 because that equation contains no Lagrange multiplier at all.