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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 7:Water Chemistry"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:1,Page no:152"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"MgSO4=60.0 #[mg]\n",
"M_MgSO4=64.0 #Molecular weight of MgSO4\n",
"M_CaCO3=48.0 #Molecular wt of CaCO3\n",
"m_mgso4=120.0 #Weight of MgSO4 eq to CaCO3\n",
"m_caco3=100.0 #Weight of CaCO3 eq to MgSO4\n",
"\n",
"#Calculation\n",
"hard=(m_caco3/m_mgso4)*MgSO4 #Hardness of water in mg\n",
"\n",
"#Result\n",
"print\"Hardness of water is \",hard,\"ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Hardness of water is 50.0 ppm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.1,Page no:172"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=16.2 #Ca(HCO3)2 in water in mg/lit#\n",
"W2=7.3 #MgHCO3 in water in mg/lit#\n",
"W3=13.6 #CaSO4 in water in mg/lit#\n",
"W4=9.5 #MgCl2 in water in mg/lit#\n",
"M1=100/162.0 #multiplication factor of Ca(HCO3)2#\n",
"M2=100/146.0 #multiplication factor of MgHCO3#\n",
"M3=100/136.0 #multiplication factor of CaSO4#\n",
"M4=100/95.0 #multiplication factor of MgCl2#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or #\n",
"P2=W2*M2 #MgHCO3 in terms of CaCO3 or #\n",
"P3=W3*M3 #CaSO4 in terms of CaCO3 or #\n",
"P4=W4*M4 #MgCl2 in terms of CaCO3 or #\n",
"T=P1+P2 #Temporary hardness\n",
"P=P3+P4 #Permanent hardness\n",
"To=T+P #Total hardness\n",
"\n",
"#Result\n",
"print\"Temporary hardness is\",T,\"mg/l or ppm\"\n",
"print\"\\nPermanant hardness is \",P,\"mg/l or ppm\"\n",
"print\"\\nTotal hardness is \",To,\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Temporary hardness is 15.0 mg/l or ppm\n",
"\n",
"Permanant hardness is 20.0 mg/l or ppm\n",
"\n",
"Total hardness is 35.0 mg/l or ppm\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.2,Page no:172"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"F=56.0 #atomic weight of ferrus#\n",
"S=32.0 #atomic weight of sulphur#\n",
"O=16.0 #atomic weight of oxygen#\n",
"Ca=40.0 #atomic weight of calsium#\n",
"C=12.0 #atomic weight of carbon#\n",
"\n",
"#Calculation\n",
"W1=136\n",
"P=210.5 #required ppm of hardness#\n",
"B=(W1/100.0)*P \n",
"\n",
"#Result\n",
"print\"Required FeSO4 for 100ppm of hardness is\",W1,\"ppm pf FeSO4\"\n",
"print\"\\nRequired FeSO4 for 210.5ppm of hardness is \",round(B,1),\"ppm of FeSO4\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Required FeSO4 for 100ppm of hardness is 136 ppm pf FeSO4\n",
"\n",
"Required FeSO4 for 210.5ppm of hardness is 286.3 ppm of FeSO4\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.3,Page no:173"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=162.0 #Ca(HCO3)2 in water in mg/lit#\n",
"W2=73.0 #MgHCO3 in water in mg/lit#\n",
"W3=136.0 #CaSO4 in water in mg/lit#\n",
"W4=95.0 #MgCl2 in water in mg/lit#\n",
"W5=111.0 #CaCl2 in water in mg/lit#\n",
"W6=100.0 #NaCl in water in mg/lit#\n",
"M1=100/162.0 #multiplication factor of Ca(HCO3)2#\n",
"M2=100/146.0 #multiplication factor of MgHCO3#\n",
"M3=100/136.0 #multiplication factor of CaSO4#\n",
"M4=100/95.0 #multiplication factor of MgCl2#\n",
"M5=100/111.0 #multiplication factor of CaCl2#\n",
"M6=100/100.0 #multiplication factor of NaCl#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or #\n",
"P2=W2*M2 #MgHCO3 in terms of CaCO3 or #\n",
"P3=W3*M3 #CaSO4 in terms of CaCO3 or #\n",
"P4=W4*M4 #MgCl2 in terms of CaCO3 or #\n",
"P5=W5*M5 #CaCl2 in terms of CaCO3 or #\n",
"T=P1+P2 \n",
"P=P3+P4+P5 \n",
"\n",
"#Result\n",
"print\"\\nTemporary hardness is\",T,\"mg/l or ppm\" \n",
"print\"\\nPermanant hardness is\",P,\"mg/l or ppm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Temporary hardness is 150.0 mg/l or ppm\n",
"\n",
"Permanant hardness is 300.0 mg/l or ppm\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.4,Page no:173"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"N=0.08 #normality of MgSO4#\n",
"V1=12.5 #volume of MgSO4 in ml#\n",
"V2=100 #volume of water sample#\n",
"\n",
"#Calculation\n",
"M=N/2 #molarity of MgSO4#\n",
"N1=(M*12.5)/1000 #no of moles of MgSO4 in 100 ml water#\n",
"N2=(N1*1000)/100 #no of moles of MgSO4 in one litre water#\n",
"W=100 #molecular weight of CaCO3\n",
"W1=N2*W*1000 #MgSO4 in terms of CaCO3 in mg/lit#\n",
"\n",
"#Result\n",
"print\"\\nThe hardness due to MgSO4 is \",W1,\"mg/l CaCO3 or ppm of CaCO3\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"The hardness due to MgSO4 is 500.0 mg/l CaCO3 or ppm of CaCO3\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.5,Page no:173"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=144.0 #MgCO3 in water in mg/lit#\n",
"W2=25.0 #CaCO3 in water in mg/lit#\n",
"W3=111.0 #CaCl2 in water in mg/lit#\n",
"W4=95.0 #MgCl2 in water in mg/lit#\n",
"M1=100/84.0 #multiplication factor of MgCO3#\n",
"M2=100/100.0 #multiplication factor of CaCO3#\n",
"M3=100/111.0 #multiplication factor of CaCl2#\n",
"M4=100/95.0 #multiplication factor of MgCl2#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 #MgCO3 in terms of CaCO3 or ppm#\n",
"P2=W2*M2 #CaCO3 in terms of CaCO3 or ppm#\n",
"P3=W3*M3 #CaCl2 in terms of CaCO3 or ppm#\n",
"P4=W4*M4 #MgCl2 in terms of CaCO3 or ppm#\n",
"V=50000 #volume of water in lit#\n",
"L=0.74*(2*P1+P2+P4)*V \n",
"S=1.06*(P1+P3+P4)*V \n",
"\n",
"#Result\n",
"print\"Requirement of lime is \",L,\"mg=\",round(L/1000000,1),\"kg\" \n",
"print\"\\nRequirement of soda is \",S,\"mg=\",round(S/1000000,1),\"kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Requirement of lime is 17310714.2857 mg= 17.3 kg\n",
"\n",
"Requirement of soda is 19685714.2857 mg= 19.7 kg\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.6,Page no:174"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=12.0 #Mg2+ in water in ppm or mg/l#\n",
"W2=40.0 #Ca2+ in water in ppm or mg/l#\n",
"W3=164.7 #HCO3- in water in ppm or mg/l#\n",
"W4=30.8 #CO2 in water in ppm or mg/l#\n",
"M1=100.0/24.0 #multiplication factor of Mg2+#\n",
"M2=100.0/40.0 #multiplication factor of Mg2+#\n",
"M3=100.0/61.0 #multiplication factor of Mg2+#\n",
"M4=100.0/44.0 #multiplication factor of Mg2+#\n",
"\n",
"#Calculation\n",
"P1=W1*M1 # in terms of CaCO3#\n",
"P2=W2*M2 # in terms of CaCO3#\n",
"P3=W3*M3/2 # in terms of CaCO3#\n",
"P4=W4*M4 # in terms of CaCO3#\n",
"V=50000.0#volume of water in lit#\n",
"L=0.74*(P1+P3+P4)*V \n",
"\n",
"#Result\n",
"print\"Lime required is %fmg\",round(L/10**6,1),\"kg\" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Lime required is %fmg 9.4 kg\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.7,Page no:174"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=160.0 #Ca2+ in water in mg/l or ppm#\n",
"W2=72.0 #Mg2+ in water in mg/l or ppm#\n",
"W3=732.0 #HCO3- in water in mg/l or ppm#\n",
"W4=44.0 #CO2 in water in mg/l or ppm#\n",
"W5=16.4 #NaAlO2 in water in mg/l or ppm#\n",
"W6=30.0 #(CO3)2- in water in mg/l or ppm#\n",
"W7=17.0 #OH- in water in mg/l or ppm#\n",
"\n",
"#Calculation\n",
"M1=100/40.0 #multiplication factor of Ca2+#\n",
"M2=100/24.0 #multiplication factor of Ca2+#\n",
"M3=100/(61.0*2.0) #multiplication factor of Ca2+#\n",
"M4=100/44.0 #multiplication factor of Ca2+#\n",
"M5=100/(82.0*2.0) #multiplication factor of Ca2+#\n",
"M6=100/60.0 #multiplication factor of Ca2+#\n",
"M7=100/(17.0*2.0) #multiplication factor of Ca2+#\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",
"P7=W7*M7 #in terms of CaCO3#\n",
"V=200000.0 #volume of water in lit#\n",
"L=0.74*(P2+P3+P4-P5+P7)*V \n",
"L=L/10.0**6.0 #in kgs#\n",
"S=1.06*(P1+P2-P3-P5-P6+P7)*V \n",
"S=S/10.0**6 #in kgs#\n",
"\n",
"#Result\n",
"print\"Lime required is \",L,\"kg\"\n",
"print\"\\nSoda required is \",S,\"kg\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Lime required is 153.92 kg\n",
"\n",
"Soda required is 19.08 kg\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.8,Page no:175"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"N=150.0 #amount of NaCl in solution in g/l#\n",
"V=8.0 #volume of NaCl solution#\n",
"\n",
"#Calculation\n",
"M=N*V \n",
"V=10000.0 #volume of hard water#\n",
"W=58.5 #molecular weight of NaCl#\n",
"K=(M*100.0/(W*2))/V \n",
"J=K*1000.0 \n",
"\n",
"#Result\n",
"\n",
"print\"\\nHardness of water is \",round(J,1),\"mg/l or ppm\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Hardness of water is 102.6 mg/l or ppm\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.9,Page no:176"
]
},
{
"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": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.10,Page no:176"
]
},
{
"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": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.11,Page no:177"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"P=0.0 #phenolplthalein alkalinity in water sample#\n",
"V=16.9 #required HCl in ml for 100 ml water sample#\n",
"N=0.02 #normality of HCl#\n",
"print\"Since P=0 the alkalinity is due to HCO3- ions\" \n",
"C=50.0 #equivalent of CaCO3 in mg for 1 ml 1N of HCl#\n",
"\n",
"#Calculation\n",
"A=C*V*N \n",
"print\"\\nIn 100ml water sample the alkalinity is\",A,\"mg/s\"\n",
"B=A*1000.0/100.0\n",
"\n",
"#Result\n",
"print\"\\nFor 1 litre of water the alkalinity is \",B,\"mg/l\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Since P=0 the alkalinity is due to HCO3- ions\n",
"\n",
"In 100ml water sample the alkalinity is 16.9 mg/s\n",
"\n",
"For 1 litre of water the alkalinity is 169.0 mg/l\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.12,Page no:178"
]
},
{
"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": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.13,Page no:178"
]
},
{
"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": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.14,Page no:179"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W=50 #amount of NaCl in g/l in NaCl solution#\n",
"V=200 #volume of NaCl solution in litres#\n",
"\n",
"#Calculation\n",
"A=W*V \n",
"V=10000 #volume of hard water passed through Zeolite softener#\n",
"M=100/(58.5*2) #multiplication factor of NaCl#\n",
"P=M*A \n",
"B=P*1000/V \n",
"\n",
"#Result\n",
"print\"\\nIn terms of CaCO3=\",round(P),\"g CaCO3\"\n",
"print\"\\nFor 1 litre of hard water=\",round(B,1),\"mg/l or ppm\"\n",
"print\"NOTE:In book answer wrongly written as 845.7\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"In terms of CaCO3= 8547.0 g CaCO3\n",
"\n",
"For 1 litre of hard water= 854.7 mg/l or ppm\n",
"NOTE:In book answer wrongly written as 845.7\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example no:7.15,Page no:179"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"W1=0.28 #amount of CaCO3 in grams dissolved in 1 litre of water#\n",
"V1=28 #required EDTA in ml on titration of 100ml of CaCO3 solution#\n",
"V2=33 #required EDTA in ml for 100ml of unknown hard water sample#\n",
"V3=10 #required EDTA in ml for 100 ml of unknown sample after boiling and cooling#\n",
"M1=100/100 #multiplication factor of CaCO3#\n",
"\n",
"#Calculation\n",
"C=W1*M1 \n",
"A=C*100#for 100 ml of sample equivalent to 28 ml of EDTA#\n",
"B=A/V1 \n",
"D=V2*B #for 100 ml#\n",
"D=D*1000/100 \n",
"E=V3*B #for 100 ml#\n",
"E=E*1000/100 \n",
"T=D-E \n",
"\n",
"#Result\n",
"print\"Total hardness is \",D,\"mg CaCO3 eq\"\n",
"print\"\\nPermanant hardness is \",E,\"mg CaCO3 eq\"\n",
"print\"\\nTemporary hardness is \",T,\"mg CaCO3\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Total hardness is 330.0 mg CaCO3 eq\n",
"\n",
"Permanant hardness is 100.0 mg CaCO3 eq\n",
"\n",
"Temporary hardness is 230.0 mg CaCO3\n"
]
}
],
"prompt_number": 16
}
],
"metadata": {}
}
]
}
|