55
Numerical Hydraulics Block 4 – Numerical solution of open channel flow Markus Holzner 1

Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

  • Upload
    vuhanh

  • View
    241

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Numerical Hydraulics

Block 4 – Numerical solution of open channel flow

Markus Holzner

1

Page 2: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Contents of the course

Block 1 – The equations Block 2 – Computation of pressure surges

Block 3 – Open channel flow (flow in rivers)

Block 4 – Numerical solution of open channel flow

Block 5 – Transport of solutes in rivers

Block 6 – Heat transport in rivers

2

Page 3: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

-  Finite Volume discretization

-  Finite differences method -  Characteristics method

3

Numerical solution of open channel flow

Page 4: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Basic equations of open channel flow in variables h and v for rectangular channel

Continuity („Flux-conservative form“)

Momentum equation

4

0)v( =∂⋅∂+

∂∂

xh

th

2 4/3

v (v)v

v v2

S E

e hyst hy

hg gI gIt x x

hbI rk r h b

∂ ∂ ∂+ = − + −∂ ∂ ∂

= =+

Page 5: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Basic equations of open channel flow in variables h and q for rectangular channel

Continuity

Momentum equation

5

0h qt x

∂ ∂+ =∂ ∂

2

2 4/3 2

( / ) ( )

2

S E

e hyst hy

q q h hgh gh I It x x

q q hbI rk r h h b

∂ ∂ ∂+ = − + −∂ ∂ ∂

= =+

Page 6: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Basic equations of open channel flow for general cross-section in variables A and Q

Continuity

Momentum equation

6

Q 0At x

∂ ∂+ =∂ ∂

2

0

2 4/3 2

( / )1 1 (Q / )

Q Q

wspe

e hyst hy u

A bQ A g gI gIA t A x x

AI rk r A L

∂∂ ∂+ = − + −∂ ∂ ∂

= =

Page 7: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Boundary conditions

•  At inflow boundary usually the inflow hydrograph should be given

•  At the outflow boundary we can use –  water level (also time variable e.g. for tide) –  water level-flow rate relation (e.g. weir formula) –  slope of water level or energy

•  In supercritical flow two boundary conditions are necessary for one boundary (for both v and h)

7

Page 8: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Boundary conditions

•  Number of boundary conditions from number of characteristics

In 1D: subcritical flow: IB: 1, OB: 1 superciritical flow: IB: 2, OB: 0

IB = Inflow boundary, OB = Outflow boundary

t t

8

Page 9: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Discretized basic equations in variables h and v for rectangular channels

Momentum equation

Explicit method

i = 2,…, Nx

i = 2,…, Nx

Which differences to chose in order to be able to build in lower and upper boundary conditions?

Continuity („Flux-conservative form“)

9

1 1( v v ) /new old old old old oldi i i i i ih h t h h x+ += −Δ ⋅ − Δ

2 21 1

0

12 4/3

1

v v ( )v v2

v v2

old old old oldnew old i i i ii i e

old old oldi i i

e hy oldst hy i

h ht g t t gI t gIx x

h bI rk r h b

− −

− −= −Δ ⋅ − Δ +Δ ⋅ −Δ ⋅Δ Δ

= =+

Page 10: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Discretized basic equations in variables h and v for rectangular channels

Boundary conditions (i = Nx+1) example

Explicit method

Boundary conditions (i = 1) example

10

1( ) . . v ( )q f h i e f hh

= =or weir formula

1 1 2 2 1 1 1 1( v v ) / v /( )new old old old old old new new newinh h t h h x q b h= −Δ ⋅ − Δ ⇒ = ⋅

1

1

( )

v v

newNx 0new newNx i

h = h weircomputation as i 1,...,Nx

+

+ =

Page 11: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Discretized basic equations in variables h and v for rectangular channels

Explicit method

11

Explicit method requires stability condition Courant-Friedrichs-Levy (CFL) criterium must be fulfilled:

c is the relative wave velocity with respect to average flow

/( v )t x cΔ ≤ Δ +

( ) / ( )c gh gA h b h= =

Page 12: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Non-conservative/ conservative form

vv 0h h ht x x

∂ ∂ ∂+ + =∂ ∂ ∂

( )v vv S Ehg I I g

t x x∂ ∂ ∂+ = − −∂ ∂ ∂

( )v 0hh

t x∂∂ + =

∂ ∂( ) ( )

212 S E

q q g I I g ht h x h x∂ ∂ ∂⎛ ⎞ ⎛ ⎞+ = − −⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠

0h qt x

∂ ∂+ =∂ ∂

( )2 2

2 S Eq q gh gh I It x h

⎛ ⎞∂ ∂+ + = −⎜ ⎟∂ ∂ ⎝ ⎠

q = vh

12

Page 13: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Matrix formulation of the last form of the equations

∂!u∂t

+ ∂!f∂x

+!b = 0

!u = hq

⎣⎢⎢

⎦⎥⎥

!f =

qq2

h+ gh

2

2

⎢⎢⎢

⎥⎥⎥

!b = 0

−gh(Is − IE )⎡

⎣⎢⎢

⎦⎥⎥

13

Page 14: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Assignment Determine the wave propagation (water surface profile, maximum water depth, outflow hydrograph) for a rectangular channel with the following data: width b = 10 m, kstr = 20 m-1/3/s length L = 10‘000 m, bottom slope IS=0.002 Inflow before wave, base flow Q0 = 20 m3/s Boundary condition downstream: Weir with water depth 2.2 m Boundary condition upstream: Inflow hydrograph

Inflow hydrograph DQ (is added to base flow Q0):

Time (h) 0 0.5 1.0 1.5 2.0 2.5

DQ (m3/s) 0 50 37.5 25 12.5 0

14

Page 15: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Inflow/Outflow hydrographs

time steps in 10s

Q (m3/s)

about 4 h

15

Page 16: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

1D Shallow water equations

-  The total differential for v=v(x,t) and h=h(x,t) is:

16

0h h vv ht x x

∂ ∂ ∂+ + =∂ ∂ ∂

( )S Ev v hv g I I gt x x

∂ ∂ ∂+ = − −∂ ∂ ∂

Dv v v xDt t x t

∂ ∂ ∂= + ⋅∂ ∂ ∂

Dv h h xDt t x t

∂ ∂ ∂= + ⋅∂ ∂ ∂

Page 17: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Characteristic equations •  We multiply the first of the original equations

with a multiplier l and add the two equations up:

•  To obtain total differentials in the brackets we have to choose

17

( ) ( )S Ev v h g hv h v g I It x t x

λ λλ

⎡ ⎤∂ ∂ ∂ ∂⎡ ⎤ ⎛ ⎞+ + + + + = −⎜ ⎟⎢ ⎥⎢ ⎥∂ ∂ ∂ ∂⎣ ⎦ ⎝ ⎠⎣ ⎦

1,2g gBh A

λ = ± = ±

Page 18: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

•  Thus we obtain the characteristic equations:

along

18

along

( )S EDv g Dh g I IDt c Dt

+ = −

( )S EDv g Dh g I IDt c Dt

− = −

dx v cdt

= +

dx v cdt

= −

Page 19: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

•  Positive and negative characteristics for sub-critical, critical and super-critical flow:

Types of characteristics

t t t P P P

C+ C+ C+ C-

C- C-

E E E W W W x x x

Terminology: P, W (West) und E (East) instead of i, i-1, i+1

19

Page 20: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Integration of the characteristic equations

•  Multiplication with dt and integration – along characteristic line

– and along characteristic line

– yields: 20

( )∫∫ ∫ −=+P

WES

P

W

P

W

dtIIgdhcgdv

( )∫∫ ∫ −=−P

EES

P

E

P

E

dtIIgdhcgdv

dx v cdt

= +

dx v cdt

= −

Page 21: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

( ) ( ) ( )WPWESWPW

WP ttIIghhcgvv −−=−⎟⎠⎞⎜

⎝⎛+−

( ) ( ) ( )EPEESEPE

EP ttIIghhcgvv −−=−⎟⎠⎞⎜

⎝⎛−−

PWpP hCCv −=

P n E Pv C C h= +

( ) ( )WPWESWW

Wp ttIIghcgvC −−+⎟⎠⎞⎜

⎝⎛+=

( ) ( )EPEESEE

En ttIIghcgvC −−+⎟⎠⎞⎜

⎝⎛−=

( / ) ( / )E E W WC g c C g c= =

or

This implies a linearisation. The wave velocity becomes constant in the element. 21

Integration of the characteristic equations

Page 22: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Grid for subcritical flow (1)

Zeit

x j

j+1 P

W E

Characteristics start on grid points

Terminology C (Center), W (West) und E (East) instead of i, i-1, i+1

C

Problem: Characteristics intersect between grid points in points P at time levels which do not coincide with the time levels of the grid. Results have to be interpolated.

22

Page 23: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Grid for subcritical flow (2)

Zeit

x j

j+1

P

W E

Characteristic lines end at point P, starting points do not coincide with grid points. Values at starting points are obtained by interpolation from grid point values

C

We choose this variant!

23 Terminology C (Center), W (West) und E (East) instead of i, i-1, i+1

Page 24: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Interpolation (left)

24

( )x

tcvxxxx

xxxx

vvvv LL

WC

LP

WC

LC

WC

LC

ΔΔ+=

−−=

−−=

−−

( )L LC L

C W

v c tc cc c x

+ Δ− =− Δ

Page 25: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Interpolation (right)

25

( )R RC R C R P R

C E C E C E

v c tv v x x x xv v x x x x x

+ Δ− − −= = =− − − −Δ

( )R RC R

C E

v c tc cc c x

+ Δ− =− −Δ

Page 26: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Starting point L

•  Solution for vL and cL yields:

Inrerpolating analogously for h:

26

( )

( )WCWC

WCCWC

L

ccvvxt

vcvcxtv

v−+−

ΔΔ+

−ΔΔ−

=1

( )

( )WC

WCLC

L

ccxt

ccxtvc

c−

ΔΔ+

−ΔΔ−

=1

( )( )WCLLCL hhcvxthh −+

ΔΔ−=

Page 27: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Starting point R for subcritical flow

•  In analogy to point L, variables for point R vR and cR

The method is an explicit method. The CFL-criterium is automatically fulfilled. 27

( )

( )1

C E C C E

R

C E C E

tv c v c vxv t v v c c

x

Δ+ −Δ= Δ− − + −

Δ

( )

( )1

C R C E

R

C E

tc v c cxc t c c

x

Δ+ −Δ= Δ− −

Δ

( )( )R C R R C Eth h v c h hx

Δ= + + −Δ

Page 28: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Starting point for supercritical flow

•  Starting point of characteristic between W and C

•  Using velocity v-c we obtain

28

( )

( )WCWC

WCCWC

R

ccvvxt

vcvcxtv

v+−−

ΔΔ+

−ΔΔ+

=1

( )

( )CW

WCRC

R

ccxt

ccxtvc

c−

ΔΔ+

−ΔΔ−

=1

( )( )WCRRCR hhcvxthh −−

ΔΔ−=

Page 29: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Final explicit working equations

( ) tIIghcgvC LESL

LLp Δ−+⎟

⎠⎞⎜

⎝⎛+=

( ) tIIghcgvC RESR

RRn Δ−+⎟

⎠⎞⎜

⎝⎛−=

P p L Pv C C h= − P n R Pv C C h= −with

and

( / ) ( / )L L R RC g c C g c= =

Integration from L to P and from R to P

2 equations with 2 unknowns

Boundary conditions are required as discussed in FD method

29

Page 30: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Classical dam break problem: Solution with method of

characteristics

Propagation velocity of fronts slightly too high

30

Page 31: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Matrix form of the St. Venant equations (1D)

∂!u∂t

+ ∂!f∂x

+!b = 0

!u = hq

⎣⎢⎢

⎦⎥⎥

!f =

qq2

h+ gh

2

2

⎢⎢⎢

⎥⎥⎥

!b = 0

−gh(Is − IE )⎡

⎣⎢⎢

⎦⎥⎥

31

Page 32: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Finite volume method

•  FV formulation for this vector equation:

•  e and w designate the east and west boundary of the FV cell respectively

∂!u∂t

+ ∂!f∂x

+!b = 0

!ut+1 =

!ut −

ΔtΔx

!fe −!fw( )+ !bΔt i i-1 i+1 e w

Dx

32

Page 33: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

•  The computation of the term

can be done in different ways. E.g. with an upwind scheme (e becomes i and w becomes i-1 if the wave propagates in positive x-direction.)

•  For the time discretisation we choose an explicit method

!fe −!fw( )

33

Finite volume method

Page 34: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Upwind formulation

!fe =

qit ,0 + −qi+1

t ,0

qit

qit

qit2

hit +ghi

t2

2⎛

⎝⎜⎞

⎠⎟,0 + −

qit

qit

qi+1t2

hi+1t +

ghi+1t2

2⎛

⎝⎜⎞

⎠⎟,0

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

!fw =

qi−1t ,0 + −qi

t ,0

qit

qit

qi−1t2

hi−1t +

ghi−1t2

2⎛

⎝⎜⎞

⎠⎟,0 + −

qit

qit

qit2

hit +ghi

t2

2⎛

⎝⎜⎞

⎠⎟,0

⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥

34

Page 35: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Improvement of method

•  A further improvement can be reached by flux-limiting

•  The Roe-method is such an improvement. It can take into account discontinuities across the cell boundaries.

35

Page 36: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Flux difference splitting (Roe) •  Idea: At the cell boundary the flux is

computed according to the characteristics by a positive/negative linear wave (splitting).

•  The flux at the east side of a cell is:

!fe− =!fl + A(

!ur −!ul )!

fe+ =!fr − A(

!ul −!ur )

i i-1 i+1

l r

or e w

Dx 36

Page 37: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

•  The Roe matrix A is the Jacobian matrix of the flux vector

•  The division into left and right part allows to account for discontinuities.

!f

A = ∂!f

∂!u⎛⎝⎜

⎞⎠⎟

37

Flux difference splitting (Roe)

Page 38: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

•  The Roe matrix can be computed as:

38

The Roe matrix

11 12

21 22

12

a aA

a ac⎡ ⎤

= ⎢ ⎥⎣ ⎦

( )11 1 2 1 2 12 1 2

21 1 2 2 1 22 1 1 2 2

a a

a a

λ λ λ λ λ λ

λ λ λ λ λ λ λ λ

= − = −

= − = −

1q ch

λ = + 2q ch

λ = −

Page 39: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Fluxes according to Roe scheme

•  The fluxes at a cell side are computed from the left/right-side fluxes, e.g.:

•  and the variables on the new time level are:

!fe =

12

!fe− +!fe+( )− 12 A !ul −

!ur( )( )

!ui (t + Δt) = !ui (t) −

ΔtΔx

!fe −!fw( )+ !b

39

Page 40: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Advection: Shallow water equations:

Fluxes:

!f( )e =

!f( )i (upwind )

40

0u bt x

∂Φ ∂Φ+ + =∂ ∂

1

( ) 0t ti i

e wu u bt

+Φ −Φ + Φ − Φ + =Δ

0u f bt x

∂ ∂+ + =∂ ∂

rr r

1

( ) 0t ti i

e wu u f f b

t

+ − + − + =Δ

r r rr r

( ) ( ) ( )( )1

1 ( )2e i i

u u u central+

Φ = Φ − Φ

( ) ( ) ( )e i

u u upwindΦ = Φ

Page 41: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Shallow water equations with first order upwind (Flux from left/west):

41

( )11

t t t t ti i i i i

th h q q bx

+−

Δ= − − −Δ

2 2 2 21

12 2

t tt t ti i i

i i

t q gh q ghq q bx h h

+

⎛ ⎞⎛ ⎞ ⎛ ⎞Δ ⎜ ⎟= − + − + −⎜ ⎟ ⎜ ⎟⎜ ⎟Δ ⎝ ⎠ ⎝ ⎠⎝ ⎠

Page 42: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

2D Shallow water equations The 2D shallow water equations can be written in matrix forms as:

∂∂t!u + ∂

∂x

!f + ∂

∂y!g +!b = 0

!u =

hqr

⎢⎢⎢

⎥⎥⎥

!f =

q

q2

h+ gh

2

2qrh

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

!g =

rqrh

r2

h+ gh

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

!b =

0−gh(Isx − IEx )

−gh(Isy − IEy )

⎢⎢⎢⎢

⎥⎥⎥⎥

42

Page 43: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Difference to 1D

•  Additional variable (spec. flow in y-direction) and additional momentum equation.

•  Fluxes in x-direction are formulated equal to the fluxes in 1D. •  Fluxes in y-direction are formulated in analgoy to fluxes in x-direction. In

addition to e(est) and w(west) the indices n(north) und s(south) are introduced. The direction of upwinding is determined independently from the upwind direction in the x-coordinate.

•  The conservation is over the whole element. I.e. source terms and fluxes over east/west and north/south boundaries enter the same balance.

!u =

hqr

⎢⎢⎢

⎥⎥⎥

!f x =

q

q2

h+ gh

2

2qrh

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

!gy =

rqrh

r2

h+ gh

2

2

⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥

!b =

0−gh(Isx − IEx )

−gh(Isy − IEy )

⎢⎢⎢⎢

⎥⎥⎥⎥

43

Page 44: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Specialties of 2D modelling •  The 2D computational grid is always a projection on the

horizontal plane. Different position of nodes in z-direction influence the source term (gravity).

•  2D elements are more general, i.e. only in the case of rectangular elements the 2D problem can be divided into two 1D problems.

•  In the case of general elements (e.g. triangular elements) the fluxes orthogonal to the element sides must be used. They are decomposed into components along the orthogonal x/y-directions.

•  Approximately rectangular elements improve coptational accuracy.

•  If element sizes vary strongly the numerical error increases fast. In that case higher order schemes have to be used. 44

Page 45: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Flows with free water surface (Navier-Stokes approach, vertically 2D or 3D)

•  For the solution of the partial differential equations the domain has to be discretized. This is not immediately possible as the position of the surface is not a priori known. An iterative procedures is necessary.

•  There are different ways to tackle the problem: –  Surface Tracking: the grid follows the free surface. –  Solution of an additional advection equation i.e. on a fixed grid

information is transported with the advective flow. The information is the water contents of a cell (Fraction of volume - FOV) or the distance from a datum to the surface (LS).

–  On a fixed grid particles are moved convectively with the flow (Marker in cell - MAC).

45

Page 46: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

46

Page 47: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Comments on the Navier-Stokes approach

•  Additional non-linearity means additional computational effort and the danger of non-convergence.

•  The discretisation is considerably more difficult and requires efficient grid generators. Inappropriate discretisation may lead to wrong solutions.

•  Numerical diffusion can smooth out the position of the surface.

•  The solution of the flow is considerable better if vertically curved streamlines exist.

•  The Navier-Stokes approach is more for local phenomena, shallow equation approach for global flow phenomena.

47

Page 48: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

HEC-RAS

48

Page 49: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Conceptual model of HEC

channel

floodplain

Storage (without flow)

1D but still taking into account channel and floodplains

49

Page 50: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

How to stay 1D in energy, momentum, and piezometric head?

z = elevation of water surface is the same for channel and flood plains = hp in our nomenclature

50

Page 51: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Some definitions

Conveyance K for each subdivision:

•  If there is no foodplain, the model describes what we did so far •  If there is a floodplain, the channel is subdivided into several

sections with the same water level but possibly different friction coefficients

Total flow:

subdivision

51

3/2,

1ihyi

iiEii rAn

KwithIKQ ==

∑=

=N

iiQQ

1

Page 52: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Equations for channel and floodplain

lcf

f

f

fc

c

c

qqtS

tA

xQ

qtA

xQ

+=∂∂+

∂∂

+∂∂

=∂∂+

∂∂

Indices: f = floodplain, c = channel

cfEf

ff

fff

fcEc

cc

ccc

MIxzgA

xQv

tQ

MIxzgA

xQv

tQ

=⎥⎥⎦

⎢⎢⎣

⎡+

∂∂+

∂∂

+∂∂

=⎥⎦

⎤⎢⎣

⎡+

∂∂+

∂∂+

∂∂

,

,

)(

)(

Continuity equations:

Momentum equations:

z = elevation of the water surface, ql=lateral inflow, S area of non-conveying cross-sec. qf = flow from floodplain to channel (per length), qc = flow from channel to floodplain (per length) , Mf, Mc corresponding momentum fluxes (per length)

The right hand sides are eliminated by adding the equations for channel and floodplain 52

Page 53: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Equations combined in 1D Final 1D equations

The unknowns are Q and z (= hp) Ac, Af and S are known functions of z IE,c and IE,f are known functions of z and Q 53

0)/)1(()/(

0))1(()(

,,

2222

=⎥⎥⎦

⎢⎢⎣

⎡+

∂∂+⎥

⎤⎢⎣

⎡+

∂∂+

∂Φ−∂

+∂

Φ∂+∂∂

=∂Φ−∂+

∂Φ∂+

∂∂

fEf

fcEc

cf

f

c

c

fc

IxzgAI

xzgA

xAQ

xAQ

tQ

xQ

xQ

tA

)/(

)1(

fcc

fc

fc

KKKwithQQQQQ

SAAA

+=Φ

Φ−+Φ=+=

++=

)( workpreviousourinxhI

xz

hzz

S

bottom

∂∂+=

∂∂

+=

Page 54: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Equations in difference form

Momentum equation

with

Continuity equation

velocity coefficient

equivalent x-coordinate

54

QvQvQv

AAA

xIAxIAxAI

ffccfc

ffEfccEcEE

+=+=

Δ+Δ=Δ

β

,,

( ) ( ) 0. =⎟⎟⎠

⎞⎜⎜⎝

⎛+

ΔΔ+

ΔΔ+

ΔΔΔ+ΔΔ

fEEEE

ffcc IxzgA

xvQ

xtxQxQ β

0=−ΔΔΔ+Δ

ΔΔ

+ΔΔΔ+Δ lff

fc

c QxtSx

tA

xtAQ

( ))()()1(

5.011

11,

111

1,

++++

++

++

−+−−=Δ

−+−=Δji

ji

ji

jispacei

ji

ji

ji

jitimei

FFFFF

FFFFF

θθ

Page 55: Block 4 – Numerical solution of open channel flow of the course Block 1 – The equations Block 2 – Computation of pressure surges Block 3 – Open channel flow (flow in rivers)

Solution method

Implicit, linearized Finite Difference scheme

Linearization method: Example: term v2, a more complicated term would be Q2/Ac

( ) ( ) ( ) ( ) 122221

1

22 ++

+

=Δ+≈Δ+Δ+=

Δ+=ji

jii

ji

jiii

ji

ji

ji

iji

ji

vvvvvvvvvv

vvv

Implicit scheme: All spatial derivatives are taken as a weighted average between old and new time, weight θ All time derivatives are taken in the middle of The spatial discretization interval

Solution of big equation system for 2Nx unknowns per time step, where Nx is the number of nodes As the equation system is sparse, techniques for sparse matrices are used

x

t

j i+1

j+1

i Dx

Dt θ

0.5

55