Variational integrator

From HandWiki
Short description: Method of numerical integration

Variational integrators are numerical integrators for Hamiltonian systems derived from the Euler–Lagrange equations of a discretized Hamilton's principle. Variational integrators are momentum-preserving and symplectic.

Derivation of a simple variational integrator

Consider a mechanical system with a single particle degree of freedom described by the Lagrangian

[math]\displaystyle{ L(t,q,v) = \frac 1 2 m v^2 - V(q), }[/math]

where [math]\displaystyle{ m }[/math] is the mass of the particle, and [math]\displaystyle{ V }[/math] is a potential. To construct a variational integrator for this system, we begin by forming the discrete Lagrangian. The discrete Lagrangian approximates the action for the system over a short time interval:

[math]\displaystyle{ \begin{align} L_d(t_0, t_1, q_0, q_1) & = \frac{t_1 - t_0}{2} \left[ L\left(t_0, q_0, \frac{q_1-q_0}{t_1-t_0}\right) + L\left(t_1, q_1, \frac{q_1-q_0}{t_1-t_0}\right) \right] \\ & \approx \int_{t_0}^{t_1} \, dt\, L(t, q(t), v(t)). \end{align} }[/math]

Here we have chosen to approximate the time integral using the trapezoid method, and we use a linear approximation to the trajectory,

[math]\displaystyle{ q(t) \approx \frac{q_1 - q_0}{t_1-t_0}(t - t_0) + q_0 }[/math]

between [math]\displaystyle{ t_0 }[/math] and [math]\displaystyle{ t_1 }[/math], resulting in a constant velocity [math]\displaystyle{ v \approx \left(q_1 - q_0 \right)/\left(t_1 - t_0 \right) }[/math]. Different choices for the approximation to the trajectory and the time integral give different variational integrators. The order of accuracy of the integrator is controlled by the accuracy of our approximation to the action; since

[math]\displaystyle{ L_d(t_0, t_1, q_0, q_1) = \int_{t_0}^{t_1} \, dt\, L(t,q(t),v(t)) + \mathcal{O}(t_1 - t_0)^2, }[/math]

our integrator will be second-order accurate.

Evolution equations for the discrete system can be derived from a stationary-action principle. The discrete action over an extended time interval is a sum of discrete Lagrangians over many sub-intervals:

[math]\displaystyle{ S_d = L_d(t_0, t_1, q_0, q_1) + L_d( t_1, t_2, q_1, q_2) + \cdots. }[/math]

The principle of stationary action states that the action is stationary with respect to variations of coordinates that leave the endpoints of the trajectory fixed. So, varying the coordinate [math]\displaystyle{ q_1 }[/math], we have

[math]\displaystyle{ \frac{\partial S_d}{\partial q_1} = 0 = \frac{\partial}{\partial q_1} L_d\left(t_0, t_1, q_0, q_1 \right) + \frac{\partial}{\partial q_1} L_d\left( t_1, t_2, q_1, q_2 \right). }[/math]

Given an initial condition [math]\displaystyle{ (q_0, q_1) }[/math], and a sequence of times [math]\displaystyle{ (t_0,t_1,t_2) }[/math] this provides a relation that can be solved for [math]\displaystyle{ q_2 }[/math]. The solution is

[math]\displaystyle{ q_2 = q_1 + \frac{t_2 - t_1}{t_1 - t_0}(q_1 - q_0) - \frac{(t_2 - t_0) (t_2 - t_1)}{2m} \frac{d}{dq_1} V(q_1). }[/math]

We can write this in a simpler form if we define the discrete momenta,

[math]\displaystyle{ p_0 \equiv -\frac{\partial}{\partial q_0} L_d(t_0, t_1, q_0, q_1) }[/math]

and

[math]\displaystyle{ p_1 \equiv \frac{\partial}{\partial q_1} L_d(t_0, t_1, q_0, q_1). }[/math]

Given an initial condition [math]\displaystyle{ (q_0,p_0) }[/math], the stationary action condition is equivalent to solving the first of these equations for [math]\displaystyle{ q_1 }[/math], and then determining [math]\displaystyle{ p_1 }[/math] using the second equation. This evolution scheme gives

[math]\displaystyle{ q_1 = q_0 + \frac{t_1 - t_0}{m} p_0 - \frac{(t_1 - t_0)^2}{2m} \frac{d}{dq_0} V(q_0) }[/math]

and

[math]\displaystyle{ p_1 = m \frac{q_1 - q_0}{t_1 - t_0} - \frac{t_1 - t_0} 2 \frac{d}{dq_1} V(q_1). }[/math]

This is a leapfrog integration scheme for the system; two steps of this evolution are equivalent to the formula above for [math]\displaystyle{ q_2 }[/math]

See also

References

  • E. Hairer, C. Lubich, and G. Wanner. Geometric Numerical Integration. Springer, 2002.
  • J. Marsden and M. West. Discrete mechanics and variational integrators. Acta Numerica, 2001, pp. 357–514.