60
Energy Preserving Numerical Integration Methods Reinout Quispel Department of Mathematics and Statistics, La Trobe University Supported by Australian Research Council Professorial Fellowship Collaborators: Celledoni (Trondheim) Grimm (Erlangen) McLachlan (Massey) McLaren (La Trobe) O’Neale (La Trobe) Owren (Trondheim)

Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

Energy Preserving Numerical IntegrationMethods

Reinout Quispel

Department of Mathematics and Statistics, La Trobe UniversitySupported by Australian Research Council Professorial Fellowship

Collaborators: Celledoni (Trondheim)Grimm (Erlangen)McLachlan (Massey)McLaren (La Trobe)O’Neale (La Trobe)Owren (Trondheim)

Page 2: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Outline of the talk

Energy-preserving integrators for ODEs

Energy-preserving integrators for PDEs

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 3: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Outline of the talk

Energy-preserving integrators for ODEs

Energy-preserving integrators for PDEs

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 4: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

PART I

Energy-preserving integrators for Ordinary DifferentialEquations

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 5: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Consider a Poisson ODE:

dx

dt= S(x)∇H(x).

Here S(x) is a skew matrix, and ∇H is the gradient of theHamiltonian energy function.

Definition (Skew matrix)S(x) is skew if

(a · S(x)b) = −(b · S(x)a) ∀a, b

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 6: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Consider a Poisson ODE:

dx

dt= S(x)∇H(x).

Here S(x) is a skew matrix, and ∇H is the gradient of theHamiltonian energy function.

Definition (Skew matrix)S(x) is skew if

(a · S(x)b) = −(b · S(x)a) ∀a, b

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 7: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

ENERGY-PRESERVING DISCRETE GRADIENTMETHOD

Definition (Discrete gradient)

A discrete gradient ∇H(xn, xn+1) is defined by

(i) (xn+1 − xn) · ∇H(xn, xn+1) ≡ H(xn+1)−H(xn)

and

(ii) limxn+1→xn ∇H(xn, xn+1) = ∇H(xn)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 8: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Theorem

Let ∇H be a discrete gradient. Then the discretization

xn+1 − xn∆t

= S(xn)∇H(xn, xn+1)

is energy-preserving.

Proof.

H(xn+1)−H(xn) = ∇H(xn, xn+1) · (xn+1 − xn)

= ∆t∇H(xn, xn+1) · S(xn)∇H(xn, xn+1)

= 0

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 9: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Theorem

Let ∇H be a discrete gradient. Then the discretization

xn+1 − xn∆t

= S(xn)∇H(xn, xn+1)

is energy-preserving.

Proof.

H(xn+1)−H(xn) = ∇H(xn, xn+1) · (xn+1 − xn)

= ∆t∇H(xn, xn+1) · S(xn)∇H(xn, xn+1)

= 0

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 10: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

TWO EXAMPLES OF DISCRETE GRADIENTS

Remember (xn+1 − xn) · ∇H(xn, xn+1) ≡ H(xn+1)−H(xn)

Example 1. (Itoh-Abe discrete gradient):

∇H :=

(H(xn+1,yn)−H(xn,yn)

xn+1−xnH(xn+1,yn+1)−H(xn+1,yn)

yn+1−yn

).

(This can be generalised to any dimension)

