solution of saint ‐ venant equations (open ‐ channel) and coupled saint ‐ venant and...

40
Solution of Saint‐Venant equations (open‐channel) and Coupled Saint‐ Venant and compressible water hammer flow equations (mixed flows): Method of Characteristics, Finite Difference methods and Finite Volume schemes (Material were taken from Profs. Hanif Chaudhry Open Channel book (University of South Carolina), Mohan Kumar (Indian Institute of Science) and various internet sources, including printed references) Arturo S. Leon, Oregon State University (Fall 2011) © Arturo S. Leon OSU, Fall 2011

Upload: shawn-ferguson

Post on 27-Dec-2015

240 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Solution of Saint‐Venant equations (open‐channel) and Coupled Saint‐ Venant and compressible water hammer flow equations (mixed flows): Method of Characteristics, Finite Difference methods and Finite Volume schemes (Material were taken from Profs. Hanif Chaudhry Open Channel book (University of South Carolina), Mohan Kumar (Indian Institute of Science) and various internet

sources, including printed references)

Arturo S. Leon, Oregon State University (Fall 2011)

© Arturo S. Leon OSU, Fall 2011

Page 2: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Saint-Venant equations (Revisited) 1D Saint-Venant equations

x - distance along the channel, t - time, V – cross-sectional averaged velocity, y - depth of flow, D = A/T, A- cross sectional area, T - top width, So- bed slope, Sf - friction slope

0h

y V yD V

t x x

( )o f

V V yV g g S S

t x x

Page 3: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Saint Venant equations

Friction slope:

R - hydraulic radius, n - Manning’s roughness coefficient

Two non-linear equations in two unknowns V and y and two dependent variables x and t

These two equations are a set of hyperbolic partial differential equations

2 2

4 3/f

n VS

R

Page 4: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Movies

http://www.youtube.com/watch?v=NpEevfOU4Z8&feature=related

http://www.youtube.com/watch?v=PCYv0_qPk-4&feature=related

Page 5: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics

Characteristics for various types of flows

Page 6: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics (Cont.)

Characteristics at the boundaries of the computational domain (Cunge et al. 1980)

Page 7: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics (Cont.) Multiplying 1st equation by = ± g/c and adding it to 2nd

equation yields

The above equation is a pair of equations along characteristics given by

By multiplying the above equation by dt and integrating along AP and BP, we obtain

o f

gV c V V c y g S S

t x c t x

dxV c

dt o f

dV g dyg S S

dt c dt

P A P A o f P AAA

P B P B o f P BBB

gV V y y g S S t t

c

gV V y y g S S t t

c

Page 8: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics (Cont.)

Riemann invariants (For rectangular channels):

