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
|
{
"metadata": {
"name": "",
"signature": "sha256:0a4301c920a86f7888d81f22a80d24105313c5ae1dd42947a9f33bfe49dcea1b"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 11 : Steady Flow in Open Channels"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.1 Page No : 348"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"\t\n",
"#Initialization of variables\n",
"y = 3.4 \t#ft\n",
"n = 0.016\n",
"\t\n",
"#calculations\n",
"A = (10+2*y)*y\n",
"P = 10+ 2*math.sqrt(5) *y\n",
"Rh = A/P\n",
"f = 116*n**2 /Rh**(1./3)\n",
"e = 14.8*Rh/ 10**(1./2/math.sqrt(f))\n",
"\t\n",
"#Results\n",
"print \"absolute roughness of pipe = %.4f ft\"%(e)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"absolute roughness of pipe = 0.0159 ft\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.2 Page No : 362"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\n",
"#Initialization of variables\n",
"y = 1.495 \t#ft\n",
"Q = 14. \t#cfs\n",
"g = 32.2\n",
"\t\n",
"#calculations\n",
"yc = (Q**2 /g *2)**(1./5)\n",
"\t\n",
"#Results\n",
"print \"yc = %.2f ft is greater than uniform flow depth. Hence flow is supercritical\"%(yc)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"yc = 1.65 ft is greater than uniform flow depth. Hence flow is supercritical\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.3 Page No : 366"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\n",
"#Initialization of variables\n",
"q = 27./4\n",
"g = 32.2\n",
"Q = 27. \t#cfs\n",
"d = 2. \t#ft\n",
"dz1 = 0.3 \t#ft\n",
"\t\n",
"#calculations\n",
"yc = (q**2 /g)**(1./3)\n",
"V2 = Q/(4*yc)\n",
"V1 = Q/(4*d)\n",
"dz = d+ V1**2 /(2*g) - V2**2/(2*g) - yc\n",
"y2 = 1.6 \t#ft\n",
"drop = d-(y2+dz1)\n",
"dz2 = 0.6 \t#ft\n",
"up = 2.12 \t#ft\n",
"down = 0.66 \t#ft\n",
"\t\n",
"#Results\n",
"print \"yc = %.2f ft. Since, depth is greater than critical depth, the flow is subcritical\"%(yc)\n",
"print \" Drop in water height = %.2f ft\"%(drop)\n",
"print \" Drop upstream = %.2f ft and Downstream = %.2f ft\"%(up,down)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"yc = 1.12 ft. Since, depth is greater than critical depth, the flow is subcritical\n",
" Drop in water height = 0.10 ft\n",
" Drop upstream = 2.12 ft and Downstream = 0.66 ft\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.5 Page No : 381"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\n",
"#Initialization of variables\n",
"y0 = 2.17 \t#ft\n",
"q = 400./10 #flow rate\n",
"g = 32.2\n",
"d = 4.8 \t#ft\n",
"S0 = 0.0016\n",
"\t\n",
"#calculations\n",
"yc = round((q**2 /g)**(1./3),2)\n",
"y2 = round(y0/2 *(-1 + math.sqrt(1+ 8*q**2 /(g*y0**3))),2)\n",
"y1 = round(d/2 *(-1 + math.sqrt(1+ 8*q**2/(g*d**3))),2)\n",
"E1 = round(y0 + (q/y0)**2 /(2*g),2)\n",
"E2 = round(y1+ (q/y1)**2 /(2*g),2)\n",
"Vm = 0.5*(q/y0 + q/y1)\n",
"Rm = 0.5*(y0/1.434 + y1/1.552)\n",
"S = (0.013*Vm/(1.49*Rm**(2./3)))**2\n",
"dx = (E1-E2)/(S-S0)\n",
"E1d = E2\n",
"E2d = d+ (q/4.8)**2 /(2*g)\n",
"HPl = 62.4*q*10*(E1d-E2d)/550\n",
"\n",
"#Results\n",
"print \"Power loss = %.2f \"%(HPl)\n",
"#The answer is a bit different from the textbook due to rounding off error\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Power loss = 7.79 \n"
]
}
],
"prompt_number": 41
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 11.6 Page No : 386"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import *\n",
"\t\n",
"#Initialization of variables\n",
"y1 = array([1.5, 1.48])\n",
"V1 = array([2.22, 2.29])\n",
"d = 1.2\n",
"\t\n",
"#calculations\n",
"q = y1*V1\n",
"V2 = q/d\n",
"Vm = array([2.5, 2.56])\n",
"Rh1 = array([0.9, 0.89])\n",
"Rh2 = array([0.88, 0.78])\n",
"Rhm = (Rh1+Rh2)/2\n",
"S = (q*Vm/ Rhm**(2./3))**2\n",
"dx = [358 ,226]\n",
"yavg = (y1[0] + y1[1])/2\n",
"qavg = (q[0] + q[1])/2\n",
"B = 4.5\n",
"Q = qavg*B\n",
"\t\n",
"#Results\n",
"print \"Flow rate = %.1f m**3/s\"%(Q)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Flow rate = 15.1 m**3/s\n"
]
}
],
"prompt_number": 10
}
],
"metadata": {}
}
]
}
|