Example 2. (“Average" discrete gradient):

∇H :=∫ 10 ∇H(ξxn+1 + (1− ξ)xn) dξ

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 11: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

TWO EXAMPLES OF DISCRETE GRADIENTS

Remember (xn+1 − xn) · ∇H(xn, xn+1) ≡ H(xn+1)−H(xn)

Example 1. (Itoh-Abe discrete gradient):

∇H :=

(H(xn+1,yn)−H(xn,yn)

xn+1−xnH(xn+1,yn+1)−H(xn+1,yn)

yn+1−yn

).

(This can be generalised to any dimension)

Example 2. (“Average" discrete gradient):

∇H :=∫ 10 ∇H(ξxn+1 + (1− ξ)xn) dξ

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 12: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Proof.

(xn+1 − xn) · ∇H =

∫ 1

0(xn+1 − xn)∇H(ξxn+1 + (1− ξ)xn) dξ

=

∫ 1

0

d

dξH(ξxn+1 + (1− ξ)xn) dξ

= H(ξxn+1 + (1− ξ)xn)∣∣∣ξ=1

ξ=0

= H(xn+1)−H(xn)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 13: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Soxn+1 − xn

∆t= S(x)

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

is an energy preserving integrator for the ODE

dx

dt= S(x)∇H(x)

From now on we take S(x) = S (constant).Then

xn+1 − xn∆t

= S

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

→ xn+1 − xn∆t

=

∫ 1

0S∇H(ξxn+1 + (1− ξ)xn) dξ

But note that S∇H is the vector field! We get:

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 14: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Soxn+1 − xn

∆t= S(x)

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

is an energy preserving integrator for the ODE

dx

dt= S(x)∇H(x)

From now on we take S(x) = S (constant).

Then

xn+1 − xn∆t

= S

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

→ xn+1 − xn∆t

=

∫ 1

0S∇H(ξxn+1 + (1− ξ)xn) dξ

But note that S∇H is the vector field! We get:

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 15: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Soxn+1 − xn

∆t= S(x)

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

is an energy preserving integrator for the ODE

dx

dt= S(x)∇H(x)

From now on we take S(x) = S (constant).Then

xn+1 − xn∆t

= S

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

→ xn+1 − xn∆t

=

∫ 1

0S∇H(ξxn+1 + (1− ξ)xn) dξ

But note that S∇H is the vector field! We get:

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 16: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Soxn+1 − xn

∆t= S(x)

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

is an energy preserving integrator for the ODE

dx

dt= S(x)∇H(x)

From now on we take S(x) = S (constant).Then

xn+1 − xn∆t

= S

∫ 1

0∇H(ξxn+1 + (1− ξ)xn) dξ

→ xn+1 − xn∆t

=

∫ 1

0S∇H(ξxn+1 + (1− ξ)xn) dξ

But note that S∇H is the vector field! We get:Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 17: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Theorem (The “average vector field method")The numerical integration method

xn+1 − xn∆t

=

∫ 1

0f(ξxn+1 + (1− ξ)xn) dξ

preserves the energy H(x) exactly for any Hamiltonian ODEwith constant symplectic structure, i.e. for

dx

dt= f(x)

withf(x) = S∇H(x)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 18: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (DOUBLE WELL POTENTIAL)

dx

dt= y

dy

dt= 2x(1− x2)

AVF integrator

1

∆t

(xn+1 − xnyn+1 − yn

)=

(12(yn+1 + yn)xn+1 + xn − 1

2(x3n + x2nxn+1 + xnx2n+1 + x3n+1)

)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 19: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (DOUBLE WELL POTENTIAL)

dx

dt= y

dy

dt= 2x(1− x2)

AVF integrator

1

∆t

(xn+1 − xnyn+1 − yn

)=

(12(yn+1 + yn)xn+1 + xn − 1

2(x3n + x2nxn+1 + xnx2n+1 + x3n+1)

)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 20: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

PART II

Energy-preserving integrators for Partial Differential Equations

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 21: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Hamiltonian PDEs

Definition

The PDE∂u

∂t= f

(u,∂u

∂x,∂2u

∂x2, . . .

)is Hamiltonian if it is of the form

f

(u,∂u

∂x,∂2u

∂x2, . . .

)= S δH

δu

where S is a constant skew operator, andδHδu

is the variationalderivative of H.

(Note: f, u, and x can also be taken to be vectors. Although uis usually real, it may also be complex).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 22: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Hamiltonian PDEs

Definition

The PDE∂u

∂t= f

(u,∂u

∂x,∂2u

∂x2, . . .

)is Hamiltonian if it is of the form

f

(u,∂u

∂x,∂2u

∂x2, . . .

)= S δH

δu

where S is a constant skew operator, andδHδu

is the variationalderivative of H.(Note: f, u, and x can also be taken to be vectors. Although uis usually real, it may also be complex).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 23: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Hamiltonian PDEsSo a Hamiltonian PDE is written

∂u

∂t= S

δHδu

Definition (Variational derivative)Let

H(u) :=

∫H

(u,∂u

∂x,∂2u

∂x2, . . .

)dx

thenδHδu

:=∂H

∂u− ∂

∂x

(∂H

∂ux

)+

∂2

∂x2

(∂H

∂uxx

)− · · ·

Definition (skew operator)S is skew if 〈a.Sb〉 = −〈b.Sa〉, ∀a, b where 〈a.c〉 :=

∫a(x)b(x)dx

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 24: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Hamiltonian PDEsSo a Hamiltonian PDE is written

∂u

∂t= S

δHδu

Definition (Variational derivative)Let

H(u) :=

∫H

(u,∂u

∂x,∂2u

∂x2, . . .

)dx

thenδHδu

:=∂H

∂u− ∂

∂x

(∂H

∂ux

)+

∂2

∂x2

(∂H

∂uxx

)− · · ·

Definition (skew operator)S is skew if 〈a.Sb〉 = −〈b.Sa〉, ∀a, b where 〈a.c〉 :=

∫a(x)b(x)dx

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 25: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Hamiltonian PDEsSo a Hamiltonian PDE is written

∂u

∂t= S

δHδu

Definition (Variational derivative)Let

H(u) :=

∫H

(u,∂u

∂x,∂2u

∂x2, . . .

)dx

thenδHδu

:=∂H

∂u− ∂

∂x

(∂H

∂ux

)+

∂2

∂x2

(∂H

∂uxx

)− · · ·

Definition (skew operator)S is skew if 〈a.Sb〉 = −〈b.Sa〉, ∀a, b where 〈a.c〉 :=

∫a(x)b(x)dx

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 26: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (1. sine-Gordon equation (a))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn − ϕn−1

∆x

)

H = ∆x∑n

[1

2π2n +

1

2(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

),∇ denotes standard gradient

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 27: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (1. sine-Gordon equation (a))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn − ϕn−1

∆x

)

H = ∆x∑n

[1

2π2n +

1

2(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

),∇ denotes standard gradient

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 28: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (1. sine-Gordon equation (a))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn − ϕn−1

∆x

)

H = ∆x∑n

[1

2π2n +

1

2(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

),∇ denotes standard gradient

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 29: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 5 10 15 20 25 308

7.999

7.998

7.997

7.996

7.995

7.994

7.993

7.992

7.991

7.99

time

Ener

gy

SG equation (B.D.), Nspace= 101, ∆t = 0.01

avf2Midpointexact

0 5 10 15 20 250

0.005

0.01

0.015

time

Glo

bal

Err

or

SG equation (B.D.), Nspace= 101, ∆t = 0.01

avf2Midpoint

Figure: sine-Gordon equation, Backward Differences for spatialdiscretizations : Energy (left) and global error (right) vs time, forAVF and implicit midpoint integrators.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 30: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (2. sine-Gordon equation (b))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn+1 − ϕn−1

2∆x

)

H = ∆x∑n

[1

2π2n +

1

8(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 31: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (2. sine-Gordon equation (b))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn+1 − ϕn−1

2∆x

)

H = ∆x∑n

[1

2π2n +

1

8(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 32: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (2. sine-Gordon equation (b))

∂2ϕ

∂t2=∂2ϕ

∂x2+ α sinϕ

Continuous:

H =

∫ [1

2π2 +

1

2

(∂ϕ

∂x

)2

+ α(1− cos(ϕ))

]dx

S =

(0 1−1 0

).

Semi-discrete(∂ϕ

∂x→ ϕn+1 − ϕn−1

2∆x

)

H = ∆x∑n

[1

2π2n +

1

8(∆x)2(ϕn − ϕn−1)2 + α (1− cos(ϕn))

]S =

(0 id−id 0

).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 33: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 5 10 15 20 25 308

7.999

7.998

7.997

7.996

7.995

7.994

7.993

7.992

7.991

7.99

time

Ener

gy

SG equation (C.D.), Nspace= 101, ∆t = 0.01

avf2Midpointexact

0 5 10 15 20 250

0.005

0.01

0.015

time

Glo

bal

Err

or

SG equation (C.D.), Nspace= 101, ∆t = 0.01

avf2Midpoint

Figure: sine-Gordon equation, Central Differences for spatialdiscretizations : Energy (left) and global error (right) vs time, forAVF and implicit midpoint integrators.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 34: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (3. Korteweg-deVries equation (a))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → u3n)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − u3n

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 35: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (3. Korteweg-deVries equation (a))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → u3n)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − u3n

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 36: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (3. Korteweg-deVries equation (a))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → u3n)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − u3n

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 37: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 0.5 1 1.5 2 2.5 3 3.5 4211.27

211.26

211.25

211.24

211.23

211.22

211.21

211.2

211.19

211.18

211.17

time

Ener

gy

KdV equation, Nspace= 401, ∆t = 0.001

avf2Midpointexact

Figure: KdV equation: Exact energy, and energy vs time given byAVF and implicit midpoint methods, using discretization (a).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 38: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (4. Korteweg-deVries equation (b))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → unun+1un+2) (for illustrative purposes only)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − unun+1un+2

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Note: Large freedom in semi-discretisation H without destroyingenergy preservation. But S must be skew!

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 39: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (4. Korteweg-deVries equation (b))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → unun+1un+2) (for illustrative purposes only)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − unun+1un+2

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Note: Large freedom in semi-discretisation H without destroyingenergy preservation. But S must be skew!

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 40: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (4. Korteweg-deVries equation (b))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → unun+1un+2) (for illustrative purposes only)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − unun+1un+2

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Note: Large freedom in semi-discretisation H without destroyingenergy preservation. But S must be skew!

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 41: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (4. Korteweg-deVries equation (b))

