pH modeling during electrochemical transformation in groundwater