summaryrefslogtreecommitdiff
path: root/1379/CH1
diff options
context:
space:
mode:
Diffstat (limited to '1379/CH1')
-rwxr-xr-x1379/CH1/EX1.1.6/example1_6.sci81
-rwxr-xr-x1379/CH1/EX1.1.9/example1_9.sce56
2 files changed, 66 insertions, 71 deletions
diff --git a/1379/CH1/EX1.1.6/example1_6.sci b/1379/CH1/EX1.1.6/example1_6.sci
index 56b81cade..a5fc95dd2 100755
--- a/1379/CH1/EX1.1.6/example1_6.sci
+++ b/1379/CH1/EX1.1.6/example1_6.sci
@@ -1,41 +1,40 @@
-
-
-//exapple 1.6
-clc; funcprot(0);
-// Initialization of Variable
-rhon=1068;//density of nitric acid
-mun=1.06/1000//viscosity of nitric acid
-g=9.81;
-l=278;
-d=0.032;
-alpha=1;
-h2=57.4;//height to be raised
-h1=5;//height from which to be raised
-e=.0035/1000;//roughness
-G=2.35//mass flow rate
-//calculations
-//part 1
-u=4*G/rhon/pi/d^2;
-Re=rhon*d*u/mun;
-rr=e/d;//relative roughness
-//Reading's from Moody's Chart
-phi=.00225;//friction coeff.
-W=u^2/2+g*(h2-h1)+4*phi*l*u^2/d;//The work done/kg of fluid flow in J/kg
-V=abs(W)*G;
-disp(abs(V)/1000, "The Power required to pump acid in kW :");
-//part 2
-P2=-u^2*rhon/2+g*(h1)*rhon+abs(W+2)*rhon;;
-disp(P2/1000,"The gauge pressure at pump outlet when piping is new in (kPa)" );
-//part 3
-e=.05/1000;
-Re=rhon*d*u/mun;
-rr=e/d;
-//Reading's from Moody's Chart
-phi=0.0029;
-W=u^2/2+g*(h2-h1)+4*phi*l*u^2/d;
-Vnew=abs(W)*G;
-Pi=(Vnew-V)/V*100;
-disp(Pi , "The increase in power required to transfer in old pipe in (%):");
-//part 4
-P2=-u^2*rhon/2+g*(h1)*rhon+abs(W+2)*rhon;
-disp(P2/1000,"The gauge pressure at pump outlet when piping is old in (kPa)" );
+//exapple 1.6
+clc; funcprot(0);
+// Initialization of Variable
+rhon=1068;//density of nitric acid
+mun=1.06/1000//viscosity of nitric acid
+g=9.81;
+l=278;
+pi = %pi;
+d=0.032;
+alpha=1;
+h2=57.4;//height to be raised
+h1=5;//height from which to be raised
+e=.0035/1000;//roughness
+G=2.35//mass flow rate
+//calculations
+//part 1
+u=4*G/rhon/pi/d^2;
+Re=rhon*d*u/mun;
+rr=e/d;//relative roughness
+//Reading's from Moody's Chart
+phi=.00225;//friction coeff.
+W=u^2/2+g*(h2-h1)+4*phi*l*u^2/d;//The work done/kg of fluid flow in J/kg
+V=abs(W)*G;
+disp(abs(V)/1000, "The Power required to pump acid in kW :");
+//part 2
+P2=-u^2*rhon/2+g*(h1)*rhon+abs(W+2)*rhon;;
+disp(P2/1000,"The gauge pressure at pump outlet when piping is new in (kPa)" );
+//part 3
+e=.05/1000;
+Re=rhon*d*u/mun;
+rr=e/d;
+//Reading's from Moody's Chart
+phi=0.0029;
+W=u^2/2+g*(h2-h1)+4*phi*l*u^2/d;
+Vnew=abs(W)*G;
+Pi=(Vnew-V)/V*100;
+disp(Pi , "The increase in power required to transfer in old pipe in (%):");
+//part 4
+P2=-u^2*rhon/2+g*(h1)*rhon+abs(W+2)*rhon;
+disp(P2/1000,"The gauge pressure at pump outlet when piping is old in (kPa)" ); \ No newline at end of file
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