WATERCHEM_lsi(): Langelier Saturation Index (LSI)

About:
Calculate the Langelier Saturation Index (LSI).
\begin{equation} LSI = pH - pH_s \end{equation}

Module: WaterChemistry

Function: WATERCHEM_lsi(t,ph,tds,ca,hco3)
Parameters:
  • t, temperature - ÂșC;
  • ph, water pH
  • tds, Total Dissolved Solids - mg/l;
  • ca, concentration of calcium hardness, mg Ca/liter;
  • hco3, concetration of HCO3- (alkalinity), mg CaCO3/liter.
Sample code:
from WaterChemistry  import *

ph = 7.7    # water pH
tds = 300   # mg TDS/liter
ca = 50     # mg Ca/liter
hco3 = 100  # mg CaCo3/liter (Alkalinity)
t = 20      # oC

lsi = WATERCHEM_lsi(t,ph,tds,ca,hco3)

print("LSI:",lsi)

Result:
LSI: -0.21426972978908498