← Blog

[Phys-sim] Ch.1 Discrete Space and Time

· updated July 29, 2025 · Phys-sim


1.1 Representations of a Solid Geometry

How do we represent the geometry of objects with computers? Here are some discrete representations.

  1. Parameterization

    This may include using implicit functions to represent the boundary and interior of shapes.

  2. Representation with Sampling

    This seems to refer to explicit representations based on primitives (e.g., points, edges)

In continuum mechanics, a common assumption is that an object has a continuous density field. To represent this continuity discretely, we define the connectivity of the geometry. Here are two representations that can encode connectivity:

  1. Mesh

    The edges/triangles of a mesh encode connectivity. Finite Element Method (FEM) simulators are based on meshes.

  2. Particle and Grid

    Here, a uniform grid is used for connectivity. Material Point Method (MPM) simulators use this representation.

This book focuses on meshes and FEM methods. The advantage of mesh-based structures of FEM is that they allow the breaking down of complex domain into simpler elements. FEMs also tend to allow more accurate simulation control.

For simulating dynamic events (e.g., solid fractures), however, the mesh is not a suitable option. MPM methods excel in such simulations because the uniform grid naturally accomodates the separation of body parts without meticulous modification of the mesh components.

Geometric configurations can be described in a single unified vector, by consolidating coordinates of each sampled point into an extended vector, denoted as x∈Rdn,x\in \R^{dn}, where d is the dimension of space and nn is the number of sampled points.

1.2 Newton’s Second Law

Previously, we discussed the discrete representation of deformable solids. Next we introduce the physical laws that allow us to predict the change in configuration over time: Newton’s second law.

f=ma\mathbf{f}=m\mathbf{a}

Deformation is when the displacement fields of a solid includes components other than translation, rotation, or a linear combination of the two.

For deformable solids, we use a matrix form of the above equation.

dxdt=vMdvdt=f,\begin{gathered} \frac{dx}{dt} = v\\M\frac{dv}{dt}=f, \end{gathered}

where x,v,fx,v,f are the stacked column vectors for each sampled point, and M∈Rdn×dnM \in \R^{dn\times dn} is the mass matrix.

1.3 Time Integration

Previously, we discussed how to discretely represent the space. For the time domain, we discretize time into fixed small intervals, referred to as a timestep.

In this book, we assume the following:

  1. initial values x0,v0x^0, v^0 are given
  2. we have a method to calculate fnf^n either based on a physical model or a given value

(I think this is to focus more on the algorithmic part of the simulations.)

1.4 Explicit Time Integration

Explicit time integration methods are methods that compute xn+1,vn+1x^{n+1}, v^{n+1} by substitution of known values into simple formulas. There are two basic schemes: Forward Euler and Symplectic Euler.

Forward Euler

Here, we use forward difference approximations to estimate the derivatives:

dxdt,dvdt\frac{dx}{dt}, \frac{dv}{dt}.

dxdt=xn+1−xnΔtMvn+1−vnΔt=fn\begin{gathered} \frac{dx}{dt} = \frac{x^{n+1}-x^n}{\Delta t}\\M\frac{v^{n+1}-v^n}{\Delta t} = f^n \end{gathered}

Plugging known values from the current time step into the following equations directly gives us values for the next time step:

xn+1=xn+Δtvnvn+1=vn+ΔtM−1fn\begin{gathered} x^{n+1}= x^n + \Delta t v^n\\v^{n+1} = v^n + \Delta t M^{-1} f^n \end{gathered}

Symplectic Euler

Slightly modifying Forward Euler’s update equations, we get Symplectic Euler.

xn+1=xn+Δtvn+1vn+1=vn+ΔtM−1fn,\begin{gathered} x^{n+1}= x^n + \Delta t v^{n+1}\\v^{n+1} = v^n + \Delta t M^{-1} f^n, \end{gathered}

where the difference lies in using the next time step’s velocity for updating the position, rather than the current time step’s velocity.

Stability

A time integration method is stable if small errors introduced by the simulation do not grow uncontrollably over time. Loosely speaking, unstable methods add energy to a physical system, causing explosive behaviors.

Forward Euler, is unconditionally unstable. This means that regardless of the chosen time step Δt\Delta t, the error explodes with nonconstant f.

Symplectic Euler is conditionally stable, meaning that for a range of values of Δt\Delta t, the error is bounded.

1.5 Implict Time Integration

Implicit time integration refers to methods that compute xn+1,vn+1x^{n+1},v^{n+1} by solving a system of equations. While more computationally expensive, it has better stability compared to explicit methods.

Backward Euler

The update rules are

xn+1=xn+Δtvn+1vn+1=vn+ΔtM−1fn+1,\begin{gathered} x^{n+1}= x^n + \Delta t v^{n+1}\\v^{n+1} = v^n + \Delta t M^{-1} f^{n+1}, \end{gathered}

The interdependence of xn+1,vn+1x^{n+1}, v^{n+1} means we need to solve a system of equations:

M(xn+1−(xn+Δtvn))−(Δt)2fn+1=0.M(x^{n+1} - (x^n+\Delta t v^n))-(\Delta t)^2 f^{n+1} = 0.

A lot of times, forces are derived from position vectors (i.e., fn+1=f(xn+1)f^{n+1} = f(x^{n+1})) and can are often nonlinear with position.

Hence, we need nonlinear root finding techniques like Newton’s method to find the solution.

In terms of stability, it is unconditionally stable, meaning the error is bounded even for large time steps. Still, a large Δt\Delta t may lead to poor convergence.

Also, the linearization may be highly inaccurate for more complex functions of force. More advanced algorithms derived from Newton’s method will be introduced in future sections.

Etc.

  • How is “stiffness” related to simulation stability?
    • A stiff problem refers to problems that require a small timestep due to the high-frequency of the motion.
    • Using explicit methods for such stiff problems would be very impractical.
    • Backward Euler is more suited for such cases due to its better stability features.