26
EPA/600/B-18/256 | August 2018 | www.epa.gov/research Flow Routing Techniques for Environmental Modeling

Flow Routing Techniques for Environmental Modeling

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Flow Routing Techniques for Environmental Modeling

0

photo

EPA/600/B-18/256 | August 2018 | www.epa.gov/research

Flow Routing Techniques for Environmental Modeling

Page 2: Flow Routing Techniques for Environmental Modeling

1

EPA/600/B-18/256 August 2018

Flow Routing Techniques for Environmental Modeling

by

Jan Si t terson1 , Chris Knightes2 , Br ian Avant3

1 Oak R idge Assoc ia ted Un ive rs i t i es

2 U .S . Env i ronmenta l P ro tec t i on Agency , O f f i ce o f Research and Deve lopment 3 Oak R idge I ns t i t u t e f o r Sc ience and Ed uca t i on

Chris Knightes - Project Off icer

Off ice of Research and Development Nat ional Exposure Research Laboratory

Athens, GA, 30605

Page 3: Flow Routing Techniques for Environmental Modeling

2

Notice The U.S. Environmental Protection Agency (EPA) through its Office of Research and Development funded and managed the research described here. The research described herein was conducted at the Computational Exposure Division of the U.S. Environmental Protection Agency National Exposure Research Laboratory in Athens, GA. Any mention of trade names, products, or services does not imply an endorsement by the U.S. Government or the U.S. Environmental Protection Agency. The EPA does not endorse any commercial products, services, or enterprises. This document has been reviewed by the U.S. Environmental Protection Agency, Office of Research and Development, and approved for publication.

Page 4: Flow Routing Techniques for Environmental Modeling

3

Abstract This report describes a few ways to simulate the movement of water through a network of

streams. Flow routing connects excess water from precipitation and runoff to the stream to other surface water as part of the hydrological cycle. Simulating flow helps elucidate the transportation of nutrients through a stream system, predict flood events, inform decision makers, and regulate water quality and quantity issues. Three flow routing techniques are presented and discussed in this paper. Constant volume and changing volume techniques use the continuity equation, while the third technique, the kinematic wave approximation, uses the continuity and momentum equations. Inputs and outputs differ for each flow routing technique, with kinematic wave being the most complex model. Each option has a set of applications it is best suited for. Numerical errors such as distortion and instability are potential errors that can affect the accuracy of model outputs. Routing methods should be chosen based on input data availability and scope of the problem being addressed. This report informs modelers of algorithms, input data needed, and the applicability of a few flow routing techniques used in environmental modeling.

Page 5: Flow Routing Techniques for Environmental Modeling

4

Foreword The U.S. Environmental Protection Agency (EPA) is charged by Congress with protecting the Nation's land, air, and water resources. Under a mandate of national environmental laws, the Agency strives to formulate and implement actions leading to a compatible balance between human activities and the ability of natural systems to support and nurture life. To meet this mandate, EPA's research program is providing data and technical support for solving environmental problems today and building a science knowledge base necessary to manage our ecological resources wisely, understand how pollutants affect our health, and prevent or reduce environmental risks in the future.

The National Exposure Research Laboratory (NERL) Computational Exposure Division (CED) develops and evaluates data, decision-support tools, and models to be applied to media-specific or receptor-specific problem areas. CED uses modeling-based approaches to characterize exposures, evaluate fate and transport, and support environmental diagnostics/forensics with input from multiple data sources. It also develops media- and receptor-specific models, process models, and decision support tools for use both within and outside of EPA.

The goal of the Hydrologic Micro Services (HMS) project is to develop an ecosystem of inter-operable water quantity and quality modeling components. Components are light-weight and can be integrated to rapidly compose work flows to address water quantity and quality related questions. Each component may have multiple implementations ranging from macro (coarse) to micro (detailed) levels of modeling the physical processes. The components leverage existing internet-based data sources and sensors. They can be integrated into a work flow in two ways: calling a web service or downloading component libraries. For light-weight components, it is generally more efficient to call a web service, however, it is more efficient to have local copies of components if the component requires large amounts of input/output data.

Tom Pierce, Acting Division Director for CED

Page 6: Flow Routing Techniques for Environmental Modeling

5

Table of Contents Notice .............................................................................................................................................. 2

Abstract ........................................................................................................................................... 3

Foreword ......................................................................................................................................... 4

List of Figures ................................................................................................................................. 5

List of Tables .................................................................................................................................. 6

List of Equations ............................................................................................................................. 6

Introduction ..................................................................................................................................... 7

Stream Routing Options .................................................................................................................. 9

Constant Volume Routing......................................................................................................... 11

Changing Volume Routing ....................................................................................................... 12

Kinematic Wave Routing .......................................................................................................... 13

Channel Geometry ........................................................................................................................ 17

Potential Errors ............................................................................................................................. 19

Discussion ..................................................................................................................................... 20

References ..................................................................................................................................... 20

Appendix A ................................................................................................................................... 22

List of Figures Figure 1: A simplified diagram of the water cycle within a watershed. ......................................... 7

Figure 2: The momentum terms and equation used for each model. .............................................. 9

Figure 3: Graphs of flow moving through instantaneous and non- instantaneous models. .......... 11

