0% found this document useful (0 votes)
10 views64 pages

Imacdonaldpdf

Uploaded by

陈敏
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views64 pages

Imacdonaldpdf

Uploaded by

陈敏
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

The Numerical Solution of

Free Surface/Pressurized
Flow in Pipes
Ian MacDonald

September 1992

Submitted to the

Department of Mathematics,

University of Reading,

in partial ful llment of the requirements for the

Degree of Master of Science


Abstract
Flows in closed channels can change from free surface ow to pressurized ow and

vice versa. Normally we require two di erent sets of equations to model these

di erent regimes, however with the use of a thin slot in the channel sot, we can

model both using only the open channel equations. When this is done numerically,

using Roe's scheme, serious oscillations are observed in the time history of the

solution. In this work, possible causes of these oscillations are investigated, and

attempts are made to remove them.

Acknowledgements
I would like to thank Dr.M.J.Baines, Dr.A.Priestly and Dr.P.K.Sweby of the

Mathematics Department, University of Reading, for their help, support and

advice during this work.

I would also like to acknowledge the nancial support of the SERC.


Contents
1 Introduction 1

2 Simulation of Pressurized Flow with the Open Channel Equa-

tions 3

2.1 The Open Channel Equations : : : : : : : : : : : : : : : : : : : : 3

2.2 Simulation of Pressurized Flows : : : : : : : : : : : : : : : : : : : 7

2.3 Description of the Problem : : : : : : : : : : : : : : : : : : : : : : 9

3 Roe's Scheme 13

3.1 Description of the Scheme : : : : : : : : : : : : : : : : : : : : : : 13

3.2 Results and Discussion : : : : : : : : : : : : : : : : : : : : : : : : 19

4 The Osher and Solomon Scheme 23

4.1 Description of the Scheme [7] : : : : : : : : : : : : : : : : : : : : 23

4.2 Scheme for Open Channel Equations : : : : : : : : : : : : : : : : 25

4.3 Results and Discussion : : : : : : : : : : : : : : : : : : : : : : : : 27

5 Godunov's Scheme 28

5.1 The Exact Riemann Solver for the Open Channel Equations : : : 28

5.2 Results and Discussion : : : : : : : : : : : : : : : : : : : : : : : : 32

i
6 Smoothing Techniques 33

6.1 Smoothing Eigenvalues : : : : : : : : : : : : : : : : : : : : : : : : 33

6.1.1 Results and Discussion : : : : : : : : : : : : : : : : : : : : 34

6.2 Sloped Roof Technique : : : : : : : : : : : : : : : : : : : : : : : : 37

6.2.1 Results and Discussion : : : : : : : : : : : : : : : : : : : : 38

7 Di erent Schemes Using Roe Decomposition 42

7.1 Implicit Roe's Scheme : : : : : : : : : : : : : : : : : : : : : : : : 43

7.2 Alternative Time Stepping : : : : : : : : : : : : : : : : : : : : : : 46

8 `Shock' Fitting 48

8.1 Description : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 48

8.2 Results and Discussion : : : : : : : : : : : : : : : : : : : : : : : : 54

9 Conclusions 57

ii
Chapter 1
Introduction
In a closed channel (pipe, channel with sot) there are often situations which

involve a transition from free surface ow to pressurized ow, or vice versa. For

example if we have a closed channel in a hydraulic plant, with initially free surface

ow, then the start-up of machinery (pumps, turbines) may cause a steep wave

which in turn may give rise to pressurized ow conditions. Flows with this kind of

transition are particularly hard to model because these two di erent ow regimes

require di erent sets of equations to model them. This requires us to explicitly

track any interface between the two di erent regimes, and solve the appropriate

equations for each section. We shall see that by putting a thin vertical slot in

the channel sot we can simulate pressurized ow with the same equations as we

model free surface ow. Hence we can model both ow regimes with this one set

of conservation laws, the open channel equations. When we do this we no longer

need keep track of any interfaces between ow regimes, since all sections of the

ow are modelled by the same set of equations.

We require a numerical scheme to solve this problem, of which there are many

1
for conservation laws. Traditional schemes, such as Lax Wendro and central

di erence, are unsplit (that is they take no account of the direction of ow).

These schemes often inherently cause oscillations in space, near discontinuities.

Since the 1980's, upwind schemes have become popular, since they are found to

give better results for conservation laws, the main examples of these being Roe,

Osher and Van Leer.

Roe's scheme has been tried in [1] for this problem, but the scheme is ob-

served to give oscillations in time. In this work we investigate the cause of these

oscillations, and attempt to alleviate the problem.

In chapter 2 we quote and describe the open channel equations, justify the

use of the slot and set up the problem that forms the basis of this work.

The rst thing we do after reproducing the results in [1], is to try some other

upwind schemes in order to see what e ect they have on the oscillations. This

forms chapters 3 to 5.

The presence of the narrow slot causes a sharp jump in the characteristic

waves speeds as we enter the slot. In chapter 6 we try two di erent ways of

smoothing this jump to see what e ect this has on the oscillations.

In chapter 7 we try an implicit version of Roe's scheme, and also alternatives

to Euler time stepping.

In chapter 8 we develop a `shock' tting modi cation to Roe's scheme.

In chapter 9 we summarise the conclusions we have made from the proceeding

chapters.

2
Chapter 2
Simulation of Pressurized Flow
with the Open Channel
Equations

2.1 The Open Channel Equations


The unsteady 1-D open channel equations, often referred to as the St. Venant

equations, can, for a prismatic channel (i.e. constant cross-section), be written

in conservation form as follows (see [12] pp. 451 or [2] pp. 7, for the derivation),

@w @F (w )
+ =D (2:1)
@t @x

where
2 3 2 3 2 3
6
6 7
7 66 77 6 0 77
75 , D = 664
A Q
w=6 7 , F(w) = 6 75 :
4 5 4 Q
2
Q + I1(A) (
gA S0 Sf )
A

Equation (2.1) uses the following notation

h = water depth

3
Q = ow rate

A = wetted cross-sectional area

b = channel width at height  above bottom

S0 = bottom slope

Sf = friction slope

g = gravitational acceleration
Zh
I1 (A) = g (h  )b( )d:
0

b( )

Figure 2.1: A typical channel cross-section.

We shall use Manning's formula to calculate the frictional resistance Ff (see [12]

pp. 454-457),

Ff =
gAv v j j n
2
R
4=3 1:49
where

Q
v =
A

n = Manning's roughness coecient

R = hydraulic radius
wetted area
=
wetted perimeter

4
 = density

The friction slope Sf is de ned by

1
Sf = Ff
gA

hence

