# Variables
wt_CaSO4 = 160 # mg / l
# Solution
hardness = 100 * wt_CaSO4 / 136.
print "The hardness is", "{:.2f}".format(hardness), "mg / L of CaCO3 eqv."
# Variables
wt1 = 9.3 # mg / L
wt2 = 17.4 # mg / L
wt3 = 8.7 # mg / L
wt4 = 12.6 # mg / L
# Solution
temp_hardness = wt1 * 100 / 146. + wt2 * 100 / 162.
per_hardness = wt3 * 100 / 95. + wt4 * 100 / 136.
total_hardness = temp_hardness + per_hardness
print "Temporary hardness:", "{:.2f}".format(temp_hardness), "mg / L"
print "Total hardness:", "{:.2f}".format(total_hardness), "mg / L"
# Variables
wt1 = 32.4 # mg / L
wt2 = 29.2 # mg / L
wt3 = 13.5 # mg / L
# Solution
temp_hardness = wt1 * 100 / 162. + wt2 * 100 / 146.
per_hardness = wt3 * 100 / 136.
print "Temporary hardness:", "{:.2f}".format(temp_hardness), "mg / L"
print "Permanent hardness:", "{:.2f}".format(per_hardness), "mg / L"
# Variables
i1 = 180 # mg / L, CaCl2
i2 = 210 # mg / L, Ca(NO3)2
i3 = 123 # mg / L, MgSO4
i4 = 90 # mg / L, Mg(HCO3)2
# Solution
i1_req = i1 * 100 / 111.
i2_req = i2 * 100 / 164.
i3_req = i3 * 100 / 120.
i4_req = i4 * 100 / 146.
lime_req = 74 / 100. * (2 * i4_req + i3_req) * 100 / 70. * 10000
soda_req = 106 / 100. * (i1_req + i3_req + i2_req) * 100 / 80. * 10000
print "Lime Required", "{:.1e}".format(lime_req), "mg",
print "=", "{:.1f}".format(lime_req / 10 ** 6), "kg"
print "Soda Required", "{:.1e}".format(soda_req), "mg",
print "=", "{:.1f}".format(soda_req / 10 ** 6), "kg"
# Variables
wt1 = 32.4 # mg / L, Ca(HCO3)2
wt2 = 29.29 # mg / L, Mg(HCO3)2
wt3 = 13.5 # mg / L, CaSO4
# Solution
wt1_equi = wt1 * 100 / 162.
wt2_equi = wt2 * 100 / 146.
wt3_equi = wt3 * 100 / 136.
temp_hardness = wt1_equi + wt2_equi
perm_hardness = wt3_equi
print "Temporary hardness [due to Ca(HCO3)2 & Mg(HCO3)2] is",
print int(temp_hardness), "ppm"
print "Permanent hardness [due to CaSO4] is", "{:.1f}".format(perm_hardness), "ppm"
# Variables
v1 = 150 # litres, NaCl
# Solution
v_hardwater = 22500 * v1 / 3 / 0.6 / 58.5
print "The amount of hard water that can be softened using this softner is",
print int(v_hardwater), "litres"
# Variables
v1 = 30 # litres, NaCl
w = 1500 # mg / L, NaCl
# Solution
hardness = 45 * 50 / 58.5 * 1000 / 1000
print "Hardness of water is", "{:.2f}".format(hardness), "ppm"
# Variables
v1_water = 50 # ml, water
w1_CaCO3 = 1.5 # mg, pure CaCO3
v1_EDTA = 44 # ml, EDTA
v2_EDTA = 40 # ml, EDTA
v2_water = 20 # ml, water
# Solution
EDTA_1ml = v1_water * w1_CaCO3 / v1_EDTA
hardwater_40ml = v2_water * 1.704
total_hardness0 = hardwater_40ml * 1000 / 40
total_hardness1 = total_hardness0 * 0.07
print "Total hardness is", "{:.2f}".format(total_hardness1), "°Cl"
# Constants
Fe = 56
S = 32
O = 16
Ca = 40
C = 12
# Solution
hardness100 = Fe + S + O * 4
print "215 ppm of hardness is", "{:.1f}".format(hardness100 * 215 / 100.),
print "ppm of FeSO4"
# Variables
v1 = 50. # ml, hardwater
v2 = 15 # ml, EDTA
m = 0.01 # M, EDTA
# Solution
M = v2 * m / v1
N = M * 2
S = N * 50 * 1000
print "Molarity of hardness is", M, "M"
print "Normality of hardness is", N, "N"
print "Strength of hardness is", S, "ppm or mg / L"
# Variable
C = 16.5 # ppm, CO3-2
# Solution
Molarity = C * 10 ** - 6 / 60.
print "Molarity of CO3-2 is", "{:.1e}".format(Molarity), "mol / L"