Вы находитесь на странице: 1из 17

Gradually Varied F low (GVF ) in P rismatic Open Channels

Clas s ification of GVF p r ofiles

This classification requires knowledge of the normal flow depth, yo, calculated from the
uniform flow equation (e.g., Manning’s equation),

A5/3 Q ⋅n
=
P 2/3
Cu ⋅ S o

where Cu = 1.0 m1/3/s in the Systeme Internationale, and Cu = 1.49 ft1/3/s in the English System;
the critical flow depth, yc, calculated from the critical flow conditions:

3 2
A Q
T g

and, y = actual flow depth, produced by channel controls.

Classification of open channel slopes:


_______________________________________________________________
Slope Flow Uniform Flow Slope Compared
Type Conditions Would Be With Critical
_______________________________________________________________

Mild (M) yo > yc SUBCRITICAL So < Sc

Critical (C) yo = yc CRITICAL So = Sc

Steep (S) yo < yc SUPERCRITICAL So > Sc

Horizontal (H) yo non existent So = 0

Adverse or
Negative (A) yo non existent So < 0
_______________________________________________________________

To sketch normal and critical flow lines, first identify regions (1), (2), and (3) for each case, as
shown in the figure below.
The differential equation governing a GVF profile is:

dy S o Sf
dx 2
1 Fr

where S f is the slope of the energy line and can be estimated from Manning’s equation using
the local depth y to calculate the hydraulic radius, Rh, as follows:

n2
Sf = ⋅V 2
Cu ⋅ Rh4 / 3

The Froude number squared can be calculated from

2
2 Q .T
Fr
3
g. A

where Q = discharge, T = top-width of cross-section, g = acceleration of gravity, and A = cross-


sectional area.

If dy/dx > 0 (+) then the flow depth increases downstream.


If dy/dx < 0 (-) then the flow depth decreases downstream.
To determine the sign of dy/dx, check the signs of the numerator (S o-S f) and of the
denominator (1 - Fr2).

In the numerator (recall that S f = f(V2)):

if y = yo , uniform flow, S f = S o, S o - S f = 0, and dy/dx = 0; also, this implies that the normal
depth line in any profile will be approached asymptotically.

if y > yo , V < Vo, S f < S o, and S o - S f > 0 (+)

if y < yo , V > Vo, S f > S o, and S o - S f < 0 (-)

In the denominator:

if y = yc , critical flow, Fr =1, 1-Fr2 = 0, and dy/dx →∞ ; also, this implies that the critical
depth line in any profile will be approached in a direction almost normal to the line.

if y > yc , subcritical flow, Fr < 1, 1-Fr2 > 0 (+)

if y < yc , supercritical flow, Fr > 1, 1-Fr2 < 0 (-)

With this information we can obtain the sign of dy/dx in the different regions of flow
illustrated in the figure above, and identify the curves shown in the figure below.

Case__________________________________________________________________

M1 y > yo > yc , S o - S f > 0 , 1-Fr2 > 0, and dy/dx > 0 (+), y increases downstream
M2 yo > y > yc , S o - S f < 0 , 1-Fr2 > 0, and dy/dx < 0 (-), y decreases downstream
M3 yo > yc > y , S o - S f < 0 , 1-Fr2 < 0, and dy/dx > 0 (+), y increases downstream

C1 y > yo = yc , S o - S f > 0 , 1-Fr2 > 0, and dy/dx > 0 (+), y increases downstream
C3 yo = yc > y , S o - S f < 0 , 1-Fr2 < 0, and dy/dx > 0 (+), y increases downstream

S1 y > yc > yo , S o - S f > 0 , 1-Fr2 > 0, and dy/dx > 0 (+), y increases downstream
S2 yc > y > yo , S o - S f > 0 , 1-Fr2 < 0, and dy/dx < 0 (-), y decreases downstream
S3 yc > yo > y , S o - S f < 0 , 1-Fr2 < 0, and dy/dx > 0 (+), y increases downstream

H2 yo > y > yc , S o - S f < 0 , 1-Fr2 > 0, and dy/dx < 0 (-), y decreases downstream
H3 yo > yc > y , S o - S f < 0 , 1-Fr2 < 0, and dy/dx > 0 (+), y increases downstream

A2 yo > y > yc , S o - S f < 0 , 1-Fr2 > 0, and dy/dx < 0 (-), y decreases downstream
A3 yo > yc > y , S o - S f < 0 , 1-Fr2 < 0, and dy/dx > 0 (+), y increases downstream
_____________________________________________________________________

3
The Dir ect Step Method for G.V.F . calculations

We are interested in solving the governing differential equation so that we can describe the
GVF profile as a set of data points (x,y). One method that is suitable for tabular calculations is
the so-called Direct Step method. In this method, values of y are given and the distance
between those depths, ∆x, is then calculated. The method can be derived from the energy
equation between two consecutive cross-sections in the channel separated by a length ∆x.
The Figure in next page shows the energy heads for a GVF.