Sf =
j j
v v n
2
(2:2)
R
4=3 1:49

We can write equation (2.1) as

@w @w
+ J (w ) =D
@t @x

where J is the Jacobian of F


2 3
@ F(w)
6 0 1 7
J (w ) = =6
64 77
@w Q
2
2Q 5
2
+ c2
A A

where
2 d
c = ( )
I1 A :
dA

If b( ) is continuous at  = h, then

d
Z h dh d
Z h
2
c = (
g h )( )
 b  d = (
g h )( )
 b  d
0 0
dA dA dh
Z h
!
dh
= g ( ) + g (h
b  d h)b(h)
dA 0
dh
Zh
= g b( )d:
dA 0

From the de nition of wetted area, we know that

Z h
A = ( )
b  d
0

so
dA
= b(h) = bs
dh

5
where bs is the channel width at the free surface; hence we have that

2 gA
c = : (2:3)
bs

Note that J (w) has eigenvalues

Q Q
1 = c , 2 = +c
A A

and corresponding eigenvectors


2 3 2 3
66 1 77 66 1 77
e1 = 6 7 , e2 = 6 75 :
4 5 4
1 2

6
2.2 Simulation of Pressurized Flows
Equation (2.1) applies to ows in open channels, where there is a free surface. In

a closed channel, while the water is below the sot, we can continue to use the

open channel equations as before. If part of the free surface reaches the sot,

then this portion of the ow will no longer have a free surface and hence will be

pressurized. In this portion, the open channel equations will no longer be valid.

The major feature of pressurized ow is that it has an extremely large wave

celerity c, compared to the wave celerity of free surface ow. This arises from

the fact that when the ow is pressurized, there is no additional storage volume

left; hence if the ow changes at the upstream end the e ect is immediately

transmitted downstream.

In order to simulate pressurized conditions using the open channel equations,

we can add a narrow vertical slot in the channel sot as shown in gure 2.2

(see [2] pp. 367).

While normal free surface conditions hold, the slot has no e ect. When the

ow is pressurized the free surface level is in the slot. Because the slot is very

narrow, the volume of water it holds is negligible compared to the pipe volume,

so the continuity equation still holds. We see from equation (2.3) that the small

slot width, wsl , produces a large celerity c. This large wave celerity is an attempt

to approximate the very large wave celerity of pressurized ow. Hence, using the

slot, we can simulate pressurized ow using the open channel equations. The slot

has an in nite height.

The problem does not have an analytic solution, and hence a numerical ap-

proach is required. It is anticipated that the problem will cause numerical prob-

7
- sl
w

6
hch

? wch -

Figure 2.2: Rectangular channel with slot in sot (slot width exaggerated)

lems, because of the sudden change in channel width as we enter the slot.

In the next section are the details of the particular problem that will form the

basis for the whole of this dissertation.

8
2.3 Description of the Problem
The problem tackled in this work is from [1]. It consists of a rectangular channel,

as in gure 2.2. The properties of the channel are given as follows,

Channel width (wch ) = 0:51m

Channel height(hch ) = 0:148m

Channel length = 10m

Channel slope = 0

Manning constant(n) = 0:012

Slot width(wsl ) = 0:01m:

The following initial conditions are given

( 0) = 0:06528 m2
A x;

( 0) = 0 m3 s
Q x;
1
:

The boundary conditions are given by the following data

At x = 0 (see gure 2.3)


Time (s) Water depth (m) Time (s) Water depth (m)

0:0 0:1280 3:4 0:1728


0:2 0:1290 3:6 0:1752
0:4 0:1300 3:8 0:1778
0:6 0:1330 4:0 0:1800
0:8 0:1360 4:2 0:1830
1:0 0:1400 4:4 0:1870
1:2 0:1420 4:6 0:1900
1:4 0:1440 4:8 0:1920
1:6 0:1460 5:0 0:1920
1:8 0:1470 5:2 0:1916
2:0 0:1500 5:4 0:1896
2:2 0:1516 5:6 0:1880
2:4 0:1540 5:8 0:1880
2:6 0:1580 6:0 0:1888
2:8 0:1610 6:2 0:1908
3:0 0:1640 6:4 0:1948
3:2 0:1688 6:6 0:1972

9
At x = 10:0

Time (s) Water depth (m) Time (s) Water depth (m)

0:0 0:1280 6:6 0:1280

Intermediate values are obtained by linear interpolation.

0.2

0.19

0.18

0.17

0.16
Water height at x=0

Channel Soffit
0.15

0.14

0.13

0.12

0.11

0.1
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5

time (s)

Figure 2.3: Water height at left boundary against time.

10
The main thing that we need to calculate for our problem, is the integral

( ) (see equation (2.1) ). This is given by the following formula


I1 A
8
>
> 2
A  Acrit
>
>
< 2w
gA

I1 (A) =
ch !
>
>
> (A Acrit) hch g (A Acrit )
2
>
: crit
gA + + A > Acrit
wsl 2 2wsl
where Acrit = hch wch .

0.16

0.14

0.12

0.1
I1(A)

0.08

0.06

0.04

0.02
A=Acrit

0.0
0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08

Figure 2.4: Plot of I1 (A) for our channel.

I1 (see gure 2.4) is a continuous function, and it is di erentiable everywhere,

except at A = Acrit. c is not strictly de ned at this point, although we can take

limits from above and below,


 gA 1=2  gA 1=2
crit crit
c = ; c+ = :
wch wsl

c (see gure 2.5) is then discontinuous at A = Acrit, and the jump is given by

c = c+ c :

11
9

5
c(A)

4
A=Acrit
3

0
0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

Figure 2.5: Plot of c(A) for our channel.

12
Chapter 3
Roe's Scheme

3.1 Description of the Scheme


This scheme was originally developed for the Euler equations in [9]. In common

with other schemes used in this work, we approximate the solution function w(x),

by a set of piecewise constant states fwj g, of constant width x (see gure 3.1).
wj +1

wj

wj 1

r r - x
(j 1=2)x (j +1=2)x

Figure 3.1: Piecewise constant states.

wj is taken to be the cell average of the function w, on the interval

[(j 1=2)x; (j + 1=2)x]

13
and is given by
1 Z (j +1=2)x
wj = w (x)dx
x (j 1=2)x

