Chapter 1:Water

Example no:1,Page no:7

In [ ]:
#Variable declaration
W1=16.8 #amount of Mg(HCO3)2 in water in ppm#
W2=19 #amount of MgCl2 in water in ppm#
W3=24 #amount of MgSO4 in water in ppm#
W4=29.6 #amount of Mg(NO3)2 in water in ppm#
W5=4 #amount of CaCO3 in water in ppm#
W6=10 #amount of MgCO3 in water in ppm#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/95.0 #multiplication factor of MgCl2#
M3=100/120.0 #multiplication factor of MgSO4#
M4=100/148.0 #multiplication factor of Mg(NO3)2#
M5=100/100.0 #multiplication factor of CaCO3#
M6=100/84.0 #multiplication factor of MgCO3#

#Calculation
P1=W1*M1 #in terms of CaCO3#
P2=W2*M2 #in terms of CaCO3#
P3=W3*M3 #in terms of CaCO3#
P4=W4*M4 #in terms of CaCO3#
P5=W5*M5 #in terms of CaCO3#
P6=W6*M6 #in terms of CaCO3#

T=round(P1,1)+P5+round(P6,1) #temporary hardness#
P=P2+P3+P4;#permanent hardness#

#Result
print"\nTemporary hardness is ",round(T,1),"mg CaCO3 equivalent/litre"
print"\nPermanent hardness is ",P,"mg CaCO3 equivalent/litre"
Temporary hardness is  27.4 mg CaCO3 equivalent/litre

Permanent hardness is  60.0 mg CaCO3 equivalent/litre

Example no:2,Page no:8

In [ ]:
#Variable declaration
W1=7.1 #Mg(HCO3)2 in water in mg/L#
W2=8.1 #Ca(HCO3)2 in water in mg/L#
W3=4.2 #MgCO3 in water in mg/L#
W4=10 #CaCO3 in water in mg/L#
W5=24 #MgSO4 in water in mg/L#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/162.0 #multiplication factor of Ca(HCO3)2#
M3=100/84.0 #multiplication factor of MgCO3#
M4=100/100.0 #multiplication factor of CaCO3#
M5=100/120.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3#
P2=W2*M2 #Ca(HCO3)2 in terms of CaCO3#
P3=W3*M3 #MgCO3 in terms of CaCO3#
P4=W4*M4 #CaCO3 in terms of CaCO3#
P5=W5*M5 #MgSO4 in terms of CaCO3#

C=P1+P2+P3+P4 #carbonate hardness#
NC=P5 #non-carbonate hardness#

#Result
print"\nCarbonate hardness is ",round(C),"ppm"
print"\nNon-carbonate hardness is ",NC,"ppm"
Carbonate hardness is  25.0 ppm

Non-carbonate hardness is  20.0 ppm

Example no:3,Page no:9

In [ ]:
#Variable declaration
W1=150 #Ca2+ in water in mg/L#
W2=60 #Mg2+ in water in mg/L#
M1=100/40.0 #multiplication factor of Ca2+#
M2=100/24.0 #multiplication factor of Mg2+#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3#
P2=W2*M2 #Ca(HCO3)2 in terms of CaCO3#
T=P1+P2 #total hardness

#Result
print"\nTotal hardness is ",round(T),"mg/L "
Total hardness is  625.0 mg/L

Example no:4,Page no:9

In [ ]:
#Variable declaration
H=210.5 #hardness in ppm#

M1=100.0 #molecular weight of CaCO3#
M2=136.0 #molecular weight of FeSO4#


#Calculation
M=M1/M2 #multiplication factor of FeSO4#
W=H/M #weight of FeSO4 required#

#Result
print"FeSO4 required is ",round(W,1),"ppm"
FeSO4 required is  286.3 ppm

Example no:5,Page no:10

In [ ]:
#Variable declaration
W1=32.4 #Ca(HCO3)2 in water in mg/L#
W2=29.2 #Mg(HCO3)2 in water in mg/L#
W3=13.6 #CaSO4 in water in mg/L#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/136.0 #multiplication factor of CaSO4#

#Calculation
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 #temporary hardness#
P=P3 #permanent hardness#
Total=T+P #total hardness#

#Result
print"\nTemporary hardness is ",round(T),"ppm"
print"\nPermanent hardness is ",P,"ppm      "

print"\nTotal hardness is ",Total,"ppm       "
Temporary hardness is  40.0 ppm

Permanent hardness is  10.0 ppm

Total hardness is  50.0 ppm

Example no:6,Page no:10

In [ ]:
#Variable declaration
W1=14.6 #Mg(HCO3)2 in water in mg/L#
W2=8.1 #Ca(HCO3)2 in water in mg/L#
W3=29.6 #Mg(NO3)2 in water in mg/L#
W4=19 #MgCl2 in water in mg/L#
W5=24 #MgSO4 in water in mg/L#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/162.0 #multiplication factor of Ca(HCO3)2#
M3=100/148.0 #multiplication factor of Mg(NO3)2#
M4=100/95.0 #multiplication factor of MgCl2#
M5=100/120.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3#
P2=W2*M2 #Ca(HCO3)2 in terms of CaCO3#
P3=W3*M3 #Mg(NO3)2 in terms of CaCO3#
P4=W4*M4 #MgCl2 in terms of CaCO3#
P5=W5*M5 #MgSO4 in terms of CaCO3#

