Instruction for Explicit Routing Program

advertisement
Instruction for Explicit Routing Program
-
Explicit Channel Routing Program for MATLAB
-
Applicable for channels with trapezoidal cross-sections, and only for downstream boundary
condition based on Manning equation (will be extended for downstream boundary
conditions with discharge hydrograph, stage hydrograph, loop-rating, and constant stage
-
Includes Total of 11 M-files: BAT_EXPL, C2DEPTH, COMPARE, DN_DEPTH,
EXPLICIT,
GOUT_HG,
GOUT_PRF,
LOADFN,
NORM_DEPTH,
UP_DEPTH,
TEXT_OUT
-
Function of Each File
1) BAT_EXPL.M: performs series of analysis by batch work
2) C2DEPTH.M: converts celerity into depth
3) COMPARE.M: generates comparison plot of discharge hydrographs at downstream
boundary resulted from different computational options
4) DN_DEPTH.M: computes water depth at downstream boundary
5) EXPLICIT.M: core computation program, performs routing for a given hydraulic
condition
6) GOUT_HG.M: generates graphic output file of hydrograph
7) GOUT_PRF.M: generates graphic output file of profile
8) LOADFN.M: load data with only numeric values
9) NORM_DEPTH.M: computes normal depth from given discharge
10)
UP_DEPTH: computes water depth at upstream boundary
11) TEXT_OUT: generates text output file
-
Two major ways of running program
1) Running program for single task: just call ‘explicit.m’ at MATLAB command line with 2
arguments – the one is the name of data file and the other might be arbitrary integer
2) Running batch job for series of tasks: call ‘bat_expl.m’ at MATLAB command line and
enter the name of control file that contains the list of data files
*Note: Single task can be performed by 2nd method. If the control file contains only one
filename of input data, the result will be same as in the 1st method except that it generates
the figure of hydrograph at downstream boundary.
1
Name of Control File
BAT_EXPL
Control File:
List of Input
EXPLICIT
Input Data File:
Information for Analysis
Interpolation & Extension of Input Hydrograph
NORM_DEPTH
Initial Condition
Computation
For time=0 to Total Period
UP_DEPTH
For Distance=0 to Channel Length
C2DEPTH
Upstream Boundary
DN_DEPTH
Middle Points
Downstream Boundary
If(o_file≠’NONE’)
TEXT_OUT
If(G_OUT=1)
GOUT_HG
Output File
GOUT_PR
Store Output Hydrograph
F
Dummy File
Compare
Generates Plots with Different Options
Graphic Output
End
Figure. Flow of Program
2
Explanation for Input Data and Outputs corresponding to the Input Values
Following is the contents of a sample input data file, ‘test_i1.dat’. The file is consisted of 18
lines. The odd lines include explanation for the input variables and the even lines contain the
values of each variable. The odd lines are just for reference and might have different contents.
Modification of any odd line does not affect the results at all.
Task name (max. 3 digits)
TST
L (m)
b (m)
n
Slope
z
30000
15
0.015
0.0015
0
# of ord.
interval (of input hydrograph)
10
10
Ordinates of input hydrograph with 8 digits of each value, 10 values each line
9
# reach
60
13
21
T (min.)
360
26
22
17
14
12
10
9
dt(sec.)
5
Text output file (NONE for no text output)
test.out
Output variables
QVY
Number of points along the distance for output
X7
Number of points along the time for output
T6
Figure. Sample input data file, test_i1.dat
For the convenience of explanation, indication of each variable with line number and order in
a line will be used. As an example, L4#3 is roughness coefficient n and has value of 0.015 in
this case.
(1) L2#1: task name. Used to identify the run and used as the prefix of graphic output files.
Hence, suggested not exceed several digits. Here, 3 digits – TST.
(2) L4#1: Total length of channel reach to be analyzed. Should be in meter.
(3) L4#2: Bottom width of trapezoidal channel. Should be in meter.
(4) L4#3: Roughness coefficient of channel, n. Dimensionless.
(5) L4#4: Slope of channel. Dimensionless.
3
(6) L4#5: Side slope of trapezoidal cross-section, z.
(7) L6#1: Number of ordinates of input hydrograph at upstream boundary.
(8) L6#2: Time interval between each ordinate of upstream hydrograph in minutes.
(9) L8#1 – L8#10: Ordinates of hydrograph. Should be in CMS unit. The number of ordinate
values should be in accordance with the value of L6#2.
(10) L10#1: Number of sub-reaches for computation.
(11) L10#2: Total period of computation in minutes.
(12) L10#3: Time interval (∇t) of computation in seconds.
(13) L12#1: Name of text output file. ‘NONE’ for no text output.
(14) L14#1: May have any combination of Q, V, and Y. Q, V, and Y corresponds to discharge,
velocity, and depth, respectively. If ‘QVY’ is input, all three variables will be included in the
output.
(15) L16#1: Number of cross-sections at which the graphic outputs in hydrograph form are
made. If the value 2 is input, graphic output will be made just for the upstream boundary and
down stream boundary. The cross-sections will be equally spaced.
(16) L18#1: Number of time spans at which the graphic outputs in profile form are made. If
the value is 1, output will be made only for final moment.
Each value of the line 4, 6, and 10 should have 10digits, and the values of line 8 (ordinates of
hydrograph) should have 8 digit values.
Following is the example of text output. Since the output variable option was input as QVY,
output includes discharge, velocity, and depth.
Discharge at cross-section
0.0 m from upstream boundary
9.00
9.04
9.18
9.41
9.72
13.00
13.72
14.48
15.26
16.07
‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥
10.11
16.89
10.57
11.10
17.72
18.55
11.68
19.38
12.32
20.20
omitted ‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥
9.00
Discharge at cross-section
5000.0 m from upstream boundary
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.00
9.01
9.01
9.02
9.03
9.05
‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥
omitted ‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥
Figure. Sample output (only part)
4
Following is the sample of graphic output that shows the discharge hydrograph. This
graphic output file is automatically named as ‘TST_Q500x5.jpg’. The prefix ‘TST’ is
assigned according to the input task name (L2#1) of input data file, ‘test_i1.dat’. Q
corresponds to discharge, and 500x5 indicates that this result was made with computational
option of ∇x=500 m, ∇t = 5 sec. Every graphic output file is generated in ‘jpg’ file format.
Figure. Sample output in hydrograph, TST_Q500x5HG.JPG
As is shown in the above figure, hydrographs are made at 7 different points along the
channel. This is due to the value of 7 in L16#1. Following figure is profiles at 6 different
time corresponding to 6 in L18#1. The name of following graphic output file is
‘TST_Y500x5PF.JPG’ and the naming rule is same as for the above case. Except these two
files, 4 additional files are generated according to the sample input data file, ‘test_i1.dat’.
Those are ‘TST_V500X5HG.JPG’, ‘TST_Y500X5HG.JPG’, ‘TST_Q500X5PF.JPG’, and
‘TST_V500X5PF.JPG’.
5
Figure. Sample output, TST_Y500X5PF.JPG
Explanation for Control File
As was mentioned in the first page of this instruction, the analysis can be done in batch work.
To do this, control file should be prepared before program run. In this example, ‘test00.dat’ was
generated that contains the list of input data files as follows.
test_i1.dat
test_i2.dat
test_i3.dat
test_i4.dat
test_i5.dat
Figure. Sample of control file, test00.dat
The files, ‘test_i2.dat’, ‘test_i3.dat’, ‘test_i4.dat’, and ‘test_i5.dat’ have difference only in ∇t
6
value. ∇t
in ‘test_i1.dat’ is 5 (in seconds) and ∇t in the above files are 10, 15, 30, and 60,
respectively. Batch work can be done by running ‘BAT_EXPL.M’ with the control file. Finally
comparison plot is made for different computational option, in this case ∇t as shown in the
following figure.
Figure. Comparison plot for different computational option
7
Download