DMSTA Hydraulics,  Bypass, & Seepage Computations
The treatment train consists of a user-defined series of cells, each with separate phosphorus cycling & hydraulic properties.
Up to 6 cells can be simulated at once.  Cells can be configured in series and/or parallel (I.e. 1-dimensional branched network)
Each cell is assumed to have a flat bottom.  Conservative (low) estimates for cell area should be used in hilly terrain.
To reflect transport properties, each cell is divided into a series of "tanks" (CSTR's) for computing mass balances.
Hydraulic properties vary across cells, but not across tanks.
Each cell is assumed to be hydraulically independent (I.e. backwater effects are not simulated).  
Hydraulic gradient (inflow - outflow depth) within each cell is ignored (assumed small in relation to temporal variations in depth).
Computations of outflow from cell & bypass are described below.    
Factor Parameters
hydraulic resistance of vegetation as a function of depth  a,b empirically calibrated (see below)
outlet control depth ZC
outflow pump capacity (forces water level backup) QOMAX = 0 assumes infinite capacity
maximum water depth (forces bypass) ZMAX = 0 assumes infinite depth
inflow capacity (forces bypass) QINMAX = 0 assumes infinite capacity
Vegetation Qo  =   W  a  Z b
Outlet Control If     Z  <= ZC   Then  Qo  =   0
ZC  =   ZCO  + ZC(t)
If  a=0,  Qo computed from the water budget  &  depth set equal to control depth ( Z   = ZC )
Outflow Capacity Qo   <=   QOMAX If specified QOMAX = 0, this constraint is ignored.
Maximum Depth & Inflow Capacity (Bypass Criteria for First Cell in Treatment Train):
If     Z >= ZMAX   and   ZMAX > 0   then
QBYP =  Q1 bypass
else if    QINMAX = 0 then
QBYP = 0 QINMAX = 0 assumed infinite inflow capacity
else
QBYP =  Max ( 0 ,  Q1 - QINMAX )  bypass
endif
Outflow from Tank J within a given cell is computed by linear interpolation based upon cumulative cell area
Variables:
Qo outflow from cell (last tank) hm3/d computed from above equation
W cell mean width km area / length
Z mean depth m computed from water budget
ZC control depth m computed from above equation
ZCO base control depth m input constant (parameter sheet)
ZC(t) control depth on day t m input time series
QOUTMAX maximum outflow rate (outflow pump capacity) hm3/d input
QINMAX maximum inflow rate  hm3/d input
ZMAX max depth (levee constraint) m input
Calibration of Hydraulic Resistance Factors
Calibration Algorithm:
1 Set b = 3.5, seems to work for most systems; range 3-4.
2 Adjust control depth based upon observed flow vs. depth relationship
3 Adjust a to match observed mean depth over entire time series
4 If necessary, adjust b to match observed outflow vs. depth relationship
5 repeat 3, if necessary
Obs Mn Pred Mn Mean Mean P Calibration
Zc Length L/W Depth Depth Veloc. Storage R-Squared
System a b cm km  - cm cm cm/sec mg/m2 Depth Outflow Veget.
STA-6 1.200 3.500 40 1.876 1.00 39 37 0.151 873 0.843 0.915 Mixed
Cell-1_Z 0.400 3.500 40 3.560 2.71 68 63 0.189 1325 0.390 0.851 Mixed
Cell-2_Z 0.500 3.500 40 4.138 4.14 74 74 0.307 1970 0.587 0.836 Mixed
Cell-4_Z 0.700 3.500 40 1.723 2.02 66 70 0.334 1019 0.394 0.914 SAV
Cell-3_Z 1.200 3.500 20 2.583 1.92 49 49 0.279 822 0.395 #N/A Mixed
WCA2A 1.000 3.500 0 12.000 1.14 43 48 0.287 418 0.524 #N/A Mixed
Notes:
The calibrated "a" factor would reflect the combined effects of the following factors:
hydraulic resistance due to vegetation & associated litter layer
deviations from rectangular shape (assumed in computing width) ; likely to decrease "a" for a given vegetation type (e.g. Cell 4)
channelization (shortcircuiting around vegetation) due to remnant longitudinal farm canals or large open water areas
The user can estimate a & b independently based upon hydraulic equations (e.g, weir flow or mannings equation)
The hydraulic equation can be used to generate a theoretical Q/W vs. Z curve.
Parameters a & b can be fit to the theoretical curve.
Seepage Model
Average inflow & outflow seepage rates are computed for each cell based upon user-specified hydraulic properties.
Inflow Seepage Rate:
Seepin = Max [ 0,  EI (  ZI  -  Z ) ]
Seepin = Inflow Seepage Rate (m/yr)
Z = Mean Depth (m) Computed
ZI = Inflow seepage control elev. Input, reflects adjacent canal & gw elevations
EI = Inflow Seepage Coef (m/yr/m) Input, reflects hydraulic conductivity
Outflow Seepage Rate:
Seepout = Max [ 0,  EO (  Z  -  ZO ) ]
Seepout = Outflow Seepage Rate (m/yr)
ZO = Outflow seepage control elev. Input, reflects adjacent canal & gw elevations
EO = Outflow Seepage Coef (m/yr/m) Input, reflects hydraulic conductivity
Outflow seepage is collected across cells and routed to inflow, outflow, or to groundwater based upon user-specified parameters.
Inflow seepage has a user-specified concentration.
Outflow seepage concentration is constrained so that it does not exceed the average water-column concentration:
Cs  =  Min (  Csmax , Cavg ) ,       =  Co if Csmax = 0
Csmax = User-Specified Maximum Seepage Concentration (ppb)
Cavg = Average concentration across all tanks (ppb)
This constraint is applied to each stirred tank in the treatment cell.
When Csmax < Cavg, there is a net uptake of phosphorus as the seepage moves through the soil. 
Csmax can be set to reflect adsorption characteristics of soil.
This algorithm does not allow the soil to function as a net source of phosphorus.
06/08/02