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
|
{
"metadata": {
"name": "",
"signature": "sha256:3a66fd8d35a6b920ec6df68f36f6af53b925b694b7b276b4adb69f10c536acff"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3 : Kinematics of Fluid Flow"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1 Page No : 78"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\n",
"#Initialization of variables\n",
"Q = 0.5 \t#cfs\n",
"d1 = 8. \t#in\n",
"d2 = 4. \t#in\n",
"R = 2. \t#in\n",
"h = 0.59 \t#in\n",
"\t\n",
"#calculations\n",
"Aa = math.pi*(d1/12)**2 /4\n",
"Va = Q/Aa\n",
"Ab = 2*math.pi*R*h/144\n",
"Vb = Q/Ab\n",
"\t\n",
"#Results\n",
"print \"Average velocity at section A = %.2f fps \"%(Va)\n",
"print \" Average velocity at section B = %.2f fps \"%(Vb)\n",
"\n",
"# rounding off error"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Average velocity at section A = 1.43 fps \n",
" Average velocity at section B = 9.71 fps \n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.2 Page No : 81"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\n",
"#Initialization of variables\n",
"Q = 0.5 \t#cfs\n",
"d1 = 8. \t#in\n",
"d2 = 4. \t#in\n",
"R = 2. \t#in\n",
"theta = 45.\t#degrees\n",
"\t\n",
"#calculations\n",
"h = (1-math.cos(math.radians(theta))) \t#Multiply by r\n",
"Aa = round(2*math.pi*h,2) \t#Multiply by r**2\n",
"V = Q/Aa \t#divide by r**2\n",
"aA = 0\n",
"r = 0.167 \t#ft\n",
"V1 = V/r**2\n",
"dvbydx = round(V*2/r**3)\n",
"aB = V1*dvbydx\n",
"\n",
"\n",
"#Results\n",
"#The answer varies a bit from the text due to rounding off error\n",
"print \"Acceleration at A = %d since flow is steady\"%(aA)\n",
"print \"Acceleration at B = %d ft/s**2\"%(aB)\n",
"\n",
"# rounding off error. please check."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Acceleration at A = 0 since flow is steady\n",
"Acceleration at B = 1140 ft/s**2\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|