The energy equation between sections (1) and (2) can be written as:

z1 + y1 + V12/2g = z2 + y2 + V22/2g + ? S f? ? x,
or,
z1 + E1 = z2 + E2 + ? S f? ? x,

Using the following substitutions,


∆E = E1 - E2,
z1 - z2 = S o⋅∆x,
you can solve for ∆x as

∆E
∆x = .
S f − So

4
Before using the Direct-Step method it is necessary to determine what type of a curve we are
solving for (i.e., M1, S2, etc.), since it will determine the direction of the calculation. For
example, for an M1 curve you should start from a value of y > yo, then create a table of values
of y approaching the value of yo. Obviously, your calculation will proceed downstream,
therefore, the values of ? x, obtained from the equation above, will be negative. The
procedure to fill out the table will depend on the type of cross-section under consideration.
The implementation of the direct-step method in the HP48G/GX calculator is included in sub-
directories GVET (for trapezoidal cross-section), GVEC (for circular cross-section), and GVEW
(for wide rectangular cross-section). Examples for the use of these sub-directories are shown
below.

SCILAB program for gradually-varied flow solution using the direct-step method

In this example, we obtain the solution for gradually-varied flow (GVF) in a trapezoidal channel
of slope So, Manning’s coefficient n, that carries a discharge Q. The cross-section has bottom
width b, side slope z (zH:1V), and flow depth y. For a trapezoidal cross-section, the cross-
sectional area A, the wetted perimeter P, the top width T, the hydraulic radius R, and the
hydraulic depth D, are given by the following expressions:

A = (b+zy)y, P = b + 2y(1+z2)1/2, T = b + 2zy, R = A/P, D = A/T

To determine the possible types of GVF profiles that can develop in a particular channel it is
necessary to calculate the normal depth yn and the critical depth yc for the flow.

The normal depth results from solving Manning’s equation:

Q = (Cu/n)A R2/3So1/2 = (Cu/n)(A5/3/P2/3)So1/2,

where Cu is a constant that depends of the system of units used. Cu = 1.0 for the International
System of units (S.I.), while Cu = 1.486 for the English System (E.S.).

5
The critical depth results from the critical condition Fr2 = 1, where Fr is the Froude number
defined as Fr = V/(gD)1/2, or
(Q2T)/(gA3) = 1,

where g is the acceleration of gravity (g = 9.806 m/s 2, g = 32.2 ft/s 2).

If yn > yc the channel is said to have a mild slope and the corresponding GVF profiles will be
referred to as M1, M2, or M3. If yn < yc the channel has a steep slope and GVF profiles S1, S2, or
S3. If yn = yc the channel has critical slope and GVF profiles C1, C2, or C3. The previous
results correspond to cases of positive bed slope, i.e., S o > 0. If the bed slope is zero (S o = 0,
horizontal channel) or negative (S o<0, adverse slope) no normal depth exists and only two GVF
profiles are available, H1 or H2 for horizontal slope and A1 and A2 for adverse slope. The
numbering 1, 2, or 3, correspond to profiles that develop above the largest of the two values yn
and yc, in between them, or below the smallest of the two values, respectively.

The direct-step method is developed by considering the energy equation between two
consecutive cross-sections of the channel (say sections k and k+1) separated by a distance ∆x:

yk + Vk 2/(2g) + So∆x = yk+1 + Vk+12/(2g) + Sf ∆x,


or
Ek + So∆x = Ek+1 + Sf ∆x,

where V represents velocities (V = Q/A), S o∆x represents the difference in bed elevation
between the cross-sections, and Sf ∆x represents the energy losses due to friction between the
two cross-sections. Also, E = y + V2/(2g) represents the specific energy at any cross-section.
The flow direction is from cross-section k to cross-section k+1. The quantity Sf is the mean
energy slope in the reach between the two cross-sections, i.e.,

Sf = ((Sf )k +(Sf )k+1)/2.

The energy slope at cross-section k can be obtained from the Manning’s equation as follows:

(Sf )k = (Q2n2/Cu2)(Pk 4/3/Ak 10/3).

In the direct-step method we start at a known cross-section with a known depth, say yo, and
try to find the distance ∆x 1 corresponding to a depth y1 = yo + ∆y. Then we continue finding
the distances ∆x 2, ∆x 3, …, for increasing (or decreasing) values of y. The distance increment
∆x k will be given by
∆x k = (Ek -Ek+1)/(So-Sf ).

Calculations can be performed by hand by creating a table with rows corresponding to each
value of y. The table will provide a list of values (xk ,yk ) which constitute the GVF profile.

The following SCILAB function is an interactive program for solving for normal and critical
depth, classifying the type of slope, and calculating the GVF profile.

