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 /3720/CH8/EX8.4/Ex8_4.sce | |
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 '3720/CH8/EX8.4/Ex8_4.sce')
-rw-r--r-- | 3720/CH8/EX8.4/Ex8_4.sce | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/3720/CH8/EX8.4/Ex8_4.sce b/3720/CH8/EX8.4/Ex8_4.sce new file mode 100644 index 000000000..5721e7a99 --- /dev/null +++ b/3720/CH8/EX8.4/Ex8_4.sce @@ -0,0 +1,33 @@ +//Example 8_4
+clc;clear;funcprot(0);
+// Given values
+P=1;// atm
+T=35;// degree celsius
+L=150;// m
+h_L=20;// m
+v=0.35;// m^3/s
+g=9.81;// m/s^2
+//Properties
+rho=1.145;// kg/m^3
+mu=1.895*10^-5;// kg/m.s
+nu=1.655*10^-5;// m^2/s
+
+//Calculation
+// V=y(1); Re=y(2); f=y(3);D=y(4)
+function[X] = Diameter(y)
+ X(1)=(v/(%pi*(y(4)^2)/4))-y(1);
+ X(2)=((y(1)*y(4))/(nu))-y(2);
+ X(3)=(-2.0*log10(2.51/(y(2)*sqrt(y(3)))))-(1/sqrt(y(3)));
+ X(4)=(y(3)*(L/(y(4))*((y(1)^2)/(2*g))))-h_L;
+endfunction
+y=[1 100000 0.01 0.1];
+z=fsolve(y,Diameter);
+V=z(1);// m/s
+Re=z(2);// Reynolds number
+f=z(3);
+D=z(4);// m
+printf('The minimum diameter of the duct,D=%0.3f m\n',D);
+//The diameter can also be determined directly from the third Swamee–Jain formula to be
+y=0;
+D=0.66*(((y^1.25*((L*v^2)/(g*h_L))^4.75))+(nu*v^9.4*(L/(g*h_L))^5.2))^0.04;
+printf('The diameter can also be determined directly from the third Swamee–Jain formula to be D=%0.3f m\n',D);
|