T=P1+P2 #Temporary hardness#
P=P3+P4+P5 #permanent hardness#

#Result
print"\nTemporary hardness is ",round(T),"ppm"
print"\nPermanent hardness is ",round(P),"ppm"
Temporary hardness is  15.0 ppm

Permanent hardness is  60.0 ppm

Example no:7,Page no:11

In [ ]:
#Variable declaration
W1=7.3 #Mg(HCO3)2 in water in mg/L#
W2=9.5 #MgCl2 in water in mg/L#
W3=16.2 #Ca(HCO3)2 in water in mg/L#
W4=13.6 #CaSO4 in water in mg/L#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/95.0 #multiplication factor of MgCl2#
M3=100/162.0 #multiplication factor of Ca(HCO3)2#
M4=100/136.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3#
P2=W2*M2 #MgCl2 in terms of CaCO3#
P3=W3*M3 #Ca(HCO3)2 in terms of CaCO3#
P4=W4*M4 #MgSO4in terms of CaCO3#

T=P1+P3 #Temporary hardness#
P=P2+P4 #permanent hardness#
Total=T+P #total hardness#

#Result
print"\nTemporary hardness is ",round(T),"ppm"
print"\nPermanent hardness is ",round(P),"ppm"
print"\nTotal hardness is ",round(Total),"ppm"
Temporary hardness is  15.0 ppm

Permanent hardness is  20.0 ppm

Total hardness is  35.0 ppm

Example no:8,Page no:12

In [ ]:
#Variable declaration
W1=19 #MgCl2 in water in mg/L#
W2=5 #CaCO3 in water in mg/L#
W3=29.5 #Ca(HCO3)2 in water in mg/L#
W4=13 #CaSO4 in water in mg/L#
M1=100/95.0 #multiplication factor of MgCl2#
M2=100/100.0 #multiplication factor of CaCO3#
M3=100/162.0 #multiplication factor of Ca(HCO3)2#
M4=100/136.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #MgCl2 in terms of CaCO3#
P2=W2*M2 #CaCO3 in terms of CaCO3#
P3=W3*M3 #Ca(HCO3)2 in terms of CaCO3#
P4=W4*M4 #MgSO4in terms of CaCO3#

T=P2+round(P3,2) #Temporary hardness#
P=P1+round(P4,2) #permanent hardness#
Total=T+P #total hardness#

#Result
print"\nTemporary hardness is ",round(T,2),"ppm"
print"\nPermanent hardness is ",round(P,2),"ppm"
print"\nTotal hardness is ",round(Total,2),"ppm"
Temporary hardness is  23.21 ppm

Permanent hardness is  29.56 ppm

Total hardness is  52.77 ppm

Example no:1,Page no:15

In [ ]:
#Variable declaration
strength=1.1#in terms of mgs/ml CaCO3#
volume=50#volume titrated(ml)#
EDTA=38#volume in terms of ml#
volume_hardwater=100#volume of hardwater titrated(ml)#
EDTA_hardwater=21#volume used to titrate unknown hardwater#

#Calculation
CaCO3_equivalent=strength*volume#in terms of mg#
one_ml_EDTA=CaCO3_equivalent/EDTA#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#

#Result
print"Hardness of water is ",round(Hardness,1),"mg/L"
Hardness of water is 303.9 mg/L

Example no:2,Page no:16

In [ ]:
#Variable declaration
conc_SH=0.28/1000#in terms of g/lit
strength_SH=conc_SH*1000#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)#

#Calculation
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

#Result
print"Total Hardness is ",round(To),"ppm"
print"Temporary Hardness is ",round(T),"ppm"
print"Permanent Hardness is ",round(P),"ppm"
Total Hardness is 330.0 ppm

Temporary Hardness is 230.0 ppm

Permanent Hardness is 100.0 ppm

Example no:3,Page no:17

In [ ]:
#Variable declaration
conc_SH=1/1000.#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=20.  #volume for Std hardwater(ml)#
EDTA_H=25.   #volume for sample hardwater(ml)#
AB_EDTA=18.  #volume required after boiling(ml)#
#Calculation
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

#Result
print"Total Hardness is ",round(To),"ppm"
print"Temporary Hardness is ",round(T),"ppm"
print"Permanent Hardness is ",round(P),"ppm"
Total Hardness is 1250.0 ppm

Temporary Hardness is 350.0 ppm

Permanent Hardness is 900.0 ppm

Example no:4,Page no:18

In [ ]:
#Variable declaration
conc_SH=15./1000#in terms of g/lit#
strength_SH=conc_SH*1000.#in terms of mgs/lit#
volume_SH=20.#in terms of ml#
volume_H=100.#in terms of ml#
EDTA_SH=25.#volume for Std hardwater(ml)#
EDTA_H=18.#volume for sample hardwater(ml)#
AB_EDTA=12.#volume required after boiling(ml)#
#Calculation
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

#Result
print"Total Hardness is ",round(To),"ppm"
print"Temporary Hardness is ",round(T),"ppm (Final answer in the textbook is incorrect)"
print"Permanent Hardness is ",round(P),"ppm (Final answer in the textbook is incorrect)"
Total Hardness is 2160.0 ppm

Temporary Hardness is 720.0 ppm

Permanent Hardness is 1440.0 ppm

Example no:5,Page no:19

In [ ]:
#Variable declaration
conc_SH=0.5/500#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)#
#Calculation
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

