A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for...

76
Introduction Scale distribution for tsunamis The Tohoku tsunami A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St´ ephane Popinet Institut Jean le Rond ’Alembert CNRS/Universit´ e Pierre et Marie Curie Paris October 15, 2014

Transcript of A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for...

Page 1: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

A quadtree-adaptive multigrid solver for theSerre-Green-Naghdi equations

Stephane Popinet

Institut Jean le Rond ∂’AlembertCNRS/Universite Pierre et Marie Curie

Paris

October 15, 2014

Page 2: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Outline

1 Wave equations, multigrid and adaptive meshes

2 Scale distribution for tsunamis

3 The Tohoku tsunami of 11th March 2011

Page 3: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Outline

1 Wave equations, multigrid and adaptive meshes

2 Scale distribution for tsunamis

3 The Tohoku tsunami of 11th March 2011

Page 4: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: Navier–Stokes and Euler

Navier–Stokes: two-phases, incompressible, 3D

Inviscid, irrotational fluid: potential flow solution

u = ∇φ

Incompressibility∇2φ = 0

Momentum equation

∂tφ+1

2∇ · φ2 + gη = 0

Free-surface boundary condition

∂yφ = ∂tη + ∂xφ∂xη

Page 5: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: Navier–Stokes and Euler

Navier–Stokes: two-phases, incompressible, 3D

Inviscid, irrotational fluid: potential flow solution

u = ∇φ

Incompressibility∇2φ = 0

Momentum equation

∂tφ+1

2∇ · φ2 + gη = 0

Free-surface boundary condition

∂yφ = ∂tη + ∂xφ∂xη

Page 6: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: linearised approximations

ε = η/h0 << 1

Fully linearised case, µ = h20/λ

2 << 1: the ∂’Alembert waveequation (1742)

∂2φ

∂x2=∂2φ

∂t2

∂2η

∂x2=∂2η

∂t2

with unit velocity√

gh0.Short linear waves, µ = h2

0/λ2 >> 1: Airy waves (1845)

∇2φ = 0

Free-surface boundary condition

∂2φ

∂t2+∂φ

∂y= 0

This gives the dispersion relation

ω2 = gk tanh(kh0)

Page 7: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: linearised approximations

ε = η/h0 << 1Fully linearised case, µ = h2

0/λ2 << 1: the ∂’Alembert wave

equation (1742)∂2φ

∂x2=∂2φ

∂t2

∂2η

∂x2=∂2η

∂t2

with unit velocity√

gh0.

Short linear waves, µ = h20/λ

2 >> 1: Airy waves (1845)

∇2φ = 0

Free-surface boundary condition

∂2φ

∂t2+∂φ

∂y= 0

This gives the dispersion relation

ω2 = gk tanh(kh0)

Page 8: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: linearised approximations

ε = η/h0 << 1Fully linearised case, µ = h2

0/λ2 << 1: the ∂’Alembert wave

equation (1742)∂2φ

∂x2=∂2φ

∂t2

∂2η

∂x2=∂2η

∂t2

with unit velocity√

gh0.Short linear waves, µ = h2

0/λ2 >> 1: Airy waves (1845)

∇2φ = 0

Free-surface boundary condition

∂2φ

∂t2+∂φ

∂y= 0

This gives the dispersion relation

ω2 = gk tanh(kh0)

Page 9: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: non-linear waves

Long waves: η arbitrary, µ = h20/λ

2 << 1. The Saint-Venant (1871)or shallow-water equations:

∂tu + u∂xu = −g∂xη

∂tη + ∂x [(h0 + η)u] = 0

Balance between dispersion and non-linearity, the Korteweg–de Vriesequation (1895)

∂tη +3

2η∂xη +

1

6∂3x3η = 0

gives solitary waves

Dispersive corrections to shallow-water: The (weakly non-linear)Boussinesq equations (1871)

∂tu + u∂xu = −g∂xh +h2

2∂3x2tu

∂tη + ∂x(hu) =h3

6∂3x3 u

recovers KdV

Page 10: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: non-linear waves

Long waves: η arbitrary, µ = h20/λ

2 << 1. The Saint-Venant (1871)or shallow-water equations:

∂tu + u∂xu = −g∂xη

∂tη + ∂x [(h0 + η)u] = 0

