An efficient numerical solution of the transient ... - Wiley Online Library

32 downloads 300 Views 484KB Size Report
An Efficient Numerical Solution of the Transient Storage Equations ... Center for Advanced Decision Support for Water and Environmental Systems, Universi.ty of ...
WATER RESOURCESRESEARCH,VOL. 29, NO. 1, PAGES211-215,JANUARY 1993

An Efficient Numerical Solutionof the TransientStorageEquations for Solute Transport in Small Streams ROBERT L. RUNKEL AND STEVEN C. CHAPRA Centerfor AdvancedDecisionSupportfor Water and EnvironmentalSystems,Universi.tyof Colorado,Boulder Severalinvestigatorshave proposedsolutetransportmodelsthat incorporatethe effectsof transient storage. Transient storageoccursin small streamswhen portionsof the transportedsolutebecome isolatedin zones of water that are immobilerelativeto water in the main channel(e.g., pools,gravel beds). Transient storageis modeledby adding a storageterm to the advection-dispersionequation describingconservationof massfor the main channel.In addition,a separatemassbalanceequation is written for the storagezone. Althoughnumerousapplicationsof the transientstorageequationsmay be found in the literature, little attentionhasbeenpaidto the numericalaspectsof the approach.Of

particularinterestis the couplednatureof the equations describing massconservation for the main channeland the storagezone. In the work describedherein,an implicitfinite differencetechniqueis developedthatallowsfor a decoupling of thegoverning differential equations. Thisdecoupling method maybeappliedto othersetsof coupled equations suchasthosedescribing sediment-water interactions for toxic contaminants.For the caseat hand, decoupling leadsto a 50% reductionin simulationrun time. Computationalcostsmay be further reducedthroughefficientapplicationof the Thomas

algorithm. Thesetechniques maybeeasilyincorporated intoexisting codesandnewapplications in which simulation run time is of concern.

the stream'scross-sectionalarea. Although this uniformity

INTRODUCTION

rarelyoccursin nature,it is a reasonable assumption for Severalinvestigators have proposedsurfacewatersolute streamsof small to moderate width and depth. transport modelsthat incorporate the effectsof transient Althoughnumerousapplicationsof the transientstorage

maybefoundin theliterature,littleattentionhas storage[Thackstonand Krenkel, 1967; Thackstonand equations been paid to the numerical aspects of the approach. Of Schnelle,1970; Valentine and Wood, 1977;Nordin and interestis the coupled natureof the equations Troutman,1980;Jackmanet al., 1984;BencaIaandWalters, particular massconservation for thestreamchannelandthe 1983; BencaIaet al., 1990;Kim et al., 1990].Thesetransient describing storage zone. This paper details animplicitfinitedifference storage (or "deadzone")modelsconsider a physical mechthat decouples the governing equations. Addianismwherein solute massis exchangedbetweenthe main technique channeland an immobile storage zone. This quasi-two- tional numerical issues are also discussed.

dimensional processis represented by addinga storage term GOVERNING DIFFERENTIAL EQUATIONS ANDFINITE

to the conventionaladvection-dispersion equation.

Transient storageoccursin smallstreams whenportions

DIFFERENCE APPROXIMATIONS

of thetransported solutebecomeisolated fromthe main

Conservationof mass for the stream and storage zone

channel in smallpoolsand in the gravelunderbed. As a segments isgivenby(1)and(2),respectively [Bencala and result ofthisstorage phenomenon, themagnitude ofatypical Walters,1983;Runkeland Broshears,1991]: solute tracerpulseis attenuated anditsposition delayed. To account for attenuation, two distinctzonesareconsidered.

Ox A OCAQoC 1Ox o( o.•_xC ) •qLIN

Thefirstzonerepresents the mainchannel thatis usually ..... Ot considered whenmodelingadvectivesurface-water systems.

+ -- •

AD

Processes influencing soluteconcentrations in this zone include advection, dispersion, lateralinflow,transient stor-

(CL - C)

+ a(Cs-

age,andchemicalreaction.A secondarea,the storagezone,

C) - xC

dC s A ..... a •(C-Cs)-XsCs

represents recirculating pools,underflow channels andother

dt

areasthatare immobilerelativeto flow in the mainchannel.

