Chapter2-Water and its Treatment

Ex1-pg1-58

In [1]:
##water and its treatment##
##example 2.18.1##
import math
W1=12.5;##CaCO3 in water in mg/lit##
W2=8.4;##MgCO3 in water in mg/lit##
W3=22.2;##CaCl2 in water in mg/lit##
W4=9.5;##MgCl2 in water in mg/lit##
W5=33.;##CO2 in water in mg/lit##
W6=6.68;##NaHCO3 in water in mg/lit##
M1=100./100.;##multiplication factor of CaCO3##
M2=100./84.;##multiplication factor of MgCO3##
M3=100./111.;##multiplication factor of CaCl2##
M4=100./95.;##multiplication factor of MgCl2##
M6=100./84.;##multiplication factor of NaHCO3##
P1=W1*M1;##CaCO3 in terms of CaCO3##
P2=W2*M2;##MgCO3 in terms of CaCO3##
P3=W3*M3;##CaCl2  in terms of CaCO3##
P4=W4*M4;##MgCl2 in terms of CaCO3##
P6=W6*M6;##NaHCO3 in terms of CaCO3##
print ("We do not take CO2 since it does not contribute to hardness ");
C=P1+P2+P6;
print'%s %.2f %s'%("\nCarbonate hardness is ",C," mg/l or ppm");
NC=P3+P4;
print'%s %.2f %s'%("\nNon Carbonate hardness is ",NC," mg/l or ppm");
We do not take CO2 since it does not contribute to hardness 

Carbonate hardness is  30.45  mg/l or ppm

Non Carbonate hardness is  30.00  mg/l or ppm

Ex2-pg1-59

In [2]:
##water and its treatment##
##example 2.18.2##
import math
W1=40.5;##Ca(HCO3)2 in water in mg/lit##
W2=33.3;##CaCl2 in water in mg/lit##
W3=41.;##Ca(NO3)2 in water in mg/lit##
W4=101.;##KNO3 in water in mg/lit##
W5=33.6;##MgCO3 in water in mg/lit##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./111.;##multiplication factor of CaCl2##
M3=100./164.;##multiplication factor of Ca(NO3)2##
M5=100./84.;##multiplication factor of MgCO3##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##
P2=W2*M2;##CaCl2 in terms of CaCO3##
P3=W3*M3;##Ca(NO3)2  in terms of CaCO3##
P5=W5*M5;##MgCO3 in terms of CaCO3##
print ("We do not take KNO3 since it does not contribute to hardness ");
C=P1+P5;
print'%s %.2f %s'%("\nCarbonate hardness is ",C," mg/l or ppm");
NC=P2+P3;
print'%s %.2f %s'%("\nNon Carbonate hardness is ",NC," mg/l or ppm");
We do not take KNO3 since it does not contribute to hardness 

Carbonate hardness is  65.00  mg/l or ppm

Non Carbonate hardness is  55.00  mg/l or ppm

Ex3-pg1-59

In [3]:
##water and its treatment##
##example 2.18.3##
import math
W1=29.1;##Mg(HCO3)2 in water in mg/lit##
W2=40.5;##Ca(HCO3)2 in water in mg/lit##
W3=11.1;##CaCl2 in water in mg/lit##
W4=15.82;##MgCl2 in water in mg/lit##
W5=28.5;##NaCl in water in mg/lit##
W6=22.0;##CO2 in water in mg/lit##
M1=100./146.007;##multiplication factor of Mg(HCO3)2##
M2=100./162.;##multiplication factor of Ca(HCO3)2##
M3=100./111.;##multiplication factor of CaCl2##
M4=100./95.005;##multiplication factor of MgCl2##
P1=W1*M1;##Mg(HCO3)2 in terms of CaCO3##
P2=W2*M2;##Ca(HCO3)2 in terms of CaCO3##
P3=W3*M3;##CaCl2  in terms of CaCO3##
P4=W4*M4;##MgCl2 in terms of CaCO3##
print("We do not take NaCl and CO2 since they do not contribute to hardness ");
C=P1+P2;
print'%s %.2f %s'%("\nCarbonate hardness is ",C," mg/l or ppm");
NC=P3+P4;
print'%s %.2f %s'%("\nNon Carbonate hardness is ",NC," mg/l or ppm");
We do not take NaCl and CO2 since they do not contribute to hardness 

Carbonate hardness is  44.93  mg/l or ppm

Non Carbonate hardness is  26.65  mg/l or ppm

Ex4-pg1-60

In [4]:
##water and its treatment##
##example 2.18.4##
import math
W1=16.2;##Ca(HCO3)2 in water in mg/lit##
W2=14.6;##Mg(HCO3)2 in water in mg/lit##
W3=9.5;##MgCl2 in water in mg/lit##
W4=48.;##MgSO4 in water in mg/lit##
W5=12.;##KCl in water in mg/lit##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./146.;##multiplication factor of Mg(HCO3)2 ##
M3=100./95.;##multiplication factor of MgCl2##
M4=100./120.;##multiplication factor of MgSO4##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##
P2=W2*M2;##Mg(HCO3)2  in terms of CaCO3##
P3=W3*M3;##MgCl2  in terms of CaCO3##
P4=W4*M4;##MgSO4 in terms of CaCO3##
print ("We do not take KCl since it does not contribute to hardness ");
C=P1+P2;
print'%s %.2f %s'%("\nCarbonate hardness is ",C," mg/l or ppm");
NC=P3+P4;
print'%s %.2f %s'%("\nNon Carbonate hardness is ",NC," mg/l or ppm");
We do not take KCl since it does not contribute to hardness 

Carbonate hardness is  20.00  mg/l or ppm

Non Carbonate hardness is  50.00  mg/l or ppm

Ex5-pg1-60

In [5]:
##water and its treatment##
##example 2.18.5##
import math
W1=81;##Ca(HCO3)2 in water in mg/lit##
W2=84;##MgCO3 in water in mg/lit##
W3=22.2;##CaCl2 in water in mg/lit##
W4=60;##MgSO4 in water in mg/lit##
W5=30;##KCl in water in mg/lit##
M1=100/162;##multiplication factor of Ca(HCO3)2##
M2=100/84;##multiplication factor of MgCO3##
M3=100/111;##multiplication factor of CaCl2##
M4=100/120;##multiplication factor of MgSO4##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##
P2=W2*M2;##MgCO3 in terms of CaCO3##
P3=W3*M3;##CaCl2  in terms of CaCO3##
P4=W4*M4;##MgSO4 in terms of CaCO3##
print ("We do not take KCl since it does not contribute to hardness ");
T=P1+P2;
print'%s %.2f %s'%("\nTemporary hardness is ",T," mg/l or ppm");
P=P3+P4;
print'%s %.f %s'%("\nPermanant hardness is ",P," mg/l or ppm");
To=T+P;
print'%s %.2f %s'%("\nTotal hardness is ",To," mg/l or ppm");
We do not take KCl since it does not contribute to hardness 

Temporary hardness is  84.00  mg/l or ppm

Permanant hardness is  0  mg/l or ppm

Total hardness is  84.00  mg/l or ppm

Ex6-pg1-61

