Algorithm Search⌘K

Algorithmadvanced

Material point method

Also called MPM.

Carries mass, momentum and history on particles and solves the momentum equation on a background grid each step, for large deformations of solids.

Time
Θ(N + M) worst
Space
Θ(M) extra
Where
M = the number of grid nodes; N = the number of material points
Properties
conservativedeterministic
Origin
Deborah Sulsky, Zhen Chen, Howard L. Schreyer, 1994

The material point method (MPM) simulates solids, and also granular media and fluids, that move and deform a great deal. The material is a set of particles, the material points, that carry everything that belongs to the material: mass, velocity, the deformation gradient, stress, and history such as plastic strain. In each time step the particles send their mass and momentum to a fixed background grid, the momentum equation is solved on the grid as in the finite element method, and the grid velocity moves the particles and updates their strain; then the grid is thrown away. Because the grid never deforms, MPM handles very large strains, contact, fracture and flow without remeshing. In computer graphics the same method animates snow, sand and foam, usually with APIC transfers and plasticity models chosen for the look; this page treats MPM as a method of solid mechanics, its accuracy and its cell crossing error.

In plain words

Picture a block of rubber made of many small beads. Each bead remembers its own mass, speed and how much it is stretched. Beside the beads there is a fixed grid, like graph paper laid over the work.

In each step the beads tell the grid points near them how much mass and speed they bring. The grid points then work out how the stretch of the beads pushes and pulls on them, and how fast they will move next. The beads read the new speeds from the same grid points, move, and update how much they are stretched. The grid is wiped clean and the next step starts again. The grid makes the force calculation simple, and the beads keep the memory, so the material can twist, split or flow and the grid never gets tangled.

The problem

