summaryrefslogtreecommitdiff
path: root/Mechanics_Of_Fluids/ch10.ipynb
blob: c141da0ef2a6176a4482261e36fb0b2742949d7e (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : Steady Flow in Pipes and Channels"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.1.1 page no : 269"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "#initialisation of variables\n",
      "Q= 450. \t\t\t#ft**3/sec\n",
      "k= 0.5\n",
      "i= 1./2000\n",
      "C= 105. \t\t\t#ft**1/2/sec\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "d= (((Q*math.sqrt(2./i))/(2*math.sqrt(1+k**2-k)*C))**(2./5))*(5.41/7.55)\n",
      "b= d/2.\n",
      "s= d*math.sqrt(1+k**2.)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' vertical= %.2f ft'%(d)\n",
      "print  '  horizontal= %.2f ft'%(s)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " vertical= 5.41 ft\n",
        "  horizontal= 6.05 ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.2.2 page no : 275"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "#initialisation of variables\n",
      "\n",
      "d= 6. \t\t\t#ft\n",
      "C= 95. \t\t\t#ft**0.5/sec\n",
      "i= 1./800\n",
      "m= 1.705 \t\t\t#ft\n",
      "a= 15.16\n",
      "g= 32.2 \t\t\t#ft**2/sec\n",
      "alpha = 15.30      # degree\t\t\t\n",
      "\n",
      "#CALCULATIONS\n",
      "theta = int(180 + 2*alpha)\n",
      "A= ((d/2)**2./2)*(((theta*math.pi)/180)+math.sin(math.radians(2*a)))\n",
      "u= C*math.sqrt(m*i)\n",
      "Q= A*u\n",
      "f= (2*g)/C**2.\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' rate of volumetric flow= %.1f ft**3/sec'%(Q)\n",
      "print  '  resistance factor= %.5f '%(f)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " rate of volumetric flow= 82.3 ft**3/sec\n",
        "  resistance factor= 0.00714 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.3.1 page no : 277"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "#initialisation of variables\n",
      "\n",
      "m= 6. \t\t\t#lb/sec\n",
      "w= 62.3\t\t\t#lb/ft**3\n",
      "s= 0.9\n",
      "l= 2500. \t\t\t#ft\n",
      "u= 0.115\n",
      "r= 8. \t\t\t#ft\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "\n",
      "#CALCULATIONS\n",
      "uc = round(2300*u/.25 * 1/(s*w),1)\n",
      "v = round(m/(s*w) * 1./(math.pi/4 *1./16),2)\n",
      "p1p2 = (r*u)/math.pi * l * 64**2 * 6 /(s*w*g)\n",
      "dp= 8.*u*l*r**4*m/(math.pi*s*w*g)\n",
      "P= m*dp/(s*w*550.)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' Critical Velocity is = %.1f ft/sec'%uc\n",
      "print  ' Actual Velocity is = %.2f ft/sec'%v\n",
      "print  ' Power required= %.f h.p'%(P)\n",
      "\n",
      "# Note : Answers may vary because of rounding error. Please calculate manually."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Critical Velocity is = 18.9 ft/sec\n",
        " Actual Velocity is = 2.18 ft/sec\n",
        " Power required= 2 h.p\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.4.1 page no: 282"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "#initialisation of variables\n",
      "p= 0.0024 \t\t\t#slug/ft**3\n",
      "u= 10. \t\t\t#ft/sec\n",
      "v= 3.75*10**-7 \t\t\t#slug\n",
      "d= 0.25\t\t\t#in\n",
      "u1= 100. \t\t\t#ft/sec\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "R= round(u*d*p/(12.*v),-1)\n",
      "f= round(16./R,3)\n",
      "F1= f*p*u**2*math.pi*d/(2*12.)\n",
      "R1= R*10.\n",
      "f1= 0.0791/R1**0.25\n",
      "F2= f1*p*u1**2*math.pi*d/(2*12*10.)\n",
      "C= F2/F1\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  '  Raynolds number = %.0f'%R\n",
      "print  '  resistance coefficient = %.2f '%(f)\n",
      "print  '  Drag force per foot length = %.2e lbf/ft'%(F1)\n",
      "print  '  Ratio of skin-friction drag forces per ft  = %.2f '%(C)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "  Raynolds number = 1330\n",
        "  resistance coefficient = 0.01 \n",
        "  Drag force per foot length = 9.42e-05 lbf/ft\n",
        "  Ratio of skin-friction drag forces per ft  = 6.14 \n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.4.2 pageno : 283\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "#initialisation of variables\n",
      "\n",
      "Q= 0.7\t\t\t#ft**3/sec\n",
      "a= 16.\n",
      "n= 0.65\n",
      "P= 5. \t\t\t#h.p\n",
      "l= 3000. \t\t\t#ft\n",
      "g= 32.2 \t\t\t#ft**2/sec \n",
      "d= 0.85 \t\t\t#gm/cc\n",
      "d1= 0.5 \t\t\t#ft\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "u= Q*a/math.pi\n",
      "u1= n*P*550.*g/(8*math.pi*u**2*l)\n",
      "v= u1/d\n",
      "R= round(u*d1*30.5**2/1.05,-1)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print \"Coefficient of viscosity is = %.2f ft/sec\"%u\n",
      "print  ' Reynolds number= %.f '%(R)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of viscosity is = 3.57 ft/sec\n",
        " Reynolds number= 1580 \n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.4.3 page no : 285"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \t\t\t\n",
      "#initialisation of variables\n",
      "\n",
      "u1= 80. \t\t\t#ft/sec\n",
      "c= 62.\n",
      "s= 0.25\n",
      "l= 11. \t\t\t#ft\n",
      "w= 62.3 \t\t\t#lb/ft**3\n",
      "u1= 80. \t\t\t#ft/sec\n",
      "d= 2. \t\t\t#lbf/in**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "u= u1*c/(l*w*s)\n",
      "P= ((u1/u)**2)*s*d*144./(l*w)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' water velocity = %.2f ft/sec'%(u)\n",
      "print  ' w pressure drop = %.3f lbf/ft**2 per ft length'%(P)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " water velocity = 28.95 ft/sec\n",
        " w pressure drop = 0.802 lbf/ft**2 per ft length\n"
       ]
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}