Figure 4: Instantaneous flow schematic. ....................................................................................... 12

Figure 5: The flow-depth regression graph ................................................................................... 13

Figure 6: The computational grid for solving the finite difference numerical approximation ..... 15

Figure 7: Stream location visualization. ....................................................................................... 16

Figure 8: Channel Cross Sectional Geometry Descriptions ......................................................... 18

Figure 9: Outputs from models that show numerical errors. ........................................................ 19

Page 7: Flow Routing Techniques for Environmental Modeling

6

List of Tables Table 1: Input parameters for flow routing schemes. ................................................................... 10

Table 2: Outputs for flow routing schemes................................................................................... 10

Table 3: Table of formulas for channel shapes ............................................................................. 18

List of Equations Equation (1) .................................................................................................................................... 8

Equation (2) .................................................................................................................................... 8

Equation (3) .................................................................................................................................. 11

Equation (4) .................................................................................................................................. 11

Equation (5) .................................................................................................................................. 12

Equation (6) .................................................................................................................................. 12

Equation (7) .................................................................................................................................. 13

Equation (8) .................................................................................................................................. 13

Equation (9) .................................................................................................................................. 13

Equation (10) ................................................................................................................................ 14

Equation (11) ................................................................................................................................ 14

Equation (12) ................................................................................................................................ 14

Equation (13) ................................................................................................................................ 14

Equation (14) ................................................................................................................................ 15

Equation (15) ................................................................................................................................ 15

Equation (16) ................................................................................................................................ 16

Equation (17) ................................................................................................................................ 16

Equation (18) ................................................................................................................................ 17

Equation (19) ................................................................................................................................ 17

Equation (20) ................................................................................................................................ 19

Page 8: Flow Routing Techniques for Environmental Modeling

7

Introduction As part of the hydrological cycle, stream flow plays an important role in the movement of

water through surface water systems by connecting precipitation and runoff to downstream water bodies, like lakes and oceans (Perlman, 2016). Figure 1 shows the water cycle within a watershed and the major interconnected components such as precipitation, runoff, soil water, evapotranspiration, groundwater, and streamflow. A watershed is a topographic area where all surface waters and shallow groundwaters drain to a specific point (Edwards et al., 2015). Figure 1: A simplified diagram of the water cycle within a watershed. (Brewster, 2017; ESRI, 2017)As precipitation falls onto the surface it can evaporate, be taken up by vegetation, infiltrate into the ground, and create surface and subsurface runoff to surface waters such as streams. These stream systems allow water to travel long distances and connect to larger watersheds or bodies of water. Surface water systems have great importance because they provide drinking water, electricity, and recreation for people. Being able to model this movement allows one to predict and trace the flow of water through a hydrologic system (Chow et al., 1988; O'Sullivan et al., 2012). Simulating flow throughout a stream network of a watershed, not only at a pour point of a watershed, is essential for studying water quality and quantity issues throughout the watershed. Determining the flow rate through a stream segment is a central task of surface water hydrology studies looking at erosion, pollution concentrations, and flooding occurrences, among many things (Chow et al., 1988).

Figure 1: A simplified diagram of the water cycle within a watershed. (Brewster, 2017; ESRI, 2017)

Page 9: Flow Routing Techniques for Environmental Modeling

8

Flow in an open stream network is governed by the continuity equation, in which mass is conserved, and the momentum equation, in which forces are at equilibrium.

Continuity Equation:

∂Q∂x

+∂Ac

∂t= 0

(1)

Where Q is discharge [m3/s], Ac is cross-sectional area [m2], t is time [s], and x is length [m]. The continuity equation states that the change in discharge over a set length of stream must offset the change in cross-sectional area over a set time to maintain the same amount of mass pushing through the system. In the conservation of mass, or continuity equation, volumetric flow rates between channel cross sections are equal since the volume of the channel is unchanged over time and mass is neither created or destroyed (Chaudhry, 2008).

Momentum Equation:

𝑆𝑆𝑓𝑓 = 𝑆𝑆𝑜𝑜 −

𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

−𝑣𝑣𝑔𝑔

𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

−1𝑔𝑔

𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

(2)

Where So is bed slope, Sf is frictional slope, y is surface elevation [m], x is length [m], v is water velocity [m/s], g is gravitational acceleration [m/s2], t is time [s]. The names of grouped variables are the pressure term 𝜕𝜕𝜕𝜕

𝜕𝜕𝜕𝜕, the convective acceleration term 𝑣𝑣

𝑔𝑔𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

, and the local acceleration term 1𝑔𝑔

𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

. The momentum equation describes the equilibrium of forces acting on a fluid (UCAR,

2006). The conservation of momentum equation is based on Newton’s second law of motion where the rate of change in momentum of liquid volume is equal to the result of external forces acting on the liquid volume (Chaudhry, 2008).

Simple flow models use the conservation of mass for an inflow-outflow relationship. More complex models use a physics-based method that incorporates the conservation of mass and conservation of momentum equations (Chow et al., 1988; UCAR, 2006). The kinematic, diffusive, steady dynamic, and full dynamic wave models incorporate both equations at different complexities to solve multiple streamflow conditions. Figure 2 shows how the momentum equation can be broken down into specific terms for several modeling purposes. The kinematic wave approximation assumes the frictional and bed slope forces dominate, and the rest of the terms are assumed to be negligible. In the diffusive wave approximation, the pressure term is included but the convective and local acceleration is negligible. The approximation for the steady dynamic wave model includes all the terms except the local acceleration term. The full dynamic wave approximation uses all terms in the full momentum equation.

Page 10: Flow Routing Techniques for Environmental Modeling

9

Figure 2: The momentum terms and equation used for each model.

Stream Routing Options Three flow routing methods for steady uniform flows are described here in order of

increasing complexity: constant volume, changing volume, and the kinematic wave routing method.

1. Constant volume routing is a simple method using only the continuity equation where flow going out of the segment is equal to the flow going into the segment. Volume, velocity, and depth remain constant with changing flows in this scheme.

2. Changing volume routing is another conservation of mass method in which, flow coming in is equal to the flow going out of the segment but volume, velocity, and depth change with flow based on channel hydrogeometry.

3. The kinematic wave model describes one-dimensional steady uniform flow waves moving through a stream channel. It is a simplification of the continuity and momentum equations.

The constant volume and changing volume methods are easily calculated by using only a simplified continuity equation. They are suitable for preliminary estimates of the time and shape of a flood wave (O'Sullivan et al., 2012). Methods for simulating flow with the continuity and the momentum equations, like the kinematic wave option, describe the temporal and spatial variations in flows throughout the stream network but at a computational cost. Table 1 shows the different input parameters needed for each of the stream routing options, while Table 2 shows the outputs of each model. Increasing model complexity requires increased numbers of parameters and computation costs. Figure 2 shows the differences in the hydrographs produced by the different methods described above. See Appendix A for the source code used in running these flow routing options.

Page 11: Flow Routing Techniques for Environmental Modeling

10

Table 1: Input parameters for flow routing schemes.

Inputs

Boundary Flow

[m3/s]

Length

[m]

Bottom Width

[m]

Z-slope

[2]

Depth Multiplier

y

Depth Exponent

c

Manning’s Roughness

n

Channel Slope

So

Initial Depth

[m]

Constant Volume

Changing Volume

*

Kinematic Wave

*

*Z-slope needed for triangle and trapezoid channel geometries

Table 2: Outputs for flow routing schemes

Outputs

Outflow [m3/s] Velocity [m/s] Volume [m3] Depth [m]

Constant Volume

Changing Volume

Kinematic Wave

Both the constant volume and the changing volume routing methods are examples of instantaneous flow models. This means the entire system responds immediately to a change in upstream inflow. Figure 3A shows the output of an instantaneous model with no time delay in movement of the flow wave downstream. The kinematic wave routing option is a non-instantaneous flow model. Figure 3B shows the model output where the flow wave is translated through the stream system at different times. When there is an increase in flow at 20 minutes upstream, 1500 meters downstream has not seen the implications of this increased flow yet. This time delay in flow is more representative of real world processes.

Page 12: Flow Routing Techniques for Environmental Modeling

11

Figure 3: Graphs showing how flow moves through instantaneous and non- instantaneous models. A) The model with instantaneous wave propagation for all segment location and B) A model showing a time delay in flow downstream.

