summaryrefslogtreecommitdiff
path: root/1703/CH7/EX7.2/7_2.sce
blob: 65f2d8c5aa7f4d2dc3449b7e99e870fb33dca2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc
//initialisation of variables
d1= 4//ft
d2= 2 //in
l= 300 //ft
P= 5 //lb/in^2
h1= 3 //ft
h2= 6 //ft
f= 0.01
//CALCULATIONS
X= P*2.31*10*(d2/12)^5/(f*l)
A= %pi*d1^2/4
function [y]=fun(h)
    y=A*sqrt((P*2.31*10*(d2/12)^5/(f*l))-(10*(d2/12)^5*h/(f*l)))/(10*(d2/12)^5/(f*l))/7
endfunction
vec2=intg(h1,h2,fun)
T= vec2
//RESULTS
printf ('time for the channel to fall = %.f sec',T)