=======================================================================
function GVFTrapDirect()
//Function for calculating normal and critical depths
//and GVF profile for a trapezoidal channel.
//The normal and critical depths are calculated using
//SCILAB's own fsolve( ) function, while the GVF profile
//is calculated using the DIRECT STEP method.

//Load function GVFTDS that calculates GVF profile through the

6
//direct-step method, and function draw_trapezoidal that produces
//a sketch of a trapezoidal cross-section.

getf('GVFTDS')
getf('draw_trapezoidal')

//Draw trapezoidal cross-section

draw_trapezoidal()

//Define function for Mannings equation and critical conditions


//as well as its derivatives with respect to depth (y)

deff('[A]=area(b,z,y)','A=(b+z*y).*y')
deff('[P]=perim(b,z,y)','P=b+2.*y*sqrt(1+z^2)')
deff('[T]=topwidth(b,z,y)','T=b+2*z*y')
deff('[fn]=fManning(y)','fn=area(b,z,y)^(5/3)/perim(b,z,y)^(2/3)-C1')
deff('[fnp]=fManningPrime(y)',...
'fnp = (area(b,z,y)^(2/3)/perim(b,z,y)^(2/3))*...
(-2*sqrt(1+z^2)*area(b,z,y)/perim(b,z,y)+5*topwidth(b,z,y))/3')
deff('[fc]=fCritical(y)','fc=area(b,z,y)^3/topwidth(b,z,y)-C2')
deff('[fcp]=fCriticalPrime(y)',...
'fcp = area(b,z,y)^2*(-2*z*area(b,z,y)/topwidth(b,z,y)^2+3)')

//Begin interactive part of program, enter and open output filename


write(%io(2),'==============================================================')
write(%io(2),'calculation of normal/critical depth for a trapezoidal channel')
write(%io(2),'==============================================================')
write(%io(2),' ')
write(%io(2),'Enter name of output file:')
fileName = read(%io(1),1,1,'(a)')
ufile = file('open',fileName,'new')

//Select system of units


write(%io(2),' ')
write(%io(2),'Select system of units: 1-ES 2-SI:','(a)')
system_of_units = read(%io(1),1,1)

//Select units:
if system_of_units == 1 then
l_unit = " ft "
a_unit = " ft^2 "
v_unit = " fps "
q_unit = " cfs "
Cu = 1.486
g = 32.2
else
l_unit = " m "
a_unit = " m^2 "
v_unit = " m/s "
q_unit = " m^3/s "
Cu = 1.0
g = 9.806
end

//Enter known data


write(%io(2),'Enter value of discharge, Q,' + q_unit + ':','(a)')
Q = read(%io(1),1,1)
write(%io(2),'Enter value of bottom width, b,' + l_unit + ':','(a)')
b = read(%io(1),1,1)
write(%io(2),'Enter value of side slope, z:','(a)')
z = read(%io(1),1,1)
write(%io(2),'Enter value of bed slope, So:','(a)')

7
So = read(%io(1),1,1)
write(%io(2),'Enter value of Mannings coefficient, n:','(a)')
n = read(%io(1),1,1)
write(%io(2),'Enter initial guess for flow depth, y,' + l_unit + ':','(a)')
y0 = read(%io(1),1,1)
write(%io(2),'=====================================================')

//Calculate constant and solve for normal depth


if So <= 0 then
yn = 0; An = 0; Pn = 0; Rn = 0; Tn = 0; Dn = 0; Vn = 0;
write(%io(2),'For horizontal or adverse slope normal depth is not
defined.')
else
C1 = (Q*n)/(Cu*sqrt(So));
yn = fsolve(y0,fManning,fManningPrime,0.001);
write(%io(2),'Normal depth of flow, yn = ' + string(yn) + l_unit)
fyn = fManning(yn);
write(%io(2),'Mannings equation function at y = yn is ' + string(fyn))
An = area(b,z,yn); Pn = perim(b,z,yn);
Rn = An/Pn; Tn = topwidth(b,z,yn); Dn = An/Tn; Vn = Q/An;
end

//Calculate constant and solve for critical depth


C2 = Q^2/g;
yc = fsolve(y0,fCritical,fCriticalPrime,0.001);
write(%io(2),'Critical depth of flow, yc = ' + string(yc) + l_unit)
fyc = fCritical(yc);
write(%io(2),'Critical conditions function at y = yc is ' + string(fyc))

//Check if normal depth and critical depth solutions are acceptable


ianswer = 3
while ianswer ~= 1 & ianswer ~= 2
write(%io(2),' ')
write(%io(2),'=====================================================')
write(%io(2),'Did the normal and critical depth solutions converge?')
write(%io(2),' ')
write(%io(2),'Select your answer: 1 - yes 2 - no')
write(%io(2),'=====================================================')
write(%io(2),' ')
ianswer = read(%io(1),1,1)
end

if ianswer == 2 then
write(%io(2),'Run program once more with different initial guesses for
solutions.')
abort
end

//Calculate cross-sectional and hydraulic properties for critical conditions

Ac = area(b,z,yc); Pc = perim(b,z,yc);
Rc = Ac/Pc; Tc = topwidth(b,z,yc); Dc = Ac/Tc; Vc = Q/Ac;

//Write information on normal and critical depths into output file


fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,"Solution of Gradually Varied Flow using the Direct Step
method.\n")
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,"Channel geometry, lining, and flow data:\n")
fprintf(ufile,"================================================================
=====\n")

8
fprintf(ufile," Bottom width of channel = %10.2f %s\n",b,l_unit)
fprintf(ufile," Side slope of channel = %10.3f \n",z)
fprintf(ufile," Bed slope of channel = %10.6f \n",So)
fprintf(ufile," Mannings coefficient = %10.6f \n",n)
fprintf(ufile," Discharge = %10.3f %s\n",Q,q_unit)
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,"Channel geometry for uniform flow conditions:\n")
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile," Normal depth of flow = %10.4f %s\n",yn,l_unit)
fprintf(ufile," Normal x-section area = %10.4f %s\n",An,a_unit)
fprintf(ufile," Normal wetted perimeter = %10.4f %s\n",Pn,l_unit)
fprintf(ufile," Normal hydraulic radius = %10.4f %s\n",Rn,l_unit)
fprintf(ufile," Normal top width = %10.4f %s\n",Tn,l_unit)
fprintf(ufile," Normal hydraulic depth = %10.4f %s\n",Dn,l_unit)
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,"Channel geometry for critical flow conditions:\n")
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile," Critical depth of flow = %10.4f %s\n",yc,l_unit)
fprintf(ufile," Critical x-section area = %10.4f %s\n",Ac,a_unit)
fprintf(ufile," Critical wetted perimeter = %10.4f %s\n",Pc,l_unit)
fprintf(ufile," Critical hydraulic radius = %10.4f %s\n",Rc,l_unit)
fprintf(ufile," Critical top width = %10.4f %s\n",Tc,l_unit)
fprintf(ufile," Critical hydraulic depth = %10.4f %s\n",Dc,l_unit)
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,"Velocities for normal and critical flow:")
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile," Normal flow velocity = %10.4f %s\n",Vn,v_unit)
fprintf(ufile," Critical flow velocity = %10.4f %s\n",Vc,v_unit)
fprintf(ufile,"================================================================
=====\n")

//Write information on normal and critical depths to screen


printf("=====================================================================\n
")
printf("Solution of Gradually Varied Flow using the Direct Step method.\n")
printf("=====================================================================\n
")
printf("Channel geometry, lining, and flow data:\n")
printf("=====================================================================\n
")
printf(" Bottom width of channel = %10.2f %s\n",b,l_unit)
printf(" Side slope of channel = %10.3f \n",z)
printf(" Bed slope of channel = %10.6f \n",So)
printf(" Mannings coefficient = %10.6f \n",n)
printf(" Discharge = %10.3f %s\n",Q,q_unit)
printf("=====================================================================\n
")
printf("Channel geometry for uniform flow conditions:\n")
printf("=====================================================================\n
")
printf(" Normal depth of flow = %10.4f %s\n",yn,l_unit)
printf(" Normal x-section area = %10.4f %s\n",An,a_unit)
printf(" Normal wetted perimeter = %10.4f %s\n",Pn,l_unit)
printf(" Normal hydraulic radius = %10.4f %s\n",Rn,l_unit)
printf(" Normal top width = %10.4f %s\n",Tn,l_unit)
printf(" Normal hydraulic depth = %10.4f %s\n",Dn,l_unit)

9
printf("=====================================================================\n
")
printf("Channel geometry for critical flow conditions:\n")
printf("=====================================================================\n
")
printf(" Critical depth of flow = %10.4f %s\n",yc,l_unit)
printf(" Critical x-section area = %10.4f %s\n",Ac,a_unit)
printf(" Critical wetted perimeter = %10.4f %s\n",Pc,l_unit)
printf(" Critical hydraulic radius = %10.4f %s\n",Rc,l_unit)
printf(" Critical top width = %10.4f %s\n",Tc,l_unit)
printf(" Critical hydraulic depth = %10.4f %s\n",Dc,l_unit)
printf("=====================================================================\n
")
printf("Velocities for normal and critical flow:")
printf("=====================================================================\n
")
printf(" Normal flow velocity = %10.4f %s\n",Vn,v_unit)
printf(" Critical flow velocity = %10.4f %s\n",Vc,v_unit)
printf("=====================================================================\n
")

//Classify channel
if So<0 then
slope_type = 'n adverse'
elseif So==0 then
slope_type = ' horizontal'
elseif yn > yc then
slope_type = ' mild'
elseif yn == yc then
slope_type = ' critical'
else
slope_type = ' steep'
end

//Print out information on type of channel slope to output file


fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,'The channel has a %s slope.',slope_type)
fprintf(ufile,"================================================================
=====\n")

//Print out information on normal and critical depth to screen


yn09 = 0.9*yn; yn11 = 1.1*yn; yc09 = 0.9*yc; yc11 = 1.1*yc;
printf("The channel has a %s slope.",slope_type)
printf("================================================================")
printf(" yn = %10.4f yc = %10.4f",yn,yc)
printf(" 0.9*yn = %10.4f 0.9*yc = %10.4f",yn09,yc09)
printf(" 1.1*yn = %10.4f 1.1*yc = %10.4f",yn11,yc11)
printf("================================================================")

//Enter initial depth and location of initial depth for GVF calculation
write(%io(2),'Enter initial value of y for GVF profile, y0,' + l_unit +
':','(a)')
y0 = read(%io(1),1,1)
write(%io(2),'Enter initial value of x for GVF profile, x0,' + l_unit +
':','(a)')
x0 = read(%io(1),1,1)
write(%io(2),'======================================================')

//Check type of GVF curve possible and calculate the GVF profile
GVFTDS(system_of_units,Q,n,g,Cu,So,b,z,yn,yc,x0,y0)

//Close output file

10
file('close',ufile)

//Indicate end of function


printf('End of function GVFTrapDirect')

//end of function
=======================================================================

This function loads and calls functions draw_trapezoidal and GVFTDS. Function
draw_trapezoidal draws a sketch of a trapezoidal cross-section in Scilab Graphics window
number 1, while function GVFTDS actually produces the flow classification and calculates the
GVF profile. A listing of the functions follows:

=======================================================================
function [] = draw_trapezoidal()
//Draw a trapezoidal cross section for an open channel
//
//Create a new graphic window
xset('window',1)
//Define window coordinates
xmin = 1; ymin = 1; xmax = 11; ymax = 9;
plot2d(0,0,-1,"010"," ",[xmin,ymin,xmax,ymax])
//Define coordinates of channel cross-section
xc = [2,3,5,7,9,10]; yc = [8,8,3,3,8,8];
//Draw polygon representing channel cross-section
xpoly(xc,yc,"lines",0)
//Draw line at free surface
xT = [3.4, 8.6]; yT = [7.0,7.0];
xpoly(xT,yT,"lines",0);
xL1 = [6.5,7]; yL1 = [6.8,6.8];
xpoly(xL1,yL1,"lines",0);
xL2 = [6.7,6.8]; yL2 = [6.6,6.6];
xpoly(xL2,yL2,"lines",0);
//Draw indicator for b
xpoly([5,5],[1.8,2.2],"lines",0);
xpoly([7,7],[1.8,2.2],"lines",0);
xarrows([5.7,5.1],[2,2],0.1,1);
xarrows([6.2,6.9],[2,2],0.1,1);
xstring(5.9,1.75,'b')
//Draw indicator for Y
xpoly([8,10],[3,3],'lines',0);
xpoly([9,10],[7,7],'lines',0);
xarrows([9.5,9.5],[5,3.1],0.1,1);
xarrows([9.5,9.5],[6,6.9],0.1,1);
xstring(9.4,5.2,'y')
//Draw sideslope lines
xpoly([7.8,7.8],[5,6],'lines',0);
xpoly([7.8,8.2],[6,6],'lines',0);
xstring(7.6,5.3,'1');
xstring(8,6.1,'z');
//Draw figure title
xstring(4.8,9,'Trapezoidal cross-section');
//Draw frame for figure
xrect(xmin,ymax,abs(xmax-xmin),abs(ymax-ymin));
//Send a message indicating graphics window
xset('font',2,1);
x_message_modeless(['See Scilab Graphics Window 1', ...
'for trapezoidal cross-section sketch. This', ...
'sketch will help you identify the geometric', ...
'elements of the cross-section that you need', ...
'to provide for the solution to this problem.']);
//End of function draw_trapezoidal

11
=======================================================================
function GVFTDS(unit_system,Q,nn,g,Cu,So,b,z,yn,yc,x0,y0)

//Function GVFTDS calculated Gradually-Varied Flow in a Trapezoidal


//channel using the Direct Step method

deff('[A]=area(b,z,y)','A=(b+z*y).*y')
deff('[P]=perim(b,z,y)','P=b+2.*y*sqrt(1+z^2)')

//Classify possible curve, first according to slope


if So<0 then
curve = 'A'
elseif So==0 then
curve = 'H'
elseif yn > yc then
curve = 'M'
elseif yn == yc then
curve = 'C'
else
curve = 'S'
end

//Next, classify curve according to starting value of y

if curve == 'A' | curve == 'H' then


if y0 < yc then
curve = curve + '3'
else
curve = curve + '2'
end
elseif curve == 'C' then
if y0 < yc then
curve = curve + '3'
else
curve = curve + '1'
end
elseif curve == 'M' then
if y0 < yc then
curve = curve + '3'
elseif y0 > yc & y0 < yn then
curve = curve + '2'
else
curve = curve + '1'
end
else
if y0 < yn then
curve = curve + '3'
elseif y0 > yn & y0 < yc then
curve = curve + '2'
else
curve = curve + '1'
end
end
disp('Possible GVF curve: ' + curve);
disp('====================================================')

//Start direct-step calculations


write(%io(2),'Enter final value of y for GVF profile, yf,' + l_unit +
':','(a)')
yf = read(%io(1),1,1)
write(%io(2),'Enter increment for y for GVF profile, dy,' + l_unit + ':','(a)')
dy = read(%io(1),1,1)
disp('====================================================')

12
//Check sign of depth increment
if yf<y0 & dy>0 then
dy = -dy
elseif yf>y0 & dy<0 then
dy = -dy
elseif dy == 0 then
disp('y0 = ' + string(y0) + ' and yf = ' + string(yf))
disp('dy increment is zero. Enter new value for dy:')
dy = read(%io(1),1,1)
end

//Print out information on GVF parameters to output file


fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,'Gradually Varied Flow parameters:')
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile," Possible GVF curve: %s.",curve)
fprintf(ufile,"================================================================
=====\n")
fprintf(ufile,' Starting location for GVF = %10.2f %s\n",x0,l_unit)
fprintf(ufile,' Initial depth for GVF = %10.4f %s\n",y0,l_unit)
fprintf(ufile,' Ending depth for GVF = %10.4f %s\n",yf,l_unit)
fprintf(ufile,' Depth increment for GVF = %10.4f %s\n",dy,l_unit)
fprintf(ufile,"================================================================
=====\n")

n = int(abs((yf-y0)/dy))+1
yy = zeros(1,n)
for j = 1:n
yy(j) = y0 + (j-1)*dy
end
A = zeros(yy); P = zeros(yy);
V = zeros(yy); E = zeros(yy);
Sf = zeros(yy);
x = zeros(yy); x(1) = x0;
Sfbar = zeros(yy);
Dx = zeros(yy);
DE = zeros(yy);
for j = 1:n
A(j) = area(b,z,yy(j))
P(j) = perim(b,z,yy(j))
V(j) = Q/A(j)
E(j) = yy(j) + V(j)^2/(2*g)
Sf(j) = (Q*nn/Cu)^2*P(j)^(4/3)/A(j)^(10/3)
end
for j = 2:n
Sfbar(j) = 0.5*(Sf(j)+Sf(j-1))
DE(j) = E(j-1)-E(j)
Dx(j) = DE(j)/(Sfbar(j)-So)
x (j) = x(j-1) + Dx(j)
end

if unit_system == 1 then
usys = "English"
else
usys = "International"
end

13
disp('==============================================')
disp('Table of results for direct step calculations. ')
printf('Results in standard units of the %s system',usys)
disp('=========================================================================
========================')
disp(' y A P V E DE Sf Sfbar
Dx x')
disp('=========================================================================
========================')
for j = 1:n
printf('%8.4f %8.2f %8.2f %8.2f %8.6f %8.6f %10.8f %10.8f %10.2f
%10.2f',...
yy(j),A(j),P(j),V(j),E(j),DE(j),Sf(j),Sfbar(j),Dx(j),x(j))
end
disp('=========================================================================
======================')

fprintf(ufile,'================================================================
=================================')
fprintf(ufile,'Table of results for direct step calculations.')
fprintf(ufile,'Results in standard units of the %s system',usys)
fprintf(ufile,'================================================================
=================================')
fprintf(ufile,' y A P V E DE Sf
Sfbar Dx x')
fprintf(ufile,'================================================================
=================================')
for j = 1:n
fprintf(ufile,'%8.4f %8.2f %8.2f %8.2f %8.6f %8.6f %10.8f %10.8f %10.2f
%10.2f',...
yy(j),A(j),P(j),V(j),E(j),DE(j),Sf(j),Sfbar(j),Dx(j),x(j))
end
fprintf(ufile,'================================================================
=================================')

//end of function

=======================================================================

Example. Consider the case in which b = 1.5 m, z = 1.0, So = 0.00001, n = 0.012, Q = 0.8 m3/s.
Suppose that a dam raises the water surface to a depth of 2.5 m, calculate the GVF profile
from that point upstream until reaching a point equal to 1.1yn .

The following lines represent the SCILAB session used to solve the problem. It is assumed that
the functions GVFTrapDirect, draw_trapezoidal and GVFTDS are stored in the sub-directory (or
folder) c:\myScilab\ScilabGVF. The user input to the program is shown in bold-italic font
below. An output file named c:\myScilab\ScilabGVF\output_example is created in the process.

=======================================================================
-->chdir('c:\myScilab\ScilabGVF')
ans =

0.

-->getf('GVFTrapDirect')

-->GVFTrapDirect()
==============================================================
calculation of normal/critical depth for a trapezoidal channel
==============================================================

14
Enter name of output file: c:\myScilab\ScilabGVF\output_example

Select system of units: 1-ES 2-SI: 2


Enter value of discharge, Q, m^3/s : 0.8
Enter value of bottom width, b, m : 1.5
Enter value of side slope, z: 1.0
Enter value of bed slope, So: 0.00001
Enter value of Mannings coefficient, n: 0.012
Enter initial guess for flow depth, y, m : 0.5
=====================================================
Normal depth of flow, yn = 1.3356467 m
Mannings equation function at y = yn is .0000059
Critical depth of flow, yc = .2873053 m
Critical conditions function at y = yc is 3.364E-07

=====================================================
Did the normal and critical depth solutions converge?

Select your answer: 1 - yes 2 - no


=====================================================
1
=====================================================================
Solution of Gradually Varied Flow using the Direct Step method.
=====================================================================
Channel geometry, lining, and flow data:
=====================================================================
Bottom width of channel = 1.50 m
Side slope of channel = 1.000
Bed slope of channel = 0.000010
Mannings coefficient = 0.012000
Discharge = 0.800 m^3/s
=====================================================================
Channel geometry for uniform flow conditions:
=====================================================================
Normal depth of flow = 1.3356 m
Normal x-section area = 3.7874 m^2
Normal wetted perimeter = 5.2778 m
Normal hydraulic radius = 0.7176 m
Normal top width = 4.1713 m
Normal hydraulic depth = 0.9080 m
=====================================================================
Channel geometry for critical flow conditions:
=====================================================================
Critical depth of flow = 0.2873 m
Critical x-section area = 0.5135 m^2
Critical wetted perimeter = 2.3126 m
Critical hydraulic radius = 0.2220 m
Critical top width = 2.0746 m
Critical hydraulic depth = 0.2475 m
=====================================================================
Velocities for normal and critical flow:
=====================================================================
Normal flow velocity = 0.2112 m/s
Critical flow velocity = 1.5579 m/s
=====================================================================
The channel has a mild slope.
================================================================
yn = 1.3356 yc = 0.2873
0.9*yn = 1.2021 0.9*yc = 0.2586
1.1*yn = 1.4692 1.1*yc = 0.3160
================================================================
Enter initial value of y for GVF profile, y0, m : 2.5
Enter initial value of x for GVF profile, x0, m : 0.0

15
======================================================
Possible GVF curve: M1
====================================================
Enter final value of y for GVF profile, yf, m : 1.5
Enter increment for y for GVF profile, dy, m : -0.05
====================================================
==============================================
Table of results for direct step calculations.
Results in standard units of the International system
===================================================================================
y A P V E DE Sf Sfbar Dx x
============================================================================================
2.5000 10.00 8.57 0.08 2.500326 0.000000 0.00000075 0.00000000 0.00 0.00
2.4500 9.68 8.43 0.08 2.450348 0.049978 0.00000082 0.00000078 -5423.23 -5423.23
2.4000 9.36 8.29 0.09 2.400372 0.049976 0.00000089 0.00000086 -5465.76 -10888.99
2.3500 9.05 8.15 0.09 2.350399 0.049974 0.00000098 0.00000094 -5513.88 -16402.87
2.3000 8.74 8.01 0.09 2.300427 0.049971 0.00000107 0.00000103 -5568.52 -21971.39
2.2500 8.44 7.86 0.09 2.250458 0.049969 0.00000118 0.00000113 -5630.85 -27602.24
2.2000 8.14 7.72 0.10 2.200493 0.049966 0.00000130 0.00000124 -5702.29 -33304.53
2.1500 7.85 7.58 0.10 2.150530 0.049963 0.00000143 0.00000136 -5784.64 -39089.17
2.1000 7.56 7.44 0.11 2.100571 0.049959 0.00000158 0.00000150 -5880.13 -44969.30
2.0500 7.28 7.30 0.11 2.050616 0.049955 0.00000175 0.00000166 -5991.62 -50960.92
2.0000 7.00 7.16 0.11 2.000666 0.049950 0.00000194 0.00000184 -6122.83 -57083.75
1.9500 6.73 7.02 0.12 1.950721 0.049945 0.00000215 0.00000205 -6278.64 -63362.39
1.9000 6.46 6.87 0.12 1.900782 0.049939 0.00000240 0.00000228 -6465.60 -69827.99
1.8500 6.20 6.73 0.13 1.850850 0.049932 0.00000268 0.00000254 -6692.74 -76520.74
1.8000 5.94 6.59 0.13 1.800925 0.049925 0.00000300 0.00000284 -6972.79 -83493.53
1.7500 5.69 6.45 0.14 1.751009 0.049916 0.00000337 0.00000318 -7324.32 -90817.85
1.7000 5.44 6.31 0.15 1.701103 0.049906 0.00000379 0.00000358 -7775.49 -98593.34
1.6500 5.20 6.17 0.15 1.651208 0.049895 0.00000429 0.00000404 -8371.13 -106964.47
1.6000 4.96 6.03 0.16 1.601326 0.049882 0.00000486 0.00000457 -9187.23 -116151.69
1.5500 4.73 5.88 0.17 1.551460 0.049866 0.00000552 0.00000519 -10363.61 -126515.30
============================================================================================
End of function GVFTrapDirect

The contents of file c:\myScilab\ScilabGVF\output_example, very similar to the session shown


above, are listed next:

=====================================================================
Solution of Gradually Varied Flow using the Direct Step method.
=====================================================================
Channel geometry, lining, and flow data:
=====================================================================
Bottom width of channel = 1.50 m
Side slope of channel = 1.000
Bed slope of channel = 0.000010
Mannings coefficient = 0.012000
Discharge = 0.800 m^3/s
=====================================================================
Channel geometry for uniform flow conditions:
=====================================================================
Normal depth of flow = 1.3356 m
Normal x-section area = 3.7874 m^2
Normal wetted perimeter = 5.2778 m
Normal hydraulic radius = 0.7176 m
Normal top width = 4.1713 m
Normal hydraulic depth = 0.9080 m
=====================================================================
Channel geometry for critical flow conditions:
=====================================================================
Critical depth of flow = 0.2873 m
Critical x-section area = 0.5135 m^2
Critical wetted perimeter = 2.3126 m
Critical hydraulic radius = 0.2220 m

16
Critical top width = 2.0746 m
Critical hydraulic depth = 0.2475 m
=====================================================================
Velocities for normal and critical flow:
=====================================================================
Normal flow velocity = 0.2112 m/s
Critical flow velocity = 1.5579 m/s
=====================================================================
=====================================================================
The channel has a mild slope.
=====================================================================
=====================================================================
Gradually Varied Flow parameters:
=====================================================================
Possible GVF curve: M1.
=====================================================================
Starting location for GVF = 0.00 m
Initial depth for GVF = 2.5000 m
Ending depth for GVF = 1.5000 m
Depth increment for GVF = -0.0500 m
=====================================================================
===============================================================================
==================
Table of results for direct step calculations.
Results in standard units of the International system
============================================================================================
y A P V E DE Sf Sfbar Dx x
============================================================================================
2.5000 10.00 8.57 0.08 2.500326 0.000000 0.00000075 0.00000000 0.00 0.00
2.4500 9.68 8.43 0.08 2.450348 0.049978 0.00000082 0.00000078 -5423.23 -5423.23
2.4000 9.36 8.29 0.09 2.400372 0.049976 0.00000089 0.00000086 -5465.76 -10888.99
2.3500 9.05 8.15 0.09 2.350399 0.049974 0.00000098 0.00000094 -5513.88 -16402.87
2.3000 8.74 8.01 0.09 2.300427 0.049971 0.00000107 0.00000103 -5568.52 -21971.39
2.2500 8.44 7.86 0.09 2.250458 0.049969 0.00000118 0.00000113 -5630.85 -27602.24
2.2000 8.14 7.72 0.10 2.200493 0.049966 0.00000130 0.00000124 -5702.29 -33304.53
2.1500 7.85 7.58 0.10 2.150530 0.049963 0.00000143 0.00000136 -5784.64 -39089.17
2.1000 7.56 7.44 0.11 2.100571 0.049959 0.00000158 0.00000150 -5880.13 -44969.30
2.0500 7.28 7.30 0.11 2.050616 0.049955 0.00000175 0.00000166 -5991.62 -50960.92
2.0000 7.00 7.16 0.11 2.000666 0.049950 0.00000194 0.00000184 -6122.83 -57083.75
1.9500 6.73 7.02 0.12 1.950721 0.049945 0.00000215 0.00000205 -6278.64 -63362.39
1.9000 6.46 6.87 0.12 1.900782 0.049939 0.00000240 0.00000228 -6465.60 -69827.99
1.8500 6.20 6.73 0.13 1.850850 0.049932 0.00000268 0.00000254 -6692.74 -76520.74
1.8000 5.94 6.59 0.13 1.800925 0.049925 0.00000300 0.00000284 -6972.79 -83493.53
1.7500 5.69 6.45 0.14 1.751009 0.049916 0.00000337 0.00000318 -7324.32 -90817.85
1.7000 5.44 6.31 0.15 1.701103 0.049906 0.00000379 0.00000358 -7775.49 -98593.34
1.6500 5.20 6.17 0.15 1.651208 0.049895 0.00000429 0.00000404 -8371.13 -106964.47
1.6000 4.96 6.03 0.16 1.601326 0.049882 0.00000486 0.00000457 -9187.23 -116151.69
1.5500 4.73 5.88 0.17 1.551460 0.049866 0.00000552 0.00000519 -10363.61 -126515.30
============================================================================================

17

Вам также может понравиться