Constant Volume Routing Constant volume flow routing is the simplest of the three options presented. Equation 3

shows the application of the conservation of mass where outflow (𝑄𝑄𝑜𝑜𝑜𝑜𝜕𝜕) of the stream segment of interest is equal to the inflows (𝑄𝑄𝑖𝑖𝑖𝑖) into the stream segment of interest. Constant volume routing is an instantaneous model so any changes in inflows anywhere translates throughout the entire system without a time lag (see Figure 3A). Volume, velocity, width, and depth remain constant. To work within a stream network, outflow (𝑄𝑄𝑖𝑖+1,𝜕𝜕) of a segment of interest is equal to the inflow from the segment before (𝑄𝑄𝑖𝑖,𝜕𝜕) and the sum of any boundary flows (𝑄𝑄𝐵𝐵,𝜕𝜕) into the segment of interest (Equation (4)).

𝑄𝑄𝑜𝑜𝑜𝑜𝜕𝜕 = 𝑄𝑄𝑖𝑖𝑖𝑖 (3)

𝑄𝑄𝑖𝑖+1,𝜕𝜕 = 𝑄𝑄𝑖𝑖,𝜕𝜕 + � 𝑄𝑄𝐵𝐵,𝜕𝜕

𝑖𝑖

𝑖𝑖

(4)

Page 13: Flow Routing Techniques for Environmental Modeling

12

Figure 4:The schematic above shows how incoming flows are instantaneous for all stream segments within a flow path.

Changing Volume Routing For the changing volume routing option, flow is propagated instantaneously as with

constant volume routing using Equations (3) and (4). However, in this method volume, velocity, area, and depth change as flow changes. To solve the continuity equation a relationship must be made between the two unknowns; flow (Q) and cross-sectional area (Ac). Flow [m3/s] can be described as the product of the cross-sectional area [m2] of the stream channel and the velocity (v) [m/s] of water moving through the system.

