summaryrefslogtreecommitdiff
path: root/2870/CH13
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2870/CH13
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2870/CH13')
-rwxr-xr-x2870/CH13/EX13.1/Ex13_1.sce43
-rwxr-xr-x2870/CH13/EX13.2/Ex13_2.sce64
-rwxr-xr-x2870/CH13/EX13.3/Ex13_3.sce39
-rwxr-xr-x2870/CH13/EX13.4/Ex13_4.sce20
-rwxr-xr-x2870/CH13/EX13.5/Ex13_5.sce68
-rwxr-xr-x2870/CH13/EX13.6/Ex13_6.sce36
6 files changed, 270 insertions, 0 deletions
diff --git a/2870/CH13/EX13.1/Ex13_1.sce b/2870/CH13/EX13.1/Ex13_1.sce
new file mode 100755
index 000000000..13834aa73
--- /dev/null
+++ b/2870/CH13/EX13.1/Ex13_1.sce
@@ -0,0 +1,43 @@
+clc;clear;
+//Example 13.1
+
+//given data
+mO2=3;
+mN2=5;
+mCH4=12;
+//molecular masses
+MO2=32;
+MN2=28;
+MCH4=16;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//calculations
+
+//part - a
+mm=mO2+mN2+mCH4;
+mfO2=mO2/mm;
+mfN2=mN2/mm;
+mfCH4=mCH4/mm;
+disp(mfO2,'mass fraction of oxygen is');
+disp(mfN2,'mass fraction of nitrogen is');
+disp(mfCH4,'mass fraction of methane is');
+
+//part - b
+NO2=mO2/MO2;
+NN2=mN2/MN2;
+NCH4=mCH4/MCH4;
+Nm=NO2+NN2+NCH4;
+yO2=NO2/Nm;
+yN2=NN2/Nm;
+yCH4=NCH4/Nm;
+disp(yO2,'mole fraction of oxygen is');
+disp(yN2,'mole fraction of nitrogen is');
+disp(yCH4,'mole fraction of methane is');
+
+//part - c
+Mm=mm/Nm;
+disp(Mm,'average molecular mass in kg/kmol');
+Rm=Ru/Mm;
+disp(Rm,'gas constant of mixture in kJ/kg - K')
diff --git a/2870/CH13/EX13.2/Ex13_2.sce b/2870/CH13/EX13.2/Ex13_2.sce
new file mode 100755
index 000000000..e6f0d69d9
--- /dev/null
+++ b/2870/CH13/EX13.2/Ex13_2.sce
@@ -0,0 +1,64 @@
+clc;clear;
+//Example 13.2
+
+//given data
+NN2=2;
+NCO2=6;
+Tm=300;
+Pm=15000;
+
+//constants used
+Ru=8.314;//in kJ/kmol - K
+
+//calculations
+
+//part - a
+Nm=NN2+NCO2;
+Vm=Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis of the ideal-gas equation of state in m^3');
+
+//part - b
+//from Table A-1
+//for nitrogen
+TcrN=126.2;
+PcrN=3390;
+//for Carbondioxide
+TcrC=304.2;
+PcrC=7390;
+yN2=NN2/Nm;
+yCO2=NCO2/Nm;
+Tcr=yN2*TcrN+yCO2*TcrC;
+Pcr=yN2*PcrN+yCO2*PcrC;
+Tr=Tm/Tcr;
+Pr=Pm/Pcr;
+//from Fig A-15b
+Zm=0.49;
+Vm=Zm*Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis Kay’s rule in m^3');
+
+//part - c
+//for nitrogen
+TrN=Tm/TcrN;
+PrN=Pm/PcrN;
+//from Fig A-15b
+Zn=1.02;
+//for Carbondioxide
+TrC=Tm/TcrC;
+PcrC=Pm/PcrC;
+//from Fig A-15b
+Zc=0.3;
+Zm=yN2*Zn+yCO2*Zc;
+Vm=Zm*Nm*Ru*Tm/Pm;
+disp(Vm,'the volume of the tank on the basis compressibility factors and Amagat’s law in m^3');
+
+//part - d
+VRN=(Vm/NN2)/(Ru*TcrN/PcrN);
+VRC=(Vm/NCO2)/(Ru*TcrC/PcrC);
+//from Fig A-15b
+Zn=0.99;
+Zc=0.56;
+Zm=yN2*Zn+yCO2*Zc;
+Vm=Zm*Nm*Ru*Tm/Pm;
+//When the calculations are repeated we obtain 0.738 m3 after the second iteration, 0.678 m3 after the third iteration, and 0.648 m3 after the fourth iteration.
+Vm=0.648;
+disp(Vm,'compressibility factors and Dalton’s law the volume of the tank on the basis in m^3');
diff --git a/2870/CH13/EX13.3/Ex13_3.sce b/2870/CH13/EX13.3/Ex13_3.sce
new file mode 100755
index 000000000..109bb61d0
--- /dev/null
+++ b/2870/CH13/EX13.3/Ex13_3.sce
@@ -0,0 +1,39 @@
+clc;clear;
+//Example 13.3
+
+//given data
+mN=4;
+T1N=20;
+P1N=150;
+mO=7;
+T1O=40;
+P1O=100;
+//molecular masses
+MO=32;
+MN=28;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+
+//from Table A-2a
+CvN=0.743;
+CvO=0.658;
+
+//calculations
+
+//part - a
+//Ein - Eout = dEsystem
+// (m*cv*dT)N2 + (m*cv*dT)= 0;
+Tm= (mN*CvN*T1N+ mO*CvO*T1O)/(mN*CvN+mO*CvO);
+disp(Tm,'the mixture temperature in C');
+
+//part - b
+NO=mO/MO;
+NN=mN/MN;
+Nm=NO+NN;
+VO=NO*Ru*(T1O+273)/P1O;
+VN=NN*Ru*(T1N+273)/P1N;
+Vm=VO+VN;
+Pm=Nm*Ru*(Tm+273)/Vm;
+disp(Pm,'the mixture pressure after equilibrium has been established in kPa')
diff --git a/2870/CH13/EX13.4/Ex13_4.sce b/2870/CH13/EX13.4/Ex13_4.sce
new file mode 100755
index 000000000..fb49a2d00
--- /dev/null
+++ b/2870/CH13/EX13.4/Ex13_4.sce
@@ -0,0 +1,20 @@
+clc;clear;
+//Example 13.4
+
+//given data
+NO=3;
+NC=5;//moles of oxygen and carbondioxide repesctively
+T0=25+273;//in K
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//calculations
+Nm=NO+NC;
+yO=NO/Nm;
+yC=NC/Nm;
+//dSm= -Ru*(NO*log(yO)+NC*log(yC))
+Sm=-Ru*(NO*log(yO)+NC*log(yC));
+disp(Sm,'the entropy change in kJ/K');
+Xdestroyed=T0*Sm/1000;
+disp(Xdestroyed,'exergy destruction associated in MJ')
diff --git a/2870/CH13/EX13.5/Ex13_5.sce b/2870/CH13/EX13.5/Ex13_5.sce
new file mode 100755
index 000000000..5e5da2d15
--- /dev/null
+++ b/2870/CH13/EX13.5/Ex13_5.sce
@@ -0,0 +1,68 @@
+clc;clear;
+//Example 13.5
+
+//given data
+T1=220;
+T2=160;
+Pm=10;
+yN=0.79;
+yO=0.21;//mole fractions of nitrogen and oxygen repesctively
+//critical properties
+//for Nitrogen
+TcrN=126.2;
+PcrN=3.39;
+//for Oxygen
+TcrO=154.8;
+PcrO=5.08;
+
+//constants used
+Ru=8.314;//in kJ/kg - K
+
+//from Tables A-18 & 19
+//at T1
+h1N=6391;
+h1O=6404;
+//for T2
+h2N=4648;
+h2O=4657;
+
+//calculations
+//part - a
+qouti=yN*(h1N-h2N)+yO*(h1O-h2O);
+qouti=ceil(qouti);
+disp(qouti,'the heat transfer during this process using the ideal-gas approximation in kJ/kmol');
+
+//part - b
+Tcrm=yN*TcrN+yO*TcrO;
+Pcrm=yN*PcrN+yO*PcrO;
+Tr1=T1/Tcrm;
+Tr2=T2/Tcrm;
+Pr=Pm/Pcrm;
+//at these values we get
+Zh1=1;
+Zh2=2.6;
+qout=qouti-Ru*Tcrm*(Zh1-Zh2);
+qout=ceil(qout);
+disp(qout,'the heat transfer during this process using Kay’s rule in kJ/kmol');
+
+//part - c
+//for nitrogen
+TrN1=T1/TcrN;
+TrN2=T2/TcrN;
+PrN=Pm/PcrN;
+//from Fig A-15b
+Zh1n=0.9;
+Zh2n=2.4;
+//for Oxygen
+TrO1=T1/TcrO;
+TrO2=T2/TcrO;
+PcrO=Pm/PcrO;
+//from Fig A-15b
+Zh1O=1.3;
+Zh2O=4.0;
+//from Eq 12-58
+h12N=h1N-h2N-Ru*TcrN*(Zh1n-Zh2n);// h1 - h2 for nitrogen
+h12O=h1O-h2O-Ru*TcrO*(Zh1O-Zh2O);// h1 - h2 for oxygen
+qout=yN*h12N+yO*h12O;
+qout=ceil(qout);
+disp(qout,'the heat transfer during this process using Amagat’s law in kJ/kmol');
diff --git a/2870/CH13/EX13.6/Ex13_6.sce b/2870/CH13/EX13.6/Ex13_6.sce
new file mode 100755
index 000000000..a1dd47006
--- /dev/null
+++ b/2870/CH13/EX13.6/Ex13_6.sce
@@ -0,0 +1,36 @@
+clc;clear;
+//Example 13.6
+//13.6 (d) answer not matching as float datatype is giving more accurate answer in comparison to textbook that has given approximate due to rounding off to two decimal places
+
+//given data
+mfs=0.0348;
+mfw=0.9652;
+T0=288.15;
+
+//constants used
+Mw=18;
+Ms=58.44;
+Rw=0.4615;
+pm=1028;
+Ru=8.314;
+
+//calculations
+//part - a
+Mm=1/((mfs/Ms)+(mfw/Mw));
+yw=mfw*Mm/Mw;
+ys=1-yw;
+disp(yw,'the mole fraction of the water');
+disp(ys,'the mole fraction of the saltwater');
+
+//part - b
+wmin=-Ru*T0*(ys*log(ys)+yw*log(yw));
+wm=wmin/Mm;
+disp(wm,'the minimum work input required to separate 1 kg of seawater completely into pure water and pure salts in kJ');
+
+//part - c
+wmin=Rw*T0*log(1/yw);
+disp(wmin,'the minimum work input required to obtain 1 kg of fresh water from the sea in kJ');
+
+//part - d
+Pmin=pm*Rw*T0*log(1/yw);
+disp(Pmin,'the minimum gauge pressure that the seawater must be raised if fresh water is to be obtained by reverse osmosis using semipermeable membranes in kPa')