Variational Integrators

Dynamical systems following Hamilton mechanics can be formulated as

M \ddot q = – \nabla V(q)

where M is the mass and q is the state vector. These equations arise in pretty much every single physics engine (astrophysics and molecular dynamics for example.) Traditionally, solvers such as the forward/backward Euler have been used, but these solvers do not respect the manifold of the configuration system. This led to the development of solvers such as the Verlet (and Velocity Verlet) which are symplectic in nature and follow the geometry of the problem. The Velocity Verlet specifically is the workhorse of molecular dynamics.

Pendulum Trajectories

By geometry, I mean the invariants that arise due to symmetry in the system. For example, rotational and translational symmetry in the system give rise to conservation of angular and linear momentum. Above, the equations of motion for a simple pendulum were integrated with four different solvers. The symplectic nature of the problem does not fall out naturally from the solvers because these “local” methods still look at differential changes in momenta and position.

Variational methods, on the other hand, directly deal with equations arising out of Hamilton’s action principle. The Lagrangian is defined as

L(q, \dot q) = T(\dot q) – V(q)

and the action functional is the integral of the Lagrangian along a path q(t).

S(q) = \int_0^T L(q, \dot q) dt

First order variations to compute the stationary action leads to the Euler-Lagrange differential equation. A similar derivation can be done for discrete variables yielding the Discrete Euler Lagrange (DEL) equation.

D_1 L(q_k,q_{k+1}) + D_2 L(q_{k-1},q_k) = 0

This is very attractive because physical invariants that arise from the variational principle are guaranteed to be maintained in the discrete situation as well. This is also true for constraints on the system: constraint versions of Verlet and Velocity Verlet, SHAKE and RATTLE are natural in the DEL equation setting.

The only roadblock to the rapid adoption of these algorithms is the computational expense of solving the DEL. Each integration timestep requires the solution of a set of implicit nonlinear equations (usually by the use of Newton’s method.) This is a problem for molecular dynamics where you are trying to run the simulation for a few nanoseconds and your timestep is in femtoseconds.

One Response to “Variational Integrators”

  1. [...] Some time ago, I became very interested in variational integrators when I came across (by accident) a nifty paper by Liliya Kharevych (Caltech) et alia: Geometric, Variational Integrators for Computer Animation. Then, a couple of weeks ago I was pleased to read a post on variational integrators on Ganesh Swami’s wonderful blog (I nominated him for the Thinking Blogger Award for a reason). Quoting Ganesh: Variational methods, on the other hand, directly deal with equations arising out of Hamilton’s action principle. The Lagrangian is defined as [...]