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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
{
"metadata": {
"name": "",
"signature": "sha256:0acf769d31306f5bc291e2574308a74de8651b4a4723b52ee59419306e6b7112"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1 : Introduction"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.1 Page No : 20"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"d_r = 13640.; \t\t\t# Density of mercury in kg/m3\n",
"g = 9.79; \t\t\t # Acceleration due to gravity in m/s2\n",
"z = 562e-03; \t\t\t# Difference in height in m\n",
"z0 = 761e-03; \t\t\t# Reading of barometer in m\n",
"\n",
"# Calculation\n",
"P = (d_r*g*(z+z0))*(0.987/1e05); \t\t\t# Gas Pressure in bar\n",
"\n",
"# Results\n",
"print \"Gas Pressure is %.3f bar\"%P\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Gas Pressure is 1.744 bar\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.2 Page No : 21"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"d_r = 13.6e03; \t\t\t# Density of mercury in kg/m3\n",
"g = 9.81; \t\t\t# Acceleration due to gravity in m/s2\n",
"z = 710e-03; \t\t\t# Stean flow pressure in m\n",
"z0 = 772e-03; \t\t\t# Reading of barometer in m\n",
"P = 1.4e06; \t\t\t# Gauge pressure of applied steam in Pa\n",
"\n",
"# Calculation\n",
"P0 = d_r*g*z0; \t\t\t# Atmospheric pressure in Pa\n",
"Pi = P+P0 ; \t\t\t# Inlet steam pressure in Pa\n",
"Pc = d_r*g*(z0-z); \t\t\t# Condenser pressure in Pa\n",
"\n",
"# Results\n",
"print \"Inlet steam pressure is %.3e Pa\"%Pi\n",
"print \"Condenser pressure is %.2e Pa\"%Pc\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Inlet steam pressure is 1.503e+06 Pa\n",
"Condenser pressure is 8.27e+03 Pa\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.3 Page No : 21"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"z = 0.760; \t\t\t# Barometer reading in m\n",
"# Part (a)\n",
"h1 = 40e-02; \t\t\t# Mercury height in vaccume in m\n",
"d_r = 13.6e03; \t\t\t# Density of mercury in kg/m3\n",
"g = 9.80; \t\t\t# Acceleration due to gravity in m/s2\n",
"\n",
"# Calculation and Results\n",
"Patm = z*d_r*g; \t\t\t# Atmospheric pressure in Pas\n",
"Pv = h1*d_r*g; \t\t\t# Pressue in vaccume in Pa\n",
"Pabst = Patm-Pv; \t\t\t# Absolute pressure in Pa\n",
"Pabs = 101.325 - Pv/1000\n",
"\n",
"print \"Pvaccum = %.2f kPa\"%(Pv/1000)\n",
"print \"Pabsolute = %.f\"%(Pabst/1000),\"kPa\"\n",
"print \"40 cmHg vacuum : %.3f kPa\"%Pabs\n",
"\n",
"# Part (b)\n",
"h2 = 90e-02; \t\t\t# Mercury height in gauge in m\n",
"Pg = h2*d_r*g; \t\t\t# Gauge Pressure in Pa\n",
"Pabs1 = Patm + Pg ; \t\t\t# Absolute pressure in Pa\n",
"\n",
"print \"\\nPgauge = %.f kPa\"%(Pg/1000)\n",
"print \"90cmHg gauge is %.3f\"%(Pabs1/1000),\"kPa\"\n",
"\n",
"# Part(c)\n",
"d_w = 1e03 ; \t\t\t# Density of water in kg/m3\n",
"h3 = 1.2 ; \t\t\t# Gauge Pressure water height in m\n",
"Pga = d_w*h3*g; \t\t\t# Gauge Pressure in Pa\n",
"Pabs3 = Patm + Pga ; \t\t\t# Absolute pressure in Pa\n",
"print \"\\n1.2 m H2O gauge is %.3f\"%(Pabs3/1000),\"kPa\"\n",
"\n",
"# rounding off error"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Pvaccum = 53.31 kPa\n",
"Pabsolute = 48 kPa\n",
"40 cmHg vacuum : 48.013 kPa\n",
"\n",
"Pgauge = 120 kPa\n",
"90cmHg gauge is 221.245 kPa\n",
"\n",
"1.2 m H2O gauge is 113.053 kPa\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.4 Page No : 22"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from scipy.integrate import quad\n",
"\n",
"# Variables\n",
"Pr = 1.033e05; \t\t\t# Required Pressure in bar\n",
"\n",
"# Calculation\n",
"def pressure(p):\n",
" return p**(-0.714);\n",
"g = 9.81; \t\t\t# Acceleration due to gravity in m/s2\n",
"H = ((2.5e05**0.714)/g)* quad(pressure,0,Pr)[0]; \t\t\t# Depth of atmosphere required in m\n",
"\n",
"# Results\n",
"print \"The depth of atmosphere required is %.3f Km\"%(H/1000)\n",
" \n",
"# note : there will be rounding off error because of quad function"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The depth of atmosphere required is 69.203 Km\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.5 Page No : 22"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"m = 68. ; \t\t\t# Astronaut mass in Kg\n",
"g = 9.806; \t\t\t# Acceleration due to gravity in m/s2\n",
"\n",
"# Calculation\n",
"a = 10*g ; \t\t\t# Lift off acceleration in m/s2\n",
"F = m*a; \t\t\t# Net vertical force in N\n",
"\n",
"# Results\n",
"print \"Net vertical force experienced by astronaut is %.0f N\"%F\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Net vertical force experienced by astronaut is 6668 N\n"
]
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}
|