Balance between dispersion and non-linearity, the Korteweg–de Vriesequation (1895)

∂tη +3

2η∂xη +

1

6∂3x3η = 0

gives solitary waves

Dispersive corrections to shallow-water: The (weakly non-linear)Boussinesq equations (1871)

∂tu + u∂xu = −g∂xh +h2

2∂3x2tu

∂tη + ∂x(hu) =h3

6∂3x3 u

recovers KdV

Page 11: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: non-linear waves

Long waves: η arbitrary, µ = h20/λ

2 << 1. The Saint-Venant (1871)or shallow-water equations:

∂tu + u∂xu = −g∂xη

∂tη + ∂x [(h0 + η)u] = 0

Balance between dispersion and non-linearity, the Korteweg–de Vriesequation (1895)

∂tη +3

2η∂xη +

1

6∂3x3η = 0

gives solitary waves

Dispersive corrections to shallow-water: The (weakly non-linear)Boussinesq equations (1871)

∂tu + u∂xu = −g∂xh +h2

2∂3x2tu

∂tη + ∂x(hu) =h3

6∂3x3 u

recovers KdV

Page 12: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Saint-Venant equations

Conservative form

∂t

∫Ω

qdΩ =

∫∂Ω

f(q) · nd∂Ω−∫

Ω

hg∇z

q =

hhuhv

, f(q) =

hu hvhu2 + 1

2gh2 huv

huv hv 2 + 12gh2

System of conservation laws (with source terms)

Analogous to the 2D compressible Euler equations (with γ = 2)

Hyperbolic → characteristic solutions

Godunov-type (colocated) 2nd-order finite-volume, shock-capturing

Wetting/drying, positivity, lake-at-rest balance: scheme of Audusseet al (2004)

Page 13: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: higher-order expansions

Start from the exact Zakharov–Craig–Sulem (1968, 1993) inviscidEuler formulation

∂tη +∇ · (hV ) = 0

∂t∇ψ +∇η +ε

2∇|∇ψ|2 − εµ∇ (−∇ · (hV ) +∇(εη) · ∇ψ)2

2(1 + ε2µ|∇η|2)= 0

Asymptotic expansion of ψ = ψ0 + µψ1 + µ2ψ2 . . .

At first-order ∇ψ = V + O(µ) → Saint-Venant

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = 0

Next order O(µ2): The Serre (1953, 1D), Green and Nagdhi (1976,2D) equations. Similar formulations rediscovered in the 1990s(Nwogu, 1993, Wei and Kirby, 1995 etc...)

Page 14: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: higher-order expansions

Start from the exact Zakharov–Craig–Sulem (1968, 1993) inviscidEuler formulation

∂tη +∇ · (hV ) = 0

∂t∇ψ +∇η +ε

2∇|∇ψ|2 − εµ∇ (−∇ · (hV ) +∇(εη) · ∇ψ)2

2(1 + ε2µ|∇η|2)= 0

Asymptotic expansion of ψ = ψ0 + µψ1 + µ2ψ2 . . .

At first-order ∇ψ = V + O(µ) → Saint-Venant

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = 0

Next order O(µ2): The Serre (1953, 1D), Green and Nagdhi (1976,2D) equations. Similar formulations rediscovered in the 1990s(Nwogu, 1993, Wei and Kirby, 1995 etc...)

Page 15: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: higher-order expansions

Start from the exact Zakharov–Craig–Sulem (1968, 1993) inviscidEuler formulation

∂tη +∇ · (hV ) = 0

∂t∇ψ +∇η +ε

2∇|∇ψ|2 − εµ∇ (−∇ · (hV ) +∇(εη) · ∇ψ)2

2(1 + ε2µ|∇η|2)= 0

Asymptotic expansion of ψ = ψ0 + µψ1 + µ2ψ2 . . .

At first-order ∇ψ = V + O(µ) → Saint-Venant

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = 0

Next order O(µ2): The Serre (1953, 1D), Green and Nagdhi (1976,2D) equations. Similar formulations rediscovered in the 1990s(Nwogu, 1993, Wei and Kirby, 1995 etc...)

Page 16: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Wave equations: higher-order expansions

Start from the exact Zakharov–Craig–Sulem (1968, 1993) inviscidEuler formulation

∂tη +∇ · (hV ) = 0

∂t∇ψ +∇η +ε