This property ensures that the piecewise constant approximation has the `same

amount of w' as the original function.

Suppose fwjn g are the cell averages to some approximation of the exact so-
lution of the PDE (2.1) with D = 0, at t = nt. We then have a sequence of

Riemann problems centred at x = (j + 1=2)x; t = nt; j = 0; 1; . . ..

In Roe's scheme we approximate the Jacobian, J (w), in the interval [j x; (j + 1)x]

by the constant matrix J~(wL ; wR ), where wL = wjn and wR = wjn+1 . We can

then solve the Riemann problem exactly, with this new constant matrix (see

below).

The matrix J~ is chosen so to have the following three properties,

1. As wL ! wR ! w
J~(wL ; wR ) ! J (w)

2. For any wL ; wR

J~(wL ; wR )(wR wL ) = F(wR ) F(wL )

3. The eigenvectors of J~ are linearly independent.

These three properties ensure conservation, and that any shock will satisfy the

Rankine-Hugoniot condition (See [9] for more details).

The matrix that has these properties is as follows,


2 3
6 0 1 77
~(wL ; wR ) = 6
64 ~ 2 75
J
Q 2 2Q
~
~2 + ~
c
~
A A

14
where

A ~ = (AL AR)1=2

~ (AL)1=2 QR + (AR)1=2 QL
Q =
(AL)1=2 + (AR)1=2
8" #1=2
>
> I1 (AR) I1 (AL)
>
>
>
>
>
AR 6 0
AL =
>
>
<
AR AL

~= >
c
>
>
> " #1=2
>
>
> g (AR + AL )
>
>
: AR AL = 0
(bs )R + (bs )L
J~ has eigenvalues
~ ~
~ =Q
1 ~ , ~ 2 = ~ + c~
c
Q

~
A A

and corresponding eigenvectors


2 3 2 3
66 1 77 66 1 77
e1 = 6
~ 7 , e2 = 6
~ 75 :
4 5 4
~1 ~2

If we decompose the jumps in w as follows (see [9])

wR wL = ~ 1 e~1 + ~ 2 e~2

then using the properties of the matrix J~ the ux di erence is

F(wR ) F(wL ) = ~1 ~ 1 e~1 + ~ 2 ~ 2 e~2:

Here ~ 1 and ~ 2 are found to be the strengths of the waves corresponding to the

eigenvectors e~1 and e~2, respectively, and are found to be


~ (
2 AR AL ) (QR QL )
~1 = ~ ~1
2 

(QR QL ) ~1 (AR AL )


~2 = ~ 2 ~ 1


The source term D in (2.1) can also be decomposed onto the eigenvectors as

follows

~
D = ~1e~1 + ~2e~2

15
where ~
D is some average of DL and DR , which are the source terms on the left

and right. This work uses ~


D = 12 (DL + DR ). If D ~ ]T then
~ = [0; D

~
~1 = D

~
2 ~1


~2 = ~1:

We now get to the main part of the algorithm.

Suppose we have N + 1 constant states altogether, then we will have N Riemann

problems. For the j th Riemann problem centred at x = (j + 1=2)x we calculate

and keep the following


9
~ i;j +1=2 = ~ i >
>
>
 =
 t  i = 1; 2
>
>
>
i;j +1=2 = ~ i ~ i + t ~i ~ei
 ;
x
The terms i;j +1=2 are the time updates to the components of w (corresponding to

~
e1 and ~e2) using an explicit Euler scheme. This is carried out for j = 0; 1; . . . ; N

1:

We now use the following procedure to update the solution to the next time

level.

For j = 0; 1; . . . ; N 1
9
>
>
>
if ~ i;j +1=2 > 0 then increment wj +1 by i;j +1=2 ; =
i = 1; 2
>
>
>
else increment wj by i;j +1=2 : ;

Figure 3.2 shows the transfers for one possible case. The solution is now

updated except for the updates due to the boundary conditions, which will be

discussed later. We need the CFL condition

t
max(j~1;j +1=2 j; j~2;j +1=2 j) 1
x

to ensure that neighbouring Riemann problems do not interact.

16
1;j +1=2 2;j +1=2
YHHH *
wjn

wjn+1

t t -
(j +1=2)x

Figure 3.2: Transfer across interface at x = (j + 1=2)x, if ~ 1;j +1=2  0 and


~
2;j +1=2 > 0.

The resulting scheme is rst order in space and time. The scheme can be

made second order, by transferring a proportion of the ux (i;j +1=2 ) back in

the opposite direction. The proportion is controlled by a limiter, which can be

chosen to ensure second order accuracy whilst keeping shocks sharp and free of

oscillations (see [3] and [8]). The results in this project do not use a limiter

however.

At boundaries the wave-like nature of the decomposed variables is exploited, so

that only incoming waves are updated from the appropriate boundary condition.

Outgoing waves are allowed to pass freely from the region. If at a boundary both

waves move into the region, then two boundary conditions are required in order

to overwrite both characteristic variables. If however only one wave is incoming

17
at a boundary, then it is only appropriate to overwrite the incoming characteristic

variable, hence we must have only one boundary condition.

The only case encountered in this work is where we have only one incoming

wave at each end, and we wish to specify the height of the water at the boundaries

for each time step. We can directly overwrite the area variable, A, with the new

area (calculated from the new height), but we do not know what to do with the

Q variable. This problem can be solved by extrapolating from the interior values

near the boundary, an incoming wave at the boundary. The strength of this wave

is chosen so as to give the correct value of A at the boundary. This wave is then

used to increment the Q value at the boundary. See [3] for details.

In rare situations Roe's scheme can give unphysical solutions, i.e. entropy

violating. The solution can have a shock, when the correct entropy satisfying

solution has an expansion fan. A modi cation to the scheme is available to

ensure that solutions do not violate the entropy condition. This modi cation was

not needed in this work. See [3] for details.

18
3.2 Results and Discussion
Figure 3.3 shows water height against distance along the channel, at several di er-

ent times. Before the surface reaches the slot, the numerical solution is smooth

and well behaved. After the surface goes into the slot, a sharp front develops

which separates the pressurized ow from the free surface ow. This front is

shock-like, but is not a shock. A low frequency oscillation develops behind this

front, which however does not appear too serious.

0.2

0.19

0.18

0.17

t=3.0 t=6.0
0.16
t=4.5

0.15
Water Height (m)

0.14
t=1.5
0.13 t=0.0

0.12
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0

Distance along channel (m)

Figure 3.3: Water height against distance along channel, at several di erent times.

The problem occurs when we look at a time history of the water height, at a

particular distance along the channel. Figure 3.4 shows such a history at distance

3:5m. The water height initially remains constant, and then rises smoothly until

it reaches the slot. It then rises very sharply into the slot; after this there is

19
a series of high frequency oscillations, which eventually decay and the height

returns to smooth variation. The oscillations are the ones observed in [1] which

prompted this work.

0.2

0.19 x=3.5 m

0.18

0.17

0.16

0.15
Water Height

0.14

0.13

0.12
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5

Time (s)

Figure 3.4: Water height against time, at 3:5m along channel.

The most obvious explanation for the oscillations is the discontinuity in the

wave celerity, which causes a discontinuity in the characteristic wave speeds (see

Figure 2.5). Of course, the scheme cannot resolve this discontinuity, but sees a

sharp change in wave speeds as the surface enters the slot. Another problem could

be the piece-wise constant approximation, because near the front the solution does

not vary smoothly; hence this approximation can become a poor one. The source

term could be a cause, but this can practically be ruled out since the oscillations

are still present, even for the homogeneous problem.

When the grid is made ner and a smaller time step is used (in order to satisfy

20
the CFL condition), we observe that the the oscillations increase in frequency and

decay at a faster rate. This can be seen from gure 3.5.

0.2

0.19 x=3.5 m

0.18

0.17

0.16
Water Height (m)

0.15

0.14

0.13

0.12 dt=0.0025 s
dx=0.0625 m

0.11

0.1
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5

Time (s)

Figure 3.5: Water height against time, using a ner grid.

In Roe's scheme we are basically making two approximations,

 Solving each Riemann problem in a approximate manner.

 Re-averaging the solutions to recover piece-wise constant states.

In Roe's scheme, we obtain an approximate solution to each Riemann problem by

assuming that the characteristic speeds are constant; we take some kind of average

for these constant values. This could be the problem, since the characteristic

speeds do not vary smoothly near the pressurized/free surface interface. This

hypothesis can be tested, by trying other approximate Riemann solvers which

21
can, perhaps, take account of the sharp variation in a better way. This will be

our next task.

22
Chapter 4
The Osher and Solomon Scheme
This scheme was used, in order to see if the oscillations observed with Roe's

scheme are a peculiarity of Roe's scheme, or whether other schemes su er from

them. See [7] for much more detail on the scheme.

4.1 Description of the Scheme [7]


The Osher and Solomon scheme is the Engquist-Osher scheme generalised to

systems. For the scalar conservation law

@w ( )
@f w
+ = 0; ( 0) = (x)
w x;
@t @x

the Engquist-Osher scheme is as follows

n+1 t
wj = wjn (f (wjn+1 ) f (wjn ) + f+ (wjn ) (
f+ wj
n
1 ))
x

0
wj = (j x)

Here
Z u
f+ u ( )= ( ) 0(s)ds
 s f
0

23
Z u
f (u) = (1 ( ))f 0(s)ds
 s
0

where
( )=1
 u , f
0 (u) > 0

( )=0
 u , f
0 (u)  0:

We can also write the scheme as follows


!
n+1 n t Z wjn 0
Z wjn+1
0
wj = wj (w )f (w )dw + (1 (w ))f (w )dw
x wjn 1 wjn

This can be extended to a system in the following way


!
t Z wjn Z wjn+1
wjn+1 = wjn (w)J (w)dw + (I  (w))J (w)dw
x wjn 1 wjn

where J is the Jacobian and  is some matrix that needs to be chosen. We also

need to choose the paths of integration.

Let the eigenvalues of J be denoted by 1 (w) < 2 (w) < ... < m (w) with

corresponding eigenvectors e1 (w); e2 (w); . . . ; em (w). Let T (w) be the matrix

whose j
th
column is ej (w), then we have that

T
1
(w)J (w)T (w) = diagfk (w)g:

De ning (w) by

1
T (w)diagf1 + sign(k (w ))gT
1
 (w) = (w)
2

we have

 (w)J (w) = T (w)diagfmax(k (w); 0)gT 1 (w) = J + (w)

(I  (w))J (w) = T (w)diagfmin(k (w); 0)gT 1 (w) = J (w)

If j
is the path connecting wj 1 to wj , then we decompose this curve into

m sub-curves
j
[
m
j
= k:
k=1

24
These sub-curves are related to rarefaction or compression wave solutions and are

de ned by
8
>
> (k)
for either 0  s  s(kj ) or 0  s  s(kj )
dw
>
< = ek
j
k = >
ds
>
>
: w(k) (0) = w(k+1) (s(kj+1
)
)
with
(j ) (j )
w(m+1) (sm+1 ) = wj 1 and w(1) (s1 ) = wj :

The scheme can now be written as


"m Z Z !#
n+1 n t X +
wj = wj J (w)dw + J (w)dw
x k=1 j
k
j +1
k

If the k eld is genuinely non-linear, it turns out


th
that (see [7])
8
>
>
>
>
>
> F(w(k 1) (0)) F(w(k) (0)) if k > 0 & +
k > 0
>
>
>
>
>
>
Z
+
>
< F(w(k 1) (0)) F(w  jk ) if k > 0 & +
k 0
J (w)dw =
j >
>
>
k >
>
>
> F(w jk ) F(w(k) (0)) if k 0 & +
k > 0
>
>
>
>
>
>
: 0 if k 0 & +
k 0
and
8
>
>
>
>
>
>
>
F(w(k 1) (0)) F(w(k) (0)) if k 0 & +
k 0
>
>
>
>
>
Z >
< F(w(k 1) (0)) F(w  jk ) if k 0 & +
k > 0
j
J (w)dw = >
>
>
k >
>
>
> F(w jk ) F(w(k) (0)) if k > 0 & +
k 0
>
>
>
>
>
>
: 0 if k > 0 & +
k > 0

where k+ = k (w(k) (0)) and k = k (w(k 1)


(0)). There exists at most one point

(j ) at which
sk k (w(k) (s(kj ) )) = 0. Call this point w
 jk = w(k) (s(kj ) ), a sonic point.

4.2 Scheme for Open Channel Equations


We return now to the open channel equations for which m = 2. Both elds are
j
genuinely nonlinear, so we can use the above to calculate the integrals. 1 is

25
given by

(s) = A2 (s(2j )) + s
A
1

2 Z 3
s c(A2 (s(j )) +  ) 2 (j )
( )
Q (s) = (A (s2 ) + s) 4
1 2 (j ) 2 Q s 2 5
d +
(j ) (j )
A (s 2 ) +  A (s 2 )
0 2 2

j
2 is given by
2
A (s) = Aj 1 + s
"Z s #
2 c(Aj 1 ) +  ) Qj 1
Q (s) = (Aj 1 + s) d +
0 Aj 1 +  Aj 1

Using A1(s(1j ) ) = Aj and Q1 (s(1j ) ) = Qj , we can nd an explicit, but long equation

for s2j in terms of Aj 1 ; Qj 1 ; Aj and Qj . It is now very straightforward to apply

the scheme. We need the CFL condition

t
max(j1 j; j2 j) 1
x

to ensure that neighbouring Riemann problems do not interact.

For this scheme it is best to implement the source terms in a pointwise manner,

i.e.
"m Z Z !#
t X
wjn+1 = wjn J
+
(w)dw + J (w)dw + D(wjn )t:
x k=1 j
k
j +1
k

Implementing boundary conditions is more dicult for this scheme than for

Roe's scheme. The crude way that was used for this work was as follows. At the

boundary use only the valid part of the scheme. E.g. at the left hand boundary
"m Z !#
n+1 n t X
w0 = w0 J (w)dw + D(w0n )t:
x k=1 1
k

n+1
The new value of A0 is then directly written in.

Unlike Roe's scheme, all solutions given by the Osher and Solomon scheme

are entropy satisfying (see [7]).

26
4.3 Results and Discussion
The Osher and Solomon scheme solves each Riemann problem approximately,

but in a di erent way to Roe. This could have some e ect on the oscillations,

and in fact it does. This can be seen from gure 4.1, which shows a comparison

of the results from this scheme against those from Roe. The oscillations are

considerably larger than those from Roe; this was not expected, because the

scheme's approximate Riemann solver is more elaborate than that of Roe, and

should take better account of the sharp variation of the characteristic wave speeds

near the front.


x=3.5 m
0.2

0.19

0.18

0.17
Water Height (m)

0.16

0.15

0.14
Osher and
0.13 Solomon
0.12 Roe
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 4.1: Comparison of results from Osher & Solomon against those from Roe.

The next step is to go one better, and solve each Riemann problem exactly

before we re-average.

27
Chapter 5
Godunov's Scheme
After observing that both Roe's scheme and the Osher and Solomon scheme

both su er from the oscillations, the following question must be asked; are the

oscillations due to the approximate nature of the Riemann solvers? This was

tested by using the exact Riemann solver, i.e. using Godunov's method.

5.1 The Exact Riemann Solver for the Open


Channel Equations
The Riemann problem
@w @F (w)
+ =0
@t @x
8
>
>
>
< wL if x < 0
w(x; 0) =
>
>
>
: wR if x > 0

has a solution which just depends on the ratio x=t . Call it w(R)(x=t; wL ; wR ).

The solution is given by two waves of di erent speeds, separated by a constant

state. Each of these waves will either be a shock wave or a rarefaction wave

28
(see [11]). Let us de ne the following curves in the (A; Q) plane,

1 (w0 ) = f(A; Q); A  0; v + h(A) = v0 + h(A0)g

2 (w0 ) = f(A; Q); A  0; v


( ) = v0 h(A0)g
h A

8 " #1=29
< I1 (A) I1 (A0 )
=
S1 (w0 ) = (A; Q); A  0; v = v0 ( A0 )
: A
(A A0)AA0 ;
8 " # 1 =2 9
< I1 (A) I1 (A0 )
=
S2 (w0 ) = ( A; Q); A  0; v = v0 + (A A0 )
: (A A0)AA0 ;:
Q Q0
Z A c(s)
v = ; ; v0 = and h(A) = ? ds
A A0 A s

A
?
 0 is some arbitrary reference state.
1 (w0 ) represents the states w that can be connected to w0 on the right by

either a 1-shock or a 1-rarefaction. 2 (w0 ) represents the states w that can be

connected to w0 on the left by either a 2-shock or a 2-rarefaction (see [13] for

more details)

1 (w0 ) = fw; A  0; w 2 1 (w0 ) if A  A0; w 2 S1 (w0 ) if A > A0g

2 (w0 ) = fw; A  0; w 2 2 (w0 ) if A  A0; w 2 S2 (w0 ) if A > A0g

If we solve exactly each Riemann problem, and then calculate the cell averages

at the new time level, we get the Godunov scheme

t
wjn+1 = wJn (F(w(jR+1) =2 ) (R )
F(wj 1=2 ))
x

where w(jR+1) =2 = w(R)(0; wjn ; wjn+1 ).

We need the CFL condition

t
max(j1 j; j2 j) 1
x

29
0.05

0.04

0.03

wL
0.02

0.01
( wL )
Q

0.0
w

-0.01

wR
-0.02

( wR )
-0.03

-0.04

-0.05
0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11

Figure 5.1: Riemann curves.

to ensure that neighbouring Riemann problems do not interact. See [4] , [3] pp.

56 and [5] pp. 444.

The following algorithm calculates ws = w(R) (0; wL ; wR ) (see [13]).


8
>
>
>
>
>
> if A  AL and 1 (wL )  0;
>
>
<
ws = wL or
>
>
>
>
>
>
>
: if A  AL and Q  QL;
>

8
>
>
>
>
>
> if A  AR and 2 (wR )  0;
>
>
<
ws = wR or
>
>
>
>
>
>
>
: if A  AR and Q  QR;
>

30
ws = 1 (wL ) \f
1 = 0g if 1 (wL ) < 0  1 (w
 );

ws = 2 (wR ) \f 2 = 0g if 2 (w
 ) < 0  2 (wR );

ws 
=w in other cases.


w is given by the non-trivial intersection of 1 (wL) and 2 (wR ) (see gure 5.1).

This is the constant state in the solution of the Riemann problem. A non-linear

.
equation needs to be solved, in order to calculate w

The source term D is implemented in a pointwise manner, the same as in the

Osher and Solomon scheme.

The boundary conditions are implemented by calculating an imaginary state

w? next to the boundary (outside region) such that, when using the scheme on

the boundary, it results in the correct value being given to A.

31
5.2 Results and Discussion
In Godunov's scheme we are solving each Riemann problem exactly, before we

re-average. This process is much more time consuming than the previous two

schemes. Any errors that come from this scheme are due solely to the re-averaging

process. Figure 5.2 shows results for Godunov, against those from Roe. There is a

slight improvement in the oscillations; the rst oscillation has a smaller amplitude.

0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14
Godunov
0.13

0.12 Roe
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 5.2: Comparison of results from Godunov against those from Roe.

These results indicate that it is not the approximate Riemann solvers that

are to blame, but the re-averaging process; hence we are unlikely to improve

the situation by solely modifying the Riemann solvers while keeping piecewise

constant states.

32
Chapter 6
Smoothing Techniques

6.1 Smoothing Eigenvalues


10 t=3.000 s dx=0.125 m
9
8 dt=0.005 s
7
6
5
4
3
Eigenvalues

2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0

Distance along channel (m)

Figure 6.1: Eigenvalues from Roe's scheme.

33
Figure 6.1 is a plot of the sets of eigenvalues,f1;j +1=2 g; f2;j +1=2 g from Roe's

scheme. The sharp change in the eigenvalues occurs where the ow changes from

being above the sot to below it. It was thought that these sharp jumps were

the cause of the oscillations. To test this, the eigenvalues were processed, after

being calculated, so as to reduce the sharpness of the jump. These new sets of

eigenvalues,f?1;j +1=2 g; f?2;j +1=2 g, were then used in the calculation of all further

quantities. The `smoothing' process was carried out for each time step, and in