Onlythe processes of storageandchemical reaction are considered in thestorage zone.Thezonesarelinkedby an exchange termthatactsto transfermassbetween thetwo

+

As

where

regimes.

Thetransient storage equations presented hereinaregen-

A stream channel cross-sectional area[L2];

As storage zone cross-sectional area [L2]'

C in-stream solute concentration [M L-3];

CL solute concentration inlateral inflow [ML-3]. erallyapplicable to streamsand riversin whichone- Cs storage zone solute concentration [M L-3]. dimensional solute transport maybeassumed. Asdescribed byFischer etal. [1979], one-dimensional analysis isvalidfor systems in whichsolutemassis uniformlydistributed over

D dispersion coefficient [L2T- •];

Q volumetric flowrate[L3T- •]; qLINlateral inflow rate[L3T-•L- •]; t x

Copyright 1993by theAmerican Geophysical Union. Papernumber 92WR02217. 0043-1397/93/92WR-02217502.00

time IT]; distance ILl;

a storage zoneexchange coefficient [T-•]; 211

(1) (2)

212

RUNKEL AND CHAPRA:TECHNICALNOTE

,• in-stream first-order decaycoefficient [T- 1];

efficientformulationof the Thomas algorithm. Finally, Crank-Nicolson exhibits strong stability [Isaacson and Keller, 1966].

As storage zonefirst-order decay coefficient [T- 1]. Boundary and initial conditionsare given by

Applicationof the Crank-Nicolsonapproachproceedsas follows.To achievesecond-orderaccuracy,differenceequa.

OC

D--=0

atx=l

Ox

C=Coc

atx=0,

(3)

t>0

(4)

C - Cinit at t = 0

(5)

CS-- CSini t at t = 0

(6)

tionsare developedfor the midpointof a time step.Letting j denotean initial time andj + 1 denotean advancedtime, the main channel equation (equation (7)) is formulated for time j + 1/2. The fight-hand-sideof (7) at time j + 1/2 is simply the averageof the term at timesj and j + 1. In addition, the time derivative, dC/dt, is estimatedusinga centered differenceapproximation:

where

I

dC +At 1__ C• dtIj+1/2Cj•

main channel length [L];

Cbc in-streamsoluteconcentrationat the upstream

