Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce...

46
PASI Chile 2013 Basics of surface wave simulation L. Ridgway Scott Departments of Computer Science and Mathematics, Computation Institute, and Institute for Biophysical Dynamics, University of Chicago

Transcript of Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce...

Page 1: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

PASI Chile 2013

Basics of surface wavesimulation

L. Ridgway Scott

Departments of Computer Science andMathematics, Computation Institute, andInstitute for Biophysical Dynamics,

University of Chicago

Page 2: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Components of simulation technology

SIMULATION

Modeling

Math/NAO(h)

Algs & Software

O(1) O(N)

Page 3: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Queen Charlotte quake

AP: Recent earthquake in Queen Charlotte IslandsA 7.7 magnitude earthquake occurred at 8:04 pm (PST) October27, 2012 near the Queen Charlotte Islands off the west coast ofCanada, epicenter 155 kilometers (96 miles) south of Masset.

The Pacific Tsunami Warning Center announced that a tsunamiwave was headed toward Hawaii and that the first tsunami wavecould hit the islands by about 10:30 p.m. local time (1:30 am PST,5.5 hours later).

A 69-centimeter (27”) wave was recorded off Langara Island onthe northeast tip of Haida Gwaii. Another 55 centimeter (21”) wavehit Winter Harbour on the northeast coast of Vancouver Island.

The Queen Charlotte Islands are also known by their officialindigenous name of Haida Gwaii. Comprising about 150 islandslocated north of Canada’s Vancouver Island, their total populationis about 5,000 of which the Haida people make up about 45%.

Page 4: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Where is Masset

Page 5: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

How far is Hawaii?

2690 miles from Prince Rupert (YPR)

Page 6: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Where the waves were measured

Page 7: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Character of tsunamis

Conclusions drawn from the news:Tsunamis are not very big (less than ameter)

But they move very fast (close to thespeed of sound)

They can travel far (around the world)and still be a threat

But how long are the waves?A very long wave with small amplitudecan carry a great deal of energy!

Page 8: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami phases

There are three phases to tsunamis: formation, propagationand innudation:

Page 9: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami formation

Tsunami formation (generation) often caused bymovement of tectonic plates under the ocean.

A relatively small uplift displaces a huge amount of(incompressible) water.

These displacements can occur over longdistances (hundreds of miles) as the tectonicplates move like thin plates.

Such movements can cause waves that areessentially one-dimensional, propagatingperpendicular to the plate boundary.Tsunamis also can be caused by landslides.

Page 10: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami proopagation

A key challenge is understanding the transport ofenergy over long distances.

Tsunami propagation can often be modeled byone-dimensional approximations to theNavier-Stokes equations.

Waves of small amplitude with long wave-length inconstant depth can be well approximated by theKorteweg-de Vries (KdV) and related equations.

We will examine the computational challengesposed by these nonlinear, dispersive waveequations.

Page 11: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami interaction with a shoreline

Most tsunamis in modern times are small enoughnot to be a threat in open water.

When long waves experience a decrease in waterdepth, they can steepen.

Changing topography requires different modelsthat accounts for variable depth.

Water flowing over previously dry terrain presentsfurther challenges.

Flow containing debris may be nonNewtonian.

Page 12: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Terminology

Water motion is multifactorial

advection

nonlinearity

shocks

dissipation

dispersion

We will study how each of these relates tonumerical methods

Page 13: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Advection: things that move

Page 14: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Advection model equation

Simple advection relates changes in time withchanges in space:

ut + cux = 0

Solutions to this equation satisfy

u(t , x) = v(x − ct)

The proof is simple:

ux = v ′ ut = −cv ′

Things just move to the right at speed c.

Page 15: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Nonlinear advection model equation

Some physical quantities satisfy a nonlinearadvection equation:

0 = ut + f (u)x = ut + f ′(u)ux

Solutions no longer just translate to the right:

u(t , x) 6= v(x − ct)

Things move to the right at speeds (c(t , x) = f ′(u))that depend on the size of u and they can changeshape.We can see what happens computationally in thecase is f (u) = u2.

Page 16: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Finite difference approximation

We can approximate u on a grid in space and time:

u(i∆t , j∆x) ≈ ui ,j

We write

ut(i∆t , j∆x) ≈ ui ,j − ui−1,j

∆t

f (u)x(i∆t , j∆x) ≈ f (u)i ,j − f (u)i ,j−1

∆xThus we obtain an algorithm

ui+1,j = ui ,j −∆t∆x