the following way,

?
i;j +1=2 = i;j +1=2 + tj2+1=2i;j +1=2

i = 1; 2 and j = 1; . . . . . . ; N 2, where

2 i;j 1=2 2i;j +1=2 + i;j +3=2


j +1=2 i;j +1=2 =
x2

and  is a free parameter.

6.1.1 Results and Discussion

Figure 6.2 shows the modi ed eigenvalues, at the same time as in gure 6.1.

These have been generated from the modi ed scheme, using smoothing at each

time step. The value used for  was 0:5. Figure 6.3 shows the corresponding time

history for this modi ed scheme, compared to normal Roe.

There is signi cant improvement in the oscillations, however we have slightly

modi ed the other properties of the solution. Notice in particular the loss in

height at, and after the oscillations; this loss is not recovered later on in time.

Increasing  results in the oscillations being reduced in size, however, the deteri-

oration described above increases. As we reduce  the oscillations grow, and the

34
10 t=3.000 s dx=0.125 m
9
8 dt=0.005 s
7
6
5
4

Modified eigenvalues
3
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0

Distance along channel (m)

Figure 6.2: Modi ed eigenvalues from using the modi ed Roe's scheme ( = 0:5)

solution tends to the unmodi ed Roe solution. It appears, visually, that an  of

about 0:5 gives the best compromise between size of oscillations, and deterioration

