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
|
{
"metadata": {
"name": "",
"signature": "sha256:a18675a96e26e95bc119a7095e6c5f784a91bb484f337fa10d53e05acf798c32"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 9 : Potential Flow"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 9.4 Page No : 339"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\t\t\n",
"#Initialization of variables\n",
"k = 1.5\n",
"r = 40. \t \t\t#cm\n",
"theta = 45. \t\t\t#degrees\n",
"\t\t\t\n",
"#calculations\n",
"vr = -2*k*r*math.cos(math.radians(2*theta))\n",
"vt = 2*k*r*math.sin(math.radians(2*theta))\n",
"\t\t\t\n",
"#results\n",
"print \"velocity in radial direction = %d cm/s\"%(vr)\n",
"print \" velcoity in angular direction = %d cm/s\"%(vt)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"velocity in radial direction = 0 cm/s\n",
" velcoity in angular direction = 120 cm/s\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 9.14 Page No : 371"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\t\t\n",
"#Initialization of variables\n",
"T = 4.5 #m^2/s\n",
"a = 0.6 #diameter - m\n",
"u = 5. \t\t \t#velocity - m/s\n",
"rho = 1000. \t\t\t#kg/m**3\n",
"\t\t\t\n",
"#calculations\n",
"sint = 0.5*(1- T/(2*math.pi*a*u))\n",
"theta = math.degrees(math.asin((sint)))\n",
"dp = 0.5*rho*u**2 *(1 - (2 + T/(2*math.pi*a*u))**2)\n",
"\t\t\t\n",
"#results\n",
"print \"Angle = %.1f or %.1f degrees\"%(theta,180-theta)\n",
"print \" Min guage pressure = %.2f kN/m**2\"%(dp/1000)\n",
"\n",
"#The answer in textbook is wrong. please check"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Angle = 22.4 or 157.6 degrees\n",
" Min guage pressure = -50.15 kN/m**2\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 9.15 Page No : 371"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\t\t\n",
"#Initialization of variables\n",
"T = 6*math.pi\n",
"r = 1./3\n",
"\t\t\t\n",
"#calculations\n",
"vab = T/(4*math.pi)\n",
"vba = T/(2*math.pi)\n",
"w = vab/r\n",
"\t\t\t\n",
"#results\n",
"print \"rate of rotation = %.1f rad/s\"%(w)\n",
"print \"speed of A by B = %.1f m/s\"%(vab)\n",
"print \"speed of B by A = %.1f m/s\"%(vba)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"rate of rotation = 4.5 rad/s\n",
"speed of A by B = 1.5 m/s\n",
"speed of B by A = 3.0 m/s\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|