2∇|∇ψ|2 − εµ∇ (−∇ · (hV ) +∇(εη) · ∇ψ)2

2(1 + ε2µ|∇η|2)= 0

Asymptotic expansion of ψ = ψ0 + µψ1 + µ2ψ2 . . .

At first-order ∇ψ = V + O(µ) → Saint-Venant

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = 0

Next order O(µ2): The Serre (1953, 1D), Green and Nagdhi (1976,2D) equations. Similar formulations rediscovered in the 1990s(Nwogu, 1993, Wei and Kirby, 1995 etc...)

Page 17: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Serre–Green–Naghdi equations

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = D

(I + µT )(D) = µQ(V )

withT (D) = ∇(h3∇ · D) + . . .

and Q(V ) a (complicated) function of the first- and second-derivatives ofV .

No source term in the mass equation

Requires the inversion of a (spatially-coupled), time-dependent,2nd-order linear system for (vector) D

Can be recast into two scalar tridiagonal systems (only on regulargrids) but this is complicated

Page 18: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Serre–Green–Naghdi equations

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = D

(I + µT )(D) = µQ(V )

withT (D) = ∇(h3∇ · D) + . . .

and Q(V ) a (complicated) function of the first- and second-derivatives ofV .

No source term in the mass equation

Requires the inversion of a (spatially-coupled), time-dependent,2nd-order linear system for (vector) D

Can be recast into two scalar tridiagonal systems (only on regulargrids) but this is complicated

Page 19: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Serre–Green–Naghdi equations

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = D

(I + µT )(D) = µQ(V )

withT (D) = ∇(h3∇ · D) + . . .

and Q(V ) a (complicated) function of the first- and second-derivatives ofV .

No source term in the mass equation

Requires the inversion of a (spatially-coupled), time-dependent,2nd-order linear system for (vector) D

Can be recast into two scalar tridiagonal systems (only on regulargrids) but this is complicated

Page 20: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Serre–Green–Naghdi equations

∂tη +∇ · (hV ) = 0

∂tV + εV · ∇V +∇η = D

(I + µT )(D) = µQ(V )

withT (D) = ∇(h3∇ · D) + . . .

and Q(V ) a (complicated) function of the first- and second-derivatives ofV .

No source term in the mass equation

Requires the inversion of a (spatially-coupled), time-dependent,2nd-order linear system for (vector) D

Can be recast into two scalar tridiagonal systems (only on regulargrids) but this is complicated

Page 21: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Geometric multigrid

Fedorenko (1961), Brandt (1977)

Convergence acceleration technique for iterative solvers

e.g. Gauss–Seidel converges in O(λ/∆) iterations ⇒ wavelengthdecomposition of the problem on different grids

1 Given an initial guess u?

2 Compute residual on fine grid: R∆ = β − L(u?)3 Restrict residual to coarser grid: R∆ → R2∆

4 Solve on coarse grid: L(δu2∆) = R2∆

5 Prolongate the correction onto fine grid: δu2∆ → δu?∆

6 Smooth the correction (using e.g. Gauss–Seidel iterations)7 Correct the initial guess: u = u? + δu∆

Full multigrid has optimal computational cost O(N)

Similar to Fourier (frequency domain) and closely-related to waveletdecomposition of the signal

Page 22: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Unstructured statically refined mesh

Adaptive in spaceMultigrid difficult

Page 23: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Regular Cartesian grid

Not adaptiveMultigrid easy

Page 24: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Dynamic refinement using quadtrees

Adaptive in space and timeMultigrid easy (require storage on non-leaf levels)

Page 25: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

A natural multi-scale/frequency representation

⇒ Efficient multigrid solvers⇒ A large collection of other efficient “divide-and-conquer” algorithms:spatial indexing, compression etc...⇒ Formally linked to wavelets/multifractals (“multiresolution analysis”)

Page 26: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

A natural multi-scale/frequency representation

⇒ Efficient multigrid solvers⇒ A large collection of other efficient “divide-and-conquer” algorithms:spatial indexing, compression etc...⇒ Formally linked to wavelets/multifractals (“multiresolution analysis”)

Page 27: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

A natural multi-scale/frequency representation

⇒ Efficient multigrid solvers⇒ A large collection of other efficient “divide-and-conquer” algorithms:spatial indexing, compression etc...⇒ Formally linked to wavelets/multifractals (“multiresolution analysis”)

