summaryrefslogtreecommitdiff
path: root/sample_notebooks/kumargugloth/Chapter1.ipynb
blob: df9ba4d0aadb71dc6e143916ff12f8d68a85735e (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
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
 "metadata": {
  "name": "",
  "signature": "sha256:84e452258bd05b64c16351467c4970051f4494cb47d7a832df03bdce07abddb8"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter1-Introduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      " #determine\n",
      "##This numerical is Ex 1_1E,page 9.\n",
      "Pso=20.5\n",
      "Psc=20.5*550##converting hp to fps system\n",
      "Qo=385.\n",
      "Qc=385./449.##converting gpm to ft^3/s\n",
      "E=0.83\n",
      "dp=E*Psc/(Qc*144.)\n",
      "print\"%s %.2f %s \"%('The pressure rise is ',dp,' psi')\n",
      "print(\"After rounding off,pressure rise is 75.8 psi\")\n",
      "dpr=75.8\n",
      "dHw=75.8*144/62.4##62.4 is accelaration due to gravity in fps system\n",
      "print\"%s %.2f %s \"%(' The head of water is ',dHw,' ft of water')\n",
      "print(\"After rounding off the value of head of water the answer is 175 ft of water.\")\n",
      "dhwr=175##rounded off value of head of water\n",
      "sg=0.72##specific gravity of oil\n",
      "dHo=dhwr/sg\n",
      "print\"%s %.2f %s \"%(' The head of oil is ',dHo,' ft of oil')\n",
      "print(\"After rounding off the value of head of oil the answer is 243 ft of oil.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pressure rise is  75.79  psi \n",
        "After rounding off,pressure rise is 75.8 psi\n",
        " The head of water is  174.92  ft of water \n",
        "After rounding off the value of head of water the answer is 175 ft of water.\n",
        " The head of oil is  243.06  ft of oil \n",
        "After rounding off the value of head of oil the answer is 243 ft of oil.\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg10"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "#determine\n",
      "##This numerical is Ex 1_1S,page 10.\n",
      "E=0.83##efficiency\n",
      "Ps=15300.\n",
      "Q=87.4\n",
      "Qs=87.4/3600.##flow rate in meter cube per sec\n",
      "rho=998.\n",
      "g=9.81\n",
      "sg=0.72\n",
      "dp=E*Ps/Qs\n",
      "print\"%s %.2f %s \"%('\\n The change in pressure (dp)is ',dp,'')\n",
      "dpr=523000##rounded value of dp\n",
      "print(\"The rounded off value of dp is 523kPa.\")\n",
      "dHw=dpr/(rho*g)\n",
      "print\"%s %.2f %s \"%(' dHw is equal to ',dHw,' m of water')\n",
      "print(\"The rounded off value of dHw is 53.4 m of water.\")\n",
      "dHwr=53.4##rounded off value of dHw\n",
      "print(\"Thus we can determine head of oil.\")\n",
      "dHoil=dHwr/sg\n",
      "print\"%s %.2f %s \"%(' dHoil is given by ',dHoil,' m of oil')\n",
      "print(\"The rounded off value of dHoil is 74.2 m of oil.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        " The change in pressure (dp)is  523070.94  \n",
        "The rounded off value of dp is 523kPa.\n",
        " dHw is equal to  53.42  m of water \n",
        "The rounded off value of dHw is 53.4 m of water.\n",
        "Thus we can determine head of oil.\n",
        " dHoil is given by  74.17  m of oil \n",
        "The rounded off value of dHoil is 74.2 m of oil.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg10"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine\n",
      "##This numerical is Ex 1_2E,page 10.\n",
      "Q=12000.\n",
      "A=3.5\n",
      "rho_a=0.0762\n",
      "E=0.85\n",
      "r=2.5##resistance of duct system\n",
      "V=Q/(60.*A)\n",
      "print\"%s %.2f %s \"%('The air flow velocity at discharge is ',V,' ft/s')\n",
      "KE=(rho_a*(V**2))/(32.2*2)\n",
      "print\"%s %.2f %s \"%('\\n The product is ',KE,' lb/ft^2')\n",
      "##PE=KE\n",
      "Hv=KE/62.4\n",
      "print\"%s %.2f %s \"%('\\n The dynamic head is ',Hv,' ft')\n",
      "print(\"The value of dynamic head in inches of water is 0.74.\")\n",
      "Hvi=0.74##Head in inches\n",
      "Ht=r+Hvi\n",
      "print\"%s %.2f %s \"%('\\n The total head is ',Ht,' inches of water')\n",
      "p_tot=Ht*62.4\n",
      "Ps=Q*p_tot/(60.*12.*E)\n",
      "print\"%s %.2f %s \"%('\\n The shaft power is ',Ps,' ft-lb/s')\n",
      "print(\"The shaft power is 7.2 hp.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The air flow velocity at discharge is  57.14  ft/s \n",
        "\n",
        " The product is  3.86  lb/ft^2 \n",
        "\n",
        " The dynamic head is  0.06  ft \n",
        "The value of dynamic head in inches of water is 0.74.\n",
        "\n",
        " The total head is  3.24  inches of water \n",
        "\n",
        " The shaft power is  3964.24  ft-lb/s \n",
        "The shaft power is 7.2 hp.\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##This numerical is Ex 1_2S,page 11.\n",
      "Q=340.\n",
      "A=0.325\n",
      "V=Q/(60.*A)\n",
      "print\"%s %.2f %s \"%('The air flow velocity at discharge is ',V,' m/s')\n",
      "rho_a=1.22\n",
      "Vr=17.4\n",
      "Hd=(rho_a*(Vr**2))/2.\n",
      "print\"%s %.2f %s \"%('\\n The dynamic pressure head is ',Hd,' Pa')\n",
      "Hdr=184.7##rounded off value of Hd\n",
      "rho_w=998.##density of water=rhow\n",
      "g=9.81\n",
      "H=0.0635\n",
      "dp=rho_w*g*H##static pressure head\n",
      "print\"%s %.2f %s \"%('\\n The static pressure head is ',dp,' Pa')\n",
      "dpr=621.7\n",
      "p_tot=Hdr+dpr\n",
      "print\"%s %.2f %s \"%('\\n The total pressure head is ',p_tot,' Pa')\n",
      "p_tot=806.4\n",
      "E=0.85##efficiency\n",
      "Ps=Q*p_tot/(60*E)\n",
      "print\"%s %.2f %s \"%('\\n The shaft power is',Ps, 'W')\n",
      "print(\"The shaft power is 5.376 kW.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The air flow velocity at discharge is  17.44  m/s \n",
        "\n",
        " The dynamic pressure head is  184.68  Pa \n",
        "\n",
        " The static pressure head is  621.69  Pa \n",
        "\n",
        " The total pressure head is  806.40  Pa \n",
        "\n",
        " The shaft power is 5376.00 W \n",
        "The shaft power is 5.376 kW.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine \n",
      "import math\n",
      "##This numerical is Ex 1_3E,page 11.\n",
      "H=295.##net head in ft\n",
      "Q=148.##water flow rate\n",
      "n=1800.##rpm\n",
      "E=0.87##efficiency\n",
      "a=62.4##product of density and accelaration due to gravity\n",
      "omega=(n*2.*math.pi)/60.\n",
      "dp=a*H\n",
      "print\"%s %.2f %s \"%('The pressure is ',dp,' lb/ft^2')\n",
      "Ps=E*Q*dp\n",
      "print\"%s %.2f %s \"%('\\n Output power is equal to ',Ps,' lb-ft/s')\n",
      "print(\"The output output power can also be written as 2.37*10^6 lb-ft/s\")\n",
      "print(\"Output power in terms of horsepower is given by 4309hp.\")\n",
      "Psr=2370000##rounded off value of Ps\n",
      "Torque=Psr/omega\n",
      "print\"%s %.2f %s \"%(' The output torque is ',Torque,' lb-ft.')\n",
      "print(\"The output torque can also be written as 12.57*10^3 lb-ft\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pressure is  18408.00  lb/ft^2 \n",
        "\n",
        " Output power is equal to  2370214.08  lb-ft/s \n",
        "The output output power can also be written as 2.37*10^6 lb-ft/s\n",
        "Output power in terms of horsepower is given by 4309hp.\n",
        " The output torque is  12573.24  lb-ft. \n",
        "The output torque can also be written as 12.57*10^3 lb-ft\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#determine c\n",
      "import math\n",
      "##This numerical is Ex 1_3S,page 12.\n",
      "H=90.\n",
      "Q=4.2##water flow rate(in m^3/s)\n",
      "n=1800.\n",
      "E=0.87##efficiency\n",
      "rho=998.\n",
      "g=9.81\n",
      "omega=(n*2.*math.pi)/60.\n",
      "dp=rho*g*H\n",
      "print\"%s %.2f %s \"%('The pressure is ',dp,' N/m^2')\n",
      "Ps=E*Q*dp\n",
      "print\"%s %.2f %s \"%('\\n Output power is equal to ',Ps,' N-m/s')\n",
      "print(\"After rounding off the value of output power is 3220 kW.\")\n",
      "Psr=3220000.##rounded off value of Ps\n",
      "Torque=Psr/omega\n",
      "print\"%s %.2f %s \"%(' The output torque is ',Torque,' N-m.')\n",
      "print(\"After rounding off the output torque comes out to be 17.1*10^3 N-m.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pressure is  881134.20  N/m^2 \n",
        "\n",
        " Output power is equal to  3219664.37  N-m/s \n",
        "After rounding off the value of output power is 3220 kW.\n",
        " The output torque is  17082.63  N-m. \n",
        "After rounding off the output torque comes out to be 17.1*10^3 N-m.\n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}