summaryrefslogtreecommitdiff
path: root/1379/CH1/EX1.1.9/example1_9.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1379/CH1/EX1.1.9/example1_9.sce
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1379/CH1/EX1.1.9/example1_9.sce')
-rwxr-xr-x1379/CH1/EX1.1.9/example1_9.sce56
1 files changed, 26 insertions, 30 deletions
diff --git a/1379/CH1/EX1.1.9/example1_9.sce b/1379/CH1/EX1.1.9/example1_9.sce
index e83a4520a..9a1185817 100755
--- a/1379/CH1/EX1.1.9/example1_9.sce
+++ b/1379/CH1/EX1.1.9/example1_9.sce
@@ -1,30 +1,26 @@
-
-
-//exapple 1.9
-clc; funcprot(0);
-// Initialization of Variable
-rho=1000;
-mu=1.25/1000;
-g=9.81;
-pi=3.14
-d1=0.28;//diameter of tank
-d2=0.0042;//diameter of pipe
-l=0.52;//length of pipe
-rr=1.2/1000/d;//relative roughness
-phid=0.00475;
-disp(phid,"It is derived from tyhe graph giben in appedix and can be seen is arying b/w 0.0047 & 0.0048 dependent on D which varies from 0.25 to 0.45")
-//calculations
-function[a]=intregrate()
- s=0;
- for i=1:1000
- D=linspace(0.25,0.45,1000);
- y=sqrt(((pi*d1^2/pi/d2^2)^2-1)/2/9.81+(4*phid*l*(pi*d1^2/pi/d2^2)^2)/d2/9.81)*((0.52+D(i))^-0.5)*2/10000;
- s=s+y;
-
- end
- a=s;
-endfunction
-b=intregrate();
-disp(b,"Time required to water level to fall in the tank in (s):");
-
-
+//exapple 1.9
+clc; funcprot(0);
+// Initialization of Variable
+rho=1000;
+mu=1.25/1000;
+g=9.81;
+pi=3.14
+d1=0.28;//diameter of tank
+d2=0.0042;//diameter of pipe
+l=0.52;//length of pipe
+rr=1.2/1000/d2;;//relative roughness
+phid=0.00475;
+disp(phid,"It is derived from tyhe graph giben in appedix and can be seen is arying b/w 0.0047 & 0.0048 dependent on D which varies from 0.25 to 0.45")
+//calculations
+function[a]=intregrate()
+ s=0;
+ for i=1:1000
+ D=linspace(0.25,0.45,1000);
+ y=sqrt(((pi*d1^2/pi/d2^2)^2-1)/2/9.81+(4*phid*l*(pi*d1^2/pi/d2^2)^2)/d2/9.81)*((0.52+D(i))^-0.5)*2/10000;
+ s=s+y;
+
+ end
+ a=s;
+endfunction
+b=intregrate();
+disp(b,"Time required to water level to fall in the tank in (s):"); \ No newline at end of file