introduction to hamiltonian systems - kit · symplectic euler, h = 100 stoÄrmer verlet, h = 200...

4
Introduction to Hamiltonian systems Marlis Hochbruck Heinrich-Heine Universit¨ at D¨ usseldorf Oberwolfach Seminar, November 2008 Examples Mathematical biology: Lotka-Volterra model First numerical methods Mathematical pendulum Kepler problem Outer solar system Molecular dynamics First integrals Energy, linear invariants Quadratic and polynomial invariants Reversible differential equations Symmetric methods Lotka-Volterra model I u(t ) number of predators v (t ) number of prey ˙ u = u(v 2) ˙ v = v (1 u) general autonomous system of odes ˙ y = f (y ) y point in phase space f (y ) vector field (velocity in y ) flow: ϕ t : y 0 y (t ) if y (0) = y 0 Lotka-Volterra model II 1 2 3 1 2 3 4 5 1 2 3 1 2 3 4 5 1 2 3 1 2 3 4 5 v u v u v u u number of predators, v number of prey Invariant of Lotka-Volterra model equations ˙ u = u(v 2), ˙ v = v (1 u) divide by each other and separation of variables 0= 1 u u ˙ u v 2 v ˙ v = d dt I (u, v ) with invariant I (u, v ) = ln u u + 2 ln v v every solution lies on level curve of I level curves are closed thus all solutions are periodic First numerical methods autonomous problem y = f (y ) explicit Euler method: y n+1 = y n + hf (y n ) implicit Euler method: y n+1 = y n + hf (y n+1 ) implicit midpoint rule y n+1 = y n + hf y n + y n+1 2 discrete or numerical flow: Φ h : y n y n+1 Partitioned systems – symplectic Euler partitioned system ˙ u = f (u, v ), ˙ v = g (u, v ) combine explicit and implicit Euler: symplectic Euler u n+1 = u n + hf (u n , v n+1 ) v n+1 = v n + hg (u n , v n+1 ) (SE1) or u n+1 = u n + hf (u n+1 , v n ) v n+1 = v n + hg (u n+1 , v n ) (SE2) SE1 becomes explicit if f (u, v )= f (u), g (u, v )= g (v ) SE2 becomes explicit if f (u, v )= f (v ), g (u, v )= g (u) Lotka-Volterra model –experiment 2 4 2 4 6 2 4 2 4 6 2 4 2 4 6 v u v u v u explicit Euler implicit Euler symplectic Euler y0 y82 y83 y0 y49 y50 y0 y0

Upload: others

Post on 07-Jun-2020

27 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Hamiltonian systems - KIT · symplectic Euler, h = 100 StoÄrmer Verlet, h = 200 Molecular dynamics Hamiltonian H (p;q) = 1 2 XN i=1 1 m i pT ip + XN i=2 Xi¡ 1 j=1

Introduction to

Hamiltonian systems

Marlis Hochbruck

Heinrich-Heine Universitat Dusseldorf

Oberwolfach Seminar, November 2008

ExamplesMathematical biology: Lotka-Volterra modelFirst numerical methodsMathematical pendulumKepler problemOuter solar systemMolecular dynamics

First integralsEnergy, linear invariantsQuadratic and polynomial invariants

Reversible differential equationsSymmetric methods

Lotka-Volterra model I

◮ u(t) number of predators

◮ v(t) number of prey

u = u(v − 2)

v = v(1− u)

general autonomous system of odes

y = f (y)

◮ y point in phase space

◮ f (y) vector field (velocity in y)

◮ flow: ϕt : y0 7→ y(t) if y(0) = y0

Lotka-Volterra model II

1 2 3

1

2

3

4

5

1 2 3

1

2

3

4

5

1 2 3

1

2

3

4

5v

u

v

u

v

u

u number of predators, v number of prey

Invariant of Lotka-Volterra model

equationsu = u(v − 2), v = v(1− u)

divide by each other and separation of variables

0 =1− u

uu − v − 2

vv =

d

dtI (u, v)

with invariantI (u, v) = ln u − u + 2 ln v − v

◮ every solution lies on level curve of I

◮ level curves are closed thus all solutions are periodic

First numerical methods

autonomous problem y ′ = f (y)

◮ explicit Euler method:

yn+1 = yn + hf (yn)

◮ implicit Euler method:

yn+1 = yn + hf (yn+1)