In [6]:
##water and its treatment##
##example 2.18.6##
import math
W1=29.2;##MgCO3 in water in mg/lit##
W2=36.;##MgSO4 in water in mg/lit##
W3=22.2;##CaCl2 in water in mg/lit##
W4=142.5;##MgCl2 in water in mg/lit##
M1=100./84.;##multiplication factor of MgCO3##
M2=100./120.;##multiplication factor of MgSO4##
M3=100./111.;##multiplication factor of CaCl2##
M4=100./95.;##multiplication factor of MgCl2##
P1=W1*M1;##MgCO3 in terms of CaCO3##
P2=W2*M2;##MgSO4 in terms of CaCO3##
P3=W3*M3;##CaCl2  in terms of CaCO3##
P4=W4*M4;##MgCl2 in terms of CaCO3##
T=P1;
print'%s %.2f %s'%("\nCarbonate hardness is ",T," mg/l or ppm");
P=P2+P3+P4;
print'%s %.2f %s'%("\nNon Carbonate hardness is ",P," mg/l or ppm");
Carbonate hardness is  34.76  mg/l or ppm

Non Carbonate hardness is  200.00  mg/l or ppm

Ex7-pg1-62

In [7]:
##water and its treatment##
##example 2.18.7##
import math
Hardness_ppm=304.##ppm in terms of CaCO3##
Cl=0.07*Hardness_ppm##0.07 Clarke =1 ppm##
Fr=0.1*Hardness_ppm##0.1 French =1 ppm##
mgperlit=Hardness_ppm
print'%s %.2f %s'%("Hardness in terms of Clarke ",Cl," Cl");
print'%s %.2f %s'%("\nHardness in terms of French ",Fr," Fr");
print'%s %.2f %s'%("\nHardness in terms of mg/lit ",mgperlit," mg/l");
Hardness in terms of Clarke  21.28  Cl

Hardness in terms of French  30.40  Fr

Hardness in terms of mg/lit  304.00  mg/l

Ex7A-pg1-63

In [1]:
##water and its treatment##
##example 2.18.7.A##
import math
W1=32.4;##Ca(HCO3)2 in water in mg/lit##
W2=29.2;##Mg(HCO3)2 in water in mg/lit##
W3=13.5;##CaSO4 in water in mg/lit##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./146.;##multiplication factor of Mg(HCO3)2 ##
M3=100./136.;##multiplication factor of CaSO4##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3##
P2=W2*M2;##Mg(HCO3)2  in terms of CaCO3##
P3=W3*M3;##CaSO4 in terms of CaCO3##
T=P1+P2;
print'%s %.0f %s'%("\nTemporary hardness is ",T," mg/l or ppm");
P=P3;
print'%s %.0f %s'%("\nPermanant hardness is ",P," mg/l or ppm");
To=T+P;
print'%s %.2f %s'%("\nTotal hardness is ",To," mg/l or ppm");
Temporary hardness is  40  mg/l or ppm

Permanant hardness is  10  mg/l or ppm

Total hardness is  49.93  mg/l or ppm

Ex8-pg1-64

In [2]:
##water and its treatment##
##example 2.18.8##
import math
Hardness_Cl=2.42##in terms of Clarke##
Hardness_Fr=3.6##in terms of French##
Cl=Hardness_Cl/0.07##0.07 Clarke =1 ppm##
Fr=Hardness_Fr/0.1##0.1 French =1 ppm##
print'%s %.2f %s'%("2.42Clarke ",Cl," mg/l or ppm");
print'%s %.2f %s'%("\n 3.6 French ",Fr," mg/l or ppm");
2.42Clarke  34.57  mg/l or ppm

 3.6 French  36.00  mg/l or ppm

Ex9-pg1-64

In [3]:
##water and its treatment##
##example 2.18.9##
import math
Hardness_ppm1=350.##ppm in terms of CaCO3##
Hardness_ppm2=500.##ppm in terms of CaCO3##
Cl=0.07*Hardness_ppm1##0.07 Clarke =1 ppm##
Fr=0.1*Hardness_ppm2##0.1 French =1 ppm##
print'%s %.2f %s'%("1)Hardness in terms of degree Clarke ",Cl," Cl");
print'%s %.2f %s'%("\n 2)Hardness in terms of degree French ",Fr," Fr");
1)Hardness in terms of degree Clarke  24.50  Cl

 2)Hardness in terms of degree French  50.00  Fr

Ex10-pg1-65

In [4]:
##water and its treatment##
##example 2.18.10##
import math
W1=40.5;##Ca(HCO3)2 in water in mg/lit##
W2=23.75;##MgCl2 in water in mg/lit##
W3=21.;##MgCO3 in water in mg/lit##
W4=6.;##SiO2 in water in mg/lit##
W5=3.;##CO2 in water in mg/lit##
W6=55.5;##CaCl2 in water in mg/lit##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./95.;##multiplication factor of MgCl2##
M3=100./84.;##multiplication factor of MgCO3##
M6=100./111.;##multiplication factor of CaCl2##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3 or ##
P2=W2*M2;##MgCl2 in terms of CaCO3 or ##
P3=W3*M3;##MgCO3  in terms of CaCO3 or ##
P6=W6*M6;##CaCl2 in terms of CaCO3 or ##
print ("We do not take SiO2 and CO2 since they do not contribute to hardness ");
C=P1+P3;
print'%s %.f %s'%("\nCarbonate hardness is ",C," mg/l or ppm");
NC=P2+P6;
print'%s %.f %s'%("\nNon Carbonate hardness is ",NC," mg/l or ppm");
We do not take SiO2 and CO2 since they do not contribute to hardness 

Carbonate hardness is  50  mg/l or ppm

Non Carbonate hardness is  75  mg/l or ppm

Ex11-pg1-65

In [5]:
##water and its treatment##
##example 2.18.11##
import math
W1=17.5;##Ca(HCO3)2 in water in mg/lit##
W2=14.6;##Mg(HCO3)2 in water in mg/lit##
W3=9.5;##MgCl2 in water in mg/lit##
W4=12.0;##MgSO4 in water in mg/lit##
W5=8.4;##MgCO3 in water in mg/lit##
W6=5.5;##CaCl2 in water in mg/lit##
W7=35;##NaCl in water in mg/lit##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./146.;##multiplication factor of Mg(HCO3)2##
M3=100./95.;##multiplication factor of MgCl2##
M4=100./120.;##multiplication factor of MgSO4##
M5=100./84.;##multiplication factor of MgCO3##
M6=100./111.;##multiplication factor of CaCl2##
P1=W1*M1;##Ca(HCO3)2 in terms of CaCO3 or ##
P2=W2*M2;##Mg(HCO3)2 in terms of CaCO3 or ##
P3=W3*M3;##MgCl2  in terms of CaCO3 or ##
P4=W4*M4;##MgSO4 in terms of CaCO3 or ##
P5=W5*M5;##MgCO3 in terms of CaCO3 or ##
P6=W6*M6;##CaCl2 in terms of CaCO3 or ##
print ("We do not take NaCl since it does not contribute to hardness ");
T=P1+P2+P5;
print'%s %.2f %s'%("\nTemporary hardness is ",T," mg/l or ppm");
P=P3+P4+P6;
print'%s %.2f %s'%("\nPermanant hardness is ",P," mg/l or ppm");
To=T+P;
print'%s %.2f %s'%("\nTotal hardness is ",To," mg/l or ppm");
We do not take NaCl since it does not contribute to hardness 

Temporary hardness is  30.80  mg/l or ppm

Permanant hardness is  24.95  mg/l or ppm

Total hardness is  55.76  mg/l or ppm

Ex12-pg1-66