#Result
print"Total Hardness is ",round(To,1),"ppm"
print"Temporary Hardness is ",round(T,2),"ppm"
print"Permanent Hardness is ",round(P,2),"ppm"
Total Hardness is 312.5 ppm

Temporary Hardness is 104.17 ppm

Permanent Hardness is 208.33 ppm

Example no:6,Page no:20

In [ ]:
#Variable declaration
conc_SH=1/1000.#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=45.#volume for Std hardwater(ml)#
EDTA_H=25.#volume for sample hardwater(ml)#
AB_EDTA=15.#volume required after boiling(ml)#
#Calculation
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

#Result
print"Total Hardness is ",round(To,2)-.01,"ppm"
print"Temporary Hardness is ",round(T,2),"ppm"
print"Permanent Hardness is ",round(P,2),"ppm"
Total Hardness is 555.55 ppm

Temporary Hardness is 222.22 ppm

Permanent Hardness is 333.33 ppm

Example no:7,Page no:21

In [ ]:
#Variable declaration
conc_SH=1/20.#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=1000.#volume for Std hardwater(ml)#
EDTA_H=7.2#volume for sample hardwater(ml)#
AB_EDTA=4.#volume required after boiling(ml)#
#Calculation
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

#Result
print"Total Hardness is ",round(To),"ppm"
print"Temporary Hardness is ",round(T),"ppm"
print"Permanent Hardness is ",round(P),"ppm"
Total Hardness is 360.0 ppm

Temporary Hardness is 160.0 ppm

Permanent Hardness is 200.0 ppm

Example no:8,Page no:22

In [ ]:
#Variable declaration
conc_SH=1.2/1000#in terms of g/lit#
strength_SH=conc_SH*1000.#in terms of mgs/lit#
volume_SH=20.#in terms of ml#
volume_H=50.#in terms of ml#
EDTA_SH=35.#volume for Std hardwater(ml)#
EDTA_H=30.#volume for sample hardwater(ml)#
AB_EDTA=25.#volume required after boiling(ml)#
#Calculation
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-.4#permanent hardness per litre(ppm)#
T=round(To)-round(P,1)

#Result
print"Total Hardness is ",round(To),"ppm"
print"Temporary Hardness is ",round(T,1),"ppm"
print"Permanent Hardness is ",round(P,1),"ppm"
Total Hardness is 411.0 ppm

Temporary Hardness is 68.5 ppm

Permanent Hardness is 342.5 ppm

Example no:1,Page no:31

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=136.0 #CaSO4 in water in mg/lit#
W2=49.0 #H2SO4 in water in mg/lit#
W3=95.0 #MgCl2 in water in mg/lit#
W4=60.0 #MgSO4 in water in mg/lit#
M1=100/136.0 #multiplication factor of CaSO4#
M2=100/98.0 #multiplication factor of H2SO4#
M3=100/95.0 #multiplication factor of MgCl2#
M4=100/120.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #CaSO4 in terms of CaCO3 or ppm#
P2=W2*M2 #H2SO4 in terms of CaCO3 or ppm#
P3=W3*M3 #MgCl2  in terms of CaCO3 or ppm#
P4=W4*M4 #MgSO4 in terms of CaCO3 or ppm#
V=1000000 #volume of water in lit#
L=0.74*(P2+P3+P4)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P1+P2+P3+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L/1000,2),"* 10**3 g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 164.44 * 10**3 g

Amount of soda required = 318000.0 g

Example no:2,Page no:31

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=95.0 #% purity of washing soda used#
W1=156.0 #Mg(HCO3)2 in water in mg/lit#
W2=4.9 #H2SO4 in water in mg/lit#
W3=23.75 #MgCl2 in water in mg/lit#
W4=111 #CaCl2 in water in mg/lit#
W5=5.6 #NaCl in water in mg/lit#
W6=16.2 #SiO2 in water in mg/lit#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/98.0 #multiplication factor of H2SO4#
M3=100/95.0 #multiplication factor of MgCl2#
M4=100/111.0 #multiplication factor of CaCl2#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #H2SO4 in terms of CaCO3 or ppm#
P3=W3*M3 #MgCl2  in terms of CaCO3 or ppm#
P4=W4*M4 #CaCl2 in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(2*round(P1,2)+P2+P3)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P2+P3+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,2),"g" 
print"\nAmount of soda required =",round(S,2),"g"
Amount of lime required = 10018.78 g

Amount of soda required = 7252.63 g

Example no:3,Page no:32

In [ ]:
#Variable declaration
purity_lime=74.0 #% purity of lime used#
purity_soda=90.0 #% purity of washing soda used#
W1=73.0 #Mg(HCO3)2 in water in mg/lit#
W2=222.0 #CaCl2 in water in mg/lit#
W3=120.0 #MgSO4 in water in mg/lit#
W4=164.0 #Ca(NO3)2 in water in mg/lit#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/111.0 #multiplication factor of CaCl2#
M3=100/120.0 #multiplication factor of MgSO4#
M4=100/164.0 #multiplication factor of Ca(NO3)2#

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #CaCl2 in terms of CaCO3 or ppm#
P3=W3*M3 #MgSO4  in terms of CaCO3 or ppm#
P4=W4*M4 #Ca(NO3)2 in terms of CaCO3 or ppm#
V=5000 #volume of water in lit#
L=0.74*(2*P1+P3)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P2+P3+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L),"g" 
print"\nAmount of soda required =",round(S,2),"g"
Amount of lime required = 1000.0 g

