A mathematical frame for modeling batch and semi-batch membrane filtration processes is provided. The approach followed in this work uses the feed concentrations as a basis for the calculations, rather than the concentration factor. A practical computational algorithm is proposed. Our method hands separately the design equations describing the engineering aspects of batch and semi-batch systems and the models of mass transfer through the membrane. Thus, different methods can be applied to compute the permeate flux and rejection without having to modify the general framework. In particular, we present an empirical approach to characterize the membrane separation behavior based on a minimal number of experiments. Moreover, we consider irreversible thermodynamics models and a transport model based on the extended Nernst-Planck equations. Finally, various batch and semi-batch nanofiltration operations are carried out with an organic/electrolyte binary test solution to validate the proposed algorithms. (c) 2008 Elsevier B.V. All rights reserved.