Build a 1D River Model (Level 1 Step-by-Step Guidance)

This tutorial document is based on a steady-state problem from Thomann & Mueller (1987) “Principles of Surface Water Quality Modeling and Control” Sample Problem 6.10 (which was itself adapted from Driscoll et al., 1981).

The purpose is to provide new users of EE with a step-by-step tutorial to set up a simple hydrodynamic and water quality model that they can create themselves from scratch. At the same time, it provides the more advanced modeler the ability to make a comparison between analytical solutions and the EFDC results.

All files for this tutorial are contained in the Testcase Models of the Resources page folder file (TC-14_1D River_Test_Case).

1. Tasks to be performed

This document will take the user through the following steps:

  • building a grid
  • setting hydraulic parameters
  • setting initial conditions
  • setting boundary conditions
  • setting a conservative and non-conservative dye tracer
  • creating data files for calibration data
  • configuring calibration plots

2. Description of the Problem

2.1 Background

The problem is taken from Thomann and Mueller (1987, p.356). A city of approximately 60,000 people discharges its wastewater into a relatively small river with an average annual flow of about 250 cfs. The city’s wastewater is presently treated by a trickling filter plant which provides about 85% BOD removal and has reached its design capacity of 7.5MGD. The population is expected to increase by 50% to 92,000 people by the year 2000. Expansion of the treatment plan to the capacity of 11.5 MGD and provision of an activated sludge system for more efficient secondary treatment is proposed.

A calibration analysis at Qu = 100 cfs is done first to establish kinetic rated based on observed in stream data.

2.2 Basic Data and Data Processing

2.2.1 Data Requirements

  • Upstream and tributary boundary inflows of water and pollutants
  • Initial conditions of water depth and pollutants in time and space
  • Physical transport of water (velocity, travel time)
  • Waterbody geometry (length, depth, area, volume)
  • Pollutant fate reactions and interactions
  • Sources/loading rates of flow & pollutants

2.2.2 River Characteristics

Geometry

Relatively constant spatially overreach of interest. From three field surveys of different flows, the following area flow and depth flow relationships were derived:

  • A = 19.5Q0.6 ; A (ft2), Q (cfs)
  • H= 0.312Q0.5; H (ft), Q (cfs)
  • W = A/H


Flow

  • USGS gaging station upstream of WWTP
  • Long term average summer flow = 100 cfs
  • 7Q10 = 30 cfs (for min 7-consecutive day flow with a return period of once in 10 years)

 

Figure 1. 1-D River schematic.


Velocity

  • From the time of travel studies at various flows, U = 0.0513Q0.4; U (fps), Q (cfs)

Water Temperature

  • 25 oC during the low flow summer survey, 27 oC maximum monthly average temperature (August) to be used with 7Q10 to check conformance with standards.


Upstream conditions

Plant effluent

Stream @ x = 0

Q = 100 cfs

Qe = 7.5 MGD (11.6 cfs)

Q = 111.6 cfs

CBOD5 = 1.0 mg/l

CBOD5 = 40 mg/l

CBOD5 = 5.05 mg/l

NH3-N = 0.2 mg/l

NH3-N = 15 mg/l

NH3-N = 1.74 mg/l

DO = 8.3 mg/l (sat.)

DO = 8.3 mg/l (sat.)

DO = 8.3 mg/l

 


CBODU = 2.0 x 5.05 = 10.1 mg/l

 


NBOD = 4.57 x 1.74 = 7.8 mg/l


H = 0.312 x (111.5)0.5  = 3.3 ft

U = 0.0513 x (111.6)0.4 = 0.34 fps = 5.6 mpd = 10.32 cm/s

Ka = [12.9 x 0.340.5 / (3.3)1.5] x (1.024)25-20 = 1.42 /day @25 oC

2.3 Model Input Data 

Upstream boundary

  • Located at x = 227,030 m
  • Upstream inflow Qu= 2.83 cms  (100 cfs)
  • Upstream bottom elevation = 303 m


East Branch inflow (note that this inflow can be ignored and is not in the original example)

  • Located at x = 216,705.5 m
  • Qe=0


Waste Water Treatment Plant

  • Located at x = 213,528.7 m
  • Qw = 0.33 cms (7.5 mgd, 11.6 cfs)


