diff options
Diffstat (limited to '2132')
124 files changed, 2344 insertions, 0 deletions
diff --git a/2132/CH11/EX11.1/Example11_1.sce b/2132/CH11/EX11.1/Example11_1.sce new file mode 100755 index 000000000..c180cc43b --- /dev/null +++ b/2132/CH11/EX11.1/Example11_1.sce @@ -0,0 +1,13 @@ +//Example 11.1
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+staticPHead=5;//meter
+stagnationPHead=6;//meter
+h=stagnationPHead-staticPHead;//meter
+g=9.81;//constant
+Cv=0.98;//Coeff of pilot tube
+V=Cv*sqrt(2*g*h);//m/s
+disp(V,"Velocity of flow in m/sec : ");
diff --git a/2132/CH11/EX11.10/Example11_10.sce b/2132/CH11/EX11.10/Example11_10.sce new file mode 100755 index 000000000..32ada77c9 --- /dev/null +++ b/2132/CH11/EX11.10/Example11_10.sce @@ -0,0 +1,13 @@ +//Example 11.10
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+Cd=0.62;//Coeff of discharge
+H=250/1000;//meter
+L=400/1000;//meter
+g=9.81;//gravity acceleration
+Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s or cumec
+disp(Q,"Discharge in cumec : ");
+
diff --git a/2132/CH11/EX11.11/Example6_11.sce b/2132/CH11/EX11.11/Example6_11.sce new file mode 100755 index 000000000..d0ecad32f --- /dev/null +++ b/2132/CH11/EX11.11/Example6_11.sce @@ -0,0 +1,13 @@ +//Example 6.11
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+g=9.81;//constant
+Cd=0.6;//Coefficient of discharge
+B=1.3;//meter
+H1=6-(1.8+1.5);//meter
+H2=6-1.5;//meter
+Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec
+disp(Q,"Discharge through the orifice in m^3/sec : ");
diff --git a/2132/CH11/EX11.12/Example11_12.sce b/2132/CH11/EX11.12/Example11_12.sce new file mode 100755 index 000000000..f1db1e8c2 --- /dev/null +++ b/2132/CH11/EX11.12/Example11_12.sce @@ -0,0 +1,16 @@ +//Example 11.12
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+Cd=0.60;//Coeff of discharge
+L=36;//meter
+H=1.1;//meter
+A=50;//m^2
+g=9.81;//gravity acceleration
+Qmax=1.705*Cd*L*H^(3/2);//m^3/s
+disp(Qmax,"Maximum Discharge in m^3/sec : ");
+Va=Qmax/A;//m/s(velocity of approach)
+Q=1.705*Cd*L*[(H+Va^2/2/g)^(3/2)-(Va^2/2/g)^(3/2)];//m^3/s
+disp(Q,"New discharge considering velocity of approach in m^3/sec : ");
diff --git a/2132/CH11/EX11.13/Example11_13.sce b/2132/CH11/EX11.13/Example11_13.sce new file mode 100755 index 000000000..991ab5902 --- /dev/null +++ b/2132/CH11/EX11.13/Example11_13.sce @@ -0,0 +1,16 @@ +//Example 11.13
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+w=1.5;//m
+d=0.75;//m
+Cd=0.64;//Coeff of discharge
+QT=45;//cumec
+h=8;//meter
+A=w*d;//m^2
+g=9.81;//gravity acceleration
+Q=Cd*A*sqrt(2*g*h);//m^3/sec
+n=QT/Q;//no. of spillways
+disp(round(n),"No. of spillways : ");
diff --git a/2132/CH11/EX11.14/Example11_14.sce b/2132/CH11/EX11.14/Example11_14.sce new file mode 100755 index 000000000..4614dcb5c --- /dev/null +++ b/2132/CH11/EX11.14/Example11_14.sce @@ -0,0 +1,15 @@ +//Example 11.14
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+B=1;//meter
+b=0.4;//meter
+H=0.57;//meter
+h=0.5;//meter
+A=B*H;//m^2
+g=9.81;//gravity constant
+a=b*h;//m^2
+Q=A*a/sqrt(A^2-a^2)*sqrt(2*g*(H-h));//m^3/sec
+disp(Q,"Discharge in m^3/sec : ");
diff --git a/2132/CH11/EX11.2/Example11_2.sce b/2132/CH11/EX11.2/Example11_2.sce new file mode 100755 index 000000000..ed38e99e4 --- /dev/null +++ b/2132/CH11/EX11.2/Example11_2.sce @@ -0,0 +1,13 @@ +//Example 11.2
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+Cv=0.975;//Coeff of pilot tube
+h=100/1000;//meter
+g=9.81;//constant
+Sm=13.6;//Sp. gravity
+S=0.86;//gravity of turpinre
+V=Cv*sqrt(2*g*h*(Sm/S-1));//m/s
+disp(V,"Velocity in m/sec : ");
diff --git a/2132/CH11/EX11.3/Example11_3.sce b/2132/CH11/EX11.3/Example11_3.sce new file mode 100755 index 000000000..c87c3830b --- /dev/null +++ b/2132/CH11/EX11.3/Example11_3.sce @@ -0,0 +1,31 @@ +//Example 11.3
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+l=2;//meter
+d0=0;//meter
+d1=0.3;//meter
+d2=1.0;//meter
+d3=1.2;//meter
+d4=1.6;//meter
+d5=2.0;//meter
+d6=1.4;//meter
+d7=1.0;//meter
+d8=0.4;//meter
+d9=0.3;//meter
+d10=0.2;//meter
+V0=0;//meter
+V1=0.5;//meter
+V2=0.7;//meter
+V3=0.8;//meter
+V4=1.0;//meter
+V5=1.2;//meter
+V6=0.9;//meter
+V7=0.8;//meter
+V8=0.6;//meter
+V9=0.5;//meter
+V10=0.3;//meter
+Q=l/3*(d0*V0+4*d1*V1+2*d2*V2+4*d3*V3+2*d4*V4+4*d5*V5+2*d6*V6+4*d7*V7+2*d8*V8+4*d9*V9+2*d10*V10+d0*V0);//cum/sec
+disp(Q,"Rate of discharge in cum/sec : ");
diff --git a/2132/CH11/EX11.4/Example11_4.sce b/2132/CH11/EX11.4/Example11_4.sce new file mode 100755 index 000000000..374116600 --- /dev/null +++ b/2132/CH11/EX11.4/Example11_4.sce @@ -0,0 +1,12 @@ +//Example 11.4
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+Cd=0.62;//constant
+H=0.12;//meter
+L=0.3;//meter
+g=9.81;//constant
+Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s
+disp(Q,"Discharge in m^3/sec : ");
diff --git a/2132/CH11/EX11.5/Example11_5.sce b/2132/CH11/EX11.5/Example11_5.sce new file mode 100755 index 000000000..f6ddadae9 --- /dev/null +++ b/2132/CH11/EX11.5/Example11_5.sce @@ -0,0 +1,13 @@ +//Example 11.5
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+Cd=0.66;//constant
+H=0.15;//meter
+L=0.40;//meter
+g=9.81;//constant
+Q=2/3*Cd*sqrt(2*g)*L*H^(3/2);//m^3/s
+disp(Q,"Discharge in m^3/sec : ");
+disp(Q*10^3,"Discharge in litres/sec : ");
diff --git a/2132/CH11/EX11.6/Example11_6.sce b/2132/CH11/EX11.6/Example11_6.sce new file mode 100755 index 000000000..7bf024aa3 --- /dev/null +++ b/2132/CH11/EX11.6/Example11_6.sce @@ -0,0 +1,13 @@ +//Example 11.6
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+Cd=0.62;//constant
+H=200/1000;//meter
+theta=90;//degree
+g=9.81;//constant
+Q=8/15*Cd*sqrt(2*g)*tand(theta/2)*H^(5/2);//m^3/s
+Q=Q*1000*60;//litres/minute
+disp(Q,"Discharge in litres/minute : ");
diff --git a/2132/CH11/EX11.7/Example11_7.sce b/2132/CH11/EX11.7/Example11_7.sce new file mode 100755 index 000000000..805eaf8d2 --- /dev/null +++ b/2132/CH11/EX11.7/Example11_7.sce @@ -0,0 +1,15 @@ +//Example 11.7
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+Cd=0.62;//constant
+Q=250;//litres/sec
+Q=Q*10^-3;//m^3/s
+theta=90;//degree
+g=9.81;//constant
+d=1.3;//meter
+H=(Q/8*15/Cd/sqrt(2*g)/tand(theta/2))^(2/5);//m
+h=d-H;//meter
+disp(h,"Position above the bed in meter : ");
diff --git a/2132/CH11/EX11.8/Example11_8.sce b/2132/CH11/EX11.8/Example11_8.sce new file mode 100755 index 000000000..1c44bb316 --- /dev/null +++ b/2132/CH11/EX11.8/Example11_8.sce @@ -0,0 +1,14 @@ +//Example 11.8
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+Cd=0.65;//constant
+A=220;//m^2
+g=9.81;//constant
+l=30/100;//meter
+H1=16.8/100;//meter
+H2=6.8/100;//meter
+T=A/[2/3*Cd*l*sqrt(2*g)]*integrate('h^(-3/2)','h',H2,H1);//sec
+disp("Time taken is "+string(floor(T/60))+" minute "+string((T/60-floor(T/60))*60)+" sec.")
diff --git a/2132/CH11/EX11.9/Example11_9.sce b/2132/CH11/EX11.9/Example11_9.sce new file mode 100755 index 000000000..6807c5a68 --- /dev/null +++ b/2132/CH11/EX11.9/Example11_9.sce @@ -0,0 +1,17 @@ +//Example 11.9
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+H=0.40;//meter
+L=5;//meter
+disp("(i) End contractions are Suppressed : ");
+Q=1.84*L*H^(3/2);//m^3/s
+disp(Q,"Discharge in m^3/sec : ");
+disp(Q*1000,"Discharge in litres/sec : ");
+disp("(ii) End contractions are Considered : ");
+n=2;
+Q=1.84*(L-0.1*n*H)*H^(3/2);//m^3/s
+disp(Q,"Discharge in m^3/sec : ");
+disp(Q*1000,"Discharge in litres/sec : ");
diff --git a/2132/CH2/EX2.1/Example2_1.sce b/2132/CH2/EX2.1/Example2_1.sce new file mode 100755 index 000000000..52551238f --- /dev/null +++ b/2132/CH2/EX2.1/Example2_1.sce @@ -0,0 +1,17 @@ +//Example 2.1
+clc;
+clear;
+close;
+
+//Given data :
+V=10;//in m^3
+W=80;//in kN
+g=9.81;//gravity accelerat
+w_water=9.81;//specific weight of water
+format('v',6);
+w=W/V;//specific weight in kN/m^3
+disp(w,"Specific weight of liquid in kN/m^3 : ");
+mass_density=w*1000/g;//kg/m^3
+disp(mass_density,"Mass density of liquid in kg/m^3 : ");
+specific_gravity=w/w_water;//unitless
+disp(specific_gravity,"Specific gravity : ");
diff --git a/2132/CH2/EX2.2/Example2_2.sce b/2132/CH2/EX2.2/Example2_2.sce new file mode 100755 index 000000000..3868baa09 --- /dev/null +++ b/2132/CH2/EX2.2/Example2_2.sce @@ -0,0 +1,14 @@ +//Example 2.2
+clc;
+clear;
+close;
+
+//Given data :
+p1=750;//N/cm^2
+p2=1400;//N/cm^2
+dvBYV=-0.150;//in %
+format('v',9);
+dp=p2-p1;//in N/cm^2
+dp=dp*10^4;//in N/m^2
+K=-dp/(dvBYV/100);//N/m^2
+disp(K,"Bulk modulus(N/m^2) : ");
diff --git a/2132/CH2/EX2.3/Example2_3.sce b/2132/CH2/EX2.3/Example2_3.sce new file mode 100755 index 000000000..9588365ab --- /dev/null +++ b/2132/CH2/EX2.3/Example2_3.sce @@ -0,0 +1,16 @@ +//Example 2.3
+clc;
+clear;
+close;
+
+//Given data :
+Kwater=2.10*10^6;//kN/m^2
+Kair=140;//kN/m^2
+dvBYV=-1;//in %
+format('v',9);
+//For Water :
+dp=-Kwater*dvBYV/100;//kN/m^2
+disp(dp,"Increase of pressure in water in kN/m^2");
+//For Air :
+dp=-Kair*dvBYV/100;//kN/m^2
+disp(dp,"Increase of pressure in air in kN/m^2");
diff --git a/2132/CH2/EX2.4/Example2_4.sce b/2132/CH2/EX2.4/Example2_4.sce new file mode 100755 index 000000000..3d692e27e --- /dev/null +++ b/2132/CH2/EX2.4/Example2_4.sce @@ -0,0 +1,15 @@ +//Example 2.4
+clc;
+clear;
+close;
+
+//Given data :
+A=0.2;//m^2
+dy=0.02/100;//m
+du=20/100;//cm/s
+mu=0.001;//Ns/m^2
+tau=mu*du/dy;//in N/m^2
+F=tau*A;//N
+disp(F,"Force required in N : ");
+Power=F*du;//Watts
+disp(Power,"Power required in W : ");
diff --git a/2132/CH2/EX2.5/Example2_5.sce b/2132/CH2/EX2.5/Example2_5.sce new file mode 100755 index 000000000..c790616a5 --- /dev/null +++ b/2132/CH2/EX2.5/Example2_5.sce @@ -0,0 +1,12 @@ +//Example 2.5
+clc;
+clear;
+close;
+//Given data :
+format('e',10);
+mu=0.1;//Ns/m^2
+Sp_gravity_liquid=2.1;
+mass_density_water=1000;//in kg/m^3
+rho=Sp_gravity_liquid*mass_density_water;//kg/m^3
+v=mu/rho;//m^2/sec
+disp(v,"Kinematic viscosity of liquid in m^2/sec : ");
diff --git a/2132/CH2/EX2.6/Example2_6.sce b/2132/CH2/EX2.6/Example2_6.sce new file mode 100755 index 000000000..9cdcc4e4b --- /dev/null +++ b/2132/CH2/EX2.6/Example2_6.sce @@ -0,0 +1,22 @@ +//Example 2.6
+clc;
+clear;
+close;
+//Given data :
+format('v',6);
+d=2;//in mm
+d=d/1000;//in m
+sigma_water=0.073;//N/m
+sigma_mercury=0.510;//N/m
+//Water-glass contact
+w1=9.81;//kN/m^3(specific weight of water)
+w1=w1*10^3;//N/m^3
+theta=0;//in degree
+h=4*sigma_water*cosd(theta)/w1/d;//in mm
+disp(h*1000,"capillary rise for water glass contact in mm : ");
+//Mercury-glass contact
+w2=13.6*9.81;//kN/m^3(specific weight of mercury)
+w2=w2*10^3;//N/m^3
+theta=130;//in degree
+h=4*sigma_mercury*cosd(theta)/w2/d;//in mm
+disp(h*1000,"capillary rise for mercury glass contact in mm: ");
diff --git a/2132/CH2/EX2.7/Example2_7.sce b/2132/CH2/EX2.7/Example2_7.sce new file mode 100755 index 000000000..ae74b6cb6 --- /dev/null +++ b/2132/CH2/EX2.7/Example2_7.sce @@ -0,0 +1,14 @@ +//Example 2.7
+clc;
+clear;
+close;
+
+//Given data :
+format('v',5);
+d=6;//in mm
+d=d/1000;//in m
+sigma=0.0755;//N/m
+//At equillibrium : p*%pi*r^2=sigma*2*%pi*r
+r=d/2;//in m
+p=2*sigma/r;//N/m^2
+disp(p,"Intensity of pressure in N/m^2 or Pascals : ");
diff --git a/2132/CH3/EX3.1/Example3_1.sce b/2132/CH3/EX3.1/Example3_1.sce new file mode 100755 index 000000000..80c192384 --- /dev/null +++ b/2132/CH3/EX3.1/Example3_1.sce @@ -0,0 +1,12 @@ +//Example 3.1
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+D=30*10^-2;//in m
+F=9810;//in N
+A=%pi*D^2/4;//in m^2
+p=F/A;//in N/m^2 or Pa
+p=p/1000;//kPa
+disp(p,"Intensity of pressure at the bottom of container in kPa : ");
diff --git a/2132/CH3/EX3.10/Example3_10.sce b/2132/CH3/EX3.10/Example3_10.sce new file mode 100755 index 000000000..8a8834b73 --- /dev/null +++ b/2132/CH3/EX3.10/Example3_10.sce @@ -0,0 +1,17 @@ +//Example 3.10
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity
+xbar=8;//meter
+D=4;//meter
+A=%pi*D^2/4;//meter^2
+w=g*1000;//in N/m^3
+p=w*A*xbar/10^3;//in kN
+disp(p,"Total pressure in kN : ");
+IG=%pi*D^4/64;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp("Depth of centre of pressure is "+string(h_bar)+" meter.");
+//Answer of total pressure is wrong in the book.
diff --git a/2132/CH3/EX3.11/Example3_11.sce b/2132/CH3/EX3.11/Example3_11.sce new file mode 100755 index 000000000..efce44a8d --- /dev/null +++ b/2132/CH3/EX3.11/Example3_11.sce @@ -0,0 +1,19 @@ +//Example 3.11
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity
+D=4;//meter
+xbar=(10+7)/2;//meter
+A=%pi*D^2/4;//meter^2
+w=g*1000;//in N/m^3
+p=w*A*xbar/10^6;//in MN
+disp(p,"Total pressure in MN : ");
+BC=3;//meter
+AB=4;//mete
+sin_theta=BC/AB;
+IG=%pi*D^4/64;//in m^4
+h_bar=IG/A/xbar*sin_theta^2+xbar;//in meter
+disp("Position of centre of pressure is "+string(h_bar)+" meter.");
diff --git a/2132/CH3/EX3.12/Example3_12.sce b/2132/CH3/EX3.12/Example3_12.sce new file mode 100755 index 000000000..ba345cf0a --- /dev/null +++ b/2132/CH3/EX3.12/Example3_12.sce @@ -0,0 +1,21 @@ +//Example 3.12
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+a=3;//meter
+b=4;//meter(altitude)
+S=1.2;//specific gravity
+theta=30;//degree
+d=2.5;//meter
+g=9.81;//gravity
+AG=b/3;//meter
+xbar=d+AG*sind(theta);//meter
+A=1/2*a*b;//meter^2
+w=S*g*1000;//in N/m^3
+p=w*A*xbar/10^3;//in kN
+disp(p,"Total pressure in kN : ");
+IG=a*b^3/36;//in m^4
+h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter
+disp("Depth of centre of pressure is "+string(h_bar)+" meter.");
diff --git a/2132/CH3/EX3.13/Example3_13.sce b/2132/CH3/EX3.13/Example3_13.sce new file mode 100755 index 000000000..f87d443c6 --- /dev/null +++ b/2132/CH3/EX3.13/Example3_13.sce @@ -0,0 +1,24 @@ +//Example 3.13
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+a=8;//meter
+b=6;//meter
+h=3;//meter
+CD=2;//meter
+theta=30;//degree
+A=(a+b)/2*h;//meter^2
+AB=(a+2*b)/(a+b)*h/3;//meter
+x1bar=AB;//meter
+BC=AB*sind(theta);//meter
+BD=BC+CD;//meter
+xbar=BD;//meter
+g=9.81;//gravity
+w=g*1000;//in N/m^3
+p=w*A*xbar/10^3;//in kN
+disp(p,"Total pressure in kN : ");
+IG=(a^2+b^2+4*a*b)/(a+b)*h^3/36;//in m^4
+h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter
+disp("Depth of centre of pressure is "+string(h_bar)+" meter.");
diff --git a/2132/CH3/EX3.14/Example3_14.sce b/2132/CH3/EX3.14/Example3_14.sce new file mode 100755 index 000000000..200275fed --- /dev/null +++ b/2132/CH3/EX3.14/Example3_14.sce @@ -0,0 +1,28 @@ +//Example 3.14
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+l=2;//meter
+b=2;//meter
+p_i=98.1;//kN/m^3(Pressure intensity)
+w=9.81;//kN/m^2
+BC=1;//meter
+AB=2;//meter
+theta=30;//degree
+B=p_i/w;//m
+BD=BC*sind(theta);//m
+xbar=10+0.5;//meter
+A=l*b;//m^2
+p=w*A*xbar;//kN
+IG=(2*l^3)/12;//in m^4
+h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter
+DI=h_bar-xbar;//m
+FC=DI/sind(theta);//m
+FB=FC+BC;//meter
+P=p*FB/AB;//kN
+disp(P,"Force in kN : ");
+RB=p-P;//kN
+disp(RB,"Reaction at hinge B in kN : ");
+//Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB.
diff --git a/2132/CH3/EX3.15/Example3_15.sce b/2132/CH3/EX3.15/Example3_15.sce new file mode 100755 index 000000000..7bfaa9050 --- /dev/null +++ b/2132/CH3/EX3.15/Example3_15.sce @@ -0,0 +1,18 @@ +//Example 3.15
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+l=4;//meter
+b=2;//meter
+h=1.8;//meter
+w=9.81;//kN/m^2
+xbar=6-2//meter
+A=l*b;//m^2
+P=w*A*xbar;//kN
+IG=(2*l^3)/12;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+// As P acts at h_bar-xbar :
+F=P*((h_bar-xbar)-(b-h))/h;//kN
+disp(F,"Horizontal Force in kN : ");
diff --git a/2132/CH3/EX3.16/Example3_16.sce b/2132/CH3/EX3.16/Example3_16.sce new file mode 100755 index 000000000..7c0600849 --- /dev/null +++ b/2132/CH3/EX3.16/Example3_16.sce @@ -0,0 +1,17 @@ +//Example 3.16
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+b=2;//meter
+d=3;//meter
+h=2;//meter
+w=9.81;//kN/m^2
+xbar=2+3/2;//meter
+A=b*d;//m^2
+P=w*A*xbar;//kN
+disp(P,"Total Pressure in kN : ");
+IG=(b*d^3)/12;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp(h_bar,"Position of centre of pressure in meter : ");
diff --git a/2132/CH3/EX3.17/Example3_17.sce b/2132/CH3/EX3.17/Example3_17.sce new file mode 100755 index 000000000..2c5b68067 --- /dev/null +++ b/2132/CH3/EX3.17/Example3_17.sce @@ -0,0 +1,17 @@ +//Example 3.17
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+b=4;//meter
+d=4;//meter
+h=8;//meter
+w=9.81;//kN/m^2
+xbar=8;//meter
+A=b*d;//m^2
+P=w*A*xbar;//kN
+disp(P,"Total Pressure in kN : ");
+IG=(b*d^3)/12;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp(h_bar,"Position of centre of pressure in meter : ");
diff --git a/2132/CH3/EX3.18/Example3_18.sce b/2132/CH3/EX3.18/Example3_18.sce new file mode 100755 index 000000000..8989e42d2 --- /dev/null +++ b/2132/CH3/EX3.18/Example3_18.sce @@ -0,0 +1,22 @@ +//Example 3.18
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+D=1.5;//meter
+BE=2;//meter
+AD=0.75;//meter
+CE=AD;//meter
+BC=BE-AD;//meter
+FG=CE+BC/2;//meter
+xbar=FG;//meter
+w=9.81;//kN/m^2
+A=%pi*D^2/4;//m^2
+AB=D;//meter
+sin_theta=BC/AB;
+P=w*A*xbar;//kN
+disp(P,"Total Pressure in kN : ");
+IG=(%pi/64*D^4);//in m^4
+h_bar=IG/A/xbar*sin_theta^2+xbar;//in meter
+disp(h_bar,"Position of centre of pressure in meter : ");
diff --git a/2132/CH3/EX3.19/Example3_19.sce b/2132/CH3/EX3.19/Example3_19.sce new file mode 100755 index 000000000..b80995b24 --- /dev/null +++ b/2132/CH3/EX3.19/Example3_19.sce @@ -0,0 +1,17 @@ +//Example 3.19
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+b=3;//meter
+a=3;//meter
+S_oil=0.8;//specific gravity of oil
+w=9.81*S_oil;//kN/m^2
+xbar=1/3*b;//meter
+A=1/2*a*b;//m^2
+P=w*A*xbar;//kN
+disp(P,"Total Pressure in kN : ");
+IG=(a*b^3)/36;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp(h_bar,"Centre of pressure in meter : ");
diff --git a/2132/CH3/EX3.2/Example3_2.sce b/2132/CH3/EX3.2/Example3_2.sce new file mode 100755 index 000000000..e98d9fca2 --- /dev/null +++ b/2132/CH3/EX3.2/Example3_2.sce @@ -0,0 +1,16 @@ +//Example 3.2
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+h=1.5;//in m
+w_w=9.81;//in kN/m^3
+w_g=1.26;//in kN/m^3
+w_m=13.6;//in kN/m^3
+f=h*w_w;//kN/m^2
+disp(f,"Intensity of pressure exerted by water column in kN/m^2 : ");
+f=h*w_w*w_g;//kN/m^2
+disp(f,"Intensity of pressure exerted by glycerine column in kN/m^2 : ");
+f=h*w_w*w_m;//kN/m^2
+disp(f,"Intensity of pressure exerted by mercury column in kN/m^2 : ");
diff --git a/2132/CH3/EX3.20/Example3_20.sce b/2132/CH3/EX3.20/Example3_20.sce new file mode 100755 index 000000000..5f0f4661c --- /dev/null +++ b/2132/CH3/EX3.20/Example3_20.sce @@ -0,0 +1,17 @@ +//Example 3.20
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+a=2;//meter
+b=1;//meter
+d=2;//meter
+w=9.81;//kN/m^2
+xbar=2+a/2;//meter
+A=a*b;//m^2
+P=w*A*xbar;//kN
+disp(P,"Total Pressure in kN : ");
+IG=(b*d^3)/12;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp(h_bar,"Position of centre of pressure in meter : ");
diff --git a/2132/CH3/EX3.21/Example3_21.sce b/2132/CH3/EX3.21/Example3_21.sce new file mode 100755 index 000000000..f2e65e250 --- /dev/null +++ b/2132/CH3/EX3.21/Example3_21.sce @@ -0,0 +1,23 @@ +//Example 3.21
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+r=2;//meter
+l=4;//meter
+A=r*l;//m^2
+xbar=2+r/2;//meter
+w=9.81;//kN/m^2
+PH=w*A*xbar;//kN
+disp(PH,"Horizontal component of resulting Pressure in kN : ");
+PV=2*r*l*w+%pi*r^2/4*l*w;//kN
+disp(PV,"Verticalal component of resulting Pressure in kN : ");
+IG=(l*r^3)/12;//in m^4
+h_bar=IG/A/xbar+xbar;//in meter
+disp(h_bar,"Position of centre of horizontal component of pressure in meter : ");
+x=(2*r+%pi*r^2/4*(4*r/3/%pi))/(2*r+%pi*r^2/4);//meter
+P=sqrt(PH^2+PV^2);//kN
+disp(P,"Resultant pressure in kN : ");
+theta=atand(PV/PH);//degree
+disp(theta,"Direction of resultant pressure in degree : ");
diff --git a/2132/CH3/EX3.22/Example3_22.sce b/2132/CH3/EX3.22/Example3_22.sce new file mode 100755 index 000000000..6ff9e701d --- /dev/null +++ b/2132/CH3/EX3.22/Example3_22.sce @@ -0,0 +1,17 @@ +//Example 3.22
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+A=2*1;//m^2
+xbar=2+2/2;//meter
+w=9.81;//kN/m^2
+PH=w*A*xbar;//kN
+disp(PH,"Horizontal component of resultant Pressure in kN : ");
+PV=w*[2*2+2*2-%pi*2^2/4]*1;//kN
+disp(PV,"Verticalal component of resultant Pressure in kN : ");
+P=sqrt(PH^2+PV^2);//kN
+disp(P,"Resultant pressure in kN : ");
+theta=atand(PV/PH);//degree
+disp(theta,"Direction of resultant pressure in degree : ");
diff --git a/2132/CH3/EX3.23/Example3_23.sce b/2132/CH3/EX3.23/Example3_23.sce new file mode 100755 index 000000000..813d08ca2 --- /dev/null +++ b/2132/CH3/EX3.23/Example3_23.sce @@ -0,0 +1,16 @@ +//Example 3.23
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+ABbar=sqrt(2)*4;//meter
+xbar=ABbar/2;//meter
+A=ABbar*1;//m^2
+w=9.81;//kN/m^2
+PH=w*A*xbar;//kN
+disp(PH,"Horizontal component of resultant Pressure in kN : ");
+hbar=2/3*ABbar;//meter
+disp("Position of horizontal component of pressure is "+string(hbar)+" meter below free water surface.");
+PV=w*[%pi*4^2/4-4*4/2]*1;//kN
+disp(PV,"Verticalal component of resultant Pressure in kN : ");
diff --git a/2132/CH3/EX3.24/Example3_24.sce b/2132/CH3/EX3.24/Example3_24.sce new file mode 100755 index 000000000..cf68adf5d --- /dev/null +++ b/2132/CH3/EX3.24/Example3_24.sce @@ -0,0 +1,20 @@ +//Example 3.24
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+h=24;//meter
+b=15;//meter
+g=9.81;//gravity constant
+Wm=2000*g;//N/m^3
+W=b*h/2*Wm;//N
+w=9.81;//kN/m^2
+PH=w*20^2/2*1000;//N
+y=PH/W*20/3+5;//meter
+e=y-b/2;//meter
+MaxStress=W/b*(1+6*e/b);//N/m^2
+disp(MaxStress,"Maximum stress in N/m^2 : ");
+MinStress=W/b*(1-6*e/b);//N/m^2
+disp(MinStress,"Minimum stress in N/m^2 : ");
+//Answer in the book is slightly differ due to limited accuracy used in the book as compared to SCILAB.
diff --git a/2132/CH3/EX3.3/Example3_3.sce b/2132/CH3/EX3.3/Example3_3.sce new file mode 100755 index 000000000..717c71455 --- /dev/null +++ b/2132/CH3/EX3.3/Example3_3.sce @@ -0,0 +1,16 @@ +//Example 3.3
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+p=2;//in kN/m^2
+w_w=9.81;//in kN/m^3
+w_alcohol=w_w*0.789;//in kN/m^3
+w_m=13.6;//in kN/m^3
+H=p/w_alcohol;//in m
+disp(H,"Depth of alcohol in meter : ");
+P_head_w=p/w_w;//m
+disp(P_head_w,"Pressure head in terms of water in meter : ");
+P_head_m=p/w_w/w_m;//m
+disp(P_head_m,"Pressure head in terms of mercury in meter : ");
diff --git a/2132/CH3/EX3.4/Example3_4.sce b/2132/CH3/EX3.4/Example3_4.sce new file mode 100755 index 000000000..171334f9e --- /dev/null +++ b/2132/CH3/EX3.4/Example3_4.sce @@ -0,0 +1,15 @@ +//Example 3.4
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+Hwater=6;//m(Pressure head of water)
+S_oil=0.70;//(specific gravity of oil)
+H_oil=Hwater/S_oil;//in m(Pressure head in terms of oil)
+disp(H_oil,"Pressure head of water in terms of oil in meter : ");
+S_oil=0.825;//(specific gravity of oil)
+S_mercury=13.6;//(specific gravity of mercury)
+Hmercury=70/100;//m(Pressure head of mercury)
+H_oil=S_mercury/S_oil*Hmercury;//in m(Pressure head in terms of oil)
+disp(H_oil,"Pressure head of mercury in terms of oil in meter : ");
diff --git a/2132/CH3/EX3.5/Example3_5.sce b/2132/CH3/EX3.5/Example3_5.sce new file mode 100755 index 000000000..bb519227e --- /dev/null +++ b/2132/CH3/EX3.5/Example3_5.sce @@ -0,0 +1,19 @@ +//Example 3.5
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+w=9.81;//in kN/m^3
+l=3;//in m
+b=2;//in m
+h=1;//in m
+f_bottom=w*h;//in kN/m^2(Pressure intensity at bottom)
+p_bottom=f_bottom*l*b;//kN
+disp(p_bottom,"Total pressure on the bottom in kN : ");
+f_long_vertical=f_bottom/2;//kN
+p_long_vertical=f_long_vertical*l*h;//kN
+disp(p_long_vertical,"Total pressure on long vertical wall in kN : ");
+f_short_vertical=f_bottom/2;//kN
+p_short_vertical=f_short_vertical*b*h;//kN
+disp(p_short_vertical,"Total pressure on short vertical wall in kN : ");
diff --git a/2132/CH3/EX3.6/Example3_6.sce b/2132/CH3/EX3.6/Example3_6.sce new file mode 100755 index 000000000..b44b12aaa --- /dev/null +++ b/2132/CH3/EX3.6/Example3_6.sce @@ -0,0 +1,29 @@ +//Example 3.6
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+p_water=1000;//in kg/m^3
+p_liquid=800;//in kg/m^3
+g=9.81;//gravity constant
+h1=1.5;//m
+px1=p_liquid*g*h1/1000;//kN/m^2
+disp(px1,"Pressure at a point 1.5 meter below free surface in kN/m^2 : ");
+h2=2;//m
+px2=p_liquid*g*h2/1000;//kN/m^2
+disp(px2,"Pressure at a point 2 meter below free surface in kN/m^2 : ");
+h31=2;//m(for liquid)
+h32=0.5;//m(for water)
+px1=p_liquid*g*h31/1000;//kN/m^2
+px2=p_water*g*h32/1000;//kN/m^2
+px3=(px1+px2);//kN/m^2
+disp(px3,"Pressure at a point 2.5 meter below free surface in kN/m^2 : ");
+h=2;//meter(water level)
+b=8;//meter(width of wall)
+p_bottom=px1+(p_water*g*h)/1000;//kN/m^2
+p_avg1=(px1+0)/2;//kN/m^2(top 2m liquid layer)
+p_avg2=(px1+p_bottom)/2;//kN/m^2(top 2m water layer)
+F_per_meter=p_avg1*h*1+p_avg2*h*1;//kN
+Fwall=F_per_meter*b;//kN
+disp(Fwall,"Force on the wall in kN : ");
diff --git a/2132/CH3/EX3.7/Example3_7.sce b/2132/CH3/EX3.7/Example3_7.sce new file mode 100755 index 000000000..e8f5102e4 --- /dev/null +++ b/2132/CH3/EX3.7/Example3_7.sce @@ -0,0 +1,17 @@ +//Example 3.7
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+b=3;//in meter
+h=3;//in meter
+S_oil=0.8;//(specific gravity of oil)
+A=1/2*h*b;//in m^2
+x_bar=2/3*3;//in meter
+SW_water=9.81*1000;//in N/m^3
+SW_oil=SW_water*S_oil;//in N/m^3
+F_surface=SW_oil*A*x_bar;//in kN
+IG=b*h^3/36;//in m^3
+h_bar=IG/A/x_bar+x_bar;//in meter
+disp(h_bar,"Force shall act at depth of centre of pressure. This depth in meter is : ");
diff --git a/2132/CH3/EX3.8/Example3_8.sce b/2132/CH3/EX3.8/Example3_8.sce new file mode 100755 index 000000000..6a06bd9d0 --- /dev/null +++ b/2132/CH3/EX3.8/Example3_8.sce @@ -0,0 +1,19 @@ +//Example 3.8
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+l=3;//in meter
+b=2;//in meter
+p=2*10^6;//in Pa
+g=9.81;//gravity constant
+w=g*1000;//in N/m^3
+h=p/w;//in meter
+xbar=h-1.5;//in meter
+A=l*b;//in m^2
+p_gate=w*A*xbar/10^6;//in MN
+disp(p_gate,"Total pressure on the gate in MN : ");
+IG=b*l^3/12;//in m^3
+h_bar=IG/A/xbar+xbar;//in meter
+disp("Position of centre of pressure is "+string(h_bar-xbar)+" meter below the centroid of gate.");
diff --git a/2132/CH3/EX3.9/Example3_9.sce b/2132/CH3/EX3.9/Example3_9.sce new file mode 100755 index 000000000..0d268015f --- /dev/null +++ b/2132/CH3/EX3.9/Example3_9.sce @@ -0,0 +1,27 @@ +//Example 3.9
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity
+GH=4;//meter
+IJ=4;//meter
+IC=2;//meter
+GC=3;//meter
+AG=(10-4)/2;//meter
+BH=(10-4)/2;//meter
+EI=AG*IC/GC;//meter
+JF=AG*IC/GC;//meter
+EF=EI+IJ+JF;//meter
+A=(8+4)/2*2;//in m^2
+a=4;//meter
+b=8;//meter
+d=2;//meter
+xbar=(2*a+b)/(a+b)*d/3;//in meter
+w=g*1000;//in N/m^3
+p_gate=w*A*xbar/10^3;//in kN
+disp(p_gate,"Total pressure in kN : ");
+IG=(a^2+4*a*b+b^2)/(a+b)*d^3/36;//in m^3
+h_bar=IG/A/xbar+xbar;//in meter
+disp("Depth of centre of pressure is "+string(h_bar)+" meter.");
diff --git a/2132/CH4/EX4.1/Example4_1.sce b/2132/CH4/EX4.1/Example4_1.sce new file mode 100755 index 000000000..53ca8df7e --- /dev/null +++ b/2132/CH4/EX4.1/Example4_1.sce @@ -0,0 +1,39 @@ +//Example 4.1
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+p=5;//kg/cm^2
+disp("Gauge units : ");
+disp(p/10^-4,"Pressure Intensity in kg/m^2 : ");
+g=9.81;//gravity constant
+disp(p*g/10^-4,"Pressure Intensity in N/m^2 : ");
+disp(p*g/10^-4,"Pressure Intensity in Pa : ");
+disp(p*g/10^3/10^-4,"Pressure Intensity in kPa : ");
+disp(p*g/10^6/10^-4,"Pressure Intensity in MPa : ");
+disp("In terms of head : ");
+w=1000;//kg/m^3 for water
+h=p*10^4/w;//meter of water
+disp("Pressure is : "+string(h)+" meter of water.");
+w=13.6*1000;//kg/m^3 for mercury
+h=p*10^4/w;//meter of mercury
+disp("Pressure is : "+string(h)+" meter of mercury.");
+disp("Absolute units : ");
+Patm=760;//mm of mercury
+Patm=760*13.6/1000;//m of water
+Patm=Patm*1000;//kg/m^2
+Pabs=p+Patm;//kg/m^2
+disp(Pabs,"Absolute pressure in kg/m^2 : ");
+disp(Pabs*10^4,"Absolute pressure in kg/cm^2 : ");
+disp(Pabs*10^4*g,"Absolute pressure in N/m^2 : ");
+disp(Pabs*10^4*g,"Absolute pressure in Pa : ");
+disp(Pabs*10^5/10^3,"Absolute pressure in kPa : ");
+disp(Pabs*10^5/10^6,"Absolute pressure in MPa : ");
+h1=p*10^4/w;//meter of water
+h2=p*10^4/1000;//meter of water
+h=h1+h2;////meter of water
+disp(h,"Absolute pressure head in terms of water in meter : ");
+w=13.6*1000;//kg/m^3 for mercury
+h=p*10^4/w+760/1000;//meter of mercury
+disp(h,"Absolute pressure head in terms of mercury in meter : ");
diff --git a/2132/CH4/EX4.10/Example4_10.sce b/2132/CH4/EX4.10/Example4_10.sce new file mode 100755 index 000000000..f446480df --- /dev/null +++ b/2132/CH4/EX4.10/Example4_10.sce @@ -0,0 +1,15 @@ +//Example 4.10
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=0.81;//sp. gravity
+S2=1.2;//sp. gravity
+S3=13.6;//sp. gravity
+h3=200/1000;//m
+h2=50/1000;//m
+h1=100/1000;//m
+w=1000;//kg/m^3
+pAB=((h1*(S2-S1)+h2*(S3-S1)-h3*S1))*w;//Kg/m^2
+disp(pAB,"Pressure difference between the two vessel in kg/m^2: ");
diff --git a/2132/CH4/EX4.11/Example4_11.sce b/2132/CH4/EX4.11/Example4_11.sce new file mode 100755 index 000000000..d23a100ef --- /dev/null +++ b/2132/CH4/EX4.11/Example4_11.sce @@ -0,0 +1,15 @@ +//Example 4.11
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=1.9;//sp. gravity
+S2=1.2;//sp. gravity
+S3=0.79;//sp. gravity
+h2=545/1000;//m
+h1=750/1000;//m
+h3=h1-h2;//m
+w=1000*9.81;//N/m^3
+pAB=(h1*S1-h2*S2-h3*S3)*w;//N/m^2
+disp(pAB,"Pressure difference between the two vessel in N/m^2: ");
diff --git a/2132/CH4/EX4.12/Example4_12.sce b/2132/CH4/EX4.12/Example4_12.sce new file mode 100755 index 000000000..f30c4c897 --- /dev/null +++ b/2132/CH4/EX4.12/Example4_12.sce @@ -0,0 +1,13 @@ +//Example 4.12
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=0.005;//sp. gravity
+S2=0.79;//sp. gravity
+S3=13.6;//sp. gravity
+h=30/1000;//m
+w=1000*9.81;//N/m^3
+pAB=h*(S3-S2)*w;//N/m^2
+disp(pAB,"Pressure difference between the two vessel in N/m^2: ");
diff --git a/2132/CH4/EX4.13/Example4_13.sce b/2132/CH4/EX4.13/Example4_13.sce new file mode 100755 index 000000000..f08abde70 --- /dev/null +++ b/2132/CH4/EX4.13/Example4_13.sce @@ -0,0 +1,15 @@ +//Example 4.13
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+S1=1.25;//sp. gravity
+S2=1.05;//sp. gravity
+S3=0.79;//sp. gravity
+h=30/1000;//m
+w=1000;//kg/m^3
+//pA=pB
+h=(0.15*w*S2-S1*w*0.15)/(S3*w-w*S2);//m
+h=h*1000;//mm
+disp(h,"Reading of manometer in mm : ");
diff --git a/2132/CH4/EX4.14/Example4_14.sce b/2132/CH4/EX4.14/Example4_14.sce new file mode 100755 index 000000000..7da622fc3 --- /dev/null +++ b/2132/CH4/EX4.14/Example4_14.sce @@ -0,0 +1,13 @@ +//Example 4.14
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=1;//sp. gravity of water
+S2=1;//sp. gravity of water
+S3=0.9;//sp. gravity of oil
+h3=100/1000;//meter
+w=9.81*1000;//N/m^3
+pAB=w*(h3-h3*S3);//N/m^2
+disp(pAB,"Difference of pressure in N/m^2 or Pa : ");
diff --git a/2132/CH4/EX4.2/Example4_2.sce b/2132/CH4/EX4.2/Example4_2.sce new file mode 100755 index 000000000..56b3bd276 --- /dev/null +++ b/2132/CH4/EX4.2/Example4_2.sce @@ -0,0 +1,15 @@ +//Example 4.2
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+w=1000;//kg/m^3
+h=50/1000;//m
+p=w*h;//kg/m^2
+p=p*9.81;//N/m^2 or Pa
+disp(p,"Pressure Intensity in Pa : ");
+alfa=30;//degree
+h=50;//mm
+l=h/sind(alfa);//mm
+disp(l,"Reading in tube in mm : ");
diff --git a/2132/CH4/EX4.3/Example4_3.sce b/2132/CH4/EX4.3/Example4_3.sce new file mode 100755 index 000000000..190ea9ef4 --- /dev/null +++ b/2132/CH4/EX4.3/Example4_3.sce @@ -0,0 +1,19 @@ +//Example 4.3
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+S1=13.6;//sp. gravity of mercury
+S2=1;//sp. gravity of water
+H1=5;//m
+H2=S1*H1/S2;//m
+disp("(i) Pressure is "+string(H2)+" meter of water.");
+S2=0.79;//sp. gravity of kerpsene
+H1=5;//m
+H2=S1*H1/S2;//m
+disp("(ii) Pressure is "+string(H2)+" meter of kerosene.");
+S2=1.7;//sp. gravity of fluid
+H1=5;//m
+H2=S1*H1/S2;//m
+disp("(iii) Pressure is "+string(H2)+" meter of fluid.");
diff --git a/2132/CH4/EX4.4/Example4_4.sce b/2132/CH4/EX4.4/Example4_4.sce new file mode 100755 index 000000000..53bcd6391 --- /dev/null +++ b/2132/CH4/EX4.4/Example4_4.sce @@ -0,0 +1,15 @@ +//Example 4.4
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+S=0.9;//sp. gravity of liquid
+Sm=13.6;//sp. gravity of mercury
+S1=Sm/S;//sp. gravity
+w=S*9.81;//kN/m^3
+h2=500/1000;//m
+h1=300/1000;//m
+a_BY_A=1/80;//ratio of area
+pa=w*(h2*[(S1-1)*a_BY_A+S1]-h1);//kPa
+disp(pa,"Pressure in the pipe in kPa: ");
diff --git a/2132/CH4/EX4.5/Example4_5.sce b/2132/CH4/EX4.5/Example4_5.sce new file mode 100755 index 000000000..4a089d38f --- /dev/null +++ b/2132/CH4/EX4.5/Example4_5.sce @@ -0,0 +1,14 @@ +//Example 4.5
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+S1=1.2;//sp. gravity
+S2=13.6;//sp. gravity
+w=1000;//kg/m^3
+h2=50/1000;//m
+h1=200/1000;//m
+pa=w*(S2*h1-S1*h2);//kg/m^2
+disp(pa,"Pressure in the pipe in kg/m^2: ");
+disp(pa*9.81,"Pressure in the pipe in Pa: ");
diff --git a/2132/CH4/EX4.6/Example4_6.sce b/2132/CH4/EX4.6/Example4_6.sce new file mode 100755 index 000000000..9119d134b --- /dev/null +++ b/2132/CH4/EX4.6/Example4_6.sce @@ -0,0 +1,13 @@ +//Example 4.6
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+S=1;//sp. gravity
+w=1000;//kg/m^3
+h2=50/1000;//m
+h1=200/1000;//m
+pa=w*S*(h1-h2);//kg/m^2
+disp(pa,"Pressure in the pipe in kg/m^2: ");
+disp(pa*9.81,"Pressure in the pipe in Pa: ");
diff --git a/2132/CH4/EX4.7/Example4_7.sce b/2132/CH4/EX4.7/Example4_7.sce new file mode 100755 index 000000000..39654a300 --- /dev/null +++ b/2132/CH4/EX4.7/Example4_7.sce @@ -0,0 +1,15 @@ +//Example 4.7
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=0.005;//sp. gravity
+S2=1;//sp. gravity
+Patm=1.014*10^5;//Pa
+h=50/1000;//m
+w=1000;//kg/m^3
+pa=-w*S2*h;//kg/m^2
+Pabs=pa*9.81+Patm;//
+disp(abs(pa*9.81),"Pressure intensity of gas in Pa(Vaccum): ");
+disp(Pabs,"Absolute pressure in the pipe in Pa: ");
diff --git a/2132/CH4/EX4.8/Example4_8.sce b/2132/CH4/EX4.8/Example4_8.sce new file mode 100755 index 000000000..e8b228561 --- /dev/null +++ b/2132/CH4/EX4.8/Example4_8.sce @@ -0,0 +1,14 @@ +//Example 4.8
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=0.9;//sp. gravity
+S2=13.6;//sp. gravity
+h1=12.5/100;//m
+P_AB=h1*(S2-S1);//meter of water
+disp("Difference in pressure head at the points A & B is "+string(P_AB)+" meter of water");
+w=1000;//kg/m^3
+P_diff=P_AB*w*9.81;//Pa or Nm^2
+disp(P_diff,"In terms A pressure entirely, the difference of pressure in N/m^2 : ");
diff --git a/2132/CH4/EX4.9/Example4_9.sce b/2132/CH4/EX4.9/Example4_9.sce new file mode 100755 index 000000000..d625fef31 --- /dev/null +++ b/2132/CH4/EX4.9/Example4_9.sce @@ -0,0 +1,14 @@ +//Example 4.9
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+S1=1;//sp. gravity
+S2=13.6;//sp. gravity
+h1=120/1000;//m
+P_diff=h1*(S2-S1);//meter of water
+disp("Difference in pressure head is "+string(P_diff)+" meter of water");
+w=1000;//kg/m^3
+P_diff=P_diff*w*9.81;//Pa or Nm^2
+disp(P_diff,"In terms of pressure intensity, the difference of pressure in N/m^2 : ");
diff --git a/2132/CH5/EX5.1/Example5_1.sce b/2132/CH5/EX5.1/Example5_1.sce new file mode 100755 index 000000000..6f54cda80 --- /dev/null +++ b/2132/CH5/EX5.1/Example5_1.sce @@ -0,0 +1,15 @@ +//Example 5.1
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+m=2000;//litre or kg(1litre water =1kg)
+M=m/60;//kg/s
+p=4.5;//bar
+p=p*10^5;//N/m^2
+g=9.81;//constant
+w=g*1000;//N/m^3
+H=p/w;//m
+Power=M*g*H/1000;//kW
+disp(Power,"Power required in kW : ");
diff --git a/2132/CH5/EX5.10/Example5_10.sce b/2132/CH5/EX5.10/Example5_10.sce new file mode 100755 index 000000000..4c6794a9e --- /dev/null +++ b/2132/CH5/EX5.10/Example5_10.sce @@ -0,0 +1,24 @@ +//Example 5.10
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+Q=200*10^-3;//m^3/s
+D1=250/1000;//meter
+D2=200/1000;//meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1=Q/A1;//m/s
+v2=Q/A2;//m/s
+Z1=2;//meter
+Z2=8;//meter
+g=9.81;//constant
+w=1000;//kg/m^3
+p1=w*(Z1-v1^2/2/g);//kg/m^2
+p2=v1^2/2/g*w+p1+Z2*w-v2^2/2/g*w-4*w;//kg/m^2(by Bernolli's theorem)
+p1=p1*g;//N/m^2
+p2=p2*g;//N/m^2
+disp(p1,"Pressure intensity at point P in N/m^2 : ");
+disp(p2,"Pressure intensity at point Q in N/m^2 : ");
+//Answer in the book is not accurate.
diff --git a/2132/CH5/EX5.11/Example5_11.sce b/2132/CH5/EX5.11/Example5_11.sce new file mode 100755 index 000000000..8622c839d --- /dev/null +++ b/2132/CH5/EX5.11/Example5_11.sce @@ -0,0 +1,25 @@ +//Example 5.11
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+slope=1/10;
+Z1=0;//meter
+Z2=40*slope;//meter
+p1=1.5/10^-4;//kg/cm^2
+v2=4.1;//m/s
+D1=600/1000;//meter
+D2=300/1000;//meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1=A2*v2/A1;//m/s
+g=9.81;//constant
+w=1000;//kg/m^3
+p2=(p1/w+v1^2/2/g+Z1-v2^2/2/g-Z2)*w;//kg/m^2(by Bernolli's theorem)
+p2=p2*10^-4;//kg/cm^2
+Q1=A1*v1;//m^3/sec
+Q1=Q1*1000;//litre/sec
+disp(p2,"Pressure intensity at point Q in kg/cm^2 : ");
+disp(Q1,"Discharge of pipe in litres/sec : ");
+//Answer in the book is not accurate. calculation for A1 & A2 is wrong.
diff --git a/2132/CH5/EX5.12/Example5_12.sce b/2132/CH5/EX5.12/Example5_12.sce new file mode 100755 index 000000000..9f568efa7 --- /dev/null +++ b/2132/CH5/EX5.12/Example5_12.sce @@ -0,0 +1,20 @@ +//Example 5.12
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D1=180/1000;//meter
+D2=90/1000;//meter
+g=9.81;//gravity constant
+S=0.8;//sp. gravity of oil
+Sm=13.6;//sp. gravity of mercury
+x=300/1000;//meter
+K=0.97;//coeff. of meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=A1*A2*sqrt(2*g)/sqrt(A1^2-A2^2)
+h=x*(Sm/S-1);//meter of oil
+Q=K*C*sqrt(h);//m^3/sec
+Q=Q*1000;//litre/sec
+disp(Q,"Discharge of oil in litres/sec : ");
diff --git a/2132/CH5/EX5.13/Example5_13.sce b/2132/CH5/EX5.13/Example5_13.sce new file mode 100755 index 000000000..8ac1f8e46 --- /dev/null +++ b/2132/CH5/EX5.13/Example5_13.sce @@ -0,0 +1,18 @@ +//Example 5.13
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+D1byD2=1/0.7;
+D1=320/1000;//meter
+D2=320*0.7/1000;//meter
+g=9.81;//gravity constant
+Q=30.6/60;//m^3/sec
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=A1*sqrt(2*g)/sqrt((D1byD2)^4-1);
+h=1.2;//meter of water
+K=Q/C/sqrt(h);//Coeff. of meter
+disp(K,"Coefficient of meter : ");
+//Answer in the book is wrong.
diff --git a/2132/CH5/EX5.14/Example5_14.sce b/2132/CH5/EX5.14/Example5_14.sce new file mode 100755 index 000000000..ea38e24a0 --- /dev/null +++ b/2132/CH5/EX5.14/Example5_14.sce @@ -0,0 +1,19 @@ +//Example 5.14
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+D1=320/1000;//meter
+D2=224/1000;//meter
+g=9.81;//gravity constant
+Q=25000/1000/60;//m^3/sec
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=0.4984;//venturi constant
+K=0.92;//Coeff. of meter
+h=(Q/K/C)^2
+S=1;//sp. gravity
+Sm=13.6;//sp. gravity
+x=h/(Sm/S-1);//meter of water
+disp(x*1000,"Deflection in manometer(mm) : ");
diff --git a/2132/CH5/EX5.15/Example5_15.sce b/2132/CH5/EX5.15/Example5_15.sce new file mode 100755 index 000000000..53068d13e --- /dev/null +++ b/2132/CH5/EX5.15/Example5_15.sce @@ -0,0 +1,23 @@ +//Example 5.15
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D1=120/1000;//meter
+D2=120*0.55/1000;//meter
+g=9.81;//gravity constant
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+Q=30/1000;//m^3/sec
+C=A1*sqrt(2*g)/sqrt((D1/D2)^4-1);//venturi constant
+K=0.94;//Coeff. of meter
+h=(Q/K/C)^2;//meter
+Z1=0;//meter
+Z2=0.3;//meter
+S=0.79;//sp. gravity
+w=1000*S;//kg/m^3
+delta_p=(h+Z1-Z2)*w;//kg/m^2
+delta_p=delta_p*g;//N/m^2
+disp(delta_p,"Pressure difference in N/m^2 : ");
+//answer is wrong in the book.
diff --git a/2132/CH5/EX5.16/Example5_16.sce b/2132/CH5/EX5.16/Example5_16.sce new file mode 100755 index 000000000..fdca4d8c8 --- /dev/null +++ b/2132/CH5/EX5.16/Example5_16.sce @@ -0,0 +1,19 @@ +//Example 5.16
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D1=160/1000;//meter
+D2=60/1000;//meter
+g=9.81;//gravity constant
+S=0.8;//sp. gravity
+Sm=13.6;//sp. gravity of mercury
+Q=0.05;//m^3/sec
+K=0.98;//Coeff. of meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=A1*sqrt(2*g)/sqrt((A1/A2)^2-1);//venturi constant
+h=(Q/K/C)^2;//meter
+x=h/(Sm/S-1);//meter
+disp(x,"Deflection in meter : ");
diff --git a/2132/CH5/EX5.17/Example5_17.sce b/2132/CH5/EX5.17/Example5_17.sce new file mode 100755 index 000000000..295f7f743 --- /dev/null +++ b/2132/CH5/EX5.17/Example5_17.sce @@ -0,0 +1,20 @@ +//Example 5.17
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+D1=200/1000;//meter
+D2=100/1000;//meter
+x=220/1000;//meter
+g=9.81;//gravity constant
+K=0.98;//Coeff. of meter
+S=1;//sp. gravity
+Sm=13.6;//sp. gravity of mercury
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=A1*sqrt(2*g)/sqrt((A1/A2)^2-1);//venturi constant
+h=x*(Sm/S-1);//meter
+Q=K*C*sqrt(h);//m^3/sec
+Q=Q*1000;//litres/sec
+disp(Q,"Rate of flow in litres/sec : ");
diff --git a/2132/CH5/EX5.18/Example5_18.sce b/2132/CH5/EX5.18/Example5_18.sce new file mode 100755 index 000000000..cc64aecb0 --- /dev/null +++ b/2132/CH5/EX5.18/Example5_18.sce @@ -0,0 +1,21 @@ +//Example 5.18
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+D1=40/100;//meter
+D2=15/100;//meter
+x=25/100;//meter
+g=9.81;//gravity constant
+K=0.98;//Coeff. of meter
+S=1;//sp. gravity
+Sm=13.6;//sp. gravity of mercury
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+C=A1*A2*sqrt(2*g)/sqrt(A1^2-A2^2);//venturi constant
+h=x*(Sm/S-1);//meter
+Q=K*C*sqrt(h);//m^3/sec
+Q=Q*1000*3600;//litres/hour
+disp(Q,"Flow of water in litres/hour : ");
+//Answer in the book is wrong.
diff --git a/2132/CH5/EX5.19/Example5_19.sce b/2132/CH5/EX5.19/Example5_19.sce new file mode 100755 index 000000000..f03adb9b0 --- /dev/null +++ b/2132/CH5/EX5.19/Example5_19.sce @@ -0,0 +1,22 @@ +//Example 5.19
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+D1=15/100;//meter
+D2=7.5/100;//meter
+g=9.81;//gravity constant
+p1=4*g*10^4;//N/m^2
+p2=1.5*g*10^4;//kg/cm^2
+w=9.81;//kg/m^2
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1BYv2=A2/A1;
+//v1^2/2/g+p1/w=v2^2/2/g+p2/w
+//v1^2=v2^2-50*g
+v2=sqrt(50*g/(1-v1BYv2^2));//m/s
+Q=A2*v2;//m^3/sec
+Q=Q*1000;//litres/sec
+disp(Q,"Flow of water in litres/sec : ");
+//Answer is wrong in the book.
diff --git a/2132/CH5/EX5.2/Example5_2.sce b/2132/CH5/EX5.2/Example5_2.sce new file mode 100755 index 000000000..9f2a095d5 --- /dev/null +++ b/2132/CH5/EX5.2/Example5_2.sce @@ -0,0 +1,16 @@ +//Example 5.2
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+v1=400*10^-3;//m/s
+d1=300/1000;//meter
+d2=450/1000;//meter
+A1=%pi*d1^2/4;//m^2
+A2=%pi*d2^2/4;//m^2
+Q1=A1*v1*1000;//litres/sec(1m^3=1000litres)
+disp(Q1,"Discharge of pipe in litres/sec : ");
+v2=(Q1/1000)/A2;//m/s(Q1=Q2)
+disp(v2,"Mean velocity of flow in m/s : ");
+//Answer of discharge is wrong in the book.
diff --git a/2132/CH5/EX5.20/Example5_20.sce b/2132/CH5/EX5.20/Example5_20.sce new file mode 100755 index 000000000..08905eba9 --- /dev/null +++ b/2132/CH5/EX5.20/Example5_20.sce @@ -0,0 +1,17 @@ +//Example 5.20
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D1=20/100;//meter
+D2=15/100;//meter
+A1=%pi/4*D1^2;//m^2
+A2=%pi/4*D2^2;//m^2
+v1=2;//m/s
+v2=A1*v1/A2;//m/s
+disp(v2,"Velocity at another section in m/s : ");
+FlowRate=A1*v1;//m^3/s
+FlowRate=FlowRate*1000;//litres/s
+disp(FlowRate,"Flow Rate in litres/sec : ");
+//Answer of velocity in the book is not accurate.
diff --git a/2132/CH5/EX5.21/Example5_21.sce b/2132/CH5/EX5.21/Example5_21.sce new file mode 100755 index 000000000..c072f4065 --- /dev/null +++ b/2132/CH5/EX5.21/Example5_21.sce @@ -0,0 +1,21 @@ +//Example 5.21
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+rd=0.75;//relative density
+D=12.5/100;//meter
+p=1;//bar
+p=p*1.02;//kg/cm^2
+p=p*9.81*10^4/1000;//kPa
+g=9.81;//gravity constant
+w=g*rd;//N/m^3
+pH=p/w;//meter
+Z=2.5;//meter
+Et=20;//Nm
+v=sqrt((Et-p/w-Z)*2*g);//m/s
+A=%pi/4*D^2;//m^2
+Q=A*v;//m^3/sec
+Q=A*v*1000;//litres/sec
+disp(Q,"Flow Rate of oil in litres/sec : ");
diff --git a/2132/CH5/EX5.22/Example5_22.sce b/2132/CH5/EX5.22/Example5_22.sce new file mode 100755 index 000000000..3b6206f3e --- /dev/null +++ b/2132/CH5/EX5.22/Example5_22.sce @@ -0,0 +1,21 @@ +//Example 5.22
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+rd=0.75;//relative density
+d1=0.3;//meter
+d2=0.1;//meter
+Q=50/1000;//m^3/sec
+A1=%pi/4*d1^2;//m^2
+A2=%pi/4*d2^2;//m^2
+v1=Q/A1;//m/s
+v2=A1*v1/A2;//m/s
+p1=200;//kN/m^2
+p2=100;//kN/m^2
+w=9.81;//kN/m^3
+g=9.81;//gravity constant
+Z1=0;//meter
+Z2=Z1+p1/w+v1^2/2/g-p2/w-v2^2/2/g;//meter
+disp(Z2,"Z in meter : ");
diff --git a/2132/CH5/EX5.23/Example5_23.sce b/2132/CH5/EX5.23/Example5_23.sce new file mode 100755 index 000000000..7231682df --- /dev/null +++ b/2132/CH5/EX5.23/Example5_23.sce @@ -0,0 +1,22 @@ +//Example 5.23
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D1=300/1000;//meter
+D2=150/1000;//meter
+Q=50/1000;//m^3/sec
+A1=%pi/4*D1^2;//m^2
+A2=%pi/4*D2^2;//m^2
+delpBYw=3;//p1/w-p2/w=3;//m
+v1BYv2=A2/A1;
+Z1=0;//meter
+Z2=0;//meter
+g=9.81;//gravity constant
+//HeadLoss=1/8*v^2/2/g
+//Z1+p1/w+v1^2/2/g=Z2+p2/w+v2^2/2/g+HeadLoss
+v2=sqrt((Z1-Z2+delpBYw)/(1/2/g-v1BYv2^2/2/g+1/8/2/g));//m/s
+Q=A2*v2;//m^3/s
+Q=Q*1000;//litres/sec
+disp(Q,"Discharge in pipe in litres/sec : ");
diff --git a/2132/CH5/EX5.3/Example5_3.sce b/2132/CH5/EX5.3/Example5_3.sce new file mode 100755 index 000000000..78755320f --- /dev/null +++ b/2132/CH5/EX5.3/Example5_3.sce @@ -0,0 +1,19 @@ +//Example 5.3
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+PotentialHead=2;//meter of fluid
+disp("Potential Head is "+string(PotentialHead)+" meter of fluid.");
+v=5;//m/s
+g=9.81;//constant
+VelocityHead=v^2/2/g;//m
+disp("Velocity Head is "+string(VelocityHead)+" meter of fluid.");
+w=g*1000;//N/m^3
+S=0.8;//sp. gravity of fluid
+p=200;//kPa
+PressureHead=p*10^3/w/S;//meter of fluid
+disp("Pressure Head is "+string(PressureHead)+" meter of fluid.");
+TotalHead=PotentialHead+VelocityHead+PressureHead;//meter of fluid
+disp("Total Head is "+string(TotalHead)+" meter of fluid.");
diff --git a/2132/CH5/EX5.4/Example5_4.sce b/2132/CH5/EX5.4/Example5_4.sce new file mode 100755 index 000000000..d51f20fe6 --- /dev/null +++ b/2132/CH5/EX5.4/Example5_4.sce @@ -0,0 +1,15 @@ +//Example 5.4
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+p=0.8/10^-4;//kg/m^2
+datumH=4;//meter
+v=0.8;//m/s
+g=9.81;//constant
+VelocityH=v^2/2/g;//m
+w=1000;//kg/m^3
+PressureH=p/w;//meter of fluid
+TotalH=datumH+VelocityH+PressureH;//meter of fluid
+disp("Total Energy is "+string(TotalH)+" meter.");
diff --git a/2132/CH5/EX5.5/Example5_5.sce b/2132/CH5/EX5.5/Example5_5.sce new file mode 100755 index 000000000..d11fbc687 --- /dev/null +++ b/2132/CH5/EX5.5/Example5_5.sce @@ -0,0 +1,29 @@ +//Example 5.5
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+D1=800/1000;//m^2
+D2=600/1000;//m^2
+p1=100;//kPa
+p2=40;//kPa
+v1=4000*10^-3;//m/s
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+Z1=4;//meter
+Z2=7;//meter
+rho=1;//sp. gravity
+g=9.81;//constant
+PHeadA=p1/rho/g;//meter of fluid
+PHeadB=p2/rho/g;//meter of fluid
+v2=A1*v1/A2;//m/s
+VHeadA=v1^2/2/g;//meter
+VHeadB=v2^2/2/g;//meter
+E1=Z1+PHeadA+VHeadA;//meter
+E2=Z2+PHeadB+VHeadB;//meter
+if E1>E2 then
+ disp("Total Energy at A("+string(E1)+" meter) is greater than total energy at B("+string(E2)+" meter). Flow of water is from A to B.");
+else
+ disp("Total Energy at B("+string(E2)+" meter) is greater than total energy at A("+string(E1)+" meter). Flow of water is from B to A.");
+end
diff --git a/2132/CH5/EX5.6/Example5_6.sce b/2132/CH5/EX5.6/Example5_6.sce new file mode 100755 index 000000000..45144cb25 --- /dev/null +++ b/2132/CH5/EX5.6/Example5_6.sce @@ -0,0 +1,29 @@ +//Example 5.6
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+D1=1.25;//meter
+D2=0.625;//meter
+slope=100;
+L=300;///meter
+g=9.81;//constant
+Z12=L/slope;//meter
+Q=100;//litres/sec
+Q=Q*10^-3;//m^3/sec
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1=Q/A1;//m/s
+v2=Q/A2;//m/s
+p1=100;//kN/m^2
+//Higher End :
+w=9.81;//kN/m^3
+Phead=p1/w;//meter
+Vhead=v1^2/2/g;//meter
+//Lower End :
+w=9.81;//kN/m^3
+//Phead=p1/w;//meter
+Vhead=v2^2/2/g;//meter
+p2=(Z12+v1^2/2/g+p1/w-v2^2/2/g)*w;//kN/m^2(By Bernoulli's theorem)
+disp(p2,"Pressure at the lower end in kN per m^2 : ");
diff --git a/2132/CH5/EX5.7/Example5_7.sce b/2132/CH5/EX5.7/Example5_7.sce new file mode 100755 index 000000000..5682da970 --- /dev/null +++ b/2132/CH5/EX5.7/Example5_7.sce @@ -0,0 +1,34 @@ +//Example 5.7
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+Z1=0;//meter
+Z2=5;//meter
+Q=300*10^-3;//m/s
+D1=0.3;//meter
+D2=0.6;//meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1=Q/A1;//m/s
+v2=Q/A2;//m/s
+p1=100;//kN/m^2
+p2=600;//kN/m^2
+g=9.81;//constant
+Vhead11=v1^2/2/g;//meter
+Vhead22=v2^2/2/g;//meter
+Phead11=p1/g;//meter
+Phead22=p2/g;//meter
+E1_11=Z1+Vhead11+Phead11;//meter
+E2_22=Z2+Vhead22+Phead22;//meter
+if E1_11>E2_22 then
+ disp("Energy at section 1-1("+string(E1_11)+" meter) is greater than energy at section 2-2("+string(E2_22)+" meter). Flow of water is from section 1-1 to 2-2.");
+ HeadLoss=E1_11-E2_22;//meter
+ disp(HeadLoss,"Head Loss in meter : ");
+else
+ disp("Energy at section 2-2("+string(E2_22)+" meter) is greater than energy at section 1-1("+string(E1_11)+" meter). Flow of water is from section 2-2 to 1-1.");
+ HeadLoss=E2_22-E1_11;//meter
+ disp(HeadLoss,"Head Loss in meter : ");
+end
+
diff --git a/2132/CH5/EX5.8/Example5_8.sce b/2132/CH5/EX5.8/Example5_8.sce new file mode 100755 index 000000000..fa7cdc082 --- /dev/null +++ b/2132/CH5/EX5.8/Example5_8.sce @@ -0,0 +1,23 @@ +//Example 5.8
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+D=400/1000;//meter
+v1=20;//m/s
+Z1=28;//meter
+Z2=31;//meter
+p1=4/10^-4;//kg/m^2
+p2=3/10^-4;//kg/m^2
+g=9.81;//constant
+w=1000;//kg/m^3
+Vhead1=v1^2/2/g;//meter
+Phead1=p1/w;//meter
+Vhead2=Vhead1;//meter
+Phead2=p2/w;//meter
+E1=Z1+Vhead1+Phead1;//meter
+E2=Z2+Vhead2+Phead2;//meter
+HL=E1-E2;//meter
+disp(HL,"Loss of head between P & Q in meter : ");
+
diff --git a/2132/CH5/EX5.9/Example5_9.sce b/2132/CH5/EX5.9/Example5_9.sce new file mode 100755 index 000000000..82595d8b8 --- /dev/null +++ b/2132/CH5/EX5.9/Example5_9.sce @@ -0,0 +1,35 @@ +//Example 5.9
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+Z1=0;//meter
+Z2=4;//meter
+rho=0.8;//sp. gravity
+
+Q=250*10^-3;//m/s or cumec
+D1=250/1000;//meter
+D2=500/1000;//meter
+A1=%pi*D1^2/4;//m^2
+A2=%pi*D2^2/4;//m^2
+v1=Q/A1;//m/s
+v2=Q/A2;//m/s
+p1=0.1*10^3;//N/m^2
+p2=0.06*10^3;//N/m^2
+g=9.81;//constant
+Vhead1=v1^2/2/g;//meter
+Phead1=p1/rho/g;//meter
+Vhead2=v2^2/2/g;//meter
+Phead2=p2/rho/g;//meter
+H1=Z1+Vhead1+Phead1;//meter
+H2=Z2+Vhead2+Phead2;//meter
+if H1>H2 then
+ disp("Total head at A("+string(H1)+" meter) is greater than total head at B("+string(H2)+" meter). Flow will take place from A-B.");
+ HeadLoss=H1-H2;//meter
+ disp(HeadLoss,"Head Loss in meter : ");
+else
+ disp("Total head at B("+string(H2)+" meter) is greater than total head at A("+string(H1)+" meter). Flow will take place from B-A.");
+ HeadLoss=H2-H1;//meter
+ disp(HeadLoss,"Head Loss in meter : ");end
+
diff --git a/2132/CH6/EX6.1/Example6_1.sce b/2132/CH6/EX6.1/Example6_1.sce new file mode 100755 index 000000000..5fb3f21eb --- /dev/null +++ b/2132/CH6/EX6.1/Example6_1.sce @@ -0,0 +1,21 @@ +//Example 6.1
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+Do=25;//mm
+Dc=20;//mm
+H=85;//mm
+x=335;//mm
+y=350;//mm
+a=%pi/4*Do^2;//m^2
+ac=%pi/4*Dc^2;//m^2
+Cc=ac/a;
+disp(Cc,"Coefficient of contraction : ");
+Cv=sqrt(x^2/4/H/y);
+disp(Cv,"Coefficient of velocity : ");
+Cd=Cc*Cv;
+disp(Cd,"Coefficient of discharge : ");
+Cr=(1/Cv^2-1);
+disp(Cr,"Coefficient of resistance : ");
diff --git a/2132/CH6/EX6.10/Example6_10.sce b/2132/CH6/EX6.10/Example6_10.sce new file mode 100755 index 000000000..012daa33f --- /dev/null +++ b/2132/CH6/EX6.10/Example6_10.sce @@ -0,0 +1,20 @@ +//Example 6.10
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+H1=4-1;//meter
+H2=4;//meter
+Cv1=0.9;//Coefficient of velocity
+Cv2=0.9;//Coefficient of velocity
+//Cv1=Cv2 & x1=x2 at meeting point
+//x1/sqrt(4*H1*y1)=x2/sqrt(4*H2*y2)
+y1BYy2=H2/H1;
+//y1=1+y2;
+y2=1/(y1BYy2-1);//meter
+y1=y1BYy2*y2;//meter
+x1=Cv1*sqrt(4*H1*y1);//meter
+disp(y1,x1,"Meeting point horizontal & vertical co-ordinates are(x1 & y1 in meter) : ");
+//Answer in the book are not accurate.
diff --git a/2132/CH6/EX6.11/Example6_11.sce b/2132/CH6/EX6.11/Example6_11.sce new file mode 100755 index 000000000..d0ecad32f --- /dev/null +++ b/2132/CH6/EX6.11/Example6_11.sce @@ -0,0 +1,13 @@ +//Example 6.11
+clc;
+clear;
+close;
+format('v',8);
+//Given data :
+g=9.81;//constant
+Cd=0.6;//Coefficient of discharge
+B=1.3;//meter
+H1=6-(1.8+1.5);//meter
+H2=6-1.5;//meter
+Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec
+disp(Q,"Discharge through the orifice in m^3/sec : ");
diff --git a/2132/CH6/EX6.12/Example6_12.sce b/2132/CH6/EX6.12/Example6_12.sce new file mode 100755 index 000000000..efe23ff5a --- /dev/null +++ b/2132/CH6/EX6.12/Example6_12.sce @@ -0,0 +1,13 @@ +//Example 6.12
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//constant
+Cd=0.62;//Coefficient of discharge
+B=2;//meter
+H1=3;//meter
+H2=3+1.5;//meter
+Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec
+disp(Q,"Discharge through the orifice in cumec : ");
diff --git a/2132/CH6/EX6.13/Example6_13.sce b/2132/CH6/EX6.13/Example6_13.sce new file mode 100755 index 000000000..093bb75da --- /dev/null +++ b/2132/CH6/EX6.13/Example6_13.sce @@ -0,0 +1,20 @@ +//Example 6.13
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//constant
+Cd=0.6;//Coefficient of discharge
+B=1.6;//meter
+H1=1500/1000;//meter
+H2=(1500+1250)/1000;//meter
+Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec
+disp(Q,"Discharge through the opening in cumec : ");
+//For small opening
+H=1.5+1.25/2;//meter
+D=1.25;//meter
+Qdash=Cd*(B*D)*sqrt(2*g*H);//cumec
+Error=(Qdash-Q)/Q*100;//%
+disp(Error,"% of error : ");
+//Answer is wrong in the book.
diff --git a/2132/CH6/EX6.14/Example6_14.sce b/2132/CH6/EX6.14/Example6_14.sce new file mode 100755 index 000000000..e981abb36 --- /dev/null +++ b/2132/CH6/EX6.14/Example6_14.sce @@ -0,0 +1,17 @@ +//Example 6.14
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//constant
+Cd=0.6;//Coefficient of discharge
+B=1600/1000;//meter
+D=1250/1000;//meter
+ao=1.6*1.25;//m^2
+H1=2+1.25/2;//meter
+H2=0.8+1.25/2;//meter
+H=H1-H2;//meter
+Q=Cd*ao*sqrt(2*g*H);//m^3/sec or Cumec
+disp(Q,"Discharge in Cumec : ");
+//Answer is wrong in the book.
diff --git a/2132/CH6/EX6.15/Example6_15.sce b/2132/CH6/EX6.15/Example6_15.sce new file mode 100755 index 000000000..9ec67f6c6 --- /dev/null +++ b/2132/CH6/EX6.15/Example6_15.sce @@ -0,0 +1,16 @@ +//Example 6.15
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+Cd=0.6;//Coefficient of discharge
+B=1600/1000;//meter
+D=1250/1000;//meter
+ao=1.6*1.25;//m^2
+H1=2+1.25;//meter
+H2=2;//meter
+H=H1-0.8;//meter
+Q=2/3*Cd*B*sqrt(2*g)*(H^(3/2)-H2^(3/2))+Cd*B*(H1-H)*sqrt(2*g*H);//m^3/sec or Cumec
+disp(Q,"Discharge through the orifice in Cumec : ");
diff --git a/2132/CH6/EX6.16/Example6_16.sce b/2132/CH6/EX6.16/Example6_16.sce new file mode 100755 index 000000000..af97916b5 --- /dev/null +++ b/2132/CH6/EX6.16/Example6_16.sce @@ -0,0 +1,20 @@ +//Example 6.16
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//constant
+d=4;//meter
+d0=0.5;//meter
+H1=5;//meter
+H2=2;//meter
+Cd=0.6;//Coefficient of discharge
+ao=%pi/4*d0^2;//m^2
+A=%pi/4*d^2;//m^2
+t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))
+disp(t,"Time taken to fall from 5m to 2m(in seconds) : ");
+//For emptying H2=0;
+H2=0;//meter
+t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))
+disp(t,"Time taken for completely emptying(in seconds) : ");
diff --git a/2132/CH6/EX6.17/Example6_17.sce b/2132/CH6/EX6.17/Example6_17.sce new file mode 100755 index 000000000..62168aa98 --- /dev/null +++ b/2132/CH6/EX6.17/Example6_17.sce @@ -0,0 +1,15 @@ +//Example 6.17
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+d=1.2;//meter
+do=50/1000;//meter
+H=3;//meter
+Cd=0.6;//Coefficient of discharge
+ao=%pi/4*do^2;//m^2
+A=%pi/4*d^2;//m^2
+t=2*A*sqrt(H)/Cd/ao/sqrt(2*g);//sec
+disp("Time taken for emptying the tank is "+string(floor(t/60))+" minute "+string((t/60-floor(t/60))*60)+" seconds.");
diff --git a/2132/CH6/EX6.18/Example6_18.sce b/2132/CH6/EX6.18/Example6_18.sce new file mode 100755 index 000000000..71c9b9383 --- /dev/null +++ b/2132/CH6/EX6.18/Example6_18.sce @@ -0,0 +1,14 @@ +//Example 6.18
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+g=9.81;//constant
+A=3.2;//m^2
+a=10*10^-4;//m^2
+H1=5;//meter
+H2=2.5;//meter
+Cd=0.6;//Coefficient of discharge
+t=2*A*(sqrt(H1)-sqrt(H2))/Cd/a/sqrt(2*g);//sec
+disp("Time taken is "+string(floor(t/60))+" minute "+string((t/60-floor(t/60))*60)+" seconds.");
diff --git a/2132/CH6/EX6.19/Example6_19.sce b/2132/CH6/EX6.19/Example6_19.sce new file mode 100755 index 000000000..a5998f2f7 --- /dev/null +++ b/2132/CH6/EX6.19/Example6_19.sce @@ -0,0 +1,13 @@ +//Example 6.19
+clc;
+clear;
+close;
+format('v',4);
+//Given data :
+g=9.81;//constant
+A=3.2;//m^2
+a=10*10^-4;//m^2
+H=5;//meter
+Cd=0.6;//Coefficient of discharge
+t=2*A*sqrt(H)/Cd/a/sqrt(2*g);//sec
+disp("Time taken is "+string(floor(t/3600))+" hour "+string(floor((t/3600-floor(t/3600))*60))+" minute "+string(((t/3600-floor(t/3600))*60-floor((t/3600-floor(t/3600))*60))*60)+" seconds.");
diff --git a/2132/CH6/EX6.2/Example6_2.sce b/2132/CH6/EX6.2/Example6_2.sce new file mode 100755 index 000000000..0c9500dcd --- /dev/null +++ b/2132/CH6/EX6.2/Example6_2.sce @@ -0,0 +1,26 @@ +//Example 6.2
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+Do=0.125;//m
+H=10.5;//mm
+Q=6500;//litres/minute
+Q=Q/60/1000;//cumec
+x=6;//m
+y=1;//m
+g=9.81;//gravity constant
+a=%pi/4*Do^2;//m^2
+Qth=a*sqrt(2*g*H);//cumec
+Cd=Q/Qth;//
+disp(Cd,"Coefficient of discharge : ");
+Cv=sqrt(x^2/4/H/y);
+format('v',6);
+disp(Cv,"Coefficient of velocity : ");
+Cc=Cd/Cv;
+format('v',5);
+disp(Cc,"Coefficient of contraction : ");
+Cr=(1/Cv^2-1);
+format('v',6);
+disp(Cr,"Coefficient of resistance : ");
diff --git a/2132/CH6/EX6.3/Example6_3.sce b/2132/CH6/EX6.3/Example6_3.sce new file mode 100755 index 000000000..6eded94b9 --- /dev/null +++ b/2132/CH6/EX6.3/Example6_3.sce @@ -0,0 +1,11 @@ +//Example 6.3
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+h=102;//mm
+H=105;//mm
+Cv=sqrt(2*g*h)/sqrt(2*g*H);
+disp(Cv,"Coefficient of velocity : ");
diff --git a/2132/CH6/EX6.4/Example6_4.sce b/2132/CH6/EX6.4/Example6_4.sce new file mode 100755 index 000000000..27afe5070 --- /dev/null +++ b/2132/CH6/EX6.4/Example6_4.sce @@ -0,0 +1,14 @@ +//Example 6.4
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+Q=180/62;//litres/sec
+Q=Q/1000;//cumec
+Dc=25/1000;//m
+H=1.9;//m
+ac=%pi/4*Dc^2;//m^2
+g=9.81;//constant
+Cv=Q/sqrt(2*g*H)/ac;
+disp(Cv,"Coefficient of velocity : ");
diff --git a/2132/CH6/EX6.5/Example6_5.sce b/2132/CH6/EX6.5/Example6_5.sce new file mode 100755 index 000000000..e21313667 --- /dev/null +++ b/2132/CH6/EX6.5/Example6_5.sce @@ -0,0 +1,23 @@ +//Example 6.5
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//constant
+d=30/1000;//meter
+wl=2;//kgm
+w1=148.6/60;//kg/sec
+y=1.65;//meter
+H=1.3;//meter
+Cv=wl/w1/y*sqrt(g)/sqrt(2*H);
+disp(Cv,"Coefficient of velocity : ");
+Q=w1/1000;//Cumec
+a=%pi/4*d^2;//meter^2
+Qth=a*sqrt(2*g*H);//Cumec
+Cd=Q/Qth;//coeff. of discharge
+disp(Cd,"Coefficient of discharge : ");
+Cc=Cd/Cv;//coeff. of contraction
+format('v',5);
+disp(Cc,"Coefficient of contraction : ");
+//Answer in the book are not accurate.
diff --git a/2132/CH6/EX6.6/Example6_6.sce b/2132/CH6/EX6.6/Example6_6.sce new file mode 100755 index 000000000..afd0d3997 --- /dev/null +++ b/2132/CH6/EX6.6/Example6_6.sce @@ -0,0 +1,20 @@ +//Example 6.6
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//constant
+a=9*10^-4;//m^2
+H=3;//meter
+x=2.5;//meter
+y=54/100;//meter
+Qactual=250*10^-3/60;//Cumec
+Qth=a*sqrt(2*g*H);//Cumec
+Cd=Qactual/Qth;//coeff. of discharge
+disp(Cd,"Coefficient of discharge : ");
+Cv=sqrt(x^2)/sqrt(4*H*y);//velocity
+disp(Cv,"Coefficient of velocity : ");
+Cc=Cd/Cv;//coeff. of contraction
+disp(Cc,"Coefficient of contraction : ");
+//Answer in the book are not accurate.
diff --git a/2132/CH6/EX6.7/Example6_7.sce b/2132/CH6/EX6.7/Example6_7.sce new file mode 100755 index 000000000..80beae9a5 --- /dev/null +++ b/2132/CH6/EX6.7/Example6_7.sce @@ -0,0 +1,15 @@ +//Example 6.7
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+d=20/1000;//meter
+a=%pi/4*d^2;//m^2
+H=1;//meter
+Qactual=0.85*10^-3;//m^3/sec
+v=sqrt(2*g*H);//m/sec
+Qth=a*v;//Cumec
+Cd=Qactual/Qth;//coeff. of discharge
+disp(Cd,"Coefficient of discharge : ");
diff --git a/2132/CH6/EX6.8/Example6_8.sce b/2132/CH6/EX6.8/Example6_8.sce new file mode 100755 index 000000000..a7136abcc --- /dev/null +++ b/2132/CH6/EX6.8/Example6_8.sce @@ -0,0 +1,27 @@ +//Example 6.8
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//constant
+d=1.5;//meter
+h=1;//meter
+Volume=%pi/4*d^2*h;//m^3
+time=25;//sec
+Qactual=Volume/time;//Cumec
+H=10;//meter
+do=10/100;//meter
+x=4.3;//meter
+y=0.5;//meter
+ao=%pi/4*do^2;//m^2
+Qth=ao*sqrt(2*g*H);//cumec
+Cd=Qactual/Qth;//Coeff. ofdischarge
+disp(Cd,"Coefficient of discharge : ");
+format('v',5);
+Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity
+disp(Cv,"Coefficient of velocity : ");
+Cc=Cd/Cv;//coeff. of contraction
+disp(Cc,"Coefficient of contraction : ");
+Cr_dash=(1/Cv^2-1);//coeff. of resistance
+disp(Cr_dash,"Coefficient. of Resistance");
diff --git a/2132/CH6/EX6.9/Example6_9.sce b/2132/CH6/EX6.9/Example6_9.sce new file mode 100755 index 000000000..6c74d36ca --- /dev/null +++ b/2132/CH6/EX6.9/Example6_9.sce @@ -0,0 +1,25 @@ +//Example 6.9
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//constant
+do=2.5/100;//meter
+H=75/100;//meter
+x=30/100;//meter
+y=3.2/100;//meter
+Qactual=1.186*10^-3;//Cumec
+ao=%pi/4*do^2;//m^2
+Qth=ao*sqrt(2*g*H);//cumec
+Cd=Qactual/Qth;//Coeff. ofdischarge
+disp(Cd,"Coefficient of discharge : ");
+Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity
+format('v',7);
+disp(Cv,"Coefficient of velocity : ");
+format('v',6);
+Cc=Cd/Cv;//coeff. of contraction
+disp(Cc,"Coefficient of contraction : ");
+Cr_dash=(1/Cv^2-1);//coeff. of resistance
+disp(Cr_dash,"Coefficient. of Resistance");
+//Answers in the book are not accurate.
diff --git a/2132/CH7/EX7.1/Example7_1.sce b/2132/CH7/EX7.1/Example7_1.sce new file mode 100755 index 000000000..176403e56 --- /dev/null +++ b/2132/CH7/EX7.1/Example7_1.sce @@ -0,0 +1,28 @@ +//Example 7.1
+clc;
+clear;
+close;
+format('v',9);
+disp("Part(i)");
+disp("Absolute unit of viscosity(in C.G.S) is Poise.");
+disp("Poise=1 dyne-sec/cm^2");
+disp("Gravitational unit of viscosity is 1 gm-sec/cm^2.");
+disp("On equating we get, 1 gm = 981 dyne");
+//Let x=1kg-sec/m^2
+x=1*10^3/10^4;//g-sec/cm^2
+x=x*981;//dyne-sec/cm^2 or Poise(Putting 1gm=981 dyne)
+disp("1 kg-sec/m^2 = "+string(x)+" Poise");
+one_Poise=1/x;//kg-sec/m^2
+one_Poise=1/x*9.81;//N-sec/m^2 or Pa-sec(as 1Pa=1N/m^2)
+disp("1 Poise = "+string(one_Poise)+" N-sec/m^2 or Pa-sec");
+disp("Part(ii)");
+disp("Kinematic viscosity = viscosity/specific_gravity");
+disp("Kinematic viscosity C.G.S unit is cm^2/sec. 1cm^2/sec=1stoke");
+disp("Kinematic viscosity M.K.S unit is m^2/sec");
+//let x=1;//m^2/sec
+x=1;//m^2/sec
+x=x*10^4;//cm^2/sec or stokes
+disp("1 m^2/sec = "+string(x)+" cm^2/sec or stoke");
+one_stoke=1/x;//m^2/sec
+disp("1 stoke = "+string(one_stoke)+" m^2/sec");
+disp("1 stoke = 100 centi-stokes");
diff --git a/2132/CH7/EX7.10/Example7_10.sce b/2132/CH7/EX7.10/Example7_10.sce new file mode 100755 index 000000000..c6824a027 --- /dev/null +++ b/2132/CH7/EX7.10/Example7_10.sce @@ -0,0 +1,16 @@ +////Example 7.10
+clc;
+clear;
+close;
+format('v',5);
+//Given data :
+g=9.81;//gravity constanty
+L=3*1000;//meter
+hf=20;//meter
+Q=1;//m^3/sec
+f=0.02;//coeff. of friction
+//v=sqrt(hf*2*g/4/f/L/D);//it is v^2*D
+D2v=Q/(%pi/4);//it is D^2*v
+D=(Q/(%pi/4)/sqrt(hf*2*g/4/f/L))^(2/5);//meter
+D=D*1000;//mm
+disp(D,"Diameter of pipe in mm : ");
diff --git a/2132/CH7/EX7.11.a/Example7_11.sce b/2132/CH7/EX7.11.a/Example7_11.sce new file mode 100755 index 000000000..69128a9d9 --- /dev/null +++ b/2132/CH7/EX7.11.a/Example7_11.sce @@ -0,0 +1,21 @@ +////Example 7.11 at page 246
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//gravity constanty
+D1=400/1000;//meter
+D2=300/1000;//meter
+D3=200/1000;//meter
+v1=3;//m/s
+v2=2;//m/s
+A1=%pi/4*D1^2;//m^2
+A2=%pi/4*D2^2;//m^2
+A3=%pi/4*D3^2;//m^2
+Q1=A1*v1;//cumec
+disp(Q1,"Discharge in pipe 1 in cumec : ");
+Q2=A2*v2;//cumec
+Q3=Q1-Q2;//cumec
+v3=Q3/A3;//m/s
+disp(v3,"Velocity of water in 200mm pipe in m/s : ");
diff --git a/2132/CH7/EX7.11/Example7_11_page_238.sce b/2132/CH7/EX7.11/Example7_11_page_238.sce new file mode 100755 index 000000000..d80fe000f --- /dev/null +++ b/2132/CH7/EX7.11/Example7_11_page_238.sce @@ -0,0 +1,47 @@ +////Example 7.11
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//gravity constanty
+D1=100/1000;//meter
+D2=200/1000;//meter
+PQ=100;//meter
+QR=100;//meter
+slope=1/100;//upward slope
+Q=0.02;//cumec
+p1=2;//kg/cm^2(Pressure in 100 mm dia pipe)
+f=0.02;//unitless
+Q_P=100/100;//meter(Point Q hight respect to point P)
+Q_R=200/100;//meter(Point Q hight respect to point R)
+v1=Q/(%pi/4*D1^2);//m/sec
+v2=Q/(%pi/4*D2^2);//m/sec
+hf1=4*f*PQ*v1^2/(2*g*D1);//meter
+hf2=4*f*QR*v2^2/(2*g*D2);//meter
+hse=(v1-v2)^2/2/g;//meter(loss due to sudden enlargement)
+//Section PQ
+Z1P=0;//meter(Datum Head)
+H1P=v1^2/2/g;//meter(velocity Head)
+p1BYw=p1*10^4/1000;//meter(Pressure Head at P)
+Z1Q=1;//meter(Datum Head)
+H1Q=v2^2/2/g;//meter(velocity Head)
+//Applying bernaullis theorem
+p2BYw=Z1P+p1BYw+H1P-Z1Q-H1Q-hf1;//meter(Pressure Head at Q)
+disp(p1BYw,"Pressure Head at point P(m)")
+disp(H1P,"Velocity Head at point P(m)")
+disp(p2BYw,"Pressure Head at point Q(m)")
+//Section QR
+//Applying bernaullis theorem
+p2dashBYw=p2BYw+H1P-H1Q-hse;//meter(Pressure Head at Q)
+Z2=1;//meter(Datum Head)
+H1Q=v2^2/2/g;//meter(velocity Head)
+Z3=2;//meter(Datum Head at R)
+H1R=v2^2/2/g;//meter(velocity Head at R)
+//Applying bernaullis theorem
+p3BYw=Z2+p2dashBYw+H1Q-Z3-H1R-hf2;//meter(Pressure Head at R)
+disp(H1Q,"Velocity Head at point Q after enlargemant(m)")
+disp(p2dashBYw,"Pressure Head at point Q after enlargemant(m)")
+disp(p3BYw,"Pressure Head at point R(m)")
+disp(H1R,"Velocity Head at point R(m)")
+//Answer in the book is wrong for some calculations.
diff --git a/2132/CH7/EX7.12/Example7_12.sce b/2132/CH7/EX7.12/Example7_12.sce new file mode 100755 index 000000000..01fe44c95 --- /dev/null +++ b/2132/CH7/EX7.12/Example7_12.sce @@ -0,0 +1,15 @@ +////Example 7.12
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constanty
+D1=100/1000;//meter
+D2=300/1000;//meter
+Q1=0.01;//m^3/sec
+A1=%pi/4*D1^2;//m^2
+A2=%pi/4*D2^2;//m^2
+//hf1=hf2
+Q2=sqrt(D2/(D1)*(Q1/A1)^2*A2^2);//cumec
+disp(Q2,"Discharge throough 300mm pipe in cumec : ");
diff --git a/2132/CH7/EX7.13/Example7_13.sce b/2132/CH7/EX7.13/Example7_13.sce new file mode 100755 index 000000000..6b91ad66e --- /dev/null +++ b/2132/CH7/EX7.13/Example7_13.sce @@ -0,0 +1,18 @@ +////Example 7.13
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constanty
+f=0.02;//coeff. of friction
+PQ=500;//meter
+QR=1000;//meter
+RS=500;//meter
+hf=10+PQ/62.5+QR/125-RS/100-2;//meter
+l=500+1000+500;///meter
+D=250/1000;//meter
+v=sqrt(hf*2*g*D/4/f/l);//m/s
+Q=%pi/4*D^2*v;//m^3/sec
+Q=Q*1000;//litres/sec
+disp(Q,"Discharge in pipe line in litres/sec : ");
diff --git a/2132/CH7/EX7.14.a/Example7_14_page_250.sce b/2132/CH7/EX7.14.a/Example7_14_page_250.sce new file mode 100755 index 000000000..fbf527465 --- /dev/null +++ b/2132/CH7/EX7.14.a/Example7_14_page_250.sce @@ -0,0 +1,18 @@ +////Example 7.14 at page no. 250
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constant
+l=4;//km
+n=5000;//habitants
+Ch=200;//litres/day(habitant capacity)
+t=10;//hour(daiy supply time)
+hf=20;//meter(Head loss)
+f=0.008;//coeff. of friction
+Qty=n*Ch/2;//litres(Water supplied in 10 hours)
+Q=Qty/(t*60*60);//litres/sec
+Q=Q/1000;//m^3/sec
+d=(f*l*1000*Q^2/3.0257/hf)^(1/5);//meter
+disp(d*1000,"Diameter of pipe(mm) : ");
diff --git a/2132/CH7/EX7.14/Example7_14.sce b/2132/CH7/EX7.14/Example7_14.sce new file mode 100755 index 000000000..3b06b2652 --- /dev/null +++ b/2132/CH7/EX7.14/Example7_14.sce @@ -0,0 +1,27 @@ +////Example 7.14
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constant
+slope=1/125;//slope
+hA=12;//meter(level of water in reservoir A)
+hB=1.5;//meter(level of water in reservoir B)
+L1=500;//meter
+D1=250/1000;//meter
+L2=1000;//meter
+D2=200/1000;//meter
+L3=500;//meter
+D3=150/1000;//meter
+f=0.02;//coeff. of friction
+fall_level=(L1+L2+L3)*slope;//meter
+H=hA+fall_level-hB;//meter(Head available for flow)
+v2BYv1=(D1/D2)^2;
+v3BYv1=(D1/D3)^2;
+//H=hf=hf1+hf2+hf3
+//H=(4*f*L1*v1^2/(2*g*D1)+4*f*L2*v2^2/(2*g*D2)+4*f*L3*v3^2/(2*g*D3))
+v1=sqrt(H/(4*f*L1/(2*g*D1)+4*f*L2*v2BYv1^2/(2*g*D2)+4*f*L3*v3BYv1^2/(2*g*D3)));//m/s
+Q=%pi*D1^2/4*v1;//m^3/sec
+Q=Q*1000;//litres/sec
+disp(Q,"Discharge in pipe line in litres/sec : ");
diff --git a/2132/CH7/EX7.15.a/Example7_15_page_252.sce b/2132/CH7/EX7.15.a/Example7_15_page_252.sce new file mode 100755 index 000000000..6541e8043 --- /dev/null +++ b/2132/CH7/EX7.15.a/Example7_15_page_252.sce @@ -0,0 +1,20 @@ +////Example 7.15 at page no. 252
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constant
+D=30/100;//meter
+l=400;//meter
+Q=300;//litres/sec
+f=0.008;//coeff. of friction
+Q=Q*10^-3;//m^3/sec
+A=%pi*D^2/4;//m^2
+v=Q/A;//m/s(velocity of flow)
+h1=0.5*v^2/2/g;//meter(Head loss at entrance to a pipe)
+h2=4*f*l*v^2/(2*g*D);//meter(Head loss due to friction)
+h3=v^2/2/g;//meter(Head loss at entrance of reservoir)
+H=h1+h2+h3;//meter(Difference of water level)
+disp(H,"Difference of water level between two reservoir(meter)");
+//Answer in the book is not accurate as h2 is calculated wrong.
diff --git a/2132/CH7/EX7.15/Example7_15.sce b/2132/CH7/EX7.15/Example7_15.sce new file mode 100755 index 000000000..68584c633 --- /dev/null +++ b/2132/CH7/EX7.15/Example7_15.sce @@ -0,0 +1,21 @@ +////Example 7.15
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constant
+D1=50/1000;//meter
+D2=100/1000;//meter
+l1=100;l2=100;//meter
+hf1=10;//meter(level difference)
+f=0.008;//coeff. of friction
+Q2BYQ1=sqrt((l1/l2)*(D2/D1)^5);//as hf1=hf2
+Q1=sqrt(hf1/f/l1*(3.0257*D1^5));//m^3/sec
+Q2=Q2BYQ1*Q1;//m^3/sec or cumec
+disp(Q1,"Rate of flow of pipe 1(m^3/sec)");
+disp(Q2,"Rate of flow of pipe 2(m^3/sec)");
+Q=Q1+Q2;//m^3/sec(Total Discharge)
+d=(f*l1*Q^2/3.0257/hf1)^(1/5);//meter
+disp(d*1000,"Diameter of single pipe(mm) : ");
+//Answer in the book is not accurate.
diff --git a/2132/CH7/EX7.16/Example7_16.sce b/2132/CH7/EX7.16/Example7_16.sce new file mode 100755 index 000000000..9a9c98142 --- /dev/null +++ b/2132/CH7/EX7.16/Example7_16.sce @@ -0,0 +1,16 @@ +////Example 7.16
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constant
+D=150/1000;//meter
+l=70;//meter
+H=2.6;//meter(head of water)
+f=0.01;//coeff. of friction
+//Applyong Bernoullis theorem
+v=sqrt(H*(2/g*(1+0.5+4*f*l/D))/4);//m/s
+Q=%pi*D^2/4*v;//m^3/sec
+Q=Q*1000;//litres/sec
+disp(Q,"Discharge through the pipe(litres/sec)");
diff --git a/2132/CH7/EX7.17/Example7_17.sce b/2132/CH7/EX7.17/Example7_17.sce new file mode 100755 index 000000000..13f72df9a --- /dev/null +++ b/2132/CH7/EX7.17/Example7_17.sce @@ -0,0 +1,22 @@ +////Example 7.17
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity constant
+Cv=0.97;//coeffiecient of velocity
+Cc=0.95;//coeffiecient
+Dn=50/1000;//meter(Nozzle diameter)
+D=100/1000;//meter(Pipe diameter)
+p=6.867;//N/cm^2(Pressure at the base of nozzle)
+Hb=p*10^4/(g*1000)//meter(Head at the base of nozzle)
+v=Cv*sqrt(2*g*Hb);//m/s(velocty of jet)
+disp(v,"Velocity in the jet(m/s)");
+A=%pi/4*Dn^2;//m^2(Cross sction of jet)
+Q=Cc*A*v;//m^3/sec(Discharge)
+Q=Q*1000;//litres/sec
+disp(Q,"Rate of discharge(litres/second)");
+E=g*1000*Q/1000*Hb/1000;//kW(Energy transmitted)
+disp(E,"Energy per second n the jet(kW)");
+//Answer in the book is not accurate.
diff --git a/2132/CH7/EX7.18/Example7_18.sce b/2132/CH7/EX7.18/Example7_18.sce new file mode 100755 index 000000000..24647987d --- /dev/null +++ b/2132/CH7/EX7.18/Example7_18.sce @@ -0,0 +1,25 @@ +////Example 7.18
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity constant
+D=100/1000;//meter(Pipe diameter)
+L=700;//meter(Total length)
+Lin=300;//meter(inlet length)
+hf=10;//meter(Available head)
+h=1.4;//meter(height)
+f=0.02;//coefficient of friction
+v=sqrt(hf*2*g*D/4/f/L);//m/s
+Q=%pi*D^2/4*v*1000;//litres/sec
+disp(Q,"Discharge in pipe(litres/second)");
+//Applying Brnaullis theorem
+p1=0;v1=0;Z1=0;//(Neglecting minor losses)
+v2=v;//m/s
+Z2=h;//meter
+hf=4*f*Lin*v^2/(2*g*D);//meter
+p2BYw=-v2^2/2/g-Z2-hf;//meter of water
+hatm=10.3;//meter(Atmospheric pressure head)
+habs=p2BYw+hatm;//meter(Absolute pressure head)
+disp(habs,"Pressure at the summit of siphon(meter)");
diff --git a/2132/CH7/EX7.19.a/Example7_19_page_265.sce b/2132/CH7/EX7.19.a/Example7_19_page_265.sce new file mode 100755 index 000000000..5fe2c0cfc --- /dev/null +++ b/2132/CH7/EX7.19.a/Example7_19_page_265.sce @@ -0,0 +1,17 @@ +////Example 7.19 at page no. 265
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity constant
+l=10000;//meter(length of pipe line)
+D=0.2;//meter(Diameter of pipe)
+p=60*10^5;//N/m^2
+f=0.007;//coefficient of friction
+w=g*1000;//N/m^3
+H=p/w;//meter
+hf=H/3;//meter(friction head loss is 1/3rd)
+v=sqrt(hf*2*g*D/4/f/l);//m/s
+P=w*%pi*D^2/4*v*(H-hf)/1000;//kW
+disp(P,"Maximum power(kW)");
diff --git a/2132/CH7/EX7.19/Example7_19.sce b/2132/CH7/EX7.19/Example7_19.sce new file mode 100755 index 000000000..93e14d1c9 --- /dev/null +++ b/2132/CH7/EX7.19/Example7_19.sce @@ -0,0 +1,14 @@ +////Example 7.19
+clc;
+clear;
+close;
+format('v',9);
+//Given data :
+g=9.81;//gravity constant
+D=150/1000;//meter(Pipe diameter)
+Q=40;//litres/sec(rate of discharge)
+l=500;//meter(valve distance)
+T=0.5;//second
+v=Q/1000/(%pi/4*D^2);//m/s(velocity of flow)
+pi=1000/g*(l*v/T);//kg/m^2
+disp(pi,"Increase in pressure intensity(kg/m^2)");
diff --git a/2132/CH7/EX7.2/Example7_2.sce b/2132/CH7/EX7.2/Example7_2.sce new file mode 100755 index 000000000..eb90c77fd --- /dev/null +++ b/2132/CH7/EX7.2/Example7_2.sce @@ -0,0 +1,17 @@ +//Example 7.2
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+mu=0.009;//kg-sec/m^2
+rho=0.89;//sp. gravity
+Q=4*10^-3;//m^3/sec
+d=30/1000;//meter
+v=mu/rho;//m^2/s
+disp(v,"Kinematic viscosity in m^2/sec : ");
+A=%pi*d^2/4;//m^2
+vm=Q/A;//m/s
+Rn=vm*d/v;//Reynolds no.
+disp(Rn,"Reynolds number for flow : ");
+disp("This is laminar flow because Rn no. is less than 2000.");
diff --git a/2132/CH7/EX7.3/Example7_3.sce b/2132/CH7/EX7.3/Example7_3.sce new file mode 100755 index 000000000..ecafa9af1 --- /dev/null +++ b/2132/CH7/EX7.3/Example7_3.sce @@ -0,0 +1,16 @@ +//Example 7.3
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+d=200/1000;//meter
+Q=40*10^-3;//m^3/sec
+A=%pi*d^2/4;//m^2
+vm=Q/A;//m/s
+v=0.25*10^-4;//m^2/s
+Rn=vm*d/v;//Reynolds no.
+disp(Rn,"Reynolds number for flow : ");
+disp("This is turbulent flow because Rn no. is greater than 4000.");
+disp(Rn/8,"New Reynolds number for flow : ");
+disp("This is laminar flow because Rn no. is less than 2000.");
diff --git a/2132/CH7/EX7.4/Example7_4.sce b/2132/CH7/EX7.4/Example7_4.sce new file mode 100755 index 000000000..c2cb82c02 --- /dev/null +++ b/2132/CH7/EX7.4/Example7_4.sce @@ -0,0 +1,16 @@ +//Example 7.4
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+D=30/100;//meter
+L=100;//meter
+v=0.01*10^-4;//m^2/s
+a=3;//m/s
+g=9.81;//gravity constanty
+Rn=a*D/v;//Reynolds no.
+f=0.079/Rn^(1/4);//using blasius formula
+hf=4*f*L/D*a^2/2/g;//meter
+disp(hf,"Head lost in meter : ");
+//Answer in the book is wrong.
diff --git a/2132/CH7/EX7.5/Example7_5.sce b/2132/CH7/EX7.5/Example7_5.sce new file mode 100755 index 000000000..ae133c072 --- /dev/null +++ b/2132/CH7/EX7.5/Example7_5.sce @@ -0,0 +1,15 @@ +////Example 7.5
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D=30/100;//meter
+L=500;//meter
+Q=300*10^-3;//m^2/sec
+f=0.0008;//coeff. of friction
+v=Q/(%pi/4*D^2);//m/s
+g=9.81;//gravity constanty
+hf=4*f*L*v^2/D/2/g;//meter
+disp(hf,"Difference in elevation in meter : ");
+//Answer in the book is wrong.
diff --git a/2132/CH7/EX7.6/Example7_6.sce b/2132/CH7/EX7.6/Example7_6.sce new file mode 100755 index 000000000..63dffe9e7 --- /dev/null +++ b/2132/CH7/EX7.6/Example7_6.sce @@ -0,0 +1,15 @@ +////Example 7.6
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D=20/100;//meter
+v=3;//m/s
+v1=0.01*10^-3;//m^2/sec
+Re=D*v/v1;//Reynolds number
+f=0.002+0.09/Re^0.3;//coeff. of friction
+L=5;//meter
+g=9.81;//gravity constanty
+hf=4*f*L*v^2/D/2/g;//meter
+disp(hf,"Head lost due to friction in meter : ");
diff --git a/2132/CH7/EX7.7/Example7_7.sce b/2132/CH7/EX7.7/Example7_7.sce new file mode 100755 index 000000000..6687fccdc --- /dev/null +++ b/2132/CH7/EX7.7/Example7_7.sce @@ -0,0 +1,15 @@ +////Example 7.7
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+D=80/1000;//meter
+Q=600*10^-3/60;//m^3/sec
+L=1*10^3;//meter
+f=0.02;//coefficient of friction
+v=Q/(%pi/4*D^2);//m/s
+g=9.81;//gravity constanty
+hf=4*f*L*v^2/D/2/g;//meter
+disp(hf,"Head lost due to friction in meter : ");
+//Answer is wrong in the book.
diff --git a/2132/CH7/EX7.8/Example7_8.sce b/2132/CH7/EX7.8/Example7_8.sce new file mode 100755 index 000000000..c948a60c2 --- /dev/null +++ b/2132/CH7/EX7.8/Example7_8.sce @@ -0,0 +1,40 @@ +////Example 7.8
+clc;
+clear;
+close;
+format('v',6);
+//Given data :
+g=9.81;//gravity constanty
+f=0.02;//coefficient of friction
+Cc=0.62;//coefficient of contraction
+//Portion AB
+Q1=50*10^-3;//m^3/sec
+D1=150/1000;//meter
+v1=Q1/(%pi/4*D1^2);//m/s
+hr=0.5*v1^2/2/g;//meter
+L1=200;//meter
+hf1=4*f*L1*v1^2/2/g/D1;//meter
+D2=200/1000;//meter
+v2=Q1/(%pi/4*D2^2);//m/s
+hc1=(v1-v2)^2/2/g;//meter
+L2=500;//meter
+hf2=4*f*L2*v2^2/2/g/D2;//meter
+d=75/1000;//meter
+ho=[(%pi/4*D2^2)/Cc/((%pi/4*D2^2)-(%pi/4*d^2))-1]^2*v2^2/2/g;//meter
+D3=120/1000;//meter
+v3=Q1/(%pi/4*D3^2);//m/s
+hc2=v3^2/2/g*(1/Cc-1)^2;//meter
+L3=500;//meter
+hf3=4*f*L3*v3^2/2/g/D3;//meter
+Kb=0.25;//assumed
+hb1=Kb*v3^2/2/g;//meter
+D4=120/1000;//meter
+v4=Q1/(%pi/4*D4^2);//m/s
+L4=500;//meter
+hf4=4*f*L4*v4^2/2/g/D4;//meter
+hb2=Kb*v3^2/2/g;//meter
+L5=500;//meter
+hf5=4*f*L5*v4^2/2/g/D4;//meter
+h_outlet=v3^2/2/g;//meter
+h_total=hr+hf1+hc1+hf2+ho+hc2+hf3+hb1+hf4+hb2+hf5+h_outlet;//meter
+disp(h_total,"Total loss of head in meter : ");
diff --git a/2132/CH7/EX7.9/Example7_9.sce b/2132/CH7/EX7.9/Example7_9.sce new file mode 100755 index 000000000..a983a14a2 --- /dev/null +++ b/2132/CH7/EX7.9/Example7_9.sce @@ -0,0 +1,19 @@ +////Example 7.9
+clc;
+clear;
+close;
+format('v',7);
+//Given data :
+g=9.81;//gravity constanty
+Cc=0.62;//coefficient of contraction
+D1=150/1000;//meter
+D2=100/1000;//meter
+Q=2.7/60;//m^3/sec
+p1=0.8*10^4;//kg/m^2
+v1=Q/(%pi/4*D1^2);//m/s
+v2=Q/(%pi/4*D2^2);//m/s
+hc=v2^2/2/g*(1/Cc-1)^2;//meter
+w=1000;//kg/m^3
+p2=(v1^2/2/g+p1/w-v2^2/2/g-hc)*w;//kg/m^2(Z1=Z2)
+p2=p2*10^-4;//kg/cm^2
+disp(p2,"Intensity of pressure in kg/cm^2 : ");
|