Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental...

12
Henry Juang 1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007

Transcript of Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental...

Page 1: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 1

Non-iteration Semi-Lagrangian:mass conservation

Hann-Ming Henry JuangEnvironmental Modeling Center, NCEP

NOAA/NWS

April 18, 2007

Page 2: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 2

Introduction

• The new semi-Lagrangian scheme– Without iteration to find departure/mid points– Combine two 1-D interpolation/remapping– Without halo in global model– Encouraging results from regional/global tests

• The concerns– Can we have conservation?– Positive advection?

Page 3: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 3

∂ρ∂t

+∂ρu

∂x+

∂ρv

∂y= 0

∂ρ

∂t

⎝ ⎜

⎠ ⎟X −direction

+∂ρu

∂x+

∂ρ

∂t

⎝ ⎜

⎠ ⎟Y −direction

+∂ρv

∂y= 0

For mass conservation, let’s start from continuity equation

Consider 1-D and rewrite it in advection form, we have

∂ρ∂t

⎝ ⎜

⎠ ⎟X −direction

+ u∂ρ

∂x= −ρ

∂u

∂x

Advection form is for semi-Lagrangian, but it is not conserved if divergence is treated as force at mid-point,So divergence term should be treated with advection

Page 4: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 4

Divergence term in Lagrangian sense is the change of the volume if mass is conserved, so we can write divergence form as

∂u

∂x

⎝ ⎜

⎠ ⎟Lagrangian _ sense

=1

Δx

dΔx

dt

dρΔx

dt

⎝ ⎜

⎠ ⎟X −direction

= 0

∂ρΔx

∂t

⎝ ⎜

⎠ ⎟X −direction

+ u∂ρΔx

∂x= 0

Put it into the previous continuity equation, we have

which can be seen as

ρΔ x( )departure= ρΔx( )arrival

Page 5: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 5

AD M€

XD = XM −UM Δt

XA = XM + UM Δt

ρ A*n +1 = ρ D

n−1

Interpolation

remapping

ρDn−1

relocation

ρA*n +1

ρ*n +1

Instead doing following

Page 6: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 6

ALDL M

XLD = XL

M −ULM Δt

XRD = XR

M −URM Δt

ΔD = XRD − XL

D

Interpolation

ρDn−1

relocation

ρA*n +1

We do

X

DRAR

ρDn−1ΔD = ρ A

n +1ΔA

ΔD

ΔA

ML MR€

XLA = XL

M + ULM Δt

XRA = XR

M + URM Δt

ΔA = XRA − XL

A

Page 7: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 7

Since we are using cubic spline, the given value can be presented piece-wisely by

SDn−1(x)dx

DL

DR∫ = SAn +1(x)dx

AL

A R∫€

ρ =S(x)

so the previous mass equality can be replaced as following

Also we want to make sure that total mass is conserved as

SRn−1(x)dx∫ = SD

n−1(x)dx∫ = SAn +1(x)dx∫ = SR

n +1(x)dx∫

This implies that mass conservation should be used during interpolation from regular grid to departure grid and from arrival grid to regular grid.

where subscript R is regular grid D is departure grid A is arrival grid for

Page 8: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 8

Interpolation with global conservation

X iD

X i+1D€

ρ jn−1

ρ j +1n−1

ρ jn +1

ρ j +1n +1

X X XX

ρ j−1n−1

ρ j +1n−1

X X XX€

SDn−1(x)dx

X iD

X i+1D

∫ = SRn−1(x)dx

X iD

X j+1R

∫ + SRn−1(x)dx

X j+1R

X i+1D

X i+1A

X i+2A

X iA

X i−1A

X i−1D

X i+2D

X i−2D

ρ jn +1

ρ jn +1

SRn +1(x)dx

X jR

X j+1R

∫ = SAn +1(x)dx

X jR

X iA

∫ + SAn +1(x)dx

X iA

X j+1R

Page 9: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 9

Summary of the procedure

(1) Using

ρ jn−1

and cubic spline conditions, we can solve

SAn +1(x)dx

X iA

X i+1A

∫ = SDn−1(x)dx

X iD

X i+1D

= SRn−1(x)dx

X iD

X j+1R

∫ + SRn−1(x)dx

X j+1R

X i+1D

∫€

SRn−1

( )j

(2) Using semi-Lagrangian mass conserved advection as following

and cubic spline conditions at arrival points, we can solve

SAn +1

( )i

(3) Using mass conservation interpolation as following

SRn +1(x)dx

X jR

X j+1R

∫ = SAn +1(x)dx

X jR

X iA

∫ + SAn +1(x)dx

X iA

X j+1R

∫ and cubic spline conditions at regular point, we can solve

(4) With we can have

SRn +1

( )j

ρ jn +1

SRn +1

( )j

Page 10: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 10

Cubic Spline Interpolation/Remapping

Definition of piece wise cubic spline curve fitting with periodic condition

which requires 4 equations to solve all 4 unknown coefficients.

S j (x j ) = ρ j <=== given

S j (x j +1) = S j +1(x j +1)

′ S j (x j +1) = ′ S j +1(x j +1)

′ ′ S j (x j +1) = ′ ′ S j +1(x j +1)

S j (x) = a j (x − x j )3 + b j (x − x j )

2 + c j (x − x j ) + d j

In case of interpolation, such as the 4 equations are

In case of remapping, such as

the 4 equations are the same as above, except replace the first one by

SRn−1

( )j

SAn +1

( )i or

SRn +1

( )j

S j (x)dxX j

X j+1∫ = A j <=== given where

j =1,2,3,......,N

Page 11: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 11

∂q

∂t+ u

∂q

∂x+ v

∂q

∂y= 0

∂ρ

∂t+

∂ρu

∂x+

∂ρv

∂y= 0

∂ρq

∂t+

∂ρqu

∂x+

∂ρqv

∂y= 0

∂ρq

∂t+ u

∂ρq

∂x+ v

∂ρq

∂y= −ρq

∂u

∂x+

∂v

∂y

⎝ ⎜

⎠ ⎟

dρqΔ

dt= 0

dρΔ

dt= 0

How about mass conservation for tracer ?

If we use tracer and continuity equation as following together

Then density weighted tracer can be treated as conservation as

Combine it with continuity equation, we can have conserved tracer advection

Page 12: Henry Juang1 Non-iteration Semi-Lagrangian: mass conservation Hann-Ming Henry Juang Environmental Modeling Center, NCEP NOAA/NWS April 18, 2007.

Henry Juang 12

Summary• Mass conservation can be obtained

– No guess, no iteration to find departure/mid points

– No halo is required but transpose, which exists in the code already

– Cheap1-D interpolation/remapping – Local and/or global conserved

• Test simple cases with success– tracer advection and steady rotational flow