𝑄𝑄 = 𝑣𝑣𝐴𝐴𝑐𝑐 (5)

As flow changes, the velocity and/or depth must change to maintain mass balance; the velocity is therefore inversely proportional to the cross-sectional area. A flow-depth regression model based on the log of empirical observations is used to find depth assuming the power relationship below (Leopold; & Maddock, 1953).

𝑑𝑑 = 𝜕𝜕𝑄𝑄𝑐𝑐 (6)

Where d is depth [m], Q is discharge [m3/s], y and c are constants calculated by the regression model using observed data (Equation (5)). Taking the logarithm of Equation (6), gives:

Page 14: Flow Routing Techniques for Environmental Modeling

13

𝑙𝑙𝑙𝑙𝑔𝑔(𝑑𝑑) = 𝑐𝑐 ∗ 𝑙𝑙𝑙𝑙𝑔𝑔(𝑄𝑄) + 𝑙𝑙𝑙𝑙𝑔𝑔(𝜕𝜕) (7)

Figure 5 shows an example of the regression model. Volume, velocity, depth, and area of the segment are then calculated based on the geometry of the stream. Ac is calculated using equations provided in Table 3. Velocity (v) is calculated as given by Equation (8), and volume (V) is calculated as given in Equation (9).

𝑣𝑣 =𝑄𝑄𝐴𝐴𝑐𝑐

(8)

𝑉𝑉 = 𝐿𝐿 ∗ 𝐴𝐴𝑐𝑐 (9)

Figure 5: The flow-depth regression graph to solve for the slope, c, and the y-intercept, log(y).

Kinematic Wave Routing The kinematic wave routing scheme does not assume that flow changes instantaneously

throughout the system. This routing option uses the Continuity and Momentum equations often called the Saint Venant equations when used together (Miller, 1984). The kinematic wave method adopts the idea that the natural movement of flood waves is governed mostly by the friction and bed slopes. Kinematic wave models assume the pressure term, the convective acceleration, and the local acceleration terms of the Momentum Equation to be insignificant, thus only gravity and friction forces are included (Chapra, 1997; Miller, 1984). Some general

Page 15: Flow Routing Techniques for Environmental Modeling

14

assumptions for using the kinematic wave flow routing technique are that the flows are one-dimensional with no backwater effects, and the velocity is constant during the model time step (MacArthur & Devries, 1993). The changing flow wave propagates downstream, allowing an increased flow at the boundary to travel down the stream network with a lag in time (M.J. Lighthill & Whitham, 1955; Miller, 1984). The kinematic wave routing scheme translates a flood wave through the system with no attenuation of the peak flow (Nwaogazie, 1986). The resulting changes in flow, velocity, width, and depth associated with the flow wave are calculated in this routing option (Ambrose & Wool, 2017). The derivation of the kinematic wave equation is presented below.

Continuity Equation:

𝜕𝜕𝑄𝑄𝜕𝜕𝜕𝜕

+𝜕𝜕𝐴𝐴𝑐𝑐

𝜕𝜕𝜕𝜕= 0

(10)

Where Q is discharge [m3/s], Ac is cross-sectional area [m2], t is time [s], and x is segment length [m]. In this equation we have two unknowns, Q and Ac ; therefore, a second equation is needed. This second equation is obtained by combining, the Momentum Equation and Manning’s Equation (described later).

Momentum Equation:

𝑆𝑆𝑓𝑓 = 𝑆𝑆𝑜𝑜 −

𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

−𝑣𝑣𝑔𝑔

𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

−1𝑔𝑔

𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

(11)

Where Sf is frictional slope, So is bed slope, 𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

is the pressure term, 𝑣𝑣𝑔𝑔

𝜕𝜕𝑣𝑣𝜕𝜕𝜕𝜕

is the convective

acceleration term, and 1𝑔𝑔

𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

is the local acceleration term. Since the pressure, convective, and

acceleration terms are assumed to be insignificant, the Momentum Equation simplifies to 𝑆𝑆𝑓𝑓 =𝑆𝑆𝑜𝑜.

Manning’s Equation:

𝑄𝑄 =1𝑛𝑛

𝐴𝐴𝑐𝑐𝑅𝑅23�𝑆𝑆𝑓𝑓 (12)

Where n is the Manning’s roughness number, Ac is cross-sectional area [m2], and Sf is the frictional slope of the channel. Because the frictional slope is equal to bed slope in the Momentum Equation, Manning’s Equation can be used to solve for one of the unknowns from the Continuity Equation. Rearranging Manning’s Equation to solve for area, with the hydraulic radius substituted as 𝑅𝑅 = 𝐴𝐴𝑐𝑐/𝑃𝑃 and 𝑆𝑆𝑓𝑓 = 𝑆𝑆𝑜𝑜.

𝐴𝐴𝑐𝑐 = �𝑛𝑛𝑃𝑃

23𝑄𝑄

�𝑆𝑆𝑜𝑜�

35

= �𝑛𝑛𝑃𝑃

23

�𝑆𝑆𝑜𝑜�

35

∗ 𝑄𝑄35

(13)

Page 16: Flow Routing Techniques for Environmental Modeling

15