◮ implicit midpoint rule

yn+1 = yn + hf

(yn + yn+1

2

)discrete or numerical flow: Φh : yn 7→ yn+1

Partitioned systems – symplectic Euler

partitioned system

u = f (u, v), v = g(u, v)

combine explicit and implicit Euler: symplectic Euler

un+1 = un + hf (un, vn+1)

vn+1 = vn + hg(un, vn+1)(SE1)

or

un+1 = un + hf (un+1, vn)

vn+1 = vn + hg(un+1, vn)(SE2)

SE1 becomes explicit if f (u, v) = f (u), g(u, v) = g(v)SE2 becomes explicit if f (u, v) = f (v), g(u, v) = g(u)

Lotka-Volterra model –experiment

2 4

2

4

6

2 4

2

4

6

2 4

2

4

6

v

u

v

u

v

u

explicit Euler implicit Euler symplectic Euler

y0

y82

y83

y0

y49

y50

y0y0

Page 2: Introduction to Hamiltonian systems - KIT · symplectic Euler, h = 100 StoÄrmer Verlet, h = 200 Molecular dynamics Hamiltonian H (p;q) = 1 2 XN i=1 1 m i pT ip + XN i=2 Xi¡ 1 j=1

Hamiltonian problem

◮ Hamiltonian H(p, q) = H(p1, . . . , pd , q1, . . . , qd)(total energy)

◮ q1, . . . , qd positions

◮ p1, . . . , pd momenta

◮ Hamiltonian equations of motion

p = −Hq, Hq = ∇qH =

(∂H

∂q

)T

q = Hp

◮ energy conservation: H(p(t), q(t)) = const for all t

Mathematical pendulum

◮ mass m = 1, massless rod of length ℓ = 1,gravitational acceleration g = 1

◮ Hamiltonian

H(p, q) =1

2p2 − cos q

◮ equations of motion p = −Hq, q = Hp

p = − sin q, q = p

orq = − sin q

q

cos q ℓ

m

◮ vector field 2π-periodic in q =⇒ phase space cylinder R× S1

◮ flow ϕt(p, q) is an area preserving mapping

Area preservation Pendulum – numerical experiment

explicit Eulerh = 0.2

symplectic Eulerh = 0.3

Stormer-Verleth = 0.6

Kepler problem – two-body problem

◮ 1st body as center of coordinate system

◮ (p, q) coordinates of second body

Hamiltonian

H(p1, p2, q1, q2) =1

2(p2

1 + p22)− (q2

1 + q22)

−1/2

equations of motion:

qi = pi , pi = −Hqi = −qi (q21 + q2

2)−3/2

first integrals

◮ total energy H(p, q)

◮ angular momentum L(p1, p2, q1, q2) = q1p2 − q2p1

(Kepler’s second law)

Numerical example – Kepler problem

−2 −1 1

−1

−2 −1 1

1

−2 −1 1

−1

−2 −1 1

−1

1

400 000 stepsh = 0.0005

explicit Euler4 000 stepsh = 0.05symplectic Euler

4 000 stepsh = 0.05

implicit midpoint

4 000 stepsh = 0.05Stormer Verlet

Numerical example – Kepler problem II

50 100

.01

.02

50 100

.2

.4

conservation of energy

explicit Euler, h = 0.0001

symplectic Euler, h = 0.001

global error of solution

explicit Euler, h = 0.0001

symplectic Euler, h = 0.001

Qualitative long-time behavior – Kepler problem

method error in H error in L global error

explicit Euler O(th) O(th) O(t2h)

symplectic Euler O(h) 0 O(th)

implicit midpoint O(h2) 0 O(th2)

Stormer-Verlet O(h2) 0 O(th2)

Page 3: Introduction to Hamiltonian systems - KIT · symplectic Euler, h = 100 StoÄrmer Verlet, h = 200 Molecular dynamics Hamiltonian H (p;q) = 1 2 XN i=1 1 m i pT ip + XN i=2 Xi¡ 1 j=1

Outer solar system

Hamiltonian

H(p, q) =1

2

5∑i=0

1

mipTi pi − g

5∑i=1

i−1∑j=0

mimj

‖qi − qj‖

◮ astronomical units (1 A.U. = 149 597 870 km)

◮ masses relative to mass of sun

◮ m0 = 1.00000597682 (account for inner planets)

◮ g = 2.95 . . . · 10−4 gravitational constant

