First-order position-based dynamics

2020-10-01

First-order position-based dynamics

This project is a collaboration with Sara Merino-Aceituno.

Preprint:

  • S. Plunder, S. Merino-Aceituno, Convergence proof for first-order position-based dynamics: An efficient scheme for inequality constrained ODEs. (2023) arxiv.

Fast and simple simulations with contact forces

Position-based dynamics (PBD) can be used to simulate first-order differential equations with inequality constraints. I aim to show mathematically that the method converges.

I used this numerical method for both of my modelling projects, for example in the cell migration model for plithotaxis and the EMT model.

The magic of position-based dynamics (PBD)

Matthias Muller challenges everyone to find a method that beats PBD in terms of

  • accuracy
  • speed,
  • simplicity or
  • stability.

For my applications in the simulation of epithelial tissue and cell migration, all these properties were definitely visible and provided a huge advantage; especially the speed of PBD allowed us to simulate up to faster compared to multiple other methods!

How does it work?

There are many similar ways to mix inequality constraints and differential equations. In this brief description, I will use the velocity projection approach.

Let denote the position of all disks with radius . If we denote the forces as then the typical model would be a differential equation

However, if we impose that the disks do not overlap, we need to add extra conditions. One way to integrate those is to define a set of feasible configurations, first for individual non-overlap
and then combined
With the set of feasible states , the resulting projected dynamics are
where denotes the projection onto the tangent cone of at . 1

for tangent cones coincide. See for example Wikipedia: Clarke tangent cone for a definition.

The PBD method for this first-order problem is very simple. For a numerical time-step and initial condition , the PBD method reads

The remarkable feature of PBD is that it only performs a few very fast projections, one for each (active) constraint. This is much less than comparable methods use! Because of this minimalistic approach, it will most likely happen that the constraints are not always satisfied, i.e. that sometimes . However, these small infeasibility issues reduce with a smaller time-step. The time saved thanks to fast projections can be well invested by taking smaller time-steps! And taking smaller time-steps has many advantages and improves both the stability and physical accuracy of the method! For this reason, the authors called the corresponding publication “Small Steps in Physics Simulation”.

Visualisation of the intermediate projections

The following video visualises how PBD works. It shows not only the time-steps but also the intermediate steps of PBD, i.e. (Euler step), (Fix constraint (1,2)), (Fix constraint (1,3)), …

To make the effect visible, the time-step size is very large in the second video. Usually the overlap is visually neglectable.

Our new convergence proof

Up to my knowledge, it is not clear if PBD converges in a mathematically rigorous sense! Many numerical experiments show that the method is very capable. However, it is often also used in contexts where the method only gives visually pleasing but inaccurate results.

In the case of overdamped dynamics, we could show that for sufficiently small time-steps the numerical approximation of PBD converges towards the exact solution , i.e.

We refer to our preprint for details.

Key ideas of the convergence proof

Dealing with the theory of non-smooth dynamics is technically involved, as it requires generalisations from non-convex analysis such as proximal normal cones and subdifferential calculus.

The two main ingredients of the convergence are, to show that the feasible sets are uniformly prox-regular and that projection onto the intersection

is locally a contraction.

Showing the contraction property is the main challenge, but if one assumes that the intersection is metrically calm, that is, that there exists a constant such that locally

then one can show the contraction property which is the key step to numerical stability.

For numerical consistency, we introduce a new notation of so-called scalarly upper semicontinuous consistency. The idea here is that the tangent cone is not defined for and numerical approximations might be indeed outside of the set . To compensate for this, we need the right generalisation of numerical consistency. However, the notion of convergence for cannot be very strong, since otherwise it would imply that the solution is differentiable, but this cannot be since contact forces always imply that the solution will have discontinuous velocities and points where the trajectory is not differentiable. Using the notion of scalarly upper semicontinuity turns out to be just strong enough to show convergence, but weak enough to be applicable.

Together, these two ideas allow us to show that the numerical approximation converges towards the exact solution .

For more details and proofs, we refer to our preprint.