Assuming a decoupling of the microions and the elastic degrees of freedom of the gel, the semi-grand canonical partition function, Ξ = Ξ e Z g , is given by the product of the electrostatic grand canonical partition function, Ξ e , and the gel canonical partition function, Z g . The electrostatic part is obtained from the electrostatic component of the Hamiltonian, H e , which can be decomposed as