Elasticity Simulator

a Java applet demonstrating large deformation non-linear isotropic elasticity with inertial effects

by François Labelle

(Sorry, your browser does not support Java applets.)


Technical note

This isn't your average mass and spring simulation, the physics are discretized using the Finite Element Method. Although the applet maintains the position x, velocity v and acceleration a of black nodes only, conceptually values elsewhere are interpolated.

When time is fixed, balance of momentum and the constitutive law (material response to deformation) together give a system of non-linear equations relating position and acceleration of the nodes. In other words, application of the Finite Element Method produces a second order non-linear ODE.


The ODE is time-integrated using Newmark integration. To compute timestep n+1, the ODE provides a non-linear system of equations relating xn+1 and an+1. Newmark integration gives two more equations:
xn+1 = xn + vn*dt + 1/2*(1/2*an + 1/2*an+1)*dt2
vn+1 = vn + (1/2*an + 1/2*an+1)*dt
Solving for xn+1 requires the solution of a non-linear system of equations. This is done using the Newton-Raphson method with the derivative computed analytically. Since the Newton iteration is the most time consuming operation, I do only one Newton iteration per frame and get good results because of the consequently high framerate. Once xn+1 is known computing an+1 and vn+1 is easy.

The applet runs almost as fast as it can on your machine, up to a maximum of 250 frames/second. The simulation is harder to crash on a fast machine with a fast Java interpreter.

Elasticity model

The elasticity model used is "compressible Neo-Hookean" plus damping. Damping is very important, without it the system doesn't lose energy and the material oscillates forever (try the Jell-O option to see 5 times less damping than the default material). So technically the material is "viscoelastic" and this is a "viscoelasticity simulator". The "linear elasticity" option replaces the Neo-Hookean law with the Generalized Hookean law to show how important a non-linear elasticity model is when dealing with large deformations.

For those even more technically inclined:

The non-linear model used:
    S = lambda*J*(J-1)*C-1 + mu*(I - C-1)

The linear model:
    S = lambda*tr(E)*I + 2*mu*E

Damping term:
    S += phi*tr(Edot)*I + 2*psi*Edot

    F = deformation gradient
    J = det(F) = Jacobian of the transformation
    C = FT*F = right Cauchy-Green deformation tensor
    E = 1/2*(C - I) = Lagrangian strain tensor
    Edot = time derivative of E
    lambda, mu = material parameters (Lamé constants)
    phi, psi = damping parameters
    S = second Piola-Kirchhoff stress tensor
    T = 1/J*F*S*FT = Cauchy stress tensor


I must thank Prof Papadopoulos from whom I learned how to do this.
last updated: July 8, 2003
go to François Labelle's Homepage