∂u

∂t= −6u

∂u

∂x− ∂3u

∂x3

Continuous:

H =

∫ [1

2u2x − u3

]dx

S =∂

∂x

Semi-discrete: (u3 → unun+1un+2) (for illustrative purposes only)

H = ∆x∑n

[1

2(∆x)2(un − un−1)2 − unun+1un+2

]

S =1

2∆x

0 1 . . . −1−1 0 1 0

−1 0 1...

. . .

−1 0 11 −1 0

Note: Large freedom in semi-discretisation H without destroyingenergy preservation. But S must be skew!

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 42: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 0.5 1 1.5 2 2.5 3 3.5 4207.345

207.34

207.335

207.33

207.325

time

Ener

gy

KdV equation, Nspace= 401, ∆t = 0.001

avf2Midpoint

Figure: KdV equation: Energy vs time given by AVF and implicitmidpoint methods, using discretization (b).

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 43: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (5. NLS equation)Continuous:

∂t

(uu∗

)=

(0 i−i 0

)(δHδuδHδu∗

), (1)

where u∗ denotes the complex conjugate of u.

H =

∫ [−∣∣∣∣∂u∂x

∣∣∣∣2 +γ

2|u|4]dx, (2)

S =

(0 i−i 0

). (3)

Semi-discrete:

