summaryrefslogtreecommitdiff
path: root/629/CH15/EX15.2/example15_2.sce
blob: 28ca05182dd39c6303c9d15a5358c02edf738799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clear
clc
//Example 15.2 ESTIMATING Q FOR UNIFORM FLOW USING DARCY-WEISBACH EQUATION
g=32.2; //[ft/s^2]
l=10; //width[ft]
y=6; //depth [ft]
A=l*y //area[ft^2]
So=0.0016; //slope of the channel
v=1.2*10^-5; //[ft^2/s]
Rh=l*y/(l+2*y); //[ft]
ks=0.005; //[ft](Assume)
Rr=ks/(4*Rh) //relative roughness
//Estimating f from Rr, using Moody diagram
f=0.016;
//first iteration for V
V=sqrt(8*g*Rh*So/f) //[ft/s]
//Recalculate Re
Re=V*4*Rh/v
//Using Rr,new Re, read
f1=0.016; 
//f1=f,meets reasonable convergence criterion for V
Q=V*A //discharge [cfs]
printf("\nThe discharge of water is %.f cfs.\n",Q)