diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /1379/CH1/EX1.1.9/example1_9.sce | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-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-x | 1379/CH1/EX1.1.9/example1_9.sce | 56 |
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 |