(f (u)i ,j − f (u)i ,j−1)

Page 17: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Nonlinearity: things change shape (f (u) = u2)

Page 18: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Shock formation

In the nonlinear advection case, we see that adiscontinuity (shock) can form.But the integral of u is preserved: integrating theadvection equation in space (and integrating byparts) gives

(∫

u dx)

t=

ut dx = −∫

f (u)x dx = 0. (1)

Thus the area under the graph of u is constant,and so its amplitude must decrease.

Page 19: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Shock properties

The integral of u2 is also preserved: multiplyingthe advection equation by u and integrating inspace (and integrating by parts) gives

12

(∫

u2 dx)

t=

uut dx = −∫

f (u)xu dx

=

f (u)ux dx =

g(u)x dx = 0(2)

where g′ = f and g is an antiderivative of f withg(0) = 0.

Page 20: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Shocks: discontinuities that move

Page 21: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Shock development

Shock fronts stay sharp, but back remainscontinuous.

The amplitude has to decrease since theintegrals of u and u2 remain constant.

Over time, the wave amplitude goes tozero.

Page 22: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Long-time development of shocks

Page 23: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Linear versus nonlinear shocks

In the linear case, even discontinuoussolutions are propagated by translation:

u(t , x) = v(x − ct)

Thus the linear case is quite different fromthe nonlinear case.

Even though the exact solution is trivial,let’s see what our difference methodproduces.

Page 24: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Linear shocks: discontinuities that mush

Page 25: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Linear versus nonlinear shocks

Discontinuous solutions do propagate bytranslation:

u(t , x) ≈ v(x − ct)

but the sharp edges are smoothed off.

We see an artifact of the numerical approximation.

We did not see this with smooth solutions or evenwith discontinuous solutions for nonlinearadvection.

We need to understand what is going wrong.

Page 26: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Linear versus nonlinear shocks

linear advection: left .... nonlinear advection: right.

Suggests nonlinearity controls diffusion artifacts.

Harten advocated artificial compression [Sod78].

Page 27: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Finite difference approximation reviewed

Taylor’s approximation says

ui ,j − ui ,j−1

∆x≈ ux(i∆t , j∆x) +

∆x2

uxx(i∆t , j∆x) (3)

Thus the difference scheme is actually a betterapproximation to

ut + ux −∆x2

uxx = 0

than it is to the advection equation

ut + ux = 0

Page 28: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Numerical dissipation

The second-order derivative term in (Burger’sequation)

ut + f (u)x − ǫuxx = 0

is called a dissipation term due to the following.Multiply the equation by u, integrate in space andintegrate by parts to get

12

(∫

u2 dx)

t+ ǫ

u2x dx = 0 (4)

in view of (2).Now we see that the integral of u2 must dissipateto zero.

Page 29: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Numerical errors

It is possible to reduce numerical dissipation, butnot eliminate it [CH78].For example, the Lax-Wendroff scheme is

ui+1,j =1

k=−1

bkui ,j

where b±1 = 12α(α± 1) and b0 = 1 − α2, where

α = ∆t/∆x is the CFL number, is a betterapproximation to

ut + ux − γ∆x2uxxx = 0

Exercise: compute γ.

Page 30: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Numerical dispersion

The third-order derivative term in

ut + f (u)x − ǫuxxx = 0

is called a dispersion term.Multiply the dispersion term by u, integrate inspace and integrate by parts to get

uuxxx dx = −∫

uxuxx dx

= −∫

12((ux)

2)x dx = 0(5)

In view of (2), we conclude that the integral of u2 isconserved.

Page 31: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

KdV equation

The equation balances nonlinear advection withdispersion:

ut + 6uux + uxxx = 0 (6)

(Korteweg & de Vries 1895, Boussinesq [Bou77,p. 360]); has a family of solutions

u(t , x) =c2

sech2 (12

√c(x − ct)

)

which move at constant speed c without change ofshape.Matches observations of J. Scott Russell (1845).

Page 32: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

BBM equation

An equivalent equation that balances nonlinearadvection with dispersion is

ut + ux + 2uux − uxxt = 0 (7)

(Peregrine 1964, Benjamin, Bona and Mahoney1972) which has similar solutions [ZWG02]

u(t , x) =32

a sech2(

12

aa + 1

(

x − (1 + a)t)

)

The BBM equation is better behaved numerically.

ut = −(

1 − ddx2

)−1ddx

(

u + u2) = B(

u + u2)

(8)

