summaryrefslogtreecommitdiff
path: root/3720/CH8/EX8.8
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3720/CH8/EX8.8
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-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.8')
-rw-r--r--3720/CH8/EX8.8/Ex8_8.sce33
1 files changed, 33 insertions, 0 deletions
diff --git a/3720/CH8/EX8.8/Ex8_8.sce b/3720/CH8/EX8.8/Ex8_8.sce
new file mode 100644
index 000000000..6641e1a69
--- /dev/null
+++ b/3720/CH8/EX8.8/Ex8_8.sce
@@ -0,0 +1,33 @@
+//Example 8_8
+clc;clear;funcprot(0);
+D=0.05;//m
+v=0.006;// m^3/s
+K_Lentrance=0.5;
+K_Lelbow=0.3;
+K_Lvalve=0.2;
+K_Lexit=1.06;// The loss coefficients
+L=89;// m
+z_2=4;// m
+//Properties
+rho=999.7;// kg/m^3
+mu=1.307*10^-3;// kg/m.s
+epsilon=0.00026; // m
+g=9.81;// m/s^2
+
+//Calculation
+A_c=(%pi*D^2)/4;//m^2
+V=v/A_c;// m/s
+Re=(rho*V*D)/mu;
+e=epsilon/D;
+// f=y(1)
+function[X]=frictionfactor(y);
+ X(1)=(-2.0*log10((e/3.7)+(2.51/(Re*sqrt(y(1))))))-(1/sqrt(y(1)));
+endfunction
+y=[0.01];
+z=fsolve(y,frictionfactor);
+f=z;//friction factor
+SigmaK_L=K_Lentrance+(2*K_Lelbow)+K_Lvalve+K_Lexit;
+h_l=((f*(L/D))+(SigmaK_L))*(V^2/(2*g));// The total head loss in m
+z_1=z_2+h_l;// m
+printf('The elevation of the source,z_1=%0.1f m\n',z_1);
+// The answer vary due to round off error