You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The variable ``use_convergent_formulation`` should be set before calling ``CollisionConstraints::build`` for it to take effect. By default, it is ``false``.
28
+
29
+
Technical Details
30
+
-----------------
31
+
32
+
*We briefly summarize the convergent formulation here for convenience.*
33
+
34
+
In order to derive a convergent formulation, we first define a continuous form of our barrier potential :math:`P`. For a surface :math:`\mathcal{S}` embedded in 3D space, we parameterize the surfaces by common (possibly discontinuous) coordinates :math:`u \in\tilde{M} \subset\mathbb{R}^2`, so that :math:`\mathcal{S}(u)` traverses the material points across all surfaces contiguously. The total contact potential is then
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case, we can parameterize the domain across all triangles with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
47
+
48
+
.. math::
49
+
\frac{1}{2} \int_{u \in\tilde{M}} \max_{t \in T \backslash p(u)} b(d(p(u), t), \hat{d})~\mathrm{d} u,
50
+
51
+
where :math:`T \setminus p` is the set of boundary faces that do not contain the point :math:`p`.
52
+
53
+
Applying mesh vertices as nodes (and quadrature points), we numerically integrate the surface contact potential. For each nodal position :math:`x \in V` we then have a corresponding material space coordinate :math:`\bar{x} \in\bar{V}`. Piecewise linear integration of the surface barrier is then
where :math:`w_{\bar{x}}` are the quadrature weights, each given by one-third of the sum of the areas (in material space) of the boundary triangles incident to :math:`\bar{x}`.
59
+
60
+
We next need to smoothly approximate the max operator in the contact potentials. However, common approaches such as an :math:`L^p`-norm or LogSumExp would decrease sparsity in subsequent numerical solves by increasing the stencil size per contact evaluation. We instead leverage the locality of our barrier function to approximate the max operator by removing duplicate distance pairs. Our resulting approximators for a triangulated surface is
& \approx\max _{t \in T \backslash x} b(d(x, t), \hat{d}),
66
+
\end{aligned}
67
+
68
+
where :math:`V_{\text{int}} \subseteq V` is the subset of internal surface nodes and :math:`E_{\text{int}} \subseteq E` is the subset of internal surface edges (i.e., edges incident to two triangles). For locally convex regions this estimator is tight while remaining smooth. In turn, for nonconvex regions, it improves over direct summation.
69
+
70
+
The corresponding discrete barrier potential is then simply
71
+
72
+
.. math::
73
+
P_s(V)= \frac{1}{2} \sum_{x \in V} w_x \Psi_s(x),
74
+
75
+
where we simplify with :math:`w_x = w_{\bar{x}}` defined appropriately, per domain, as covered above.
76
+
77
+
Please, see the `paper <https://arxiv.org/abs/2307.15908>`_ for more details (including the formulation for 2D curves and edge-edge contact) and evaluation.
78
+
79
+
The key difference between the original and the convergent formulations is that we (1) include area weights in the barrier potential and (2) include additional (negative) terms to cancel out the duplicate distance pairs. While this requires minor algorithmic changes, it produces considerably better results.
80
+
81
+
Physical Barrier
82
+
----------------
83
+
84
+
We want our barrier potential to have the same units as our elastic potential (e.g., :math:`\text{J}`). Together with the area weighting (discussed above), this means the barrier should have units of pressure times distance (e.g., :math:`\text{Pa} \cdot\text{m}`). That is,
This is equivalent to the original barrier function of :cite:p:`Li2020IPC` times :math:`1/\hat{d}^3` when using squared distances. Therefore, to simplify the implementation we only implement the original barrier function and multiply all constraints by :math:`1/\hat{d}^3`.
99
+
100
+
The barrier stiffness (:math:`\kappa`) then has units of pressure (e.g., :math:`\text{Pa}`), the same as Young's modulus (:math:`E`) in elasticity.
101
+
This implies we can get good solver convergence even when using a fixed :math:`\kappa` by setting it relative to the material's Young's modulus (:math:`\kappa = 0.1 E` works well in many examples).
102
+
The intention is to treat the barrier as a thin elastic region around the mesh, and having consistent units makes it easier to pick the stiffness for this "material".
103
+
104
+
.. _convergent-friction-formulation:
105
+
106
+
Friction
107
+
--------
108
+
109
+
Just as with the :ref:`collision constraints <convergent-contact-formulation>`, we implement both the original friction formulation of :cite:t:`Li2020IPC` and the convergent formulation of :cite:t:`Li2023Convergent`.
110
+
111
+
The choice of formulation is dependent on how the fixed set of ``contact_constraints`` given to ``FrictionConstraints::build`` was built. If the ``contact_constraints`` were built using the convergent formulation, then the friction constraints will also use the convergent formulation. Otherwise, the original formulation will be used.
The variable ``use_convergent_formulation`` should be set before calling ``CollisionConstraints::build`` for it to take effect. By default, it is ``false``.
357
-
358
-
Technical Details
359
-
'''''''''''''''''
360
-
361
-
*We briefly summarize the convergent formulation here for convenience.*
362
-
363
-
In order to derive a convergent formulation, we first define a continuous form of our barrier potential :math:`P`. For a surface :math:`\mathcal{S}` embedded in 3D space, we parameterize the surfaces by common (possibly discontinuous) coordinates :math:`u \in\tilde{M} \subset\mathbb{R}^2`, so that :math:`\mathcal{S}(u)` traverses the material points across all surfaces contiguously. The total contact potential is then
We then define our surface discretization with a triangulated boundary mesh geometry. As in the smooth case, we can parameterize the domain across all triangles with :math:`u \in\tilde{M}` so that :math:`p(u): \tilde{M} \mapsto\mathbb{R}^3` traverses all material points, across all triangles :math:`t ∈ T` in the triangle mesh contiguously. The corresponding surface contact potential is then
376
-
377
-
.. math::
378
-
\frac{1}{2} \int_{u \in\tilde{M}} \max_{t \in T \backslash p(u)} b(d(p(u), t), \hat{d})~\mathrm{d} u,
379
-
380
-
where :math:`T \setminus p` is the set of boundary faces that do not contain the point :math:`p`.
381
-
382
-
Applying mesh vertices as nodes (and quadrature points), we numerically integrate the surface contact potential. For each nodal position :math:`x \in V` we then have a corresponding material space coordinate :math:`\bar{x} \in\bar{V}`. Piecewise linear integration of the surface barrier is then
where :math:`w_{\bar{x}}` are the quadrature weights, each given by one-third of the sum of the areas (in material space) of the boundary triangles incident to :math:`\bar{x}`.
388
-
389
-
We next need to smoothly approximate the max operator in the contact potentials. However, common approaches such as an :math:`L^p`-norm or LogSumExp would decrease sparsity in subsequent numerical solves by increasing the stencil size per contact evaluation. We instead leverage the locality of our barrier function to approximate the max operator by removing duplicate distance pairs. Our resulting approximators for a triangulated surface is
& \approx\max _{t \in T \backslash x} b(d(x, t), \hat{d}),
395
-
\end{aligned}
396
-
397
-
where :math:`V_{\text{int}} \subseteq V` is the subset of internal surface nodes and :math:`E_{\text{int}} \subseteq E` is the subset of internal surface edges (i.e., edges incident to two triangles). For locally convex regions this estimator is tight while remaining smooth. In turn, for nonconvex regions, it improves over direct summation.
398
-
399
-
The corresponding discrete barrier potential is then simply
400
-
401
-
.. math::
402
-
P_s(V)= \frac{1}{2} \sum_{x \in V} w_x \Psi_s(x),
403
-
404
-
where we simplify with :math:`w_x = w_{\bar{x}}` defined appropriately, per domain, as covered above.
405
-
406
-
Please, see the `paper <https://arxiv.org/abs/2307.15908>`_ for more details (including the formulation for 2D curves and edge-edge contact) and evaluation.
407
-
408
-
The key difference between the original and the convergent formulations is that we (1) include area weights in the barrier potential and (2) include additional (negative) terms to cancel out the duplicate distance pairs. While this requires minor algorithmic changes, it produces considerably better results.
409
-
410
-
Physical Barrier
411
-
''''''''''''''''
412
-
413
-
We want our barrier potential to have the same units as our elastic potential (e.g., :math:`\text{J}`). Together with the area weighting (discussed above), this means the barrier should have units of pressure times distance (e.g., :math:`\text{Pa} \cdot\text{m}`). That is,
This is equivalent to the original barrier function of :cite:p:`Li2020IPC` times :math:`1/\hat{d}^3` when using squared distances. Therefore, to simplify the implementation we only implement the original barrier function and multiply all constraints by :math:`1/\hat{d}^3`.
428
-
429
-
The barrier stiffness (:math:`\kappa`) then has units of pressure (e.g., :math:`\text{Pa}`), the same as Young's modulus (:math:`E`) in elasticity.
430
-
This implies we can get good solver convergence even when using a fixed :math:`\kappa` by setting it relative to the material's Young's modulus (:math:`\kappa = 0.1 E` works well in many examples).
431
-
The intention is to treat the barrier as a thin elastic region around the mesh, and having consistent units makes it easier to pick the stiffness for this "material".
432
-
433
330
.. _modeling-thickness:
434
331
435
332
Modeling Thickness
@@ -562,15 +459,6 @@ We can also compute the first and second derivatives of the friction dissipative
Just as with the :ref:`collision constraints <convergent-contact-formulation>`, we implement both the original friction formulation of :cite:t:`Li2020IPC` and the convergent formulation of :cite:t:`Li2023Convergent`.
571
-
572
-
The choice of formulation is dependent on how the fixed set of ``contact_constraints`` given to ``FrictionConstraints::build`` was built. If the ``contact_constraints`` were built using the convergent formulation, then the friction constraints will also use the convergent formulation. Otherwise, the original formulation will be used.
0 commit comments