For Circular channels (See paper of Leon et al. 2006 (TEACH webpage):

2

2

dxV c J V c

dt

dxV c J V c

dt

Page 9: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics (Cont.)

Examples of Application:

Presented in class

Page 10: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Dam break problem (Theory and applications)

Animations: http://www.youtube.com/watch?NR=1&v=mA_P2JVOe2Ihttp://www.youtube.com/watch?NR=1&v=LO7j8n3frpQhttp://www.youtube.com/watch?

v=aZOoakaaOMY&feature=relatedhttp://www.youtube.com/watch?v=9Q-vy13yEXw&feature=relatedhttp://www.youtube.com/watch?

v=LeL0sr0NbTM&feature=related

Theory and Applications presented in class.

Page 11: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Method of Characteristics (Cont.)

Examples of Application:

Presented in class

Page 12: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Introduction to Finite Difference Techniques

Page 13: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques Most of the physical situation is represented by

nonlinear partial differential equations for which a closed form solution is not available except in few simplified cases

Several numerical methods are available for the integration of such systems. Among these methods, finite difference methods have been utilized very extensively

Derivative of a function can be approximated by FD quotients.

Page 14: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques

Differential equation is converted into a difference equation

Solution of difference equation is an approximate solution of the differential equation.

Example: f(x) is a function of one independent variable x. At x0 the function is f(x0), then by using Taylor series expansion, the function f(x0+x) may be written as

30

''2

0'

00 )()(!2

)()()()( xOxf

xxxfxfxxf

Page 15: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques

f’(x0)=dy/dx at x=x0

O(x)3: terms of third order or higher order of x Similarly f(x0 - x) may be expressed as

Neglecting second and higher order terms, f(x0 + x) may be written as

From this equation

30

''2

0'

00 )()(!2

)()()()( xOxf

xxxfxfxxf

0

0 0( ) ( )( )

ix x

f x x f xdfO x

dx x

0 0 0'( ) ( ) ( ) ( )f x x f x xf x O x

Page 16: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques

f(x)

x

y=f(x)

A

B

Q

x0-x x0 x0+x

Finite Difference Approximation

Page 17: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques Similarly

Neglecting O(x) terms in above equation we get Forward difference formula as given below

Backward difference formula as shown below

Both forward and backward difference approximation are first order accurate

0

0 0( ) ( )( )

ix x

f x f x xdfO x

dx x

x

xfxxf

dx

df

ixx

)()( 00

0

x

xxfxf

dx

df

ixx

)()( 00

0

Page 18: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques cont…

Subtracting the forward Taylor series from backward Taylor series, rearrange the terms, and divide by x

Neglecting the last term

200 )(2

)()(

0

xOx

xxfxxf

dx

df

ixx

x

xxfxxf

dx

df

ixx

2

)()( 00

0

Page 19: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques cont…

This approximation is referred to as central finite difference approximation

Error term is of order O(x)2, known as second order accurate

Central-difference approximations to derivates are more accurate than forward or backward approximations [O(h2) versus O(h)]

Now Consider FD approximation for partial derivative

Page 20: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Types of FD techniques cont… Function f(x,t) has two independent variables, x and

t Assume uniform grid size of x and t

t

x

x

t

k-1

k

k+1

Finite Difference Grid Approximation

i-1 i i+1

Page 21: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit and implicit techniques There are several possibilities for approximating the partial

derivatives

The spatial partial derivatives replaced in terms of the variables at the known time level are referred to as the explicit finite difference

The spatial partial derivatives replaced in terms of the variables at the unknown time level are called implicit finite difference

k is known time level and k+1 is the unknown time level. Then FD approximation for the spatial partial derivative , f/x, at the grid point (i,k) are as follows:

Page 22: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit and implicit techniques

Explicit finite differences

Backward:

Forward:

Central:

x

ff

x

fki

ki

1

x

ff

x

fki

ki

1

x

ff

x

fki

ki

211

Page 23: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit and implicit techniques

Implicit finite differences

Backward:

Forward:

Central:

x

ff

x

fki

ki

1

11

x

ff

x

fki

ki

11

1

x

ff

x

fki

ki

2

11

11

Page 24: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Unstable scheme

Generally this finite difference scheme is inherently unstable; i.e., computation become unstable regardless of grid size used. Stability check is an important part of numerical methods.

x

ff

x

fki

ki

211

t

ff

t

f ki

ki

1

Page 25: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Diffusive scheme This method yields satisfactory results for typical

hydraulic engineering applications. In this method the partial derivatives and other variables are approximated as follows:

x

ff

x

fki

ki

211

t

ff

t

f ki

*1

)(2

111

* ki

ki fff where

Page 26: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

MacCormack Scheme This method is an explicit, two-step predictor-corrector

scheme that is second order accurate both in space and time and is capable of capturing the shocks without isolating them

Two alternative formulations for this scheme are possible. In the first alternative, backward FD are used to approximate the spatial partial derivatives in the predictor part and forward FD are utilized in the corrector part.

The values of the variables determined during the predictor part are used during the corrector part

In the second alternative forward FDs are used in the predictor and backward FD are used in the corrector part

Page 27: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

MacCormack Scheme cont… Generally it is recommended to alternate the

direction of differencing from one time step to the next

The FD approximations for the first alternative of this scheme is given as follows. The predictor

t

ff

t

f kii

*

x

ff

x

fki

ki

1

Page 28: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

MacCormack Scheme cont… The subscript * refers to variables computed during

the predictor part The corrector

the value of fi at the unknown time level k+1 is given by

t

ff

t

f kii

**

x

ff

x

f ii

**1

)(2

1 ***1ii

ki fff

Page 29: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Lambda scheme In this scheme, the governing equations are first

transformed into λ-form and then discretized according to the sign of the characteristic directions, thereby enforcing the correct signal direction.

In an open channel flow, this allows analysis of flows having sub- and supercritical flows.

This scheme was proposed by Moretti (1979) and has been used for the analysis of unsteady open channel flow by Fennema and Chaudhry (1986)

Page 30: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Lambda scheme cont… Predictor

Corrector

x

ffff

ki

ki

ki

x

2132

x

fff

ki

ki

x

1

x

fff iix

*1

*

x

ffff iiix

*2

*1

* 32

Page 31: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

By using the above FD s and

and using the values of different variables computed during the predictor part, we obtain the equations for unknown variables.

The values at k+1 time step may be determined from the following equations:

t

ff

t

f kii

**

)(2

1 ***1ii

ki fff

Page 32: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Gabutti scheme

This is an extension of the Lambda scheme. This allows analysis of sub and super critical flows and has been used for such analysis by Fennema and Chaudhry (1987)

The general formulation for this scheme is comprised of predictor and corrector parts and the predictor part is subdivided into two parts

The λ-form of the equations are used and the partial derivatives are replaced as follows:

Page 33: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Gabutti scheme cont… Taking into consideration the correct signal

direction

Predictor:

Step1: spatial derivatives are approximated as follows:

x

fff

ki

ki

x

1

x

fff

ki

ki

x

1

Page 34: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Gabutti scheme cont… By substituting

Step2: in this part of the predictor part we use the following finite-difference approximations:

t

ff

t

f kii

**

x

ffff

ki

ki

ki

x

2132

x

ffff

ki

ki

ki

x

2132

Page 35: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Explicit finite difference schemes

Gabutti scheme cont…

Corrector: in this part the predicted values are used and the corresponding values of coefficients and approximate the spatial derivatives by the following finite differences:

The values at k+1 time step may be determined from the following equations:

x

fff iix

*1

*

x

fff iix

**1

)(2

1 ***1ii

ki

ki fftff

Page 36: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Implicit finite difference schemes

In this scheme of implicit finite difference, the spatial partial derivatives and/or the coefficients are replaced in terms of the values at the unknown time level

The unknown variables are implicitly expressed in the algebraic equations, this methods are called implicit methods.

Several implicit schemes have been used for the analysis of unsteady open channel flows. The schemes are discussed one by one.

Page 37: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Implicit finite difference schemes

Preissmann Scheme

This method has been widely used

The advantage of this method is that variable spatial grid may be used

Steep wave fronts may be properly simulated by varying the weighting coefficient

This scheme also yields an exact solution of the linearized form of the governing equations for a particular value of x and t.

Page 38: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Implicit finite difference schemes

Preissmann Scheme cont… General formulation of the partial derivatives and

other coefficients are approximated as follows:

t

ffff

t

fki

ki

ki

ki

2

)()( 11

11

x

ff

x

ff

x

fki

ki

ki

ki

))(1()( 1

111

))(1(2

1)(

2

11

111

ki

ki

ki

ki fffff

Page 39: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

Implicit finite difference schemes

Preissmann Scheme

Where α is a weighting coefficient

By selecting a suitable value for α, the scheme may be made totally explicit (α=0) or implicit (α=1)

The scheme is stable if 0.55< α≤1

Page 40: Solution of Saint ‐ Venant equations (open ‐ channel) and Coupled Saint ‐ Venant and compressible water hammer flow equations (mixed flows): Method of

FD methods for Saint Venant equations

Continued…

x

ff

x

ff

x

fni

ni

ni

ni

))(1()( 1

111

))(1(2

1)(

2

11

111

ni

ni

ni

ni fffff

ni

ni

ni

ni

ni

ni

ni

ni

ni

ni

ni

ni

UU

SSSSt

FFFFx

tUU

1

11

11

111

11

11

))(1()(

))(1()(2