In [6]:
##water and its treatment##
##example 2.18.12##
import math
strength_CaCl2=250./200.##in terms of mgs/ml CaCO3##
volume_CaCl2=25.##volume of CaCl2 titrated(ml)##
EDTA_CaCl2=35.##volume in terms of ml##
volume_hardwater=25.##volume of hardwater titrated(ml)##
EDTA_hardwater=30.##volume used to titrate unknown hardwater##
CaCO3_equivalent_CaCl2=strength_CaCl2*volume_CaCl2##in terms of mg##
one_ml_EDTA=CaCO3_equivalent_CaCl2/EDTA_CaCl2##in terms of CaCO3 equivalent##
titrate_equivalent=one_ml_EDTA*EDTA_hardwater/volume_hardwater##CaCO3 equivalent of titrated volume##
Hardness=titrate_equivalent*1000.##in terms of mg/lit or ppm##
print'%s %.2f %s'%("\nHardness of water is ",Hardness," mg/l or ppm");
Hardness of water is  1071.43  mg/l or ppm

Ex13-pg1-67

In [7]:
##water and its treatment##
##example 2.18.13##
import math
strength_SH=1.##strength of Std hardwater
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=35.##volume for Std hardwater(ml)##
EDTA_H=20.##volume for sample hardwater(ml)##
AB_EDTA=12.##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  571.43  mg/l or ppm

Permanent Hardness is  342.86  mg/l or ppm

Temporary Hardness is  228.57  mg/l or ppm

Ex14-pg1-67

In [8]:
##water and its treatment##
##example 2.18.14##
import math
conc_SH=.5/500. ##in terms of g/lit##
strength_SH=conc_SH*1000. ##in terms of mgs/lit##
volume_SH=25. ##in terms of ml##
volume_H=50. ##in terms of ml##
EDTA_SH=24. ##volume for Std hardwater(ml)##
EDTA_H=22.5##volume for sample hardwater(ml)##
AB_EDTA=20. ##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  468.75  mg/l or ppm

Permanent Hardness is  416.67  mg/l or ppm

Temporary Hardness is  52.08  mg/l or ppm

Ex15-pg1-68

In [9]:
##water and its treatment##
##example 2.18.15##
import math
conc_SH=.2/200.##in terms of g/lit##
strength_SH=conc_SH*1000.##in terms of mgs/lit##
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=48.##volume for Std hardwater(ml)##
EDTA_H=15.##volume for sample hardwater(ml)##
AB_EDTA=10.##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  312.50  mg/l or ppm

Permanent Hardness is  208.33  mg/l or ppm

Temporary Hardness is  104.17  mg/l or ppm

Ex16-pg1-68

In [10]:
##water and its treatment##
##example 2.18.16##
import math
strength_SH=1.##in terms of mgs/lit##
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=20.##volume for Std hardwater(ml)##
EDTA_H=25.##volume for sample hardwater(ml)##
AB_EDTA=18.##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  1250.00  mg/l or ppm

Permanent Hardness is  900.00  mg/l or ppm

Temporary Hardness is  350.00  mg/l or ppm

Ex17-pg1-69

In [11]:
##water and its treatment##
##example 2.18.17##
import math
strength_SH=1.##in terms of mgs/lit##
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=20.##volume for Std hardwater(ml)##
EDTA_H=30.##volume for sample hardwater(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
Total Hardness is  1500.00  mg/l or ppm

Ex18-pg1-70

In [12]:
##water and its treatment##
##example 2.18.18##
import math
strength_SH=1.##in terms of mgs/lit##
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=20.##volume for Std hardwater(ml)##
EDTA_H=25.##volume for sample hardwater(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
Total Hardness is  1250.00  mg/l or ppm

Ex19-pg1-70

In [13]:
##water and its treatment##
##example 2.18.19##
import math
conc_SH=0.28##in terms of g/lit##
strength_SH=conc_SH##in terms of mgs/lit##
volume_SH=100.##in terms of ml##
volume_H=100.##in terms of ml##
EDTA_SH=28.##volume for Std hardwater(ml)##
EDTA_H=33.##volume for sample hardwater(ml)##
AB_EDTA=10.##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  330.00  mg/l or ppm

Permanent Hardness is  100.00  mg/l or ppm

Temporary Hardness is  230.00  mg/l or ppm

Ex20-pg1-71

In [14]:
##water and its treatment##
##example 2.18.20##
import math
strength_SH=1.##in terms of mgs/lit##
volume_SH=50.##in terms of ml##
volume_H=50.##in terms of ml##
EDTA_SH=20.##volume for Std hardwater(ml)##
EDTA_H=25.##volume for sample hardwater(ml)##
AB_EDTA=18.##volume required after boiling(ml)##
CaCO3_equivalent_SH=strength_SH*volume_SH##in terms of CaCO3 equivalent##
one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH##in terms of CaCO3 equivalent##
To_sample=one_ml_EDTA*EDTA_H/volume_H##total hardness for given volume##
To=To_sample*1000.##total hardness per litre(ppm)##
P_sample=AB_EDTA*one_ml_EDTA/volume_H##permanent hardness for given volume##
P=P_sample*1000.##permanent hardness per litre(ppm)##
T=To-P
print'%s %.2f %s'%("\nTotal Hardness is ",To," mg/l or ppm");
print'%s %.2f %s'%("\nPermanent Hardness is ",P," mg/l or ppm");
print'%s %.2f %s'%("\nTemporary Hardness is ",T," mg/l or ppm");
Total Hardness is  1250.00  mg/l or ppm

Permanent Hardness is  900.00  mg/l or ppm

Temporary Hardness is  350.00  mg/l or ppm

Ex21-pg1-71

In [15]:
##water and its treatment##
##example 2.18.21##
import math    
Purity_Lime=.85
Purity_soda=.95
W1=55.5;##amount of CaCl2 in ppm##
W2=20.;##amount of SiO2 in ppm##
W3=12.6;##amount of  NaHCO3 in ppm##
W4=250.;##amount of KCl in ppm##
W5=48.;##amount of MgSO4 in ppm##
W6=2.2;##amount of CO2 in ppm##
W7=43.8;##amount of Mg(HCO3)2 in ppm##
W8=2.;##amount of Fe++ in ppm##
W9=10.;##amount of AlCl3 in ppm##
M1=100./111.;##multiplication factor of CaCl2##
M3=100./(84.*2.);##multiplication factor of NaHCO3##
M5=100./120.;##multiplication factor of MgSO4##
M6=100./44.;##multiplication factor of CO2##
M7=100./146.;##multiplication factor of Mg(HCO3)2##
M8=100./55.8;##multiplication factor of Fe++##
M9=100./133.42;##multiplication factor of AlCl3##
P1=W1*M1;##in terms of CaCO3##L
P3=W3*M3;##in terms of CaCO3##+L and -S 
P5=W5*M5;##in terms of CaCO3##L+S
P6=W6*M6;##in terms of CaCO3##L
P7=W7*M7;##in terms of CaCO3##L
P8=W8*M8;##in terms of CaCO3##L+S
P9=W9*M9;##in terms of CaCO3##L+S
print("We do not take SiO2 and KCl since they do not react with lime/soda");
V=50000.;##volume of water in litres##
L=0.74*(P3+P5+P6+P7*2+P8+P9)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L,"kg");
S=1.06*(P1-P3+P5+P8+P9)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S,"kg")
We do not take SiO2 and KCl since they do not react with lime/soda

Lime required is  5.38 kg

Soda required is  5.22 kg

Ex22-pg1-72

