summaryrefslogtreecommitdiff
path: root/mechanics_of_fluid/Chapter6-.ipynb
blob: 40c8d053e20d7a2e56730d427021895203db24f3 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:1481d1999e9016b92221ce8448ff32599db545d782d2bf3365587f6b7e7a231e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter6- Laminar Flow Between Solid Boundaries"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg196"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Reynolds number and Maximum velocity and Volumetric flow rate and \"Pressure gradient along the pipe\n",
      "RD=0.83;\n",
      "rho_w=1000.; ## density of water in kg/m^3\n",
      "v=2.3; ## m/s\n",
      "d=0.012; ## m\n",
      "u=0.08; ## dynamic viscocity in kg/m/s\n",
      "\n",
      "rho_oil=RD*rho_w;\n",
      "\n",
      "Re=rho_oil*v*d/u;\n",
      "print'%s %.1f %s'%(\"Reynolds number =\",Re,\"\")\n",
      "\n",
      "v_max=2*v;\n",
      "print'%s %.1f %s'%(\"Maximum velocity =\",v_max,\"m/s^-1\")\n",
      "\n",
      "\n",
      "Q=math.pi/4*d**2*v;\n",
      "print'%s %.2f %s'%(\"Volumetric flow rate =\",Q,\"m^3/s^-1\")\n",
      "\n",
      "\n",
      "p=-128.*Q*u/math.pi/d**4;\n",
      "print'%s %.3f %s'%(\"Pressure gradient along the pipe = \",p,\"Pa/m^-1\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reynolds number = 286.3 \n",
        "Maximum velocity = 4.6 m/s^-1\n",
        "Volumetric flow rate = 0.00 m^3/s^-1\n",
        "Pressure gradient along the pipe =  -40888.889 Pa/m^-1\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Rate at which oil must be supplied\n",
      "c=0.001; ## m\n",
      "p1=15*10**3; ## Pa\n",
      "u=0.6; ## kg/m/s\n",
      "R=6.; ## ratio of R2/R1\n",
      "\n",
      "Q=math.pi*c**3*p1/(6*u*math.log(R));\n",
      "print'%s %.8f %s'%(\"Rate at which oil must be supplied =\",Q,\"m^3/s\")\n",
      "#without round off error we cant get exact result \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate at which oil must be supplied = 0.00000731 m^3/s\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg206"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate \"The load the pad will support and The rate at which oil must be supplied\n",
      "F=6*10**3; ## Pa\n",
      "b=0.12; ## m\n",
      "\n",
      "f=F*b;\n",
      "print'%s %.f %s'%(\"The load the pad will support =\",f,\"N/m\")\n",
      "\n",
      "\n",
      "dp=12*10**3; ## N/m^2\n",
      "dx=0.12; ## m\n",
      "c=0.00018; ## m\n",
      "u=0.5; ## kg/m/s\n",
      "V=5.; ## m/s\n",
      "\n",
      "q=(dp/dx)*c**3/12./u + V*c/2.;\n",
      "print'%s %.5f %s'%(\"The rate at which oil must be supplied =\",q,\"m^2/s\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The load the pad will support = 720 N/m\n",
        "The rate at which oil must be supplied = 0.00045 m^2/s\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg209"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate \"Velocity of the dashpot\n",
      "d_p=0.05; ## diameter of piston in m\n",
      "d_c=0.0504; ## diameter of cylinder in m\n",
      "SG=0.87;\n",
      "rho_w=1000.; ## kg/m^3\n",
      "v=10**-4; ## m^2/s\n",
      "dp=1.4*10**6; ## Pa\n",
      "l=0.13; ## m\n",
      "\n",
      "c=(d_c-d_p)/2.; ## clearance\n",
      "\n",
      "u=SG*rho_w*v; ## Dynamice viscocity\n",
      "\n",
      "Vp=dp*c**3/(6.*u*l*(d_p/2.+c));\n",
      "print'%s %.4f %s'%(\"Velocity of the dashpot =\",Vp,\"m/s\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of the dashpot = 0.0065 m/s\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg214"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#calculate Dynamic viscosity and Kinematic viscosity and Reynolds number of sphere and Reynolds number\n",
      "\n",
      "d=0.00475; ## m\n",
      "g=9.81; ## m/s^2\n",
      "rho_s=1151.; ## kg/m^3\n",
      "rho=880.; ## kg/m^3\n",
      "u=0.006; ## m/s\n",
      "\n",
      "F=math.pi/6.*d**3*g*(rho_s-rho);\n",
      "\n",
      "rat_d=0.25; ## ratio of d/D\n",
      "rat_F=1.8; ## ratio of F/Fo\n",
      "\n",
      "dynamic=F/(1.8*3*math.pi*u*d);\n",
      "\n",
      "kinematic=dynamic/rho;\n",
      "\n",
      "print'%s %.3f %s'%(\"Dynamic viscosity = \",dynamic,\"kg/m/s\")\n",
      "\n",
      "\n",
      "print'%s %.5f %s'%(\"Kinematic viscosity =\",kinematic,\"m^2/s\")\n",
      "\n",
      "\n",
      "print(\"Reynolds number of sphere \")\n",
      "\n",
      "Re=rho*u*d/dynamic;\n",
      "print'%s %.3f %s'%(\"Reynolds number =\",Re,\"\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Dynamic viscosity =  0.309 kg/m/s\n",
        "Kinematic viscosity = 0.00035 m^2/s\n",
        "Reynolds number of sphere \n",
        "Reynolds number = 0.081 \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg218"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate viscosity of the liquid \n",
      "D=0.120; ## m\n",
      "h=0.08; ## m\n",
      "c=0.001; ## m\n",
      "t=0.01875; ## m\n",
      "rev=65.; ## revolutions per min\n",
      "T=4*10**-3; ## N.m\n",
      "\n",
      "K1=math.pi*h/4./c;\n",
      "K2=math.pi/32./t;\n",
      "\n",
      "u=T/(rev*2*math.pi/60.)/(K1*D**3+K2*D**4);\n",
      "print'%s %.4f %s'%(\"viscosity of the liquid =\",u,\"pa.s\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "viscosity of the liquid = 0.0054 pa.s\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg229"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate Volumetric flow rate of oil and The load supported by the bearing\n",
      "V=10.; ## m/s\n",
      "h1=0.0005; ## m\n",
      "h2=0.00025; ## m\n",
      "L=0.1; ## m\n",
      "b=0.1; ## m\n",
      "RD=0.87;\n",
      "u=2*10**-4; ## m^2/s\n",
      "rho_w=1000.; ## kg/m^3\n",
      "\n",
      "H=h1/h2;\n",
      "\n",
      "Q=V/2*(1+H**2)/(1+H**3)*b*h1;\n",
      "print'%s %.5f %s'%(\"Volumetric flow rate of oil =\",Q,\"m^3/s\")\n",
      "\n",
      "\n",
      "F=V/2.*(1.-(1.+H**2)/(1.+H**3))*12.*RD*rho_w*u/h1**2*L**2/4.*b;\n",
      "print'%s %.1f %s'%(\"The load supported by the bearing =\",F,\"N\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volumetric flow rate of oil = 0.00014 m^3/s\n",
        "The load supported by the bearing = 4640.0 N\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}