Page 28: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Why adaptivity? Scaling of solution cost

Number of degrees of freedom scales like

C ∆−4

(4 = 3 spatial dimensions + time)Moore’s law

Computing power doubles every two years

combined with the above scaling gives

Spatial resolution of e.g. climate models doublesevery eight years

Page 29: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Does this work?

10000

100000

1e+06

1e+07

1e+08

1e+09

1979 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 2012

# d

egre

es o

f fr

eedom

Year

ECMWFMetOffice

resolution doubles every 8 yearsresolution doubles every 10 years

Page 30: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Basilisk: a new quadtree-adaptive framework

Free Software (GPL): basilisk.fr

Principal objectives: Precision – Simplicity – Performance

“Generalised Cartesian grids”: Cartesian schemes are turned“seamlessly” into quadtree-adaptive schemes

Basic abstraction: operations only on local stencils

a[−1,1] a[0,1] a[1,1]

a[0,0]a[−1,0]

a[−1,−1] a[0,−1] a[1,−1]

a[1,0]

Code example: b = ∇2a

f o r e a c h ( )b [ 0 , 0 ] = ( a [ 0 , 1 ] + a [ 1 , 0 ] + a [0 ,−1] + a [−1 ,0] − 4 .∗ a [ 0 , 0 ] )

/ sq ( D e l t a ) ;

Page 31: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Restriction

vo id r e s t r i c t i o n ( s c a l a r v )

v [ ] = ( f i n e ( v , 0 , 0 ) + f i n e ( v , 1 , 0 ) + f i n e ( v , 0 , 1 ) + f i n e ( v , 1 , 1 ) ) / 4 . ;

Page 32: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Prolongation

vo id p r o l o n g a t i o n ( s c a l a r v )

/∗ b i l i n e a r i n t e r p o l a t i o n from p a r e n t ∗/v [ ] = ( 9 .∗ c o a r s e ( v , 0 , 0 ) +

3 .∗ ( c o a r s e ( v , c h i l d . x , 0 ) + c o a r s e ( v , 0 , c h i l d . y ) ) +c o a r s e ( v , c h i l d . x , c h i l d . y ) ) / 1 6 . ;

Page 33: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Boundary conditions

Guarantees stencil consistency independently of neighborhood resolution

active points

restriction

prolongation

vo id boundary ( s c a l a r v , i n t l e v e l )

f o r ( i n t l = l e v e l − 1 ; l <= 0 ; l−−)f o r e a c h l e v e l ( l )

r e s t r i c t i o n ( v ) ;f o r ( i n t l = 0 ; l <= l e v e l ; l ++)

f o r e a c h h a l o l e v e l ( l )p r o l o n g a t i o n ( v ) ;

Page 34: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Generic multigrid implementation in Basilisk

vo id m g c y c l e ( s c a l a r a , s c a l a r r e s , s c a l a r dp ,vo id (∗ r e l a x ) ( s c a l a r dp , s c a l a r r e s , i n t depth ) ,i n t n r e l a x , i n t m i n l e v e l )

/∗ r e s t r i c t r e s i d u a l ∗/f o r ( i n t l = depth ( ) − 1 ; l <= m i n l e v e l ; l−−)

f o r e a c h l e v e l ( l )r e s t r i c t i o n ( p o i n t , r e s ) ;

/∗ m u l t i g r i d t r a v e r s a l ∗/f o r ( i n t l = m i n l e v e l ; l <= depth ( ) ; l ++)

i f ( l == m i n l e v e l )/∗ i n i t i a l g u e s s on c o a r s e s t l e v e l ∗/f o r e a c h l e v e l ( l )

dp [ ] = 0 . ;e l s e

/∗ p r o l o n g a t i o n from c o a r s e r l e v e l ∗/f o r e a c h l e v e l ( l )

p r o l o n g a t i o n ( dp ) ;boundary ( dp , l ) ;/∗ r e l a x a t i o n ∗/f o r ( i n t i = 0 ; i < n r e l a x ; i ++)

r e l a x ( dp , r e s , l ) ;boundary ( dp , l ) ;

/∗ c o r r e c t i o n ∗/f o r e a c h ( )

a [ ] += dp [ ] ;

Page 35: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Application to Poisson equation ∇2a = b

