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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 11:Thermodynamic relations Equilibrium and stability"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.3:pg-436"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 11.3\n",
"\n",
" Vapour pressure of benzene is 17.6682592008 kPa\n"
]
}
],
"source": [
"import math\n",
"Tb = 353.0 # boiling point of benzene in K\n",
"T = 303.0 # Operational temperature in K\n",
"R = 8.3143 #Gas constant\n",
"P = 101.325*math.exp((88/R)*(1.0-(Tb/T)))\n",
"\n",
"print \"\\n Example 11.3\"\n",
"print \"\\n Vapour pressure of benzene is \",P ,\" kPa\"\n",
"#The answers vary due to round off error\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.4:pg-436"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 11.4\n",
"\n",
" Temperature at triple point is 195.197740113 K\n",
"\n",
" Pressure at triple point is 44.631622076 mm Hg\n",
"\n",
"\n",
" Latent heat of sublimation is 31211.8822 kJ/kg mol\n",
"\n",
" Latent heat of vapourization is is 25466.7009 kJ/kg mol\n",
"\n",
" Latent heat of fusion is 5745.1813 kJ/kg mol\n"
]
}
],
"source": [
"import math\n",
"T = (3754-3063)/(23.03-19.49) # Temperature at triple point in K\n",
"P = math.exp(23.03-(3754/195.2)) # Pressure at triple point\n",
"R = 8.3143 # Gas constant\n",
"Lsub = R*3754 # Latent heat of sublimation\n",
"Lvap = 3063*R # Latent heat of vaporisation\n",
"Lfu = Lsub-Lvap # Latent heat of fusion\n",
"\n",
"print \"\\n Example 11.4\"\n",
"print \"\\n Temperature at triple point is \",T ,\" K\"\n",
"print \"\\n Pressure at triple point is \",P ,\" mm Hg\"\n",
"print \"\\n\\n Latent heat of sublimation is \",Lsub ,\" kJ/kg mol\"\n",
"print \"\\n Latent heat of vapourization is is \",Lvap ,\" kJ/kg mol\"\n",
"print \"\\n Latent heat of fusion is \",Lfu ,\" kJ/kg mol\"\n",
"#The answers vary due to round off error\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.6:pg-438"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 11.6\n",
"\n",
"\n",
" Energy of first system is 1.6212885 kJ,\n",
" Energy of second system is 2.43193275 kJ,\n",
" Volume of first system is 0.008 m**3,\n",
" Volume of second system is 0.012 m**3,\n",
" Pressure is 135.107375 kN/m**2,\n",
" Temperature is 260.0 K.\n"
]
}
],
"source": [
"\n",
"R = 8.3143 # Gas constant in kJ/kg-mol-K\n",
"N1 = 0.5 # Mole no. of first system\n",
"N2 = 0.75 # Mole no. of second system\n",
"T1 = 200 # Initial temperature of first system in K\n",
"T2 = 300 # Initial temperature of second system in K\n",
"v = 0.02 # Total volume in m**3\n",
"print \"\\n Example 11.6\\n\"\n",
"Tf = (T2*N2+T1*N1)/(N1+N2)\n",
"Uf_1 = (3.0/2.0)*(R*N1*Tf)*(10**-3)\n",
"Uf_2 = (3.0/2.0)*(R*N2*Tf)*(10**-3)\n",
"pf = (R*Tf*(N1+N2)*(10**-3))/v\n",
"Vf_1 = R*N1*(10**-3)*Tf/pf\n",
"Vf_2 = v-Vf_1\n",
"print \"\\n Energy of first system is \",Uf_1 ,\" kJ,\\n Energy of second system is \",Uf_2 ,\" kJ,\\n Volume of first system is \",Vf_1 ,\" m**3,\\n Volume of second system is \",Vf_2 ,\" m**3,\\n Pressure is \",pf ,\" kN/m**2,\\n Temperature is \",Tf ,\" K.\"\n",
"#The answers vary due to round off error\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.10:pg-446"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 11.10 \n",
"\n",
" Power required to run the compressor = -10.6853713009 kW, \n",
" The rate at which heat must be removed from the compressor = -11.9346733668 kW\n"
]
}
],
"source": [
"import math\n",
"R = 0.082 # Gas constant in litre-atm/gmol-K\n",
"m = 1.5 # Mass flow rate in kg/s\n",
"p1 = 1.0 # Pressure in atm\n",
"t2 = 300.0 # Temperature after compression in K\n",
"p2 = 400.0 # Pressure after compression in atm\n",
"Tc = 151.0 # For Argon in K\n",
"pc = 48.0 # For Argon in atm\n",
"print \"\\n Example 11.10 \"\n",
"a = 0.42748*((R*1000)**2)*((Tc)**2)/pc\n",
"b = 0.08664*(R*1000)*(Tc)/pc\n",
"# By solving equation v2**2 - 49.24*v2**2 + 335.6*v2 - 43440 = 0\n",
"v2 = 56.8 # In cm**3/g mol\n",
"v1 = (R*1000)*(t2)/p1\n",
"delta_h = -1790 # In J/g mol\n",
"delta_s = -57 # In J/g mol\n",
"Q = (t2*delta_s*(10**5)/39.8)/(3600*1000)\n",
"W = Q - (delta_h*(10**5)/39.8)/(3600*1000)\n",
"print \"\\n Power required to run the compressor = \",W ,\" kW, \\n The rate at which heat must be removed from the compressor = \",Q ,\" kW\"\n",
"# Answers vary due to round off error.\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|