of solution.

This method is not a very elegant and convincing way of doing things. How-

ever, it indicates that the size of oscillations is related to the sharpness of the

jump in the wave speeds. Next we shall see a way of doing virtually the same

thing, but in a more elegant way.

35
0.2 x=3.5 m

0.19

0.18

0.17
Height of Water (m)

0.16

0.15

0.14

0.13 smoothing
0.12 ( =0.5)
dx=0.125 dt=0.005 Roe
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0

Time (s)
Figure 6.3: Results using modi ed Roe's scheme ( = 0:5)

36
6.2 Sloped Roof Technique
The sharp jump in the eigenvalues, in Roe's scheme, is due to the sudden jump

in the channel width from wch to wsl . Another way to make the jump in the

eigenvalues less sharp, is to make the channel go from width wch to width wsl in a

continuous manner. The simplest way of doing this is to make the channel width

vary linearly from wch to wsl in a height 2. See gure 6.4.

- slw

 H
H ?
?
6 

HHH 6 

6
hch

?  wch -

Figure 6.4: Channel with sloped roof.

The channel width is then given as follows,


8
>
>
>
>
>
> wsl if h  hch + 
>
>
< (w wch )(h hch ) (w + wsl )
b(h) = (6:1)
sl
>
> + ch if hch  < h < hch + 
>
> 2 2
>
>
>
>
: wch if h  hch 

