Developing a Comparative Tool for both Conventional

advertisement

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

Saint-Venant equations (Revisited)

 1D Saint-Venant equations

 y

 t

D h

V

 x

V

 y

 x

0

V

 t

V

V

 x

 g

 y

 x

( o

S f

)

 x - distance along the channel, t - time, V – crosssectional averaged velocity, y - depth of flow, D =

A/T , A - cross sectional area, T - top width, S o

- bed slope, S f

- friction slope

Saint Venant equations

 Friction slope:

S f

2 2 n V

R

 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

Movies

 http://www.youtube.com/watch?v=NpEevfOU4Z8&f eature=related

 http://www.youtube.com/watch?v=PCYv0_qPk-

4&feature=related

Method of

Characteristics

Characteristics for various types of flows

Method of Characteristics (Cont.)

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

Method of Characteristics (Cont.)

Multiplying 1 st equation by

= ± g/c and adding it to 2 nd equation yields

 t

 

V

 c

 x

V

 g

 

 c

 t

 

V

 c

 x

 y

 o

S f

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

 g dy dt c dt

 o

S f

 dx dt

V c

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

V

P

V

A

A

 y

P

 y

A

 

 o

S f

A

 t

P

 t

A

V

P

V

B

 g

 

B

 y

P

 y

B

 

 o

S f

B

 t

P

 t

B

Method of Characteristics (Cont.)

Riemann invariants (For rectangular channels):

V

2 c

J

 dx dt

V

2 c

J

 dx dt

V c

V c

 For Circular channels (See paper of Leon et al. 2006

(TEACH webpage):

Method of Characteristics (Cont.)

Examples of Application:

Presented in class

Dam break problem (Theory and applications)

Animations: http://www.youtube.com/watch?NR=1&v=mA_P2JVOe2I http://www.youtube.com/watch?NR=1&v=LO7j8n3frpQ http://www.youtube.com/watch?v=aZOoakaaOMY&featur e=related http://www.youtube.com/watch?v=9Qvy13yEXw&feature=related http://www.youtube.com/watch?v=LeL0sr0NbTM&feature

=related

Theory and Applications presented in class.

Method of Characteristics (Cont.)

Examples of Application:

Presented in class

Introduction to Finite

Difference Techniques

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.

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 x

0 the function is f(x

0

) , then by using Taylor series expansion, the function f(x

0

+

 x) may be written as f ( x

0

  x )

 f ( x

0

)

  xf

'

( x

0

)

(

 x )

2

2 !

f

''

( x

0

)

O (

 x )

3

Types of FD techniques

 f

(x

0

)=dy/dx at x=x

O(

0

 x) 3 : terms of third order or higher order of

 x

Similarly f(x

0

-

 x) may be expressed as f ( x

0

  x )

 f ( x

0

)

  xf

'

( x

0

)

(

 x )

2

2 !

f

''

( x

0

)

O (

 x )

3

 Neglecting second and higher order terms, f(x

0

 x) may be written as

+

(

0 x f x

0

)

  xf

'

( x

0

)

O (

 x )

 From this equation df dx

0 i

(

0 x f x

0

)

 x

O (

 x )

Types of FD techniques f(x)

A

Q

B y=f(x) x0-

 x x0 x0+

 x x

Finite Difference Approximation

Types of FD techniques

 Similarly df dx x x

0 i

(

0

)

(

0

  x

 x

)

O (

 x )

Neglecting O(

 x) terms in above equation we get

Forward difference formula as given below df dx x

 x

0 i

 f ( x

0

  x )

 x f ( x

0

)

 Backward difference formula as shown below df dx x

 x

0 i

 f ( x

0

)

 f (

 x x

0

  x )

 Both forward and backward difference approximation are first order accurate

Types of FD techniques cont…

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

 x df dx x

 x

0 i

 f ( x

0

  x )

2

 x f ( x

0

  x )

O (

 x )

2

 Neglecting the last term df dx x

 x

0 i

 f ( x

0

  x )

2

 x f ( x

0

  x )

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(h 2 ) versus O(h) ]

