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/EX9.1 | |
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/EX9.1')
-rw-r--r-- | 3785/CH9/EX9.1/Ex9_1.sce | 32 |
1 files changed, 32 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);
|