Where P is the wetted perimeter [m] described in the Channel Geometry section. By comparing Equation (13) to the power function:

𝐴𝐴𝑐𝑐 = 𝛼𝛼𝑄𝑄𝛽𝛽 (14)

we can set β = 3/5 and 𝛼𝛼 = (𝑖𝑖𝑃𝑃2/3

� 𝑆𝑆𝑜𝑜)3/5 . Equation (14) is differentiated with respect to time, and

the result is inserted as the second term in Equation (10) to obtain an equation with Q as the only unknown:

𝜕𝜕𝑄𝑄𝜕𝜕𝜕𝜕

+ 𝛼𝛼𝛼𝛼𝑄𝑄𝛽𝛽−1 𝜕𝜕𝑄𝑄𝜕𝜕𝜕𝜕

= 0 (15)

To solve this equation, we use the finite difference numerical approximation. There are many methods for the approximation. An explicit method is described by Chapra (1997), a partially implicit method is described by Chow et al. (1988), and a fully implicit version is used in USEPA’s Water Quality Analysis Simulation Program (WASP) (Ambrose & Wool, 2017). We chose to implement a solution like the one presented in WASP. The finite difference method solves the partial differential equation on a grid representing the space (i) / time (t) plane (Figure 6). An implicit scheme uses the points along the unknown coordinate for a solution. Location i is the location of interest and t +1 is moving forward in time.

Figure 6: The computational grid for solving the finite difference numerical approximation. The red dot represents the unknown value for space and time, the black dots represent known values.

Page 17: Flow Routing Techniques for Environmental Modeling

16

Using the equations for the discharge variation terms 𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

and 𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕

shown in Figure 6 to solve the kinematic equation implicitly leaving two unknown values:

�𝑄𝑄𝑖𝑖,𝜕𝜕 − 𝑄𝑄𝑖𝑖−1,𝜕𝜕+1

∆𝜕𝜕� + 𝛼𝛼𝛼𝛼𝑄𝑄𝑖𝑖,𝜕𝜕+1

𝛽𝛽−1 �𝑄𝑄𝑖𝑖,𝜕𝜕+1 − 𝑄𝑄𝑖𝑖,𝜕𝜕

∆𝜕𝜕� = 0 (16)

The subscript i, t+1 is the location and time we are interested in solving for, thus 𝑄𝑄𝑖𝑖,𝜕𝜕+1 is the unknown flow. 𝑄𝑄𝑖𝑖−1,𝜕𝜕+1is the flow from the upstream segment at the time we are interested in and 𝑄𝑄𝑖𝑖,𝜕𝜕 is the flow from the segment of interest at the previous time step. Figure 7 is a visualization of the stream segment location.

Figure 7: Stream location visualization. 𝑄𝑄𝑖𝑖,𝜕𝜕+1 is the unknown flow and 𝑄𝑄𝑖𝑖−1,𝜕𝜕+1is the flow from the upstream segment.

Rearranging Equation 16 to find the unknown flow:

𝑄𝑄𝑖𝑖,𝜕𝜕+1 =

−(𝑄𝑄𝑖𝑖,𝜕𝜕 − 𝑄𝑄𝑖𝑖−1,𝜕𝜕+1)∆𝜕𝜕𝛼𝛼𝛼𝛼(𝑄𝑄𝑖𝑖,𝜕𝜕+1

∗ )𝛽𝛽−1 ∆𝜕𝜕 + 𝑄𝑄𝑖𝑖,𝜕𝜕 (17)

This equation cannot be solved algebraically because the unknown, 𝑄𝑄𝑖𝑖,𝜕𝜕+1 is on both sides of the equation in its simplest form. The equation must be solved using an iteration. For the initial calculation we set one of the unknowns to equal the outflow from the current time and location (𝑄𝑄𝑖𝑖,𝜕𝜕+1

∗ = 𝑄𝑄𝑖𝑖,𝜕𝜕) , then the unknown, 𝑄𝑄𝑖𝑖,𝜕𝜕+1 is solved in an iterative loop where 𝑄𝑄𝑖𝑖,𝜕𝜕+1∗ is equal to

the new answer for 𝑄𝑄𝑖𝑖,𝜕𝜕+1and solved again until it converges with an 𝑒𝑒𝑒𝑒𝑒𝑒𝑙𝑙𝑒𝑒 of less than 10-3.

Page 18: Flow Routing Techniques for Environmental Modeling

17

𝑒𝑒𝑒𝑒𝑒𝑒𝑙𝑙𝑒𝑒 = �

𝑄𝑄𝑖𝑖,𝜕𝜕+1∗ − 𝑄𝑄𝑖𝑖,𝜕𝜕+1

𝑄𝑄𝑖𝑖,𝜕𝜕+1∗ �

(18)

Once the solution converges, stream characteristics are updated. Area is calculated by Equation (19) below. The depth variable is calculated using the equations in Table 3 for the respective channel geometry. Alpha is then recalculated using the new depth. If the absolute difference between the two calculated alphas is greater than a 10-3 error, then alpha is updated to the new value and area is recalculated. Using the updated area; depth, velocity, and volume are recalculated using equations in Table 3, and Equations 8, 9, respectively.

