Technical ReportPDF Available

R-TOT 6, River Time-of-Travel Computer Programmer's Manual

Authors:
Technical Report

R-TOT 6, River Time-of-Travel Computer Programmer's Manual

Abstract

R-TOT, the River Time of Travel Model, predicts of time of travel of a solute or entrained material in a river. The current version of R-TOT is programmed in Microsoft Visual Basic 6.0. The model provides a convenient user interface for input and output using forms to display queries and results. The model also provides easy user access to various special features available through Visual Basic. The program has primarily been applied in modeling spills in the Lower Mississippi River. However, as described in this manual, the program may be applied to other rivers by editing the R-TOT model data files.
R-TOT 6
River Time-of-Travel
Computer Programmer’s Manual
Michael Gene Waldon, Ph.D., P.E.
Center for Louisiana Inland Water Studies
Department of Civil Engineering
University of Southwestern Louisiana
Lafayette, Louisiana
June 1999
R-TOT Programmer’s Manual, June 1999 Page 1
Table of Contents
Overview....................................................... Page 2
Theoretical background and calculations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 2
Description of forms............................................... Page 5
Description of Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 7
Description of the Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 7
Modification for simulation of a new stream. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 8
Description of Data Input Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 8
Bibliography..................................................... Page 9
R-TOT Programmer’s Manual, June 1999 Page 2
Overview
R-TOT, the River Time of Travel Model, is a model for prediction of time of travel of a
solute or entrained material. The current version of R-TOT is implemented and
programmed in Microsoft Visual Basic 6.0. The model provides a convenient user
interface for input and output form to display results (Waldon 1999). The model also
provides easy user access to various special features available within Visual Basic..
Theoretical background and calculations
R-TOT calculates time-of-travel and peak concentration using a formulation
termed the Modified Plug Flow (MPF) model (Waldon 1998). This model assumes that
the leading edge, peak, and trailing edge of a spill travel at constant velocities
dependent on stream discharge and parameters specific to stream location. The peak
concentration, in this model, is assumed to fall in inverse proportion to spill duration.
Most calculations are performed in the module RTOTCalcModule. Some of the
variables used in the calculations are described in the following table.
Variable name Description
Rivermile Location for calculations on this row starting at the most upstream
rivermile and continuing by steps of DeltaMile to the most downstream
rivermile
Discharge Value of discharge is either single valued or is calculated from lookup
table by rivermile from Discharge Values worksheet.
a-Lead Parameter a for leading edge
b-Lead Parameter b for leading edge
Area-Lead Leading edge area in square feet
v-Lead fps Velocity of leading edge in feet per second
v-Lead mph Velocity of leading edge in miles per hour
TOT-Lead Time of travel of the leading edge from the most upstream rivermile to
the current rivermile in hours
R-TOT Programmer’s Manual, June 1999 Page 3
a-Peak Parameter a for peak
b-Peak Parameter b for peak
Area-Peak Peak area in square feet
v-Peak fps Velocity of peak in feet per second
v-Peak mph Velocity of peak in miles per hour
TOT-Peak Time of travel of the peak from the most upstream rivermile to the
current rivermile in hours
a-Trail Parameter a for trailing edge
b-Trail Parameter b for trailing edge
Area-Trail Trailing edge area in square feet
v-Trail fps Velocity of trailing edge in feet per second
v-Trail mph Velocity of trailing edge in miles per hour
TOT-Trail Time of travel of the trailing edge from the most upstream rivermile to
the current rivermile in hours
Mass (Rel) Initially 1.00 at the most upstream rivermile, this relative mass is
reduced when discharge reduces (i.e. is diverted).
Peak Conc
ug/L Peak concentration as the spill passes the current rivermile
Rivermile Rivermile value of this row if rivermile is between the user specified
starting and ending rivermiles. Otherwise, a value of #N/A (in Excel
this means no value is available) is assigned
Travel time from start
Lead Leading edge time-of-travel in hours from starting mile. If rivermile is
outside the starting-ending rivermile reach a #N/A value is assigned
R-TOT Programmer’s Manual, June 1999 Page 4
Peak Peak time of travel as described above
Trail Trailing edge time-of-travel as described above
R-TOT Programmer’s Manual, June 1999 Page 5
Description of forms
Form Name: DataInput
Description:
The “Option Explicit” statement included at the top of this module sheet means
that all user defined variables must be explicitly declared, typically in a Dim statement.
This option forces more complete documentation and reduces potential errors caused
by misspelled variable names within the program.
This is the main user input interface. It allows the user to enter required
information so as to get the desired results. Datainput form provides user with options
for help. The help can be obtained by clicking the RTOTHLP submenu of the HELP
menu. The user can give a title to the model.
The user is provided with two options of the date and time which are KNOWN
and UNKNOWN. The KNOWN option allows the user to choose the month, day, year,
hour and minute when the spill has occurred. The Datainput form has input for the
discharge in cubic feet per second.
The other inputs in the datainput form are LOCATIONS where the spill has
occurred which allows the user to select the location (upstream or down stream
rivermile along with its distribution number) form the dropdown menu which comes up,
the spill amount in either in pounds, kilograms, gallons or barrels. If the user selects the
spill amount to be in either gallons or barrels he has to enter the specific gravity of the
material too. Once all the requested data is filled the click of OK (RUN TOT) displays
the results form which is the OUTPUT form.
Associated modules:
ErrorChecker, RTOTCalcModule.
Associated Files:
ParamVal.txt, ErrorDef.txt, rivermile.txt, SpGravity.txt.
Associated Menu:
File, Edit and Help.
Form Name: Output
Description:
Used for Displaying the Results of the user input. This displays the banner of the
R-TOT where the current date is displayed.
The various outputs in this form are the TITLE for the model chosen, the
upstream river mile and down stream river mile with their distribution numbers, spill date
R-TOT Programmer’s Manual, June 1999 Page 6
and time, spill amount and its units chosen, discharge in cfs.
The output form displays the calculations of the Travel Times of Leading Edge,
Peak, Trailing Edge, Duration as total hours and also as number of days,hours and
minutes. Their corrosponding Arrival Dates and times with Velocity in Miles/Hr unit and
Feet/sec unit. The specific gravity of the material chosen and the Peak concentration at
the ending mile is also displayed along with its units.
The Model Does not allow the user to manipulate the Output data in any way for
security purposes.
Associated Menu:
File, Back.
R-TOT Programmer’s Manual, June 1999 Page 7
Description of Modules
ErrorChecker:
This Module displays the warnings and the error messages occuring in the
application. Warnings are given when the entered Discharge is too low or too high when
compared to the standard input. Error messages are displayed when the Down stream
river mile is higher than the Upstream river mile.
Error messages are Displayed if important data is not entered. Provision has
been made so that the User can re-enter the missed input. Care has been taken to
avoid entering a character instead of a number. Error message is displayed when the
value for the spill amount is either zero or smaller.
RTOTCalcModule:
This is the place where all the calculations are Performed. It has all the functions
and subroutines which perform the calculations for Travel time totalhours, (Days, hrs
and min), Arrival date and time, Velocity in Miles/hr and Feet/sec for Leading Edge,
Peak and Trailing Edge respectively.It also calculates the Peak concentration at the
ending mile based on the Spill amount units.
Description of the Menus
Datainput form:
FILE
Print: Prints the Datainput form to the default Printer.
Calc: Pops the Calculator on to the Screen.
Exit: Exits RTOT.
EDIT
Clear all: Clears All the data entered.
HELP
RTOTHLP: Displays the RTOT6 help file
OUTPUT form:
FILE
Print: Prints both Datainput and Output forms
Exit: Exits RTOT.
Back
This allows the user to go to the Datainput form and allows the user to re-
post the inputs or modify the input. On the Run click, it displays the recently calculated
values on the Output form.
Modification for simulation of a new stream
R-TOT Programmer’s Manual, June 1999 Page 8
Simulating a new stream is relatively straightforward. An objective of this version
of R-TOT was to keep all stream-specific values in data files. Thus, no knowledge of
Visual Basic programming should be required by the user simply updating a current
stream’s parameters or seeking to simulate a new stream.
Description of Data Input Files
ParamVal.txt:
File contains lookup table of parameter values. That is, a, b, and c values for the
leading edge, peak, and trailing edge areas. Rivermile values must be in
ascending numerical order. Values are assumed to be piecewise constant over
the rivermile interval from the value on the current row to the value on the next
row down. Commas are used as delimiters where multiple values are on a single
line. Strings which include spaces on comma delimited lines must be enclosed in
quotation marks.
Stream specific features:
Rivermile and parameter values must be entered for a new stream. Range name
“Parameters” must be given to this lookup table, and must be redefined if the
number of rows in the table is changed.
Format:
Line 1: name of river
Line 2: nRM – number of parameter reach values,
Qtypical – typical discharge used to scale “a” values
Line 3: Comment line, description of parameters
Lines 4-end: nRM lines of parameter values seperated by commas
Lead a, Peak a, Trailing a, Lead b, Peak b, Trailing b
ErrorDef.txt:
This file defines conditions and messages for Warnings and Errors depending on
value of discharge, locations of the river mile and spill amount inputs.
Format:
Lines beginning with an apostrophe (‘) are comments
Errors are defined by input of 4 lines each
Line 1 is "E" or "W" for error or warning
Line 2 is name of variable to compare (Q, Amt, RMUp, RMDown)
Line 3 comparison operator ("<", "=", ">"), comparison value
Line 4 error message string
These records are repeated until all error and warnings are defined.
R-TOT Programmer’s Manual, June 1999 Page 9
rivermile.txt:
This file lists rivermile locations for a number of predefined sites. These values
are used in the dialog drop down boxes of the Datainput form. Values are
selected from the drop down menu. Format is rivermile, followed by a comma
and a space, then the location description. Entries should be sorted from
upstream to downstream, that is, ascending rivermile, order.
All locations are stream specific.
Format:
Lines beginning with an apostrophe (‘) are comments
Each line includes rivermile value, a comma, and location description
SpGravity.txt:
This file lists specific gravity values for a number of predefined materials. These
values are used in the drop down box in the Datainput form. Values are picked
from the dropdown menu. Format is specific gravity value, followed by a comma
and a space, then the material description. Values in this table may be typical
values and only represent an approximation.
Format:
Lines beginning with an apostrophe (‘) are comments
Each line includes specific gravity value, a comma, and description
Bibliography
Waldon, M. G. (1998). “Time-of-travel in the Lower Mississippi River: Model
Development, Calibration, and Application.” Water Environment Research,
70(6), 1132-1141.
Waldon, M. G. (1999). “R-TOT 6, River Time-of-Travel Computer User's Manual.” ,
USL, Center for Louisiana Inland Water Studies.
... This diversion provides a base flow for the Bayou. Travel time in Bayou Lafourche may be estimated using the R-TOT time-of-travel model (Waldon, 1997). The R-TOT time-of-travel model for Bayou Lafourche was calibrated using dye-tracer studies which were performed by LDEQ and USGS prior to removal of vegetation from the Bayou. ...
Technical Report
Full-text available
It has been proposed to divert water from Lake Verret into Bayou Lafourche via the Cancienne Canal. Diversion flow is proposed to be between 500 to 1000 cubic feet per second (cfs). The study reported here provides a preliminary examination of the water quality implications of such a diversion.
ResearchGate has not been able to resolve any references for this publication.