Downstream boundary

  • Located at x = 165,083 m
  • Downstream bottom elevation = 300 m
  • Flow below WWTP =  3.16 cms  (100 + 11.6 =111.6 cfs)


Area-Depth-Velocity Relationships as f (flow, cfs)

  • Area = 19.5*Q0.6 =330.1 ft2 = 30.67 m2
  • Depth = 0.312*Q0.5 = 3.3 ft = 1.006 m
  • Velocity = 0.0513*Q0.4 =0.34 ft/s = 0.1036 m/s
  • Width = Area/Depth = 100.15 ft ~ 30.0 m
  • Grid cell length DY=1588.4 m
  • Total length of 1D river = 61,947.0 m
  • Number of Grid Cells = 39
  • Constant head for downstream elevation control = 301 m.


User experience and trial and error method to determine appropriate slope and bottom roughness

  • Bottom roughness:  Z0 = 0.06 m
  • Channel slope = - 0.5 e-4 m/m 
  • Cell depths computed by EFDC model from channel slope and upstream & downstream bottom elevations

3. Generating a New Model

3.1 Generate a New Model

3.1.1 Generating a Grid

In this step, we will generate a simple model grid to present the 1D river in our problem.

   1. Open EFDC+ Explorer.

   2. From the empty main form shown in Figure 2 select the New Model button or press Ctrl + N from the keyboard.

 

 

Figure 2. EFDC+ Explorer main form.

The form is shown in Figure 3 should now be displayed.

 

Figure 3. Generate the EFDC model.

3. Select Generate Uniform Grid for this case

4. We will now enter values for Lower Left and Upper Right of the model domain. These values correspond to the US and DS boundary conditions outlined in Model Input Data above

5. Set Lower-Left (m):                       (0; 165,083) in X and Y direction respectively

6. Set Upper-Right (m):                     (30; 227,030) in X and Y direction respectively

7. Cell Size (m): 30 and 1588.4 for X and Y respectively

8. Number of Cells: Press the Calculator symbol to update the number of Cell in X and Y directions.

9. Leave Rotation Angle = 0 as we won’t rotate the grid then

10. Press Generate button as shown in Figure 4. Note that EE creates two extra cells outside of each edge of the active cells, so the grid is (2+1+2) x (2+39+2) = 5 x 43

11. Press OK button, ignore the messenger box about UTM Zone as this is not in an actual physical location. 

 

Figure 4. Generate EFDC model – with data.

12. In the Main Form, the General Information of the model is now displayed (Figure 5)

Figure 5. Model Control form – General tab.

3.1.2 Naming and Saving the Model

1. The user should enter the name of the project by RMC on Descriptions in General tab. These will become the default names in the View Plan and Time Series titles. Run ID, Run Title, Project Title as shown in Figure 6. The user also can keep track of changes from model to model by RMC on Change Logs and updating information in the form as shown in Figure 7.


Figure 6. Model Description form – General tab.

Figure 7. Change Logs form – General tab.

2. Save the model by selecting Save button from main menu toolbars and create a new directory and then, press OK button. (See Figure 8)


Figure 8. Saving the model.

3.1.3 Viewing and Checking the Grid

Once the model grid is created and saved, we can display and check the grid.

   1. Click the 2DH  button on the main toolbar, or the user can go to 2DH View on Main Menu and select New 2DH View, to see the model in plan view.

   2. Enable Bottom Elevation by turning on the light  bulb icon from the View Layer Control menu as shown in Figure 9.

This now displays the bottom elevation of the model domain. As the model is very long and narrow, it is hard to see clearly. To increase the width of the model, the user must use horizontal exaggeration.

Figure 9. 2DH View.


   5. RMC on the legend to bring up the 2DView Settings as shown in Figure 10. From this form, the user can set the Easting value to 100 in the E/N Scales Modifiers frame. This will stretch the model by a factor of 100 in the Y direction and is easier to view.

Figure 10. 2DH View – 2DH View Settings.


Now we want to better understand the cell indices of our model.

   8. Add Cell Indices layer by LMC on this button   or RMC on the blank area in Layer Control and select Add new layer ... It will show View Options form, in Primary Group select Model Grid, in Parameters select Cell Indices, in Cell Indices Options choose Show I J's and set the value of I,J Skip to "1", then click on Add button to finish and close the windows (Figure 11)

  