In [16]:
##water and its treatment##
##example 2.18.22##
import math    
Purity_Lime=.85
Purity_soda=.80
Rate_lime=9.##Rs.per kg##
Rate_soda=35.##Rs.per kg##
W1=20.4;##amount of CaSO4 in ppm##
W2=9.5;##amount of MgCl2 in ppm##
W3=7.3;##amount of HCl in ppm##
M1=100./136.;##multiplication factor of CaSO4##
M2=100./95.;##multiplication factor of MgCl2##
M3=100./(36.5*2);##multiplication factor of HCl##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##L+S
V=80000.;##volume of water in litres##
L=0.74*(P2+P3)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P1+P2+P3)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
Cost_lime=L*Rate_lime
Cost_soda=S*Rate_soda
print'%s %.2f %s'%("\nCost of lime is Rs. ",Cost_lime,"");
print'%s %.2f %s'%("\nCost of soda is Rs. ",Cost_soda,"")
Lime required is  1.39  kg

Soda required is  3.71  kg

Cost of lime is Rs.  12.54 

Cost of soda is Rs.  129.85 

Ex23-pg1-73

In [17]:
##water and its treatment##
##example 2.18.23##
import math    
Purity_Lime=.85
Purity_soda=.90
W1=27.2;##amount of CaSO4 in ppm##
W2=24;##amount of MgSO4 in ppm##
W3=11.1;##amount of CaCl2 in ppm##
W4=47.5;##amount of MgCl2 in ppm##
W5=2.195;##amount of CO2 in ppm##
W6=1.825;##amount of HCl in ppm##
W7=13.35;##amount of AlCl3 in ppm##
M1=100/136;##multiplication factor of CaSO4##
M2=100/120;##multiplication factor of MgSO4##
M3=100/111;##multiplication factor of CaCl2##
M4=100/95;##multiplication factor of MgCl2##
M5=100/44;##multiplication factor of CO2##
M6=100/(36.5*2);##multiplication factor of HCl##
M7=100/133.5;##multiplication factor of AlCl3##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##L+S 
P5=W5*M5;##in terms of CaCO3##L
P6=W6*M6;##in terms of CaCO3##L+S
P7=W7*M7;##in terms of CaCO3##L+S
V=100000.;##volume of water in litres##
L=0.74*(P2+P4+P5+P6+P7)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("Lime required is ",L,"kg");
S=1.06*(P1+P2+P3+P4+P6+P7)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\n Soda required is ",S,"kg")
Lime required is  5.61 kg

 Soda required is  7.07 kg

Ex24-pg1-73

In [18]:
##water and its treatment##
##example 2.18.24##
import math
W1=50;##amount of CaCO3 in ppm##
W2=14.4;##amount of MgCO3 in ppm##
W3=22.2;##amount of CaCl2 in ppm##
W4=9.5;##amount of MgCl2 in ppm##
W5=20;##amount of Fe2O3 in ppm##
W6=20;##amount of Na2SO4 in ppm##
W7=5;##amount of SiO2 in ppm##
W8=2.2;##amount of CO2 in ppm##
M1=100/100;##multiplication factor of CaCO3##
M2=100/84;##multiplication factor of MgCO3##
M3=100/111;##multiplication factor of CaCl2##
M4=100/95;##multiplication factor of MgCl2##
M8=100/44.05;##multiplication factor of CO2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L 
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##L+S
P8=W8*M8;##in terms of CaCO3##L
print("We do not take Fe2O3, Na2SO4 and SiO2 since they do not react with lime/soda");
V=75000.;##volume of water in litres##
L=0.74*(P1+P2*2.+P4+P8)*V;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L,"kg");
S=1.06*(P3+P4)*V;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S,"kg")
We do not take Fe2O3, Na2SO4 and SiO2 since they do not react with lime/soda

Lime required is  5.18 kg

Soda required is  0.76 kg

Ex25-pg1-74