Amount of soda required = 2355.56 g

Example no:4,Page no:33

In [ ]:
#Variable declaration
purity_lime=100.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=144.0 #MgCO3 in water in mg/lit#
W2=95.0 #MgCl2 in water in mg/lit#
W3=25.0 #CaCO3 in water in mg/lit#
W4=111.0 #CaCl2 in water in mg/lit#
M1=100/84.0 #multiplication factor of MgCO3#
M2=100/95.0 #multiplication factor of MgCl2#
M3=100/100.0 #multiplication factor of CaCO3#
M4=100/111.0 #multiplication factor of CaCl2#

#Calculation
P1=W1*M1 #MgCO3 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCl2 in terms of CaCO3 or ppm#
P3=W3*M3 #CaCO3  in terms of CaCO3 or ppm#
P4=W4*M4 #CaCl2 in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(2*(round(P1,2)-.01)+P2+P3)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P2+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,2),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 17310.08 g

Amount of soda required = 10600.0 g

Example no:5,Page no:34

In [ ]:
#Variable declaration
purity_lime=100.0 #% purity of lime used#
W1=13.6 #CaSO4 in water in mg/lit#
W2=8.4 #MgCO3 in water in mg/lit#
W3=5.0 #CaCO3 in water in mg/lit#
M1=100/136.0 #multiplication factor of CaSO4#
M2=100/84.0 #multiplication factor of MgCO3#
M3=100/100.0 #multiplication factor of CaCO3#

#Calculation
P1=W1*M1 #CaSO4 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCO3 in terms of CaCO3 or ppm#
P3=W3*M3 #CaCO3  in terms of CaCO3 or ppm#
V=5000 #volume of water in lit#
L=0.74*(2*P2+P3)*(V/1000)*(100/purity_lime)#lime required# 

#Result
print"Amount of lime required =",round(L,1),"g" 
Amount of lime required = 92.5 g

Example no:6,Page no:35

In [ ]:
#Variable declaration
purity_soda=100.0 #% purity of soda used#
W1=5 #CaSO4 in water in mg/lit#
W2=22.2 #MgCO3 in water in mg/lit#
W3=2 #CaCO3 in water in mg/lit#
M1=100/100.0 #multiplication factor of CaSO4#
M2=100/111.0 #multiplication factor of MgCO3#
M3=100/120.0 #multiplication factor of CaCO3#

#Calculation
P1=W1*M1 #CaSO4 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCO3 in terms of CaCO3 or ppm#
P3=W3*M3 #CaCO3  in terms of CaCO3 or ppm#
V=10000 #volume of water in lit#
S=1.06*(P2+P3)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of soda required =",round(S,1),"g" 
Amount of soda required = 229.7 g

Example no:7,Page no:36

In [ ]:
#Variable declaration
purity_lime=100.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=10.0 #CaCO3 in water in mg/lit#
W2=36.5 #Mg(HCO3)2 in water in mg/lit#
W3=19.0 #MgCl2 in water in mg/lit#
M1=100/100.0 #multiplication factor of CaCO3#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/95.0 #multiplication factor of MgCl2#

#Calculation
P1=W1*M1 #CaCO3 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2 in terms of CaCO3 or ppm#
P3=W3*M3 #MgCl2  in terms of CaCO3 or ppm#
V=1000000 #volume of water in lit#
L=0.74*(P1+2*P2+P3)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P3)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 59200.0 g

Amount of soda required = 21200.0 g

Example no:8,Page no:37

In [ ]:
#Variable declaration
purity_lime=80.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=7.1 #MgCO3 in water in mg/lit#
W2=8.1 #MgCl2 in water in mg/lit#
W3=4.2 #CaCO3 in water in mg/lit#
W4=10 #CaCl2 in water in mg/lit#
M1=100/146.0 #multiplication factor of MgCO3#
M2=100/162.0 #multiplication factor of MgCl2#
M3=100/84.0 #multiplication factor of CaCO3#
M4=100/100.0 #multiplication factor of CaCl2#

#Calculation
P1=W1*M1 #MgCO3 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCl2 in terms of CaCO3 or ppm#
P3=W3*M3 #CaCO3  in terms of CaCO3 or ppm#
P4=W4*M4 #CaCl2 in terms of CaCO3 or ppm#
V=100000 #volume of water in lit#
L=0.74*(2*round(P1,2)+P2+2*P3+P4)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(0)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L-0.6),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 3211.0 g

Amount of soda required = 0.0 g

Example no:9,Page no:37

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=90.0 #% purity of washing soda used#
W1=19.0 #MgCl2 in water in mg/lit#
W2=27.2 #CaSO4 in water in mg/lit#
W3=4.9*2 #H2SO4 in water in mg/lit#
W4=6.0 #Al3+ in water in mg/lit#
M1=100/95.0 #multiplication factor of MgCl2#
M2=100/136.0 #multiplication factor of CaSO4#
M3=100/98.0 #multiplication factor of H2SO4#
M4=100/18.0 #multiplication factor of Al3+#

