blob: b2ea5d7a9f7e1008495d35a8c5c34004a13c44a2 (
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
|
clc;clear;
//Example 3.13
//Answer of part c-d are having slight difference due to approximation in molar volumne in the textbook which here is caluculated to the approximation of 7 decimal digits
//given values
T=175;
v=0.00375;
Pex=10000;//experimentaion determination
//from Table A-1
R=0.2968// in kPa m^3/kg K
//calculating
//Part-a
P=R*T/v;
disp(round(P),'using the ideal-gas equation of state in kPa')
e=(P-Pex)/Pex*100;
disp(e,'error is');
//Part-b
//van der Waals constants from Eq. 3-23
a=0.175;
b=0.00138;
//from van der waal eq.
P=R*T/(v-b)-a/v^2;
disp(round(P),'using the van der Waals equation of state,');
e=(P-Pex)/Pex*100;
disp(e,'error is');
//Part-c
//constants in the Beattie-Bridgeman equation from Table 3–4
A=102.29;
B=0.05378;
c=4.2*10^4;
Ru=8.314;//in kPa m^3/kmol K
M=28.013;//molecular weight in kg/mol
vb=M*v;//molar vol.
P=(Ru*T)/(vb^2)*(1-((c)/(vb*T^3)))*(vb+B)-(A/vb^2);
disp(round(P),'using the Beattie-Bridgeman equation');
e=(P-Pex)/Pex*100;
disp(e,'error is');
//Part-d
//constants of Benedict-Webb-Rubin equation from Table 3–4
a=2.54;
b=0.002328;
c=7.379*10^4;
alp=1.272*10^-4;
Ao=106.73;
Bo=0.040704;
Co=8.164*10^5;
gam=0.0053;
P= ((Ru*T)/vb) + ( (Bo*Ru*T) - Ao - Co/T^2 )/ vb^2 + (b*Ru*T-a)/vb^3 +( a*alp/vb^6) + (c/(vb^3*T^2)) * (1 + (gam/vb^2)) * exp(-gam/vb^2);
disp(round(P),'using Benedict-Webb-Rubin equation');
e=(P-Pex)/Pex*100;
disp(e,'error is')
|