diff options
Diffstat (limited to '1379/CH4')
-rwxr-xr-x | 1379/CH4/EX4.1.1/example4_1.sce | 47 | ||||
-rwxr-xr-x | 1379/CH4/EX4.1.2/example4_2.sce | 37 | ||||
-rwxr-xr-x | 1379/CH4/EX4.1.3/example4_3.sce | 26 | ||||
-rwxr-xr-x | 1379/CH4/EX4.1.4/example4_4.sce | 27 | ||||
-rwxr-xr-x | 1379/CH4/EX4.1.5/example4_5.sce | 30 | ||||
-rwxr-xr-x | 1379/CH4/EX4.1.6/example4_6.sce | 24 |
6 files changed, 191 insertions, 0 deletions
diff --git a/1379/CH4/EX4.1.1/example4_1.sce b/1379/CH4/EX4.1.1/example4_1.sce new file mode 100755 index 000000000..0dc7c8996 --- /dev/null +++ b/1379/CH4/EX4.1.1/example4_1.sce @@ -0,0 +1,47 @@ +
+
+//exapple 4.1
+clc; funcprot(0);
+// Initialization of Variable
+rho=998;
+rhom=1.354*10^4;//density of mercury
+M=2.83/100;
+mu=1.001/1000;
+mun=1.182/10^5;//vicosity of natural gas
+R=8.314;
+g=9.81;
+h=28.6/100;
+d=54/100;
+//part1
+nu=1/rho;
+delP=h*g*(rhom-rho);
+umax=sqrt(2*nu*delP);
+umax=round(umax*10)/10;
+disp(umax,"maximum fluid velocity in (m/s)");
+Re=umax*d*rho/mu;
+printf("reynold no. is %.2e",Re);
+//using chart
+u=0.81*umax;
+G=rho*pi*d^2/4*u;
+disp(G,"mass flow rate in (kg/s):");
+disp(G/rho,"Volumetric flow rate in (m^3/s):");
+//part2
+P1=689*1000;//initial pressure
+T=273+21;
+nu1=R*T/M/P1;
+nu1=round(nu1*10000)/10000;
+rhog=1/nu1;//density of gas
+h=17.4/100;
+P2=P1+h*(rho-rhog)*g;
+P2=round(P2/100)*100;
+umax2=sqrt(2*P1*nu1*log(P2/P1));
+disp(umax2,"maximum fluid velocity in (m/s)");
+Re=rhog*umax2*d/mun;
+printf("reynold no. is %.3e",Re);
+//from table
+u=0.81*umax2;
+Q=pi*d^2/4*u;
+disp(Q,"volumetric flow rate is (m^3/s):");
+disp(Q*rhog,"mass flow rate in (kg/s):")
+
+
diff --git a/1379/CH4/EX4.1.2/example4_2.sce b/1379/CH4/EX4.1.2/example4_2.sce new file mode 100755 index 000000000..9de3ab2db --- /dev/null +++ b/1379/CH4/EX4.1.2/example4_2.sce @@ -0,0 +1,37 @@ +
+
+//exapple 4.2
+clc; funcprot(0);
+// Initialization of Variable
+rd=[0 1 2.5 5 10 15 17.5]/100;//radial distance from pipe
+dlv=[0 0.2 0.36 0.54 0.81 0.98 1]/100;//differnce in liquid levels
+r=[.175 .165 .150 .125 .075 .025 0];//
+g=9.81;
+R=8.314;
+rho=999;
+temp=289;
+P1=148*1000;
+M=7.09/100;
+pi=3.12
+rhoCl2=P1*M/R/temp;//density of Cl2
+nuCl2=1/rhoCl2;//specific volume of Cl2
+function[y]=P2(x);
+ y=P1+x*(rho-rhoCl2)*g;
+endfunction
+for i=1:7
+ y=P2(dlv(i));
+ u(i)=sqrt(2*P1*nuCl2*log(y/P1));
+ a(i)=u(i)*r(i);
+end
+clf();
+plot(r,a);
+xtitle("","r (m)","u*r (m^2/s)");
+s=0;
+for i=1:6//itegration of the plotted graph
+ s=abs((r(i)-r(i+1))*.5*(a(i)+a(1+1)))+s;
+end
+s=s-0.01;
+Q=2*pi*s;
+disp(Q,"volumetric flow rate (m^3/s):");
+disp(Q*rhoCl2,"mass flow rate of chlorine gas (kg/s)")
+
diff --git a/1379/CH4/EX4.1.3/example4_3.sce b/1379/CH4/EX4.1.3/example4_3.sce new file mode 100755 index 000000000..8fc57a6c0 --- /dev/null +++ b/1379/CH4/EX4.1.3/example4_3.sce @@ -0,0 +1,26 @@ +
+
+//exapple 4.3
+clc; funcprot(0);
+// Initialization of Variable
+pi=3.14;
+Cd=0.61;
+rho=999;
+rhoo=877;//density of oil
+g=9.81;
+h=75/100;
+d=12.4/100;//dia of orifice
+d1=15/100;//inside diameter
+nuo=1/rhoo;//specific volume of oil
+//calculation
+//part1
+delP=h*(rho-rhoo)*g;
+A=pi*d^2/4;
+G=Cd*A/nuo*sqrt(2*nuo*delP/(1-(d/d1)^4));
+disp(G,"mass flow rate in (kg/s)")
+//part2
+h=(1+0.5)*d1;
+delP=rhoo/2*(G*nuo/Cd/A)^2*(1-(d/d1)^4)+h*rhoo*g;
+disp(delP,"pressuer differnce between tapping points");
+delh=(delP-h*rhoo*g)/(rho-rhoo)/g;
+disp(delh,"difference in water levels in manometer i (cm)")
diff --git a/1379/CH4/EX4.1.4/example4_4.sce b/1379/CH4/EX4.1.4/example4_4.sce new file mode 100755 index 000000000..b01c8bd4e --- /dev/null +++ b/1379/CH4/EX4.1.4/example4_4.sce @@ -0,0 +1,27 @@ +
+
+//exapple 4.4
+clc; funcprot(0);
+// Initialization of Variable
+rhom=1.356*10^4;//density mercury
+rhon=1266;//density NaOH
+Cd=0.61;
+g=9.81;
+Cdv=0.98;//coeff. of discharge of venturimeter
+Cdo=Cd;//coeff. of discharge of orificemeter
+d=6.5/100;
+pi=3.14;
+A=pi*d^2/4;
+Q=16.5/1000;
+h=0.2;//head differnce
+//calculation
+//part1
+delP=g*h*(rhom-rhon);
+G=rhon*Q;
+nun=1/rhon;//specific volume of NaOH
+Ao=G*nun/Cd*sqrt(1/(2*nun*delP+(G*nun/Cd/A)^2));//area of orifice
+d0=sqrt(4*Ao/pi)
+disp(d0*100,"diameter of orifice in (cm):");
+//part2
+a=(Cdv/Cdo)^2;
+disp(a,"ratio of pressure drop ")
diff --git a/1379/CH4/EX4.1.5/example4_5.sce b/1379/CH4/EX4.1.5/example4_5.sce new file mode 100755 index 000000000..a60dd976b --- /dev/null +++ b/1379/CH4/EX4.1.5/example4_5.sce @@ -0,0 +1,30 @@ +
+
+//exapple 4.5
+clc; funcprot(0);
+// Initialization of Variable
+M=3.995/100;
+g=9.81;
+R=8.314;
+Cd=0.94;
+temp=289;
+df=9.5/1000;//diameter of float
+Af=pi*df^2/4;//area of float
+P=115*10^3;
+V=0.92/10^6;
+rhoc=3778;//density of ceramic
+//calculation
+rho=P*M/R/temp;
+nu=1/rho;
+P=V*(rhoc-rho)*g/Af;
+disp(P,"pressure drop over the float in (Pa):");
+//part2
+x=.15/25*(25-7.6);
+L=df*100+2*x;
+L=L/100;
+A1=pi*L^2/4;
+A0=A1-Af;
+G=Cd*A0*sqrt(2*rho*P/(1-(A0/A1)^2));
+printf("mass flow rate in (kg/s) is %.3e",G);
+Q=G/rho;
+disp(Q,"Volumetric flow rate in (m^3/s):")
diff --git a/1379/CH4/EX4.1.6/example4_6.sce b/1379/CH4/EX4.1.6/example4_6.sce new file mode 100755 index 000000000..6212e45aa --- /dev/null +++ b/1379/CH4/EX4.1.6/example4_6.sce @@ -0,0 +1,24 @@ +
+
+//exapple 4.6
+clc; funcprot(0);
+// Initialization of Variable
+rho=999;
+rhos=8020;//density of steel
+g=9.81;
+pi=3.14;
+df=14.2/1000;//dia of float
+Af=pi*df^2/4;//area of float
+Cd=0.97;
+nu=1/rho;
+Q=4/1000/60;
+G=Q*rho;
+//calculation
+x=0.5*(18.8-df*1000)/280*(280-70);
+L=df*1000+2*x;
+L=L/1000;
+A1=pi*L^2/4;
+A0=A1-Af;
+Vf=Af/g/(rhos-rho)/2/nu*(G*nu/Cd/A0)^2*(1-(A0/A1)^2);
+m=Vf*rhos;
+disp(m*1000,"mass of float equired in (g):")
|