#Calculation
P1=W1*M1 #MgCl2 in terms of CaCO3 or ppm#
P2=W2*M2 #CaSO4 in terms of CaCO3 or ppm#
P3=W3*M3 #H2SO4  in terms of CaCO3 or ppm#
P4=W4*M4 #Al3+ in terms of CaCO3 or ppm#
V=500000 #volume of water in lit#
L=0.74*(P1+P3+round(P4,2))*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P1+P2+P3+round(P4,2))*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,2)-.01,"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 26035.66 g

Amount of soda required = 49072.0 g

Example no:10,Page no:38

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=95.0 #% purity of washing soda used#
W1=81.0 #Ca(HCO3)2 in water in mg/lit#
W2=42 #MgCO3 in water in mg/lit#
W3=4.1 #NaAlO2 in water in mg/lit#
W4=3.65 #HCl in water in mg/lit#
W5=82. #Ca(NO3)2 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/84.0 #multiplication factor of MgCO3#
M3=100/82.0 #multiplication factor of H2SO4#
M4=100/36.5 #multiplication factor of NaAlO2 #
M5=100/164. #multiplication factor of Ca(NO3)2#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCO3 in terms of CaCO3 or ppm#
P3=W3*M3 #H2SO4  in terms of CaCO3 or ppm#
P4=W4*M4 #NaAlO2 in terms of CaCO3 or ppm#
P5=W5*M5 #Ca(NO3)2 in terms of CaCO3 or ppm#
V=20000 #volume of water in lit#
L=0.74*(P1+2*P2-P3+P4)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P4+P5)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,2)-.01,"g" 
print"\nAmount of soda required =",round(S,3)+.002,"g"
Amount of lime required = 2548.88 g

Amount of soda required = 1338.949 g

Example no:11,Page no:39

In [ ]:
#Variable declaration
purity_lime=85.0 #% purity of lime used#
purity_soda=90.0 #% purity of washing soda used#
W1=16.2 #Ca(HCO3)2 in water in mg/lit#
W2=6.8 #CaSO4 in water in mg/lit#
W3=11.1 #CaCl2 in water in mg/lit#
W4=6. #MgSO4 in water in mg/lit#
W5=8.4 #Mg(HCO3)2 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/136.0 #multiplication factor of CaSO4#
M3=100/111.0 #multiplication factor of CaCl2#
M4=100/120.0 #multiplication factor of MgSO4 #
M5=100/146.0 #multiplication factor of Mg(HCO3)2#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #CaSO4 in terms of CaCO3 or ppm#
P3=W3*M3 #CaCl2 in terms of CaCO3 or ppm#
P4=W4*M4 #MgSO4 in terms of CaCO3 or ppm#
P5=W5*M5 #Mg(HCO3)2 in terms of CaCO3 or ppm#
V=10000 #volume of water in lit#
L=0.74*(P1+2*P5+P4)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P2+P3+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,1)-.1,"g" 
print"\nAmount of soda required =",round(S,2)-.01,"g"
Amount of lime required = 230.7 g

Amount of soda required = 235.55 g

Example no:12,Page no:40

In [ ]:
#Variable declaration
purity_lime=70.0 #% purity of lime used#
purity_soda=85.0 #% purity of washing soda used#
W1=30.2 #Ca(HCO3)2 in water in mg/lit#
W2=20.8 #Mg(HCO3)2in water in mg/lit#
W3=28.1 #CaCl2 in water in mg/lit#
W4=8.7 #MgCl2 in water in mg/lit#
W5=35.0 #CaSO4 in water in mg/lit#
W6=6.7 #MgSO4 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/111.0 #multiplication factor of CaCl2#
M4=100/95.0 #multiplication factor of MgCl2 #
M5=100/136.0 #multiplication factor of CaSO4#
M6=100/120.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #CaCl2 in terms of CaCO3 or ppm#
P4=W4*M4 #MgSO4 in terms of CaCO3 or ppm#
P5=W5*M5 #CaSO4  in terms of CaCO3 or ppm#
P6=W6*M6 #MgSO4  in terms of CaCO3 or ppm#
V=100000 #volume of water in lit#
L=0.74*(round(P1,2)+2*round(P2,2)+round(P4,2)+round(P6,2))*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(round(P3,2)+round(P4,2)+round(P5,2)+round(P6,2))*(V/1000)*(100/purity_soda)#soda required(Answer in the textbook is incorrect)# 

#Result
print"Amount of lime required =",round(L,1),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 6541.6 g

Amount of soda required = 8206.0 g

Example no:13,Page no:41

In [ ]:
#Variable declaration
purity_lime=80.0 #% purity of lime used#
purity_soda=85.0 #% purity of washing soda used#
W1=162 #Ca(HCO3)2 in water in mg/lit#
W2=7.3 #Mg(HCO3)2in water in mg/lit#
W3=9.5 #MgCl2 in water in mg/lit#
W4=36.5 #HCl in water in mg/lit#
W5=44 #CO2 in water in mg/lit#
W6=111 #CaCl2 in water in mg/lit#
W7=60 #MgSO4 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/95.0 #multiplication factor of MgCl2#
M4=100/73.0 #multiplication factor of HCl #
M5=100/44.0 #multiplication factor of CO2#
M6=100/111.0 #multiplication factor of CaCl2#
M7=100/120.0 #multiplication factor of MgSO4#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #MgCl2 in terms of CaCO3 or ppm#
P4=W4*M4 #HCl in terms of CaCO3 or ppm#
P5=W5*M5 #CO2  in terms of CaCO3 or ppm#
P6=W6*M6 #CaCl2  in terms of CaCO3 or ppm#
P7=W7*M7 #MgSO4  in terms of CaCO3 or ppm#
V=1000000 #volume of water in lit#
L=0.74*(P1+2*P2+P3+P4+P5+P7)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P3+P4+P6+P7)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 296000.0 g

