summaryrefslogtreecommitdiff
path: root/1373/CH13
diff options
context:
space:
mode:
Diffstat (limited to '1373/CH13')
-rwxr-xr-x1373/CH13/EX13.1/Chapter13_Example1.sce25
-rwxr-xr-x1373/CH13/EX13.2/Chapter13_Example2.sce30
-rwxr-xr-x1373/CH13/EX13.3/Chapter13_Example3.sce18
-rwxr-xr-x1373/CH13/EX13.4/Chapter13_Example4.sce23
-rwxr-xr-x1373/CH13/EX13.5/Chapter13_Example5.sce22
-rwxr-xr-x1373/CH13/EX13.6/Chapter13_Example6.sce23
-rwxr-xr-x1373/CH13/EX13.7/Chapter13_Example7.sce20
-rwxr-xr-x1373/CH13/EX13.8/Chapter13_Example8.sce20
-rwxr-xr-x1373/CH13/EX13.9/Chapter13_Example9.sce21
9 files changed, 202 insertions, 0 deletions
diff --git a/1373/CH13/EX13.1/Chapter13_Example1.sce b/1373/CH13/EX13.1/Chapter13_Example1.sce
new file mode 100755
index 000000000..2951911b5
--- /dev/null
+++ b/1373/CH13/EX13.1/Chapter13_Example1.sce
@@ -0,0 +1,25 @@
+//Chapter-13, Example 13.1, Page 544
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+ro2=0.21;//Ratio of O2 in the mixture
+rn2=0.79;//Ratio of N2 in the mixture
+T=(25+273);//Temperature of container in degree C
+p=1;//Total pressure in atm
+
+//CALCULATIONS
+Co2=(ro2*10^5)/(8314*T);//Molar concentration of O2 in K.mol/m^3
+Cn2=(rn2*10^5)/(8314*T);//Molar concentration of N2 in K.mol/m^3
+po2=(32*Co2);//Mass density in kg/m^3
+pn2=(28*Cn2);//Mass density in kg/m^3
+p=(po2+pn2);//Overall mass density in kg/m^3
+mo2=(po2/p);//Mass fraction of O2
+mn2=(pn2/p);//Mass fraction of N2
+M=(ro2*32)+(rn2*28);//Average molecular weight
+
+//OUTPUT
+mprintf('Molar concentration of O2 is %3.4f K.mol/m^3 \n Molar concentration of N2 is %3.3f K.mol/m^3 \n Mass density of O2 is %3.3f kg/m^3 \n Mass density of N2 is %3.3f kg/m^3 \n Mole fraction of O2 is %3.2f \n Mole fraction of N2 is %3.2f \n Mass fraction of O2 is %3.3f \n Mass fraction of N2 is %3.3f \n Average molecular weight is %3.2f',Co2,Cn2,po2,pn2,ro2,rn2,mo2,mn2,M)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.2/Chapter13_Example2.sce b/1373/CH13/EX13.2/Chapter13_Example2.sce
new file mode 100755
index 000000000..f399645eb
--- /dev/null
+++ b/1373/CH13/EX13.2/Chapter13_Example2.sce
@@ -0,0 +1,30 @@
+//Chapter-13, Example 13.2, Page 545
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+yh2=0.4;//Mole fraction og H2
+yo2=0.6;//Mole fraction of O2
+vh2=1;//velocity of H2 in m/s
+vo2=0;//velocity of O2 in m/s
+
+//CALCULATIONS
+V=(yh2*vh2)+(yo2*vo2);//Molar average velocity in m/s
+M=(yh2*2)+(yo2*32);//Molecular weight of the mixture
+mh2=(yh2*2)/M;//Mass fraction of H2
+mo2=(yo2*32)/M;//Mass fraction of O2
+v=(mh2*vh2)+(mo2*vo2);//Mass average velocity in m/s
+x1=(mh2*vh2);//Mass flux
+x2=(mo2*vo2);//Mass flux
+y1=(v*vh2);//Molar flux
+y2=(yo2*vo2);//Molar flux
+jh2=(mh2*(vh2-v));//Mass diffusion flux
+jo2=(mo2*(vo2-v));//Mass diffusion flux
+Jh2=(yh2*(vh2-V));//Molar diffusion flux
+Jo2=(yo2*(vo2-V));//Molar diffusion flux
+
+//OUTPUT
+mprintf('Molar average velocity is %3.1f m/s \nMass average velocity is %3.2f m/s \n Mass flux of H2 when it is stationary is %3.2fp kg/m2.s3 \nMass flux of O2 when it is stationary is %3.0f kg/m^2.s \nMolar flux of H2 when it is stationary is %3.2fC k.mol/m^2.s \nMolar flux of O2 when it is stationary is %3.0f k.mol/m^2.s \nMass diffusion flux of H2 across a surface moving with mass average velocity is %3.4fp kg/m^2.s \nMass diffusion flux of O2 across a surface moving with mass average velocity is %3.4fp kg/m^2.s \nMolar diffusion flux across a surface moving with molar average velociy for H2 is %3.2fC k.mol/m^2.s \nMolar diffusion flux across a surface moving with molar average velociy for O2 is %3.2fC k.mol/m^2.s',V,v,x1,x2,y1,y2,jh2,jo2,Jh2,Jo2)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.3/Chapter13_Example3.sce b/1373/CH13/EX13.3/Chapter13_Example3.sce
new file mode 100755
index 000000000..44426c655
--- /dev/null
+++ b/1373/CH13/EX13.3/Chapter13_Example3.sce
@@ -0,0 +1,18 @@
+//Chapter-13, Example 13.3, Page 557
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+t=0.001;//Thickness of the membrane in m
+CA1=0.02;//Concentration of helium in the membrane at inner surface in k.mol/m^3
+CA2=0.005;//Concentration of helium in the membrane at outer surface in k.mol/m^3
+DAB=10^-9;//Binary diffusion coefficient in m^2/s
+
+//CALCULATIONS
+NAx=((DAB*(CA1-CA2))/t)/10^-9;//Diffusion flux of helium through the plastic in k.mol/sm^2 *10^-9
+
+//OUTPUT
+mprintf('Diffusion flux of helium through the plastic is %3.0f*10^-9 k.mol/sm^2',NAx)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.4/Chapter13_Example4.sce b/1373/CH13/EX13.4/Chapter13_Example4.sce
new file mode 100755
index 000000000..bc2141f27
--- /dev/null
+++ b/1373/CH13/EX13.4/Chapter13_Example4.sce
@@ -0,0 +1,23 @@
+//Chapter-13, Example 13.4, Page 557
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+T=273+25;//Temperature of Helium gas in K
+p=4;//Pressure of helium gas in bar
+Di=0.1;//Inner diamter of wall in m
+Do=0.003;//Outer diamter of wall in m
+DAB=(0.4*10^-13);//Binary diffusion coefficient in m^2/s
+S=(0.45*10^-3);//S value for differentiation
+
+//CALCULATIONS
+A=(3.14*Di^2);//Area in m^2
+V=(3.14*Di^3)/6;//Volume in m^3
+R=0.08316//Gas constant in m^3 bar/kmol.K
+d=((-6*R*T*DAB*S*p)/(Do*Di))/10^-11;//Decrease of pressure with time in bar/s*10^-11
+
+//OUTPUT
+mprintf('Initial rate of leakage for the system is provided by the decrease of pressure with time which is %3.2f*10^-11 bar/s',d)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.5/Chapter13_Example5.sce b/1373/CH13/EX13.5/Chapter13_Example5.sce
new file mode 100755
index 000000000..c9ec75714
--- /dev/null
+++ b/1373/CH13/EX13.5/Chapter13_Example5.sce
@@ -0,0 +1,22 @@
+//Chapter-13, Example 13.5, Page 558
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+po2=2;//Pressure of O2 in bar
+Di=0.025;//inside diamter of the pipe in m
+L=0.0025;//Wall thickness in m
+a=(0.21*10^-2);//Diffusivity of O2 in m^2/s
+S=(3.12*10^-3);//Solubility of O2 in k.mol/m^3.bar
+DAB=(0.21*10^-9);//Binary diffusion coefficient in m^2/s
+
+//CALCULATIONS
+CAi=(S*po2);//Concentration of O2 on inside surface in kmol/m^3
+RmA=((log((Di+(2*L))/Di))/(2*3.14*DAB));//Diffusion resistance in sm^2
+Loss=(CAi/RmA)/10^-11;//Loss of O2 by diffusion per meter length of pipe *10^-11
+
+//OUTPUT
+mprintf('Loss of O2 by diffusion per meter length of pipe is %3.2f*10^-11 kmol/s',Loss)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.6/Chapter13_Example6.sce b/1373/CH13/EX13.6/Chapter13_Example6.sce
new file mode 100755
index 000000000..b7d777ed1
--- /dev/null
+++ b/1373/CH13/EX13.6/Chapter13_Example6.sce
@@ -0,0 +1,23 @@
+//Chapter-13, Example 13.6, Page 560
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+p=1;//Pressure of system in atm
+T=25+273;//Temperature of system in K
+pco2=(190/760);//Partial pressure of CO2 at one end in atm
+pco2o=(95/760);//Partial pressure of CO2 at other end in atm
+DAB=(0.16*10^-4);//Binary diffusion coefficient in m^2/s from Table 13.3
+R=0.08205//Gas constant in m^3 atm/kmol.K
+
+//CALCULATIONS
+NAx=(DAB*(pco2-pco2o))/(R*T*p);//Equimolar counter diffusion in kmol/m^2s
+M=(NAx*3.14*(0.05^2/4)*3600);//Mass transfer rate in kmol/h
+MCO2=(M*44)/10^-5;//Mass flow rate of CO2 in kg/h *10^-5
+Mair=(29*-M)/10^-5;//Mass flow rate of air in kg/h *10^-5
+
+//OUTPUT
+mprintf('Mass transfer rate of CO2 is %3.2f*10^-5 kg/h \nMass transfer rate of air is %3.2f*10^-5 kg/h',MCO2,Mair)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.7/Chapter13_Example7.sce b/1373/CH13/EX13.7/Chapter13_Example7.sce
new file mode 100755
index 000000000..ec3ceb477
--- /dev/null
+++ b/1373/CH13/EX13.7/Chapter13_Example7.sce
@@ -0,0 +1,20 @@
+//Chapter-13, Example 13.7, Page 563
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+T=27+273;//Temperature of water in K
+D=0.02;//Diameter of the tube in m
+L=0.4;//Length of the tube in m
+DAB=(0.26*10^-4);//Diffusion coefficient in m^2/s
+
+//CALCULATIONS
+p=1.0132;//Atmospheric pressure in bar
+pA1=0.03531;//Vapour pressure in bar
+m=((p*10^5*3.14*(D/2)^2*18*DAB)/(8316*T*L))*(1000*3600)*log(p/(p-pA1));//Diffusion rate of water in gram per hour
+
+//OUTPUT
+mprintf('Diffusion rate of water is %3.4f gram per hour',m)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.8/Chapter13_Example8.sce b/1373/CH13/EX13.8/Chapter13_Example8.sce
new file mode 100755
index 000000000..6cf0169b3
--- /dev/null
+++ b/1373/CH13/EX13.8/Chapter13_Example8.sce
@@ -0,0 +1,20 @@
+//Chapter-13, Example 13.8, Page 564
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+T=25+273;//Temperature of water in K
+D=0.02;//Diameter of the tube in m
+L=0.08;//Length of the tube in m
+m=(8.54*10^-4);//Diffusion coefficient in kg/h
+
+//CALCULATIONS
+p=1.0132;//Atmospheric pressure in bar
+pA1=0.03165;//Vapour pressure in bar
+DAB=(((m/3600)*8316*T*L)/(p*10^5*3.14*(D/2)^2*18*log(p/(p-pA1))*10^2))/10^-4;//Diffusion coefficient of water in m^2/s *10^-4
+
+//CALCULATIONS
+mprintf('Diffusion coefficient of water is %3.3f*10^-4 m^2/s',DAB)
+
+//=================================END OF PROGRAM==============================
diff --git a/1373/CH13/EX13.9/Chapter13_Example9.sce b/1373/CH13/EX13.9/Chapter13_Example9.sce
new file mode 100755
index 000000000..dd9db3a57
--- /dev/null
+++ b/1373/CH13/EX13.9/Chapter13_Example9.sce
@@ -0,0 +1,21 @@
+//Chapter-13, Example 13.9, Page 569
+//=============================================================================
+clc
+clear
+
+//INPUT DATA
+CAs=0.02;//Carbon mole fraction
+CAo=0.004;//Content of steel
+CA=0.012;//Percet of depth
+d=0.001;//Depth in m
+H=(6*10^-10);//Diffusivity of carbon in m^2/s
+
+//CALCULATIONS
+X=(CA-CAs)/(CAo-CAs);//Calculation for erf function
+n=0.48;//erf(n)=0.5; n=0.48
+t=((d/(n*2))^2/(3600*H))*3600;//Time required to elevate the carbon content of steel in s
+
+//OUTPUT
+mprintf('Time required to elevate the carbon content of steel is %3.2f s',t)
+
+//=================================END OF PROGRAM==============================