summaryrefslogtreecommitdiff
path: root/1457
diff options
context:
space:
mode:
Diffstat (limited to '1457')
-rwxr-xr-x1457/CH1/EX1.1/1_1.sce20
-rwxr-xr-x1457/CH1/EX1.2/1_2.sce27
-rwxr-xr-x1457/CH1/EX1.3/1_3.sce13
-rwxr-xr-x1457/CH10/EX10.1/10_1.sce19
-rwxr-xr-x1457/CH10/EX10.2/10_2.sce21
-rwxr-xr-x1457/CH10/EX10.3/10_3.sce20
-rwxr-xr-x1457/CH10/EX10.4/10_4.sce12
-rwxr-xr-x1457/CH10/EX10.5/10_5.sce10
-rwxr-xr-x1457/CH10/EX10.6/10_6.sce11
-rwxr-xr-x1457/CH10/EX10.7/10_7.sce16
-rwxr-xr-x1457/CH10/EX10.8/10_8.sce23
-rwxr-xr-x1457/CH10/EX10.9/10_9.sce15
-rwxr-xr-x1457/CH11/EX11.1/11_1.sce12
-rwxr-xr-x1457/CH11/EX11.2/11_2.sce9
-rwxr-xr-x1457/CH11/EX11.3/11_3.sce21
-rwxr-xr-x1457/CH11/EX11.5/11_5.sce23
-rwxr-xr-x1457/CH11/EX11.6/11_6.sce20
-rwxr-xr-x1457/CH12/EX12.1/12_1.sce24
-rwxr-xr-x1457/CH12/EX12.2/12_2.sce16
-rwxr-xr-x1457/CH12/EX12.3/12_3.sce18
-rwxr-xr-x1457/CH12/EX12.4/12_4.sce10
-rwxr-xr-x1457/CH13/EX13.1/13_1.sce14
-rwxr-xr-x1457/CH13/EX13.2/13_2.sce15
-rwxr-xr-x1457/CH13/EX13.3/13_3.sce20
-rwxr-xr-x1457/CH13/EX13.4/13_4.sce22
-rwxr-xr-x1457/CH14/EX14.1.a/14_1a.sce10
-rwxr-xr-x1457/CH14/EX14.1.b/14_1b.sce24
-rwxr-xr-x1457/CH15/EX15.1/15_1.sce22
-rwxr-xr-x1457/CH15/EX15.2/15_2.sce35
-rwxr-xr-x1457/CH15/EX15.3.a/15_3.sce18
-rwxr-xr-x1457/CH15/EX15.3.b/15_3b.sce22
-rwxr-xr-x1457/CH16/EX16.2/16_2.sce34
-rwxr-xr-x1457/CH16/EX16.3/16_3.sce12
-rwxr-xr-x1457/CH16/EX16.4/16_4.sce17
-rwxr-xr-x1457/CH17/EX17.1.b/17_1b.sce11
-rwxr-xr-x1457/CH17/EX17.1/17_1.sce9
-rwxr-xr-x1457/CH17/EX17.2/17_2.sce18
-rwxr-xr-x1457/CH17/EX17.3/17_3.sce13
-rwxr-xr-x1457/CH17/EX17.4/17_4.sce23
-rwxr-xr-x1457/CH2/EX2.1/2_1.sce23
-rwxr-xr-x1457/CH2/EX2.2/2_2.sce24
-rwxr-xr-x1457/CH2/EX2.3/2_3.sce21
-rwxr-xr-x1457/CH2/EX2.4/2_4.sce29
-rwxr-xr-x1457/CH2/EX2.5/2_5.sce18
-rwxr-xr-x1457/CH2/EX2.6/2_6.sce17
-rwxr-xr-x1457/CH2/EX2.7/2_7.sce17
-rwxr-xr-x1457/CH3/EX3.1/3_1.sce15
-rwxr-xr-x1457/CH3/EX3.2/3_2.sce20
-rwxr-xr-x1457/CH4/EX4.1/4_1.sce27
-rwxr-xr-x1457/CH4/EX4.10/4_10.sce17
-rwxr-xr-x1457/CH4/EX4.2/4_2.sce9
-rwxr-xr-x1457/CH4/EX4.3/4_3.sce13
-rwxr-xr-x1457/CH4/EX4.44/4_4.sce9
-rwxr-xr-x1457/CH4/EX4.5/4_5.sce13
-rwxr-xr-x1457/CH4/EX4.6/4_6.sce9
-rwxr-xr-x1457/CH4/EX4.7/4_7.sce17
-rwxr-xr-x1457/CH4/EX4.8/4_8.sce11
-rwxr-xr-x1457/CH4/EX4.9/4_9.sce9
-rwxr-xr-x1457/CH6/EX6.1/6_1.sce31
-rwxr-xr-x1457/CH6/EX6.2/6_2.sce16
-rwxr-xr-x1457/CH6/EX6.3/6_3.sce25
-rwxr-xr-x1457/CH6/EX6.4/6_4.sce23
-rwxr-xr-x1457/CH6/EX6.5/6_5.sce30
-rwxr-xr-x1457/CH6/EX6.6/6_6.sce17
-rwxr-xr-x1457/CH6/EX6.7/6_7.sce20
-rwxr-xr-x1457/CH7/EX7.2/7_2.sce17
-rwxr-xr-x1457/CH7/EX7.3/7_3.sce13
-rwxr-xr-x1457/CH8/EX8.1/8_1.sce14
-rwxr-xr-x1457/CH8/EX8.2/8_2.sce19
-rwxr-xr-x1457/CH8/EX8.3/8_3.sce22
-rwxr-xr-x1457/CH8/EX8.4/8_4.sce12
-rwxr-xr-x1457/CH8/EX8.5/8_5.sce16
-rwxr-xr-x1457/CH8/EX8.6/8_6.sce13
-rwxr-xr-x1457/CH8/EX8.7/8_7.sce12
-rwxr-xr-x1457/CH8/EX8.8/8_8.sce28
-rwxr-xr-x1457/CH8/EX8.9/8_9.sce28
-rwxr-xr-x1457/CH9/EX9.1/9_1.sce15
-rwxr-xr-x1457/CH9/EX9.2/9_2.sce22
-rwxr-xr-x1457/CH9/EX9.3/9_3.sce19
-rwxr-xr-x1457/CH9/EX9.4/9_4.sce12
-rwxr-xr-x1457/CH9/EX9.5/9_5.sce31
-rwxr-xr-x1457/CH9/EX9.6/9_6.sce23
-rwxr-xr-x1457/CH9/EX9.7/9_7.sce29
-rwxr-xr-x1457/CH9/EX9.8/9_8.sce11
-rwxr-xr-x1457/CH9/EX9.9/9_9.sce25
85 files changed, 1560 insertions, 0 deletions
diff --git a/1457/CH1/EX1.1/1_1.sce b/1457/CH1/EX1.1/1_1.sce
new file mode 100755
index 000000000..d04c9cdbd
--- /dev/null
+++ b/1457/CH1/EX1.1/1_1.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+sw=62.4 //lb/ft^3
+sw2=9.81 //kN/m^3
+sg=13.55 //No units
+g=32.2 //ft/s^2
+//calculations
+dwater=sw/g
+dwater2=sw2/(9.81)
+Gmercury=sg*sw
+Gmercury2=sg*sw2
+dmercury=sg*dwater
+dmercury2=sg*dwater2
+//Results
+printf('Density of water = %.2f slugs/ft^3',dwater)
+printf('\n Density of water = %.2f g/ml',dwater2)
+printf('\n Density of mercury = %.1f slugs/ft^3',dmercury)
+printf('\n Density of mercury = %.2f kN/m^3',dmercury2)
+printf('\n Specific weight of mercury = %d lb/ft^3',Gmercury+1)
+printf('\n Specific weight of mercury = %d kN/m^3',Gmercury2+1)
diff --git a/1457/CH1/EX1.2/1_2.sce b/1457/CH1/EX1.2/1_2.sce
new file mode 100755
index 000000000..2f5e8798c
--- /dev/null
+++ b/1457/CH1/EX1.2/1_2.sce
@@ -0,0 +1,27 @@
+clc
+//Initialization of variables
+T=460+100 //R
+P=15 //psia
+MW=32 //lb
+g=32.2//ft/s^2
+ratio=0.4
+//Calculations
+R=49710/32
+d=P*144/(R*T)
+Gamma=d*g
+volume=1/d
+P2=P*(1/ratio)^1.4
+P2f=P2*144
+T2=P2f*ratio/(d*R) -460
+P3=P/ratio
+//Results
+printf('part a')
+printf('\n Density of oxygen = %.5f slug/ft^3',d)
+printf('\n Specific weight of oxygen = %.2f lb/ft^3',Gamma)
+printf('\n Specific volume of oxygen = %d ft^3/slug',volume+1)
+printf('\n part b')
+printf('\n Final pressure of oxygen = %.1f psia ',P2)
+printf('\n Final Temperature of oxygen = %d F ',T2+2)
+printf('\n part 3')
+printf('\n Final pressure of oxygen = %.1f psia ',P3)
+printf('\n Final Temperature of oxygen = %d F ',T-460)
diff --git a/1457/CH1/EX1.3/1_3.sce b/1457/CH1/EX1.3/1_3.sce
new file mode 100755
index 000000000..ba135dac0
--- /dev/null
+++ b/1457/CH1/EX1.3/1_3.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+P=600*1000 //N/m^2
+T=25//C
+M=71 //Kg
+//Calculations
+R=8312/M
+d=P/(R*(273+T))
+Gamma=d*9.81
+v=1/d
+printf('Density of chlorine = %.1f kg/m^3',d)
+printf('\n Specific weight of chlorine = %d N/m^3',Gamma+1)
+printf('\n Specific volume of chlorine = %.3f m^3/Kg',v)
diff --git a/1457/CH10/EX10.1/10_1.sce b/1457/CH10/EX10.1/10_1.sce
new file mode 100755
index 000000000..aabd2db05
--- /dev/null
+++ b/1457/CH10/EX10.1/10_1.sce
@@ -0,0 +1,19 @@
+clc
+//Initialization of variables
+nu=0.001 //ft^2 /s
+L=1.5 //ft
+U=2 //ft/s
+s=0.925
+ro=1.94
+b=6
+//calculations
+R=L*U/nu
+Cf=1.328/sqrt(R)
+Ff=Cf*s*ro*U*b/12 *L
+delta=4.91 *L/sqrt(R)
+T0=0.332*nu*s*ro*U/L *sqrt(R)
+//results
+printf("Friction drag = %.3f lb",Ff)
+printf("\n Thickness of boundary layer = %.4f ft",delta)
+printf("\n Shear stress = %.4f lb/ft^2",T0)
+//Similar calculations are done for SI units case
diff --git a/1457/CH10/EX10.2/10_2.sce b/1457/CH10/EX10.2/10_2.sce
new file mode 100755
index 000000000..9fcc94943
--- /dev/null
+++ b/1457/CH10/EX10.2/10_2.sce
@@ -0,0 +1,21 @@
+clc
+//Initialization of variables
+nu=0.00015 //ft^2/s
+L=35 //ft
+U=88 //fps
+g=32.2 //ft/s^2
+b=10 //ft
+w=8 //ft
+rho=0.0725
+//calculations
+R=L*U/nu
+Cf=0.455 /(log10(R))^2.58
+B=2*b + w
+Ff=Cf*rho/g *U^2 /2 *L*B
+Rx=R/10^5
+delta=L*0.377 /(b* Rx^(0.2))
+T0=0.0587 *rho/g *U^2 /2 *(nu/(L*U))^(0.2)
+//results
+printf("Frictional drag = %.1f lb",Ff)
+printf("\n Thickness of boundary layer = %.3f ft",delta)
+printf("\n Shear stress = %.4f lb/ft^2",T0)
diff --git a/1457/CH10/EX10.3/10_3.sce b/1457/CH10/EX10.3/10_3.sce
new file mode 100755
index 000000000..4503611f2
--- /dev/null
+++ b/1457/CH10/EX10.3/10_3.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+nu=0.0000166 //ft^2 /s
+U=5.06 //fps
+L=50 //ft
+g=32.2
+dia=10 //ft
+//calculations
+R=L*U/nu
+Cf=0.0028
+Ff=Cf*64/g *U^2 /2 *%pi*dia*L
+Rx=R/L
+ec=26*nu/U *Rx^(0.25)
+Rx2=Rx*L/2
+T02=0.0587*U^2 /2 /(Rx2)^(0.2)
+delta2=60*nu/sqrt(T02)
+//results
+printf("Friction drag = %d lb",Ff)
+printf("\n Critical roughness = %.4f ft",ec)
+printf("\n height of roughness = %.4f ft",delta2)
diff --git a/1457/CH10/EX10.4/10_4.sce b/1457/CH10/EX10.4/10_4.sce
new file mode 100755
index 000000000..7edd22f47
--- /dev/null
+++ b/1457/CH10/EX10.4/10_4.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+Cd=0.45
+rho=0.0725/32.2
+V=88 //fps
+A=8*10
+//calculations
+Fd=Cd*rho*V^2 /2 *A
+Drag2=23
+D=Fd-Drag2
+//results
+printf("Pressure drag = %d lb",D)
diff --git a/1457/CH10/EX10.5/10_5.sce b/1457/CH10/EX10.5/10_5.sce
new file mode 100755
index 000000000..4b847be5e
--- /dev/null
+++ b/1457/CH10/EX10.5/10_5.sce
@@ -0,0 +1,10 @@
+clc
+//Initialization of variables
+Cd=0.2
+D=8.5 //in
+V=412 //fps
+nu=1.57*10^-4
+//calculations
+Vt=480 //fps
+//results
+printf("Free fall velocity = %d fps",Vt)
diff --git a/1457/CH10/EX10.6/10_6.sce b/1457/CH10/EX10.6/10_6.sce
new file mode 100755
index 000000000..9b6107a60
--- /dev/null
+++ b/1457/CH10/EX10.6/10_6.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+nu=1.15*10^-5 //m^2/s
+D=2*10^-3 //m
+V=15 //m/s
+T=-20 //C
+//calculations
+R=D*V/nu
+f=0.2 *V/D *(1+T/R)
+//results
+printf("Frequency of oscillation = %d Hz",f)
diff --git a/1457/CH10/EX10.7/10_7.sce b/1457/CH10/EX10.7/10_7.sce
new file mode 100755
index 000000000..363fed0ba
--- /dev/null
+++ b/1457/CH10/EX10.7/10_7.sce
@@ -0,0 +1,16 @@
+clc
+//Initialization of variables
+n=90 //rpm
+R=2
+rho=0.0765/32.2
+B=25
+U=120 //fps
+//calculations
+vt=2*%pi*R*n/60
+T=2*%pi*R*vt
+Fl=rho*B*U*T
+theta=asind(-T/(4*%pi*R*U))
+//results
+printf("Value of circulation = %d ft62/s",T)
+printf("\n Transverse or lift force = %d lb",Fl)
+printf("\n Position of stagnation points = %.1f",180-theta)
diff --git a/1457/CH10/EX10.8/10_8.sce b/1457/CH10/EX10.8/10_8.sce
new file mode 100755
index 000000000..7598cb98d
--- /dev/null
+++ b/1457/CH10/EX10.8/10_8.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+B=36 //ft
+c=6 //ft
+Cl=0.8
+tau=0.175
+rho=0.001756
+V=300 //fps
+//calculations
+alphai=Cl/(%pi*B/c) *(1+tau) *180/%pi
+alpha=5.4
+lift=-5.6 //degrees
+alphao=alpha-alphai
+alphaod=alphao-lift
+alphaor=alphaod*%pi/180
+eta=Cl/(2*%pi*alphaor)
+Fl=Cl*rho*V^2 /2 *B*c
+Fd=0.047/Cl *13680
+HP=Fd*V/550
+//results
+printf("Friction coefficient = %.3f ",eta)
+printf("\n weight of the wing = %d lb",Fl)
+printf("\n Horsepower required = %d hp",HP)
diff --git a/1457/CH10/EX10.9/10_9.sce b/1457/CH10/EX10.9/10_9.sce
new file mode 100755
index 000000000..5a6350c6d
--- /dev/null
+++ b/1457/CH10/EX10.9/10_9.sce
@@ -0,0 +1,15 @@
+clc
+//Initialization of variables
+k=1.4
+R=287
+T=249 //K
+v=600 //m/s
+d=0.2 //m
+//calculations
+c=sqrt(k*R*T)
+M=v/c
+Cd=0.62
+rho=47.22*10^3 /(R*T)
+Fd=Cd*rho*v^2 /2 *%pi*d^2 /4
+//results
+printf("Drag = %d N",Fd)
diff --git a/1457/CH11/EX11.1/11_1.sce b/1457/CH11/EX11.1/11_1.sce
new file mode 100755
index 000000000..aa86ee48c
--- /dev/null
+++ b/1457/CH11/EX11.1/11_1.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+y=3.4 //ft
+n=0.016
+//calculations
+A=(10+2*y)*y
+P=10+ 2*sqrt(5) *y
+Rh=A/P
+f=116*n^2 /Rh^(1/3)
+e= 14.8*Rh/ 10^(1/2/sqrt(f))
+//results
+printf("absolute roughness of pipe = %.4f ft",e)
diff --git a/1457/CH11/EX11.2/11_2.sce b/1457/CH11/EX11.2/11_2.sce
new file mode 100755
index 000000000..5c247820c
--- /dev/null
+++ b/1457/CH11/EX11.2/11_2.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+y=1.495 //ft
+Q=14 //cfs
+g=32.2
+//calculations
+yc=(Q^2 /g *2)^(1/5)
+//results
+printf("yc = %.2f ft is greater than uniform flow depth. Hence flow is supercritical",yc)
diff --git a/1457/CH11/EX11.3/11_3.sce b/1457/CH11/EX11.3/11_3.sce
new file mode 100755
index 000000000..04335242f
--- /dev/null
+++ b/1457/CH11/EX11.3/11_3.sce
@@ -0,0 +1,21 @@
+clc
+//Initialization of variables
+q=27/4
+g=32.2
+Q=27 //cfs
+d=2 //ft
+dz1=0.3 //ft
+//calculations
+yc=(q^2 /g)^(1/3)
+V2=Q/(4*yc)
+V1=Q/(4*d)
+dz = d+ V1^2 /(2*g) - V2^2/(2*g) - yc
+y2=1.6 //ft
+drop = d-(y2+dz1)
+dz2=0.6 //ft
+up=2.12 //ft
+down=0.66 //ft
+//results
+printf("yc = %.2f ft. Since, depth is greater than critical depth. the flow is subcritical",yc)
+printf("\n Drop in water height = %.2f ft",drop)
+printf("\n Drop upstream = %.2f ft and Downstream = %.2f ft",up,down)
diff --git a/1457/CH11/EX11.5/11_5.sce b/1457/CH11/EX11.5/11_5.sce
new file mode 100755
index 000000000..d12feb847
--- /dev/null
+++ b/1457/CH11/EX11.5/11_5.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+y0=2.17 //ft
+q=400/10
+g=32.2
+d=4.8 //ft
+S0=0.0016
+//calculations
+yc=(q^2 /g)^(1/3)
+y2=y0/2 *(-1 + sqrt(1+ 8*q^2 /(g*y0^3)))
+y1=d/2 *(-1 + sqrt(1+ 8*q^2/(g*d^3)))
+E1=y0 + (q/yc)^2 /(2*g)
+E2= y1+ (q/y1)^2 /(2*g)
+Vm=0.5*(q/yc + q/y1)
+Rm=0.5*(y0/1.434 + y1/1.552)
+S=(0.013*Vm/(1.49*Rm^(2/3)))^2
+dx=(E1-E2)/(S-S0)
+E1d=E2
+E2d=d+ (q/4.8)^2 /(2*g)
+HPl=62.4*q*10*(E1d-E2d)/550
+//results
+printf("Power loss = %.2f ",HPl)
+//The answer is a bit different from the textbook due to rounding off error
diff --git a/1457/CH11/EX11.6/11_6.sce b/1457/CH11/EX11.6/11_6.sce
new file mode 100755
index 000000000..d6eeb179b
--- /dev/null
+++ b/1457/CH11/EX11.6/11_6.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+y1=[1.5 1.48]
+V1=[2.22 2.29]
+d=1.2
+//calculations
+q=y1.*V1
+V2=q/d
+Vm=[2.5 2.56]
+Rh1=[0.9 0.89]
+Rh2=[0.88 0.78]
+Rhm=(Rh1+Rh2)/2
+S=(q.*Vm/ Rhm.^(2/3)).^2
+dx=[358 226]
+yavg=(y1(1) + y1(2))/2
+qavg=(q(1) + q(2))/2
+B=4.5
+Q=qavg*B
+//results
+printf("Flow rate = %.1f m^3/s",Q)
diff --git a/1457/CH12/EX12.1/12_1.sce b/1457/CH12/EX12.1/12_1.sce
new file mode 100755
index 000000000..932b810bc
--- /dev/null
+++ b/1457/CH12/EX12.1/12_1.sce
@@ -0,0 +1,24 @@
+clc
+//Initialization of variables
+P1=10 //psia
+Q=0.6 //cfs
+A1=0.0491 //ft^2
+g=32.2
+V=39.2//fps
+A0=0.0218 //ft^2
+d1=2 //in
+d2=3 //in
+//calculations
+Phead=P1*144/62.4
+V1=Q/A1
+V2i= sqrt(2*g*(Phead + V1^2 /(2*g)))
+Cv=V/V2i
+A2=Q/V
+Cc=A2/A0
+Cd=Cc*Cv
+hL=(1/Cv^2 -1)*(1- (d1/d2)^4)*V^2 /(2*g)
+//results
+printf("Cc = %.2f ",Cc)
+printf("\n Cd= %.2f",Cd)
+printf("\n Cv= %.2f",Cv)
+printf("\n Head loss = %.2f ft",hL)
diff --git a/1457/CH12/EX12.2/12_2.sce b/1457/CH12/EX12.2/12_2.sce
new file mode 100755
index 000000000..3d7fa4e22
--- /dev/null
+++ b/1457/CH12/EX12.2/12_2.sce
@@ -0,0 +1,16 @@
+clc
+//Initialization of variables
+d=2 //in
+g=32.2
+d1=3 //in
+k=1.06
+//calculations
+A2=%pi/4 *d^2 /144
+dp=d/12
+Q=k*A2*sqrt(2*g*dp)
+A=%pi/4 *(d1/12)^2
+V1=Q/A
+K2=1.04
+Q2=K2/k *Q
+//results
+printf("Flow rate = %.4f cfs",Q2)
diff --git a/1457/CH12/EX12.3/12_3.sce b/1457/CH12/EX12.3/12_3.sce
new file mode 100755
index 000000000..3ab6f5299
--- /dev/null
+++ b/1457/CH12/EX12.3/12_3.sce
@@ -0,0 +1,18 @@
+clc
+//Initialization of variables
+P1=700 //kN/m^2
+P2=400 //kN/m^2
+D2=12.5 //cm
+D1=25 //cm
+C=0.985
+g=9.81
+R=287 //m^2/s^2 K
+T=273+20 //K
+//calculations
+Pr=P2/P1
+Dr=D2/D1
+Y=0.72
+gam1=P1*g/(R*T)
+G=C*Y*%pi/4 *(D2/100)^2 *sqrt(2*g*gam1*(P1-P2)/(1- Dr^4))
+//results
+printf("Weight flow rate = %.4f kN/s",G)
diff --git a/1457/CH12/EX12.4/12_4.sce b/1457/CH12/EX12.4/12_4.sce
new file mode 100755
index 000000000..a9a6b0ea4
--- /dev/null
+++ b/1457/CH12/EX12.4/12_4.sce
@@ -0,0 +1,10 @@
+clc
+//Initialization of variables
+V=3 //fps
+y=1 //ft
+L=4 //ft
+//calculations
+H= (V*y/3.33)^(2/3)
+P=L-H
+//results
+printf("Height of weir = %.2f ft",P)
diff --git a/1457/CH13/EX13.1/13_1.sce b/1457/CH13/EX13.1/13_1.sce
new file mode 100755
index 000000000..f11040763
--- /dev/null
+++ b/1457/CH13/EX13.1/13_1.sce
@@ -0,0 +1,14 @@
+clc
+//Initialization of variables
+ken=0.5
+kex=0.2
+f=0.0018
+l=10 //ft
+dia=3 //in
+z1=8
+z2=5
+//calculations
+x1=ken+kex+f*l*12/dia
+t=35.5*2/3 *(z1^(3/2) - z2^(3/2))
+//results
+printf("Time reqired = %d s",t)
diff --git a/1457/CH13/EX13.2/13_2.sce b/1457/CH13/EX13.2/13_2.sce
new file mode 100755
index 000000000..828afb1f9
--- /dev/null
+++ b/1457/CH13/EX13.2/13_2.sce
@@ -0,0 +1,15 @@
+clc
+//Initialization of variables
+disp("For steady state, dV/dt =0")
+Q=1600/449
+A2=0.1963
+g=32.2
+rp2=2000
+//calculations
+V2=Q/A2
+hp1=32*V2^2 /(2*g) -50
+hp2=hp1*(rp2/1650)^2
+hpf=169 //ft
+Q=4.1 //cfs
+//results
+printf("Steady state flow rate = %.2f cfs",Q)
diff --git a/1457/CH13/EX13.3/13_3.sce b/1457/CH13/EX13.3/13_3.sce
new file mode 100755
index 000000000..73afba77a
--- /dev/null
+++ b/1457/CH13/EX13.3/13_3.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+kl=0.5
+f=0.02
+L=15 //ft
+D=0.1 //ft
+k=3.5
+g=9.81
+H=2//ft
+//calculations
+k=kl+f*L/D
+V0=sqrt(2*g*H/(1+k))
+Q=[0.25 0.5 0.75]
+V=V0*Q
+Vfun=(2.95+V)./(2.95-V)
+lnVfun=log(Vfun)
+t=1.129*lnVfun
+//results
+disp(t)
+disp("Similarly, it can be calculated for L=150,1500 ft")
diff --git a/1457/CH13/EX13.4/13_4.sce b/1457/CH13/EX13.4/13_4.sce
new file mode 100755
index 000000000..9df157c92
--- /dev/null
+++ b/1457/CH13/EX13.4/13_4.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+Q=30 //cfs
+r=2 //ft
+cp=3200
+rho=1.94
+Q2=10 //cfs
+z=300 //ft
+//calculations
+V=Q/(%pi*r^2)
+ph=rho*cp*V/144
+phd=4000/cp /(2*r) *ph
+dV=(Q2-Q)/(%pi*r^2)
+dph=-rho*cp*dV/144
+ph3=rho*cp*V/3 /144
+ph4=ph3*z*2/cp
+//results
+printf("Water hammer pressure= %.1f psi",ph)
+printf("\n Water hammer pressure in case 2= %.1f psi",phd)
+printf("\n Water hammer pressure in case 3= %.1f psi",dph)
+printf("\n Pressure at valve in case 4 = %.1f psi",ph3)
+printf("\n Pressure at 300 ft from reservoir = %.2f psi",ph4)
diff --git a/1457/CH14/EX14.1.a/14_1a.sce b/1457/CH14/EX14.1.a/14_1a.sce
new file mode 100755
index 000000000..899c94394
--- /dev/null
+++ b/1457/CH14/EX14.1.a/14_1a.sce
@@ -0,0 +1,10 @@
+clc
+//Initialization of variables
+g=9.81 //kN/m^3
+Q=3.2 //m^3/s
+h=25 //m
+eta=0.82
+//calculations
+bp= g*Q*h/eta
+//results
+printf("Brake power = %d kW",bp)
diff --git a/1457/CH14/EX14.1.b/14_1b.sce b/1457/CH14/EX14.1.b/14_1b.sce
new file mode 100755
index 000000000..c54c9cbec
--- /dev/null
+++ b/1457/CH14/EX14.1.b/14_1b.sce
@@ -0,0 +1,24 @@
+clc
+//Initialization of variables
+D1=50
+n1=1450
+n2=1200
+D2=80
+Q1=3.2 //cfs
+h1=25 //m
+g=9.81 //kN/m^3
+eta=0.82
+//calculations
+h2=h1*(D2/D1)^2 *(n2/n1)^2
+Q2=Q1*(D2/D1)^3 *(n2/n1)
+bp=g*Q2*h2/eta
+h1=82 //ft
+Q1=50700 //gpm
+h2=143.8 //ft
+Q2=171800 //gpm
+Ns1=n1*sqrt(Q1) /h1^(3/4)
+Ns2=n2*sqrt(Q2) /h2^(3/4)
+//results
+printf("Brake power = %d kW",bp)
+printf("\n Pumps are homologous. We expect them to have same specific speed and their speeds are %.1f and %.1f",Ns1,Ns2)
+disp("14.1c is included in this example itself")
diff --git a/1457/CH15/EX15.1/15_1.sce b/1457/CH15/EX15.1/15_1.sce
new file mode 100755
index 000000000..8617221d9
--- /dev/null
+++ b/1457/CH15/EX15.1/15_1.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+z2=500//ft
+z1=300//ft
+D=[1 1.5 2 2.5 3 4 6]
+g=32.2
+gam=62.4
+//calculations
+Dj=D/12
+Vj=sqrt((z2-z1)*2*g./(1.04 + 640.*Dj.^4))
+Aj=%pi/4 *Dj.^2
+Q=Aj.*Vj
+Pjet=gam*Q.*Vj.^2 /(2*g) /550
+Pj=max(Pjet)
+for i=1:length(Pjet)
+ if(Pjet(i) ==Pj)
+ break
+ end
+end
+diameter=D(i)
+//results
+printf("Thus a pipe of %d in will be the optimum",diameter)
diff --git a/1457/CH15/EX15.2/15_2.sce b/1457/CH15/EX15.2/15_2.sce
new file mode 100755
index 000000000..4cb75d10a
--- /dev/null
+++ b/1457/CH15/EX15.2/15_2.sce
@@ -0,0 +1,35 @@
+clc
+//Initialization of variables
+phi=0.46
+g=32.2
+k=0.44
+cv=0.98
+d=10 //in
+A=0.545 //ft^2
+beta=160 //degrees
+//calculations
+u=phi*sqrt(2*g)
+V1=cv*sqrt(2*g)
+gQ=62.4*A*V1
+T=d/2 *gQ/g *(1 -cosd(beta) /sqrt(1+k) )*sqrt(2*g)*(cv-phi)
+Power=T*2*u/d
+//results
+printf("Torque required = %d ft lb",T)
+printf("\n Power transferred = %d ft lb/s",Power)
+Pi=gQ
+He=Power/Pi
+printf("\n Hydraulic efficiency = %.2f",He)
+v1=V1-u
+v2=v1/(sqrt(1+k))
+hl=k*v2^2 /(2*g)
+printf("Head loss in bucket friction = %.4f",hl*100)
+Hn=(1/cv^2 -1)*V1^2 /(2*g)
+printf("\n Head loss in nozzle = %.4f",Hn*100)
+V2cos=u+v2*cosd(beta)
+V2sin=v2*sind(beta)
+alpha=acot(V2cos/V2sin)
+V2=V2sin/sin(alpha)
+Hd=V2^2/(2*g)
+printf("\n Head loss at discharge = %.2f",Hd*100)
+Htotal=Hd+Hn+hl
+printf("\n Total head loss = %.2f",Htotal*100)
diff --git a/1457/CH15/EX15.3.a/15_3.sce b/1457/CH15/EX15.3.a/15_3.sce
new file mode 100755
index 000000000..275e081f5
--- /dev/null
+++ b/1457/CH15/EX15.3.a/15_3.sce
@@ -0,0 +1,18 @@
+clc
+//Initialization of variables
+cv=0.98
+g=32.2
+h=1320 //ft
+A=0.196 //ft^2
+eta=0.85
+ne=400
+phi=0.45
+//calculations
+V=cv*sqrt(2*g*h)
+Q=A*V
+bhp=eta*62.4*Q*h/550
+ns=ne*sqrt(bhp) /h^(5/4)
+u=phi*sqrt(2*g*h)
+D=u*60/%pi/ne
+//results
+printf("Pitch diameter = %.2f ft",D)
diff --git a/1457/CH15/EX15.3.b/15_3b.sce b/1457/CH15/EX15.3.b/15_3b.sce
new file mode 100755
index 000000000..4f0e1d41f
--- /dev/null
+++ b/1457/CH15/EX15.3.b/15_3b.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+cv=0.98
+g=32.2
+h=1320 //ft
+A=0.196 //ft^2
+eta=0.85
+ne=400
+phi=0.45
+//calculations
+V=cv*sqrt(2*g*h)
+Q=A*V/3
+bhp=eta*62.4*Q*h/550
+ne2=600
+ns1=ne2*sqrt(bhp) /h^(5/4)
+D=2500/ne2
+Dj=sqrt(Q*4/V/%pi)
+//results
+printf("Jet diameter = %.3f ft",Dj)
+printf("\n Specific speed = %.2f ",ns1)
+printf("\n Pitch Diameter = %.2f ft",D)
+printf("\n Operating speed = %d rpm",ne2)
diff --git a/1457/CH16/EX16.2/16_2.sce b/1457/CH16/EX16.2/16_2.sce
new file mode 100755
index 000000000..d08246156
--- /dev/null
+++ b/1457/CH16/EX16.2/16_2.sce
@@ -0,0 +1,34 @@
+clc
+//Initialization of variables
+ns=20
+eta=0.925
+etah=0.94
+BD=0.1
+phie=0.72
+g=32.2
+alpha2=90 //degrees
+//calculations
+Cr=ns^2 /(67100*phie^2 *BD*eta)
+c1cos=etah/(2*phie)
+alpha=atan(Cr/c1cos)
+C1=Cr/sin(alpha)
+beta1=acotd((C1*cos(alpha) -phie)/(C1*sin(alpha)))
+//results
+printf("Alpha = %.2f degrees",alpha*180/%pi)
+printf("\n Beta = %.2f degrees",beta1)
+disp("part b")
+h=402
+n=600 //rpm
+bhp=3600
+ns=n*sqrt(bhp) /h^(5/4)
+D=153.2*phie*sqrt(h) /n
+B=BD*D
+Dt=D*0.735
+Ac=0.95*%pi*D*B
+Vr=Cr*sqrt(2*g*h)
+Q=Ac*Vr
+//results
+printf("\n Breadth= %.3f ft",B)
+printf("\n depth D= %.3f ft",D)
+printf("\n velocity Vr= %d ft/s",Vr)
+printf("\n Flow rate Q= %.1f cfs",Q)
diff --git a/1457/CH16/EX16.3/16_3.sce b/1457/CH16/EX16.3/16_3.sce
new file mode 100755
index 000000000..db6cd69ca
--- /dev/null
+++ b/1457/CH16/EX16.3/16_3.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+ns=70
+z1=10 //ft
+z2=5000 //ft
+//calculations
+P1=12.2*144/62.4
+P2=0.26*144/62.4
+sigmac=0.31
+h=(P1-P2-z1)/sigmac
+//results
+printf("Max permissible head to assure against cavitation = %d ft",h)
diff --git a/1457/CH16/EX16.4/16_4.sce b/1457/CH16/EX16.4/16_4.sce
new file mode 100755
index 000000000..7d41d1e96
--- /dev/null
+++ b/1457/CH16/EX16.4/16_4.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+Q=600 //cfs
+z=350 //ft
+eta=0.9
+//calculations
+power=62.4*Q*z*eta/550
+rpm=75
+n=2
+ns=rpm*sqrt(power/n) /z^(5/4)
+phi=0.45
+D=153.3*sqrt(z) *phi/rpm
+rpm2=600
+ns2=rpm2*sqrt(power/n) /z^(5/4)
+//results
+printf("For two turbines, ns= %.2f",ns)
+printf("\n For francis turbines, ns= %d ",ns2)
diff --git a/1457/CH17/EX17.1.b/17_1b.sce b/1457/CH17/EX17.1.b/17_1b.sce
new file mode 100755
index 000000000..d64999376
--- /dev/null
+++ b/1457/CH17/EX17.1.b/17_1b.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+ne=600
+gpm=1600
+Ns=500
+Head=900 //ft
+//calculations
+h=(ne*sqrt(gpm) /Ns)^(4/3)
+n=Head/h
+//results
+printf("No. of stages = %d",n+1)
diff --git a/1457/CH17/EX17.1/17_1.sce b/1457/CH17/EX17.1/17_1.sce
new file mode 100755
index 000000000..08c5030a5
--- /dev/null
+++ b/1457/CH17/EX17.1/17_1.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+Ns=500
+h=900 //ft
+Q=1600 //gpm
+//calculations
+ne=Ns*h^(3/4) /sqrt(Q)
+//results
+printf("Minimum rotative speed = %d rpm",ne)
diff --git a/1457/CH17/EX17.2/17_2.sce b/1457/CH17/EX17.2/17_2.sce
new file mode 100755
index 000000000..1b15d3f6e
--- /dev/null
+++ b/1457/CH17/EX17.2/17_2.sce
@@ -0,0 +1,18 @@
+clc
+//Initialization of variables
+ne=600
+gpm=2000
+h=150
+num=2
+//calculations
+ns=ne*sqrt(gpm) /h^(3/4)
+gpm2=num*gpm
+h2=num^2 *h
+Ns=2*ne*sqrt(gpm2) /h2^(3/4)
+Ne2=Ns*(h/2)^(3/4) /sqrt(gpm)
+//results
+printf("Specific speed in case1 = %d ",ns)
+printf("\nFlow rate in case 2 = %d gpm",gpm2)
+printf("\n Head in case 2 = %d ft",h2)
+printf("\n Specific speed in case 2 = %d ",Ns)
+printf("\n required operating speed in case 2 = %d rpm",Ne2)
diff --git a/1457/CH17/EX17.3/17_3.sce b/1457/CH17/EX17.3/17_3.sce
new file mode 100755
index 000000000..1ef491e6f
--- /dev/null
+++ b/1457/CH17/EX17.3/17_3.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+ne=600/2
+gpm=1450
+h=140
+NPSH=10.4
+//calculations
+Ns=gpm*sqrt(ne) /h^(3/4)
+sigmac=NPSH/h
+zsmax=-3 //ft
+//results
+printf("Sigma C for the pump = %.4f",sigmac)
+printf("\n Position of pump = %d ft",zsmax)
diff --git a/1457/CH17/EX17.4/17_4.sce b/1457/CH17/EX17.4/17_4.sce
new file mode 100755
index 000000000..ae992cc6f
--- /dev/null
+++ b/1457/CH17/EX17.4/17_4.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+ne=600
+gpm=84500
+h=225
+f=0.95
+phie=1.1
+g=32.2
+//calculations
+Ns=ne*sqrt(gpm) /h^(3/4)
+u2=phie*sqrt(2*g*h)
+D=153.2*phie*sqrt(h) /ne
+D0=1.06*D*12 //in
+B=0.155*D0*12 //in
+De=0.6*D0
+u0=1.06*u2
+Vm2=0.15*u0
+Area=0.95*%pi*D/144 *B
+Q=Area*Vm2
+//results
+printf("Specific speed =%d ",Ns)
+printf("\n Flow rate = %d cfs",Q)
+printf("\n Eye diameter = %.1f in",De)
diff --git a/1457/CH2/EX2.1/2_1.sce b/1457/CH2/EX2.1/2_1.sce
new file mode 100755
index 000000000..a96bb126b
--- /dev/null
+++ b/1457/CH2/EX2.1/2_1.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+z=20000 //ft
+rate=-0.00356 //F/ft
+T=59 //F
+P=14.7 //psia
+gamma=0.076 //lb/ft^3
+//calculations
+P2=P*144 - gamma*(z)
+P2f=P2/144
+P3=P*exp(-gamma*z/(P*144))
+P4=((P*144)^0.285 -0.285*gamma*z*(P*144)^(-0.715))^(1/0.285)
+P4f=P4/144.
+P5=P*((460+T)/(460+T+rate*z))^(gamma*(T+460)/(P*144*rate))
+//results
+printf ('Constant density')
+printf('\n Final pressure = %.2f psia',P2f)
+printf('\n Isothermal')
+printf('\n Final pressure = %.2f psia',P3)
+printf('\n Isentropic')
+printf('\n Final pressure = %.2f psia',P4f)
+printf('\n Linear decrease')
+printf('\n Final pressure = %d psia',P5+1)
diff --git a/1457/CH2/EX2.2/2_2.sce b/1457/CH2/EX2.2/2_2.sce
new file mode 100755
index 000000000..99bfa664d
--- /dev/null
+++ b/1457/CH2/EX2.2/2_2.sce
@@ -0,0 +1,24 @@
+clc
+//Initialization of variables
+wA=53.5 //lb/ft^3
+wA2=8.4 //kN/m^3
+wB=78.8 //lb/ft^3
+wB2=12.3 //kN/m^3
+PB=30 //psi
+PB2=200 //kN/m^2
+AB=1.3 //ft
+AB2=40/100 //m
+BC=6.5 //ft
+BC2=2 //m
+CD=10 //ft
+CD2=3 //m
+//Calculations
+PAbyGB=PB*144/wB - AB*13.55*62.4/wB - (BC+CD) + (AB+BC)*wA/wB
+PA=PAbyGB*wB/144.
+PAbyGB2=PB2/wB2 - AB2*13.55*9.81/wB2 - (BC2+CD2) + (AB2+BC2)*wA2/wB2
+PA2=PAbyGB2*wB2
+//Results
+printf('English units')
+printf("\n Final pressure = %.1f psi",PA)
+printf('\n SI Units')
+printf("\n Final pressure = %d kPa",PA2+1)
diff --git a/1457/CH2/EX2.3/2_3.sce b/1457/CH2/EX2.3/2_3.sce
new file mode 100755
index 000000000..654ced881
--- /dev/null
+++ b/1457/CH2/EX2.3/2_3.sce
@@ -0,0 +1,21 @@
+clc
+//Initialization of variables
+W=500 //lb
+width=2 //ft
+len=4 //ft
+CGx=1.2 //ft
+CGy=0.9 //ft
+theta=30 //degrees
+gam=62.4 //lb/ft^3
+//Calculations
+Fv=width*len //multiply by gam*x
+F=width/(2*cosd(theta)) //multiply by gam*x*x
+//function[y] =yp(x)
+// y=x/(2*cosd(theta)) + width*(x/cosd(theta))/(12*(cosd(theta))^4)
+//endfunction
+//function[M]=func(x)
+// M=F*gam*x^2 *0.770*x/2 +W*CGx - Fv*gam*x*width
+//endfunction
+x= poly(0,'x');
+vector=roots(F*gam*x^2 *0.770*x/2 +W*CGx - Fv*gam*x*width)
+printf('The gate will remain closed between %.2f ft and %.2f ft',vector(3),vector(2))
diff --git a/1457/CH2/EX2.4/2_4.sce b/1457/CH2/EX2.4/2_4.sce
new file mode 100755
index 000000000..7ec97f991
--- /dev/null
+++ b/1457/CH2/EX2.4/2_4.sce
@@ -0,0 +1,29 @@
+clc
+//Initialization of variables
+z1=1 //in
+z2=2 //in
+z3=2 //in
+sOil=0.8
+sWater=1
+Pa=3 //psi
+//calculations
+Pd=(Pa) + (z2+z1)*sOil*62.4/144 + 62.4*z3/144
+Fa=Pa*144*%pi*z3^2
+Fb=sOil*62.4*(z2+z1-(z2+z3)*z2/((z2+z1)*%pi))*(%pi*z3^2 /2)
+Fc=sOil*62.4*(z2+z1)*(%pi*z3^2 /2)
+Fd=62.4*(z2+z3)*z2/((z2+z1)*%pi)*(%pi*z3^2 /2)
+F=Fa+Fb+Fc+Fd
+yPa=z2+z1
+yCb=z2+z1-(z2+z3)*z2/((z2+z1)*%pi)
+ICb=%pi*(z2+z3)^4 /128 -0.5*%pi*z2^2 *((z2+z3)*z2/((z2+z1)*%pi))^2
+yPb=yCb+ICb/(yCb*0.5*%pi*z2^2)
+yPc=z2+z1+ (z2+z3)*z2/((z2+z1)*%pi)
+ICd=ICb
+yPd=z2+z1 + (z2+z3)*z2/((z2+z1)*%pi) + ICb/((z2+z3)*z2/((z2+z1)*%pi)*0.5*%pi*z3^2 )
+yP=(Fa*yPa+Fb*yPb+Fc*yPc+Fd*yPd)/F
+//Results
+printf('case 1')
+printf('\n Pressure at the bottom = %.1f psi',Pd)
+printf('\n case 2')
+printf('\n Net force = %d lb', F+3)
+printf('\n Location of net force= %.2f ft', yP)
diff --git a/1457/CH2/EX2.5/2_5.sce b/1457/CH2/EX2.5/2_5.sce
new file mode 100755
index 000000000..9f91d6672
--- /dev/null
+++ b/1457/CH2/EX2.5/2_5.sce
@@ -0,0 +1,18 @@
+clc
+//Initialization of variables
+dia=4 //m
+P=35 //kN/m^2
+theta=30 //degrees
+//Calculations
+Fx=P*(dia-dia*(1-cosd(theta))/2.)
+Fz=P*dia*sind(theta)/2
+dist=(dia-dia*(1-cosd(theta))/2.)
+Fxb=9.81*dist*dist/2
+Fzb=9.81*((180+theta)*%pi*(dia/2)^2/360 + sqrt(3) /2 + dia/2)
+//Results
+printf('part a')
+printf('\n Horizontal force= %.1f kN/m to the right', Fx)
+printf('\n Vertical force = %.1f kN/m upward' , Fz)
+printf('\n part b')
+printf('\n force by the fluid = %.1f kN/m to the right',Fxb)
+printf('\n weight of the cross-hatched volume of liquid =%.1f kN/m Upward',Fzb )
diff --git a/1457/CH2/EX2.6/2_6.sce b/1457/CH2/EX2.6/2_6.sce
new file mode 100755
index 000000000..e115cc016
--- /dev/null
+++ b/1457/CH2/EX2.6/2_6.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+d1=4 //in
+h1=3.75 //in
+w1=0.85 //lb
+gamma=52 //lb/ft^3
+d2=5 //in
+depth=3 //in
+//Calculations
+A=[(d1/2)*(d1/2), -(d2/2)*(d2/2)+(d1/2)*(d1/2) ; 1,1]
+b=[0;w1*12*(12*2/d1)^2 /(gamma*%pi)]
+C=A\b
+x=C(1,1)
+y=C(2,1)
+height=depth-x
+//Results
+printf('Bottom of the cylinder will be %.2f in above the bottom of hollow cylinder',height)
diff --git a/1457/CH2/EX2.7/2_7.sce b/1457/CH2/EX2.7/2_7.sce
new file mode 100755
index 000000000..44b9d8516
--- /dev/null
+++ b/1457/CH2/EX2.7/2_7.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+v=180 //m/s
+angle=40 //degrees
+a=4 //m/s^2
+r=2600 //m
+g=9.81 //m/s^2
+//calculations
+//Assume outward and right as positive
+an=-v*v/r
+at=-a
+ax=at*cosd(angle) +an*sind(angle)
+az=at*sind(angle) -an*cosd(angle)
+tangent=ax/(az+g)
+theta=atand(tangent)
+//Results
+printf('Angle made by the free liquid = %.2f degrees',-theta)
diff --git a/1457/CH3/EX3.1/3_1.sce b/1457/CH3/EX3.1/3_1.sce
new file mode 100755
index 000000000..9122e4aa8
--- /dev/null
+++ b/1457/CH3/EX3.1/3_1.sce
@@ -0,0 +1,15 @@
+clc
+//Initialization of variables
+Q=0.5 //cfs
+d1=8 //in
+d2=4 //in
+R=2 //in
+h=0.59 //in
+//calculations
+Aa=%pi*(d1/12)^2 /4
+Va=Q/Aa
+Ab=2*%pi*R*h/144
+Vb=Q/Ab
+//results
+printf("Average velocity at section A =%.2f fps ",Va)
+printf("\n Average velocity at section B=%.2f fps ",Vb)
diff --git a/1457/CH3/EX3.2/3_2.sce b/1457/CH3/EX3.2/3_2.sce
new file mode 100755
index 000000000..be33dbb28
--- /dev/null
+++ b/1457/CH3/EX3.2/3_2.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+Q=0.5 //cfs
+d1=8 //in
+d2=4 //in
+R=2 //in
+theta=45//degrees
+//calculations
+h=(1-cosd(theta)) //Multiply by r
+Aa=2*%pi*h //Multiply by r^2
+V=Q/Aa //divide by r^2
+aA=0
+r=0.167 //ft
+V1=V/r^2
+dvbydx=V*2/r^3
+aB=V1*dvbydx
+//results
+//The answer varies a bit from the text due to rounding off error
+printf("Acceleration at A = %d since flow is steady",aA)
+printf("\n Acceleration at B = %d ft/s^2",aB)
diff --git a/1457/CH4/EX4.1/4_1.sce b/1457/CH4/EX4.1/4_1.sce
new file mode 100755
index 000000000..d06a13dac
--- /dev/null
+++ b/1457/CH4/EX4.1/4_1.sce
@@ -0,0 +1,27 @@
+clc
+//Initialization of variables
+d=1.26
+d=25 //in
+d2=60 //cm
+Q=25//cfs
+Q2=700 //L/s
+dout=12 //in
+dout2=30/100 //m
+z=3 //ft
+z2=1 //m
+P1=45 //psi
+P2=300 //kN/m^2
+gamma=9.81 //kN/m^3
+//calculations
+V1=d/%pi
+V2=d*4/%pi
+pf=(P1*144/(1.26*62.4) + (V1^2)/64.4 - V2^2 /64.4 +z)*1.26*62.4/144
+V1=Q2/1000/(%pi*dout2^2)
+V2=4*V1
+p2f=((P2/(1.26*gamma)) + V1^2 /(2*gamma) -V2^2 /(2*gamma) +z2)*1.26*gamma
+
+//results
+printf("English units")
+printf("\n Pressure at point 2 = %.1f psi ",pf)
+printf("\n SI Units")
+printf("\n Pressure at point 2 = %.d kN/m^2 ",p2f)
diff --git a/1457/CH4/EX4.10/4_10.sce b/1457/CH4/EX4.10/4_10.sce
new file mode 100755
index 000000000..1927188d0
--- /dev/null
+++ b/1457/CH4/EX4.10/4_10.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+V=60 //fps
+theta=15 //degrees
+ra=6/12 //ft
+rb=8/12 //ft
+B=1.5/12 //ft
+//calculations
+Vra=V*sind(theta)
+Q=2* %pi*ra*B*Vra
+Vratio=ra/rb
+Vb=Vratio*V
+flow=(V^2 - Vb^2)/(2*32.2)
+//results
+printf("Flow rate = %.2f cfs",Q)
+printf("\n Velocity at b = %d fps",Vb)
+printf("\n Pressure head = %.1f ft",flow)
diff --git a/1457/CH4/EX4.2/4_2.sce b/1457/CH4/EX4.2/4_2.sce
new file mode 100755
index 000000000..6a1d2241f
--- /dev/null
+++ b/1457/CH4/EX4.2/4_2.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+h=20 //m
+c=4187 //N m /(kg K)
+g=9.81
+//calculations
+dT=g*h/c
+//results
+printf("Increase in temperature of water = %.3f K",dT)
diff --git a/1457/CH4/EX4.3/4_3.sce b/1457/CH4/EX4.3/4_3.sce
new file mode 100755
index 000000000..2cc0c0b6a
--- /dev/null
+++ b/1457/CH4/EX4.3/4_3.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+sg=1.26
+sg2=1.26
+HP=22
+HP2=16
+//calculations
+hp=HP*550/(sg*62.4) //divide by Q
+Q=14.2 //cfs
+printf("In English units, By trial Q= %.1f cfs",Q)
+hp2=HP2*1000/(sg2*9.81)
+Q2=0.42 //m^3/s
+printf("\n In SI units, By trial Q= %.2f m^3/s",Q2)
diff --git a/1457/CH4/EX4.44/4_4.sce b/1457/CH4/EX4.44/4_4.sce
new file mode 100755
index 000000000..7f3378b35
--- /dev/null
+++ b/1457/CH4/EX4.44/4_4.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+g=9810 //N/m^3
+Q=10 //m^3/s
+H=20 //m
+//calculations
+Rate=g*Q*H/1000
+//results
+printf("Rate of energy loss = %d kW",Rate-2)
diff --git a/1457/CH4/EX4.5/4_5.sce b/1457/CH4/EX4.5/4_5.sce
new file mode 100755
index 000000000..aeef5a8af
--- /dev/null
+++ b/1457/CH4/EX4.5/4_5.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+s=0.86
+P2=3.8 //psia
+Patm=26.8 //in of Hg
+SPatm=29.9 //in of Hg
+psi=14.7 //psia
+//calculations
+Pa=Patm*psi/SPatm
+Pcrit=-(Pa-P2)*144/(s*62.4)
+Q=sqrt((-Pcrit+ 10*144/(s*62.4))*64.4*%pi^2 /(-1/2.25^2 + 1/0.25^2 ))
+//results
+printf("Max. theoretical flow = %.1f cfs",Q)
diff --git a/1457/CH4/EX4.6/4_6.sce b/1457/CH4/EX4.6/4_6.sce
new file mode 100755
index 000000000..670f9b956
--- /dev/null
+++ b/1457/CH4/EX4.6/4_6.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+z=3 //ft
+s=0.82
+//calculations
+ua=sqrt(z*2*32.2)
+ub=sqrt(2*32.2*(-2*(1-s) +ua^2 /(2*32.2)))
+//results
+printf("Velocity at B= %.1f fps",ub)
diff --git a/1457/CH4/EX4.7/4_7.sce b/1457/CH4/EX4.7/4_7.sce
new file mode 100755
index 000000000..ef3302f22
--- /dev/null
+++ b/1457/CH4/EX4.7/4_7.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+d=3 //in
+x1=0.5^2
+x2=0.75^2
+z=80 //ft
+z3=10 //ft
+//calculations
+disp("Using bernoullis theorem")
+v3=29.7 //fps
+Q=%pi /4 *(d/12)^2 *v3
+hls=5*(x1*v3)^2 /(2*32.2)
+hld=12*(x2*v3)^2 /(2*32.2)
+//results
+printf("Head loss in suction pipe = %.1f ft",hls)
+printf("\n Head loss in discharge pipe = %.1f ft",hld)
+printf("\n Flow rate = %.2f cfs",Q)
diff --git a/1457/CH4/EX4.8/4_8.sce b/1457/CH4/EX4.8/4_8.sce
new file mode 100755
index 000000000..25ef5b9ab
--- /dev/null
+++ b/1457/CH4/EX4.8/4_8.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+z1=2
+z2=0.8
+//calculations
+disp("From equation of continuity, z1*v1=z2*v2")
+V1= sqrt((z2-z1)*2*9.81/(1-z1^2 /z2^2))
+V2=z1*V1/z2
+Q=z1*1*V1
+//results
+printf("Flow rate = %.2f m^3/s",Q)
diff --git a/1457/CH4/EX4.9/4_9.sce b/1457/CH4/EX4.9/4_9.sce
new file mode 100755
index 000000000..6af96c9f0
--- /dev/null
+++ b/1457/CH4/EX4.9/4_9.sce
@@ -0,0 +1,9 @@
+clc
+//Initialization of variables
+theta=30 //degrees
+z=10 //ft
+x=60 //ft
+//calculations
+V=sqrt((0.5*32.2*69.3^2)/((x-sind(theta) *69.3)))
+//results
+printf("velocity = %.2f fps",V)
diff --git a/1457/CH6/EX6.1/6_1.sce b/1457/CH6/EX6.1/6_1.sce
new file mode 100755
index 000000000..8ece9ee10
--- /dev/null
+++ b/1457/CH6/EX6.1/6_1.sce
@@ -0,0 +1,31 @@
+clc
+//Initialization of variables
+g=9.81 //kN/m^3
+V2=12 //m/s
+V3=12 //m/s
+A2=10^2
+A1=15^2
+A3=7.5^2
+t1=15
+t2=30
+//calculations
+V1=(A2*V2 + A3*V3)/A1
+Q1=%pi /4 *A1*10^-4 *V1
+Q2=%pi /4 *A2*10^-4 *V2
+Q3=%pi /4 *A3*10^-4 *V3
+P1g=V3^2 /(2*g) - V1^2 /(2*g)
+P1=P1g*g
+rho=10^3
+V2x=V2*cosd(t1)
+V3x=V3*cosd(t2)
+V1x=V1
+Fx= -P1*A1*10^-4 + (rho*Q2*V2x + rho*Q3*V3x - rho*Q1*V1x)
+Fx=Fx*10^-3
+V2y=V2*sind(t1)
+V3y=-V3*sind(t2)
+V1y=0
+Fy=rho*Q2*V2y +rho*Q3*V3y -rho*Q1*V1y
+Fy=Fy*10^-3
+//results
+printf("Force in x directio = %.3f kN",Fx)
+printf("\n Force in y direction = %.3f kN",Fy)
diff --git a/1457/CH6/EX6.2/6_2.sce b/1457/CH6/EX6.2/6_2.sce
new file mode 100755
index 000000000..da4d0fe83
--- /dev/null
+++ b/1457/CH6/EX6.2/6_2.sce
@@ -0,0 +1,16 @@
+clc
+//Initialization of variables
+V1x=100 //ft/sec
+V2x=0.866*95
+V1y=0
+V2y=.5*95
+A1=0.0218 //ft^2
+//calculations
+Q=A1*V1x
+rho=1.94
+Fx=rho*Q*(V2x-V1x)
+Fxr=-Fx
+Fy=rho*Q*(V2y-V1y)
+//results
+printf("Horizontal force on the blade = %.1f lb",Fxr)
+printf("\n Vertical force on the blade = %d lb",Fy)
diff --git a/1457/CH6/EX6.3/6_3.sce b/1457/CH6/EX6.3/6_3.sce
new file mode 100755
index 000000000..8ba4eb187
--- /dev/null
+++ b/1457/CH6/EX6.3/6_3.sce
@@ -0,0 +1,25 @@
+clc
+//Initialization of variables
+v2=36 //fps
+beta=150 //degrees
+u=60 //fps
+rho=1.94
+Qd=0.0218
+V1=100 //fps
+gam=62.4
+g=32.2
+//calculations
+v2s=v2*sind(beta)
+v2c=u+v2*cosd(beta)
+V2=34 //fps
+alpha=32 //degrees
+Fx=rho*Qd*(v2c-V1)*(V1-u)
+Fy=-rho*Qd*(V1-u)*v2s
+Fx2=rho*Qd*V1*(v2c-V1)
+HPin=gam*Qd*V1*(V1^2 /(2*g))/550
+HPout=gam*Qd*V1*(V2^2 /(2*g))/550
+HPtransfer=-Fx2*u/550
+HPfl=HPin-HPout-HPtransfer
+//results
+printf("Force exerted by water on the vane = %d lb",Fx2)
+printf("\n Friction loss = %.1f hp ",HPfl)
diff --git a/1457/CH6/EX6.4/6_4.sce b/1457/CH6/EX6.4/6_4.sce
new file mode 100755
index 000000000..4aae7031b
--- /dev/null
+++ b/1457/CH6/EX6.4/6_4.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+z1=35 //ft
+z3=20 //ft
+P1=30 //psi
+g=32.2
+z2=10 //ft
+d2=4 //in
+rho=1.94
+be=20 //degrees
+W=150 //lb
+//calculations
+V3= sqrt(2*g*(P1*144/55 + z1-z3))
+Q=3.81 //cfs
+V2=43.6 //fps
+P2=55*(z3+ V3^2/(2*g) - z2 - V2^2/(2*g))/144
+Fx=P2*%pi/4 *d2^2 - rho*55/62.4 *Q*(V3*cosd(be) - V2)
+Fy=rho*55/62.4 *Q*(V3*sind(be) ) + W
+Fres=sqrt(Fx^2 + Fy^2)
+Fsx=rho*Q*55/62.4*(V3*cosd(be) )
+//calculations
+printf("resultant force = %d lb",Fres)
+printf("\n horizontal component of force = %d lb",Fsx)
diff --git a/1457/CH6/EX6.5/6_5.sce b/1457/CH6/EX6.5/6_5.sce
new file mode 100755
index 000000000..7dd0340af
--- /dev/null
+++ b/1457/CH6/EX6.5/6_5.sce
@@ -0,0 +1,30 @@
+clc
+//Initialization of variables
+omega=300 //rpm
+r1=1.6 //ft
+Q=120 //cfs
+z=0.8 //ft
+beta1=80 //degrees
+r2=1 //ft
+rho=1.94
+g=32.2
+gam=62.4
+//calculations
+disp("part a")
+u1=(2*%pi/60)*omega*r1
+Vr1=Q/(2*%pi*r1*z)
+v1=Vr1/sind(beta1)
+v2c=v1*cosd(beta1)
+V1c=u1+v2c
+u2=(2*%pi/60)*omega*r2
+Vr2=Vr1*(r1/r2)
+beta2=atand(Vr2/u2)
+printf("required Blade angle = %.1f degrees",180-beta2)
+disp("part b")
+T=rho*Q*(r1*V1c)
+power=T*u2
+printf("Torque exerted = %d ft lb/s",power)
+disp("part c")
+h2=u1*V1c/g
+Power=gam*Q*h2
+printf("Torque exerted = %d ft lb/s",Power)
diff --git a/1457/CH6/EX6.6/6_6.sce b/1457/CH6/EX6.6/6_6.sce
new file mode 100755
index 000000000..f5ac7517e
--- /dev/null
+++ b/1457/CH6/EX6.6/6_6.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+V1=150*44/30
+Q=20000/2
+d=6.5 //ft
+rho=0.072
+//calculations
+A=%pi/4 *(d)^2
+V=Q/A
+dV=2*(V-V1)
+Ft=rho/32.2 *Q*2*dV
+eta=1/(1+ dV/(2*V1))
+dP=Ft/2 /(%pi/4) /d^2
+hpp=Q*dP/550
+//results
+printf("pressure rise = %d psf",dP)
+printf("\n horsepower input = %d hp ",hpp)
diff --git a/1457/CH6/EX6.7/6_7.sce b/1457/CH6/EX6.7/6_7.sce
new file mode 100755
index 000000000..177de98e0
--- /dev/null
+++ b/1457/CH6/EX6.7/6_7.sce
@@ -0,0 +1,20 @@
+clc
+//Initialization of variables
+V1=8.02 //fps
+V2=16.04 //fps
+Q=481 //cfs
+rho=1.94
+A=10*6
+d=3
+//calculations
+Fx=62.4*d*A - 62.4*d/2 *A/2 - rho*Q*(V2-V1)
+V1m=2.56 //m/s
+V2m=5.12 //m/s
+Qm=15.4 //m^2/s
+dm=1
+Am=2*3
+rhom=1
+Fxm=9.81*dm*Am - 9.81*dm/2 *Am/2 - rhom*Qm*(V2m-V1m)
+//results
+printf("Force in x- direction = %d lb",Fx)
+printf("Force in x- direction = %.1f kN",Fxm)
diff --git a/1457/CH7/EX7.2/7_2.sce b/1457/CH7/EX7.2/7_2.sce
new file mode 100755
index 000000000..0e4750948
--- /dev/null
+++ b/1457/CH7/EX7.2/7_2.sce
@@ -0,0 +1,17 @@
+clc
+//Initialization of variables
+Dratio=8
+mu=0.0006
+rho=52/32.2
+vm=1.22*10^-5 //lb s /ft^2
+V=45 //fps
+Fm=0.8
+//calculations
+vp=mu/rho
+Vm=vm*V/(Dratio*vp)
+Fratio=rho*V^2 /(1.94*Vm^2 *Dratio^2)
+Fp=Fratio*Fm
+//results
+printf("velocity = %.2f fps",Vm)
+printf("\n Drag force = %d lb",Fp)
+disp('The answer given in textbook is wrong. Please use a calculator')
diff --git a/1457/CH7/EX7.3/7_3.sce b/1457/CH7/EX7.3/7_3.sce
new file mode 100755
index 000000000..772a5acc7
--- /dev/null
+++ b/1457/CH7/EX7.3/7_3.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+L=50
+Fm=0.02 //N
+Vm=1 //m/s
+//calculations
+Fp=L^3 *Fm
+Fp=Fp*0.2248
+Vp=sqrt(L) *Vm
+Vp=Vp*3.28
+Hp=Fp*Vp/550
+//results
+printf("Required horsepower = %.1f hp",Hp)
diff --git a/1457/CH8/EX8.1/8_1.sce b/1457/CH8/EX8.1/8_1.sce
new file mode 100755
index 000000000..e1f441045
--- /dev/null
+++ b/1457/CH8/EX8.1/8_1.sce
@@ -0,0 +1,14 @@
+clc
+//Initialization of variables
+s=0.85
+nu=1.8*10^-5 //m^2 /s
+d=10 //cm
+flow=0.5 //L/s
+//calculations
+Q=flow*10^3
+A=%pi*d^2 /4
+V=Q/A
+V=V/10^2
+R=d*10^-2 *V/nu
+//results
+printf("reynolds number = %d .Hence the flow is laminar",R)
diff --git a/1457/CH8/EX8.2/8_2.sce b/1457/CH8/EX8.2/8_2.sce
new file mode 100755
index 000000000..4cef5a81d
--- /dev/null
+++ b/1457/CH8/EX8.2/8_2.sce
@@ -0,0 +1,19 @@
+clc
+//Initialization of variables
+Vc=12.7 //cm/s
+r=2 //cm
+r2=5 //cm
+R=354
+rho=0.85
+V=6.37 //cm/s
+D=0.1 //m
+//calculations
+k=Vc/r2^2
+f=64/R
+T0=f/4 *rho*V^2 /2
+T02=T0/10
+hr=f*(V*10^-2)^2 /(2*9.81*D)
+//results
+printf("Friction factor = %.2f",f)
+printf("\n Shear stress at the pipe wall = %.3f N/m^2",T02)
+printf("\n Head loss per pipe length = %.5f m/m",hr)
diff --git a/1457/CH8/EX8.3/8_3.sce b/1457/CH8/EX8.3/8_3.sce
new file mode 100755
index 000000000..d584cce01
--- /dev/null
+++ b/1457/CH8/EX8.3/8_3.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+Q=2
+A=0.196 //cm^2
+D=0.5 //ft
+rho=0.9*1.94
+mu=0.0008 //lb s/ft^2
+hl=25
+g=32.2 //ft/sec^2
+L=200 //ft
+r=2 //in
+//calculations
+V=Q/A
+R=D*V*rho/mu
+f=hl*D*2*g/(L*V^2)
+umax=V*(1+1.33*sqrt(f))
+T0=f*rho*V^2 /8
+u2=umax - 5.75* sqrt(T0/rho) *log10(D*12/r)
+//results
+printf("Center line velocity = %.1f fps",umax)
+printf("\n Shear stress = %.2f lb/ft^2",T0)
+printf("\n Velcoity at 2 in from center line = %.2f fps",u2)
diff --git a/1457/CH8/EX8.4/8_4.sce b/1457/CH8/EX8.4/8_4.sce
new file mode 100755
index 000000000..e60f189af
--- /dev/null
+++ b/1457/CH8/EX8.4/8_4.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+f=0.0131
+d=0.5 //m
+//calculations
+V=2.12 //m/s
+R=10^6
+Q=%pi*d^2 /4 *V
+d1=32.8*10^-6 /(V* sqrt(f))
+//results
+printf("flow rate = %.3f m^3/s",Q)
+printf("\n nominal thickness = %.2e m",d1)
diff --git a/1457/CH8/EX8.5/8_5.sce b/1457/CH8/EX8.5/8_5.sce
new file mode 100755
index 000000000..95ae29b24
--- /dev/null
+++ b/1457/CH8/EX8.5/8_5.sce
@@ -0,0 +1,16 @@
+clc
+//Initialization of variables
+dz=260 //ft
+ke=0.5
+f=0.02
+l=5000 //ft
+D=10 //in
+A2=0.545
+//calculations
+V2by2g=dz/(1 + ke + f*l/(D/12))
+V2=V2by2g*2*32.2
+V=sqrt(V2)
+DV=D*V
+Q=%pi/4 *(D/12)^2 *V
+//results
+printf("Flow rate = %.2f cfs",Q)
diff --git a/1457/CH8/EX8.6/8_6.sce b/1457/CH8/EX8.6/8_6.sce
new file mode 100755
index 000000000..7500efe53
--- /dev/null
+++ b/1457/CH8/EX8.6/8_6.sce
@@ -0,0 +1,13 @@
+clc
+//Initialization of variables
+z=260 //ft
+f=0.02
+//calculations
+V2by2g=z/(1.11*256 + 6000*f)
+V2=V2by2g*2*32.2
+V=sqrt(V2)
+Q=0.545*V
+V3=16*V
+H=z-f*6000*V2by2g
+//results
+printf("rate of discharge = %.2f cfs",Q)
diff --git a/1457/CH8/EX8.7/8_7.sce b/1457/CH8/EX8.7/8_7.sce
new file mode 100755
index 000000000..90798148f
--- /dev/null
+++ b/1457/CH8/EX8.7/8_7.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+g=52
+Hp=2
+//calculations
+Q=3.48 //cfs
+V6=3.48/0.196
+P=-20.9 //ft
+P2=P*(g/144)
+//results
+printf("Flow rate = %.2f cfs",Q)
+printf("\n Pressure in the pipe = %.2f psi",P2)
diff --git a/1457/CH8/EX8.8/8_8.sce b/1457/CH8/EX8.8/8_8.sce
new file mode 100755
index 000000000..7a9d32962
--- /dev/null
+++ b/1457/CH8/EX8.8/8_8.sce
@@ -0,0 +1,28 @@
+clc
+//Initialization of variables
+h=10 //m
+g=9.81 //m/s^2
+f1=0.019
+f2=0.021
+f3=0.020
+z1=300 //m
+z2=150 //m
+z3=250 //m
+d1=0.3 //m
+d2=0.2 //m
+d3=0.25 //m
+//calculations
+disp("part(a)")
+Vbyg=h/(f1*z1/d1 +f2*z2/d2 *(d1/d2)^4 + f3*z3/d3 *(d1/d3)^4)
+V1=sqrt(2*g*Vbyg)
+Q=%pi/4 *d1^2 *V1
+printf("\n Flow rate = %.3f m^3/s",Q)
+disp('Part b')
+Le2=z2*f2/f1 *(d1/d2)^5
+Le3=z3*f3/f1 *(d1/d3)^5
+Le1=z1
+Le=Le1+Le2+Le3
+V1byg=h*d1/Le/f1
+V2=sqrt(2*g*V1byg)
+Q1=%pi/4 *d1^2 *V2
+printf("\n Flow rate = %.3f m^3/s",Q1)
diff --git a/1457/CH8/EX8.9/8_9.sce b/1457/CH8/EX8.9/8_9.sce
new file mode 100755
index 000000000..0c59411d0
--- /dev/null
+++ b/1457/CH8/EX8.9/8_9.sce
@@ -0,0 +1,28 @@
+clc
+//Initialization of variables
+d1=6/12 //ft
+d2=4/12 //ft
+d3=8/12 //ft
+l1=2000 //ft
+l2=1600 //ft
+l3=4000 //ft
+f1=0.020
+f2=0.032
+f3=0.024
+El1=200
+El2=50
+El3=120
+g=32.2
+//calculations
+Vc=sqrt(2*g*(El1-El2)/288.9)
+Qc=%pi/4 *d3^2 *Vc
+Va=1.346*Vc
+Qa=%pi/4 *d1^2 *Va
+Vb=(d3^2 *Vc - d1^2 *Va)/d2^2
+Qb=%pi/4 *d2^2 *Vb
+P=62.4/144 *(El1 - El3 - f1*l1/d1 *Va^2 /(2*g))
+//results
+printf("Flowrate at A = %.3f cfs",Qa)
+printf("\nFlowrate at B = %.3f cfs",Qb)
+printf("\nFlowrate at C = %.3f cfs",Qc)
+printf("\nPressure at P = %.2f psi",P)
diff --git a/1457/CH9/EX9.1/9_1.sce b/1457/CH9/EX9.1/9_1.sce
new file mode 100755
index 000000000..94a82213c
--- /dev/null
+++ b/1457/CH9/EX9.1/9_1.sce
@@ -0,0 +1,15 @@
+clc
+//Initialization of variables
+T2=30 //C
+T1=20 //C
+cv=716
+m=15 //kg
+cp=1003
+//calculations
+di=cv*(T2-T1)
+dU=di*m
+dh=cp*(T2-T1)
+dH=dh*m
+//results
+printf("Change in Internal energy = %d N m",dU)
+printf("\n Change in Enthalpy = %d Nm",dH)
diff --git a/1457/CH9/EX9.2/9_2.sce b/1457/CH9/EX9.2/9_2.sce
new file mode 100755
index 000000000..ea9cdc615
--- /dev/null
+++ b/1457/CH9/EX9.2/9_2.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+cv=716
+m=15 //kg
+cp=1003
+T1=20+273 //K
+k=1.4
+ratio=0.4
+//calculations
+T2=(T1)*(1/ratio)^(k-1)
+P1=95 //kN/m^2
+P2=P1*T2/(T1)/ratio
+di=cv*(T2-T1)
+dU=di*m
+dh=cp*(T2-T1)
+dH=dh*m
+//results
+printf("Final temperature = %d K",T2)
+printf("\n Final pressure = %d kN/m^2",P2)
+printf("\n Change in Internal energy = %d N m",dU)
+printf("\n Change in Enthalpy = %d Nm",dH)
+//The answers are a bit different due to rounding off error.
diff --git a/1457/CH9/EX9.3/9_3.sce b/1457/CH9/EX9.3/9_3.sce
new file mode 100755
index 000000000..80b3ac7fe
--- /dev/null
+++ b/1457/CH9/EX9.3/9_3.sce
@@ -0,0 +1,19 @@
+clc
+//Initialization of variables
+k=1.4
+R=1773
+v=600 //fps
+T=660 //K
+P=100 //psia
+cp=6210
+g=32.2
+//calculations
+c=sqrt(k*R*T)
+M=v/c
+rho=k*P*144/c^2
+Ps=P*144 + 0.5*(rho)*v^2 *(1+ 0.25*M^2)
+Ts= (cp/g *T + v^2 /(2*g))*g/cp
+//results
+printf("Stagnation pressure = %d lb/ft^2",Ps)
+printf("\n Stagnation temperature = %d R",Ts)
+disp("Please check the units of the answer.")
diff --git a/1457/CH9/EX9.4/9_4.sce b/1457/CH9/EX9.4/9_4.sce
new file mode 100755
index 000000000..4034c01b5
--- /dev/null
+++ b/1457/CH9/EX9.4/9_4.sce
@@ -0,0 +1,12 @@
+clc
+//Initialization of variables
+g=32.2
+A=0.0218 //ft^2
+P1=25.6 //psia
+T1=540 //K
+k=1.4
+R=1715
+//calculations
+G=g*A*P1*144/sqrt(T1) *sqrt(k/R *(2/(k+1))^((k+1)/(k-1)))
+//results
+printf("Flow rate = %.2f lb/s",G)
diff --git a/1457/CH9/EX9.5/9_5.sce b/1457/CH9/EX9.5/9_5.sce
new file mode 100755
index 000000000..bf210e723
--- /dev/null
+++ b/1457/CH9/EX9.5/9_5.sce
@@ -0,0 +1,31 @@
+clc
+//Initialization of variables
+P1=50 //psia
+T1=540 //K
+g=32.2
+R=1715
+k=1.4
+P3=13.5 //psia
+A2=0.0218 //ft^2
+cp=6000
+//calculations
+Pc=0.528*P1
+V32=R*T1/g *k/(k-1) *(1- (P3/P1)^((k-1)/k))
+V3=sqrt(V32*2*g)
+G3=g*A2*P1*144/sqrt(T1) *sqrt(k/R *(2/(k+1))^((k+1)/(k-1)))
+T3= T1 - V3^2 /(2*cp)
+gam3= g*P3*144/(R*T3)
+gam2= (Pc/P3 *gam3^k )^(1/k)
+V2=G3/gam2/A2
+T2= (V3^2 -V2^2)/(2*cp) + T3
+A3=G3/gam3/V3
+D3= sqrt(4/%pi *A3)
+G2=G3
+//results
+printf("\n velocity at section 3 = %d fps",V3)
+printf("\n Flow rate at section 3 = %.3f lb/s",G3)
+printf("\n temperature at section 3 = %d R",T3)
+printf("\n velocity at section 2 = %d fps",V2)
+printf("\n Flow rate at section 2 = %.3f lb/s",G2)
+printf("\n temperature at section 2 = %d R",T2)
+printf("\n Required Diameter = %.2f in",D3*12)
diff --git a/1457/CH9/EX9.6/9_6.sce b/1457/CH9/EX9.6/9_6.sce
new file mode 100755
index 000000000..eda956d11
--- /dev/null
+++ b/1457/CH9/EX9.6/9_6.sce
@@ -0,0 +1,23 @@
+clc
+//Initialization of variables
+P1=10 //psia
+T1=460+40 //R
+R=1715
+k=1.4
+V1=1400 //fps
+//calculations
+rho1=P1/(R*T1)
+c1=sqrt(k*R*T1)
+M1=V1/c1
+P2= P1 * (2*k*M1^2 - (k-1))/(k+1)
+V2 =V1*((k-1)*M1^2 +2)/((k+1)*M1^2)
+rho2=rho1*V1/V2
+T2=P2/rho2/R
+P22=122.5
+V22=286
+T22=328
+//results
+printf("Pressure at point 2 = %.1f psia and %.1f N/m^2",P2,P22)
+printf("\n Velocity at point 2 = %d fps and %d m/s",V2,V22)
+printf("\n Temperature at point 2 = %d R and %d K",T2,T22)
+disp("Similarly it can be done for SI units")
diff --git a/1457/CH9/EX9.7/9_7.sce b/1457/CH9/EX9.7/9_7.sce
new file mode 100755
index 000000000..d5d159b08
--- /dev/null
+++ b/1457/CH9/EX9.7/9_7.sce
@@ -0,0 +1,29 @@
+clc
+//Initialization of variables
+A=140 //in^2
+P=48 //lb/in^2
+mu=3.78*10^-7
+g=32.2
+G=100 //lb/s
+p=80 //lb/in^2
+T=65+460 //R
+k=1.4
+R=1715
+//calculations
+Rh=A/P /12
+R1=G*4*Rh/ (mu*g*A/144)
+R2=R1
+f=0.0083
+gam1=p*g*144/(R*T)
+V1=G*144/gam1/A
+c=sqrt(k*R*T)
+M1=V1/c
+M2=1/sqrt(k)
+D=4*Rh
+L= ((1-M1^2 /M2^2)/(k*M1^2) - 2*log(M2/M1) )*D/f
+Ln=500 //ft
+P2=sqrt((p*144)^2 - G^2 *R*T/(g^2 *(A/144)^2 *f*Ln/D))
+Pa=12.2
+//results
+printf("Max. length = %d ft",L)
+printf("\n Pressure required = %.1f psia",P2/144 -Pa)
diff --git a/1457/CH9/EX9.8/9_8.sce b/1457/CH9/EX9.8/9_8.sce
new file mode 100755
index 000000000..eb07e9814
--- /dev/null
+++ b/1457/CH9/EX9.8/9_8.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+G=100 //lb/s
+g=32.2
+V2=300 //fps
+V1=250 //fps
+//calculations
+Qh= (V2^2 -V1^2)/(2*g)
+Q=Qh*G
+//results
+printf("Thermal energy added = %d ft lb/s",Q)
diff --git a/1457/CH9/EX9.9/9_9.sce b/1457/CH9/EX9.9/9_9.sce
new file mode 100755
index 000000000..eb97e69f6
--- /dev/null
+++ b/1457/CH9/EX9.9/9_9.sce
@@ -0,0 +1,25 @@
+clc
+//Initialization of variables
+gam1=0.41
+g=32.2
+V1=250 //fps
+R1=8.2*10^6
+f=0.0083
+A=0.97 //ft^2
+G=100 //lb/s
+k=1.4
+P=80 //lb/in^2
+ratio=0.8
+R=1715
+//calculations
+rho1=gam1/g
+X = G^2 /(gam1*A)^2 + 2*k/(k-1) *(P*144/rho1)
+P2=(k-1)/2/k *(X*ratio*rho1 - G^2 /(g^2 *A^2 *ratio*rho1))
+L=563 //ft
+rho2=ratio*rho1
+V2=G/(rho2*g*A)
+T2=P2/(rho2*R)
+//results
+printf("Length = %d ft",L)
+printf("\n velocity = %d fps",V2)
+printf("\n Temperature = %d R",T2)