summaryrefslogtreecommitdiff
path: root/51/CH8
diff options
context:
space:
mode:
Diffstat (limited to '51/CH8')
-rwxr-xr-x51/CH8/EX8.1/8_1.sce32
-rwxr-xr-x51/CH8/EX8.10/8_10.sce18
-rwxr-xr-x51/CH8/EX8.11/8_11.sce20
-rwxr-xr-x51/CH8/EX8.12/8_12.sce22
-rwxr-xr-x51/CH8/EX8.12/8_12graph.jpgbin0 -> 26124 bytes
-rwxr-xr-x51/CH8/EX8.13/8_13.sce33
-rwxr-xr-x51/CH8/EX8.13/8_13graph.jpgbin0 -> 26863 bytes
-rwxr-xr-x51/CH8/EX8.14/8_14.sce32
-rwxr-xr-x51/CH8/EX8.15/8_15.sce13
-rwxr-xr-x51/CH8/EX8.2/8_2.sce22
-rwxr-xr-x51/CH8/EX8.3/8_3.sce28
-rwxr-xr-x51/CH8/EX8.3/8_3graph.jpgbin0 -> 27860 bytes
-rwxr-xr-x51/CH8/EX8.4/8_4.sce31
-rwxr-xr-x51/CH8/EX8.5/8_5.sce18
-rwxr-xr-x51/CH8/EX8.6/8_6.sce26
-rwxr-xr-x51/CH8/EX8.6/8_6graph.jpgbin0 -> 25322 bytes
-rwxr-xr-x51/CH8/EX8.7/8_7.sce21
-rwxr-xr-x51/CH8/EX8.8/8_8.sce84
-rwxr-xr-x51/CH8/EX8.8/8_8graph1.jpgbin0 -> 46288 bytes
-rwxr-xr-x51/CH8/EX8.8/8_8graph2.jpgbin0 -> 47453 bytes
-rwxr-xr-x51/CH8/EX8.9/8_9.sce22
-rwxr-xr-x51/CH8/EX8.9/8_9graph.jpgbin0 -> 28379 bytes
22 files changed, 422 insertions, 0 deletions
diff --git a/51/CH8/EX8.1/8_1.sce b/51/CH8/EX8.1/8_1.sce
new file mode 100755
index 000000000..65f3ee38a
--- /dev/null
+++ b/51/CH8/EX8.1/8_1.sce
@@ -0,0 +1,32 @@
+clc;
+clear;
+T1=50;//degree farenheit
+D=0.73;//in
+vol=0.0125;//ft^3
+T2=140;//degree farenheit
+
+vis1=2.73/100000;//lb*s/ft^2 at 50 degree farenheit
+vis2=0.974/100000;//lb*s/ft^2 at 140 degree farenheit
+
+//for 50 degree farenheit
+//if flow is laminar, maximum Re=2100; Re=d*V*D/vis
+V1=2100*vis1/(1.94*D/12);
+t1=vol/(%pi*((D/12)^2)/4*V1);
+//if flow is turbulent, minimum Re=4000
+V2=4000*vis1/(1.94*D/12);
+t2=vol/(%pi*((D/12)^2)/4*V2);
+
+//for 140 degree farenheit
+//if flow is laminar, maximum Re=2100; Re=d*V*D/vis
+V3=2100*vis2/(1.94*D/12);
+t3=vol/(%pi*((D/12)^2)/4*V3);
+//if flow is turbulent, minimum Re=4000
+V4=4000*vis2/(1.94*D/12);
+t4=vol/(%pi*((D/12)^2)/4*V4);
+
+disp("For laminar flow")
+disp("seconds",t1,"The time taken to fill the glass at 50 degree F=")
+disp("seconds",t3,"The time taken to fill the glass 100 degree F=")
+disp("For turbulent flow:")
+disp("seconds",t2,"The time taken to fill the glass at 50 degree F=")
+disp("seconds",t4,"The time taken to fill the glass at 140 degree F=") \ No newline at end of file
diff --git a/51/CH8/EX8.10/8_10.sce b/51/CH8/EX8.10/8_10.sce
new file mode 100755
index 000000000..de686e54a
--- /dev/null
+++ b/51/CH8/EX8.10/8_10.sce
@@ -0,0 +1,18 @@
+clc;
+clear;
+D=4;//in
+l=20;//ft
+n=4;//number of 90 degree elbows
+h=0.2;//in
+T=100;//degree F
+//energy equation between the inside of the dryer and the exit of the vent pipe
+p1=(h/12)*62.4;//lb/(ft^2)
+KLentrance=0.5;
+KLelbow=1.5;
+sw=0.0709;//lb/(ft^3)
+f=0.022;//assumption
+//hence,
+V=((p1/sw)*2*32.2/(1+(f*l/(D/12))+KLentrance+(n*KLelbow)))^0.5;//ft/sec
+Q=V*(%pi*((D/12)^2)/4);//(ft^3)/sec
+disp("(ft^3)/sec",Q,"The flowrate=")
+
diff --git a/51/CH8/EX8.11/8_11.sce b/51/CH8/EX8.11/8_11.sce
new file mode 100755
index 000000000..154d279f4
--- /dev/null
+++ b/51/CH8/EX8.11/8_11.sce
@@ -0,0 +1,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=") \ No newline at end of file
diff --git a/51/CH8/EX8.12/8_12.sce b/51/CH8/EX8.12/8_12.sce
new file mode 100755
index 000000000..9e9162813
--- /dev/null
+++ b/51/CH8/EX8.12/8_12.sce
@@ -0,0 +1,22 @@
+clc;
+clear;
+roughness=0.0005;//ft
+Q=2;//(ft^3)/sec
+pd=0.5;//psi; where pd=pressure drop
+l=100;//ft
+d=0.00238;//slugs/(ft^3)
+vis=3.74*(10^(-7));//lb*sec/(ft^2)
+x=Q/(%pi/4);//where x =V*(D^2)
+//energy equation with z1=z2 and V1=V2
+y=l*d*(x^2)*0.5/(pd*144);//where y=(D^5)/f
+f=0.027;//using reynolds number, roughness and moody's chart
+D=(y*f)^(1/5);//ft
+disp("ft",D,"The diameter of the pipe should be =")
+q=0.01:0.01:3;
+count=1;
+for i=0.01:0.01:3
+ dia(count)=((l*d*((i/(%pi/4))^2)*0.5/(pd*144))*f)^(1/5);
+ count=count+1;
+end
+plot2d(q,dia,rect=[0,0,3,0.25])
+xtitle("D vs Q","Q, (ft^3)/sec","D, ft") \ No newline at end of file
diff --git a/51/CH8/EX8.12/8_12graph.jpg b/51/CH8/EX8.12/8_12graph.jpg
new file mode 100755
index 000000000..b0164c406
--- /dev/null
+++ b/51/CH8/EX8.12/8_12graph.jpg
Binary files differ
diff --git a/51/CH8/EX8.13/8_13.sce b/51/CH8/EX8.13/8_13.sce
new file mode 100755
index 000000000..50ff1dbad
--- /dev/null
+++ b/51/CH8/EX8.13/8_13.sce
@@ -0,0 +1,33 @@
+clc;
+clear;
+T=60;//degree F
+kvis=1.28*(10^(-5));//(ft^2)/sec
+l=1700;//ft
+roughness=0.0005;//ft
+Q=26;//(ft^3)/sec
+n=4;//number of flanged 45 degree elbows
+z1=44;//ft
+x=Q/(%pi/4);//where x=V*(D^2)
+KLentrance=0.5;
+KLelbow=0.2;
+KLexit=1;
+//Finding f from Re, roughness and moody's chart
+f=0.01528;
+sumKL=(n*KLelbow)+KLentrance+KLexit;
+y=f*l;
+//V^2 = (x^2)/(D^4)
+//energy equation with p1=p2pV1=V2=z2=0
+z=(2*32.2*z1)/((x^2)*l);
+k=sumKL/l;
+fn=poly([(-f) (-k) 0 0 0 z],'D','c');
+r=roots(fn);
+disp("ft",r(1),"The diameter=")
+count=1;
+len=400:2000;
+for i=400:2000
+ root=roots(poly([(-f) (-(sumKL/i)) 0 0 0 ((2*32.2*z1)/((x^2)*i))],'a','c'));
+ dia(count)=root(1);
+ count=count+1;
+end
+plot2d(len,dia,rect=[0,0,2000,1.8])
+xtitle("D vs l","l, ft","D, ft")
diff --git a/51/CH8/EX8.13/8_13graph.jpg b/51/CH8/EX8.13/8_13graph.jpg
new file mode 100755
index 000000000..50121250f
--- /dev/null
+++ b/51/CH8/EX8.13/8_13graph.jpg
Binary files differ
diff --git a/51/CH8/EX8.14/8_14.sce b/51/CH8/EX8.14/8_14.sce
new file mode 100755
index 000000000..ff8ec6349
--- /dev/null
+++ b/51/CH8/EX8.14/8_14.sce
@@ -0,0 +1,32 @@
+clc;
+clear;
+D=1;//ft
+f=0.02;
+z1=100;//ft
+z2=20;//ft
+z3=0;//ft
+l1=1000;//ft
+l2=500;//ft
+l3=400;//ft
+//assuming fluid flows into B
+//applying energy equation bwtween (1 and 3) and (1 and 2) and using the relation V1=V2+V3
+c1=z1*32.2*2/(f*l1);
+c2=(z1-z2)*32.2*2/(f*l1);
+x=(c1-c2)/(l3/l1);//160
+y=(l2/l1)/(l3/l1);//1.25
+a=c2-x;//98
+b=(a*2*(y+(l2/l1)));//539
+c=4*x+b;//1179
+d=-((y+(l2/l1))^2)+(4*y);//-2.5625
+e=-(a^2);//-9604
+fn=poly([e 0 c 0 d],'V2','c');
+r=roots(fn);
+V2=r(1);
+V1=(c2-(l2/l1)*V2)^0.5;
+A=(%pi/4*(D^2));
+Q1=V1*A;
+Q2=V2*A;
+Q3=Q1-Q2;
+disp("(ft^3)/sec",Q1,"Q1 (out of A)=")
+disp("(ft^3)/sec",Q2,"Q2 (into B)=")
+disp("(ft^3)/sec",Q3,"Q3 (into C)=") \ No newline at end of file
diff --git a/51/CH8/EX8.15/8_15.sce b/51/CH8/EX8.15/8_15.sce
new file mode 100755
index 000000000..1289ba7db
--- /dev/null
+++ b/51/CH8/EX8.15/8_15.sce
@@ -0,0 +1,13 @@
+clc;
+clear;
+D=60;//mm
+pdiff=4;//kPa
+Q=0.003;//(m^3)/sec
+d=789;//kg/(m^3)
+vis=1.19*(10^(-3));//N*sec/(m^2)
+Re=d*4*Q/(%pi*D*vis);
+//assuming B=dia/D=0.577, where dia=diameter of nozzle, and obtaining Cn from Re as 0.972
+Cn=0.972;
+B=0.577;
+dia=((4*Q/(Cn*%pi))/((2*pdiff*1000/(d*(1-(B^4))))^0.5))^0.5;
+disp("mm",dia*1000,"Diameter of the nozzle=")
diff --git a/51/CH8/EX8.2/8_2.sce b/51/CH8/EX8.2/8_2.sce
new file mode 100755
index 000000000..05aaf941b
--- /dev/null
+++ b/51/CH8/EX8.2/8_2.sce
@@ -0,0 +1,22 @@
+clc;
+clear;
+vis=0.4;//Ns/(m^2)
+d=900;//kg/(m^3)
+D=0.02;//m
+Q=2.0*(10^-5);//(m^3)/s
+x1=0;
+x2=10;//m
+p1=200;//kPa
+x3=5;//m
+V=Q/(%pi*(D^2)/4);//m/s
+Re=d*V*D/vis;
+disp("Hence the flow is laminar.",Re,"a) Reynolds number =")
+pdiff=128*vis*(x2-x1)*Q/(%pi*(D^4)*1000);
+//for part b0 p1=p2; Q=%pi*(pdiff-(sw*l*sin(ang)))*(D^4)/(128*vis*l)
+ang=(asin(-128*vis*Q/(%pi*d*9.81*(D^4))))*180/%pi;
+//since sin(ang) doesn= not depend on pdiff, the the pressure is constant all along the pipe
+//hence for c)
+p3=p1;//kPa
+disp("kPa.",pdiff,"The pressure drop required if the pipe is horizontal=")
+disp("degrees.",ang,"b) The angle of the hill the pipe must be on if the oil is to flow at the same rate as a) but with (p1=p2) =")
+disp("kPa",p3,"c) For conditions of part b), the pressure at x3=5 m = ") \ No newline at end of file
diff --git a/51/CH8/EX8.3/8_3.sce b/51/CH8/EX8.3/8_3.sce
new file mode 100755
index 000000000..1e8b9582a
--- /dev/null
+++ b/51/CH8/EX8.3/8_3.sce
@@ -0,0 +1,28 @@
+clc;
+clear;
+T=[60 80 100 120 140 160];//degree F
+d=[2.07 2.06 2.05 2.04 2.03 2.02];//(slugs/(ft^3))
+vis=[0.04 0.019 0.0038 0.00044 0.000092 0.000023];//lb*sec/(ft^2)
+Q=0.5;//(ft^3)/sec
+T1=100;//degree F
+l=6;//ft
+D=3;//in
+//Q=K*pdiff; where pdiff=p1-p2
+//hence K=%pi*(D^4)/(128*vis*l)
+count=1;
+for i=1:6
+ K(i)=(%pi*((D/12)^4))/(128*vis(i)*l);
+end
+plot2d(T,K,logflag='nl')
+xtitle("K vs T","T, degree F","K, (ft^5)/(lb.sec)")
+pdiff=(128*Q*vis(3)*l)/(%pi*((D/12)^4));//when temperature is 100 degree F
+disp("lb/(ft^2)",pdiff,"The pressure drop for the given Q and T =")
+V=Q/(%pi*((D/12)^2)/4);//ft/sec
+Re=d(3)*V*(D/12)/vis(3);
+disp("hence the flow is laminar",Re,"The reynolds number=")
+stress=pdiff*(D/12)/(4*l);//lb/(ft^2)
+disp("lb/(ft^2)",stress,"The wall stress for the given Q and T =")
+Fp=(%pi/4)*((D/12)^2)*pdiff;//lb
+Fv=(2*%pi)*((D/12)/2)*l*stress;//lb
+disp("lb",Fp,"The net pressure force =")
+disp("lb",Fv,"The net viscous/shear force =") \ No newline at end of file
diff --git a/51/CH8/EX8.3/8_3graph.jpg b/51/CH8/EX8.3/8_3graph.jpg
new file mode 100755
index 000000000..a779da769
--- /dev/null
+++ b/51/CH8/EX8.3/8_3graph.jpg
Binary files differ
diff --git a/51/CH8/EX8.4/8_4.sce b/51/CH8/EX8.4/8_4.sce
new file mode 100755
index 000000000..2b0740021
--- /dev/null
+++ b/51/CH8/EX8.4/8_4.sce
@@ -0,0 +1,31 @@
+clc;
+clear;
+T=20;//degree C
+d=998;//kg/(m^3)
+kvis=1.004*(10^-6);//(m^2)/s; where kvis=kinematic viscosity
+D=0.1;//m
+Q=0.04;//(m^3)/sec
+pgrad=2.59;//kPa/m; where pgrad is pressure gradient
+r=0.025;//m
+stress=D*(pgrad*1000)/(4*1);//N/(m^2)
+uf=(stress/d)^0.5;//m/sec; where uf is frictional velocity
+ts=5*kvis*1000/(uf);//mm; where ts is the thickness of the viscous sublayer
+disp("mm",ts,"The thickness of the viscous sublayer=")
+V=Q/(%pi*(D^2)/4);//m/s
+Re=V*D/kvis;
+disp("hence the flow is turbulent.",Re,"The reynolds number=")
+n=8.4;//from turbulent flow velocity profile diagram
+
+//Q=(%pi)*(R^2)*V
+R=1;//assumption
+//let Q/Vc=x
+x=integrate('((1-(r/R))^(1/n))*(2*%pi*r)','r',0,R);
+q=%pi*(R^2)*V;
+Vc=q/x;//m/s
+disp("m/s",Vc,"The approximate centerline velocity=")
+stress1=(2*stress*r)/D;//N/(m^2)
+//d(uavg)/dr=urate=-(Vc/(n*R))*((1-(r/R))^((1-n)/n)); where uavg=average velocity
+urate=-(Vc/(n*(D/2)))*((1-(r/(D/2)))^((1-n)/n));//s^(-1)
+stresslam=-(kvis*d*urate);//N/(m^2)
+stressratio=(stress1-stresslam)/stresslam;
+disp(stressratio,"The ratio of teh turbulent to laminar stress at a point midway between the centreline and the pipe wall =") \ No newline at end of file
diff --git a/51/CH8/EX8.5/8_5.sce b/51/CH8/EX8.5/8_5.sce
new file mode 100755
index 000000000..202dce95e
--- /dev/null
+++ b/51/CH8/EX8.5/8_5.sce
@@ -0,0 +1,18 @@
+clc;
+clear;
+D=4;//mm
+V=50;//m/sec
+l=0.1;//m
+d=1.23;//kg/(m^3)
+vis=1.79/100000;//N*sec/(m^2)
+Re=d*V*(D/1000)/vis;
+//if flow is laminar
+f=64/Re;
+pdiff=f*l*0.5*d*(V^2)/((D/1000)*1000);//kPa
+disp("kPa",pdiff,"The pressure drop if the flow is laminar=")
+//if flow is turbulent
+//roughness=0.0015; hence f=0.028
+f1=0.028;
+pdiff1=f1*l*0.5*d*(V^2)/((D/1000)*1000);//kPa
+disp("kPa",pdiff1,"The pressure drop if flow is turbulent=")
+
diff --git a/51/CH8/EX8.6/8_6.sce b/51/CH8/EX8.6/8_6.sce
new file mode 100755
index 000000000..2ddfc54b6
--- /dev/null
+++ b/51/CH8/EX8.6/8_6.sce
@@ -0,0 +1,26 @@
+clc;
+clear;
+A=[22 28 35 35 4 4 10 18 22];
+V=[36.4 28.6 22.9 22.9 200 200 80 44.4 36.4];
+//minimum area is at location 5, hence max velocity is at 5
+c5=(1.4**1716*(460+59))^0.5;//ft/sec
+Ma5=V(5)/c5;
+//applying energy equation between locations 1 and 9
+//hL=hp=(p1-p9)/sw=pdiff/sw
+//Pa=sw*Q*hp=sw*A(5)*V(5)*hL
+KLcorner=0.2;
+KLdif=0.6;
+KLscr=4;
+hL=((KLcorner*(((V(7))^2)+((V(8))^2)+((V(2))^2)+((V(3))^2))) + (KLdif*(((V(6))^2))) + (KLcorner*((V(5))^2)) + (KLscr*((V(4))^2)))/(2*32.2);//ft
+Pa=0.0765*A(5)*V(5)*hL/550;//hp
+pdiff=0.0765*hL/144;//psi
+disp("psi",pdiff,"The value of (p1-p9)=")
+disp("hp",Pa,"The horsepower supplied to the fluid by the fan=")
+v=50:300;
+count=1;
+for i=50:300
+ power(count)=0.0765*((((KLcorner*((A(5)*i/A(7))^2)+((A(5)*i/(A(8)))^2)+((A(5)*i/A(2))^2)+((A(5)*i/A(3))^2))) + (KLdif*(((A(5)*i/A(6))^2))) + (KLcorner*((i)^2)) + (KLscr*((A(5)*i/A(4))^2)))/(2*32.2))*(A(5))*i/550;
+ count=count+1;
+end
+plot2d(v,power,rect=[0,0,300,250])
+xtitle("Pa vs V5","V5, ft/sec","Pa, hp")
diff --git a/51/CH8/EX8.6/8_6graph.jpg b/51/CH8/EX8.6/8_6graph.jpg
new file mode 100755
index 000000000..4acb7c5b6
--- /dev/null
+++ b/51/CH8/EX8.6/8_6graph.jpg
Binary files differ
diff --git a/51/CH8/EX8.7/8_7.sce b/51/CH8/EX8.7/8_7.sce
new file mode 100755
index 000000000..43e0a9a45
--- /dev/null
+++ b/51/CH8/EX8.7/8_7.sce
@@ -0,0 +1,21 @@
+clc;
+clear;
+T=120;//degree F
+D=8;//in
+vavg=10;//ft/s
+roughness=0;
+kvis=1.89/10000;//(ft^2)/s
+Re=vavg*(D/12)/kvis;
+//from this value of Re and roughness/D=0, and using Moody's chart
+f=0.022;
+hLperl=f*(vavg^2)/(D*2*32.2/12);
+//Dh=4*A/P=4*(a^2)/(4*a)=a
+
+//Vs=(%pi*((D/12)^2)*vavg)/(4*a^2)
+//a=f*((%pi*((D/12)^2)*vavg)/(4*a^2))/(2*32.2) and Reh=((%pi*((D/12)^2)*vavg)/(4*a^2))*a/kvis
+//by trial and error
+f=0.023;
+x=(%pi*((D/12)^2)*vavg/4)^2;
+y=x*f/(2*32.2);
+a=((y/0.0512)^(1/5))*12;//in
+disp("inches",a,"The duct size(a) for the square duct if the head loss per foot remains the same for the pipe and the duct=") \ No newline at end of file
diff --git a/51/CH8/EX8.8/8_8.sce b/51/CH8/EX8.8/8_8.sce
new file mode 100755
index 000000000..bd0e1af96
--- /dev/null
+++ b/51/CH8/EX8.8/8_8.sce
@@ -0,0 +1,84 @@
+clc;
+clear;
+T=60;//degree F
+D=0.0625;//ft
+Q=0.0267;//(ft^3)/sec
+Df=0.5;//in
+l1=15;//ft
+l2=10;//ft
+l3=5;//ft
+l4=10;//ft
+l5=10;//ft
+l6=10;//ft
+V1=Q/(%pi*(D^2)/4);//ft/sec
+V2=Q/(%pi*((Df/12)^2)/4);//ft/sec
+d=1.94;//slugs/ft
+vis=2.34/100000;//lb*sec/(ft^2)
+Re=d*V1*D/vis;
+disp("hence the flow is turbulent",Re,"The reynolds number =")
+//applying energy equation between points 1 and 2
+//when all head losses are excluded
+p1=(d*32.2*(l2+l4))+(0.5*d*((V2^2)-(V1^2)));//lb/(ft^2)
+disp("psi",p1/144,"a)The pressure at point 1 when all head losses are neglected=")
+//if major losses are included
+f=0.0215;
+hLmajor=f*(l1+l2+l3+l4+l5+l6)*(V1^2)/(D*2*32.2);
+p11=p1+(d*32.2*hLmajor);//lb/(ft^2)
+disp("psi",p11/144,"b)The pressure at point 1 when only major head losses are included=")
+//if major and minor losses are included
+KLelbow=1.5;
+KLvalve=10;
+KLfaucet=2;
+hLminor=(KLvalve+(4*KLelbow)+KLfaucet)*(V1^2)/(2*32.2);
+p12=p11+(d*32.2*hLminor);//lb/(ft^2)
+disp("psi",p12/144,"c)The pressure at point 1 when both major and minor head losses are included=")
+H=(p1/(32.2*1.94))+(V1*V1/(2*32.2));//ft
+dist=0:60;
+for i=0:15
+ press(i+1)=p1/144;
+ press1(i+1)=((d*32.2*(l2+l4))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*(f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2)))+(d*32.2*(KLvalve+(4*KLelbow)+KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=((press1(i+1))*144/(32.2*1.94))+((V1^2)/(2*32.2));
+end
+for i=16:25
+ press(i+1)=((d*32.2*((l2+l4)-(i-15)))+(0.5*d*((V2^2)-(V1^2))))/144;
+ press1(i+1)=((d*32.2*((l2+l4)-(i-15)))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2))+(d*32.2*(KLvalve+(3*KLelbow)+KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=(press1(i+1)*144/(32.2*1.94))+((V1^2)/(2*32.2))+(i-l1);
+end
+for i=26:30
+ press(i+1)=((d*32.2*((l2+l4)-(25-15)))+(0.5*d*((V2^2)-(V1^2))))/144;
+ press1(i+1)=((d*32.2*((l2+l4)-(25-15)))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*(f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2)))+(d*32.2*(KLvalve+(2*KLelbow)+KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=(press1(i+1)*144/(32.2*1.94))+((V1^2)/(2*32.2))+l2;
+end
+for i=31:40
+ press(i+1)=((d*32.2*((l2+l4)-(i-l1-l3)))+(0.5*d*((V2^2)-(V1^2))))/144;
+ press1(i+1)=((d*32.2*((l2+l4)-(i-l1-l3)))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*(f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2)))+(32.2*d*(KLvalve+(KLelbow)+KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=(press1(i+1)*144/(32.2*1.94))+((V1^2)/(2*32.2))+(i-(l1+l3));
+end
+for i=41:50
+ press(i+1)=((d*32.2*((l2+l4)-(40-l1-l3)))+(0.5*d*((V2^2)-(V1^2))))/144;
+ press1(i+1)=((d*32.2*((l2+l4)-(40-l1-l3)))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*(f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2)))+(d*32.2*(KLvalve+KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=(press1(i+1)*144/(32.2*1.94))+((V1^2)/(2*32.2))+(l2+l4);
+end
+for i=51:60
+ press(i+1)=((d*32.2*((l2+l4)-(40-l1-l3)))+(0.5*d*((V2^2)-(V1^2))))/144;
+ press1(i+1)=((d*32.2*((l2+l4)-(40-l1-l3)))+(0.5*d*((V2^2)-(V1^2)))+(d*32.2*(f*(l1+l2+l3+l4+l5+l6-i)*(V1^2)/(D*2*32.2)))+d*32.2*((KLfaucet)*(V1^2)/(2*32.2)))/144;
+ head(i+1)=H;
+ head1(i+1)=(press1(i+1)*144/(32.2*1.94))+((V1^2)/(2*32.2))+(l2+l4);
+end
+plot(dist,press,"o-")
+plot(dist,press1,"x-")
+h1=legend(['without losses';'with losses'])
+xtitle("p vs distance long pipe from (1)","distance along pipe from (1), ft","p, psi")
+xclick(1);
+clf();
+plot(dist,head,"o-")
+plot(dist,head1,"x-")
+h2=legend(['energy line with no losses';'energy line including losses'])
+xtitle("H vs distance long pipe from (1)","distance along pipe from (1), ft","H,elevation to energy line, ft")
+
+end
diff --git a/51/CH8/EX8.8/8_8graph1.jpg b/51/CH8/EX8.8/8_8graph1.jpg
new file mode 100755
index 000000000..3f5051787
--- /dev/null
+++ b/51/CH8/EX8.8/8_8graph1.jpg
Binary files differ
diff --git a/51/CH8/EX8.8/8_8graph2.jpg b/51/CH8/EX8.8/8_8graph2.jpg
new file mode 100755
index 000000000..e9528e686
--- /dev/null
+++ b/51/CH8/EX8.8/8_8graph2.jpg
Binary files differ
diff --git a/51/CH8/EX8.9/8_9.sce b/51/CH8/EX8.9/8_9.sce
new file mode 100755
index 000000000..54cf858a0
--- /dev/null
+++ b/51/CH8/EX8.9/8_9.sce
@@ -0,0 +1,22 @@
+clc;
+clear;
+T=140;//degree F
+sw=53.7;//lb/(ft^3)
+vis=8/100000;//lb*sec/(ft^2)
+l=799;//miles
+D=4;//ft
+Q=117;//(ft^3)/sec
+V=9.31;//ft/sec
+//energy equation=> hp=hL=f*(l/D)*((V^2)/(2*g))
+f=0.0125;
+hp=f*(l*5280/D)*((V^2)/(2*32.2));//ft
+Pa=sw*Q*hp/550;//hp
+disp("hp",Pa,"The horsepower required to drive the system=")
+dia=2:0.01:6;
+count=1;
+for i=2:0.01:6
+ power(count)=sw*Q*(f*(l*5280/i)*(((Q/(%pi*(i^2)/4))^2)/(2*32.2)))/550;
+ count=count+1;
+end
+plot2d(dia,power,rect=[0,0,6,4000000])
+xtitle("Pa vs D","D, ft","Pa, hp") \ No newline at end of file
diff --git a/51/CH8/EX8.9/8_9graph.jpg b/51/CH8/EX8.9/8_9graph.jpg
new file mode 100755
index 000000000..df9ff5d8c
--- /dev/null
+++ b/51/CH8/EX8.9/8_9graph.jpg
Binary files differ