You are on page 1of 13

CHAPTER 8

NumericalSolutionof the Unsteady


FlowEquations

8.1
INTRODUCTION
Severalnumericaltechniqueshave been developedto solve the panial differential
equationsof unsteadyflow. Some of thesetechniquesare more applicablein specific typesof engineeringproblems than in others.The purposeof this chapter and
the next one is to introduce the engineerto the more commonlv used techniques,
especiallythosefound in well,known commercialcodes,as well as ro assistin identifying the most appropriatetechniquefor a given problem. This chaprerconcentrateson solving the govcming equationsdevelopedin Chapter ? with no major
simplifications.Chapter 9 considerssimplified forms of the gorerning equarions
and correspondingnumerical solution techniquesthat often are employedin some
types of flood routing problems.
The methodsdevelopedin this chapterdependon approximationsof the derivatives in the goveming equations, either in characteristicform or in the original partial differential form. The major difference between the two approachesis tiat the
derivatives are approximated on the characteristic grid along rhe characteristics
themselvesin the caseof the characteristicform of the equationsor on a fixed rectangularr-l grid in the caseof the original panial differentialequations.The former
case is refened to as the method of characte ristics,while the laner includes both
explicit and implicit finite difference methods.Explicit finire differencemerhods
advancethe solution to the end of the time step at a single grid node, using an
explicit tunction of the dependentvariablesalready determinedfor several grid
nodes at the beginning of the time step. Implicit methods, on rhe other hand,
approximatethe derivativesusing values of the dependentvariablesboth at the
beginningof the time step, where they are krown, and at the end of the time step

296

Cnrlttl

8: \LrnlericalSolutionof the Unsteady


Flo\\'Equarions

fcrrmore than one grid node,u'herethe dependentvariablcsare unknown. In the latter case,a systemof simultaneouseqLrations
must be solvedto adlance the solution
by one time step.
The method of characteristicsgenerallyis utilized only in special cases,often
as a check on some other nrethod.However,it frequentlyis used in explicit finite
differencetcchniquesfor a more accurateapproxinlationof boundary conditions.
The explicit finite differencemethodis usedin problenrsof rapid transientssuchas
those in the headraceor tailraceof hydroelectricturbine operarions.A nunrberof
readily available codes such as BRANCH (Schaffranek,Baltzer. and Goldberg
l98l), FLDWAV (Fread and l-ewis 1995),and UNET (U.S. Army Corps of Engineers 1995) inrplement the implicit finite differencenrethodto solve problemsof
flood routing and dam brcaks.
ln contrastto finite differencemethods.finite clement methods approximate
the solution rather than the differentialequrtions by using polynonial shapefunctions that dcpend on the unknown nodal valuesof the dependentvariablcs.In rhe
Galerkin approach,the residualsbetweenthe approximatesolution and the exact
solution are minimized by integratingthe product of weighting functions and the
residualover the solution domain of finite elementsand setting the result to zero.
The finite element method has bcen applied to problems of discontinuousopen
channelflow causedby surges(Katopedesand Wu 1986).Becauseit is not usedas
extensivelyas finite differencemethodsin widely availablenumericalcodesfor the
solution of the one-dinensionalunsteadyflow equations,it is nor discussedhere.
In finite differencetechniques,the continuousgoverningequarionsare approximated and transformedinto discretedifferenceequationsllhercfore, it is essential
that methodsbe chosen for which the truncationerror in the approximationof $e
equationgoes to zero as the time step,At, and spatialstep..&. approachzero.Such
a condition is refened to as colrsiste/rc)(Ames 1969).Without consistency.extraneous terms that are incompatiblewith the original differential equationsmay be
introduced.Consistencyalone,however,may not guaranteethe ultimate goal of the
finite differenceapproximationof the governingequations,which is for the solution to approachthe true solution as Ar, Ar -J 0; that is, converge.If small errors
such as roundoff errors grow during the numericalsolution process.then the solution becomesunstable,so that the enor grows without bound, swamping the true
solution and preventing convergence.
The pitfall of instability is rhat a perfecrly
reasonablefinite differenceapproximationcan lead to garbagefor a solution.The
remedy may be to place limits on the discretizationsize,but in some casesit may
be necessaryto switch to a completelydifferentapproximationscheme.Such difficulties can cause unacceptablemistakesthrough uninforned use of commercial
codes or casualprogramming of seeminglystraightforwardfinite differencetechniques,as is illustratedin this chapter.
Application of numerical techniquesin hydraulicshas become commonplace
as computershave become more powerful. Desktopcomputersthat are as fast as
mainframecomputersof a only a decadeago are very affordable.In addition.cumberso:ne batch processing and text-basedoutput have been replaced by userfriendly program interfacesand colorful graphics.In this environment of readily
accessiblecomputationalhydraulics,the importanceof proper calibration and ver-