Figure 11. Add Cell Indices layer to 2DH View.

   9. Click on any of the cells in the model domain to display an information box (yellow) that describes the cell L number, I and J number, the X, Y coordinates, bottom elevation, and depth.

Figure 12  2DH View – cell indices.

3.2 Assigning Initial Conditions

In this step, we will set up the initial conditions for bottom and water surface elevations.

3.2.1 Assigning Bathymetry

   1. Return to the 2DH View and enable edit for Bottom Elevation by clicking on the pen button shown in Figure 13.

Figure 13. Enable edit for Bottom Elevation.

   2. LMC on Grid Cell Tool button and click on Set IJ Slopes (Figure 14) to open the Assign Slope form. 

   3. In Assign Slope windows, set Start Value = 300 and J Slope = - 0.00005 then press OKNote that this is a negative slope to assign from the DS to US end of the model, starting at 300 m at the DS end. (Figure 15). The model's bathymetry is updated and shown in Figure 15.1 after clicking on OK button on the Figure 15.


Figure 14. Open Assign Slope windows.

Figure 15. Assign data for model bathymetry.

Figure 15.1 Model bathymetry after data Assignment.

3.2.2 Assigning Water Surface Elevation

Return to the Main Form and select the Initial Conditions tab to set water surface elevations as shown in Figure 16.

Figure 16. Main Form – Initial Conditions Tab: IC and bottom roughness.

   1. RMC on Water Depth/Elevation then select the Assign Depth to display the form shown in Figure 17.

   2. Click Assign Depth button

   3. Use Constant option and set the constant = 1.

   4. Click Apply Defined Conditions

   5. Click OK button

Figure 17 Assigning IC for WSEL.

Once the Model Bathymetry and Water surface elevation are assigned, we can check the data using the viewing options (2D plan view or the longitudinal profiles) by following the steps:

To check the data, return to the Main Form and select the Longitudinal Profile Plot button The Data Extraction form is shown in Figure 18 should now be in view. Using this form the user may select a profile along a pre-defined polyline (Drape file) or along an I or J entered by the user.

In this case, choose Use I and set Specific I = 3, then move to Define Parameter to Plot

To add Bottom Elevation to the plot, in Primary Group choose Bottom, in Parameter choose Bottom Elevation and press Add to plot button

To add WSEL to the plot, in Primary Group choose Water level, in Parameter choose Water Surface Elevation then press Add to plot and OK button. This displays the plot shown in Figure 19.

Figure 18. Data Extraction for Longitudinal Profile Plots.

Figure 19. Longitudinal Profile.

3.2.3 Assigning Bottom Roughness

      1. Similarly with WSEL, RMC on Roughness in Hydrodynamics under the Modules to open Bottom Roughness windows. LMC on Assign to display the form to assign the value (Figure 20)

      2. Choose Constant and set the value of Bottom Roughness = 0.06 

      3. Click on Interpolate to assign and Ok to close the form


Figure 20. Assign Bottom Roughness.

3.2.5 Placing Labels in the 2DH View

We now want to create labels for this model.

  1. Open a text editor and create a simple text file with three columns, space delimited.  X, Y, Z, and Label are the four columns.

X and Y correspond to the locations that we want our boundary conditions as shown in Figure 21.

Figure 21. Creating a labels file.

   2. Save the file with the suffix .dat or .txt

   3. Proceed to the ViewPlan 2D form

   4. Go to Import an External Overlay Layer button at the bottom Layer Control windows then select the label file and remember to choose the type of import file as Label Files (*.lbl, *.dat, *.txt),

   5. The label file is loaded and show as a layer on the 2D view.

When displayed the labels are as shown in Figure 23 and have not yet been correctly aligned and symbols have not yet been selected.

Figure 22. Loading Label File.

Figure 23. 2DH View: labels.


   7. RMC on the label layer just loaded and select Properties to correctly align the labels and set the symbols as shown in Figure 24 and Figure 25.

Figure 24. 2DH View: Edit Labels.

Figure 25. 2DH View: symbol properties.


   8. Update the symbols and labels as desired such as shown in Figure 26.