The input is a body in the reference state, cut into NN material points with mass mpm_p, initial volume Vp0V_p^0, position xpx_p, velocity vpv_p, deformation gradient FpF_p and stress σp\sigma_p; a stress update rule (here 1D linear elasticity, σ˙=Eε˙\dot\sigma = E \dot\varepsilon with Young's modulus EE); a grid of nodes xi=iΔxx_i = i \Delta x with shape functions NiN_i; the supports; and a step hh. The goal is to approximate the solution of the momentum balance ρv˙=∂xσ\rho \dot v = \partial_x \sigma in the weak form, with the particles as the quadrature points:

∑pmpNi(xp) v˙(xp)=−∑pVp σp Ni′(xp)+(traction terms),Vp=FpVp0.\sum_p m_p N_i(x_p) \, \dot v(x_p) = -\sum_p V_p \, \sigma_p \, N_i'(x_p) + (\text{traction terms}), \qquad V_p = F_p V_p^0.

The code on this page uses the linear hats Ni(x)=max⁡(0,1−∣x−xi∣/Δx)N_i(x) = \max(0, 1 - |x - x_i| / \Delta x) in 1D, a lumped mass matrix, the explicit Euler step on the grid, and the update stress last (USL) order with the FLIP velocity update.

The algorithm

  1. MPM-STEP(particles, grid, E, h)
  2. 1for each material point p do ▷ particles to grid
  3. 2m_i += N_i(x_p) m_p; (mv)_i += N_i(x_p) m_p v_p for the nodes i near x_p
  4. 3f_i ← -Σ_p V_p σ_p N_i′(x_p) for every node i ▷ internal force
  5. 4v_i ← (mv)_i / m_i; v_i^new ← v_i + h f_i / m_i for every node with m_i > 0
  6. 5v_i^new ← 0 at fixed nodes; a_i ← (v_i^new - v_i) / h
  7. 6for each material point p do ▷ grid to particles
  8. 7v_p ← v_p + h Σ_i N_i(x_p) a_i ▷ FLIP update
  9. 8x_p ← x_p + h Σ_i N_i(x_p) v_i^new
  10. 9ε̇_p ← Σ_i N_i′(x_p) v_i^new ▷ strain rate from the new grid velocity
  11. 10F_p ← (1 + h ε̇_p) F_p; V_p ← F_p V_p^0
  12. 11σ_p ← σ_p + E h ε̇_p
  13. 12return the particles; clear the grid

Lines L1 and L2 are the particle to grid transfer, with the same weights as cloud-in-cell assignment. Line L3 is the internal force of the weak form, computed with the particles as quadrature points. Lines L4 and L5 solve the lumped momentum equation and apply the supports. Line L7 adds the change of the grid velocity to the particle velocity (FLIP); using vp←∑iNivinewv_p \leftarrow \sum_i N_i v_i^{new} instead is the PIC update, which is more dissipative. Lines L9 to L11 update the strain and stress at the points; with a nonlinear or plastic material, line L11 calls its stress update.

Example

The cell crossing error. Take Δx=1\Delta x = 1 and 8 points at x=0.3,0.9,1.5,…,4.5x = 0.3, 0.9, 1.5, \ldots, 4.5 (spacing 0.6), each with Vp=0.6V_p = 0.6 and the same stress σ=1\sigma = 1. A uniform stress has no divergence, so the true internal force at every interior node is 0. With the hats, Ni′=+1N_i' = +1 on the cell left of node ii and −1-1 on the cell to its right, so line L3 gives

fi=σ(∑xp∈[xi,xi+1)Vp−∑xp∈[xi−1,xi)Vp)/Δx.f_i = \sigma \Bigl(\sum_{x_p \in [x_i, x_{i+1})} V_p - \sum_{x_p \in [x_{i-1}, x_i)} V_p\Bigr) / \Delta x.

The cells [0,1),[1,2),…,[4,5)[0, 1), [1, 2), \ldots, [4, 5) hold 2, 1, 2, 2 and 1 points, so the interior forces at nodes 1 to 4 are −0.6,0.6,0,−0.6-0.6, 0.6, 0, -0.6 instead of 0. When a point crosses a cell boundary, one of these sums jumps by VpV_p, and the nodal force jumps with it. Bardenhagen and Kober (2004) call this the cell crossing noise.

A vibrating bar. A bar on [0,1][0, 1] with E=100E = 100 and ρ=1\rho = 1 (wave speed c=10c = 10) is fixed at x=0x = 0 and free at x=1x = 1. Its first mode has ω1=πc/2\omega_1 = \pi c / 2, period 0.4, and starting from v=v0sin⁡(πx/2)v = v_0 \sin(\pi x / 2) the velocity of the centre of mass is (2/π)v0cos⁡(ω1t)(2 / \pi) v_0 \cos(\omega_1 t). With 20 cells, 2 points per cell, v0=0.1v_0 = 0.1 and h=0.1Δx/ch = 0.1 \Delta x / c, the code on this page stays within 0.7 percent of this value over one period (a measurement).

Correctness

The full proof is in the correctness proof. It proves four facts about one step (theorems, in exact arithmetic):

  • Lines L1 and L2 put all the particle mass and momentum on the grid: ∑imi=∑pmp\sum_i m_i = \sum_p m_p and ∑i(mv)i=∑pmpvp\sum_i (mv)_i = \sum_p m_p v_p, because the hats form a partition of unity.
  • Without supports, the step conserves the total particle momentum, because ∑iNi′=0\sum_i N_i' = 0 makes ∑ifi=0\sum_i f_i = 0.
  • A rigid translation with zero stress is reproduced exactly: every point moves by huh u, and FF and σ\sigma do not change.
  • The internal force at an interior node is the stress times the difference of the particle volumes in the two cells next to the node, which is the formula of the example and the source of the cell crossing error.

Convergence is weaker than for the finite element method. The particle quadrature in line L3 is exact only for special particle positions, and Steffen, Kirby and Berzins (2008) show that the error from points crossing cell boundaries spoils the convergence in space of the original method with linear hats; with smoother shape functions, such as GIMP or B-splines, the error decreases with Δx\Delta x. The order "1" in the front matter is the order of the explicit time step.

Proof: One MPM step moves all mass and momentum to the grid, conserves momentum without supports, reproduces rigid translation, and its interior force is the stress times a difference of cell volumesfull

We use the pseudocode of the page and exact arithmetic, in 1D with the hats Ni(x)=max⁡(0,1−∣x−xi∣/Δx)N_i(x) = \max(0, 1 - |x - x_i| / \Delta x), xi=iΔxx_i = i \Delta x. For a point at xx with j=⌊x/Δx⌋j = \lfloor x / \Delta x \rfloor and w=x/Δx−jw = x / \Delta x - j, the code uses the two nodes jj and j+1j + 1 with Nj=1−wN_j = 1 - w, Nj+1=wN_{j+1} = w, Nj′=−1/ΔxN_j' = -1/\Delta x and Nj+1′=1/ΔxN_{j+1}' = 1/\Delta x; all other nodes have Ni(x)=Ni′(x)=0N_i(x) = N_i'(x) = 0. So for every xx:

∑iNi(x)=1,∑iNi(x) xi=x,∑iNi′(x)=0.(P)\sum_i N_i(x) = 1, \qquad \sum_i N_i(x)\, x_i = x, \qquad \sum_i N_i'(x) = 0. \tag{P}

The first two follow from (1−w)+w=1(1 - w) + w = 1 and (1−w)jΔx+w(j+1)Δx=(j+w)Δx(1 - w) j \Delta x + w (j + 1) \Delta x = (j + w) \Delta x.

We assume that every node ii with Ni(xp)≠0N_i(x_p) \ne 0 or Ni′(xp)≠0N_i'(x_p) \ne 0 for some point pp has mi>0m_i > 0 after line L2. (This fails only when a point lies exactly on a node and the node to its right gets no mass from any point.)

Claim 1 (transfer to the grid). After line L2, ∑imi=∑pmp\sum_i m_i = \sum_p m_p and ∑i(mv)i=∑pmpvp\sum_i (mv)_i = \sum_p m_p v_p.

Proof. Each point adds Ni(xp)mpN_i(x_p) m_p to mim_i, and by (P) these add up over ii to mpm_p. The same holds for the momentum with mpvpm_p v_p in place of mpm_p. □\square

Claim 2 (momentum). If there are no fixed nodes, ∑pmpvp\sum_p m_p v_p after line L7 equals ∑pmpvp\sum_p m_p v_p before the step.

Proof. By (P), ∑ifi=−∑pVpσp∑iNi′(xp)=0\sum_i f_i = -\sum_p V_p \sigma_p \sum_i N_i'(x_p) = 0. With no fixed nodes, line L5 gives ai=fi/mia_i = f_i / m_i for every node with mass. Line L7 changes the total by

h∑pmp∑iNi(xp)ai=h∑iai∑pNi(xp)mp=h∑iaimi=h∑ifi=0,h \sum_p m_p \sum_i N_i(x_p) a_i = h \sum_i a_i \sum_p N_i(x_p) m_p = h \sum_i a_i m_i = h \sum_i f_i = 0,

where the sum over ii runs over the nodes with mass, which by the assumption include every node where some Ni(xp)≠0N_i(x_p) \ne 0 or fi≠0f_i \ne 0. □\square

Claim 3 (rigid translation). If vp=uv_p = u and σp=0\sigma_p = 0 for every point and no node is fixed, then after the step vp=uv_p = u, xpx_p has moved by huh u, and FpF_p and σp\sigma_p are unchanged.

Proof. Line L2 gives (mv)i=u mi(mv)_i = u\, m_i, so line L4 gives vi=uv_i = u. Line L3 gives fi=0f_i = 0 since every σp=0\sigma_p = 0, so vinew=uv_i^{new} = u and ai=0a_i = 0. Line L7 leaves vp=uv_p = u. Line L8 adds h∑iNi(xp)u=huh \sum_i N_i(x_p) u = h u by (P). Line L9 gives ε˙p=u∑iNi′(xp)=0\dot\varepsilon_p = u \sum_i N_i'(x_p) = 0 by (P), so lines L10 and L11 change nothing. □\square

Claim 4 (the interior force). If every point has the same stress σ\sigma, then for every node ii,

fi=σΔx(∑p: xp∈[xi,xi+1)Vp−∑p: xp∈[xi−1,xi)Vp).f_i = \frac{\sigma}{\Delta x} \Bigl(\sum_{p:\, x_p \in [x_i, x_{i+1})} V_p - \sum_{p:\, x_p \in [x_{i-1}, x_i)} V_p\Bigr).

Proof. A point in the cell [xi−1,xi)[x_{i-1}, x_i) has j=i−1j = i - 1, so node ii is its right node with Ni′=1/ΔxN_i' = 1/\Delta x, and it adds −Vpσ/Δx-V_p \sigma / \Delta x to fif_i. A point in [xi,xi+1)[x_i, x_{i+1}) has j=ij = i, so node ii is its left node with Ni′=−1/ΔxN_i' = -1/\Delta x, and it adds +Vpσ/Δx+V_p \sigma / \Delta x. No other point has Ni′(xp)≠0N_i'(x_p) \ne 0. Adding up gives the formula. ■\blacksquare

So the internal force at an interior node is zero for a uniform stress exactly when the two cells next to the node hold the same particle volume, and it jumps by σVp/Δx\sigma V_p / \Delta x each time a point crosses the boundary of one of those cells.

Complexity

In the real-RAM model, each point touches 2 nodes in 1D, 2d2^d nodes in dd dimensions with linear hats, and 3d3^d with quadratic B-splines. So lines L1 to L2 and L6 to L11 cost Θ(N)\Theta(N) (with a factor 2d2^d), lines L3 to L5 cost Θ(N+M)\Theta(N + M) for MM nodes, and one step costs Θ(N+M)\Theta(N + M) time and Θ(M)\Theta(M) extra space. The explicit step needs h≤CΔx/(c+∣v∣)h \le C \Delta x / (c + |v|) with cc the wave speed and C<1C < 1 (the CFL condition), so a run to time TT costs Θ((N+M)Tc/Δx)\Theta((N + M) T c / \Delta x).

Properties

  • Mass is exact. Each point keeps its mass, so there is no mass error and no continuity equation to solve.
  • Linear momentum is conserved by the transfers and the grid update, without supports.
  • Angular momentum is lost by the PIC and FLIP transfers in general; the APIC transfer of the graphics literature conserves it.
  • No mesh distortion. The grid is reset each step, so large strains and rotations cause no tangling.
  • History on the points. Plastic strain, damage and other internal variables stay with the material.
  • Automatic contact. Bodies that share grid nodes interact through the grid without a contact search. With one velocity per node they stick to each other, so sliding, friction and separation need a separate algorithm with one velocity field per body.
  • Cell crossing error. With linear hats, the force on a node jumps when a point crosses a cell boundary.
  • Numerical fracture. If neighbouring points move more than one cell apart, they no longer share a node, and the body separates without a physical cause.

Variants and improvements

  • GIMP and CPDI. GIMP gives each point a finite domain and integrates the shape functions over it, which smooths the weights and reduces the cell crossing noise. CPDI follows the shape of the domain as it deforms.
  • B-spline MPM. Quadratic or cubic B-splines on the grid have continuous gradients, which also removes the jumps.
  • Update stress first (USF) and modified USL. The stress may be updated with the old grid velocity before the momentum solve, or with a velocity mapped back from the updated particles; the variants differ in energy behaviour.
  • APIC and PolyPIC transfers. These store an affine or polynomial velocity on each point, which reduces dissipation and conserves angular momentum.
  • Implicit MPM. A Newton solve on the grid allows steps above the CFL limit for slow or quasi-static problems.
  • Two-phase and multi-material MPM. Several sets of points on one grid for soil with water, or for bodies in contact.

When to use it

Use MPM for problems with very large deformation, flow of solids, fragmentation or many contacts: landslides and soil, impact and penetration, snow and ice, granular flow, and metal forming. Use the finite element method on a Lagrangian mesh instead when the deformation is moderate and accurate stresses near boundaries matter, since MPM is less accurate per degree of freedom. For fluids without strength, smoothed particle hydrodynamics or grid methods are more common; MPM is useful when the material changes between solid-like and fluid-like.

Pitfalls

  • Dividing by a tiny nodal mass. A node that gets a small mass from a point near the far end of its support gets a huge acceleration in line L4, while its force is not small. Skip nodes with zero mass, and many codes also skip nodes whose mass is below a small threshold.
  • Cell crossing noise. With linear hats and points that cross cells often, the stress shows spurious oscillations. Use GIMP or B-splines, or several points per cell.
  • Strain from the wrong velocity. USL needs the updated grid velocity in line L9; using the old one with the stress update last changes the method.
  • Too large a step. The explicit step is stable only below the CFL limit, which also depends on the particle speed.
  • Boundary conditions on the grid only. Supports act on nodes, not on the physical boundary of the body, which lies between nodes; traction and contact conditions on curved boundaries need extra work.
  • Too few points per cell. With one point per cell in 1D, the particle quadrature is poor and the zero energy modes of the grid are not controlled.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

material_point_method.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/material-point-method/. The authors are listed in prov/AX0ZM2.jsonl.
"""The material point method (MPM) of Sulsky, Chen and Schreyer in 1D.

A linear elastic bar is a set of material points (particles) with mass m_p,
volume V_p, velocity v_p, deformation gradient F_p and stress sigma_p. The
background grid has nodes x_i = i dx, i = 0, ..., n - 1, with the linear hat
shape functions N_i(x) = max(0, 1 - |x - x_i| / dx). Each step maps the
particles to the grid, solves the momentum equation on the grid with an
explicit step, and maps the result back (update stress last, USL, with the
FLIP velocity update). The grid carries no state from step to step.

Cost per step: Theta(N + n) time and Theta(n) extra space for N particles
and n nodes.
"""

import math
from dataclasses import dataclass, field


@dataclass
class Particles:
    x: list[float]
    v: list[float]
    m: list[float]
    vol0: list[float]
    F: list[float] = field(default_factory=list)
    stress: list[float] = field(default_factory=list)

    def __post_init__(self):
        if not self.F:
            self.F = [1.0] * len(self.x)
        if not self.stress:
            self.stress = [0.0] * len(self.x)

    def volume(self, p: int) -> float:
        return self.F[p] * self.vol0[p]


def hat_weights(x: float, dx: float) -> list[tuple[int, float, float]]:
    """The two nodes i with N_i(x) > 0 or at the left of x, with N_i(x) and dN_i/dx (one-sided at a node)."""
    j = math.floor(x / dx)
    w = x / dx - j
    return [(j, 1 - w, -1 / dx), (j + 1, w, 1 / dx)]


def grid_force(ps: Particles, dx: float, n: int) -> list[float]:
    """Internal nodal force f_i = -sum_p V_p sigma_p dN_i(x_p)."""
    f = [0.0] * n
    for p in range(len(ps.x)):
        for i, _, dn in hat_weights(ps.x[p], dx):
            f[i] -= ps.volume(p) * ps.stress[p] * dn
    return f


def mpm_step(ps: Particles, dx: float, n: int, young: float, h: float, fixed: frozenset = frozenset()) -> Particles:
    """One USL step for a linear elastic material, sigma = E (F - 1) by the increment rule."""
    mass = [0.0] * n
    mom = [0.0] * n
    for p in range(len(ps.x)):  # @line L1
        for i, w, _ in hat_weights(ps.x[p], dx):
            mass[i] += w * ps.m[p]  # @line L2
            mom[i] += w * ps.m[p] * ps.v[p]  # @line L2
    f = grid_force(ps, dx, n)  # @line L3
    v_old = [mom[i] / mass[i] if mass[i] > 0 else 0.0 for i in range(n)]  # @line L4
    v_new = [v_old[i] + h * f[i] / mass[i] if mass[i] > 0 else 0.0 for i in range(n)]  # @line L4
    for i in fixed:  # @line L5
        v_new[i] = 0.0  # @line L5
    acc = [(v_new[i] - v_old[i]) / h for i in range(n)]  # @line L5
    out = Particles(list(ps.x), list(ps.v), list(ps.m), list(ps.vol0), list(ps.F), list(ps.stress))
    for p in range(len(ps.x)):  # @line L6
        ws = hat_weights(ps.x[p], dx)
        out.v[p] = ps.v[p] + h * sum(w * acc[i] for i, w, _ in ws)  # @line L7
        out.x[p] = ps.x[p] + h * sum(w * v_new[i] for i, w, _ in ws)  # @line L8
        rate = sum(dn * v_new[i] for i, _, dn in ws)  # @line L9
        out.F[p] = ps.F[p] * (1 + h * rate)  # @line L10
        out.stress[p] = ps.stress[p] + young * h * rate  # @line L11
    return out  # @line L12


def vibrating_bar(cells: int, ppc: int, length: float, young: float, rho: float, v0: float, h: float):
    """Particles of a bar on [0, length] in its first mode, v = v0 sin(pi x / (2 length)), and the grid size."""
    dx = length / cells
    xs, vs, ms, vols = [], [], [], []
    for c in range(cells):
        for k in range(ppc):
            x = (c + (k + 0.5) / ppc) * dx
            xs.append(x)
            vs.append(v0 * math.sin(math.pi * x / (2 * length)))
            vols.append(dx / ppc)
            ms.append(rho * dx / ppc)
    return Particles(xs, vs, ms, vols), dx, cells + 2
test_material_point_method.py 81 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/material-point-method/. The authors are listed in prov/AX0ZM2.jsonl.
import math
import random

import pytest

from material_point_method import Particles, grid_force, hat_weights, mpm_step, vibrating_bar


def test_page_example_cell_crossing_force():
    # 8 points 0.6 dx apart with V_p = 0.6 and a uniform stress 1: cells hold 2, 1, 2, 2, 1 points
    ps = Particles([0.3 + 0.6 * k for k in range(8)], [0.0] * 8, [0.6] * 8, [0.6] * 8, stress=[1.0] * 8)
    f = grid_force(ps, 1.0, 7)
    assert f[1:5] == pytest.approx([-0.6, 0.6, 0.0, -0.6], abs=1e-12)


def test_uniform_points_give_zero_interior_force():
    rng = random.Random(1)
    for _ in range(20):
        ppc = rng.randint(1, 4)
        dx = rng.uniform(0.1, 2)
        cells = 6
        xs = [(c + (k + 0.5) / ppc) * dx for c in range(cells) for k in range(ppc)]
        s = rng.uniform(-3, 3)
        ps = Particles(xs, [0.0] * len(xs), [1.0] * len(xs), [dx / ppc] * len(xs), stress=[s] * len(xs))
        f = grid_force(ps, dx, cells + 2)
        assert f[1:cells] == pytest.approx([0.0] * (cells - 1), abs=1e-12)
        # the boundary nodes get the traction of the stress, -s at the left end and +s at the right end
        assert f[0] == pytest.approx(s, abs=1e-12) and f[cells] == pytest.approx(-s, abs=1e-12)


def test_weights_form_a_partition_of_unity():
    rng = random.Random(2)
    for _ in range(500):
        dx = rng.uniform(0.1, 3)
        x = rng.uniform(0, 20)
        ws = hat_weights(x, dx)
        assert sum(w for _, w, _ in ws) == pytest.approx(1, abs=1e-12)
        assert sum(w * i * dx for i, w, _ in ws) == pytest.approx(x, abs=1e-9)
        assert sum(dn for _, _, dn in ws) == pytest.approx(0, abs=1e-12)
        assert all(w >= 0 for _, w, _ in ws)


def test_mass_and_momentum_are_conserved_without_supports():
    rng = random.Random(3)
    n, dx = 14, 0.5
    xs = [rng.uniform(2, 4.5) for _ in range(30)]
    ps = Particles(xs, [rng.uniform(-1, 1) for _ in xs], [rng.uniform(0.5, 2) for _ in xs], [0.1] * 30,
                   stress=[rng.uniform(-1, 1) for _ in xs])
    p0 = sum(m * v for m, v in zip(ps.m, ps.v))
    for _ in range(50):
        ps = mpm_step(ps, dx, n, 10.0, 1e-3)
    assert sum(m * v for m, v in zip(ps.m, ps.v)) == pytest.approx(p0, abs=1e-10)
    assert min(ps.x) > 0 and max(ps.x) < (n - 2) * dx


def test_rigid_translation_is_exact():
    xs = [0.5 + 0.25 * k for k in range(10)]
    ps = Particles(xs, [0.3] * 10, [1.0] * 10, [0.25] * 10)
    for _ in range(100):
        ps = mpm_step(ps, 0.5, 12, 50.0, 0.01)
    assert ps.v == pytest.approx([0.3] * 10, abs=1e-12)
    assert ps.x == pytest.approx([x + 0.3 for x in xs], abs=1e-9)
    assert ps.stress == pytest.approx([0.0] * 10, abs=1e-12)
    assert ps.F == pytest.approx([1.0] * 10, abs=1e-12)


def test_vibrating_bar_first_mode():
    # fixed at x = 0, free at x = 1; c = sqrt(E / rho) = 10, omega_1 = pi c / 2, period 0.4
    young, rho, length, v0 = 100.0, 1.0, 1.0, 0.1
    ps, dx, n = vibrating_bar(20, 2, length, young, rho, v0, 0.0)
    c = math.sqrt(young / rho)
    h = 0.1 * dx / c
    w1 = math.pi * c / (2 * length)
    worst = 0.0
    for s in range(1, int(round(0.4 / h)) + 1):
        ps = mpm_step(ps, dx, n, young, h, frozenset([0]))
        vcm = sum(m * v for m, v in zip(ps.m, ps.v)) / sum(ps.m)
        worst = max(worst, abs(vcm - 2 / math.pi * v0 * math.cos(w1 * s * h)))
    assert worst < 0.02 * (2 / math.pi * v0)

History

The particle-in-cell method of fluid dynamics carried mass on particles and moved them with a grid solution, and FLIP added the full velocity on the particles to reduce its dissipation. Sulsky, Chen and Schreyer (1994) turned FLIP into a method for solids, with the stress and history variables on the points and the weak form of the momentum equation on the grid, and the method became known as the material point method. Bardenhagen and Kober (2004) identified the cell crossing noise and introduced GIMP, and Steffen, Kirby and Berzins (2008) analysed the quadrature errors. Since about 2013 the method has also been used widely in computer graphics for snow, sand and other materials.

References

  1. Deborah Sulsky, Zhen Chen and Howard L. Schreyer, A particle method for history-dependent materials, Computer Methods in Applied Mechanics and Engineering 118(1-2), 1994, 179-196, the method, the weak form on the grid and the update of stress at the material points
  2. Scott G. Bardenhagen and Edward M. Kober, The generalized interpolation material point method, Computer Modeling in Engineering and Sciences 5(6), 2004, 477-495, the cell crossing noise of MPM and its reduction with particle domains
  3. Michael Steffen, Robert M. Kirby and Martin Berzins, Analysis and reduction of quadrature errors in the material point method (MPM), International Journal for Numerical Methods in Engineering 76(6), 2008, 922-948, the quadrature error of the particle integration and the error when points cross cell boundaries

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.worst
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a scene preset for the example