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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
{
"metadata": {
"name": "",
"signature": "sha256:eb1b6239947f111d6ea8f1bcaafe0bb84b121b2561bbb9f5f8a8bdec77169fd2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter2:SOME CONCEPTS AND DEFINITIONS"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.1:pg-19"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 1\n",
"#weight of a person\n",
"\n",
"\n",
"m=1 #kg\n",
"g=9.75 #acc.due to gravity in m/s^2\n",
"F=m*g #weight of 1 kg mass in N\n",
"print\"\\n hence,weight of person is\",round(F,2),\" N\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence,weight of person is 9.75 N\n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.2:pg-24"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 2\n",
"#average volume and density\n",
"\n",
"Vliq=0.2 #volume of liquid in m^3\n",
"dliq=997 #density of liquid in kg/m^3\n",
"Vstone=0.12 #volume of stone in m^3\n",
"Vsand=0.15 #volume of sand in m^3\n",
"Vair=0.53 #vo;ume of air in m^3\n",
"mliq=Vliq*dliq #mass of liquid in kg\n",
"dstone=2750 #density of stone in kg/m^3\n",
"dsand=1500 #density of sand in kg/m^3\n",
"mstone=Vstone*dstone #volume of stone in m^3\n",
"msand=Vsand*dsand #volume of sand in m^3\n",
"Vtot=1 #total volume in m^3\n",
"dair=1.1 #density of air in kg/m^3\n",
"mair=Vair*dair #mass of air\n",
"mtot=mair+msand+mliq+mstone #total mass in kg\n",
"v=Vtot/mtot #specific volume in m^3/kg\n",
"d=1/v #overall density in kg/m^3\n",
"print\"\\n hence,average specific volume is\",round(v,6),\"m^3/kg\" \n",
"print\"\\n and overall density is\", round(d),\"kg/m^3\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence,average specific volume is 0.001325 m^3/kg\n",
"\n",
" and overall density is 755.0 kg/m^3\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.3:pg-26"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 3\n",
"#calculating the required force\n",
"import math\n",
"\n",
"Dcyl=0.1 #cylinder diameter in m\n",
"Drod=0.01 #rod diameter in m\n",
"Acyl=math.pi*Dcyl**2/4 #cross sectional area of cylinder in m^2\n",
"Arod=math.pi*Drod**2/4 #cross sectional area of rod in m^2\n",
"Pcyl=250000 #inside hydaulic pressure in Pa\n",
"Po=101000 #outside atmospheric pressure in kPa\n",
"g=9.81 #acc. due to gravity in m/s^2\n",
"mp=25 #mass of (rod+piston) in kg\n",
"F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g #the force that rod can push within the upward direction in N\n",
"print\"\\n hence,the force that rod can push within the upward direction is\",round(F,1),\" N\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence,the force that rod can push within the upward direction is 932.9 N\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.4:pg-28"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 4\n",
"#Calculating atmospheric pressure \n",
"\n",
"dm=13534 #density of mercury in kg/m^3\n",
"H=0.750 #height difference between two columns in metres\n",
"g=9.80665 #acc. due to gravity in m/s^2\n",
"Patm=dm*H*g/1000 #atmospheric pressure in kPa\n",
"print\"\\n hence, atmospheric pressure is\",round(Patm,2),\"kPa\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence, atmospheric pressure is 99.54 kPa\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.5:pg-28"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 5\n",
"#pressure inside vessel\n",
"\n",
"dm=13590 #density of mercury in kg/m^3\n",
"H=0.24 #height difference between two columns in metres\n",
"g=9.80665 #acc. due to gravity in m/s^2\n",
"dP=dm*H*g #pressure difference in Pa\n",
"Patm=13590*0.750*9.80665 #Atmospheric Pressure in Pa\n",
"Pvessel=dP+Patm #Absolute Pressure inside vessel in Pa\n",
"Pvessel=Pvessel/101325 #Absolute Pressure inside vessel in atm\n",
"print\"\\n hence, the absolute pressure inside vessel is\",round(Pvessel,3),\"atm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence, the absolute pressure inside vessel is 1.302 atm\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.6:pg-29"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 6\n",
"#calculating pressure\n",
"\n",
"dg=750 #density of gaasoline in kg/m^3\n",
"dR=1206 #density of R-134a in kg/m^3\n",
"H=7.5 #height of storage tank in metres\n",
"g=9.807 #acc. due to gravity in m/s^2\n",
"dP1=dg*g*H/1000 #in kPa\n",
"Ptop1=101 #atmospheric pressure in kPa\n",
"P1=dP1+Ptop1\n",
"print\"hence,pressure at the bottom of storage tank if fluid is gasoline is\",round(P1,1),\"kPa\" \n",
"dP2=dR*g*H/1000 #in kPa\n",
"Ptop2=1000 #top surface pressure in kPa\n",
"P2=dP2+Ptop2\n",
"print\"\\n hence, pressure at the bottom of storage tank if liquid is R-134a is\",round(P2),\"kPa\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"hence,pressure at the bottom of storage tank if fluid is gasoline is 156.2 kPa\n",
"\n",
" hence, pressure at the bottom of storage tank if liquid is R-134a is 1089.0 kPa\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex2.7:pg-29"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#example 7\n",
"#calculating balancing force\n",
"\n",
"Po=100#Outside atmospheric pressure in kPa\n",
"F1=25 #net force on the smallest piston in kN\n",
"A1=0.01 #cross sectional area of lower piston in m^2\n",
"P1=Po+F1/A1 #fluid pressure in kPa\n",
"d=900 #density of fluid in kg/m^3\n",
"g=9.81 #acc. due to gravity in m/s^2\n",
"H=6 #height of second piston in comparison to first one in m\n",
"P2=P1-d*g*H/1000 #pressure at higher elevation on piston 2 in kPa\n",
"A2=0.05 #cross sectional area of higher piston in m^3\n",
"F2=(P2-Po)*A2 #balancing force on second piston in kN\n",
"print\"\\n hence, balancing force on second larger piston is\",round(F2,1),\"N\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
" hence, balancing force on second larger piston is 122.4 N\n"
]
}
],
"prompt_number": 19
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|