Solution of the St Venant Equations / Shallow-Water equations of open channel flow

Post on 03-Jan-2016

74 views 6 download

description

Solution of the St Venant Equations / Shallow-Water equations of open channel flow. Dr Andrew Sleigh School of Civil Engineering University of Leeds, UK www.efm.leeds.ac.uk/CIVE/UChile. Shock Capturing Methods. Ability to examine extreme flows Changes between sub / super critical - PowerPoint PPT Presentation

transcript

Solution of the St Venant Equations / Shallow-Water equations of open channel flow

Dr Andrew SleighSchool of Civil EngineeringUniversity of Leeds, UK

www.efm.leeds.ac.uk/CIVE/UChile

Shock Capturing Methods

Ability to examine extreme flows Changes between sub / super critical

Other techniques have trouble with trans-critical Steep wave front Front speed

Complex Wave interactions Alternative – shock fitting Good, but not as flexible

More recent

Developed from work on Euler equations in the aero-space where shock capturing is very important (and funding available)

1990s onwards Euler equations / Numerical schemes:

Roe, Osher, van Leer, LeVeque, Harten, Toro Shallow water equations

Toro, Garcia-Navarro, Alcrudo, Zhao

Books

E.F. Toro. Riemann Solvers and Numerical Methods for Fluid Dynamics. Springer Verlag (2nd Ed.) 1999.

E.F. Toro. Shock-Capturing Methods for Free-Surface Flows. Wiley (2001)

E.F. Toro. Riemann Problems and the WAF Method for Solving Two-Dimensional Shallow Water Equations. Philosophical Transactions of the Royal Society of London. A338:43-68 1992.

Dam break problem

The dam break problem can be solved

It is in fact integral to the solution technique

Conservative Equations

As earlier, but use U for vector

USUFU xt

Q

AU

1

2

gIA

QQ

UF

fo SSgAgI

US2

0

I1 and I2

Trapezoidal channel Base width B, Side slope SL= Y/Z

Rectangular, SL = 0

Source term

322

1LS

hB

hI

dx

dSh

dx

dBhI L

32

122

B

ABhI

22

22

1 dx

dB

B

AI

2

2