The relaxation operator is simply

vo id r e l a x ( s c a l a r a , s c a l a r b , i n t l )

f o r e a c h l e v e l ( l )a [ ] = ( a [ 1 , 0 ] + a [−1 ,0] + a [ 0 , 1 ] + a [0 ,−1] − sq ( D e l t a )∗b [ ] ) / 4 . ;

The corresponding residual is

vo id r e s i d u a l ( s c a l a r a , s c a l a r b , s c a l a r r e s )

f o r e a c h ( )r e s [ ] = b [ ] − ( a [ 1 , 0 ] + a [−1 ,0] + a [ 0 , 1 ] + a [0 ,−1]

− 4 .∗ a [ ] ) / sq ( D e l t a ) ;

Page 36: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

The Serre–Green–Naghdi residual

−αd

3∂x(h3∂xDx

)+ h

[αd

(∂xη∂xzb +

h

2∂2x zb

)+ 1

]Dx+

αdh

[(h

2∂2xyzb + ∂xη∂yzb

)Dy +

h

2∂yzb∂xDy −

h2

3∂2xyDy − h∂yDy

(∂xh +

1

2∂xzb

)]= bx

vo id r e s i d u a l ( v e c t o r D, v e c t o r b , v e c t o r r e s )

f o r e a c h ( )f o r e a c h d i m e n s i o n ( )

double hc = h [ ] , dxh = dx ( h ) , dxzb = dx ( zb ) , d x e t a = dxzb + dxh ;double h l 3 = ( hc + h [ −1 , 0 ] ) / 2 . ; h l 3 = cube ( h l 3 ) ;double hr3 = ( hc + h [ 1 , 0 ] ) / 2 . ; hr3 = cube ( hr3 ) ;

r e s . x [ ] = b . x [ ] −(−a l p h a d / 3 .∗ ( hr3∗D. x [ 1 , 0 ] + h l 3∗D. x [−1 ,0] −

( hr3 + h l 3 )∗D. x [ ] ) / sq ( D e l t a ) +hc ∗( a l p h a d ∗( d x e t a∗dxzb + hc /2.∗ d2x ( zb ) ) + 1 . )∗D. x [ ] +a l p h a d∗hc ∗ ( ( hc /2 .∗ d2xy ( zb ) + d x e t a∗dy ( zb ))∗D. y [ ] +hc /2.∗ dy ( zb )∗ dx (D. y ) − sq ( hc ) / 3 .∗ d2xy (D. y )− hc∗dy (D. y )∗ ( dxh + dxzb / 2 . ) ) ) ;

Page 37: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Example of validation: wave propagation over an ellipsoidalshoal

Wave tank experiments of Berkhoff et al, Coastal Engineering, 1982Tests both non-linearities and dispersive effects

see http://basilisk.fr/src/examples/shoal.c

Page 38: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Instantaneous wave field

Page 39: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Maximum wave height

Page 40: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Comparison with experimental data

Page 41: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Outline

1 Wave equations, multigrid and adaptive meshes

2 Scale distribution for tsunamis

3 The Tohoku tsunami of 11th March 2011

Page 42: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

2004 Indian ocean tsunami

Staggered fault displacement model (5 segments)

Page 43: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

2004 Indian ocean tsunami

1 km ≤ Spatial resolution ≤ 150 km

Page 44: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Adaptivity

Truncation error of the wave height < 5 cm

Page 45: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Average number of elements as a function of maximumresolution

Page 46: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Connection with fractal dimension

Classical example: the Sierpinski triangle

has a fractal (Minkowski–Bouligand or “box-counting” or “information”)dimension of ≈ 1.6.In other words, the cost of describing such an object using quadtreeswould scale as ∆−1.6 not ∆−2.

Page 47: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of the scaling exponent with time

Mandelbrot, How long is the coast of Britain?, Science, 1967

Page 48: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of the scaling exponent with time

Mandelbrot, How long is the coast of Britain?, Science, 1967

Page 49: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of the scaling exponent with time

Mandelbrot, How long is the coast of Britain?, Science, 1967

Page 50: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of the scaling exponent with time

Mandelbrot, How long is the coast of Britain?, Science, 1967

Page 51: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Outline

1 Wave equations, multigrid and adaptive meshes

2 Scale distribution for tsunamis

3 The Tohoku tsunami of 11th March 2011