H =∑j

[− 1

(∆x)2|uj+1 − uj |2 +

γ

2|uj |4

], (4)

S = i

(0 id−id 0

). (5)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 44: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (5. NLS equation)Continuous:

∂t

(uu∗

)=

(0 i−i 0

)(δHδuδHδu∗

), (1)

where u∗ denotes the complex conjugate of u.

H =

∫ [−∣∣∣∣∂u∂x

∣∣∣∣2 +γ

2|u|4]dx, (2)

S =

(0 i−i 0

). (3)

Semi-discrete:

H =∑j

[− 1

(∆x)2|uj+1 − uj |2 +

γ

2|uj |4

], (4)

S = i

(0 id−id 0

). (5)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 45: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 10 20 30 40 50−2

0

2

4

6

8

10

12

14

16x 10

−6

time

Energ

yE

rror

NLS equation, Nspace= 201, Δt = 0.05

avf2Midpoint

0 10 20 30 40 5010

−5

10−4

10−3

10−2

10−1

time

Glo

bal

Err

or

NLS equation, Nspace= 201, Δt = 0.05

avf2Midpoint

Figure: Nonlinear Schrödinger equation: Energy error (left) andglobal error (right) vs time, for AVF and implicit midpointintegrators.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 46: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 10 20 30 40 50−2

