diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /557/CH14/EX14.7 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '557/CH14/EX14.7')
-rwxr-xr-x | 557/CH14/EX14.7/7.sce | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/557/CH14/EX14.7/7.sce b/557/CH14/EX14.7/7.sce new file mode 100755 index 000000000..dc31a3e75 --- /dev/null +++ b/557/CH14/EX14.7/7.sce @@ -0,0 +1,28 @@ +clc; funcprot(0);//Example 14.7
+
+//Initializing the variables
+d = [0.1 0.125 0.15 0.1 0.1 ]; // Corrosponding to AA1B AA2B BC CD CF
+l = [30 30 60 15 30]; // Corrosponding to AA1B AA2B BC CD CF
+rho = 1.2;
+f = 0.006;
+Ha = 100;
+Hf = 60;
+He = 40;
+
+//Calculations
+for(i=1:length(d))
+ K(i) = f*l(i)/(3*d(i)^5);
+end
+
+K_ab = K(1)*K(2)/(sqrt(K(1))+sqrt(K(2)))^2;
+K_ac = K_ab + K(3);
+Hc = (K_ac*Hf +K(5)*Ha/4)/(K_ac+K(5)/4);
+Q = sqrt((Ha - Hc)/K_ac);
+
+function[z] = f(n)
+ z = He - Hc + (0.5*Q)^2 *(K(4)+(4000/n)^2);
+endfunction
+
+n = fsolve(1,f);
+
+disp(n,"Percentage valve opening (%) :", Hc,"Head at C (m):", Q, "total Volume flow rate (m3/s):");
\ No newline at end of file |