This is the only way that could be found of continuously varying the width such as

to make such things as the integral I1 and the hydraulic radius easy to calculate.

Since the slot is just a mechanism for simulating pressurized ow, using the

37
open channel equations, we are not losing much by this alteration as long as  is

small. Also when the water is above the linearly varied width region (h > hch + ),

the wetted area for a given height will be the same as if we had not made the

alteration. This is because we have not created any new volume in the channel.

Figure 6.5 shows the integral I1 for the modi ed channel; I1 is now di eren-

tiable at A = Acrit. Moreover c ( gure 6.6) is now continuous at this point, and

its smoothness can be controlled by varying .

0.16

0.14

0.12

0.1
=0.075hch
0.08
I1(A)

0.06

0.04

0.02
A=Acrit
0.0
0.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
A

Figure 6.5: ( ) for modi ed channel ( = 0:075hch ).


I1 A

6.2.1 Results and Discussion

For this technique we have to make the same compromise as for the method

in section 6.1. Figure 6.7 shows the results for  = 0:075hch ; they are slightly

38
9

6 =0.075hch

4
c(A)

1 A=Acrit
0
0.0 0.02 0.04 0.06 0.08 0.1
A

Figure 6.6: c(A) for modi ed channel ( = 0:075hch ).

better than when smoothing the eigenvalues, since we do not lose height after

the oscillations as in that method. Figure 6.8 shows the results for  = 0:11hch ;

notice the further deterioration of the solution, but the smaller oscillations. An

 of about 0:075hch was found to give, visually, the best results.

39
0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14

0.13 Modified
Channel
0.12 =0.075hch
dx=0.125 m dt=0.005 s
0.11 Roe

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 6.7: Results using modi ed channel ( = 0:075hch ), against unmodi ed

channel.

40
0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14 Modified
0.13 Channel
=0.11hch
0.12 Roe
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 6.8: Results using modi ed channel ( = 0:11hch ), against unmodi ed

channel.

41
Chapter 7
Di erent Schemes Using Roe
Decomposition
Roe's scheme can be written in the following form

Wn+1 Wn
= G(Wn ) (7:1)
t

where 2 3 2 3
66 w0n 77 66 g0 77
66 77 66 7
66 wn 77 66 g 777
Wn = 6
6 1 77 ; G(W) = 66 1 77 :
66 . 77 66 . 77
66 .. 77 66 .. 77
64 75 64 75
n
wN gN

gj is the Roe approximation of


!
@F (w )
+D
@x
x=j x

using the states W. Where we mean the usual Roe approximation to the space

derivative of F and the upwinding approximation to D (as in section 3.1).

42
7.1 Implicit Roe's Scheme
One way to make Roe's scheme implicit is in the following way,

Wn+1 Wn
= G(Wn+ )
t

where

Wn+ = (1  )Wn + Wn+1 :

An iterative method is needed to carry out this scheme, since Wn+1 is unknown.

We initially set Wn+1 = Wn , then use the scheme to calculate a better approx-

imation to Wn+1 ; this value is then used to get a better approximation, and so

on. We stop the process when we have got an accurate enough value. Of course

we need to implement the boundary conditions as usual, after the iteration has

converged.

Implicit schemes are well known to be more stable, than their corresponding

explicit schemes. This probably contributes to a good improvement in the os-

cillations; see gure 7.1 for results for  = 1. There is a similar improvement

as for the smoothing techniques, but in this case there is no deterioration in the

solution. The implicit scheme is much more time consuming than the explicit

