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
|
{
"metadata": {
"name": "",
"signature": "sha256:e51408600d11e929cd24c31057edae00d199336d2c2b7260dda7e3b7642c128f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3 : Conservation Principle of Mass"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3 Page No : 100"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\t\t\t\n",
"#Initialization of variables\n",
"d1 = 60. \t\t\t#diameter of a section of pipe - cm\n",
"V1 = 45. \t\t\t#velocity of water - cm/s\n",
"d2 = 90. \t\t\t#diameter of enlarged section - cm\n",
"\t\t\t\n",
"#calculations\n",
"V2 = V1*d1**2 /d2**2\n",
"Q = math.pi/4 *d1**2 *V1 *10**-6\n",
"\t\t\t\n",
"#results\n",
"print \"Velocity at point 2 = %d cm/s\"%(V2)\n",
"print \" FLow rate = %.4f m**3/s\"%(Q)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Velocity at point 2 = 20 cm/s\n",
" FLow rate = 0.1272 m**3/s\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4 Page No : 100"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\t\t\t\n",
"#Initialization of variables\n",
"dn1 = 4 \t\t\t#spacing between streamlines - cm\n",
"v1 = 300. \t\t\t#velocity - cm/s\n",
"dn2 = 2.5 \t\t\t#spacing - cm\n",
"\t\t\t\n",
"#calculations\n",
"v2 = v1*dn1/dn2\n",
"\t\t\t\n",
"#results\n",
"print \"Velocity = %.1f m/s\"%(v2/100)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Velocity = 4.8 m/s\n"
]
}
],
"prompt_number": 2
}
],
"metadata": {}
}
]
}
|