summaryrefslogtreecommitdiff
path: root/51/CH8/EX8.11/8_11.sce
blob: 154d279f4c8a45483c5dfae2a1ab5b4b7256ed6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc;
clear;
Pa=50;//hp
D=1;//ft
l=300;//ft
f=0.02;
z1=90;//ft
//energy equation between the surface of the lake and the outlet of the pipe
//p1=V1=p2=z2=0; V2=V
//hL=f*l*(V^2)/(D *2*g)
//hT=Pa/(sw*%pi*(D^2)*V/4)
c1=(Pa*550)/(62.4*%pi*(D^2)/4)//561
c2=f*l/(D*2*32.2)//0.0932
fn=poly([c1 (-z1) 0 ((1/(2*32.2))+(c2))],"V","c");
r=roots(fn);
V1=r(1);//ft/sec
V2=r(2);//ft/sec
Q1=(%pi*(D^2)/4)*V1;//(ft^3)/sec
Q2=(%pi*(D^2)/4)*V2;//(ft^3)/sec
disp("(ft^3)/sec",Q2,"and","(ft^3)/sec",Q1,"The possible flowrates are=")