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
|
{
"metadata": {
"celltoolbar": "Raw Cell Format",
"name": "",
"signature": "sha256:24b52c6a31667b62249d4037d9a99a947845157c2c3e5346e2fea8b2b04412a0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"SAMPLE EXAMPLE 1"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"EXAMPLE 2.18.1"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"W1=12.5; #CaCO3 in water in mg/lit#\n",
"W2=8.4; #MgCO3 in water in mg/lit#\n",
"W3=22.2; #CaCl2 in water in mg/lit#\n",
"W4=9.5; #MgCl2 in water in mg/lit#\n",
"W5=33; #CO2 in water in mg/lit#\n",
"W6=6.68; #NaHCO3 in water in mg/lit#\n",
"M1=100.0/100.0; #multiplication factor of CaCO3#\n",
"M2=100.0/84; #multiplication factor of MgCO3#\n",
"M3=100.0/111; #multiplication factor of CaCl2#\n",
"M4=100.0/95; #multiplication factor of MgCl2#\n",
"M6=100.0/84; #multiplication factor of NaHCO3#\n",
"P1=W1*M1; #CaCO3 in terms of CaCO3#\n",
"P2=W2*M2; #MgCO3 in terms of CaCO3#\n",
"P3=W3*M3; #CaCl2 in terms of CaCO3#\n",
"P4=W4*M4; #MgCl2 in terms of CaCO3#\n",
"P6=W6*M6; #NaHCO3 in terms of CaCO3#\n",
"print\"We do not take CO2 since it does not contribute to hardness \" \n",
"C=P1+P2+P6;\n",
"print\" Carbonate hardness is\",round(C,4),\"mg/l or ppm\"\n",
"NC=P3+P4;\n",
"print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"We do not take CO2 since it does not contribute to hardness \n",
" Carbonate hardness is 30.4524 mg/l or ppm\n",
" Non Carbonate hardness is 30.0 mg/l or ppm\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"EXAMPLE 2.18.2"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"W1=40.5; #Ca(HCO3)2 in water in mg/lit#\n",
"W2=33.3; #CaCl2 in water in mg/lit#\n",
"W3=41; #Ca(NO3)2 in water in mg/lit#\n",
"W4=101; #KNO3 in water in mg/lit#\n",
"W5=33.6; #MgCO3 in water in mg/lit#\n",
"M1=100.0/162; #multiplication factor of Ca(HCO3)2#\n",
"M2=100.0/111; #multiplication factor of CaCl2#\n",
"M3=100.0/164; #multiplication factor of Ca(NO3)2#\n",
"M5=100.0/84; #multiplication factor of MgCO3#\n",
"P1=W1*M1; #Ca(HCO3)2 in terms of CaCO3#\n",
"P2=W2*M2; #CaCl2 in terms of CaCO3#\n",
"P3=W3*M3; #Ca(NO3)2 in terms of CaCO3#\n",
"P5=W5*M5; #MgCO3 in terms of CaCO3#\n",
"print \"We do not take KNO3 since it does not contribute to hardness \"\n",
"C=P1+P5;\n",
"print \"Carbonate hardness is\",C,\" mg/l or ppm\"\n",
"NC=P2+P3;\n",
"print \"Non Carbonate hardness is\",NC,\" mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"We do not take KNO3 since it does not contribute to hardness \n",
"Carbonate hardness is 65.0 mg/l or ppm\n",
"Non Carbonate hardness is 55.0 mg/l or ppm\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"EXAMPLE 2.18.3"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"W1=29.1; #Mg(HCO3 2 in water in mg/lit#\n",
"W2=40.5; #Ca(HCO3 2 in water in mg/lit#\n",
"W3=11.1; #CaCl2 in water in mg/lit#\n",
"W4=15.82; #MgCl2 in water in mg/lit#\n",
"W5=28.5; #NaCl in water in mg/lit#\n",
"W6=22.0; #CO2 in water in mg/lit#\n",
"M1=100.0/146.007; #multiplication factor of Mg(HCO3 2#\n",
"M2=100.0/162; #multiplication factor of Ca(HCO3 2#\n",
"M3=100.0/111; #multiplication factor of CaCl2#\n",
"M4=100.0/95.005; #multiplication factor of MgCl2#\n",
"P1=W1*M1; #Mg(HCO3 2 in terms of CaCO3#\n",
"P2=W2*M2; #Ca(HCO3 2 in terms of CaCO3#\n",
"P3=W3*M3; #CaCl2 in terms of CaCO3#\n",
"P4=W4*M4; #MgCl2 in terms of CaCO3#\n",
"print\"We do not take NaCl and CO2 since they do not contribute to hardness \" \n",
"C=P1+P2;\n",
"print\" Carbonate hardness is\",round(C,4),\"mg/l or ppm\"\n",
"NC=P3+P4;\n",
"print\" Non Carbonate hardness is\",round(NC,4),\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"We do not take NaCl and CO2 since they do not contribute to hardness \n",
" Carbonate hardness is 44.9306 mg/l or ppm\n",
" Non Carbonate hardness is 26.6518 mg/l or ppm\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"EXAMPLE 2.18.4"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"W1=16.2; #Ca(HCO3 2 in water in mg/lit#\n",
"W2=14.6; #Mg(HCO3 2 in water in mg/lit#\n",
"W3=9.5; #MgCl2 in water in mg/lit#\n",
"W4=48; #MgSO4 in water in mg/lit#\n",
"W5=12; #KCl in water in mg/lit#\n",
"M1=100.0/162; #multiplication factor of Ca(HCO3 2#\n",
"M2=100.0/146; #multiplication factor of Mg(HCO3 2 #\n",
"M3=100.0/95; #multiplication factor of MgCl2#\n",
"M4=100.0/120; #multiplication factor of MgSO4#\n",
"P1=W1*M1; #Ca(HCO3 2 in terms of CaCO3#\n",
"P2=W2*M2; #Mg(HCO3 2 in terms of CaCO3#\n",
"P3=W3*M3; #MgCl2 in terms of CaCO3#\n",
"P4=W4*M4; #MgSO4 in terms of CaCO3#\n",
"print\"We do not take KCl since it does not contribute to hardness \" \n",
"C=P1+P2;\n",
"print\" Carbonate hardness is\",C,\"mg/l or ppm\";\n",
"NC=P3+P4;\n",
"print\" Non Carbonate hardness is\",NC,\"mg/l or ppm\";"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"We do not take KCl since it does not contribute to hardness \n",
" Carbonate hardness is 20.0 mg/l or ppm\n",
" Non Carbonate hardness is 50.0 mg/l or ppm\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"EXAMPLE 2.18.5"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"W1=81; #Ca(HCO3 2 in water in mg/lit#\n",
"W2=84; #MgCO3 in water in mg/lit#\n",
"W3=22.2; #CaCl2 in water in mg/lit#\n",
"W4=60; #MgSO4 in water in mg/lit#\n",
"W5=30; #KCl in water in mg/lit#\n",
"M1=100.0/162; #multiplication factor of Ca(HCO3 2#\n",
"M2=100.0/84; #multiplication factor of MgCO3#\n",
"M3=100.0/111; #multiplication factor of CaCl2#\n",
"M4=100.0/120; #multiplication factor of MgSO4#\n",
"P1=W1*M1; #Ca(HCO3 2 in terms of CaCO3#\n",
"P2=W2*M2; #MgCO3 in terms of CaCO3#\n",
"P3=W3*M3; #CaCl2 in terms of CaCO3#\n",
"P4=W4*M4; #MgSO4 in terms of CaCO3#\n",
"print\"We do not take KCl since it does not contribute to hardness \" \n",
"T=P1+P2;\n",
"print\" Temporary hardness is \",T,\"mg/l or ppm\"\n",
"P=P3+P4;\n",
"print\" Permanant hardness is \",P,\"mg/l or ppm\"\n",
"To=T+P;\n",
"print\" Total hardness is \",To,\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"We do not take KCl since it does not contribute to hardness \n",
" Temporary hardness is 150.0 mg/l or ppm\n",
" Permanant hardness is 70.0 mg/l or ppm\n",
" Total hardness is 220.0 mg/l or ppm\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|