Thermodynamics, Chemical and Ionic equilibria