In [19]:
##water and its treatment##
##example 2.18.25##
import math    
Purity_Lime=.90
Purity_soda=.90
Rate_lime=7.##Rs.per kg##
Rate_soda=35.##Rs.per kg##
W1=30.;##amount of Ca++ in ppm##
W2=21.6;##amount of Mg++ in ppm##
W3=12.2;##amount of HCO3- in ppm##
W4=4.4;##amount of CO2 in ppm##
W5=4.9;##amount of H2SO4 in ppm##
M1=100./40.;##multiplication factor of Ca++##
M2=100./24.;##multiplication factor of Mg++##
M3=100./(61.*2.);##multiplication factor of HCO3-##
M4=100./44.;##multiplication factor of CO2##
M5=100./98.;##multiplication factor of H2SO4##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##+L and -S
P4=W4*M4;##in terms of CaCO3##L
P5=W5*M5;##in terms of CaCO3##L+S
V=25000.;##volume of water in litres##
L=0.74*(P2+P3+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("Quantity of Lime required is ",L," kg");
S=1.06*(P1+P2-P3+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
Cost_lime=L*Rate_lime
Cost_soda=S*Rate_soda
print'%s %.2f %s'%("\nCost of lime is Rs. ",Cost_lime,"");
print'%s %.2f %s'%("\nCost of soda is Rs. ",Cost_soda,"")
Quantity of Lime required is  2.36  kg

Quantity of Soda required is  4.71  kg

Cost of lime is Rs.  16.55 

Cost of soda is Rs.  164.89 

Ex26-pg1-75

In [20]:
##water and its treatment##
##example 2.18.26##
import math    
Purity_Lime=.89
Purity_soda=.92
W1=30.;##amount of CaCO3 in ppm##
W2=90.;##amount of MgCO3 in ppm##
W3=160.;##amount of MgCl2 in ppm##
W4=35.;##amount of MgSO4 in ppm##
W5=25.;##amount of CaSO4 in ppm##
W6=120.;##amount of NaCl in ppm##
M1=100./100.;##multiplication factor of CaCO3##
M2=100./84.01;##multiplication factor of MgCO3##
M3=100./95.;##multiplication factor of MgCl2##
M4=100./120.;##multiplication factor of MgSO4##
M5=100./135.9;##multiplication factor of CaSO4##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##S
print ("We do not take NaCl since it does not react with lime/soda");
V=40000.;##volume of water in litres##
L=0.74*(P1+P2*2.+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L,"kg");
S=1.06*(P3+P4+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take NaCl since it does not react with lime/soda

Quantity of Lime required is  14.70 kg

Quantity of Soda required is  9.95  kg

Ex27-pg1-75

In [21]:
##water and its treatment##
##example 2.18.27##
import math    
Purity_Lime=0.90
Purity_soda=0.90
W1=2.1;##amount of CaCO3 in Clarke##
W2=0.63;##amount of MgCO3 in Clarke##
W3=0.35;##amount of CaSO4 in Clarke##
W4=0.21;##amount of MgSO4 in Clarke##
W5=0.063;##amount of MgCl2 in Clarke##
W6=0.035;##amount of KCl in Clarke##
M1=100./(100.*0.07);##multiplication factor of CaCO3##
M2=100./(84.04*0.07);##multiplication factor of MgCO3##
M3=100./(136.*0.07);##multiplication factor of CaSO4##
M4=100./(120.*0.07);##multiplication factor of MgSO4##
M5=100./(95.*0.07);##multiplication factor of MgCl2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L+S
print ("We do not take KCl since it do not react with lime/soda");
V=85000.;##volume of water in litres##
L=0.74*(P1+P2*2.+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P3+P4+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take KCl since it do not react with lime/soda

Quantity of Lime required is  3.83  kg

Quantity of Soda required is  0.71  kg

Ex28-pg1-76

In [22]:
##water and its treatment##
##example 2.18.28##
import math    
Purity_Lime=.89
Purity_soda=.95
W1=14.6;##amount of HCl in ppm##
W2=34.2;##amount of Al2(SO4)3 in ppm##
W3=9.5;##amount of MgCl2 in ppm##
W4=30.;##amount of KCl in ppm##
M1=100./(2.*36.5);##multiplication factor of HCl##
M2=(3.*100.)/342.3;##multiplication factor of Al2(SO4)3##
M3=100./95.;##multiplication factor of MgCl2##
P1=W1*M1;##in terms of CaCO3##L+S
P2=W2*M2;##in terms of CaCO3##L+S
P3=W3*M3;##in terms of CaCO3##L+S
print ("We do not take KCl since it does not react with lime/soda");
V=20000.;##volume of water in litres##
L=0.74*(P1+P2+P3)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P1+P2+P3)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take KCl since it does not react with lime/soda

Quantity of Lime required is  1.00  kg

Quantity of Soda required is  1.34  kg

Ex29-pg1-76

In [23]:
##water and its treatment##
##example 2.18.29##
import math    
Purity_Lime=0.85
Purity_soda=0.95
W1=3.5;##amount of CaCO3 in ppm##
W2=6.8;##amount of CaSO4 in ppm##
W3=8.4;##amount of MgCO3 in ppm##
W4=5.7;##amount of MgCl2 in ppm##
W5=6.0;##amount of MgSO4 in ppm##
W6=3.0;##amount of SiO2 in ppm##
W7=11.7;##amount of NaCl in ppm##
M1=100./100.;##multiplication factor of CaCO3##
M2=100./135.86;##multiplication factor of CaSO4##
M3=100./84.;##multiplication factor of MgCO3##
M4=100./95.1;##multiplication factor of MgCl2##
M5=100./120.;##multiplication factor of MgSO4##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##S
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L+S
print ("We do not take SiO2 and NaCl since they do not react with lime/soda");
V=35000.;##volume of water in litres##
L=0.74*(P1+P3*2+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required in month of Feb 2000 is ",L*29," kg");
S=1.06*(P2+P4+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required in month of Feb 2000 is ",S*29," kg")
We do not take SiO2 and NaCl since they do not react with lime/soda

Quantity of Lime required in month of Feb 2000 is  30.48  kg

Quantity of Soda required in month of Feb 2000 is  18.12  kg

Ex30-pg1-70

In [24]:
##water and its treatment##
##example 2.18.30##
import math    
Purity_Lime=0.95
Purity_soda=0.90
W1=9.5;##amount of MgCl2 in ppm##
W2=272;##amount of CaSO4 in ppm##
W3=120;##amount of MgSO4 in ppm##
W4=49;##amount of H2SO4 in ppm##
W5=8;##amount of SiO2 in ppm##
M1=100/95;##multiplication factor of MgCl2##
M2=100/136;##multiplication factor of CaSO4##
M3=100/120;##multiplication factor of MgSO4##
M4=100/98;##multiplication factor of H2SO4##
P1=W1*M1;##in terms of CaCO3##L+S
P2=W2*M2;##in terms of CaCO3##S
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
print ("We do not take SiO2 since it does not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P1+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P1+P2+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Quantity of Lime required is  45.57  kg

Quantity of Soda required is  68.90  kg

Ex31-pg1-71

In [25]:
##water and its treatment##
##example 2.18.31##
import math    
Purity_Lime=.80
Purity_soda=.88
W1=84.;##amount of MgCO3 in ppm##
W2=25.;##amount of SiO2 in ppm##
W3=68.;##amount of CaSO4 in ppm##
W4=30.;##amount of MgSO4 in ppm##
W5=19.;##amount of MgCl2 in ppm##
W6=120.;##amount of CaCO3 in ppm##
M1=100./84.004;##multiplication factor of MgCO3##
M3=100./136.;##multiplication factor of CaSO4##
M4=100./120.;##multiplication factor of MgSO4##
M5=100./95.;##multiplication factor of MgCl2##
M6=100./100.;##multiplication factor of CaCO3##
P1=W1*M1;##in terms of CaCO3##L
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L+S
P6=W6*M6;##in terms of CaCO3##L
print ("We do not take SiO2 since it does not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P1*2.+P4+P5+P6)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P3+P4+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  337.62  kg

Soda required is  114.43  kg

Ex32-pg1-72

In [27]:
##water and its treatment##
##example 2.18.32##
import math    
Purity_Lime=.97
Purity_soda=.91
W1=24.;##amount of Mg2+ in ppm##
W2=20.;##amount of Ca2+ in ppm##
W3=30.;##amount of CO2 in ppm##
W4=150.;##amount of HCO3- in ppm##
W5=40.;##amount of K+ in ppm##
M1=100./24.;##multiplication factor of Mg2+##
M2=100./40.;##multiplication factor of Ca2+##
M3=100./44.;##multiplication factor of CO2##
M4=100./(61*2);##multiplication factor of HCO3-##
P1=W1*M1;##in terms of CaCO3##L+S
P2=W2*M2;##in terms of CaCO3##S
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##+L and -S
print("We do not take K+ since it does not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P1+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P1+P2-P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take K+ since it does not react with lime/soda

Lime required is  222.10  kg

Soda required is  31.51  kg

Ex33-pg1-73

In [28]:
##water and its treatment##
##example 2.18.33##
import math    
Purity_Lime=.80
Purity_soda=.85
W1=162.;##amount of Ca(HCO3)2 in ppm##
W2=9.5;##amount of MgCl2 in ppm##
W3=58.5;##amount of  NaCl in ppm##
W4=7.3;##amount of Mg(HCO3)2 in ppm##
W5=36.5;##amount of HCl in ppm##
W6=44.;##amount of CO2 in ppm##
W7=111.;##amount of CaCl2 in ppm##
W8=60.;##amount of MgSO4 in ppm##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./95.;##multiplication factor of MgCl2##
M4=100./146.;##multiplication factor of Mg(HCO3)2##
M5=100./(2.*36.5);##multiplication factor of HCl##
M6=100./44.;##multiplication factor of CO2##
M7=100./111.;##multiplication factor of CaCl2##
M8=100./120.;##multiplication factor of MgSO4##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L+S 
P4=W4*M4;##in terms of CaCO3##L
P5=W5*M5;##in terms of CaCO3##L+S
P6=W6*M6;##in terms of CaCO3##L
P7=W7*M7;##in terms of CaCO3##S
P8=W8*M8;##in terms of CaCO3##L+S
print("We do not take NaCl since they do not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P1+P2+P4*2+P5+P6+P8)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P2+P5+P7+P8)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take NaCl since they do not react with lime/soda

Lime required is  296.00  kg

Soda required is  261.88  kg

Ex34-pg1-74

In [29]:
##water and its treatment##
##example 2.18.34##
import math    
Purity_Lime=.90
Purity_soda=.90
W1=30.;##amount of Ca2+ in ppm##
W2=21.6;##amount of Mg2+ in ppm##
W3=4.9;##amount of H2SO4 in ppm##
W4=4.4;##amount of CO2 in ppm##
W5=12.2;##amount of HCO3- in ppm##
W6=15.4;##amount of Fe2O3 in ppm##
M1=100./40.;##multiplication factor of Ca2+##
M2=100./24.;##multiplication factor of Mg2+##
M3=100./98.;##multiplication factor of H2SO4##
M4=100./44.01;##multiplication factor of CO2##
M5=100./122.;##multiplication factor of HCO3-##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L
P5=W5*M5;##in terms of CaCO3##+L and -S
print ("We do not take Fe2O3 since it does not react with lime/soda");
V=25000.;##volume of water in litres##
L=0.74*(P2+P3+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P1+P2+P3-P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take Fe2O3 since it does not react with lime/soda

Quantity of Lime required is  2.36  kg

Quantity of Soda required is  4.71  kg

Ex35-pg1-75

In [30]:
##water and its treatment##
##example 2.18.35##
import math    
Purity_Lime=.95
Purity_soda=.80
W1=14.6;##amount of Mg(HCO3)2 in ppm##
W2=6.8;##amount of CaSO4 in ppm##
W3=8.1;##amount of Ca(HCO3)2 in ppm##
W4=12.;##amount of MgSO4 in ppm##
W5=15.;##amount of Na2SO4 in ppm##
W6=2.;##amount of SiO2 in ppm##
M1=100./146.;##multiplication factor of Ca2+##
M2=100./157.;##multiplication factor of Mg2+##
M3=100./162.08;##multiplication factor of H2SO4##
M4=100./120.;##multiplication factor of CO2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##S 
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##L+S
print ("We do not take Na2SO4 and SiO2 since they do not react with lime/soda");
V=50000.;##volume of water in litres##
L=0.74*(P1*2.+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P2+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S,"kg")
We do not take Na2SO4 and SiO2 since they do not react with lime/soda

Quantity of Lime required is  1.36  kg

Quantity of Soda required is  0.95 kg

Ex36-pg1-76

In [31]:
##water and its treatment##
##example 2.18.36##
import math    
Purity_Lime=.86
Purity_soda=.90
W1=35.2;##amount of CaCO3 in ppm##
W2=7.8;##amount of MgCl2 in ppm##
W3=12.5;##amount of HCl in ppm##
W4=33.3;##amount of Al2(SO4)3 in ppm##
W5=8.8;##amount of Na2SO4 in ppm##
W6=18.6;##amount of Fe2O3 in ppm##
M1=100./99.976;##multiplication factor of CaCO3##
M2=100./94.08;##multiplication factor of MgCl2##
M3=100./73.;##multiplication factor of HCl##
M4=100./114.##multiplication factor of Al2(SO4)3##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
print ("We do not take Na2SO4 and Fe2O3 since they do not react with lime/soda");
V=25000.;##volume of water in litres##
L=0.74*(P1+P2+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P2+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take Na2SO4 and Fe2O3 since they do not react with lime/soda

Quantity of Lime required is  1.93  kg

Quantity of Soda required is  1.61  kg

Ex37-pg1-77

In [32]:
##water and its treatment##
##example 2.18.37##
import math    
Purity_Lime=.80
Purity_soda=.90
W1=7.1;##amount of Mg(HCO3)2 in ppm##
W2=8.1;##amount of Ca(HCO3)2 in ppm##
W3=4.2;##amount of MgCO3 in ppm##
W4=10.;##amount of CaCO3 in ppm##
M1=100./142.;##multiplication factor of Mg(HCO3)2##
M2=100./162.;##multiplication factor of Ca(HCO3)2##
M3=100./84.;##multiplication factor of MgCO3##
M4=100./100.##multiplication factor of CaCO3##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##L
V=100000.;##volume of water in litres##
L=0.74*(P1*2.+P2+P3*2+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(0.)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.f %s'%("\nQuantity of Soda required is ",S," kg")
Quantity of Lime required is  3.24  kg

Quantity of Soda required is  0  kg

Ex38-pg1-78

In [33]:
##water and its treatment##
##example 2.18.38##
import math    
Purity_Lime=.85
Purity_soda=.90
W1=95.;##amount of MgCl2 in ppm##
W2=272.;##amount of CaSO4 in ppm##
W3=120.;##amount of MgSO4 in ppm##
W4=49.;##amount of CaSO4 in ppm##
W5=4.;##amount of SiO2 in ppm##
M1=100./95.;##multiplication factor of CaCO3##
M2=100./136.;##multiplication factor of MgCl2##
M3=100./120.;##multiplication factor of HCl##
M4=100./98.##multiplication factor of Al2(SO4)3##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##S 
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
print ("We do not take SiO2 since it does not react with lime/soda");
V=10000.;##volume of water in litres##
L=0.74*(P1+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P1+P2+P3)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  2.18  kg

Soda required is  4.71  kg

Ex39-pg1-79

In [34]:
##water and its treatment##
##example 2.18.39##
import math    
Purity_Lime=.90
Purity_soda=1.
W1=136.;##amount of CaSO4 in ppm##
W2=49.;##amount of H2SO4 in ppm##
W3=95.;##amount of MgCl2 in ppm##
W4=60.;##amount of MgSO4 in ppm##
W5=50.;##amount of SiO2 in ppm##
M1=100./136.;##multiplication factor of CaSO4##
M2=100./98.;##multiplication factor of H2SO4##
M3=100./95.;##multiplication factor of MgCl2##
M4=100./120.##multiplication factor of MgSO4##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##S
print ("We do not take SiO2 since it does not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P2)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nQuantity of Lime required is ",L," kg");
S=1.06*(P1+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nQuantity of Soda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Quantity of Lime required is  41.11  kg

Quantity of Soda required is  265.00  kg

Ex40-pg1-80

In [35]:
##water and its treatment##
##example 2.18.40##
import math    
Purity_Lime=.74
Purity_soda=.90
W1=73.;##amount of Mg(HCO3)2 in ppm##
W2=120.;##amount of MgSO4 in ppm##
W3=22.2;##amount of CaCl2 in ppm##
W4=164.;##amount of Ca(NO3)3 in ppm##
W5=15.;##amount of SiO2 in ppm##
M1=100./146.;##multiplication factor of Mg(HCO3)2##
M2=100./120.;##multiplication factor of MgSO4##
M3=100./111.;##multiplication factor of CaCl2##
M4=100./164.##multiplication factor of Ca(NO3)2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##S
P4=W4*M4;##in terms of CaCO3##S
print ("We do not take SiO2 since it does not react with lime/soda");
V=5000.;##volume of water in litres##
L=0.74*(P1*2.+P2)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P2+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  1.00  kg

Soda required is  1.30  kg

Ex41-pg1-81

In [36]:
##water and its treatment##
##example 2.18.41##
import math    
Purity_Lime=.85
Purity_soda=.90
W1=95.;##amount of MgCl2 in ppm##
W2=272.;##amount of CaSO4 in ppm##
W3=120.;##amount of MgSO4 in ppm##
W4=49.;##amount of H2SO4 in ppm##
W5=4.;##amount of SiO2 in ppm##
M1=100./95.;##multiplication factor of MgCl2##
M2=100./136.;##multiplication factor of CaSO4##
M3=100./120.;##multiplication factor of MgSO4##
M4=100./98.##multiplication factor of H2SO4##
P1=W1*M1;##in terms of CaCO3##L+S
P2=W2*M2;##in terms of CaCO3##S 
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
print("We do not take SiO2 since it does not react with lime/soda");
V=10000.;##volume of water in litres##
L=0.74*(P1+P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P1+P2+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  2.18  kg

Soda required is  5.30  kg

Ex42-pg1-82

In [37]:
##water and its treatment##
##example 2.18.42##
import math    
W1=10.;##amount of CaCO3 in ppm##
W2=14.6;##amount of Mg(HCO3)2 in ppm##
W3=4.4;##amount of CO2 in ppm##
W4=22.2;##amount of CaCl2 in ppm##
W5=9.5;##amount of MgCl2 in ppm##
W6=2.8;##amount of SiO2 in ppm##
M1=100./100.;##multiplication factor of CaCO3##
M2=100./146.;##multiplication factor of Mg(HCO3)2##
M3=100./44.;##multiplication factor of CO2##
M4=100./111.##multiplication factor of CaCl2##
M5=100./95.;##multiplication factor of MgCl2/
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L 
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##S
P5=W5*M5;##in terms of CaCO3##L+S
print ("We do not take SiO2 since it does not react with lime/soda");
V=50000.;##volume of water in litres##
L=0.74*(P1+P2+P3+P5)*V;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P4+P5)*V;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  1.48  kg

Soda required is  1.59  kg

Ex43-pg1-83

In [38]:
##water and its treatment##
##example 2.18.43##
import math    
Purity_Lime=.92
Purity_soda=.95
W1=68.2;##amount of CaCO3 in ppm##
W2=29.6;##amount of Mg(NO3)2 in ppm##
W3=58.4;##amount of Mg(HCO3)2 in ppm##
W4=36.;##amount of MgSO4 in ppm##
W5=95.;##amount of MgCl2 in ppm##
W6=27.2;##amount of CaSO4 in ppm##
W7=19.3;##amount of Fe2O3 in ppm##
M1=100./100.;##multiplication factor of CaCO3##
M2=100./148.;##multiplication factor of Mg(NO3)2##
M3=100./146.;##multiplication factor of Mg(HCO3)2##
M4=100./120.##multiplication factor of MgSO4##
M5=100./95.;##multiplication factor of MgCl2##
M6=100./136.;##multiplication factor of CaSO4##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##S 
P3=W3*M3;##in terms of CaCO3##L
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L+S
P6=W6*M6;##in terms of CaCO3##S
print("We do not take Fe2O3 since it does not react with lime/soda");
V=15000.;##volume of water in litres##
L=0.74*(P1+P3+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P2+P4+P5+P6)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take Fe2O3 since it does not react with lime/soda

Lime required is  2.87  kg

Soda required is  2.85  kg

Ex44-pg1-84

In [39]:
##water and its treatment##
##example 2.18.44##
import math    
Purity_Lime=.85
Purity_soda=.95
W1=49.95;##amount of CaCl2 in ppm##
W2=42.;##amount of MgSO4 in ppm##
W3=12.6;##amount of NaHCO3 in ppm##
W4=10.;##amount of SiO2 in ppm##
W5=500.;##amount of NaCl in ppm##
W6=51.1;##amount of Mg(HCO3)2 in ppm##
W7=3.;##amount of CO2 in ppm##
W8=3.;##amount of Fe2+ in ppm##
W9=15.;##amount of AlCl3 in ppm##
M1=100./111.;##multiplication factor of CaCl2##
M2=100./120.;##multiplication factor of MgSO4##
M6=100./146.;##multiplication factor of Mg(HCO3)2##
M7=100./44.3##multiplication factor of CO2##
M8=100./55.;##multiplication factor of Fe2+##
M9=100./133.5##multiplication factor of AlCl3##
P1=W1*M1;##in terms of CaCO3##S
P2=W2*M2;##in terms of CaCO3##L+S 
P6=W6*M6;##in terms of CaCO3##L
P7=W7*M7;##in terms of CaCO3##L
P8=W8*M8;##in terms of CaCO3##L+S
P9=W9*M9;##in terms of CaCO3##L+S
print ("We do not take NaHCO3, NaCl and Mg(HCO3)2 since they do not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P2+P6*2+P7+P8+P9)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P1+P2+P8+P9)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take NaHCO3, NaCl and Mg(HCO3)2 since they do not react with lime/soda

Lime required is  111.84  kg

Soda required is  107.89  kg

Ex44A-pg1-85

In [40]:
##water and its treatment##
##example 2.18.44.A##
import math    
Purity_Lime=.90
Purity_soda=.90
W1=146.;##amount of Mg(HCO3)2 in ppm##
W2=81.;##amount of Ca(HCO3)2 in ppm##
W3=15.;##amount of Na2SO4 in ppm##
W4=95.;##amount of MgCl2 in ppm##
W5=111.;##amount of CaCl2 in ppm##
W6=10.;##amount of SiO2 in ppm##
M1=100./146.;##multiplication factor of Mg(HCO3)2##
M2=100./162.7;##multiplication factor of Ca(HCO3)2##
M4=100./95.07;##multiplication factor of MgCl2##
M5=100./111.##multiplication factor of CaCl2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L 
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L+S
print("We do not take Na2SO4 and SiO2 since they do not react with lime/soda");
V=100000.;##volume of water in litres##
L=0.74*(P1+P2*2+P4+P5)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P4+P5)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take Na2SO4 and SiO2 since they do not react with lime/soda

Lime required is  32.85  kg

Soda required is  23.55  kg

Ex44B-pg1-86

In [41]:
##water and its treatment##
##example 2.18.44.B##
import math    
Purity_Lime=.85
Purity_soda=.90
W1=16.2;##amount of Ca(HCO3)2 in ppm##
W2=6.8;##amount of CaSO4 in ppm##
W3=11.1;##amount of CaCl2 in ppm##
W4=6;##amount of MgSO4 in ppm##
W5=8.4;##amount of Mg(HCO3)2 in ppm##
W6=8.;##amount of SiO2 in ppm##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./136.;##multiplication factor of CaSO4##
M3=100./111.;##multiplication factor of CaCl2##
M4=100./120.##multiplication factor of MgSO4##
M5=100./146.##multiplication factor of Mg(HCO3)2##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L+S 
P3=W3*M3;##in terms of CaCO3##L+S
P4=W4*M4;##in terms of CaCO3##L+S
P5=W5*M5;##in terms of CaCO3##L
print ("We do not take SiO2 since it does not react with lime/soda");
V=1000000.;##volume of water in litres##
L=0.74*(P1+P4+P5*2.)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P2+P3+P4)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take SiO2 since it does not react with lime/soda

Lime required is  23.08  kg

Soda required is  23.56  kg

Ex44C-pg1-87

In [42]:
##water and its treatment##
##example 2.18.44.C##
import math    
Purity_Lime=.90
Purity_soda=.95
W1=81.;##amount of Ca(HCO3)2 in ppm##
W2=42.;##amount of MgCO3 in ppm##
W3=4.1;##amount of NaAlO2 in ppm##
W4=3.65;##amount of HCl in ppm##
W5=82.;##amount of Ca(NO3)2 in ppm##
W6=4.5;##amount of NaCl in ppm##
M1=100./162.;##multiplication factor of Ca(HCO3)2##
M2=100./84.;##multiplication factor of MgCO3##
M3=100./82.;##multiplication factor of NaAlO2##
M4=100./36.5##multiplication factor of HCl##
P1=W1*M1;##in terms of CaCO3##L
P2=W2*M2;##in terms of CaCO3##L 
P3=W3*M3;##in terms of CaCO3##-L-S
P4=W4*M4;##in terms of CaCO3##L+S
print ("We do not take Ca(NO3)2 and NaCl since they do not react with lime/soda");
V=20000.;##volume of water in litres##
L=0.74*(P1+P2*2.-P3+P4)*V/Purity_Lime;##lime required in mg##
L=L/10**6;
print'%s %.2f %s'%("\nLime required is ",L," kg");
S=1.06*(P4-P3)*V/Purity_soda;##soda required in mg##
S=S/10**6;
print'%s %.2f %s'%("\nSoda required is ",S," kg")
We do not take Ca(NO3)2 and NaCl since they do not react with lime/soda

Lime required is  2.55  kg

Soda required is  0.11  kg

Ex44D-pg1-88

In [43]:
##water and its treatment##
##example 2.18.44.D##
import math
volume_hardwater=7000.##in litres##
volume_NaCl=60.##Volume of NaCl in litres##
conc_NaCl=10.##% NaCl consumed by zeolite bed##
Wt_per_Litre=conc_NaCl*10.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent," gms");
print'%s %.2f %s'%("\nHardness of water is ",Hardness,"ppm");
CaCO3 equivalent is  5128.21  gms

Hardness of water is  732.60 ppm

Ex45-pg1-88

In [44]:
##water and its treatment##
##example 2.18.45##
import math
Hardness=250.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=50.##Volume of NaCl##
conc_NaCl=15.##% NaCl consumed by zeolite bed##
Wt_per_Litre=conc_NaCl*10.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent*1000," mgs");
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
CaCO3 equivalent is  6410256.41  mgs

Quantity of water softened using zeolite bed is  25641.03  litres

Ex46-pg1-89

In [45]:
##water and its treatment##
##example 2.18.46##
import math
volume_hardwater=5000.##in litres##
H=250.##Hardness of water(mg/lit) or ppm##
Hardness=H/1000.##Hardness of water(gms/lit)##
CaCO3_equivalent=volume_hardwater*Hardness##in terms of (gms/lit)##
conc_NaCl=10.##% NaCl consumed by zeolite bed##
Wt_per_Litre=conc_NaCl*10.##gms NaCl consumed by zeolite bed per litre##
total_wt=CaCO3_equivalent*58.5/50.##total gms NaCl consumed by zeolite bed##
volume_NaCl=total_wt/Wt_per_Litre##in litres##
print'%s %.2f %s'%("\nVolume of NaCl solution required is ",volume_NaCl," litres");
Volume of NaCl solution required is  14.62  litres

Ex47-pg1-89

In [46]:
##water and its treatment##
##example 2.18.47##
import math
volume_hardwater=20.##in litres##
H=375.##Hardness of water(mg/lit) or ppm##
CaCO3_equivalent=volume_hardwater*H##in terms of (gms/lit)##
conc_NaCl=20.##% NaCl consumed by zeolite bed##
Wt_per_Litre=conc_NaCl*10.##gms NaCl consumed by zeolite bed per litre##
total_wt=CaCO3_equivalent*58.5/50.##total gms NaCl consumed by zeolite bed##
volume_NaCl=total_wt/Wt_per_Litre##in litres##
print'%s %.2f %s'%("\nVolume of NaCl solution required is ",volume_NaCl," litres");
Volume of NaCl solution required is  43.88  litres

Ex48-pg1-90

In [47]:
##water and its treatment##
##example 2.18.48##
import math
volume_hardwater=25000.##in litres##
volume_NaCl=200.##Volume of NaCl##
Wt_per_Litre=20.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nHardness of water sample is ",Hardness," ppm");
Hardness of water sample is  136.75  ppm

Ex49-pg1-90

In [48]:
##water and its treatment##
##example 2.18.49##
import math
volume_hardwater=10**4##in litres##
volume_NaCl=80.##Volume of NaCl##
conc_NaCl=1000.##mg NaCl consumed by zeolite bed per litre##
Wt_per_Litre=conc_NaCl/1000.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent*1000," mg");
print'%s %.2f %s'%("\nHardness of water is ",Hardness," mg/lit");
CaCO3 equivalent is  68376.07  mg

Hardness of water is  6.84  mg/lit

Ex50-pg1-91

In [49]:
##water and its treatment##
##example 2.18.50##
import math
volume_hardwater=75000.##in litres##
volume_NaCl=117.##Volume of NaCl in litres##
conc_NaCl=1500.##mg NaCl consumed by zeolite bed per litre##
Wt_per_Litre=conc_NaCl/1000.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent*10000," mg");
print'%s %.2f %s'%("\nHardness of water is ",Hardness," ppm");
CaCO3 equivalent is  1500000.00  mg

Hardness of water is  2.00  ppm

Ex51-pg1-92

In [50]:
##water and its treatment##
##example 2.18.51##
import math
Hardness=600.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=300.##Volume of NaCl##
Wt_per_Litre=75.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent*1000," mgs");
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
CaCO3 equivalent is  19230769.23  mgs

Quantity of water softened using zeolite bed is  32051.28  litres

Ex52-pg1-93

In [51]:
##water and its treatment##
##example 2.18.52##
import math
Hardness=50.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=100.##Volume of NaCl##
conc_NaCl=1200.##mgs NaCl consumed by zeolite bed per litre##
Wt_per_Litre=conc_NaCl/1000.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent*1000," mgs");
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
CaCO3 equivalent is  102564.10  mgs

Quantity of water softened using zeolite bed is  2051.28  litres

Ex53-pg1-94

In [52]:
##water and its treatment##
##example 2.18.53##
import math
volume_hardwater=75000.##in litres##
volume_NaCl=1500.##Volume of NaCl in litres##
conc_NaCl=117.##mgs NaCl consumed by zeolite bed per litre##
Wt_per_Litre=conc_NaCl/1000.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nHardness of water is ",Hardness," ppm or mg/lit");
Hardness of water is  2.00  ppm or mg/lit

Ex54-pg1-95

In [53]:
##water and its treatment##
##example 2.18.54##
import math
Hardness=500.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=1000.##Volume of NaCl##
Wt_per_Litre=100.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
Quantity of water softened using zeolite bed is  170940.17  litres

Ex55-pg1-95

In [54]:
##water and its treatment##
##example 2.18.55##
import math
Hardness=450.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=150.##Volume of NaCl##
Wt_per_Litre=50.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.505##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
Quantity of water softened using zeolite bed is  14243.80  litres

Ex56-pg1-96

In [55]:
##water and its treatment##
##example 2.18.56##
import math
Hardness=300.##Hardness of water(mg/lit) or ppm##
H=Hardness/1000.##Hardness of water(gms/lit)##
volume_NaCl=75.##Volume of NaCl##
Wt_per_Litre=75.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.595##in terms of (gms/lit)##
volume_hardwater=CaCO3_equivalent/H
print'%s %.2f %s'%("\nQuantity of water softened using zeolite bed is ",volume_hardwater," litres");
Quantity of water softened using zeolite bed is  15999.66  litres

Ex57-pg1-97

In [56]:
##water and its treatment##
##example 2.18.57##
import math
volume_hardwater=800.##in litres##
volume_NaCl=40.##Volume of NaCl in litres##
Wt_per_Litre=110.##gms NaCl consumed by zeolite bed per litre##
total_wt=Wt_per_Litre*volume_NaCl##total gms NaCl consumed by zeolite bed##
CaCO3_equivalent=total_wt*50./58.5##in terms of (gms/lit)##
H=CaCO3_equivalent/volume_hardwater##Hardness of water(gms/lit)##
Hardness=H*1000.##Hardness of water(mg/lit) or ppm##
print'%s %.2f %s'%("\nCaCO3 equivalent is ",CaCO3_equivalent," gms");
print'%s %.2f %s'%("\nHardness of water is ",Hardness," ppm");
CaCO3 equivalent is  3760.68  gms

Hardness of water is  4700.85  ppm