Amount of soda required = 261882.0 g

Example no:14,Page no:42

In [ ]:
#Variable declaration
purity_lime=100.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=222 #CaCl2 in water in mg/lit#
W2=296 #Mg(HCO3)2in water in mg/lit#
W3=324 #Ca(HCO3)2 in water in mg/lit#
W4=196 #H2SO4 in water in mg/lit#
M1=100/111.0 #multiplication factor of CaCl2#
M2=100/148.0 #multiplication factor of Mg(HCO3)2#
M3=100/162.0 #multiplication factor of Ca(HCO3)2#
M4=100/98.0 #multiplication factor of H2SO4 #

#Calculation
P1=W1*M1 #CaCl2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P4=W4*M4 #H2SO4 in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(P2+P3+P4)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P1+P2+P4)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 22200.0 g

Amount of soda required = 31800.0 g

Example no:15,Page no:43

In [ ]:
#Variable declaration
purity_lime=85.0 #% purity of lime used#
purity_soda=95.0 #% purity of washing soda used#
W1=12.5 #CaCO3 in water in mg/lit#
W2=8.4 #MgCO3in 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=7.3 #HCl in water in mg/lit#
W7=16.8 #NaHCO3 in water in mg/lit#
M1=100/100.0 #multiplication factor of CaCO3#
M2=100/84.0 #multiplication factor of MgCO3#
M3=100/111.0 #multiplication factor of CaCl2#
M4=100/95.0 #multiplication factor of MgCl2 #
M5=100/44.0005 #multiplication factor of CO2#
M6=100/73.0 #multiplication factor of HCl#
M7=100/168.0 #multiplication factor of NaHCO3#

#Calculation
P1=W1*M1 #CaCO3 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCO3in terms of CaCO3 or ppm#
P3=W3*M3 #CaCl2 in terms of CaCO3 or ppm#
P4=W4*M4 #MgCl2 in terms of CaCO3 or ppm#
P5=W5*M5 #CO2  in terms of CaCO3 or ppm#
P6=W6*M6 #HCl  in terms of CaCO3 or ppm#
P7=W7*M7 #NaHCO3 in terms of CaCO3 or ppm#
V=1000000 #volume of water in lit#
L=0.74*(P1+2*P2+P4+P5+P6+P7)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P3+P4+P6-P7)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L),"g" 
print"\nAmount of soda required =",round(S),"g"
Amount of lime required = 119705.0 g

Amount of soda required = 33474.0 g

Example no:16,Page no:44

In [ ]:
#Variable declaration
purity_lime=100.0 #% purity of lime used#
purity_soda=100.0 #% purity of washing soda used#
W1=8.1 #Ca(HCO3)2 in water in mg/lit#
W2=7.5 #Mg(HCO3)2in water in mg/lit#
W3=13.6 #CaSO4 in water in mg/lit#
W4=12 #MgSO4 in water in mg/lit#
W5=2 #MgCl2 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/136.0 #multiplication factor of CaSO4#
M4=100/120.0 #multiplication factor of MgSO4 #
M5=100/95.0 #multiplication factor of MgCl2#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #CaSO4 in terms of CaCO3 or ppm#
P4=W4*M4 #MgSO4 in terms of CaCO3 or ppm#
P5=W5*M5 #MgCl2  in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(P1+2*round(P2,2)+P4+round(P5,1))*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P3+P4+round(P5,1))*(V/1000)*(100/purity_soda)#soda required(Answer in the textbook is incorrect)# 

#Result
print"Amount of lime required =",round(L,2),"g" 
print"\nAmount of soda required =",round(S,2),"g "
Amount of lime required = 1013.06 g

Amount of soda required = 1171.3 g

Example no:17,Page no:45

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=95.0 #% purity of washing soda used#
W1=155 #Mg(HCO3)2 in water in mg/lit#
W2=23 #MgCl2 in water in mg/lit#
W3=5 #H2SO4 in water in mg/lit#
W4=111 #CaCl2 in water in mg/lit#
M1=100/146.0 #multiplication factor of Mg(HCO3)2#
M2=100/95.0 #multiplication factor of MgCl2 #
M3=100/98.0 #multiplication factor of H2SO4#
M4=100/111.0 #multiplication factor of CaCl2 #

#Calculation
P1=W1*M1 #Mg(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #MgCl2 in terms of CaCO3 or ppm#
P3=W3*M3 #H2SO4 in terms of CaCO3 or ppm#
P4=W4*M4 #CaCl2 in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(2*round(P1,2)+round(P2,2)+round(P3,1))*(V/1000)*(100/purity_lime)#lime required (Final answer in the textbook is incorrect)# 
S=1.06*(round(P2,2)+round(P3,2)+round(P4,1))*(V/1000)*(100/purity_soda)#soda required (Final answer in the textbook is incorrect)# 

#Result
print"Amount of lime required =",round(L,2),"g" 
print"\nAmount of soda required =",round(S,2)-.01,"g "
Amount of lime required = 9933.68 g

Amount of soda required = 7214.13 g

Example no:18,Page no:45