version, and this may make it impractical. The best value for  was found to be

1:0.

Figure 7.2 shows results from using the implicit scheme, with the modi ed

channel ( = 1;  = 0:75hch ). These are probably the best results seen so far; the

oscillations are very small, and the rest of the solution compares well with Roe.

43
0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14 Implict
0.13 Roe
( =1)
0.12
dx=0.125 m dt=0.005 s Roe
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 7.1: Results using implicit Roe's scheme ( = 1)

44
x=3.5 m
0.2

0.19

0.18

0.17
Water Height (m)

0.16

0.15

0.14
Impl. Roe
0.13 with mod. chan.
0.12 ( =1, =0.075hch)
dx=0.125 m dt=0.005s
0.11 Roe

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 7.2: Results from implicit Roe with modi ed channel.( = 1;  = 0:075hch )

45
7.2 Alternative Time Stepping
From equation 7.1 it can be seen that Roe's scheme uses Euler time stepping. It

would be an idea to try and change to a di erent time stepping, in order to see

what di erence this would make. See [10] for more information on di erent time

steppings. First we tried using Runge-Kutta fourth-order as follows,

t
Wn+1 = Wn + (K1 + 2K2 + 2K3 + K4)
6

where
K1 = G(Wn )

K2 = G(Wn + 2t K1 )

K3 = G(Wn + 2t K2 )

K4 = G(Wn + K3 ):
The Runge-Kutta fourth-order scheme results in a slight improvement in the

oscillations, but not as much as the implicit scheme in the previous section. This

can be seen from the results in gure 7.3.

Linear Multistep Methods were also tried, including implicit ones; some were

unstable and needed the CFL number reducing. None of these gave an improve-

ment better than the implicit scheme described in the previous section.

46
0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14
RK4
0.13

0.12 Roe
dt=0.125 m dr=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0

Time (s)

Figure 7.3: Runge-Kutta fourth-order time stepping.

47
Chapter 8
`Shock' Fitting

8.1 Description
There is now quite a lot of evidence indicating that the problem is due to piecewise

constant states, approximating sharply varying functions. In this problem, the

front at the pressurized/free surface interface is so sharp that we could treat it like

a discontinuity. If we were to ensure that the front was at the interface between

two grid cells, then the solution in both the neighbouring cells would be smooth;

hence piece-wise constants would then be a valid approximation. In order for us

to do this, we will need to work on a non-uniform grid and allow the grid to alter

in time. We will also need to be able to nd and keep track of the position of the

front. The following is a simple way of achieving the above, by modifying Roe's

scheme.

Step 1: Finding the Front.

Until the front develops, and is found, we proceed as before with the ordinary

Roe's scheme. The following criterion is used to identify the front, and calculate

48
its position (see [6]). The front is in cell k if all of the following hold.

rk > 0; j k 1j  1
r ; j k+1j  1
r

with
n
Ak 1  Acrit and Ak +1
n
 Acrit :

rj is given by
n n
hj hj 1
rj = n n
hj +1 hj

where n
hj is the water height corresponding to area Ajn .

wk 1 wk 1

wk
wk+1 wk+1
-

r r -x
r
(k 1=2+)x
r r -
x

(k 1=2)x (k+1=2)x (k 1=2)x (k+1=2)x

Figure 8.1: Replacement of three states by one discontinuity .

We nd the position of the front by using conservation of mass to replace

the three states near cell k (see gure 8.1), by a single discontinuity. If the

discontinuity is at xs = (k 1=2 + )x then  is given by


n n
Ak +1 Ak
 = n n :
Ak +1 Ak 1

Note that Q will only be conserved by this process if the front in Q is at the same

position as the front in A.

49
Step 2: Modi cation of Grid.

We next need to place the front at the interface, between two cells. This is done

by eliminating cell k and extending the size of its two neighbours, in such a way

that we end up with the second part of gure 8.1. We now get a new set of states,

of non-uniform size 8
>
>
?
>
< wjn if j  k 1
wj =
>
>
>
:

: wjn+1 if j > k 1
State j has width fj x, where fj is given by the following
8
>
>
>
>
>
> 1+ if j = k 1
>
>
<
fj = 2  if j = k
>
>
>
:

>
>
>
>
>
:1 otherwise:

Step 3: Application of Roe's scheme to the new set of states.

We now apply Roe's scheme to these new set of states, but because the cells

are not all the same size we need a few changes. For each Riemann problem

we calculate the eigenvalues and wave strengths exactly as before. The change

comes in the updating; the modi ed procedure is as follows. For the j th Riemann

problem we calculate and keep the following


9
~ >
>
>
i;j +1=2= ~ i >
>
>
8 ! >
>
>
>
> t ~ =
>
>
< i ~ i + t ~i ~ ei ~
if i > 0 > i = 1; 2
fj +1 x >
i;j +1=2 = ! >
>
>
>
>
> t ~ >
>
>
: i ~ i + t ~i ~ ei if i  0 >
~ >
;
fj x

This is carried out for j = 0; 1; . . . ; N 2:

We now use the following procedure to update the solution to the next time

level,

50
For j = 0; 1; . . . ; N 2
9
>
>
>
if ~ i;j +1=2 > 0 then increment wj?+1 by i;j +1=2 ; =
i = 1; 2
>
>
>
else increment wj? by i;j +1=2 : ;

Step 4: Finding the new position of front.

We now have values for the states at the new time level and we use these to nd

the new position of the front.

wk? 1

wk?
wk?+1

r r
(k 1=2+)x
t r r r -x

(k 3=2)x (k 1=2)x (k+1=2)x (k+3=2)x (k+5=2)x

Figure 8.2: Finding the new position of front using three states.

We now use the three states, shown in gure 8.2, to get the new position of

the front. We do this in the same way as step 1. The new value for  given by

? ?
!

0 = (1  )
Aj +1 Aj
? ?
Aj +1 Aj 1

Figure 8.3 shows the resulting discontinuity.

51
wk? 1

wk?+1

r r
(k 1=2+0 )x
t r r r -
x

(k 3=2)x (k 1=2)x (k+1=2)x (k+3=2)x (k+5=2)x

Figure 8.3: New position of discontinuity.

Step 5: Recovering the original uniform states.

We now wish to get values for the original uniform grid that we started with.

There is no unique way of doing this. After trying several ways, it was found that

the following worked best,


8
>
>
>
>
>
>
>
wj? if j  k 1
>
>
>
>
>
>
< z1 if j =k
wjn+1 =>
>
>
>
>
> z2 if j =k+1
>
>
>
>
>
>
>
: wj? 1 if j  k +2

where z1 ; z2 will be de ned below.

In order to x up z1 and z2 we need two pieces of information. The two things

chosen were conservation and the position of the front. Depending on the value

of 0 we needed to do the following.

52
If 0  1 then the front has not moved cells. From conservation we get

z1 + z2 = 0 wk? 1 + (1 
0 )w?
k+1 :

The new position of the front gives

0 w? + (1 0 )z = z :
 k 1  2 1

We solve these two equations for z1 and z2 .

If 0 > 1 then the front has moved one cell to the right. From conservation

we get

z1 + z2 = 0 wk? 1 + (1 
0 )w?
k+1 :

The new position of the front gives

(0 1)z1 + (2 
0)w?
k+1 = z2 :

We solve these two equations for z1 and z2 .

We are now in the position to do another time step. We now know the new

position of the front, so we need never repeat step 1 again; we can just start with

step 2.

53
8.2 Results and Discussion
Figure 8.4 shows result for this `shock' tting method. The results are extremely

