Modeling the ion transfer and polarization of ion exchange membranes in bioelectrochemical systems.