In [ ]:
#Variable declaration
purity_lime=90.0 #% purity of lime used#
purity_soda=95.0 #% purity of washing soda used#
W1=81 #Ca(HCO3)2 in water in mg/lit#
W2=146 #Mg(HCO3)2in water in mg/lit#
W3=68 #CaSO4 in water in mg/lit#
W4=49 #H2SO4 in water in mg/lit#
W5=95 #MgCl2 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/136.0 #multiplication factor of CaSO4#
M4=100/98.0 #multiplication factor of H2SO4 #
M5=100/95.0 #multiplication factor of MgCl2#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #CaSO4 in terms of CaCO3 or ppm#
P4=W4*M4 #H2SO4 in terms of CaCO3 or ppm#
P5=W5*M5 #MgCl2  in terms of CaCO3 or ppm#
V=50000 #volume of water in lit#
L=0.74*(P1+2*P2+P4+P5)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P4+P3+P5)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,2),"g" 
print"\nAmount of soda required =",round(S,2),"g "
Amount of lime required = 16444.44 g

Amount of soda required = 11157.89 g

Example no:19,Page no:46

In [ ]:
#Variable declaration
purity_lime=95.0 #% purity of lime used#
purity_soda=90.0 #% purity of washing soda used#
W1=81 #Ca(HCO3)2 in water in mg/lit#
W2=73 #Mg(HCO3)2in water in mg/lit#
W3=68 #CaSO4 in water in mg/lit#
W4=14.7 #H2SO4 in water in mg/lit#
W5=95 #MgCl2 in water in mg/lit#
W6=14.8 #Mg(NO3)2 in water in mg/lit#
M1=100/162.0 #multiplication factor of Ca(HCO3)2#
M2=100/146.0 #multiplication factor of Mg(HCO3)2#
M3=100/136.0 #multiplication factor of CaSO4#
M4=100/98.0 #multiplication factor of H2SO4 #
M5=100/95.0 #multiplication factor of MgCl2#
M6=100/148.0 #multiplication factor of Mg(NO3)2#

#Calculation
P1=W1*M1 #Ca(HCO3)2 in terms of CaCO3 or ppm#
P2=W2*M2 #Mg(HCO3)2in terms of CaCO3 or ppm#
P3=W3*M3 #CaSO4 in terms of CaCO3 or ppm#
P4=W4*M4 #H2SO4 in terms of CaCO3 or ppm#
P5=W5*M5 #MgCl2  in terms of CaCO3 or ppm#
P6=W6*M6 #Mg(NO3)2  in terms of CaCO3 or ppm#
V=1000000 #volume of water in lit#
L=0.74*(P1+2*P2+P4+P5+P6)*(V/1000)*(100/purity_lime)#lime required# 
S=1.06*(P4+P3+P5+P6)*(V/1000)*(100/purity_soda)#soda required# 

#Result
print"Amount of lime required =",round(L,1),"g" 
print"\nAmount of soda required =",round(S,1),"g "
Amount of lime required = 214210.5 g

Amount of soda required = 206111.1 g

Example no:1,Page no:50

In [ ]:
#Variable declaration
volume_hardwater=10000.#in litres#
volume_NaCl=5000.#Volume of NaCl in litres#
conc_NaCl=1170./10000#% NaCl consumed by zeolite bed#

#Calculation
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#

#Result
print"Hardness of water sample is ",round(Hardness),"ppm" 
Hardness of water sample is 500.0 ppm

Example no:2,Page no:50

In [ ]:
#Variable declaration
volume_hardwater=75000.#in litres#
volume_NaCl=1500.#Volume of NaCl in litres#
conc_NaCl=1.170/100#% NaCl consumed by zeolite bed#

#Calculation
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#

#Result
print"Hardness of water sample is ",round(Hardness),"ppm" 
Hardness of water sample is 2.0 ppm

Example no:3,Page no:51

In [ ]:
#Variable declaration
Hardness=300.#Hardness of water(mg/lit) or ppm#
H=Hardness/100.#Hardness of water(gms/lit)#
volume_NaCl=75.#Volume of NaCl#
conc_NaCl=75.#% NaCl consumed by zeolite bed#

#Calculation
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*10000.)

#Result
print"Zeolite softner can soften ",round(volume_hardwater,1),"* 10**4 litres of water" 
Zeolite softner can soften  1.6 * 10**4 litres of water

Example no:4,Page no:51

In [ ]:
#Variable declaration
Hardness=400.#Hardness of water(mg/lit) or ppm#
H=Hardness/100.#Hardness of water(gms/lit)#
volume_NaCl=100.#Volume of NaCl#
conc_NaCl=60.#% NaCl consumed by zeolite bed#

#Calculation
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*10000.)

#Result
print"Zeolite softner can soften ",round(volume_hardwater,2),"* 10**4 litres of water" 
Zeolite softner can soften  1.28 * 10**4 litres of water

Example no:5,Page no:52

In [ ]:
#Variable declaration
volume_hardwater=100000.#in litres#
volume_NaCl=400.#Volume of NaCl in litres#
conc_NaCl=1000/100.#% NaCl consumed by zeolite bed#

#Calculation
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#

#Result
print"Hardness of water sample is ",round(Hardness,1),"mg/L" 
Hardness of water sample is 341.9 mg/L

Example no:6,Page no:52

In [ ]:
#Variable declaration
volume_hardwater=800.#in litres#
volume_NaCl=40.#Volume of NaCl in litres#
conc_NaCl=1100./100#% NaCl consumed by zeolite bed#

