Implicit-explicit variational integration of igly oscillatory problems Ari Stern Structured Integrators Worksop April 9, 9 Stern, A., and E. Grinspun. Multiscale Model. Simul., to appear. arxiv:88.39 [mat.na]. Department of Matematics, UCSD, astern@mat.ucsd.edu
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Te Problem: Multiple Time Scales vs. Numerical Integrators Many systems in Lagrangian mecanics ave components acting on different time scales, for example:. Elasticity: Several spatial elements of varying stiffness, resulting from irregular meses and/or inomogeneous materials.. Planetary Dynamics: N-body problem wit nonlinear gravitational forces, arising from pairwise inverse-square potentials. Multiple time scales result from te different distances between te bodies, mass ratios, etc. 3. Higly Oscillatory Problems: Potential energy can be split into a fast linear oscillatory component and a slow nonlinear component. Tese problems are widely encountered in modeling molecular dynamics, but ave also been used to model oter diverse applications, for example, in computer animation. Existing metods tend to waste too muc computational effort evaluating te non-stiff forces e.g., Störmer/Verlet, implicit midpoint or suffer from resonance instability problems e.g., Verlet-I/r-RESPA, AVI, many trigonometric integrators. Can we develop geometric numerical integrators tat are stable wit respect to te stiff forces, but still efficient wit respect to te non-stiff forces?
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Review: Te Discrete Lagrangian and Action Sum Suppose we ave a mecanical system on a configuration manifold Q, specified by a Lagrangian L: T Q R. Given a set of discrete time points t < < t N wit uniform step size, we wis to compute a numerical approximation q n q t n, n =,..., N, to te continuous trajectory qt. To construct a variational integrator for tis problem, we define a discrete Lagrangian L : Q Q R, replacing tangent vectors by pairs of consecutive configuration points, so tat in some sense we ave te approximation tn+ L qn, q n+ L q, q dt. Ten te action integral over [t, t N ] is approximated by te discrete action sum tn S [q] = N n= L qn, q n+ tn t L q, q dt.
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Review: Te Discrete Euler Lagrange Equations and Legendre Transform If we apply Hamilton s principle to tis action sum, so tat δs [q] = for fixedendpoint variations, ten tis yields te discrete Euler Lagrange equations D L qn, q n+ + D L qn, q n =, n =,..., N, were D and D denote partial differentiation in te first and second arguments, respectively. Tis defines a two-step numerical metod on Q Q, mapping q n, q n qn, q n+. Te equivalent one-step metod on te cotangent bundle T Q, mapping q n, p n qn+, p n+, is defined by te discrete Legendre transform p n = D L qn, q n+, pn+ = D L qn, q n+, were te first equation updates q, and te second updates p. Here, L is a generating function for te symplectic map q n, p n qn+, p n+. 3
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Review: Te Trapezoidal and Midpoint Discrete Lagrangians Consider a Lagrangian of te form L q, q = qt M q V q, were Q = R d, M is a constant d d mass matrix, and V : Q R is a potential. If we use linear interpolation of q wit trapezoidal quadrature to approximate te contribution of V to te action integral, we get L trap qn, q n+ = qn+ q T n qn+ q n M V q n + V qn+, wic we call te trapezoidal discrete Lagrangian. It is straigtforward to see tat te discrete Euler Lagrange equations for L trap correspond to te explicit Störmer/Verlet metod. Alternatively, if we use midpoint quadrature to approximate te integral of te potential, tis yields te midpoint discrete Lagrangian, L mid qn, q n+ = qn+ q T n qn+ q n qn + q n+ M V, for wic te resulting integrator is te implicit midpoint metod. 4
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Te IMEX Discrete Lagrangian Suppose tat we ave a Lagrangian of te form L q, q = qt M q Uq W q, were U is a slow potential and W is a fast potential, for te configuration space Q = R d. Define te IMEX discrete Lagrangian L IMEX qn+ q T n qn+ q n qn, q n+ = M U q n + U qn+ qn + q n+ W, using explicit trapezoidal approximation for te slow potential and implicit midpoint approximation for te fast potential. Te discrete Euler Lagrange equations give a two-step variational integrator on Q Q, [ q n+ q n + q n = M U q n + W qn + q n + ] W qn + q n+. 5
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Te IMEX Algoritm on T Q Te discrete Legendre transform for te IMEX discrete Lagrangian is qn+ q n p n = M qn+ q n p n+ = M If we introduce te intermediate stages, + U q n + W U q n+ W qn + q n+, qn + q n+. p + n = p n U q n, p n+ = p n+ + U q n+, ten tis gives us te following impulse-type integration algoritm: Step : p + n = p n U q n, explicit kick Step : q n+ pn+ p = q n + M + n + pn+, implicit midpoint = p n + qn + q n+ W, Step 3: p n+ = p n+ U q n+. explicit kick 6
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Application to Higly Oscillatory Problems For igly oscillatory problems on Q = R d, we start by taking a quadratic fast potential W q = qt Ω q, Ω R d d symmetric and positive semidefinite. A prototypical Ω is given by te block-diagonal matrix Ω =, ω, ωi were some of te degrees of freedom are subjected to an oscillatory force wit constant fast frequency ω. We also denote te slow force gq = Uq and assume, witout loss of generality, tat te constant mass matrix is given by M = I. Terefore, te nonlinear system we wis to approximate numerically is q + Ω q = gq. 7
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 IMEX as Störmer/Verlet wit a Modified Mass Matrix Applying te IMEX metod to tis example, we get te discrete Lagrangian L IMEX qn, q n+ = qn+ q T n qn+ q n U q n + U qn+ qn + q T n+ Ω qn + q n+, and so te two-step IMEX sceme is given by te discrete Euler Lagrange equations q n+ q n + q n + 4 Ω q n+ + q n + q n = g q n. Rearranging terms, we can rewrite tis as [ ] I + qn+ 4 Ω q n + q n + Ω q n = g q n, wic is equivalent to Störmer/Verlet wit a modified mass matrix I + Ω/. 8
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Te Discrete Lagrangian and Modified Mass Matrix Proposition. Suppose we ave a Lagrangian L q, q = qt M q qt Ω q and its corresponding midpoint discrete Lagrangian L mid. Next, define te modified Lagrangian L q, q = qt M q qt Ω q, aving te same quadratic potential but a different mass matrix M, and take its trapezoidal discrete Lagrangian L trap. Ten Lmid L trap wen M = M + Ω/. Proof. Te midpoint discrete Lagrangian is given by L mid qn, q n+ = qn+ q T n qn+ q n M qn + q T n+ Ω qn + q n+. Now, notice tat we can rearrange te terms qn + q T n+ Ω qn + q n+ qn+ q T n = Ω qn+ q n qt nω q n qt n+ Ω q n+ qn+ q T n Ω qn+ q n = qt nω q n qt n+ Ω q n+. 9
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Terefore te discrete Lagrangian can be written in te trapezoidal form [ L mid qn+ q T ] qn+ n Ω q n qn, q n+ = M + qt nω q n + qt n+ Ω q n+, wic is precisely L trap qn, q n+ wen M = M + Ω/. Corollary. Consider a igly oscillatory system wit an arbitrary slow potential U, quadratic fast potential W q = qt Ω q, and constant mass matrix M = I, so tat te Lagrangian L and IMEX discrete Lagrangian L IMEX are defined as above. Next, take te modified Lagrangian L wit te same potentials but different mass matrix M. Ten L IMEX L trap wen M = I + Ω/.
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Analysis of Linear Resonance Stability For a armonic oscillator wit unit mass and frequency ν, te Störmer/Verlet metod is linearly stable if and only if ν ; for a system wit constant mass m and spring constant ν, tis condition generalizes to ν 4m. Linear model problem: Let Uq = qt q, and W q = qt Ω q, were Ω = ωi for some ω, and again let M = I. Teorem. Te IMEX metod is linearly stable, for te system described above, if and only if i.e., if and only if is a stable time step size for te slow oscillator alone. Proof. As proved in te previous section, te IMEX metod for tis system is equivalent to Störmer/Verlet wit te modified mass matrix I + Ω/. Now, tis modified oscillatory system as constant mass m = +ω/ and spring constant ν = +ω. Terefore, te necessary and sufficient condition for linear stability is + ω 4 + 4 ω, and since te ω terms cancel on bot sides, tis is equivalent to. 4, or Tis sows tat, in contrast to multiple-time-stepping metods, te IMEX metod does not exibit linear resonance instability.
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Numerical Experiment: Coupled Linear Oscillators r!respa Variational IMEX Maximum absolute energy error!!!3!4.5.5.5 3 3.5 4 4.5! /" Maximum energy error of r-respa and variational IMEX, integrated over te time interval [, ] for a range of parameters ω. Te r-respa metod exibits resonance instability near integer values of ω/π, wile te variational IMEX metod remains stable.
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Numerical Experiment: Te Fermi Pasta Ulam Problem q q q m q m stiff armonic soft nonlinear Source: Hairer, Lubic, and Wanner 6. Cain wit alternating soft nonlinear stiff linear springs I + I + I 3.8.6 I I I 3.8.6.4.4.. 5 5 Slow energy excange among te stiff springs. 5 3
Stern, IMEX variational integration of igly oscillatory problems I + I + I3.8.6.8.8.4 I.4.4 5...8.8 I + II + I 3 I 3 I.6.6..8.4 I I + I + I3 I3 I I.6 I3 I.8.4 I.6.6...4.4 5. 5 5 I + I + I3.6 I 5 5 5 5.8.6.6.6.8.8.4.8.8.4.4.6.6..6.6.. 5.. 5 5.8 I + I + I3 I3 I I3 I.6.6.6. 5 5 5 Reference solution: Störmer/Verlet wit time step size =.. 5 5.8 5 5.4.8..6.6..6..6.4.4.4.6.6...4.4. 5 5 5 5 5.8.6.6.6.8.8.4.8.8.4.4.6.6..6.6.. 5 5 5.4.4.4 5 5....5 5 5 5 5 5 5 5 5.. 5 5 5 5 5 5 5.5.5 5 5 IMEX wit =.. 5 5 5 5 5 5 5 5 5 5 5 5 5 5.8.8.8.6.6.6.8.8.4.8.8.4.4.6.6..6.6...4.4.4 5 5 5.8 5 5 5 5 5 5 5.8.8.6.6.6.8.8.8.8.6.6.8.6.6.6.6.8.8.8.8.8.4.4.6.6.6.6.6...4.8.8.4.8.4.8..6.6..6.4 5 5 5.4 5. IMEX wit =.. 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 IMEX wit =.5. 5..8.4.4 5.4. 5 5 5.4 5.4 5 5 5..6.4 5 5.4 5 5 5... 5 5..8.. 5.4.5 5 Störmer/Verlet wit =.3. 5..6.6..5.8.8.4.5 5.6 5... 5.4. IMEX wit =.3..5 Störmer/Verlet wit =...8..8 5.8.6 5.8.4.8.8.4.8.8.6.6.8.4.6.6 5.8.6.6.8 5.8.4.6.8.8.4.6.6.8.6.8 5 5.8.8.5 5.8.5.5.5.5.5...8.6.8.8.4.4.4..5 I3 I I + I + I3.4..4.4 Structured Integrators Worksop, May 7, 9 5 5 5 IMEX wit =.5. 5. 5 5. IMEX wit =.3. 4
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 5 4.5 4 3.5.8 3.5.6.4.5..5 3 4 IMEX wit =. 3 4 IMEX wit =.3 Numerical simulation of te FPU problem for T = 4, wic sows te beavior of te IMEX metod on te ω scale. For =., we already ave ω = 5, yet te oscillatory beavior and adiabatic invariant are qualitatively correct. By contrast, for =.3, te metod as begun to blow up; oscillatory coupling is a drawback of implicit midpoint metods for large time steps. 5
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Analysis of Slow Energy Excange First, let us rewrite te fast oscillatory system q + Ω q = as te first-order system Ω q Ω Ωq =, ṗ Ω p so it follows tat te exact solution satisfies Ωqt + cos Ω sin Ω Ωqt =. pt + sin Ω cos Ω pt Now, in tese coordinates, te implicit midpoint metod as te expression I Ω/ Ωqn+ I Ω/ Ωqn =. Ω/ I Ω/ I p n+ Terefore, if we take te skew matrix A = Ωqn+ p n+ p n Ω, it follows tat Ω = I A/ Ωqn I + A/. Notice tat te expression I A/ I + A/ = cay A is te Cayley transform. p n 6
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Implicit Midpoint and Modified Frequency Because cay and exp are bot maps from sod SOd, te midpoint metod corresponds to a modified rotation matrix, were Ω is replaced by Ω suc tat Ω/ = tan Ω/ Tis gives anoter interpretation of te resonance stability wen Ω = ωi and Ω = ωi. We always ave ω < π, since te Cayley transform maps to a rotation by π only in te limit as ω. Terefore, we never encounter resonance points for finite ω. We now write te variational IMEX metod as te following modified impulse sceme: Step : p + n = p n U q n, explicit kick Step : Ωqn+ p n+ cos Ω sin Ω Ωqn =, implicit midpoint sin Ω cos Ω Step 3: p n+ = p n+ U q n+. explicit kick In oter words, te implicit midpoint step doesn t just smear out te oscillations in fact, it resolves te oscillations of some modified problem. Because te propagation matrix is still special ortogonal, tis does not affect te fast energy component. p + n 7
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Consistency of Slow Energy Excange Hairer et al. ave analyzed te slow energy excange beavior of impulse metods using modulated Fourier expansion. By casting IMEX as a modified impulse metod, we were able to use tese same tecniques to prove te following teorem: Teorem. Let te variational IMEX metod be applied to te igly oscillatory problem above, and suppose te numerical solution remains bounded. Ten te ordinary differential equation [...] describing te slow energy excange in te numerical solution, is consistent wit tat for [...] te exact solution; tis olds up to order O ω 3. In fact, tis is not true for eiter Störmer/Verlet or implicit midpoint so IMEX is not merely ceaper, but also better for tese applications. Te only trigonometric/exponential metod saring tis property is Deuflard/impulse, wic also suffers from resonance instability problems. Te most comparable integrators in tis respect appear to be multi-force trigonometric metods, but tese require at least twice as many force evaluations as IMEX. 8
Stern, IMEX variational integration of igly oscillatory problems Structured Integrators Worksop, May 7, 9 Summary Te variational IMEX metod is developed by splitting te discrete Lagrangian into slow explicit and fast implicit components, and applying separate quadrature rules trapezoidal and midpoint, respectively. For igly oscillatory problems, tis is equivalent to Störmer/Verlet wit a modified mass matrix. Tis leads to unconditional linear stability in te fast modes, and in particular, te absence of linear resonance instability. Te Fermi Pasta Ulam example demonstrates tat te variational IMEX metod does not attain its stability merely by smooting out te fast frequencies, in a way tat migt destroy te structure of any fast-slow nonlinear coupling. Rater, despite te fact tat it does not resolve te fast frequencies, te metod is still capable of capturing te complex multiscale interactions seen in te FPU problem. 9