The efficiency of protein fractionation by ultrafiltration is reduced by concentration polarization, which indirectly reduces the apparent selectivity of the membrane. The complete understanding of this phenomenon requires the knowledge of the electrical interactions between the membrane and the solutes. These interactions are studied by numerical methods. A numerical code, based on a finite volume method, is developed to study the separation of a solution containing two charged solutes by solving the Poisson-Boltzmann, the Navier-Stokes and the Nernst-Planck equations. The code is used to study the effects of the electric charge of the membrane in the concentration fields of the solutes.