0

2

4

6

8

10

12

14x 10

−6

time

Pro

babil

ity

Err

or

NLS equation, Nspace= 201, Δt = 0.05

avf2Midpt

Figure: Nonlinear Schrödinger equation: Total probability error vstime, for AVF and implicit midpoint integrators.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 47: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (6. Nonlinear Wave Equation)

∂2ϕ

∂t2= (∂2x + ∂2y)ϕ− ϕ3

Continuous:

H =

∫ 1

−1

∫ 1

−1

[1

2(π2 + ϕ2

x + ϕ2y) +

1

4ϕ4

]dx dy

S =

(0 1−1 0

)

Semi-discrete: We discretize the Hamiltonian in space with a tensorproduct Lagrange quadrature formula based on p+ 1Gauss-Lobatto-Legendre (GLL) quadrature nodes in each spacedirection:

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 48: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Example (6. Nonlinear Wave Equation)

∂2ϕ

∂t2= (∂2x + ∂2y)ϕ− ϕ3

Continuous:

H =

∫ 1

−1

∫ 1

−1

[1

2(π2 + ϕ2

x + ϕ2y) +

1

4ϕ4

]dx dy

S =

(0 1−1 0

)Semi-discrete: We discretize the Hamiltonian in space with a tensorproduct Lagrange quadrature formula based on p+ 1Gauss-Lobatto-Legendre (GLL) quadrature nodes in each spacedirection:

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 49: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Nonlinear Wave Equation II

H =1

2

p∑j1=0

p∑j2=0

wj1wj2

(π2j1,j2 +

(p∑

k=0

dj1,kϕk,j2

)2

+

(p∑

m=0

dj2,mϕj1,m

)2

+1

2ϕ4j1,j2

)

where dj1,k = dlk(x)dx

∣∣∣x=xj1

, and lk(x) is the k-th Lagrange basis

function based on the GLL quadrature nodes x0, . . . , xp, and withw0, . . . , wp the corresponding quadrature weights.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 50: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

T = 0 T = 3.1250

−1−0.5

00.5

1

−1−0.5

00.5

1−5

0

5

10

15

20x 10−3

−1−0.5

00.5

1

−1−0.5

00.5

1−5

0

5

10

15x 10−3

T = 6.875 T = 10

−1−0.5

00.5

1

−1−0.5

00.5

1−2

0

2

4

6

8x 10−3

−1−0.5

00.5

1

−1−0.5

00.5

1−5

0

5

10

15

20x 10−3

Figure: Snapshots of the solution of the 2D wave equation at differenttimes. AVF method with step-size ∆t = 0.6250. Space discretizationwith 6 Gauss Lobatto nodes in each space direction. Numericalsolution interpolated on a equidistant grid of 21 nodes in each spacedirection.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 51: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

0 2 4 6 8 10

−3

−2.5

−2

−1.5

−1

−0.5

0

0.5 x 10−11

time

Ener

gy e

rror

2D Wave equation avf and ode15s