𝐴𝐴𝑐𝑐 = 𝛼𝛼𝑄𝑄𝛽𝛽 (19)

Channel Geometry Natural channels can have a wide range of shapes but models use simplified channel

shapes (Moglen, 2015). Three shapes are presented to represent natural channel geometries; rectangular, trapezoidal, and triangular (see Figure 8). The shape of the channel segment is used to relate area, depth, volume, velocity, and flow. Alpha (α) will change with the shape and depth of the channel due to the wetted perimeter calculation for each channel shape, as presented in Table 3.

Page 19: Flow Routing Techniques for Environmental Modeling

18

Figure 8: Channel Cross Sectional Geometry Descriptions where d=Depth (m), w=Width (m), z=run of side slope (default = 2).

Table 3: Table of formulas for channel shapes

Channel Shape

Cross Sectional Area

Wetted Perimeter

Alpha

Rectangular 𝑤𝑤 ∗ 𝑑𝑑 2𝑑𝑑 + 𝑤𝑤 �

𝑛𝑛�𝑆𝑆𝑜𝑜

(2𝑑𝑑 + 𝑤𝑤)23�

3/5

Trapezoidal 𝑤𝑤 ∗ 𝑑𝑑 + 𝑧𝑧 ∗ 𝑑𝑑2 𝑤𝑤 + 2𝑑𝑑�1 + 𝑧𝑧2 �

𝑛𝑛�𝑆𝑆𝑜𝑜

�𝑤𝑤 + 2𝑑𝑑�1 + 𝑧𝑧2�23�

3/5

Triangular 𝑧𝑧 ∗ 𝑑𝑑2 2𝑑𝑑�1 + 𝑧𝑧2 �

𝑛𝑛�𝑆𝑆𝑜𝑜

�2𝑑𝑑�1 + 𝑧𝑧2�23�

3/5

Page 20: Flow Routing Techniques for Environmental Modeling

19

Potential Errors Numerical approximations may introduce errors through their calculations. As natural

flood waves travel downstream, they may attenuate and disperse. However, the kinematic wave solution is not structured to incorporate these processes, it only translates waves through the system. Due to numerical approximations in the solution of the kinematic wave equation, these processes may be artificially introduced and create distortion of the flood wave (Nwaogazie, 1986). Numerical distortion is a type of discretization error that occurs due to the numerical approximations of an implicit solution which varies from the true solution (Fread, 1974). Distortion can be seen in the model output hydrograph as dispersion of the flood wave or as dampening (attenuation) of the wave peak. The attenuation of the peak flow is introduced by the limitations of the numerical solution (Chaudhry, 2008). Another concern when modeling flood waves is numerical instability. Instability in model output is defined as growth without bound of numerical errors from truncation and roundoff (Fread, 1974; Strelkoff & Falvey, 1993). These numerical errors can be amplified during the successive computations which can mask the true solution or crash the model. Nwaogazie (1986) describes in detail how large time steps can cause instability and how the chosen explicit or implicit solution scheme can cause attenuation of the peak flow and dispersion in a hydrograph. Figure 9 shows the resulting hydrograph from kinematic wave models containing numerical errors. In order for a model to maintain stability the time step has to meet the Courant Condition (Chapra, 1997, Equation (20)). Many models, including USEPA’s WASP, incorporate code to make sure the Courant Condition is not violated (Ambrose, 2017). The Courant Condition states that the time step (∆𝜕𝜕) must be less than the time for a wave to travel the segment distance (∆𝜕𝜕).

∆𝜕𝜕 ≤

∆𝜕𝜕𝑐𝑐𝑘𝑘

, 𝑐𝑐𝑘𝑘 =𝜕𝜕𝑄𝑄𝜕𝜕𝐴𝐴

(200)

Figure 9: Outputs from models that show numerical errors of instability (green), distortion (orange), and the expected flow wave (blue).

Page 21: Flow Routing Techniques for Environmental Modeling

20

Numerical errors can significantly affect the accuracy of the solution (Fread, 1974). The magnitude of the two modeled peak flows differ from the expected flow wave as shown in the figure. The rising and falling limbs of the modeled hydrographs also diverge from the expected hydrograph. This can have substantial implications on flood prediction and regulatory decision making.

Discussion Modeling flow throughout a stream network provides useful information about the volume, depth, discharge rate, and velocity in the network. Having detailed information within a watershed is useful for water quality and quantity studies. The routing methods presented show the effects of channel geometry and frictional forces on the discharge rate. Modeling flow is important for planning, designing, regulating, and managing our water resources (Nwaogazie, 1986). Routing methods should be chosen based on input data availability and scope of the objective. Streamflow routing methods simulate flow moving through a stream network, not just discharge at a pour point. The volumetric methods presented here require fewer input parameters than more complicated methods. Among the three methods presented in this report, the kinematic wave flow routing option simulates the most detail within the stream segment but is more computationally intensive.

