
S.D. Peckham
February 15, 2017

==================================================
 Test of Diversion Component - Test_Plane_Canals
==================================================

For this test, the  DEM (plane_DEM.rtg) is an inclined plane that slopes
downward toward due north.  The DEM dimensions are 20 x 20 and the grid
cell size is 10 meters. The min and max elevations are 0 and 9.5 meters,
in the top and bottom rows, respectively.  Since elevations are for grid
cell centers, the slope is everywhere equal to (9.5 / 190) = 0.05 [m/m].

A rainfall grid (Rain_100mmph_on_right.rtg) is read by the Meteorology
component which has a steady, uniform rainrate of 100 mmph on the right
side and 0 on the left side.  Since the time step for the Meteorology
component is 6000 seconds (100 minutes) and the model run time is 60
minutes (set in Case1_topoflow.cfg), this rainrate is sustained for the
entire model run.

A canal is placed in the DEM that diverts flow from a grid cell on the
rainy side of the DEM, with (row, col) = (10, 16), to a grid cell due west
on the dry side of the DEM, with (row, col) = (10, 3).

Movies for the resulting grid of discharges (AVI and MOV formats) are
provided in the folder "00_Movies".

Details for the canal are read from the file "plane_canals.txt", which
includes the rows and columns of the endpoints, the fraction of discharge
that is diverted at the intake, and the travel time between the canal
entrance and exit.  In this case the length of the canal is 14 grid cells
or 140 meters and the travel time is 240 seconds (4 minutes).  This
represents a steady flow velocity in the canal of 0.583 [m/s].

Since Q_fraction is set to 1.0 in "plane_canals.txt", 100% of the flow is
diverted into the intake.  The discharge that enters the intake is the
amount that is generated by the constant rainrate in the grid cells that
lie upstream of the intake.  The contributing area to the intake is 9
grid cells, or 900 square meters.  So the discharge entering the intake
should ramp up from 0 to (900 m2)*(100 mmph) = 0.025 [m3 s-1].  That is,
0.025 is value of the steady-state discharge.

Note that discharge values at several "monitored grid cells" are saved in
the file "Case1_0D-Q.txt".  Values in this file can be used to "hand check"
whether the Diversions Fraction Method component is working properly.
We now list several basic facts that are easily deduced for the test case
just described, each followed by a model result that agrees with that fact.

-----------------------------------------------------------------------------
F1. Since 100% of the discharge at the intake is diverted into the canal,
    the discharge at the intake grid cell should always be 0.

R1. Note that all values in the Q_10_16 column are zero.

-----------------------------------------------------------------------------
F2. After 4 minutes (the travel_time in "plane_canals.txt"), all flow from
    the intake should reach the outtake.
 
R2. Comparing values in the Q_10_3 column to those in the Q_10_18 column
    for 4 minutes earlier shows agreement.  Note that the grid cell at
    (row, col) = (10, 18) is on the rainy side in the same row as the
    intake.
-----------------------------------------------------------------------------
F3. Since the only flow reaching the "dry side" of the DEM comes through
    the canal, the discharge in columns 1 through 9 (exluding column 3)
    should be zero.  Also, discharges upstream of the canal outtake in
    column 3 should be zero.

R3. Note that all values in Q_3_5, Q_2_5, Q_1_5 and Q_1_1 columns are 0.
-----------------------------------------------------------------------------
F4. Discharges downstream of the canal intake should be zero until the
    flow reaches them.

R4. Note that Q_1_3 (row 1, col 3) is zero for the first 28.5 minutes of
    the model run.  Flow through the canal is faster than flow from the
    outtake downhill, since a Manning n value of 0.3 is used (overland
    flow through vegetation).
-----------------------------------------------------------------------------
F5. The following grid cells have the same contributing area (9 grid cells):
      (row, col) =  (1, 16) = bottom of hill below intake
      (row, col) = (10, 18) = rainy side, just right of the intake
    so their discharges should be the same for all times and should approach
    the steady-state value of 0.025 [m3 s-1].

R5. Comparing the Q_10_18 and Q_1_16 columns shows they agree.
-----------------------------------------------------------------------------
F6. All monitored grid cells with a contributing area of 9 grid cells,
    including those in column 3 where all flow comes from the diversion,
    should approach a steady-state discharge of 0.025 [m3 s-1].

R6. This is the case.
-----------------------------------------------------------------------------
F7. The monitored grid cell with (row, col) = (1, 18) has a contributing
    area of 18 grid cells, so its discharge should approach a steady-state
    value of 0.05 [m3 s-1].

R7. This is the case.
-----------------------------------------------------------------------------


===================
 More Information
===================
More information on the Diversions component is available at:

  http://csdms.colorado.edu/wiki/Model_help:TopoFlow-Diversions

Note, however, that long-integer IDs were replaced in TF 3.5 with column
and row numbers in the source, sink and canal files.  This makes it easier
to edit and check these 3 input files.

 