Figure: The 2D wave equation. MATLAB routine ode15s withabsolute and relative tolerance 10−14 (dashed line), and AVF methodwith step size ∆t = 10/(25) (solid line). Energy error versus time.Time interval [0, 10]. Space discretization with 6 Gauss Lobatto nodesin each space direction.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 52: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Leapfrog

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 53: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Exponential Integrator

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 54: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• Instead of using finite differences for the (semi-)discretization ofthe spatial derivatives one may use e.g. a spectral discretization.

• The method presented also applies to linear PDEs, e.g. the(Linear) Time-dependent Schrödinger equation, 3D Maxwell’sequation.

• The method presented can be generalised to

∂u

∂t= N δH

δu

where N is a constant negative (semi) definite operator, and whereH is a Lyapunov function, i.e. ∂H

∂t ≤ 0.(e.g. Allen-Cahn eq, Cahn-Hilliard eq, Ginzburg-Landau eq.)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 55: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• Instead of using finite differences for the (semi-)discretization ofthe spatial derivatives one may use e.g. a spectral discretization.

• The method presented also applies to linear PDEs, e.g. the(Linear) Time-dependent Schrödinger equation, 3D Maxwell’sequation.

• The method presented can be generalised to

∂u

∂t= N δH

δu

where N is a constant negative (semi) definite operator, and whereH is a Lyapunov function, i.e. ∂H

∂t ≤ 0.(e.g. Allen-Cahn eq, Cahn-Hilliard eq, Ginzburg-Landau eq.)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 56: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• Instead of using finite differences for the (semi-)discretization ofthe spatial derivatives one may use e.g. a spectral discretization.

• The method presented also applies to linear PDEs, e.g. the(Linear) Time-dependent Schrödinger equation, 3D Maxwell’sequation.

• The method presented can be generalised to

∂u

∂t= N δH

δu

where N is a constant negative (semi) definite operator, and whereH is a Lyapunov function, i.e. ∂H

∂t ≤ 0.(e.g. Allen-Cahn eq, Cahn-Hilliard eq, Ginzburg-Landau eq.)

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 57: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• The method can also be generalised to preserving any number ofintegrals (not necessarily energy).

• If one replaces the integral in the Average Vector Field byquadrature of a certain order, the resulting method will preserveenergy to a certain order.

• The Average Vector Field Method is a B-series method.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 58: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• The method can also be generalised to preserving any number ofintegrals (not necessarily energy).

• If one replaces the integral in the Average Vector Field byquadrature of a certain order, the resulting method will preserveenergy to a certain order.

• The Average Vector Field Method is a B-series method.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 59: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

GENERALIZATIONS AND FURTHER REMARKS• The method can also be generalised to preserving any number ofintegrals (not necessarily energy).

• If one replaces the integral in the Average Vector Field byquadrature of a certain order, the resulting method will preserveenergy to a certain order.

• The Average Vector Field Method is a B-series method.

Reinout QuispelEnergy Preserving Numerical Integration Methods

Page 60: Energy Preserving Numerical Integration Methods · 2010. 9. 24. · Reinout Quispel Energy Preserving Numerical Integration Methods. PART I PART II Example(DOUBLEWELLPOTENTIAL) dx

PART I PART II

Some references to our workODEs1. McLachlan, Quispel & Robidoux, A unified approach to Hamiltoniansystems, Poisson systems, gradient systems and systems with Lyapunovfunctions and/or first integrals, Phys. Rev. Lett. 81(1998)2399–2103.2. McLachlan, Quispel & Robidoux, Geometric integration usingdiscrete gradients, Phil. Trans. Roy. Soc. A357(1999)1021–1045.3. Quispel & McLaren, A new class of energy-preserving numericalintegration methods, J. Phys A41(2008)045206 (7pp).

PDEs4. Celledoni, Grimm, McLachlan, McLaren, O’Neale & Quispel,Preserving energy resp. dissipation in numerical PDEs, using the‘Average Vector Field’ method, Submitted for publication.

Of course there are also many important publications byFurihata, Matsuo, Yaguchi, and collaborators.

Reinout QuispelEnergy Preserving Numerical Integration Methods