3.3.3: semi-lagrangian schemes - umd

16
3.3.3: Semi-Lagrangian schemes AOSC614 class Hong Li

Upload: others

Post on 02-Nov-2021

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3.3.3: Semi-Lagrangian schemes - UMD

3.3.3: Semi-Lagrangian schemes

AOSC614 class

Hong Li

Page 2: 3.3.3: Semi-Lagrangian schemes - UMD

Truly Lagrangian scheme:

Following an individual parcel, the total derivative (also known as individual,

substantial or Lagrangian time derivative) is conserved for a parcel, except

for the changes introduced by the source or sink S.

No grid points, No spatial discretization, no stability problem.

However, It is not practical in general because one has to keep track ofmany individual parcels, and with time they may “bunch up” in certain areasof the fluid, and leave others without parcels to track.

( )du S udt

=

The semi-Lagrangian scheme keeps theadvantage of stability and avoids thedisadvantage of parcels bunching up

Page 3: 3.3.3: Semi-Lagrangian schemes - UMD

Semi-Lagrangian scheme(1):

1) Using regular grid as in Eulerian coordinate, but estimate the total

derivative.

2) At every new time step we find out where the parcel arriving at a grid

point (denoted arrival point or AP) came from in the previous time step

(denoted departure point or DP).

( )du S udt

=

AP

Page 4: 3.3.3: Semi-Lagrangian schemes - UMD

Semi-Lagrangian scheme:

In a two-time level scheme it could be written as

Compare with Eulerian scheme:

No extrapolation, the semi-Lagrangian scheme is absolutely stable with

respect to advection.

However, how do we know the location of the departure point DP ?

)(uSxu

utu +

!!"=

!!

1 1( ) ( ) [ ( ) ( ) ]2

n n n nj AP DP DP j AP

tU U S U S U+ +!= + +

)()(1

nj

njx

nj

nj

nj USUUtUU

+=!"+

#

( )du S udt

=

AP

Page 5: 3.3.3: Semi-Lagrangian schemes - UMD

Semi-Lagrangian scheme(3):

The departure point DP has to be determined from the trajectory integrated

between the departure and the arrival points, for example as

However, UAP and UDP are not known until the departure point has been

determined, Therefore, it is an implicit equation that needs to be solved

iteratively.

The accuracy of the SL scheme depends on the accuracy of the

determination of the DP, and on the determination of the value of UDP and

the other conserved quantities by interpolation from the neighboring points.

( )du S udt

=

x xtU UDP AP DP AP= ! +"

2( )

AP

Page 6: 3.3.3: Semi-Lagrangian schemes - UMD

3.3.4 Nonlinear computationalinstability. Quadratically

conservative schemes. TheArakawa Jacobian

AOSC614 class

Page 7: 3.3.3: Semi-Lagrangian schemes - UMD

Phillips (1957) quasi-geostrophic 2-level channel model

• In 1957 Phillips published the first "climate" or "generalcirculation" simulation ever made with a numerical modelof the atmosphere.

• He obtained very realistic solutions that contributedsignificantly to the understanding of the atmosphericcirculation in mid-latitudes.

• However, his climate simulation only lasted for about 16days: the model "blew up" despite the fact that care hadbeen taken to satisfy the von Neumann criterion forlinear computational instability.

Page 8: 3.3.3: Semi-Lagrangian schemes - UMD

π π+δ

π-δ

0 p

In 1959, Phillips pointed out that this instability, which henamed nonlinear computational instability (NCI), wasassociated with nonlinear terms in the quasi-geostrophicequations

The shortest wave can be presented in the grid has the wavelength 2Δx and computational wavenumber

Quadratic terms with Fourier components will generate higher wave numbers:

The new shorter waves, with wave numbers p=π+δ, cannot be representedin the grid, and become folded back (aliased) into p'=π-δ , leading to aspurious accumulation of energy at the shortest range

pL

xmaxmin

= =2! !"

1 2 1 2( )ip ip i p pe e e± ± ± ±=

Page 9: 3.3.3: Semi-Lagrangian schemes - UMD

An example of NCI effect

• We have PDE:

and its corresponding FDE:

Suppose at a given time t, we have:

!!

!!

ut

uux

= "

!!Ut

UU U

xj

jj j= "

"+ "1 1

2#

U1=0, U2>0, U3<0, U4=0.

Then

!!

!!

!!

!!

Ut

Ut

Ut

Ut

1 2 3 40 0 0 0= > < =, , ,

U2 and U3 will grow withoutbound and the FDE will blow up

this will happen even for a linearmodel

1 1

2j j j

j

U U Ua

t x!!

+ ""= "

#

Page 10: 3.3.3: Semi-Lagrangian schemes - UMD

Approaches for dealing with NCI problem:A) Filtering out high wavenumbers

1. Chop the high wavenumbers (wavenumbers between π/2 ~π), Phillips (1959)

2Δx, pmax= π

4Δx, pmax= π/2

Originally, the Fourier transform wavenumber is (0~π), therefore the maxwave number generated in a quadraticterm can be pmax’=2π which can not bepresented in the grid.

If chop half of the spectrum, theremained wave number is (0~π/2), themax wave number generated in aquadratic term is pmax’=π which is stillcan be presented in the grid

P=kΔx=(L/2π) Δx,

However the procedure is rather inefficient,since half of the spectrum is not used.

1 2 1 2( )ip ip i p pe e e± ± ± ±=

Page 11: 3.3.3: Semi-Lagrangian schemes - UMD

Approaches for dealing with NCI problem:A) Filtering out high wavenumbers

However, for grid point models, experience shows thatcomplete Fourier filtering of the high wave numbers is notnecessary. Some models filter high wave numbers but onlyenough to maintain computational stability.