Now Consider FD approximation for partial derivative

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 k+1 k k-1 i-1 i i+1 x

Finite Difference Grid Approximation

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:

Explicit and implicit techniques

Explicit finite differences

Backward:

 f

 x

 f i k 

 x f i k

1

Forward:

 f

 x

 f i k

1

 x f i k

Central:

 f

 x

 f i k

1

2

 x f i k

1

Explicit and implicit techniques

Implicit finite differences

Backward:

Forward:

Central:

 f

 x

 f i k

1 

 x f i k

1

1

 f

 x

 f i k

1

1 

 x f i k

1

 f

 x

 f i k

1

1 

2

 x f i k

1

1

Explicit finite difference schemes

 Unstable scheme

 f

 x

 f i k

1

2

 x f i k

1

 f

 t

 f i k

1

 t

 f i k

 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.

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:

 f

 x

 f i k

1

2

 x f i k

1

 f

 t

 f i k

1

 t

 f

* where f

* 

1

2

( f i k

1

 f i k

1

)

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

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

 f

 t

 f i

* 

 t f i k

 f

 x

 f i k 

 x f i k

1

Explicit finite difference schemes

MacCormack Scheme cont…

 The subscript * refers to variables computed during the predictor part

 The corrector

 f

 t

 f i

* * 

 t f i k  f

 x

 f i

*

1

 x f i

*

 the value of f i given by at the unknown time level k+1 is f i k

1 

1

2

( f i

*  f i

* *

)

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)

Explicit finite difference schemes

Lambda scheme cont…

 Predictor f x

2 f i k 

3 f i k

1

 x

 f i k

2 f x

 f i k

1

 x f i k

 Corrector f x

 f i

* 

 x f i

1 f x

2 f i

* 

3 f i

1

 x

 f i

2

Explicit finite difference schemes

 By using the above FD s and

 f

 t

 f i

* * 

 t f i k 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: f i k

1 

1

2

( f i

*  f i

* *

)

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:

Explicit finite difference schemes

Gabutti scheme cont…

 Taking into consideration the correct signal direction

Predictor:

Step1: spatial derivatives are approximated as follows: f x

 f i k 

 x f i k

1 f x

 f i k

1

 x f i k

Explicit finite difference schemes

Gabutti scheme cont…

 By substituting

 f

 t

 f i

* * 

 t f i k

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

2 f i k 

3 f i k

1

 x

 f i k

2 f x

2 f i k 

3 f

 x i k

1

 f i k

2

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: f x

 f i

* 

 x f i

1 f x

 f i

1

 x f i

*

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

1  f i k 

1

2

 t ( f i

*  f i

* *

)

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.

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.

Implicit finite difference schemes

Preissmann Scheme cont…

 General formulation of the partial derivatives and other coefficients are approximated as follows:

 f

 t

( f i k

1  f i k

1

1

)

2

 t

( f i k  f i k

1

)

 f

 x

( f i k

1

1 

 x f i k

1

)

( 1

 

)( f i k

1

 x

 f i k

) f

1

2

( f i k

1

1  f i k

1

)

1

2

( 1

 

)( f i k

1

 f i k

)

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

FD methods for Saint Venant equations

Continued…

 f

 x

( f i n

1

1 

 x f i n

1

)

( 1

 

)( f i n

1

 x

 f i n

) f

1

2

( f i n

1

1  f i n

1

)

1

2

( 1

 

)( f i n

1

 f i n

)

U i n

1 

U i n

1

1 

 t

2

 t

 x

( F i n

1

1

( S i n

1 

F i n

1

)

S i n

1

1

)

( 1

( 1

 

)( F i n

1

 

)( S i n

1

S i n

F i n

)

)

U i n 

U i n

1

Download