CHApTER8: Nunrerical
Solutionofthe Unsteady
Flow Equations 29'/
ification of numerical models of unsteadyflow cannot be overenrphasized.
Application of any of the numerical techniquesdiscussedin the next two chapters
rcquirescomparisonsof computedresuitswith measurements
in the field or laboratory and appropriateadjusttnentof calibrationfactorsthat have physical validity.
The model also should be verified with entirely different data sets from thoseused
in the calibrationprocedure.It is insufficientto acceptnumericalnrodel resultson
the basisof qualitativesimilarity with what might be expectedto occur. Engineers
must be demandingof numericalmethodsand neverignorethe crucial link between
numericalanalysisand laboratoryand field data.

8.2
I\{ETHODOF CHARACI'ERISTICS
As discussed
in Chapter7, the transfonnation
of the equations
of unsteadyflow
into characteristic
form givesrise to two familiesof characteristics
that form a kind
of naturalcoordinate
s)'stemthatis partof thesolution.In thenumericalmethodof
characteristics,
a numericalsolutionof thc tlansformed
equations
is soughtalongthe
characteristic
directions,
Cl andC2.With reference
to Figure8.1,*'e seeka solution for velocityy anddepth) at pointP in thecharacteristic
planeasa functionof
vadablesat L and R. For simplicity,the rectangular
the valuesof the dependent

ty

XL

xp XR

FIGURE 8.1
Numericalsolutionof the govemingequationsin characteristicform on the characteristic
gnd.

298

Flow tquations
Cs,qpret 8: NunrericalSolutionofthe Unsteady

channel case is considcred so that the characteristicequalions to be solved are


Equations 7 .22 of Chapter 1 . The equations can be wrilten in integrated form as
Vp+2cp=Vt*2cy

.l,'

8(So

Sr) dt

xp-xL+f'{u*.o
) ,
Vp- 2cp: Vt z.^+
x p : , r R+

