summaryrefslogtreecommitdiff
path: root/3785/CH9/EX9.7/Ex9_7.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3785/CH9/EX9.7/Ex9_7.sce
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 '3785/CH9/EX9.7/Ex9_7.sce')
-rw-r--r--3785/CH9/EX9.7/Ex9_7.sce29
1 files changed, 29 insertions, 0 deletions
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);