Figure 26. 2DH View with labels and makers.


   9. Select Save

It is assumed for the purposes of this tutorial that three data recording stations are providing measured data. The user should create a file to record the locations of data recording stations called 1DRiverStations.dat (Figure 27)

Import this file in the same way as above to have a new layer for this data recording stations label file (Figure 28).

Figure 27. 1DRiverStations dat file.

Figure 28. Loading data posting file.

Figure 29. Overlay of data posting file on labels.

4  Boundary Conditions

The boundary conditions for this model have been taken from the Thomman textbook example and are summarized in the table below. In this case, dye is used as a proxy for the contaminant transport.


Source

EFDC (I,J)

Flow (cms)

Dye (mg/L)

Upstream BC

(3,41)

2.832

0.2

East Branch

(3,35)

0

0.2

WWTP

(3,33)

0.329

15.0

Downstream

(3,3)

-3.161

n/a


To enter these BCs into the model we will first create the time series and then set the BC locations and link them to the time series.

Proceed to the External Forcing Data Tab shown in Figure 30

From this form, we can create the Flow boundary time series and the Dye boundary time series

Figure 30. Main Form – boundary condition settings.


4.1. Flow boundary time series   

   1. RMC on Flow and select Add New Data Series. This will display the form shown in Figure 31.

   2. Set the number of flow series to 3 (since Downstream will be set as a WSEL or pressure boundary) by clicking on Add New button 3 times

   3. Modified the value of each flow series by choosing them in Select Series or type the number of series base on the corresponding series on the beside text box

   4. Set the title to “Upstream” and type or copy and paste into the form for the time and flow data. The value of "200" represents the start time of the data series in Julian time. At least two times must be entered for each series. The values are entered shown in Figure 32

   5. Repeat this process for the WWTP series in Figure 33

   6. Repeat this process for the East Branch series, setting a flow of 0 in Figure 34.

   7. Click on OK button to finish editing Flow time series for boundaries.

Figure 31. Boundary condition settings: flow data series.

Figure 32. Boundary Condition: US flow.

Figure 33. Boundary Condition: WWTP flow.

Figure 34. Boundary Condition: East Branch flow.

4.2. Dye boundary time series

   1. Return for the Main Form shown in Figure 35 and enable Dye module by RMC on Modules and ticks on the checkbox Dye then press OK to return again to Main Form

Figure 35. Active Dye Module.

The Dye module will be added to the Modules, RMC on the Dye then select Settings, the form Dye Module will appear as shown in Figure 35.1 from this form, click on the drop-down list in the Type column then select Conservative Dye then click OK button.

Figure 35.1 Dye Module – Conservative Dye setting.

    2. Proceed to the External Forcing Data Tab. Now, you can see Dye is already shown in the drop-down menu

    3. RMC on Dye and select Add New Data Series.

    4. Repeat the above process for dye concentrations for the Upstream (US) as shown in Figure 36

    5. Create time series for dye concentration for EastBranch (EB) with the same values as for “Upstream”, ie 0.2 (Figure 37)

    6. Create time series for “WWTP” boundaries as shown in Figure 38.

Figure 36. Boundary Condition: upstream dye concentration.

Figure 37. Boundary Condition: East Branch dye concentration.

Figure 38. Boundary Condition: WWTP dye concentration.

4.3. Linking BC locations to the time series.  

  1.   In the Layer Control, turn on the View / Edit function of Boundaries, LMC on light, mouse, pen buttons 
  2.   RMC on the cell most upstream cell and select Add New Boundary Group to create a new boundary condition.
  3.   Name the Boundary Group Name with ID “Upstream” and select Boundary Group Type = Flow Boundary as shown in Figure 39.

 Figure 39. 2DH View – Assign Boundary Conditions: Upstream

 

The Flow Boundary Conditions will now be displayed. This form is used to link the flow table to the BC.

   6. Select Time-Varying option and use the drop-down table under the Forcing Assignment | Flow Table to select the “US” table.

   7. In the Boundary Group Conditions | Time-Varying Concentration | Constituent | Dye, select US table from the drop-down in the Data Series column (Figure 40)

   8. Click Edit (E) to check which series have been defined if necessary.

