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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1:Water"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:1,Page no:1.7"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=219.0 #amount of Mg(HCO3)2 in water in ppm#\n",
"W2=36.0 #amount of Mg2+ in water in ppm#\n",
"W3=18.3 #amount of (HCO3)- in water in ppm#\n",
"W4=1.5 #amount of H+_in water in ppm#\n",
"M1=100/146.0 #multiplication factor of Mg(HCO3)2#\n",
"M2=100/24.0 #multiplication factor of Mg(HCO3)2#\n",
"M3=100/122.0 #multiplication factor of Mg(HCO3)2#\n",
"M4=100/2.0 #multiplication factor of Mg(HCO3)2#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 #in terms of CaCO3#\n",
"P2=W2*M2 #in terms of CaCO3#\n",
"P3=W3*M3 #in terms of CaCO3#\n",
"P4=W4*M4 #in terms of CaCO3#\n",
"L=0.74*((2*P1)+P2+P3+P4) \n",
"\n",
"R=1.0 #water supply rate in m**3/s#\n",
"D=R*60.0*60.0*24.0*L \n",
"K=D*1000.0 #in lit/day#\n",
"T=K/10.0**9 #in tonnes#\n",
"S=1.06*(P2+P4-P3) \n",
"D2=R*60*60*24*S \n",
"A=D2*1000 #in lit/day#\n",
"B=A/10.0**9 #in tonnes#\n",
"J1=90/100.0 #purity of lime#\n",
"J2=95/100.0 #purity of soda#\n",
"C1=500.0 #cost of one tonne lime#\n",
"C2=7000.0 #cost of one tonne soda#\n",
"CL=round(T,1)*C1/J1 \n",
"print\"\\ncost of lime is\",CL,\"Rs\"\n",
"CS=round(B,1)*C2/J2 \n",
"print\"\\ncost of soda is \",CS,\"Rs\"\n",
"C=CL+CS \n",
"\n",
"#Result\n",
"print\"\\ntotal cost is \",round(C) ,\"Rs\"\n",
"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"cost of lime is 19166.6666667 Rs\n",
"\n",
"cost of soda is 141473.684211 Rs\n",
"\n",
"total cost is 160640.0 Rs\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:15,Page no:1.25"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=40.0 #amount of Ca2+ in water in mg/l#\n",
"W2=24.0 #amount of Mg2+ in water in mg/l#\n",
"W3=8.05 #amount of Na+ in water in mg/l#\n",
"W4=183.0 #amount of (HCO3)- in water in mg/l#\n",
"W5=55.68 #amount of (SO4)2- in water in mg/l#\n",
"W6=6.74 #amount of Cl- in water in mg/l#\n",
"M1=100/40.0 #multiplication factor of Ca2+#\n",
"M2=100/24.0 #multiplication factor of Mg2+#\n",
"M3=100/(23.0*2) #multiplication factor of Na+#\n",
"M4=100/(61.0*2) #multiplication factor of (HCO3)-#\n",
"M5=100/96.0 #multiplication factor of (SO4)2-#\n",
"M6=100/(35.5*2) #multiplication factor of Cl-#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 #in terms of CaCO3#\n",
"P2=W2*M2 #in terms of CaCO3#\n",
"P3=W3*M3 #in terms of CaCO3#\n",
"P4=W4*M4 #in terms of CaCO3#\n",
"P5=W5*M5 #in terms of CaCO3#\n",
"P6=W6*M6 #in terms of CaCO3#\n",
"\n",
"\n",
"#Result\n",
"print\"\\nCalcium alkalinity =\",P1,\"ppm\" \n",
"print\"\\nMagnesium alkalinity =\",P4-P1,\"ppm\"\n",
"print\"\\n total alkalinity = \",P1+P4-P1,\"ppm\"\n",
"print\"\\n total hardness = \",P1+P2,\"ppm\"\n",
"print\"\\nCa temporary hardness = \",P1,\"ppm\"\n",
"print\"\\nMg temporary hardness = \",P4-P1,\"ppm\"\n",
"print\"\\nMg permanant hardness = \",P2-(P4-P1),\"ppm\"\n",
"print\"\\nSalts are:\"\n",
"print\"\\nCa(HCO3)2 salt = \",P1,\"ppm\"\n",
"print\"\\nMg(HCO3)2 salt = \",P4-P1,\"ppm\"\n",
"print\"\\nMgSO4 salt = \",P2-(P4-P1),\"ppm\"\n",
"print\"\\nNaCl salt = \",P6,\"ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Calcium alkalinity = 100.0 ppm\n",
"\n",
"Magnesium alkalinity = 50.0 ppm\n",
"\n",
" total alkalinity = 150.0 ppm\n",
"\n",
" total hardness = 200.0 ppm\n",
"\n",
"Ca temporary hardness = 100.0 ppm\n",
"\n",
"Mg temporary hardness = 50.0 ppm\n",
"\n",
"Mg permanant hardness = 50.0 ppm\n",
"\n",
"Salts are:\n",
"\n",
"Ca(HCO3)2 salt = 100.0 ppm\n",
"\n",
"Mg(HCO3)2 salt = 50.0 ppm\n",
"\n",
"MgSO4 salt = 50.0 ppm\n",
"\n",
"NaCl salt = 9.49295774648 ppm\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:19,Page no:1.39"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"P=4.7 #required HCl in ml using HpH indicator #\n",
"H=10.5 #required HCl im ml using MeOH indicator#\n",
"M=P+H \n",
"N=0.02 #normality of HCl#\n",
"\n",
"print\"\\nSince P<0.5*M sample contain (CO3)2- and (HCO3)- alkalinity\"\n",
"C=50 #equivalent of CaCO3 in mg for 1ml 1N HCl#\n",
"\n",
"#Calculation\n",
"A=C*(2*P)*N #amount of (CO3)2- alkalinity in mg in 100 ml of water#\n",
"B=A*1000/100 \n",
"D=C*(M-2*P)*N #the amount of (HCO3)- alkalinity in mg in 100 ml of water#\n",
"E=D*1000/100 \n",
"T=B+E \n",
"\n",
"#Result\n",
"print\"\\nTotal alkalinity is \",T,\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Since P<0.5*M sample contain (CO3)2- and (HCO3)- alkalinity\n",
"\n",
"Total alkalinity is 152.0 mg/l or ppm\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:25,Page no:1.56"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=160.0 #amount of Ca2+ in ppm#\n",
"W2=88.0 #amount of Mg2+ in ppm#\n",
"W3=72.0 #amount of CO2 in ppm#\n",
"W4=488.0 #amount of (HCO3)- in ppm#\n",
"W5=139.0 #amount of (FeSO4).7H2O in ppm#\n",
"M1=100/40.0 #multiplication factor of Ca2+#\n",
"M2=100/24.0 #multiplication factor of Mg2+#\n",
"M3=100/44.0 #multiplication factor of CO2#\n",
"M4=100/(61.0*2.0) #multiplication factor of (HCO3)-#\n",
"M5=100/278.0 #multiplication factor of (FeSO4).7H2O#\n",
"\n",
"P1=400 #in terms of CaCO3#\n",
"P2=300 #in terms of CaCO3#\n",
"P3=200 #in terms of CaCO3#\n",
"P4=400 #in terms of CaCO3#\n",
"P5=50 #in terms of CaCO3#\n",
"V=100000.0 #volume of water in litres#\n",
"\n",
"\n",
"#Calculation\n",
"L=0.74*(P2+P3+P4+P5)*V #lime required in mg#\n",
"L=L/10.0**6 \n",
"S=1.06*(P1+P2+P5-P4)*V #soda required in mg#\n",
"S=S/10.0**6 \n",
"\n",
"#Result\n",
"print\"Lime required is \",L,\"kg\"\n",
"print\"\\nSoda required is \",S,\"kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Lime required is 70.3 kg\n",
"\n",
"Soda required is 37.1 kg\n"
]
}
],
"prompt_number": 4
},
],
"metadata": {}
}
]
}
|