s/)dr
f s(So

[,_'tr,

oo,

(8.1)
(8.2)
(8.3)
(8.4)

in which c : (.gr-)'o.Nowby evaluating


the integralsapproximatelyusingthe
rule,Equations8.1to 8.4 in discreteform become
trapezoidal
V r i 2 c r : V r - r 2 c , + j ( r " - r r ) [ g ( S ,- S 7 p )+ g ( S o- S 7 r ) J ( 8 . 5 )
(8.6)
xc - xt : ! Q, - tr)(V, * cp 't V1 r c1)
V p - 2 c p : V ^ - 2 c a+ j ( r " - r * ) l g ( S s- S y " )+ g ( S o- S 7 n ) l ( 8 . 7 )
Xr - xn : L,(tp - t;(Vp - c, I V^ - c^)

(8.8)

The discreteforms given in Equations8.5 to 8.8 alsocould havebeenobtained


from a forwarddifferenceapproximation
of thederivativcs,
asdescribed
in Appendix A, and takingthe meanvalueof the integrandbetweenpointsZ and P and
pointsR andP. In an1'case,
the resultis four nonlinearalgebraicequations
in the
unknownvaluesx", tr, Vr, andc", whichhaveto be solvedby tteratron.
One methodof iterationbeginsby seningV" andr" cqualto yL andc., respectively,on theright handsideof (8.6) andequalto V^ andc^, respectively,
on theright
handsideof (8.8)and solvingfor,t" andt". Then,by setting+p - S/Lon theright
handsideof (8.5)and S/p= S/non therighthandsideof (8.7)andusingtheinitial
valueof t" just computedin the previousstep,(8.5)and(8.7)canbe solvedfor V"
andcr. Thereafter,the new valuesof V" andc" aresubstituted
on the right handsides
of (8.6)and(8.8)to obtainnew valuesof .r" andt"; then(8.5)and (8.7)aresolved
for thenextvaluesof V" andc" in iterativefashion.LiggettandCunge(1975)suggestedan iterationmethodwith improvedconvergence
properties
thatdefinestwo
residualfunctionsfrom (8.5)and(8.7)thataredrivento zeroby Newton-Raphson
Iterauon.
Regardless
of the iterativeprocedureused,the solutionis obtainedon the
:-r grid at irregularintervalsdetermined
as shownin Figure
by thecharacteristics,
properties
if theyareknownonly at fixed
8.I . Thisrequiresinterpolation
of channel
grid intervalsof x. In addition,the final solutionmustbe interpolated
if the water
surfaceprofile is desiredat a specifiedtime or if a stagehydrographis requiredat
a specifiedlocation,for example.This inconvenience
is overcomeby the Hartree
method,alsocalled the methodof specrfedtime intervals.

CHApTER 8: Numerical Solution of lhe UnsteadvFlow Eouations

299

^{

A R

I
t

l
,\x

FIGURE 8.2
Numericalsolutionby the methodof specified
time intervals
on thecharactedstic
grid overgrid.
laid on a rectangular

In the Hanree method, fixed time intervals and uniform spatial intervalsare
specified,and the solution at point P is projectedbackwardin time to points R and
S, as shown in Figure 8.2. In this case,the generalnonrectangularcross sectionis
considered,so that the equationsof interest are (7.21a-d). The finitc difference
approximationsof the derivativesalong the characteristicsare substituted,and the
resultingdiscreteequationsare given by

vp- vR+fi {-t"- r^) = s(s,- .s/^)Ar


rp - xn = (V* + c^)Ar
V, - V, -.q {,," - .rr) : g(Se- S75)Ar
rc-rs:(Vr-cr)Ar

(8.e)
(8.10)
(8.1l)
(8.12)

To avoidileration,tie valuesof {, andwavecelerity,c, in (8.9)and(8.I 1) areevaluatedat pointsR and5, wheretheyareknown,asaretherighthandsidesof (8.10)


and(8.12).Strictlyspeaking,the Hartreemethodusesa second-order
approximation in which the mean valuesof Sr,c, and y 1 c betweenpointsR and P and
betweenpointsS and P are substituted
in the finitedifference
approximation.
The
first-ordermethodsuggested
by Wylie and Streeter(1978)is presented
herefor

300

CHApTER8: NumericalSolutionofthe Unsteady


Flow Eqtrations

simplicity. In either case,the valuesof the dependentvariablesat R and S havc to


be determinedby interpolationbeforethey are known. [f linear interpolationis utiIized, for the velocity at point R with referenceto Figure 8.2, *'e have

Vc-Vn
Vc-V^

- r(V* + c*)

Ax

in which r - Al/i1!r and Equation8.10 is used to substitutefor (r"


ilar intcrpolation,the value of cRcan be obtainedfrom

= r(V^ + c^)

(8.l3)
r^). In a sirn-

( 8 .l 4 )

If we solve for V^ and c^ from (8. l3) and (8. l4), we have

vR

cI

V, L r(

Vrc^ + crV^)

| + r(V,-

V^|

cr- c^)

cc*rV*(co-cc)
| + r(cr-

( 8 .l 5 )
( 8 .l 6 )

c^)

In the same manner,the valuesof V" and c" can be obtainedfrom


VJ

V, I r\crV"

ctVc)

l+r(-Vr*Vu*cg-c6)

gqjj.Yr(.. _, ,,,)

(8.r7)
(8.18)

l*r(c6-c6)

These interpolationsassune subcriticalflow, as shown in Figure 8.2, and would


have to be rederived for supercritical flow. Now, with the dependent variables
known at R and S, we can subtract(8.1I ) from (8.9) and solve for _1"to give

r I +
f(v"
+ .".rl-f
"t'": (." * .r)
.r'"c,
frsc*

v ) (S/R
^.^.
^ , . l l .(8.19)
- .ts)Arl.l

Then,it followsfrom (8.9)thatyp is givenby


Vp=Vn

St
\

l D

(8

\'D

l-

( S , "- S e ) g J r

(8.20)

Equations
with the interpola(ion
8.19and 8.20,together
equations,
canbe usedto
solveexpiicitlyfor y and,yat all interiorpointsof ther-r plane.beginningwith the
initialconditions
specified
on the-raxis.At therightandleft boundaries
for subcritical flow, (8.9)and (8.1l) aresolvedsimultaneously
with the boundaryconditions.
The tirnestep,however,mustbe chosensuchtha(theCourantconditionis satisfied
for all grid pointsat a giventimelevelunlessthemodifications
suggested
by GoldbergandWylie ( 1983)for an implicittimelineinterpolation
are implemenred.

CH -\pTt,R 1l: Nunre.rcalSolution of thc Lnsteady flou Eouations

Headrace

301

:----+ o(l)

Fieservoir

Turbine

o= o0(r)

Ho- constant
tL

!++

Pftrl-J ,
I'IGURE8.3
Boundary conditionsfor the hydroclectricturbine Ioad acceptanceproblem.

8.3
BOUNDARY
CONDITIONS
As an initial illustration of the applicationof boundary conditions, considerthe
hydroelectricturbine load acceptance/rejection
problem shown in Figure 8.3. The
reservoirat the upstreamend supplieswater to a headracechannel,which in turn
conveysthe dischargeto the turbine shown schematicallyat the downstreamend
althoughin reality it is at the bottom of the pensrocks.When the turbine is brought
on-line in a relativelyshorttime, a netrtive wavepropagatesupstreamfrom the turbine and then is reflectedback as a positivewave.This is the load acceptanceproblem. In contrast,the load rejectionproblem occurs \\,henthe turbine is shut down
in a finite but shon time interval,causinga surgeto propagateupstream.In either
case, the boundary condition set by the reservoir ar the left hand boundary is the
maintenanceof a constantvalueof headH = H^ in the reservoir.At the downstream
boundary,the turbine dischargeis specifiedas a function of time. 0 : O0(r).
Considerfirst the upstreamboundarycondition at r : 0, illustratedin the characteristicplane in Figure 8.3 bclow the headraceentrance.Onll the backward(C2)
characteristicfrom 5 to P is of interest,and the equationto be satisfiedalong that
characteristicis Equation 8. I l, which can be rearrangedto give
P|o
Y" - -. = V, -:

SYc

g ( S r 5- S e ) A r- K ,

(8 . 21 )

in which the right handside,designated


r(, for convenience,
is knownfrom the
solutionat the previoustime stepand the interpolationequationsfor point S given
by (8.17)and(8.18).The boundaryconditionis appliedas a conditionof energy

302

C s a p r E a 8 : N u m e r i c aSl o l L l t i oonf l h c U n s t e a dFyl o wE q u a t i o n s

conservationat lhc enlranceto the reservoirwhere,ftrr simplicity, the entrlncc Ioss


coefficientis neglected:
r/l

(8.22)

Hr=),+;

Equation 8.22 is soived for -\'pand substitutcdinlo (8.21), which is rearrangedto


give a quadraticequation in V,, that is solvedby the quadraticfornula:

u":arf' *

(8 . 2 3)

At eachtime step,(8.23)givesthc valueof V" at -t : 0 and (8 2 | ) or (8 22) prov lgl u eo l r ' " .
d u c e rt h ee o r r c s p o n d i n
is shownin Figtheforward(C| ) charactcristic
boundary,
At thedownstream
ure 8.3 wherethe boundaryconditionis givenby Q - QoQ)at x : xL The equaas
is (8.9),whichcanbe reananged
alongthecharacteristic
tion to be satisfied

v,*T

= u^*

- so)ar
= Kn
s(srr

(8.24)

asK* andobtainedfromtheinterwhere,thistime,therighthandsideis designated


theboundaryconpolationEquations8.t5 and8.16.Fromthecontinuityequation,
ditioncanbe statedas

(82s)

Qolt) : VpAp

on the unknowndepth,
areaof flow tbatdepends
in whichA, is the cross-sectional
for thegivenchannelshape.On solving(8 24)
yo, andon thegeometricparameters
algebraicequationin Ip.
into (8.25),theresultis a nonlinear
for Vpandsubstituting
Sincethis boundaryconditionmustbe appliedat eYerytime step,the NewtonRaphsontechniqueis chosenfor its solution,with the functionf definedby

- o"(-T .
Fop): co(,)

(^)

(8.26)

iterationat eachtimestepis givenby


Thenthe Newton-Raphson
. , r + l - - . - -, r
.tP
.tP

r(Y*')
l..,b,!)

(8.27)

the valueofyp at the ,hh iterationlk + I des,t indicates


in whichthe superscript
ignatesthe valueof )p at the (t + I )th iteration;andf is the first derivativeof the
functionF in (8.26) evaluatedfor )p at the kh iteration.Equation8 27 is iteratedat
eachtime stepuntil thereis somenegligiblysmallchangein y", afterwhich V" can
be solvedfrom Equation8.25.
Additional boundaryconditionsare shownin Figure 8 4 Illustratedin Figure
8.4ais the specificationof stage,,, or depth,-r,asa functionof time at the upstream

CHApTER 8: Numerical Solution of the UnsteadvFloq' Eouations

303

P1o
oP2

O = lo9p2l
Ratingcurve
(a) RiverFloodRouting

Mainstem

YP1=YP2=YPz
Qp1 + Qp2 = Qp3

(b) RiverJunclion

Qp1= e.l3')Cd(2dltzLlyn - P)Y


Qpt = Qpz
Qpt+

-_-_;-ep2
P2

P'l

(c)Weir
FIGUREE.4
conditions
for unsteady
Additionaltypesof boundary
flow.

endof a river reach.In this instance,Equation8.I I is solvedfor V", giventhe value


of yp at the boundary.In a typical flood routing problem,the upstreamboundary
conditioncould be of this type or, altematively,it could consistof the specification
of O(l) as the inflow hydrographto a river reach.The downstreamboundarycondition in a flood routing problemalsomight be a stageor dischargehydrograph,but
relationshipas illustratedat the downin somecases,it could be a depth-discharge
streamendof the river reachin Figure8.4aandgivenby
^ - | r, - r/-. \
U-^PvP-Jo\lPl

(8.28)

in which/o(v") is a specifiedfunctiondeterminedby a gaugingstation,a weir, or


some other control that could include uniform flow. Equation 8.24 for the right

304

Soltltionof lhe UnsleadyFlow Equatlons


CHAP'tER8: ..-umcrical

hand boundaryis multiplicd by A" and rearrangedto producea funclion, F, that can
be solved for -r'"utilizing Ncwton-Raphsoniteration:

++
r0,")=/.,(r,")

A,Kr

(829)

Tbe valucof V" followsfrom (8.28t.


maybe required,asillustrated
conditions
irtcrnalboundary
In sorncsituations,
in Figures8.,1band 8.4c.Figure8.4bshowsa junctionformedby two tributaries
in
energyis lostandthedifferences
flowingintoa mainstcmriver.If no significant
velocityheadaresmall,the internalboundaryconditionsbccome
-\'Pt
Aptvpt+

Ap2Vpl-

,) Pl

,rPl

AplVp3

(8.30)
(8.31)

reprewith unknownvaluesof r'"', -r'".,,lra,Vrr,Vrr, and Vn,.The thrceequations


with two forward(CI ) charsentedby (8.30)and (8.31) aresolvedsimultaneously
I and2 andoneback$ard(C2) characwrittenfor tributaries
acteristicequations
teristic equation\r ritten for the main stem. The two forward characteristic
pointsfor the two
interpolation
in termsof two separate
are expressed
equations
iteration.
canbe solvedby Newton-Raphson
The systemof equations
tributaries.
For a weir or spillway,as shownin Figure8.4c,thereare t$'o grid points,Pr
by a negligiblysmalldistancewith unknownraluesof -t'",,V",,
andP2,separated
yp, just upstreamanddownstream
of the weir.The solutionfor thisinterand
)F2,
equation
theforwardcharacteristic
conditions,
nal boundaryrequirestwo boundary
of the
downstream
characteristic
equation
the
backward
weir
and
of
the
upstream
arewrittenas
flow. Theboundaryconditions
weir for subcritical

g ", = i cot/zst(_y",- p),',


Qn-Qcz=AptVpz

(8.32
)
(8.33)

in which P and L : heightandcrestlengthof weir and C, : dischargecoeffiat R and S haveto be written in termsof two
cient.The interpolationequations
separatepoints,Pr and P2.for which velocityand depthare determinedin the
previoustlme step.
Both the boundaryconditionsand the characteristicequationsfor the interior
They also
in this sectionas first-orderapproximations
grid pointsare expressed
as describedby Liggettand
approximations,
as second-order
could be expressed
shouldbe usedfor the
Cunge(19?5),but in anycasethesameorderapproximation
boundaryconditionsas for theinteriorgrid points.
for subcritical
flow.If
in Figure8.4 aredescribed
All theboundaryconditions
the flow is supercritical,both unknownsmustbe specifiedon the upstreamboundary, while no boundaryconditionsare specifiedat the downstreamboundary,as
equations
for theCl andC2 characin Chapter7. Thetwo characteristic
explained
boundary'
at thedownstream
teristicsaresolvedsimultaneously
as
Boundaryconditionsare specifiedusing the methodof characteristics
describedin this chapterfor both the numericalmethodof characteristicsandthe
explicit finite difference methodto be discussednext. Otherwise, instability or
of the yariablesat the boundariescan result.In the implicit finite
overspecification

CHApTER8: NumcricalSolutionof the Un-.teady


Flow Equations 305
difference mcthod, both inlcrnal and cxtemal boundar) conditionssimpl;,bccorne
thc additional compatibilit)'equationsnecessaryto sol\e the matrix r'cluationsat
each time step, as explainedlater in this chapter.

8.4
EXPI,ICIT FINITE DIFFERENCEMETHODS
Althoughexplicitfinitedilfercnce
techniques
arerelatirely simpleto program,
they
with instabilitythatgo beyondthe satisfacarc fraughtwith difficultiesassociated
As anexample,
considerthe cornputational
molecule
tion of the Courantcondition.
moleculedefinesthegrid pointsused
illustratedin Figure8.5a.Theconrputational
approximltions
of thc dcrivatires for a particularnumerical
in the finiredifference
The grid pointsareidentifiedby thesubscripts
i andsuperscripts
t to indischeme.
respectively.
For example,
catespatialintervalsandtimeintervals,
1f-r is thediswherex
cretevalueof thedepthat a distance
of (iAr) from the left handboundary,
: 0, if uniformspatialintervalsareused,andat a time that is (k + I ) time steps
from the initial time of t : 0, but the time stepsmay be nonuniformdue to the
requirements
of the Courantcondition.The timeand spacederivatives
in theorigon thisgrid andwithinthecominalpanialdifferential
equations
areapproximated
putationalmolecule,which is appliedrepeatedly
for all the interiorpointsat any
giventime step.
For the computational
moleculeillustratedin Figure 8.5a,an unstablefinite
are approximated
as
differenceschemeresultsif the V andy derivatives

av
At

:'

a v _ v : + t - v ; _ t.
Ax
2Ar

d,r'_ -rl- ' - -"1


t
l
t

(E.34)

d-v_ )f-r - _vf-r


Ax
2-\-r

(8.3s)

wherethe dependentvariablesy and) in Figure8.5 are represented


by the general
aresubstituted
into thereduced
functionl Ifthesefinitedifference
approximations
(7.5)and(7.l5), we canshowthat
form of thecontinuityandmomentum
equations,
(LiggenandCunge1975).In somecases,
the resultingsolutionusuallyis unstable
stability can be achievedby artificially increasingthe friction terms,but in general
it is betterto avoidthisscheme.

Lax Diffusive Scheme


With nrinormodification,
theunstable
scheme
canbe madestablein theLax diffumoleculeshownin Figure8.5bno longerusesthe
sivescheme.The computational
point (i, l) in the evaluationof the time derivativebut someweightedaverageof the

306

CHAPTER 8:

NumericalSolutionof the UnsteadyFlow Equations

(k + 1).\t
klt

(l- 1)Ax lAx (l+ 1)Ax

(t- 1)Ax llx

(a) UnstableScheme

(b) Lax DitfusiveScheme

Ax
(k+ 1)Al

(kr 1)lt
(k + 112)Jt

(k- 1)ar

klt

( l - 1 ) A x t A x ( t+ 1 ) " r x

Ax

--tLt/zl

kAt

(l+ 1)Ax

- -t-

+112
.1t2

11i
Itf_,
( l - 1 ) . l xi l A x l ( i + 1 ) A x
(i- 1/2)Lx (i+ 112)Lx

(c) LeapfrogScheme

(d) Lax-WendroffScheme

FIGURB 8.5
Computational
molecules
for someexplicitfinitedifference
schemes.

solution at adjacentgrid pointsat the lrh time level. Using the generalfunction,/,
to representthe dependentvariables,the derivativesbecome

ar ri.' lxri* 7 c:.,* r:-,t)


At

At

af,
d.r

2L,

(8.36)
(8.37)

CHAp-tER8: NumericalSolutionoflhe Unsteady


Flow Equarions 3O]'
in which X is a weighting factor betrleen 0 and l. For ,1,= 1, wc recoverrne unstable schemeiwhile for X = 0, we har,ca pure diffusive schemecalled the Lax diffusive scheme,which is stableso long as the Courantcondition is satisfied.
If the finite differenceapproximationssuggestedby (g.36)and (g.37) with x :
0 are substitutedinto the rcduced fclrm of the continuitv and momenlumequations
as given by (7.5) and (7. I5) for a prismatic channelwithout lateralinflow, the result
is two differcnceequationsthat can be solved explicitly for depth and velocity at
the grid point (i, t + l) with the "free variables"or cocfficientsevaluatedas the
meanof the valueson either side of the grid point (i, t):
\t
t l'/ r' . r
_ |, r \ . ^
r* ,r . r : 2 1 . \ ,r f. ., .vri. 'r ) ' : _f a. . \{ -

'_

r/l

]r,.*
7tr;.,-r',,)