2 2

)3/4(2

2

RA

nQQS f

Rectangular Prismatic

Easily extendible to 2-d

Integrate over control volume V

hu

hU

22

2

1ghhu

huUF

fo SSgh

US0

dUUSdtUFdxUVV

2-dimensions

In 2-d have extra term:

friction

USUGUFU yxt

hv

hu

h

U

huv

ghhu

hu

UF 22

2

1

22

2

1ghhv

huv

hu

UG

yy

xx

fo

fo

SSgh

SSghUS

0

22)3/1(

2

vuuh

nS

xf

Normal Form

Consider the control volume V, border Ω

dUUSdUHdVUt VV

n x

V

n x

n x

V

UGnUFnUGUFUH 21sincos

Rotation matrix

H(U) can be expressed

UFUGnUFnUH TT 121

cossin0

sincos0

001

T

cossin0

sincos0

0011T

vh

uh

h

U

ˆ

ˆT

Finite volume formulation

Consider the homogeneous form i.e. without source terms

And the rectangular control volume in x-t space

0V

dtUFdxU

xi-1/2 xi+1/2

tn+1

i

Fi-1/2Fi+1/2

x

t

xi-1/2 xi+1/2

tn+1

i

Fi-1/2Fi+1/2

x

t

Finite Volume Formulation

The volume is bounded by xi+1/2 and xi-1/2 tn+1 and tn

The integral becomes

dttxUFdttxUFdxtxUdxtxU

n

n

n

n

i

i

i

i

t

t i

t

t i

x

x n

x

x n

112/1

2/1

2/1

2/1

,,,, 2/12/11

Finite Volume Formulation

We define the integral averages

And the finite volume formulation becomes

dxtxUx

Ui

i

x

x nni

2/1

2/1

,1 dxtxU

xU

i

i

x

x nni

2/1

2/11

1 ,1

dttxUFt

Fn

n

t

t ii

1

,1

2/12/1 dttxUFt

Fn

n

t

t ii

1

,1

2/12/1

2/12/11

iini

ni FF

x

tUU

Finite Volume Formulation

Up to now there has been no approximation

The solution now depends on how we interpret the integral averages

In particular the inter-cell fluxes Fi+1/2 and F1-1/2

Finite Volume in 2-D

The 2-d integral equation is

H(u) is a function normal to the volume

dUUSdUHdVUt VV

dUGnUFndUHFs

s

s

ss

A

A

A

An

11

21

Finite Volume in 2-D

Using the integral average

Where |V| is the volume (area) of the volume then

dVUV

UV

i 1

N

ss

ni

ni Fn

V

tUU

1

1FnFn

Finite Volume in 2-D

If the nodes and sides are labelled as :

Where Fns1 is normal flux for side 1 etc.

A1

A3

A2

A4

V

L4L3

L2

L1

A1

A3

A2

A4

V

L4L3

L2

L1

443322111 LFnLFnLFnLFn

V

tUU ssss

ni

ni

FV 2-D Rectangular Grid

For this grid

Solution reduces to

Fi-1/2Fi+1/2

x

y

Gj-1/2

Gj+1/2

i+1/2,j-1/2

i-1/2,j+1/2

i-1/2,j-1/2

i+1/2,j+1/2

i, jFi-1/2

Fi+1/2

x

y

Gj-1/2

Gj+1/2

i+1/2,j-1/2

i-1/2,j+1/2

i-1/2,j-1/2

i+1/2,j+1/2

i, j

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

jijijijini

ni GG

y

tFF

x

tUU

Flux Calculation

We need now to define the flux Many flux definitions could be used to that

satisfy the FV formulation

We will use Godunov flux (or Upwind flux)

Uses information from the wave structure of equations.

Godunov method Assume piecewise linear data states

Means that the flux calc is solution of local Riemann problem

n

n+1

i-1 i i-1

Fi+1/2Fi-1/2Cells

Data states

n+1

n

U(0)i+1/2U(0)i-1/2

n

n+1

i-1 i i-1

Fi+1/2Fi-1/2Cells

Data states

n+1

n

U(0)i+1/2U(0)i-1/2

Riemann Problem

The Riemann problem is a initial value problem defined by

Solve this to get the flux (at xi+1/2)

0 xt UFU

2/11

2/1,i

ni

ini

nxxifU

xxifUtxU

FV solution

We have now defined the integral averages of the FV formulation

The solution is fully defined First order in space and time

2/12/11

iini

ni FF

x

tUU

Dam Break Problem

The Riemann problem we have defined is a generalisation of the Dam Break Problem

Dam wall

Deep water at rest

Shallow water at rest

Dam wall

Deep water at rest

Shallow water at rest

Dam Break Solution Evolution of solution

Wave structure

x

x

x

Water levels at time t=t*

t*t

Velocity at time t=t*

v

h

Shock

Rarefaction

xx

xx

xx

Water levels at time t=t*

t*t

Velocity at time t=t*

v

h

Shock

Rarefaction

Exact Solution

Toro (1992) demonstrated an exact solution

Considering all possible wave structures a single non-linear algebraic equation gives solution.

Exact Solution

Consider the local Riemann problem

Wave structure

0 xt UFU

0

00,

xifU

xifUxU

R

L

x

t

Right wave, (u+c)Left wave (u-c)

Star region, h*, u*

(u)

vL

tShear wave

vR

hL, uL, vL hR, uR, vR

0xx

t

Right wave, (u+c)Left wave (u-c)

Star region, h*, u*

(u)

vL

tShear wave

vR

hL, uL, vL hR, uR, vR

0

hv

hu

h

U

huv

ghhu

hu

UF 22

2

1

PossibleWave structures

x

tRight Shock

Left Rarefaction Shear wave

x

t

Left Shock Right RarefactionShear wave

x

t

Right RarefacationLeft Rarefaction

Shear wave

x

t

Right ShockLeft Shock

Shear wave

xx

tRight Shock

Left Rarefaction Shear wave

xx

t

Left Shock Right RarefactionShear wave

xx

t

Right RarefacationLeft Rarefaction

Shear wave

xx

t

Right ShockLeft Shock

Shear wave

Across left and right wave h, u change v is constant

Across shear wave v changes, h, u constant

Determine which wave

Which wave is present is determined by the change in data states thus:

h* > hL left wave is a shock h* ≤ hL left wave is a rarefaction

h* > hR right wave is a shock h* ≤ hR right wave is a rarefaction

Solution Procedure

Construct this equation

And solve iteratively for h (=h*). The functions may change each iteration

uhhfhhfhf LLLL ,,

f(h) The function f(h) is defined

And u*

uhhfhhfhf LLLL ,,

)(2

1

)(2

shockhhifhh

hhghh

nrarefactiohhifghgh

fL

L

LL

LL

L

)(2

1

)(2

shockhhifhh

hhghh

nrarefactiohhifghgh

fR

R

RR

RR

R

LR uuu

LLRRRL hhfhhfuuu ,,2

1

2

1 ***

Iterative solution

The function is well behaved and solution by Newton-Raphson is fast (2 or 3 iterations)

One problem – if negative depth calculated! This is a dry-bed problem. Check with depth positivity condition:

RLLR ccuuu 2

Dry–Bed solution

Dry bed on one side of the Riemann problem

Dry bed evolves Wave structure is

different.

x

t

x

t

x

t

Wet bed

Dry bed

Wet bed

Wet bed

Wet bed

Dry bed

Dry bed

xx

t

xx

t

xx

t

Wet bed

Dry bed

Wet bed

Wet bed

Wet bed

Dry bed

Dry bed

Dry-Bed Solution

Solutions are explicit Need to identify which applies – (simple to do)

Dry bed to right

Dry bed to left

Dry bed evolves h* = 0 and u* = 0 Fails depth positivity test

LL cuc 23

1* LL cuu 2

3

1*

RR cuc 23

1* RR cuu 2

3

1*

gch /2**

Shear wave

The solution for the shear wave is straight forward. If vL > 0 v* = vL

Else v* = vR

Can now calculate inter-cell flux from h*, u* and v* For any initial conditions

Complete Solution

The h*, u* and v* are sufficient for the Flux But can use solution further to develop exact

solution at any time. i.e. Can provide a set of benchmark solution

Useful for testing numerical solutions.

Choose some difficult problems and test your numerical code again exact solution

Complete Solution

x

x

x

Water levels at time t=t*

t*t

Velocity at time t=t*

v

h

Shock

Rarefaction

xx

xx

xx

Water levels at time t=t*

t*t

Velocity at time t=t*

v

h

Shock

Rarefaction

Difficult Test Problems

Toro suggested 5 testsTest No. hL (m) uL (m/s) hR (m) uR (m/s)

1 1.0 2.5 0.1 0.0

2 1.0 -5.0 1.0 5.0

3 1.0 0.0 0.0 0.0

4 0.0 0.0 1.0 0.0

5 0.1 -3.0 0.1 3.0

Test 1: Left critical rarefaction and right shockTest 2: Two rarefactions and nearly dry bedTest 3: Right dry bed problemTest 4: Left dry bed problemTest 5: Evolution of a dry bed

Exact Solution

Consider the local Riemann problem

Wave structure

0 xt UFU

0

00,

xifU

xifUxU

R

L

x

t

Right wave, (u+c)Left wave (u-c)

Star region, h*, u*

(u)

vL

tShear wave

vR

hL, uL, vL hR, uR, vR

0xx

t

Right wave, (u+c)Left wave (u-c)

Star region, h*, u*

(u)

vL

tShear wave

vR

hL, uL, vL hR, uR, vR

0

hv

hu

h

U

huv

ghhu

hu

UF 22

2

1

Returning to the Exact Solution We will see some other Riemann solvers that

use the wave speeds necessary for the exact solution.

Return to this to see where there come from

PossibleWave structures

x

tRight Shock

Left Rarefaction Shear wave

x

t

Left Shock Right RarefactionShear wave

x

t

Right RarefacationLeft Rarefaction

Shear wave

x

t

Right ShockLeft Shock

Shear wave

xx

tRight Shock

Left Rarefaction Shear wave

xx

t

Left Shock Right RarefactionShear wave

xx

t

Right RarefacationLeft Rarefaction

Shear wave

xx

t

Right ShockLeft Shock

Shear wave

Across left and right wave h, u change v is constant

Across shear wave v changes, h, u constant

Conditions across each wave

Left Rarefaction wave

Smooth change as move in x-direction Bounded by two (backward) characteristics Discontinuity at edges

Left bounding characteristic

x

t

hL, uL h*, u*

Right bounding characteristic

t

LL cudtdx /**/ cudtdx

Crossing the rarefaction

We cross on a forward characteristic

States are linked by:

or

constant2 cu

** 22 cucu LL

** 2 ccuu LL

Solution inside the left rarefaction The backward characteristic equation is For any line in the direction of the rarefaction

Crossing this the following applies:

Solving gives

On the t axis dx/dt = 0

cucu LL 22

cudt

dx

dt

dxcuc LL 2

3

1

dt

dxcuu LL 2

3

1

LL cuc 23

1 LL cuu 2

3

1

Right rarefaction

Bounded by forward characteristics Cross it on a backward characteristic

In rarefaction

If Rarefaction crosses axis

RR cuc 23

1

** 22 cucu RR RR ccuu ** 2

dt

dxcuc RR 2

3

1

dt

dxcuu RR 22

3

1

cudt

dx

RR cuu 23

1

Shock waves

Two constant data states are separated by a discontinuity or jump

Shock moving at speed Si Using Conservative flux for left shock

LL

LL uh

hU

**

** uh

hU

Conditions across shock

Rankine-Hugoniot condition

Entropy condition

λ1,2 are equivalent to characteristics. They tend towards being parallel at shock

LiL UUSUFUF **

*USU iiLi

Shock analysis

Change frame of reference, add Si

Rankine-Hugoniot gives

LLL Suu ˆLSuu **ˆ

LL

LL uh

hU

ˆˆ

**

** ˆ

ˆuh

hU

222*

2**

**

2

2

ˆˆ

LLL

LL

ghuhghuh

uhuh

Shock analysis

Mass flux conserved

From eqn 1

Using

also

LLL uhuhM ˆˆ**

L

LL uu

hhgM

ˆˆ2

1

*

22*

** /ˆ hMu L LLL hMu /ˆ

LLL hhhhgM **2

1

LL uuuu ** ˆˆ

L

LL uu

hhgM

*

22*

2

1

Left Shock Equation

Equating gives

Also

LLL hhfuu ,**

L

LLLL hh

hhghhhhf

*

*** 2

1,

LLLL qauS

2

**

2

1

L

LL h

hhhq

Right Shock Equation

Similar analysis gives

Also

RRR hhfuu ,**

R

RRRR hh

hhghhhhf

*

*** 2

1,

RRRR qauS

2

**

2

1

R

RR h

hhhq

Complete equation

Equating the left and right equations for u*

Which is the iterative of the function of Toro

LLL hhfuu ,** RRR hhfuu ,**

0,, LRLLLR hhfhhfuu

0,, *** uhhfhhfhf LRLL

Approximate Riemann Solvers No need to use exact solution Expensive

Iterative When other equations, exact may not exist

Many solvers Some more popular than others

Toro Two Rarefaction Solver

Assume two rarefactions Take the left and right equations

Solving gives

For critical rarefaction use solution earlier

** 2 ccuu LL RR ccuu ** 2

24*RLRL ccuu

c

Toro Primitive Variable Solver Writing the equations in primitive variables

Non conservative

Approximate A(W) by a constant matrix

Gives solution

0 xt WWAW

u

h

g

u

u

hWAW

LR WWW 2

1

RL

RLLRRL

cc

hhuuhhh

42*

RL

RLLRRL

hh

cchhuuu

42*

Toro Two Shock Solver

Assuming the two waves are shocks

Use two rarefaction solver to give h0

RL

RLRRLL

qq

uuhqhqh

*

LLRRRL qhhqhhuuu *** 2

1

2

1

Lo

LoL hh

hhgq

2

Ro

RoR hh

hhgq

2

Roe’s Solver

Originally developed for Euler equations Approximate governing equations with:

Where is obtained by Roe averaging

xtxtxt UAUAUUUFU~

A~

LL

RRLL

hh

huhuu

~RLhhh

~ 22

2

1~RL ccc

Roe’s Solver

Properties of matrix Eigen values

Right eigen vectors

Wave strengths

Flux given by

cu ~~~1 cu ~~~

1

cu

R ~~1~ )1(

cu

R ~~1~ )2(

u

c

hh ~

~

2

1~1

u

c

hh ~

~

2

1~2

LR hhh

2

112/1

~~~2

1

2

1

j

jjj

ni

nii FFF R

HLL Solver

Harten, Lax, van Leer Assume wave speed Construct volume Integrate round

Alternative gives flux

x

t

URUL

U*

FRFL F*

t

xL xR

x

t

URUL

U*

FRFL F*

t

xL xR

0* LRRLRRLL tUtUUxxUxUx

t

xS L

L

t

xS R

R

LRRLLLRR SSFFUSUSU /*

LRLRRLRLLR SSUUSSFSFSF /*

HLL Solver

What wave speeds to use? Free to choose One option:

For dry bed (right)

Simple, but robust

TRTRLLL cucuS ,min TRTRRRR cucuS ,min

LLL cuS RRR cuS 2

Higher Order in Space

Construct Riemann problem using cells further away

Danger of oscillations Piecewise

reconstruction

Limiters

i-1 i i+1 i+2

i-1 i i+1 i+2

L

R

LR

Limiters

Obtain a gradient for variable in cell i, Δi

Gradient obtained from Limiter functions Provide gradients at cell face

Limiter Δi =G(a,b)

iiL xUU 2

111 2

1 iiR xUU

ii

iii xx

uua

2/1

12/1

1

12/1

ii

iii xx

uub

Limiters

A general limiter

β=1 give MINMOD β=2 give SUPERBEE

van Leer

Other SUPERBEE expression s = sign

0,max,,max,0min

0,min,,min,0max,

aforbaba

aforbababaG

ba

bababaG

,

asbasbsbaG 2,min,,2min,0max,

Higher order in time Needs to advance half time step MUSCL-Hancock

Primitive variable Limit variable Evolve the cell face values 1/2t:

Update as normal solving the Riemann problem using evolved WL, WR

0 xt WWAW

Ri

Li

ni

RLi

RLi x

tWWWAWW

2

1,,

2/12/11

iini

ni FF

x

tUU

Alternative time advance

Alternatively, evolve the cell values using

Solve as normal

Procedure is 2nd order in space and time

Li

Ri

ni

ni FF

x

tUU WW

2

12/1

2/12/11

iini

ni FF

x

tUU

Boundary Conditions

Set flux on boundary Directly Ghost cell

Wall u, v = 0. Ghost cell un+1=-un

Transmissive Ghost cell hn+1 = hn

un+1 = un

Wet / Dry Fonts

Wet / Dry fronts are difficult Source of error Source of instability

Common near tidal boundaries Flooding - inundation

Dry front speed

We examined earlier dry bed problem

Front is fast Faster than characteristic. Can cause problem with time-step / Courant

LLL

LL

L

cuS

c

cucu

cuS

2

0

22

*

*

xx

t

Wet bed Dry bed

SL

Solutions

The most popular way is to artificially wet bed

Give a small depth, zero velocity Loose a bit of mass and/or momentum

Can drastically affect front speed E.g. a 1.0 dambeak with 1cm gives 38% error 1mm gives 25% error – try it!

Conservation Errors

The conserved variable are h and hu

Often require u

Need to be very careful about divide by zero

Artificial dry-bed depths could cause this

Source Terms

“Lumped” in to one term and integrated Attempts at “upwinding source” Current time-step

Could use the half step value E.g.

x

B

BK

uu

x

zghS

2

02

2

n

RK

3/2

2/1CRK

Main Problem is Slope Term

Flat still water over uneven bed starts to move.

Problem with discretisation ofx

zgh

x

zzgh lr

i

i-1 i i+ 1

z, hx

d a tu m le v e l

b e d le v e l

w a te r su r fa c e

iz1izlz1iz

rh

rz

1ihihlh1ih

Discretisation

Discretised momentum eqn

For flat, still water

Require

lri

rl

rlini zzgh

x

tghghhuhu

x

thuhu

22

22221

022

221

ri

rli

lni zh

hzh

h

x

tghu

rir

lil zh

hzh

h

22

22

A solution

Assume a “datum” depth, measure down

Momentum eqn: Flat surface

x

hg

x

hhg

x

zhg ii

ii

2

22

2

1

x

zzhzzhg liirii

22

2

1

2222'

2 liiriirli zzhzzhhhx

tghu

liil zzhh riir zzhh

and

Some example solutions

Weighted mesh gives more detail for same number of cells

Dam Break - CADAM Channel with 90° bend

Secondary Shocks