Equilibrium chemical modelling of heavy metals in activated sludge