L)rul., - ul r
vir,= Ivi., + v! ) -*

( 8 . 38 )

(4j1-)rvi-, - v1_,;
+ st'so ,.,[qd.

+ (si)f '
2

(8.3e)

in which S, = QlQl/K, and K - channelconveyance.


The absolutevaluesiqn
applicdto O in rhedefinitionof the fricrionslopeS,ensures
rhepropersignl-orrie
shearforcefor flowswith changingdirecrions.
Liglett andCungi 11975)showthar
the Lax schemeis not consistent,
sincethe finite difference
approximation
intro_
ducesdiffusivetermsthat should nor appear.but it is stableprovidedthat the
Courantconditionis satisfied
andaccurare
so longas(It]:/Jl is smallenoughthat
thediffusivetermsdo not influencethe solution.
The l-ax diffusive schemecan also be appliedto the preferrcdconservatron
form of theconrinuityandmomenrumequations
asgivenby (7.2) and(7.13) for a
prismaticchannel.The differenceequauonsare

e!.'- Iai-,+Al.,)- ftrcft, - oi-,1

(8.40)

- (* . *r"),
o!"=;@:, +et.,)#J+ * ,o4):.,
,]
+a,rdi.,d
+l , , )
\

( 8 . 4 1)

in whichd - gA(S0- S/).The sourceterm d hasbeenevaluated


as the meanof
the valuesat poinrs(i - I . ,t) a-nd(t + l, t) assuggested
by TerzidisandStrelkoff
(1970)andChaudhry(1993).The valuesof andA aredetermined
at eachtime
e
step,from which the valuesof velocity, V, and depth,)., can be calculatedfor the
given channelgeometry,and the valuesof Ah. follow from its definition for the
givenprismaticchannelshape(seeTable3-l,) for usein thenextrimesrep.

You might also like