Simple routing schemes like constant and changing volume should be used when the specific data needed for complex routing schemes are not available (Nwaogazie, 1986). Constant volume routing models can be applied anywhere to study the movement of water through a system, because stream characteristics are not needed. Changing volume routing methods are useful when the model time step is smaller than the time it takes for a flow wave to move through the system. For example, if the model time step is hourly and the flow wave moves through the system in one day, specific details from more complex models are unnecessary, because the volume changes only slightly in the model time step. The complex kinematic wave routing option is useful when detailed information about the stream system is available and when travel time of flow is important. The prediction of the a resulting flood wave from a dam failure is an example of a situation in which the more complex kinematic wave model is needed in environmental modeling (UCAR, 2006).

References Ambrose, R., & Wool, T. (2017). WASP8 Stream Transport-Model Theory and User's Guide. Brewster, R. (2017). Paint.net 4.0.17 (Version 4.0.17). Retrieved from https://www.getpaint.net/ Chapra, S. C. (1997). Surface Water-Quality Modeling: The McGraw-Hill Companies, Inc. . Chaudhry, M. H. (2008). Open-Channel Flow (Second Edition ed.): Springer. Chow, V. T., Maidment, D. R., & Mays, L. W. (1988). Applied Hydrology: McGraw-Hill Book

Company.

Page 22: Flow Routing Techniques for Environmental Modeling

21

Edwards, P. J., Williard, K. W. J., & Schoonover, J. E. (2015). Fundamentals of Watershed Hydrology. Journal of Contemporary Water Research & Education, 154(1), 3-20. doi: 10.1111/j.1936-704X.2015.03185.x

ESRI. (2017). ArcGIS Pro Release 2.0. Redlands, CA: Environmental Systems Research Institute.

Fread, D. L. (1974). Numerical properties of implicit four-point finite difference equations of unsteady flow. (NWS HYDRO-18). National Oceanic and Atmospheric Administration

Leopold;, L. B., & Maddock, T. (1953). The hydraulic geometry of stream channels and some Physiographic implications. U.S. Geologic Survey Prof. Pap, 252, 56.

M.J. Lighthill, & Whitham, G. B. (1955). On Kinematic Waves I. Flood Movement in Long Rivers Kinematic Waves (pp. 281-316). London: Proc. R. Soc.

MacArthur;, R., & Devries, J. (1993). Introduction and Application of Kinematic Wave Routing Techniques Using HEC-1.

Miller, J. (1984). Basic Concepts of Kinematic-wave Models Moglen, G. E. (2015). Fundamentals of Open Channel Flow. Boca Raton, FL: CRC Press. Nwaogazie, I. L. (1986). Comparative analysis of some explicit-implicit streamflow models.

Adv. Water Resources, 10, 69-77. doi: 030917088702006909 O'Sullivan, J. J., Ahilan, S., & Bruen, M. (2012). A modified Muskingum routing approach for

floodplain flows: Theory and practice. Journal of Hydrology, 470, 239-254. doi: 10.1016/j.jhydrol.2012.09.007

Perlman, H. (2016, December 15). The Water Cycle- USGS Water Science School. Retrieved 12/18, 2017, from https://water.usgs.gov/edu/watercycle.html

Strelkoff, T. S., & Falvey, H. T. (1993). Numerical Methods Used to Model Unsteady Canal Flow. Journal of Irrigation and drainage engineering, 119(4), 637-655.

UCAR. (2006). Streamflow Routing. Retrieved 1/20/2018, from https://www.meted.ucar.edu/hydro/basic/Routing/

Page 23: Flow Routing Techniques for Environmental Modeling

22

Appendix A Source code written in Python v3.6 for the flow routing options. The GitHub repository of the code can be found at https://github.com/quanted/hms_flask/blob/dev/modules/hms/hydrodynamics.py

Constant Volume:

##loop through segments to calculate outflow and parameters for each time step.

for t in range((len(time_s))):

for i in range(nsegments):

Q_out.iloc[t, i + 2] = Q_out.iloc[t, i + 1] # + tributary flow

HP_depth.iloc[t, i+2] = (model_segs['init_depth'][i]) ## This is the difference between Flow Routing and Stream Routing

if model_segs['ChanGeom'][i] == 'tz':

HP_areaC.iloc[t, i+2] = model_segs['bot_width'][i] * HP_depth.iloc[t, i+2] + model_segs['z_slope'][i] * HP_depth.iloc[t, i+2] ** 2

elif model_segs['ChanGeom'][i] == 'r':

HP_areaC.iloc[t, i+2] = model_segs['bot_width'][i] * HP_depth.iloc[t, i+2]

elif model_segs['ChanGeom'][i] == 't':

HP_areaC.iloc[t, i+2] = model_segs['z_slope'][i] * HP_depth.iloc[t, i+2] ** 2

HP_vel.iloc[t, i+2] = Q_out.iloc[t, i + 2] / HP_areaC.iloc[t, i+2]

HP_vol.iloc[t, i+2] = model_segs['length'][i] * HP_areaC.iloc[t, i+2]

HP_rt.iloc[t, i+2] = HP_vol.iloc[t, i+2] / Q_out.iloc[t, i + 2] / 24 / 60 / 60

Changing Volume:

##loop through segments to calculate outflow and parameters for each time step.

for t in range((len(time_s))):

for i in range(nsegments):

Q_out.iloc[t, i + 2] = Q_out.iloc[t, i + 1] # + tributary flow