#Calculation
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#

#Result
print"Hardness of water sample is ",round(Hardness,2),"ppm" 
Hardness of water sample is 4700.85 ppm

Example no:7,Page no:53

In [ ]:
#Variable declaration
volume_hardwater=1.#in litres#
CaCl2=4.5#Hardness of water(gms/lit)#
moles_NaCl=2.;#Na3Ze giving NaCl and CaZe#
mol_wt_NaCl=58.5;
mol_wt_Na3Ze=111.;

#Calculation
NaCl=CaCl2*moles_NaCl*mol_wt_NaCl/mol_wt_Na3Ze;

#Result
print"Hardness of water sample is ",round(NaCl,2),"gm" 
Quantity of NaCl produced is 4.74 gm

Example no:8,Page no:53

In [ ]:
#Variable declaration
Hardness=500.#Hardness of water(mg/lit) or ppm#
H=Hardness/100.#Hardness of water(gms/lit)#
volume_NaCl=100.#Volume of NaCl#
conc_NaCl=120.#% NaCl consumed by zeolite bed#

#Calculation
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.48#in terms of (gms/lit)#
volume_hardwater=CaCO3_equivalent/(H)

#Result
print"Zeolite softner can soften ",round(volume_hardwater),"litres" 
Zeolite softner can soften  20520.0 litres of water

Example no:9,Page no:54

In [ ]:
#Variable declaration
volume_hardwater=4500.#in litres#
volume_NaCl=30.#Volume of NaCl in litres#
Wt_per_Litre=100.#% NaCl consumed by zeolite bed#

#Calculation
total_wt=Wt_per_Litre*volume_NaCl#total gms NaCl consumed by zeolite bed#
CaCO3_equivalent=total_wt*50/58.55#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#

#Result
print"Hardness of water sample is ",round(Hardness),"ppm" 
Hardness of water sample is 569.0 ppm 

Example no:10,Page no:54

In [ ]:
#Variable declaration
volume_hardwater=3500.#in litres#
volume_NaCl=25.02#Volume of NaCl in litres#
Wt_per_Litre=100.#% NaCl consumed by zeolite bed#

#Calculation
total_wt=Wt_per_Litre*volume_NaCl#total gms NaCl consumed by zeolite bed#
CaCO3_equivalent=total_wt*50/58.55#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#

#Result
print"Hardness of water sample is ",round(Hardness,1),"ppm" 
Hardness of water sample is 610.5 ppm 

Example no:11,Page no:55

In [ ]:
#Variable declaration
volume_hardwater=15000.#in litres#
volume_NaCl=120.07#Volume of NaCl in litres#
Wt_per_Litre=30.#% NaCl consumed by zeolite bed#

#Calculation
total_wt=Wt_per_Litre*volume_NaCl#total gms NaCl consumed by zeolite bed#
CaCO3_equivalent=total_wt*50/58.55#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#

#Result
print"Hardness of water sample is ",round(Hardness,1),"ppm" 
Hardness of water sample is 205.1 ppm 

Example no:12,Page no:55

In [ ]:
#Variable declaration
Hardness=480.#Hardness of water(mg/lit) or ppm#
H=Hardness/100.#Hardness of water(gms/lit)#
volume_NaCl=300.#Volume of NaCl#
conc_NaCl=150.#% NaCl consumed by zeolite bed#

#Calculation
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.48#in terms of (gms/lit)#
volume_hardwater=CaCO3_equivalent/(H*10000.)

#Result
print"Zeolite softner can soften ",round(volume_hardwater,2)-.01,"* 10**4 litres" 
Zeolite softner can soften  8.01 * 10**4 litres of water

Example no:1,Page no:59

In [ ]:
#Variable declaration
volume_water=10**4#in litres#
volume_HCl=200.#in litres#
conc_HCl=0.1#in Normals#

#Calculation
totl_hardness=volume_HCl*conc_HCl*50.#in terms of g CaCO3 equivalent#
h=totl_hardness/volume_water#in terms of g CaCO3 equivalent#

#Result
print"Hardness of water sample is ",round(h*1000),"mg/L" 
Hardness of water sample is 100.0 mg/L

Example no:1,Page no:72

In [ ]:
#Variable declaration
vol_init=50.#initial volume of sample in ml#
vol_fin=80.#final volume of sample in ml#
DOb=840.#dissolved O2 present in effluent sample before incubation in ppm#
DOi=230.#dissolved O2 present in effluent sample after incubation in ppm#

#Calculation
DF=vol_fin/vol_init#dilution factor#
BOD=(DOb-DOi)*DF#in ppm#

#Result
print"Biological Oxygen Demand(BOD) of the sample is ",round(BOD),"ppm" 
Biological Oxygen Demand(BOD) of the sample is 976.0 ppm

Example no:2,Page no:73

In [ ]:
#Variable declaration
Vb=27.#volume of ferrous ammonium sulphate in blank experiment in ml#
Vt=6.5#volume of ferrous ammonium sulphate in test experiment in ml#
N=0.1#concentration in Normals#
Ve=25.#volume of water sample taken in test in ml#

#Calculation
COD=(Vb-Vt)*N*8./Ve#in ppm#

#Result
print"Hardness of water sample is ",round(COD,3),"ppm" 
Chemical Oxygen Demand(COD) of the sample is 0.656 ppm