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.
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)
where μ1 and
μ2 are the test functions corresponding to the Lagrange multipliers.
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 = 2u1−3u2 = 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