HP_depth.iloc[t, i+2] = 10**(model_segs['depth_intercept'][i])*Q_out.iloc[t, i + 2]**model_segs['depth_exp'][i] ## This is the only difference between Flow Routing and Stream Routing

Page 24: Flow Routing Techniques for Environmental Modeling

23

if model_segs['ChanGeom'][i] == 'tz':

HP_areaC.iloc[t, i+2] = model_segs['bot_width'][i] * HP_depth.iloc[t, i+2] + model_segs['z_slope'][i] * HP_depth.iloc[t, i+2] ** 2

elif model_segs['ChanGeom'][i] == 'r':

HP_areaC.iloc[t, i+2] = model_segs['bot_width'][i] * HP_depth.iloc[t, i+2]

elif model_segs['ChanGeom'][i] == 't':

HP_areaC.iloc[t, i+2] = model_segs['z_slope'][i] * HP_depth.iloc[t, i+2] ** 2

HP_vel.iloc[t, i+2] = Q_out.iloc[t, i + 2] / HP_areaC.iloc[t, i+2]

HP_vol.iloc[t, i+2] = model_segs['length'][i] * HP_areaC.iloc[t, i+2]

HP_rt.iloc[t, i+2] = HP_vol.iloc[t, i+2] / Q_out.iloc[t, i + 2] / 24 / 60 / 60

Kinematic Wave:

def perimeter_calc(shape, d, wide, z_slope):

if shape =='tz':#for trapezoid

perim=wide +2 *d*(1 + z_slope**2)**0.5

elif shape =='r':#for rectangle

perim=2*d + wide

elif shape =='t':#for triangle

perim=2 *d*(1 + z_slope**2)**0.5

return perim

def depth_calc (shape, area, wide, z):

if shape =='r':#for rectangle

depth=area/wide

elif shape =='tz':#for trapezoidshape =='tz':#for trapezoid

depth=(-wide+np.sqrt((wide**2)-4*z*area))/2*wide

elif shape =='t': #for triangle

depth == np.sqrt(area/z)

return depth

##Loop through segments to calculate outflow and parameters for each time step.

for t in range(len(time_s)):

Page 25: Flow Routing Techniques for Environmental Modeling

24

for i in range(nsegments):

p_calc=perimeter_calc(model_segs['ChanGeom'][i],HP_depth.iloc[t,i+2], model_segs['bot_width'][i], model_segs['z_slope'][i])

alpha_data.iloc[t,i]=((model_segs['mannings_n'][i]/model_segs['chan_slope'][i]**0.5)*(p_calc**(2/3)))**beta

Q_hat = Qout.iloc[t, i+2]

Qout.iloc[t+1, i+2] = Qout.iloc[t, i+2] + ((Qout.iloc[t+1, i+1] - Qout.iloc[t, i+2])*(delta_t))/(model_segs['length'][i]*alpha_data.iloc[t, i]*beta*Q_hat**(beta-1))

While abs((Q_hat - Qout.iloc[t+1, i+2])/Q_hat ) > 1e-3: # implicit soln for Qout.iloc[t+1, i+2]

Q_hat = Qout.iloc[t+1, i+2]

Qout.iloc[t+1, i+2] = Qout.iloc[t, i+2] + ((Qout.iloc[t+1, i+1] - Qout.iloc[t, i+2])*(delta_t))/(model_segs['length'][i]*alpha_data.iloc[t, i]*beta*Q_hat**(beta-1))

HP_area.iloc[t,i+2]=alpha_data.iloc[t,i]*(Qout.iloc[t+1 , i+2])**beta

HP_depth.iloc[t+1,i+2]=HP_area.iloc[t,i+2]/model_segs['bot_width'][i]

#recalculating alpha using new depth p_calc2=perimeter_calc(model_segs['ChanGeom'][i],HP_depth.iloc[t+1,i+2], model_segs['bot_width'][i], model_segs['z_slope'][i])

alpha_star=((model_segs['mannings_n'][i]/model_segs['chan_slope'][i]**0.5)*(p_calc2**(2/3)))**beta

while abs((alpha_star-alpha_data.iloc[t,i])/alpha_data.iloc[t,i]) > 1e-3:

alpha_data.iloc[t,i]=alpha_star

HP_area.iloc[t,i+2]=alpha_data.iloc[t,i]*(Qout.iloc[t+1 , i+2])**beta

HP_depth.iloc[t+1,i+2]=depth_calc(model_segs['ChanGeom'][i], HP_area.iloc[t,i+2],model_segs['bot_width'][i], model_segs['z_slope'][i])

alpha_star=((model_segs['mannings_n'][i]/model_segs['chan_slope'][i]**0.5)*(p_calc2**(2/3)))**beta

HP_velocity.iloc[t,i+2]=Qout.iloc[t+1 , i+2]/HP_area.iloc[t,i+2]

HP_vol.iloc[t,i+2]=model_segs['length'][i]*HP_area.iloc[t,i+2]

Page 26: Flow Routing Techniques for Environmental Modeling

25

PRESORTED STANDARD POSTAGE

& FEES PAID EPA PERMIT NO. G-35

Office of Research and Development (8101R) Washington, DC 20460

Official Business Penalty for Private Use $300