◮ initial positions and initial velocity from Sept. 5, 1994, 0h00

Outer solar system – numerical example

explicit Euler, h = 10 implicit Euler, h = 10

symplectic Euler, h = 100 Stormer Verlet, h = 200

Molecular dynamics

Hamiltonian

H(p, q) =1

2

N∑i=1

1

mipTi pi +

N∑i=2

i−1∑j=1

Vij

(‖qi − qj‖

)

◮ Vij(r) potential function

◮ qi , pi positions and momenta of atoms

◮ mi atomic mass of ith atom

in molecular dynamics: Vij Lennard-Jones potential

Vij(r) = 4εij

((σij

r

)12 −(σij

r

)6)

3 4 5 6 7 8

−.2

.0

.2

Numerical experiment – frozen argon crystal

N = 7 argon atoms in a plane

1

2

3

4

5

6

7

temperature T =1

NkB

N∑i=1

mi‖qi‖2

Numerical experiment – argon crystal

−60

−30

0

30

60

−30

0

30−30

0

30

−60

−30

0

30

60

−30

0

30−30

0

30

explicit Euler, h = 0.5[fs]

symplectic Euler, h = 10[fs]

total energy

Verlet, h = 40[fs]

Verlet, h = 80[fs]

total energy

explicit Euler, h = 10[fs]

symplectic Euler, h = 10[fs]

temperature

Verlet, h = 10[fs]

Verlet, h = 20[fs]

temperature

First integrals

Definition. A non-constant function I (y) is called a first integral ofy = f (y) if

I ′(y)f (y) = 0 for all y .

synonyms: invariant, conserved quantity, constant of motion

Examples of first integrals

◮ total energy H(p, q) in Hamiltonian systems

◮ total linear and angular momentum of N-body systems

H(p, q) =1

2

N∑i=1

1

mipTi pi +

N∑i=2

i−1∑j=1

Vij(rij), rij = ‖qi − qj‖

equations of motion

qi =1

mipi , pi =

N∑j=1

νij(qi − qj), νij = −V ′ij(rij)/rij

◮ linear invariants I (y) = dT y , d constant, s.t. dT f (y) = 0

Quadratic and polynomial invariants

consider

Y = A(Y )Y , A(Y ) skew symmetric for all Y

where Y is a vector or a matrix

Theorem. The quadratic function I (Y ) = Y TY is invariant. Inparticular, orthogonality of Y0 is conserved.

Lemma. Let Y , A(Y ) ∈ Rn,n. If traceA(Y ) = 0 for all Y , thendetY is an invariant.

◮ det Y represents volume of parallelepiped generated bycolumns of Y

◮ volume convervation for traceA(Y ) = 0

Page 4: Introduction to Hamiltonian systems - KIT · symplectic Euler, h = 100 StoÄrmer Verlet, h = 200 Molecular dynamics Hamiltonian H (p;q) = 1 2 XN i=1 1 m i pT ip + XN i=2 Xi¡ 1 j=1

Reversible differential equations

Definition. Let ρ be an invertible linear transformation in the phasespace of y = f (y). The differential equation and the vector fieldf (y) are called ρ-reversible if

ρf (y) = −f (ρy) for all y

u

v

−ρf (y)f (ρy)

ρ

y

ρy

f (y)

ρf (y)

u

v ϕt

ϕt

ρ ρ

y0

ρy0

y1

ρy1

Reversible vector fields – examples

◮ partitioned system

u = f (u, v), v = g(u, v)

where

f (u,−v) = −f (u, v), g(u,−v) = g(u, v)

is (ρ)-reversible for ρ(u, v) = (u,−v)

◮ second order differential equations

u = g(u) ⇐⇒ u = v , v = g(u)

are (ρ)-reversible

Do numerical methods produce a reversible numerical flow whenapplied to a reversible differential equation?

Symmetric methods

Definition. A numerical one-step method Φh is symmetric or timereversible if

Φh ◦ Φ−h = id.

y1 = Φh(y0) is symmetric if exchanging

y0 ↔ y1 and h ↔ −h

leaves the method unaltered

Examples: implicit midpoint rule, Stormer-Verlet method

Theorem. If a numerical method applied to a ρ-reversibledifferential equations satisfies

ρ ◦ Φh = Φ−h ◦ ρ

then Φh is ρ-reversible if and only if Φh is a symmetric method.