summaryrefslogtreecommitdiff
path: root/2870/CH13/EX13.2/Ex13_2.sce
blob: e6f0d69d9a0e344e50f17e389196223ec2fa66f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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');