Calculating cation exchange in a salt transport model.