diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3785/CH9 | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3785/CH9')
-rw-r--r-- | 3785/CH9/EX9.1/Ex9_1.sce | 32 | ||||
-rw-r--r-- | 3785/CH9/EX9.2/Ex9_2.sce | 23 | ||||
-rw-r--r-- | 3785/CH9/EX9.3/Ex9_3.sce | 48 | ||||
-rw-r--r-- | 3785/CH9/EX9.4/Ex9_4.sce | 31 | ||||
-rw-r--r-- | 3785/CH9/EX9.5/Ex9_5.sce | 26 | ||||
-rw-r--r-- | 3785/CH9/EX9.6/Ex9_6.sce | 33 | ||||
-rw-r--r-- | 3785/CH9/EX9.7/Ex9_7.sce | 29 | ||||
-rw-r--r-- | 3785/CH9/EX9.8/Ex9_8.sce | 46 | ||||
-rw-r--r-- | 3785/CH9/EX9.9/Ex9_9.sce | 62 |
9 files changed, 330 insertions, 0 deletions
diff --git a/3785/CH9/EX9.1/Ex9_1.sce b/3785/CH9/EX9.1/Ex9_1.sce new file mode 100644 index 000000000..45e115cf9 --- /dev/null +++ b/3785/CH9/EX9.1/Ex9_1.sce @@ -0,0 +1,32 @@ +// Example 9_1
+clc;funcprot(0);
+// Given data
+D=8;// The diameter of the steel pipe in inch
+z_in=100;// Elevation in m
+z_out=22;// Elevation in m
+L=2.2;// The distance in km
+Q=1000;// The flow rate in m^3/s
+g=9.807;// The acceleration due to gravity in m/s^2
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+rho=1*10^3;// The density of water in kg/m^3
+
+// Calculation
+// (a)
+D=D*2.54*10^-2;// m
+Q=Q*(3.782*10^-3)/60;// m^3/s
+V=(4*Q)/(%pi*D^2);// m/s
+Re_D=(V*D)/nu;// Reynolds number
+epsilon=5*10^-5;// physical height
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+
+K_f=f*((L*10^3)/D);// The head loss coefficient
+// (b)
+deltah_f=K_f*((V^2)/(2*g));// The head loss in m
+// (c)
+dp=(deltah_f-(z_in-z_out))*rho*g;// The static pressure change between the pipe inlet and outlet
+printf("\n(a)The head loss coefficient,K_f=%1.3e \n(b)The head loss,deltah_f=%2.2f \n(c)The static pressure change between the pipe inlet and outlet,p_in-p_out=%1.3e Pa",K_f,deltah_f,dp);
diff --git a/3785/CH9/EX9.2/Ex9_2.sce b/3785/CH9/EX9.2/Ex9_2.sce new file mode 100644 index 000000000..5f170284f --- /dev/null +++ b/3785/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,23 @@ +// Example 9_2
+clc;funcprot(0);
+// Given data
+// From Example 9_1
+D=8;// The diameter of the steel pipe in inch
+z_in=100;// Elevation in m
+z_out=22;// Elevation in m
+L=2.2;// The distance in km
+g=9.807;// The acceleration due to gravity in m/s^2
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+rho=1*10^3;// The density of water in kg/m^3
+dp=0;// The static pressure in Pa
+
+// Calculation
+D=D*2.54*10^-2;// m
+deltah_f=(dp/(rho*g))+(z_in-z_out);// m
+// From equation 9.9
+sqrtoffintoRe_D=((2*g*deltah_f*D^3)/(((nu)^2)*L*10^3))^(1/2);
+epsilon=5*10^-5;// physical height in m
+Re_D=-2*sqrtoffintoRe_D*log10(((epsilon/D)/3.7)+(2.51/(sqrtoffintoRe_D)));// Reynolds number
+Q=(%pi*D*nu*Re_D)/4;// The volume flow rate in m^3/s
+Q=(Q*60)/(3.782*10^-3)// The volume flow rate in gal/min
+printf("The volume flow rate,Q=%4.0f gal/min",Q);
diff --git a/3785/CH9/EX9.3/Ex9_3.sce b/3785/CH9/EX9.3/Ex9_3.sce new file mode 100644 index 000000000..d39b27e27 --- /dev/null +++ b/3785/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,48 @@ +// Example 9_3
+clc;funcprot(0);
+// Given data
+dp=100;// The pressure drop in psi
+rho=1*10^3;// The density of water in kg/m^3
+g=9.807;// The acceleration due to gravity in m/s^2
+Q=2000;// The flow rate of water in gal/min
+D=4;// The next pipe size in inch
+L=100;// Length in m
+nu=1*10^-6;// m^2/s
+
+// Calculation
+deltah=(dp*6.895*10^3)/(rho*g);// m
+printf("\nh_in-h_out=%2.2f m",deltah);
+D=D*2.54*10^-2;// m
+Q=Q*(3.782*10^-3)/60;// m^3/s
+V=(4*Q)/(%pi*D^2);// m/s
+Re_D=(V*D)/nu;// Reynolds number
+epsilon=5*10^-5;// physical height
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+K_f=f*((L)/D);// The head loss coefficient
+deltah_f=K_f*((V^2)/(2*g));// The head loss in m
+printf("\nD=%0.4f m \nQ=%1.3e m^3/s \nV=%2.2f m/s \nRe_D=%1.3e \nf=%1.3e \nK_f=%2.2f \nh_in-h_out=%3.1f m",D,Q,V,Re_D,f,K_f,deltah_f)
+printf("\nThe head loss of 205.9 m is greater than the allowable los s of 70.31 m.");
+
+// If we try the next size pipe, D = 6 in,
+D=6;// inch
+D=D*2.54*10^-2;// m
+Q=2000;// The flow rate of water in gal/min
+Q=Q*(3.782*10^-3)/60;// m^3/s
+V=(4*Q)/(%pi*D^2);// m/s
+Re_D=(V*D)/nu;// Reynolds number
+epsilon=5*10^-5;// physical height
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+K_f=f*((L)/D);// The head loss coefficient
+deltah_f=K_f*((V^2)/(2*g));// The head loss in m
+printf("\nD=%0.4f m \nQ=%1.3e m^3/s \nV=%1.3f m/s \nRe_D=%1.3e \nf=%1.3e \nK_f=%2.2f \nh_in-h_out=%2.2f m",D,Q,V,Re_D,f,K_f,deltah_f)
+printf("\nThis is smaller than the allowable head loss so that a 6 in diameter pipe is acceptable.")
diff --git a/3785/CH9/EX9.4/Ex9_4.sce b/3785/CH9/EX9.4/Ex9_4.sce new file mode 100644 index 000000000..1ad0ec16d --- /dev/null +++ b/3785/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,31 @@ +// Example 9_4
+clc;funcprot(0);
+// Given data
+l=6;// in
+b=12;// in
+A=6*12;// in^2
+L=20;// Length in ft
+Q=1000;// ft^3/min
+epsilon=1*10^-5;// The duct roughness in m
+nu=1.51*10^-5;// m/s
+rho=1.204;// The density of water in kg/m^3
+g=9.807;// The acceleration due to gravity in m/s^2
+
+// Calculation
+D=(4*(l*b))/(2*(l+b));// m
+D=D*2.54*10^-2;// m
+Q=Q*(2.832*10^-2)/60;// m^3/s
+A=A*(2.54*10^-2)^2;// m^2
+V=Q/A;// m/s
+L=L*0.3048;// m
+Re_D=(V*D)/nu;// Reynolds number
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+K_f=f*((L)/D);// The head loss coefficient
+deltah=K_f*((V^2)/(2*g));// The head loss in m
+dp=rho*g*deltah;// The pressure drop in Pa
+printf("\nThe head loss,h_in-h_out=%1.3f m \nThe pressure drop,p*_in-p*_out=%2.2f Pa",deltah,dp);
diff --git a/3785/CH9/EX9.5/Ex9_5.sce b/3785/CH9/EX9.5/Ex9_5.sce new file mode 100644 index 000000000..d470102ba --- /dev/null +++ b/3785/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,26 @@ +// Example 9_5
+clc;funcprot(0);
+// Given data
+D=1;// Diameter in cm
+L=22;// The lngth of a copper tube in m
+Q=4;// The water flow rate in the circuit in l/min
+g=9.807;// The acceleration due to gravity in m/s^2
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+
+// Calculation
+D=1*10^-2;// m
+Q=(Q*1*10^-3)/60;// m^3/s
+A=(%pi*(D)^2)/4;// m^2
+V=Q/A;// m/s
+Re_D=(V*D)/nu;// Reynolds number
+epsilon=1*10^-6;// Roughness in m
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+K_f=f*((L)/D);// The head loss coefficient
+SigmaK=11.4;
+deltah=(K_f+SigmaK)*((V^2)/(2*g));// The total head loss in m
+printf("The total head loss,deltah=%1.2f m",deltah);
diff --git a/3785/CH9/EX9.6/Ex9_6.sce b/3785/CH9/EX9.6/Ex9_6.sce new file mode 100644 index 000000000..7e77b6b01 --- /dev/null +++ b/3785/CH9/EX9.6/Ex9_6.sce @@ -0,0 +1,33 @@ +// Example 9_6
+clc;funcprot(0);
+// Given data
+L=1.5;// The length in km
+D=6;// Diameter in inch
+h=80;// m
+// Assume
+deltah_l=20;// m
+g=9.807;// The acceleration due to gravity in m/s^2
+nu=1*10^-6;// m/s^2
+epsilon=5*10^-5;// roughness in m
+
+// Calculation
+D=D*2.54*10^-2;// m
+sqrtoffintoRe_D=((2*g*deltah_l*D^3)/(((nu)^2)*L*10^3))^(1/2);
+Re_D=-2*sqrtoffintoRe_D*log10(((epsilon/D)/3.7)+(2.51/(sqrtoffintoRe_D)));// Reynolds number
+Q=(%pi*D*nu*Re_D)/4;// The volume flow rate in m^3/s
+Q_20=(Q*60)/(3.782*10^-3)// The volume flow rate in gal/min
+deltah=150*(1-(Q_20/1000)^2);// m
+dh_20=deltah-(h+deltah_l);// m
+deltah_l=40;// m
+sqrtoffintoRe_D=((2*g*deltah_l*D^3)/(((nu)^2)*L*10^3))^(1/2);
+Re_D=-2*sqrtoffintoRe_D*log10(((epsilon/D)/3.7)+(2.51/(sqrtoffintoRe_D)));// Reynolds number
+Q=(%pi*D*nu*Re_D)/4;// The volume flow rate in m^3/s
+Q_40=(Q*60)/(3.782*10^-3)// The volume flow rate in gal/min
+deltah=150*(1-(Q_40/1000)^2);// m
+dh_40=deltah-(h+deltah_l);// m
+Q=((((dh_20)/(dh_20-dh_40))*(Q_40-Q_20))+Q_20);// GPM
+deltah=150*(1-(Q/1000)^2);// m
+deltah_l=deltah-h;// m
+printf("\nThe flow rate through the system,Q=%3.1f GPM \ndeltah=%3.1f m \ndeltah_l=%2.2f m",Q,deltah,deltah_l);
+printf("\nContinuing this process to improve our estimate of Q and Ah we finally arrive at:Q=527.7(GPM);deltah=108.3 m")
+
diff --git a/3785/CH9/EX9.7/Ex9_7.sce b/3785/CH9/EX9.7/Ex9_7.sce new file mode 100644 index 000000000..b9a0cb27b --- /dev/null +++ b/3785/CH9/EX9.7/Ex9_7.sce @@ -0,0 +1,29 @@ +// Example 9_7
+clc;funcprot(0);
+// Given data
+h=100;
+Q=10;
+n_t=.85;
+D=1.5;
+L=300;
+delta_t=93.99;
+epsilon=1*10^-4;
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+rho=1*10^3;// The density of water in kg/m^3
+g=9.81;// The acceleration due to gravity in m/s^2
+
+// Calculation
+V=(4*Q)/(%pi*D^2);// m/s
+Re_D=(V*D)/nu;// Reynolds number
+function[X]=frictionfactor(y)
+ X(1)=-(2.0*log10(((epsilon/D)/3.7)+(2.51/(Re_D*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+// Guessing a value of f=1*10^-2;
+y=[1*10^-2];
+f=fsolve(y,frictionfactor);
+K_f=f*((L)/D);// The head loss coefficient
+SigmaK=3.681;
+deltah_1=SigmaK*((V^2)/(2*g));// The head loss in m
+P=n_t*(rho*Q)*g*deltah_1;
+P=P/10^3;
+printf("\nThe head loss in the piping,deltah_1=%1.3f m \nThe power produced by the turbine,P=%3.0f kW",deltah_1,P);
diff --git a/3785/CH9/EX9.8/Ex9_8.sce b/3785/CH9/EX9.8/Ex9_8.sce new file mode 100644 index 000000000..c39ef76ed --- /dev/null +++ b/3785/CH9/EX9.8/Ex9_8.sce @@ -0,0 +1,46 @@ +// Example 9_8
+clc;funcprot(0);
+// Given data
+L=50;// Lengths of garden hose in ft
+D_A=3/4;// Diameter of hose A in inch
+D_B=1/2;// Diameter of hose B in inch
+p=40;// Pressure in the tank in psig
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+rho=1*10^3;// The density of water in kg/m^3
+g=9.807;// The acceleration due to gravity in m/s^2
+epsilon=0;
+
+// Calculation
+D_A=D_A*2.54*10^-2;// m
+D_B=D_B*2.54*10^-2;// m
+L=L*0.3048;// m
+deltah_l1=(p*6.895*10^3)/(rho*g);// m
+deltah_A1=10;// m
+deltah_B1=18.12;// m
+sqrtoffintoRe_D_A=((2*g*deltah_A1*D_A^3)/(((nu)^2)*L))^(1/2);
+Re_D_A=-2*sqrtoffintoRe_D_A*log10(2.51/(sqrtoffintoRe_D_A));// Reynolds number
+Q_A1=(%pi*D_A*nu*Re_D_A)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_B=((2*g*deltah_B1*D_B^3)/(((nu)^2)*L))^(1/2);
+Re_D_B=-2*sqrtoffintoRe_D_B*log10((2.51/(sqrtoffintoRe_D_B)));// Reynolds number
+Q_B1=(%pi*D_B*nu*Re_D_B)/4;// The volume flow rate in m^3/s
+V_A=(4*Q_A1)/(%pi*D_A^2);// m/s
+V_B=(4*Q_B1)/(%pi*D_B^2);// m/s
+// Assume deltah=SigmaK*((V^2)/(2*g))
+deltah=((0.4*V_A^2)+(0.4*V_B^2))/(2*g);// m
+deltah_f=deltah_l1-deltah;// m
+// We decide to allocate this total to
+deltah_A2=2;// m
+deltah_B2=25.43;// m
+sqrtoffintoRe_D_A=((2*g*deltah_A2*D_A^3)/(((nu)^2)*L))^(1/2);
+Re_D_A=-2*sqrtoffintoRe_D_A*log10((2.51/(sqrtoffintoRe_D_A)));// Reynolds number
+Q_A2=(%pi*D_A*nu*Re_D_A)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_B=((2*g*deltah_B2*D_B^3)/(((nu)^2)*L))^(1/2);
+Re_D_B=-2*sqrtoffintoRe_D_B*log10((2.51/(sqrtoffintoRe_D_B)));// Reynolds number
+Q_B2=(%pi*D_B*nu*Re_D_B)/4;// The volume flow rate in m^3/s
+V_A=(4*Q_A2)/(%pi*D_A^2);// m/s
+V_B=(4*Q_B2)/(%pi*D_B^2);// m/s
+deltah_l2=((0.4*V_A^2)+(0.4*V_B^2))/(2*g);// m
+//Indicating the first and second guesses by '1' and '2' we find a third guess to be:
+deltah=deltah_A2-((Q_A2-Q_B2)*((deltah_A1-deltah_A2)/((Q_A1-Q_B1)-(Q_A2-Q_B2))));// m
+printf('\nThe flow rate through the hoses Q_A=%1.3e m^3/s;Q_B=%1.3e m^3/s;SigmaK(V^2/2g)=%0.4f m',Q_A2,Q_B2,deltah_l2);
+// The answer is vary due to roundoff error
diff --git a/3785/CH9/EX9.9/Ex9_9.sce b/3785/CH9/EX9.9/Ex9_9.sce new file mode 100644 index 000000000..f99179a03 --- /dev/null +++ b/3785/CH9/EX9.9/Ex9_9.sce @@ -0,0 +1,62 @@ +// Example 9_9
+clc;funcprot(0);
+// Given data
+D=1*10^-2;// m
+h_1=10;// m
+h_4=0;// m
+L_12=3;// m
+L_13=4;// m
+L_14=5;// m
+g=9.807;// The acceleration due to gravity in m/s^2
+nu=1.0*10^-6;// The kinematic viscosity in m/s^2
+
+// Calculation
+// Because of the symmetry of the network. h1- h2 = h3-h4,Q12 = Q34 and Q13 = Q24.
+// Assume
+h_2a=5;// m
+h_3a=5;// m
+deltah_12=h_1-h_2a;// m
+deltah_13=h_1-h_3a;// m
+sqrtoffintoRe_D_12=((2*g*deltah_12*D^3)/(((nu)^2)*L_12))^(1/2);
+Re_D_12=-2*sqrtoffintoRe_D_12*log10((2.51/(sqrtoffintoRe_D_12)));// Reynolds number
+Q_12=(%pi*D*nu*Re_D_12)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_13=((2*g*deltah_13*D^3)/(((nu)^2)*L_13))^(1/2);
+Re_D_13=-2*sqrtoffintoRe_D_13*log10((2.51/(sqrtoffintoRe_D_13)));// Reynolds number
+Q_13=(%pi*D*nu*Re_D_13)/4;// The volume flow rate in m^3/s
+Q_23=0;// The volume flow rate in m^3/s
+Q_24=Q_13;// The volume flow rate in m^3/s
+deltaQ_2a=Q_12-Q_23-Q_24;// m^3/s
+// Assume
+h_2b=6;// m
+h_3b=4;// m
+deltah_12=4;// m
+deltah_13=6;// m
+deltah_23=2;// m
+sqrtoffintoRe_D_12=((2*g*deltah_12*D^3)/(((nu)^2)*L_12))^(1/2);
+Re_D_12=-2*sqrtoffintoRe_D_12*log10((2.51/(sqrtoffintoRe_D_12)));// Reynolds number
+Q_12=(%pi*D*nu*Re_D_12)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_13=((2*g*deltah_13*D^3)/(((nu)^2)*L_13))^(1/2);
+Re_D_13=-2*sqrtoffintoRe_D_13*log10((2.51/(sqrtoffintoRe_D_13)));// Reynolds number
+Q_13=(%pi*D*nu*Re_D_13)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_23=((2*g*deltah_23*D^3)/(((nu)^2)*1))^(1/2);
+Re_D_23=-2*sqrtoffintoRe_D_23*log10((2.51/(sqrtoffintoRe_D_23)));// Reynolds number
+Q_23=(%pi*D*nu*Re_D_23)/4;// The volume flow rate in m^3/s
+deltaQ_2b=Q_12-Q_23-Q_24;// m
+h_2=h_2a-(((h_2b-h_2a)/(deltaQ_2b-deltaQ_2a))*deltaQ_2b);// m
+// Proceeding in this manner for two more iterations, we converge to the solution:
+h_2=5.11;// m
+h_3=4.89;// m
+deltah_12=h_1-h_2;// m
+deltah_13=h_1-h_3;// m
+deltah_23=h_2-h_3;// m
+sqrtoffintoRe_D_12=((2*g*deltah_12*D^3)/(((nu)^2)*L_12))^(1/2);
+Re_D_12=-2*sqrtoffintoRe_D_12*log10((2.51/(sqrtoffintoRe_D_12)));// Reynolds number
+Q_12=(%pi*D*nu*Re_D_12)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_13=((2*g*deltah_13*D^3)/(((nu)^2)*L_13))^(1/2);
+Re_D_13=-2*sqrtoffintoRe_D_13*log10((2.51/(sqrtoffintoRe_D_13)));// Reynolds number
+Q_13=(%pi*D*nu*Re_D_13)/4;// The volume flow rate in m^3/s
+sqrtoffintoRe_D_23=((2*g*deltah_23*D^3)/(((nu)^2)*1))^(1/2);
+Re_D_23=-2*sqrtoffintoRe_D_23*log10((2.51/(sqrtoffintoRe_D_23)));// Reynolds number
+Q_23=(%pi*D*nu*Re_D_23)/4;// The volume flow rate in m^3/s
+Q_2=Q_13+Q_12;// m^3/s
+printf("\nThe flow rate,Q=%1.3e m^3/s",Q_2);
|