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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1:Fluid properties"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.1"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"## Finding Specific weight,Density,Specific Gravity\n",
"##Given\n",
"V = 0.001 ##volume in m^3\n",
"w = 9.6 ##weight in Newton\n",
"g = 9.81 ##gravitational force in m/s^2\n",
"\n",
"##calculation\n",
"spwt = (w/V) ##Specific weight in N/m^3\n",
"rho = (spwt/g) ##density in kg/m^3\n",
"spgr = (rho/1000) ##Specific gravity no units\n",
"\n",
"#Results\n",
"print \"specific weight = \",round(spwt),\"N/m^3\"\n",
"print \"density = \",round(rho),\"kg/m^3\"\n",
"print \"specific gravity = \",round(spgr,2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"specific weight = 9600.0 N/m^3\n",
"density = 979.0 kg/m^3\n",
"specific gravity = 0.98\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.3"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##Finding of Viscosity\n",
"##Given\n",
"dy=0.025E-3 ##distance in meter\n",
"du=0.5 ##velocity in m/s \n",
"tau=1.471 ##shear stress in N/m^2\n",
"##To Find\n",
"mu=tau*dy/du ##viscosity in Ns/m^2 \n",
"mu1=mu*10 ## Viscosity in poise\n",
"print \"Viscosity =\",mu,\" in Ns/m^2\"\n",
"print \"Viscosity =\",mu1,\" in poise\" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Viscosity = 7.355e-05 in Ns/m^2\n",
"Viscosity = 0.0007355 in poise\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.4"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##Finding of Diameter of water droplet\n",
"##Given\n",
"st=0.716 ##Surface Tension in N/m\n",
"p=0.147E4 ##Pressure in N/m^2\n",
"##To Find \n",
"d=4*st/p ##Diameter in meter \n",
"d1=d*1E2 ##Diameter in centimeter \n",
"d2=d*1E3 ##Diameter in millimeter\n",
"print \"Diameter =\",round(d,5),\"m\"\n",
"print \"Diameter =\",round(d1,5),\"cm\"\n",
"print \"Diameter =\",round(d2,5),\"mm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Diameter = 0.00195 m\n",
"Diameter = 0.19483 cm\n",
"Diameter = 1.9483 mm\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.5"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##Finding of Shear Stress\n",
"##Given\n",
"##du/dy = vg\n",
"vg=0.25 ##Velocity gradient in m/sec/meter\n",
"nu=6.30E-4 ##Kinematic viscosity in m^2/sec\n",
"rho=1268.4 ##Mass density in Kg/m^3\n",
"mu=rho*nu ##Dynamic Viscosity\n",
"##To Find\n",
"tau=mu*vg ##Shear stress in N/m^2\n",
"print \"Shear Stress =\",round(tau,3),\"N/m^2\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Shear Stress = 0.2 N/m^2\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.6"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##Finding of increase of Pressure\n",
"##Given\n",
"k=2.07*1E6 ## Bulk Modulus in kN/m^2\n",
"dv=0.01 ##Change in Volume\n",
"##To Find\n",
"p=k*(dv) ##Change in pressure\n",
"print \"Increase in Pressure =\",p,\"kN/m^2\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Increase in Pressure = 20700.0 kN/m^2\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.7"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import numpy as np\n",
"##Finding of Cappilary rise\n",
"##Given\n",
"d=0.03*1E-2 ##Diameter in meter\n",
"st=0.0735 ##Surface Tension in N/m\n",
"x=0 ##contact angle in degree\n",
"w=1000*9.81\n",
"##To Find\n",
"h=(4*st)*np.cos(x)/(w*d)\n",
"h1=h*1E2\n",
"print \"Capillary rise =\",round(h,4),\"m\"\n",
"print \"Capillary rise =\",round(h1,4),\"cm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Capillary rise = 0.0999 m\n",
"Capillary rise = 9.9898 cm\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"##Finding of Kinematic Viscosity\n",
"##Given\n",
"tau=0.2158 ##Shear stress in N/m^2\n",
"vg=0.218 ##Velocity Gradient in sec^-1\n",
"rho=959.5 ##Density in Kg/m^3;\n",
"##To Find \n",
"mu=tau*1/vg\n",
"print \"Dynamic Viscosity =\",round(mu,5),\"Ns/m^2\"\n",
"nu=mu/rho\n",
"print \"Kinematic Viscosity =\",round(nu,5),\"m^2/sec\"\n",
"nu1=nu*1E4\n",
"print \"Kinematic Viscosity =\",round(nu1,5),\"cm^2/sec\"\n",
"nu2=nu1*1E-4\n",
"print \"Kinematic Viscosity =\",round(nu2,5),\"strokes\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Dynamic Viscosity = 0.98991 Ns/m^2\n",
"Kinematic Viscosity = 0.00103 m^2/sec\n",
"Kinematic Viscosity = 10.31692 cm^2/sec\n",
"Kinematic Viscosity = 0.00103 strokes\n"
]
}
],
"prompt_number": 15
}
],
"metadata": {}
}
]
}
|