Penalty Method

At the beginning of each time step towards time , we evaluate nodal position for each BC node based on their prescribed motions. During each Newton iteration , for the iterate , we define a velocity residual to assess how close each BC node is to meeting its target: When falls below a specific tolerance for any BC node , we can fix the node at its current location and apply the DOF elimination method in the subsequent iterations. This is particularly straightforward in scenes with only static BCs, where the DOF elimination method is directly applied.

For other BC nodes that are far from their target locations, we introduce new penalty terms to the Incremental Potential for each of these nodes: Here, represents the nodal mass, allowing for intuitive setting of the penalty stiffness , as the Hessian of the penalty term with respect to BC nodes is simply times that of the inertia term.

Remark 11.1.1. For collision obstacles (CO), precisely calculating node masses is challenging due to unknown factors like density. A practical approach is to assume a density similar to that of the simulated solids in the scene. This assumption makes the diagonal entries on the Hessian of the penalty terms roughly times that of the inertia term.

For codimensional COs such as shells, rods, and particles, the key is to consider a reasonably large thickness when calculating their volumes. This helps in ensuring that their physical properties align more closely with those of the main simulation bodies.

Setting the penalty stiffness appropriately can be challenging. If is set too low, it may not effectively move the BC node towards its target. Conversely, a too high can lead to numerical issues. Thus, we initially set to a reasonably large value and adaptively increase it as necessary.

During the Newton solve, if there are BC nodes where at the point of Newton convergence, we double the penalty stiffness to its current value and continue the Newton solve. This process is repeated until all BCs are satisfactorily met at convergence.

Remark 11.1.2. In practice, with double precision floating-point numbers, initializing below is typically sufficient, given that the Hessian of the stiff penalty terms is purely diagonal. However, if certain BCs remain unsatisfied even when is increased to above , the optimization process may stall due to severe numerical errors. This stalling occurs because extremely stiff penalty terms are in conflict with the contact barriers. However, such a scenario would likely only occur under a rare CO/BC setting in a manner far more extreme than what is tested in Figure 2.3.1.