where At is the integrationtime step [TI. Equation(7)thus

boundary [M L-3];

becomes

Cinit initial in-streambackgroundconcentration

[M L-3];

+ ..... At

Csinitinitialstorage zonebackground concentration [M L-3].

(1/2){H[C,CL, CS,'' ']J+1

To solve (1) and (2) for the general case in which the + H[C, CL, Cs,'' parameters vary in time and space, numerical solution techniquesare employed.In the developmentthat follows, where central divided differences are used to approximate the spatial derivatives. It should be noted, however, that the H[C, Cz., Cs, Q, A, D, qL•N, Ax, a, A] followingdiscussionis equally applicablewhen backward or q LIN arbitrary differencesare used. In any event, (1) becomes

__ =

dCL[C Q,A,DAx] +-•-i (CœCi) '

'

+ a(Cs-

']J}

(10)

=L[C,Q,A,D,ax]+-•i (CœCi)

qLIN

dt

(9)

Ci) - ACi

+ a(Cs(7)

Ci) - ACi

(11)

Because(10) is dependenton the soluteconcentrations in the neighboringsegmentsat the advancedtime level (Ci-•,

Ci+1 at timej + 1), it is not possibleto solveexplicitlyfor

L[C,Q,A,D,Ax] = -•i

C•+• (hencewe have an "implicit" method).We can,

}•;

however, rearrange(10) so that all of the known quantities (solute concentrationsat time j) appear on the fight-hand sideand all of the unknown quantities(soluteconcentrations at time j + 1) appear on the left. One exceptionto this rearrangementis that an unknown quantity, the storagezone

-,(AD)i_ 1,,,i(Ci -Ci-1) 1 1[(AD)i,i +l(Ci+ 1Ci)

+Ai

Ax2

(8)

concentration attheadvanced timelevel(C•+1), remains on

where Ax denotesthe length of a one-dimensionalsegment the fight-handside. This exceptionis discussedin a subse(i.e., control volume) and i - 1, i and i + 1 subscripts quent section. Rearrangementyields denote the upstream, central, and downstream segments,

respectively.Note that Cs in (7) (and the equationsthat follow) is the storagezone concentrationin segmenti; the i subscriptis omitted as a notational convenience.Also note that (8) is written for the specialcaseof equal segmentsizes

(AXi_1 -- AXi = AXi+i). A similarequationfor the general case of Variable segment lengths is given by Runkel and

l+-•-kA i +a+XC•1 At

---L[C, 2

Q, A, D, Ax]J+ l= C•

Broshears [1991]. CRANK-NICOLSON METHOD

Ordinary differentialequationssuch as (2) and (7) may be solved using a variety of techniques. For the case of onedimensionalmodels,it is often expedientto use an implicit method such as Crank-Nicolson.

nature of the model results in the formation

of a tridiagonal coefficientmatrix that can be solved using an

(12)

This, in turn, may be simplified by collecting terms:

EiCJ•2 • -[-FiC•+ • + GiC•.•• -•-Ri

This method has several

noteworthy advantages.First, the Crank-Nicolson method is second-orderaccuratein both time and space. Second, the one-dimensional

At (H[C, CL, CS, ''']J +qLIN c•+ I+ac{+ I)

+5-

where

(13)

RUNKELANDCHAPRA: TECHNICAL NOTE

AiAx 2 + Ai At ((AD)i1,i +(AD)i,i •+qLtN

Fi= 1+'-•-'

(15)

213

As such,it is not possibleto solve explicitly for the depen-

dentvariable,Cj+• . In contrast,(19) is a Crank-Nicolson approximationof an ordinary'differentialequation(ODE), whereina spatialderivativeis lacking(equation(2)). This allowsone to solveexplicitly for the dependentvariable,

C•+l (equation (20)).It is therefore possible to substitute (20)into (13),therebyeliminating C•+1. This effectively

Ax+ At(•i(AD)i,i 1.) (16)

Gi--2AlAX

decouples the Crank-Nicolsonexpressions. One may easily envisionother setsof mixed equations(ODEs and PDEs) where this procedureis equally applicable.

R,= +-5- C,c,.,cs, +

Decoupling of the transientstorageequationsproceedsas follows.In (20)the storageconcentration is a functionof two

C•+ • + a qLIN C{+ 1) (17) Ai

In developing(13) for each of the segmentsin the stream network, a set of linear algebraic equationsis produced. Theseequationsare solved simultaneouslyto obtain the

in-stream soluteconcentration, Cj+• , in eachof thestream segments. A hypothetical systemof equations representing a five-segment networkis shownas follows:

'C{+ 1

F• G•

F2 G2 E3 F3 G3

At {

R4

..]jqLIN

R}=C{+'•H[C, Cr,Cs, ' + Ai C{+'

2+ Y+ AtAs [(2-y-AtAs)C,+y(C,+ (22)

Although R' containsan unknownquantity,(22)is a much moreconvenientexpressionthan (17). The unknownquan-

(18) tity is nowCj+l, a variablethat alreadyappearson the

E2E5 F5 •,C• +11 R5 C•+

sion for R:

+a R1

C• +11 R2 C•+ = R3

E4 F4 G4

knownquantities, Cj andC•, andoneunknown quantity, Cj+l . Substitution of (20) into (17)providesa newexpres-

The conceptspresentedin the precedingparagraphs are

alsoapplied to thestorage zoneequation (equation (2)).This resultsin the following Crank-Nicolson equation:

left-hand side of (13). We can therefore move the term

involving Cj+l to theleft sideof (13),creating newexpressions for F and R:

At [(AD )i-•,i+(AD )i,i +1qLIN

1f[:(Ci- Cs)- XsCs1,+1

At = •

+a 1 2+3,+AtAs/

+ a•ss (Ci-Cs) - XsCs (19)R"i= CS• +'•- H[C,Cœ, Cs, + Ai In contrastto the streamequation,(19) may be solved

explicitly forthevariable ofinterest, C•+•. Thisyields +

(2-- 'y- AtAs)CJs + T(C•+ Cf+1) 2+ •,+AtA s

where

'y = a AtA/As

At {

...]jqLI $CJL+ 1

+a[.(2-•'-'tXs)Cis+• (24) ,

2+T+AtA

(20)

s

BecauseR" involvesonly known quantities,(13) can be

solvedindependently for thein-stream soluteconcentration, Cj+l . Havingsolved(13), the storagezoneequation(equa-

tion(20))becomes afunction ofthree known quantities, C•,

(21) Cj, and Cj+l . We have thus decoupled the governing Crank-Nicolsonexpressions.

DECOUPLING OF THE STREAMAND STORAGE ZONE EQUATIONS THOMAS ALGORITHM

Equations (13)and(20)appear to be a setof coupled of theCrank-Nicolson proequations dueto the presence of an unknown quantity, Asgivenby (!8), application C•+1, ontheright-hand sideof (13).(Recall thattheright- cedureresultsin theformationof a linearsystemof algebraic hand sideistocontain onlyknownquantities.) Thiscouplingequations: suggests aniterativesolution technique whereby (13)and [M]{C} = {R} (25) (20)aresolvedin sequence untilsomedesired levelof convergence is obtained [Jackman et al., 1984]. Thisitera- where tivepredictor-corrector approach isinefficient in that(13) coefficient matrixof dimension N byN' and(20)aresolvedmorethanonceduringeachtimestep. [M] tridiagonal oflength N representing theunknown solute Fortunately, decoupling is easilyachieved by noting a {C} vector concentrations; fundamental difference betweenthe two equations. First,

function vectoroflength N, asgivenby(24); (13)isa Crank-Nicolson expression forapartial differential{R} forcing N numberof segmentsin the streamnetwork. equation (PDE)containing spatial derivatives (equation (1)).

214

RUNKEL AND CHAPRA: TECHNICAL NOTE

Due to the tridiagonal nature of matrix [M], (25) may be solved for {C} using the Thomas algorithm [Thomas, 1949]. This approach exploits the tridiagonal structure of [M] by eliminating useless operations on zero elements. Although this leads to great computational savings, the algorithm is frequently presented in a format that confoundsoperations on the coefficient matrix [M] with those on the fight-handside vector {R} [e.g., Cheney and Kincaid, 1985;Press et al., 1986]. This leads to redundant computationswhen applied to cases involving an invariant coefficient matrix [M] and multiple right-hand-side vectors. Increased efficiency can be obtained by formulating the Thomas algorithm as an LU decomposition method [Chapra and Canale, 1988; Burden and Faires, 1988]. This method decomposes the coefficient matrix into "lower" and "upper" diagonal matrices. This "decomposition" is followed by "substitution" steps involving {R} that provide the solution for (C}. The primary advantage of the LU decomposition approach is the ability to efficiently evaluate multiple fighthand side vectors ({R}). Because the first step, decomposition, involves only the coefficient matrix, [M], it need not be repeated for each vector (R}. As a result, solutions for multiple right-hand side vectors may be obtained using a single decomposition step in conjunction with multiple substitution steps. For the case at hand, there are multiple fight-hand side vectors, as {R} is a function of the time-varying solute concentrations. Given a steady flow regime, the coefficient matrix remains constant throughout the simulation. A decomposition step is therefore not required for each time step. This considerablyreduces the number of operationsrequired to complete a given simulation. For conservative substances, the coefficient matrix is a

function of the model's physical parameters, i.e., [M] is not specific to a given solute. Due to this solute independence, the decomposition phase for the Thomas algorithm is completed only once for each set of physical parameters (i.e., given steady flow conditions, only one decompositionstep is required for the entire simulation). A substitution phase, meanwhile, is required for each solute at each time step, as {R• is a function of the solute concentrationsat the current time level (see equation (24)). Unlike the conservative case, the coefficient matrix for nonconservative solutes is a function of both physical and chemical parameters. Matrix decomposition is therefore required for each solute being modeled, as the values of the chemical parameters vary between solutes. For steady flow regimes, the number of decomposition steps equals the number of solutes. As with conservative substances, the substitution step is required for each solute at each time

TABLE

1.

Simulation Parameters for Benchmark Runs Parameter

Number

Value

of solutes

5

Type of solute Flow regime Integration time step, h Simulation period, h Number of segments

Segmentlength, m

conservative steady 0.01 30 500

1

were completedat eachtime step. For the secondversion, the transport equations were uncoupled as describedin the precedingtext. A third and final versionincludedthe decoupied approachas well as the LU decompositionformulation of the Thomas algorithm. Using the three computer codes, a series of benchmark runs were conducted. Simulation parameters for the benchmark runs are shown in Table 1. In each run, the transportof

five conservativeconstituentswas simulatedunder steady flow conditions (i.e., Q, A, q t.•N and C r were time invariant). Solute concentrations were determined for a 30-hour period using an integration time step of 0.01 hours. The 500-m stream was modeled as a linear reach composedof l-m segments. All runs were completed on a SUN Sparc2 workstation.

Figure I summarizes the results from the benchmark simulations. Two conclusions may be drawn from the figure. First, judicious use of the Thomas algorithm leads to a small, but not insignificant, decrease in run time. Second, dec0upling of the transport equations leads to a significantdecrease in computational expense. This decrease is directly attributable to the fact that decoupling eliminates the need for the iterative approach in which the Crank-Nicols0n equations are solved more than once during each time step. Given the system configuration and the parameters chosen for the benchmark runs, the iterative approach converges

after two iterations.As such,the decouplingresultsin a 50% decrease in run time. It is important to note that situations may arise in which more than two iterations would be required for the iterative scheme. In this instance the decou-

step.

In summary, the solution of (25) is dependenton the types of solutesbeing modeled. Specifically, the coefficientmatrix is solute-independentfor conservative substances,while it is solute-specificfor nonconservative solutes. "Version !. '::

Ve:rSion-2.... ::"::i::: 'Version.3

BENCHMARK RUNS

Fig. 1. Benchmarkruns for versions1-3. Version 1: coupled In order to test the relative efficienciesintroducedby the andcomplete Thomasalgorithm. Version2: uncoupled foregoingmethods,three transient storagecodes were de- equations equations andcomplete Thomasalgorithm. Version3: uncoupled veloped. In the first version, the governingequationsre- equationswith the LU decomposition form of the Thomasalgomained coupled and both steps of the Thomas algorithm rithm.

RUNKEL ANDCHAPRA: TECHNICAL NOTE

p!ingwill leadto an evengreaterdecrease in run time. Ongoing researchis underway to evaluatethisissue. CONCLUSIONS

In the foregoinganalysiswe have described two operationsthat decreasethe computationaleffort requiredfor the solutionof the transientstoragesolutetransportequations. First, the governingequationshave been decoupledso that themainchanneland storagezone equationsmaybe solved independently. This eliminatesthe need for the predictorcorrectorapproach, thereby reducing the required simulationtime by approximately50%. A secondimprovementis the efficientuse of the Thomasalgorithm.By considering

2t5

REFERENCES

Bencala, K. E., andR. A. Walters,Simulation of solutetransport in a mountainpool-and-rifflestream:A transientstoragemodel, WaterResour.Res., 19(3), 718-724, 1983.

Bencala, K. E., D. M. McKnight,andG. W. Zellweger, Characterizationof transportin an acidicand metal-richmounta/nstream basedon a lithiumtracer injectionand simulationsof transient storage,Water Resour. Res., 26(5), 989-1000, 1990.

Burden,R. L., andJ. D. Faires,NumericalAnalysis,4th ed., pp. 373-376,PWS-Kent, Boston,Mass., 1988.

Chapra,S.C., andR. P. Canale,NumericalMethodsFor Engineers, 2nd ed., pp. 271-290, McGraw-Hill, New York, 1988.

Cheney,W., andD. Kincaid,NumericalMathematics andComputing, pp. 232-234, Brooks/Cole, Monterey, Calif., 1985.

Fischer,H. B., E. J. List, R. C. Y. Koh, J. Iraberger,and N.H. Brooks, Mixing in Inland and Coastal Waters, pp. 263-276,

Academic,San Diego, Calif., 1979. separatedecomposition and substitutionsteps,run time is reduced by an additional14%.Both of thesetechniques may Hornberger, G. M., A. L. Mills, and J. S. Herman, Bacterial in porousmedia: Evaluationof a model usinglaboratory be easilyincorporatedinto existingcodesor new applica- transport observations,Water Resour. Res., 28(3), 915-938, 1992. tions where simulation run time is of concern.

Isaacson,E., andH. B. Keller, Analysisof NumericalMethods,pp.

As discussedpreviously, the decoupling procedure de508-512, JohnWiley, New York, 1966. scribedhere is relevant to other types of fate and transport Jackman,A. P., R. A. Walters, and V. C. Kennedy, Transportand concentrationcontrols for chloride, strontium, potassium and models. Specifically, the method may be applied to the lead in Uvas Creek, a small cobble-bed stream in Santa Clara equationsdescribingtoxic substancesin one-dimensional County, California, U.S.A., 2, Mathematical modeling,J. Hystreamsand estuariesunderlain by stationary sedimentbeds. drol., 75, 11!-141, 1984. Thomann and Mueller [1987] have developed a similar Kim, B. K., A. P. Jackman, and F. J. Triska, Modeling transient storageand nitrate uptake kinetics in a flume containinga natural decouplingapproach for computing steady state distribuperiphytoncommunity, Water Resour.Res.,26(3), 505-515, 1990. tionswith a matrix-based method. Our techniqueprovidesa Nordin, C. F., and B. M. Troutman, Longitudinal dispersionin meansto efficiently simulate the dynamics of toxicants for rivers: The persistenceof skewness in observed data, Water Resour. Res., 16(1), 123-128, 1980. suchsystemswith stable implicit methods. In addition, other applications are possible. For example, Press, W. H., B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling, Numerical Recipes: The Art of ScientificComputing, the approach is applicable to solute transport in porous pp. 40-41, CambridgeUniversity Press, New York, 1986. media [e.g., Hornberger et aI., 1992]. Research efforts are Runkel, R. L., and R. E. Broshears,One dimensionaltransport with presentlyunder way to generalize the decouplingprocedure inflow and storage(OTIS): A solute transport model for small streams,Tech. Rep. 91-01, Center for Adv. DecisionSupport for andto further define its performanceand applicability. Water and Environ. Syst., Univ. of Colo., Boulder, 1991. Althoughcomputerrun time may no longer seemto be the Thackston,E. L., and P. A. Krenkel, Longitudinalmixing in natural critical issue it was in the past, computationsof the type streams,J. San. Eng. Div., Am. Soc. Civ. Eng., 93(SA5), 67-90, 1967. describedhere still require efficiencyfor two reasons.First, the transient storagesolute transport equationsare presently Thackston, E. L., and K. B. Schnelle, Predicting effects of dead zones on streammixing, J. San. Eng. Div., Am. Soc. Civ. Eng., beingcoupledwith large chemical equilibriummodels.For 96(SA2), 319-331, 1970. such applications, computational savings are critical for Thomann,R. V., and J. A. Mueller, Principlesof Surface Water keepingtotal simulation times within reasonablebounds. QualityModelingand Control, p. 581, Harper and Row, New York, 1987. Second,computermodels are increasinglybeingintegrated

intodecisionsupportsystems.For suchcases,the abilityto Thomas,L. H., Elliptic problemsin linear differenceequationsover a network,report,WatsonSci. Cornput.Lab., ColumbiaUniv., implement interactive computationshinges on efficient New York, 1949. model run times. The present paper has been directed Valentine,E. M., and I. R. Wood, Longitudinaldispersionwith dead zones, J. Hydraul. Div. Am. Soc. Civ. Eng., 103(HY9), towardmaking such applicationsfeasible. 975-990, 1977.

S.C. Chapraand R. L. Runkel, Centerfor AdvancedDecision Acknowledgments.This work was carried out as part of a cooperative agreementwith the United StatesGeologicalSurvey Supportfor Water and Environmental Systems,Universityof (USGS)in Denver,Colorado.Fundingfor theworkwasprovidedby Colorado,CampusBox 428, Boulder,CO 80309. theUSGSToxic Substances HydrologyProgram.The authorswish to thankKennethBencala,RobertBroshears,BriantKimball,Pete

Loucks,DianeMcKnight,andPedroRestrepofor theirreviewof thisdocument andtheirinputduringsoftwaredevelopment. Finally, theauthors wishto acknowledge two anonymous reviewers fortheir constructivecomments on this manuscript.

(Received June 1, 1992; revised August 31, 1992;

acceptedSeptember16, 1992.)