good; there is not a sign of an oscillation. The solution behaves slightly peculiarly

just before the height starts to rise sharply, and again after it has nished rising

(see magni ed regions in gure). These peculiarities do not appear to be too

0.2
x=3.5 m
0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14

0.13

0.12 dx=0.125 m dt=0.005 s

0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 8.4: Results with `shock' tting.

serious, and are much better than having oscillations. Figure 8.5 is a comparison

of these results against Roe. From this it seems as if we have a slight deterioration

in the solution. If we run Roe on an eight times ner grid with an eight times

smaller time step, it can be seen, from gure 8.6 that the `shock' tting method

compares very well with the results.

54
x=3.5 m

0.2

0.19

0.18
Water Height (m)

0.17

0.16

0.15

0.14
‘Shock’
0.13 Fitting
0.12 Roe
dx=0.125 m dt=0.005 s
0.11

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0
Time (s)

Figure 8.5: Results with `shock' tting compared with Roe.

55
0.2 x=3.5 m

0.19

0.18

0.17

0.16
Water Height (m)

0.15

0.14

0.13

0.12
‘Shock’ fitting dx=0.125m, dt=0.005s

0.11
Roe dx=0.01562m, dt=0.00062s

0.1
0.0 1.0 2.0 3.0 4.0 5.0 6.0

Time (s)
Figure 8.6: Results with `shock' tting compared with Roe on a very ne grid.

This `shock' tting approach seems very promising, and has plenty of scope

for improvement, especially in step 5. It should not be too hard to make a more

re ned version. The scheme is to all intents and purposes conservative. The only

slight exception, is when we nd the front for the rst time. At this time we

assume the fronts in both Q and A are at the same position. This assumption

does not appear to be too unreasonable.

An alternative process to that described in this chapter is, instead of elimi-

nating a cell, to subdivide the cell containing the front. The major drawback of

this alternative way is that we will sometimes get very small cells. This results

in us needing a very small time step, in order to satisfy the CFL condition. By

extending the cells we are sure that the minimum cell size is always x.

56
Chapter 9
Conclusions
Throughout this work, we have been unable to pinpoint, exactly, the cause of the

oscillations; however it is felt that we have gone some way to understanding the

cause.

In chapter 5 it was concluded that the approximate nature of the Riemann

solvers was not a signi cant factor in causing the oscillations. The approximation

of piecewise constant states seemed to play a much bigger part. The rst signif-

icant improvement in the oscillations was found with the smoothing techniques,

however these are seriously limited by the deterioration of the solution. The

implicit scheme from section 7.1 did not cause such deterioration, but was very

slow, and has limited scope for improvement. The most promising method found

was the `shock' tting approach in chapter 8. For our problem this approach

gave very good results, with the total elimination of the oscillations, although we

have found that for a more severe problem where the pressurized ow has a more

realistic wave celerity, the oscillations do return. Given time, there is much scope

for improving and re ning this method, and it seems likely that this is the most

57
fruitful direction. Another approach that might be considered is increasing the

order of approximation, eg. using piecewise linears.

58
Bibliography
[1] Baines,M.J. & Mao,A. & Di Flippo,A., Unsteady 1-D Flows with

Steep Waves in Plant Channels: The Use of Roe's Upwind TVD Di erence

Scheme. Advances in Water Resources, v. 15, 1992, pp. 89-94.

[2] Cunge,J.A. & Holly,F.M. & Verwey,.A., Practical Aspects of Compu-

tational River Hydraulics. Pitman Advanced Publishing Program, 1980.

[3] Emmerson,S., Modelling of Transient Dynamics of Gas Flow in Pipes.

Ph.D. Thesis, University of Reading, 1991.

[4] Godunov,S.K., A Finite Di erence Method for the Numerical Computation

of Discontinuous Solutions of the Equations of Fluid Dynamics. Mat.Sb. v.

47, 1959, pp. 271-306.

[5] Hirsch,C., Numerical Computation of Internal and External Flows. Volume

2: Computational Methods for Inviscid and Viscous Flows. John Wiley &

Sons, 1990.

[6] Morton,K.W. & Sweby,P.K., A Comparison of Flux Limited Di erence

Methods and Characteristic Galerkin Methods for Shock Modelling. Journal

of Computational Physics. v.73, 1987, pp. 203-230.

59
[7] Osher,S. & Solomon,F., Upwind Di erence Schemes for Hyperbolic Sys-

tems of Conservation Laws. Mathematics of Computation. v. 38, 1982, pp.

339-374.

[8] Priestly,A., Roe Type Schemes for the 2-D Shallow Water Equations. Read-

ing University Numerical Analysis Report 8/87.

[9] Roe,P.L., Approximate Riemann Solvers, Parameter Vectors, and Di er-

ence Schemes. Journal of Computational Physics. v.43, 1981, pp. 357-372.

[10] Shu,C-W., Total-Variation-Diminishing Time Discretizations. SIAM J. Sci.

Stat. Comput. v. 9, 1988, pp. 1073-1084

[11] Smoller,J., Shock Waves and Reaction-Di usion Equations. Springer-

Verlag, 1983.

[12] Stoker,J.J., Water Waves: The Mathematical Theory with Applications.

Interscience publishers, Inc., New York, 1957.

[13] Vila,J.P., Simpli ed Godunov Schemes For 2x2 Systems of Conservation

Laws. J. Numer. Anal. v. 23, 1986, pp. 1173-1191.

[14] Wiggert,D.C., Transient Flow In Free-Surface, Pressurized Systems. Jour-

nal of the Hydraulics Division, Proceedings of the American Society of Civil

Engineers, v.98 No. HY1, 1972, pp. 11-27.

60

You might also like