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
65
66
67
68
69
70
71
72
|
{
"metadata": {
"name": "",
"signature": "sha256:b92f3dd9a653fad8ff6778b3bdb8771b55861aa679332e3055f634cfd8668cd9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 07: Properties of Real Gases"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example Problem 7.3, Page Number 166"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#Variable Declaration\n",
"m = 1.0 #Mass of Methane, kg\n",
"T = 230 #Temeprature of Methane, K\n",
"P = 68.0 #Pressure, bar \n",
"Tc = 190.56 #Critical Temeprature of Methane\n",
"Pc = 45.99 #Critical Pressure of Methane\n",
"R = 0.08314 #Ideal Gas Constant, L.bar/(mol.K)\n",
"M = 16.04 #Molecular wt of Methane\n",
"\n",
"#Calcualtions\n",
"Tr = T/Tc\n",
"Pr = P/Pc\n",
"z = 0.63 #Methane compressibility factor\n",
"n = m*1e3/M\n",
"V = z*n*R*T/P\n",
"Vig = n*R*T/P\n",
"DV = (V - Vig)/V\n",
"\n",
"#Results\n",
"print '(V-Videal) %4.2f L'%(V-Vig)\n",
"print 'Percentage error %5.2f'%(DV*100)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(V-Videal) -6.49 L\n",
"Percentage error -58.73\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|