Page 33: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Solitary wave exercises

The KdV and BBM equations can be compared byusing the underlying advection model ut + ux = 0.

Thus we can swap time derivatives for (minus)space derivatives: ut ≈ −ux . This suggests thenear equivalence of the terms uxxx ≈ −uxxt .

Derive the solitary wave solution for

ut + ux + 2uux + uxxx = 0 (9)

and compare this with the solitary wave for BBM

Show that the two forms converge as the waveamplitude goes to zero.

Page 34: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami controversy

Terry Tao says ”solitons are large-amplitude (and thus nonlinear)phenomena, whereas tsunami propagation (in deep water, atleast) is governed by low-amplitude (and thus essentially linear)equations. Typically, linear waves disperse due to the fact that thegroup velocity is usually sensitive to the wavelength; but in thetsunami regime, the group velocity is driven by pressure effectsthat relate to the depth of the ocean rather than the wavelength ofthe wave, and as such there is essentially no dispersion, thuscreating traveling waves that have some superficial resemblanceto solitons, but arise through a different mechanism.It is true, though, that KdV also arises from a shallow water waveapproximation. The main distinction seems to be that the shallowwater equation comes from assuming that the pressure behaveslike the hydrostatic pressure, whereas KdV arises if one assumesinstead that the velocity is irrotational (which is definitely not thecase for tsunami waves).”

Page 35: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Tsunami analysis

We know that tsunamis must have long wavelengths since their amplitude is small.

Otherwise, no devastating amount of energy(height times width) can be transmitted.

The time scale of tsunami impact is minutes, nothours as occurs in hurricane storm surge.

So the wave needs to be long and fast.

KDV/BBM provide such a mechanism.

Key question: what causes such a long wave toform?Modeling question: does KdV require flow to beirrotational?

Page 36: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Different solutions to KdV/BBM

There are many other types of solutionsto KdV/BBM.

soliton interactions

dispersion

compare: no dispersion

dispersive shock waves [EKL12]

Exercise: explore different initial states

Compare with data [Gre61].

Page 37: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Soliton interaction (BBM)

Page 38: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Multi-soliton interaction (BBM)

Page 39: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Gaussian dispersion (BBM)

Page 40: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Compare Gaussian with no dispersion

Page 41: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Leading depression

Page 42: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Trailing depression=-leading depression

Page 43: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Very long waves are mostly linear

yo = a ∗ (exp(−c ∗ (r − s)2)), a = .0001, c = .004

Page 44: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Less long waves are more dispersive

yo = a ∗ (exp(−c ∗ (r − s)2)), a = .0001, c = .01

Page 45: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

Shorter waves are very dispersive

yo = a ∗ (exp(−c ∗ (r − s)2)), a = .0001, c = .1

Page 46: Basics of surface wave simulation - Boston UniversityNumerical errors It is possible to reduce numerical dissipation, but not eliminate it [CH78]. For example, the Lax-Wendroff scheme

J.L. Bona and H. Chen, Comparison of model equations for small-amplitude long waves, Nonlinear Analysis: Theory,Methods & Applications 38 (1999), no. 5, 625–647.

J. Boussinesq, Essai sur la theorie des eaux courantes, Imprimerie nationale, 1877.

J. L. Bona, W. G. Pritchard, and L. R. Scott, An evaluation of a model equation for water waves, Philos. Trans. Roy. Soc.London Ser. A 302 (1981), 457–510.

, A comparison of solutions of two model equations for long waves, Fluid Dynamics in Astrophysics andGeophysics, N. R. Lebovitz, ed.,, vol. 20, Providence: Amer. Math. Soc., 1983, pp. 235–267.

R. C. Y. Chin and G. W. Hedstrom, A dispersion analysis for difference schemes: tables of generalized Airy functions,Mathematics of Computation 32 (1978), no. 144, 1163–1170.

GA El, VV Khodorovskii, and AM Leszczyszyn, Refraction of dispersive shock waves, Physica D: NonlinearPhenomena (2012).

R. Green, The sweep of long water waves across the pacific ocean, Australian journal of physics 14 (1961), no. 1,120–128.

Gary A Sod, A survey of several finite difference methods for systems of nonlinear hyperbolic conservation laws,Journal of Computational Physics 27 (1978), no. 1, 1 – 31.

H. Zhang, G.M. Wei, and Y.T. Gao, On the general form of the Benjamin-Bona-Mahony equation in fluid mechanics,Czechoslovak journal of physics 52 (2002), no. 3, 373–377.