Repeat Step 2 to Step 8 to assign the locations of East Branch and WWTP boundaries. The locations are indicated in Build a 1D River Model (Level 1 Step-by-Step Guidance)#Figure 39-1. The properties of these boundaries are shown in Figure 41 and Figure 42.

Figure 39-1. BC locations.

Figure 40. Upstream boundary.


  

Figure 41. East branch boundary.


Figure 42. WWTP boundary.


Now we will set the Downstream BC. This will use a fixed WSEL to set the pressure boundary (clamped boundary). Therefore, we set a constant head at the downstream boundary.

  1.  RMC on the bottom-most cell (I=3, J=3)
  2.  Name the Boundary group Name “Downstream”. Click OK
  3.  Select South Open Boundary for Boundary Group Type as shown in Figure 43. Click OK
  4. After click OK button, the Open Boundary Conditions form appears as shown in Figure 44, select Time-Varying in Forcing Approach, in the Level Data click the Edit button, the Boundary Data Series will now be displayed as shown in Figure 45.
  5. Click on Add New button to create new boundary data series
  6. Give the name as “DS” for Series Name then press Enter
  7. Enter time and WSEL as shown in Figure 45 and click OK.
  8. Returning to the Open Boundary Conditions form. Select the new “DS” series from the drop-down menu then click OK as shown in Figure 46. Note that dye is not set to the Downstream boundary

All boundary conditions have now been set as shown in Figure 47.

Figure 43. Downstream Boundary Conditions.

Figure 44. Set BC for Downstream.

        


  Figure 45. Create WSEL for Downstream Boundary.

 

Figure 46. Link WSEL time series to the downstream open boundary.

Figure 47. 2DH View: Boundaries. 

5  Running the Model

We want to set the model to run from day 200 for 20 periods of 24 hours at a time step of 100 seconds as shown in Figure 48.

  1. Save the model
  2. Select the Timing/Linkage tab and RMC on Timing
  3. Set the Model start time to 200;
  4. Set # of Reference Periods to 20;
  5. Set Duration of reference periods to 24;
  6. Set Time step (seconds) to 100.

Figure 48. Main Form – Time / Linkage: model run timing.


   7. Click Run EFDC button from the main toolbar, the EFDC+ Run Options form appears, navigate to the General tab and set the Output Interval (min) to 15 minutes, select the version of EFDC+ executable file by browsing to the file locates in the default installation folder (e.g C:\Program Files\DSI\EEMS10.2) as shown in Figure 49.

   8. Click the Run EFDC+ button on the form to start run the model as shown in Figure 50.

Figure 49. EFDC+ Run Options: Set Output Interval.

Figure 50. EFDC+ Running window.

6  View Model Result

To View dye in 2DH View:

  1. When the model has finished running. Click on the Refresh Model Output button (). Click the 2DH button from the main toolbar to view the model results in the 2DH View.
  2. Add New Model Layer from Layer Control Select Primary Group: Water Column; Parameter: Dye; Option: Depth Average
  3. To see the change of dye, move the timing bar or using short-key Ctrl+G to go to a specific date then click OK button
  4. Click on a grid cell, the dye concentration will be shown in the yellow rectangle at a specific time as shown in Figure 51.

To view a time series of dye from selected grid cells:

  1. Select a cell (or multiple cells) first
  2. Click on the Time Series Plot button () from the main toolbar, the Extract Time Series Data form appears as shown in Figure 52, click OK button, a time series of the dye at those cells will be displayed as shown in Figure 53.

Figure 51. View dye concentration in the 2DH View.

Figure 52. View dye time series of selected cells (1).

Figure 53. View dye time series of selected cells (2).

7  Model Result vs. Measured Data

7.1 Conservative Dye Case

The longitudinal profile comparison will be selected for this case. A profile plot may be set up using the Longitudinal Profile button

  1. Click the Longitudinal Profile button () on the main toolbar, the Data Extraction for Longitudinal Profile form appears, select Use I option then enter 3 to Specify I.
  2. Select Primary Group: Water Column, Parameter: Dye, Options: Depth Average for Layer Settings then click Arrow button to add to Parameters to Plots, then click OK button as shown in Figure 54.
  3. After click OK button, the plot will be displayed, use Ctrl+G to go to t=218 then click OK button as shown in Figure 55.
  4. In order to compare to measured data, load the data file by clicking the Import button () from main toolbar (data file name: DyeCX_T218_readMe.dat)
  5. RMC on the legend to set the series line options for the data to dots using Line Formatting options as shown in Figure 56. As a result, the comparison plot is shown as Figure 57.