For example, Shapiro filter

4/)2(

])(1[

11

2

!+ +!=

!!=

jjjj

jnn

j

UUUDUUDU

“diffusion” operator is applied to the original field n times. Thisefficiently filtered out the shortest waves (mostly between 2 and3Δx) without affecting waves of wavelength 4Δx or longer, andresulted in an accurate and economic model

Page 12: 3.3.3: Semi-Lagrangian schemes - UMD

Approaches for dealing with NCI problem:A) Filtering out high wavenumbers

For spectral model, Orszag (1971) showed when transformed originalspectrum back into grid points, if we use a grid with 3/2 as many gridpoints as the original grid, then the aliasing is avoided.

Original Pmax= π, and the new Pmax’ froma quadratic product is 2π

1) If we do not filter high waveumbers,the grids can not handle thewavenumbers > π, all the wavesabove p= π are folded back.

Lmin=2Δx, pmax= π

1 2 3 4 5

Lmin=4/3Δx, pmax= 3/2π

3π/2

0p

Zp

π

2) If we filter above P=3/2 π,only the waves aboveP=3/2 π are folded back at3/2 π, and 2 π gets foldedback to π: no spuriousalias below π

π ππ-

0 p0 π p

0 π 3/2π 2π p

Page 13: 3.3.3: Semi-Lagrangian schemes - UMD

Approaches for dealing with NCI problem:B) Using quadratically conserving schemes

Lilly (1965) showed that it is possible tocreate a spatial finite difference schemethat conserves both the mean value and itsmean square value when integrated over aclosed domain.

Quadratic conservation will generally insure thatNCI does not take place.

The rule is that We write the forecast equation for A

consistently with the continuity equation We estimate A at the walls of each cell as a

simple average with the neighboring cell For example, if the flow is nondivergent

0,

=!! "

jiA

t

02

,=

!! "

jiA

t

AijAi!1 j Ai+1 j

Aij!1

Aij+1

ui+1/2 jui!1/2 j

vij+1/2

vij!1/2

ui+1/2 j ! ui!1/2 j"x

+vi!1/2 j ! vi!1/2 j

"y= 0

!Aij!t

= "ui+1/2 j (Aij + Ai+1 j ) " ui"1/2 j (Aij + Ai"1 j )

2#x"vi+1/2 j (Aij + Aij+1) " vi"1/2 j (Aij + Aij"1)

2#y

ThenAi, j

!!tAi, j = 0

i, j" because the fluxes at the walls cancel out: what leaves one cell

enters the neighboring cell. Exercise: prove quadratic conservation

Page 14: 3.3.3: Semi-Lagrangian schemes - UMD

Let’s start from SWE:

02

2

=!!"" dxdyht

#

0=!+"" vhth

0=!+"" ## vhth

h

α

!!t

hdxdy = 0""The total mass isconserved in time

The mass weighted mean of α isconserved

The mass weighted mean squared of α is conserved

For PDE in flux form:

0

0

=!+""=!+!+

""

=!+""

vvv

v

hthhh

tht

##

0=!!"" dxdyht

#

! "

!" !

!" !"

!" !

!" ! "

!

( )h

thth

tht

ht

2

2 22

2 2= + = # +

Page 15: 3.3.3: Semi-Lagrangian schemes - UMD

For FDE in flux form:

And if we use

!!ht

hu hux

hv hvy

ij i j i j i j i j+"

+"

=+ " + "( ) ( ) ( ) ( )/ , / , , / , /1 2 1 2 1 2 1 2 0# #

!!t

h x yi j i j i ji j

, , ,,

" " =# 0

, 1/ 2, 1/ 2, 1/ 2, 1/ 2,

, 1/ 2 , 1/ 2 , 1/ 2 , 1/ 2

( ) ( ) ( ) ( )

( ) ( ) ( ) ( )0

ij i j i j i j i j i j

i j i j i j i j

h hu hut xhv hv

y

! " " "!

" "

+ + # #

+ + # #

#+

$#

+ =$

!!

"t

h x yi j i j i j i ji j

, , , ,,

# # =$ 0

( ) ( ) // , , ,! ! !i j i j i j+ += +1 2 1 2

Because! "

!" !

!" !"

!" !

!" ! "

!

( )h

thth

tht

ht

2

2 22

2 2= + = # +

!!

"t

h x yi j i j i j i ji j

, , , ,,

12

02# # =$

We have quadratic conservation, and we couldchoose several FD formulations as long as,

1. the flux form of the FDE for hα is consistentwith the continuity equation

2. we estimate α at the walls by a simple average

(hv)i,j+1/2

(hu)i-1/2,j

(hv)i,j-1/2

(hu)i+1/2,jhijαi,j

Page 16: 3.3.3: Semi-Lagrangian schemes - UMD

Finally consider the vorticity equation

)( !!! vv •"#=#•"=$$t

Its PDE in flux form:

If we write its FDE in a way consistent withthe continuity equation:

!"!

" " " "

" " " "

i j i j i j i j i j i j i j

i j i j i j i j i j i j

tu u

xv v

y

, / , , , / , , ,

, / , , , / , ,

( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

= #+ # +

#+ # +

+ + # #

+ + # #

1 2 1 1 2 1

1 2 1 1 2 1

2

2

$

$

This ensures conservation of the mean vorticity and enstrophy (mean square vorticity). Steps for time integration:1. Integrate vorticity equation from to time step2. Calculate streamfunction at t from (an elliptic equation)3. Average to get streamfunction at corners4. Calculate u,v at time step t from5. Forecast vorticity at next time step

! = "2#

u = !"#"y; v ==

"#"x

tn!1 tn

tn+1