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
|
{
"metadata": {
"name": "",
"signature": "sha256:d535e96b63b04955ddb6dd28278cd61f812d14a9abe154ce07ebf0b6c0bb6b52"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4 : Dispersion"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.2.1 pg : 99 "
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import math \n",
"\t\n",
"#initialization of variables\n",
"z = 80. \t# metres\n",
"c1 = 410. \t#ppm\n",
"c = 860. \t# ppm\n",
"d = 2. \t#km\n",
"v = 0.6 \t#km/hr\n",
"r = 3600. \t#sec/hr\n",
"\t\n",
"#Calculations\n",
"t1 = (d/v)*r\t#sec\n",
"E = (-((z**2)/(4*t1))/(math.log(410./860)))*10**4\t# cm**2/sec\t\n",
"d2 = 15 \t#km\n",
"c2 = c*(math.sqrt(d/d2))\t#ppm\n",
"\t\n",
"#Results\n",
"print \"The value of print ersion coefficent is %.f cm**2/sec\"%(E)\n",
"print \" The value of maximum concentration at 15 km downstream is %.f ppm\"%(c2)\n",
"\n",
"#note : first answer in textbook is wrong"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of print ersion coefficent is 1800 cm**2/sec\n",
" The value of maximum concentration at 15 km downstream is 314 ppm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.2.2 pg : 100"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import math \n",
"\t\n",
"\n",
"#initialization of variables\n",
"d = 10. \t#cm\n",
"s = 3. \t# km\n",
"v = 500. \t#cm/sec\n",
"nu = 0.15 \t# cm**2/sec\n",
"\t\n",
"#Calculations\n",
"E = 0.5*d*v \t# cm**2/sec\n",
"c1 = 1000 \t# m/km\n",
"c2 = 1./100 \t# m/cm\n",
"z = math.sqrt(4*E*c1*c2*s/v)\n",
"percent = z*100/(s*c1)\n",
"\t\n",
"#Results\n",
"print \" z = %.f m\"%z\n",
"print \" The percent of pipe containing mixed gases is %.f percent\"%(percent)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" z = 24 m\n",
" The percent of pipe containing mixed gases is 1 percent\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|