Figure 54. Define to plot longitudinal profile.


    

 

Figure 55. Longitudinal profile for I=3.


Figure 56. Plotting style options.

Figure 57. Dye longitudinal profile compared with measured data at Time = 218.

7.2 Non-Conservative Dye Case

To compare with the theoretical results it is necessary to reset the dye as a non-conservative substance as shown below.

Figure 58. Decay of Non-conservative substances in Cartesian coordinates and Logarithmic form.

Base on the conservative dye model, we will set a new model for the non-conservative dye model by following steps:

  1. RMC on the Dye module
  2. Then select Settings, Dye Module will appear, from this form click the drop-down list in the Type column then select the Non-conservative option
  3.  Set Dye decay Rate to 0.15 in the 1st-order Decay Rate (1/day) column as shown in Figure 59
  4. Save as model to a new model (e.g Run02)
  5. Run the new model again

The resulting longitudinal profile of dye for I=3 at time = 218 will be shown in Figure 60

Figure 59. Dye Module – Non-conservative Dye setting.

Figure 60. Longitudinal Profile: K=0.15 Non-conservative dye.

Now we use the data from Figure 61 (provided in the file “River1D-Analytical Solution.dat”) as longitudinal calibration data for this non-conservative model.

  1. Click Import Data Series button from the main toolbar shown in Figure 62.
  2. The Open form will appear, browse to folder contains the file “River1D-Analytical Solution.dat” then select that file
  3. Select “2” for the value for the analytical solution then click OK button as shown in Figure 63
  4. Use CTRL + G to go to time = 218, the longitudinal plot for dye comparison is shown in Figure 64

Figure 61. Longitudinal calibration Data.

Figure 62. Longitudinal calibration Data.


Figure 63. Longitudinal calibration Data.

Figure 64. Longitudinal plot: Data vs. modeled.



Time Series Comparison

We will now compare measured data at three stations, RIV01, RIV02, and RIV03 described earlier (Figure 29). Data for these stations is as shown below in Figure 65 and contained in the files: DyeTSRIV01.dat, DyeTSRIV02.dat, DyeTSRIV03.dat.

  1.    Return to Main Form | Model Analysis | Calibration Time Series (Figure 66)
  2.    RMC to Calibration Time Series then select Define Calibration Series

Figure 65. RIV01 calibration data.

Figure 66. Model Analysis: Calibration Time Series.

3. Set the Number of time series to 3 then press enter, three rows will be added in the below table of the form as shown in Figure 67

4. To fill in the grid table, the user can enter the values to each column or RMC on any cell on the table, the Station Information form will appear, from this form the user fills in the station's information as coordinates, parameter to compare (e.g Dye) and data file path (Figure 68). The user can click on the Get I & J button to see the station locates in which cell of the model. Finally, click OK button.

5. Enter group number and tick on Check box for all stations in the User column (unchecked box will be ignored to compare) as shown in Figure 69. Click OK button.


Figure 67. Update information of measured stations (e.g Station_1).

Figure 68. Model Analysis: Station Information.


Figure 69. Update information of the three measured stations completely and checked boxes to show plots.


6. Click Time Series Plots button on the form of Figure 69 to show the plot, the user can edit the time series of data from line to point and reset Y scale of the plot. Figure 70 shows modeled compared to data at RIV01. To go to the next calibration plot, the user can click on the Next Calibration Plotting button on the top main toolbar as shown in Figure 70

Figure 71 and Figure 72 show modeled compared to data at RIV02 and RIV03.

To save the calibration stations configured in the model, the user should save the model then select Save Profile File Only (EFDC.EE) option as shown in Figure 73. So next time when the user loads the model again, the calibration configuration is still existing in the model.


Figure 70. Time series comparisons: RIV01.

 

 

Figure 71. Time series comparisons: RIV02.

 


Figure 72. Time-series comparisons: RIV03.


Figure 73. Save Model to save calibration configuration.