Page 52: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Tohoku tsunami: bathymetry, DART and GLOSS stations

Page 53: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Source model and pressure gauges

Source model from seismic inversion only, Shao, Li and Ji, UCSB190 Okada subfaults

Available a few days after the event (March 14th 2011)

Page 54: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of wave elevation (Saint-Venant)

dark blue: -1 metres, dark red: +2 metres

10 hours

Page 55: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of spatial resolution

dark blue: 5 levels, ≈ 2.3, yellow: 12 levels, ≈ 1 arc-minutedark red: 15 levels, ≈ 250 metres

E(h) < ε = 2.5 cm

Page 56: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Detail for the Miyagi prefecture area

220× 180 km, 1 hour after the event

Page 57: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Detail for the Miyagi prefecture area

220× 180 km, 2 hours after the event

Page 58: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Detail for the Miyagi prefecture area

220× 180 km, 4 hours after the event

Page 59: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Evolution of the number of grid points

10000

100000

1e+06

1e+07

1e+08

1e+09

1e+10

0 2 4 6 8 10

Num

ber

of grid p

oin

ts

Time (hours)

adaptive2

24

230

Single-CPU runtime ≈ 3 hours, 5× 105 updates/sec

Page 60: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Maximum elevation reached over 10 hours

Page 61: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Maximum elevation reached over 10 hours

Miyako Ofunato

Miyagi Fukushima

Page 62: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Long distance propagation: DART buoys

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

0 2 4 6 8 10

Wa

ve

he

igh

t (m

)

BuoyModel

-0.4-0.3-0.2-0.1

0 0.1 0.2 0.3 0.4 0.5 0.6

0 2 4 6 8 10

Wa

ve

he

igh

t (m

)

BuoyModel

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0 2 4 6 8 10

Wa

ve

he

igh

t (m

)

BuoyModel

Page 63: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Inshore propagation: GLOSS tide gauges

Ofunato, 99 km

-15

-10

-5

0

5

10

15

20

25

0 2 4 6 8 10

Wave h

eig

ht (m

)

StationModel

Hanasaki, 588 km

-2-1.5

-1-0.5

0 0.5

1 1.5

2 2.5

3

0 2 4 6 8 10

Wave h

eig

ht (m

)

StationModel

Wake island, 3145 km

-0.4

-0.2

0

0.2

0.4

0.6

0.8

0 2 4 6 8 10

Wave h

eig

ht (m

)

StationModel

Page 64: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Flooding: comparison with Synthetic Aperture Radar

Page 65: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Flooding: comparison with field surveys

Tohoku Earthquake Tsunami Joint Survey Group: > 5000 GPS records

Page 66: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

30 minutes after the eventColorscale ±2 metres

Page 67: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

60 minutes after the eventColorscale ±2 metres

Page 68: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

90 minutes after the eventColorscale ±2 metres

Page 69: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

120 minutes after the eventColorscale ±2 metres

Page 70: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

150 minutes after the eventColorscale ±2 metres

Page 71: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

30 minutes after the event

Page 72: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

60 minutes after the event

Page 73: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

90 minutes after the event

Page 74: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

120 minutes after the event

Page 75: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Are dispersive terms important?

Saint-Venant Serre–Green–Naghdi

150 minutes after the event

Page 76: A quadtree-adaptive multigrid solver for the Serre-Green ...A quadtree-adaptive multigrid solver for the Serre-Green-Naghdi equations St ephane Popinet Institut Jean le Rond @’Alembert

Introduction Scale distribution for tsunamis The Tohoku tsunami

Conclusions

The Serre–Green–Naghdi dispersive model can be implemented as amomentum source added to an existing Saint-Venant model

Preserves the well-balancing, positivity of water depth(wetting/drying) of the orginal scheme

Multigrid is simple and efficient for inverting the SGN operator onadaptive quadtree grids

Validation for the Tohoku tsunami using a source model obtainedonly from seismic data (Popinet, 2012, NHESS).

The effective number of degrees of freedom of the physical problemscales like

C ∆d

with d the effective (or “fractal” or “information”) dimension.

This leads to large gains in computational cost – for a given errorthreshold – for a wide range of problems (including wave dynamics).Current developments

4th-order quadtree-adaptive discretisationsMPI parallelism (dynamic load-balancing etc...)GPUs