1 Introduction

Membrane filtration is widely used in many technological applications (Van der Sman et al. 2012; Van Reis and Zydney 2007; Yogarathinam et al. 2018; Daufin et al. 2011; Emami et al. 2018; Sylvester et al. 2013) and in everyday life, for instance, in coffee-making and air conditioning. Fouling of the membrane by particles in the feed is unavoidable in successful filtration and understanding of the fouling mechanism(s), critical for improving filtration performance and preventing filter failure, has therefore been the target of significant research effort (see, for example, (Ives 1970; Spielman 1977; Tang et al. 2011; Iritani 2013; Iritani and Katagiri 2016)). Extensive experimental studies (Ho and Zydney 1999; Tracey and Davis 1994; Jackson et al. 2014; Lee et al. 2019, 2017; Iwasaki et al. 1937; Lin et al. 2009) have been reported for a range of filtration scenarios, mostly focusing on a feed consisting of a single type of particle (Ho and Zydney 1999; Tracey and Davis 1994; Jackson et al. 2014; Iwasaki et al. 1937; Lin et al. 2009), though possibly with a distribution of particle sizes  (Ostwal et al. 2016; Lee et al. 2019, 2017). In reality, however, filtration typically involves feed containing multiple species of particles, e.g., in gold extraction from ore (Ricci et al. 2015; Acheampong and Lens 2014), vaccine extraction Emami et al. (2018), and other bio-product purifications after fermentation (Van der Sman et al. 2012), which interact with the membrane differently (Chen et al. 2004; Debnath et al. 2019).

For feed containing multiple particle species, the goal may be to remove all suspended particles, but there are many applications in which the purpose of the filtration is to remove some particle species from the feed while recovering other species in the filtrate. For example, when producing vaccine by fermentation, one would want to filter the live virus out and retain the vaccine (detached protein shell of the virus, for example, (Wickramasinghe et al. 2010)) in the filtrate. To our best knowledge, little theoretical work has been devoted to feed containing multiple species of particles. Some experimental results are available (Acheampong and Lens 2014; Ricci et al. 2015; Debnath et al. 2019), though the focus is mostly on the specific underlying application rather than mechanistic understanding of how the presence of different particle types affects the filtration process.

Thanks to recent advances in the development of fast computational tools, numerical solution of the full Navier–Stokes equations and tracking of individual particles in the feed has become a feasible approach for modeling membrane filtration (Kloss et al. 2012). Several such computational fluid dynamics (CFD) studies, particularly focusing on particle deposition on the membrane, have been conducted (Wessling 2001; Kloss et al. 2012; Bacchin et al. 2014; Lohaus et al. 2018). Such models may be very detailed, capable of tracking many millions of particles of arbitrary type and able to reproduce certain experimental data well. However, the computational demand for application-scale scenarios is extremely high; implementation of the CFD method is non-trivial and very time consuming, and development of simpler models, which can treat different particle populations in an averaged sense, is desirable.

In earlier work, (Sanaei and Cummings 2017) proposed a simplified model for standard blocking (adsorption of particles, much smaller than the filter pores, onto the internal pore walls), derived from first principles. The model assumes the pore is of slender shape, with pore aspect ratio \(\epsilon \) defined as typical width W divided by the length D of the pore, \(\epsilon =W/D\ll 1\), see Fig. 1. This provides the basis for an asymptotic analysis of the advection-diffusion equation governing particle transport within the continuum framework, valid for a specific asymptotic range of particle Péclet numbers (details can be found in Appendix A of that work). The model is consistent with one proposed earlier by Iwasaki et al. (1937) based on experiments involving water filtration through sand beds, the validity of which was further confirmed in later experiments by Ison and Ives (1969).

Building on that work, we recently proposed a filtration model focusing on standard blocking with quantitative tracking of particle concentration in the filtrate, which allowed for evaluation of the filtration performance of a given membrane in terms of its pore shape and particle capture characteristics, and for optimization of filtration of a homogeneous feed containing just one type of particles (Sun et al. 2020). In the present work, we extend this approach to filtration with multiple species of particles in the feed, and to more complex optimization scenarios. For simplicity, we consider dead-end filtration using a track-etched type of membrane. We study how the concentration ratio of the different types of particles in the feed, and the differences in membrane-particle interaction characteristics affect the filtration process and we formulate optimization problems to determine the optimum pore shape (within a given class of shape functions) to achieve the desired objectives. To illustrate our model behavior and its application for design optimization, we explore some hypothetical scenarios of practical interest (e.g., sterile filtration (Van Reis and Zydney 2007), virus filtration and vaccine isolation (Emami et al. 2018)), in particular: When there are two compounds A and B in a mixture, which filter design will produce the maximum amount of purified compound B before the filter is completely fouled? Questions such as this lead naturally to constrained optimization problems: how to design a filter such that a certain large fraction of type A particles is guaranteed to be removed, while retaining the maximum yield of type B particles in the filtrate, over the filtration duration?

We propose new fast optimization methods to solve such problems, based on quantities evaluated at the beginning (rather than the end, or over the entire duration) of the filtration, which are over 10 times faster than the method used in our earlier work (Sun et al. 2020). Motivated by some of our findings, we also propose a new multi-stage filtration protocol, which can significantly increase the mass yield per filter of the desired compound and simultaneously improve the purity of the final product.

Many variations on the questions we address could be proposed, and the methods we present are readily adapted to a wide range of scenarios. For brevity and simplicity, in this work, we illustrate our methods with variants of the example outlined above, where the feed contains just two particle species, noting that (within the limitations of our modeling assumptions) our model is readily extended to any number of particle species. (Some sample results for feed containing more than two species are included in the Supplementary Material, Sec. C.)

The remainder of this paper is organized as follows. We set up our two-species filtration model in Sect. 2, focusing attention on the filtration process within a representative pore of the membrane. We then outline a number of hypothetical filtration scenarios with multiple species of particles and formulate the corresponding optimization problems in Sect. 3.1. Although our optimization criteria as defined rely on simulating filtration over the entire useful lifetime of the filter, we will demonstrate the feasibility of using data from the very early stages of our simulations as a reliable predictor of later behavior, offering a much faster route to optimization, discussed in Sect. 3.2. Sample optimization results will be presented in Sect. 4. Section 5 is devoted to the summary and discussion.

Fig. 1
figure 1

Sketch of a cylindrical pore of radius A(XT) and length D inside a square prism, representing a possible basic building-block of the filter membrane (our model is relevant for any other regular tesselating pore-containing prism, e.g., a hexagonal or triangular prism). Blue arrows indicate the flow direction; colored dots indicate the different particle types present in the feed, and W represents the maximum possible pore radius.

2 Filtration Modeling with Two-Particle Species

In this paper, we consider dead-end filtration of a feed solution, carrying multiple distinct particle species, through a membrane filter. We first highlight some key modeling assumptions: We assume the particles are non-interacting (justifiable if the feed solution is sufficiently dilute); that the particles are much smaller than the pore radius; and that the pore is of slender shape, with length much larger than its width (this is the case for “track-etched” type membranes whose pores are straight and form a direct connection between upstream and downstream sides of the membrane; see, e.g., (Apel 2001)). We consider only one type of fouling: the so-called standard blocking mechanism, in which particles (much smaller than pores) are adsorbed on the pore wall leading to pore shrinkage; and we inherit all the additional assumptions made in deriving the standard blocking model proposed by Sanaei and Cummings (2017). Under these assumptions, we set up our model for constant pressure driven flow in Sect. 2.1. (The analogous model for filtration driven by constant flux is described in the Supplementary Material, Sec. A.)

2.1 Solute at Constant Driving Pressure

We consider filtration of a feed solution containing two types (different physicochemical properties) of particles, type 1 and type 2, through a planar membrane filter under constant pressure. In the presentation that follows, we use uppercase fonts to denote dimensional quantities and lower case for nondimensional quantities, which will be defined in Sect. 2.2 when we introduce appropriate physical scalings. We assume that the membrane is composed of identical slender pores of circular cross section with radius A(XT) (where X is distance along the pore axis), periodically repeating in a regular (e.g., square or hexagonal) lattice arrangement. Each circular pore is contained within a regular tesselating polygonal prism, which accommodates a pore of maximum radius W (\(0<A\le W\)) and height D (see Fig. 1, for example), where \(W\ll D\). We define the representative pore aspect ratio \(\epsilon =W/D \ll 1\), which will be used in our particle deposition model discussed below. The incompressible feed (assumed Newtonian with viscosity \(\mu \)) flows through the pore with cross-sectionally averaged axial velocity (intrinsic velocity), \(U_\mathrm{p}(X,T)\), given in terms of the pressure P(XT) by

$$\begin{aligned} U_\mathrm{p}(X,T)= -\frac{K_\mathrm{p} (X,T)}{\mu } \frac{\partial P}{\partial X}, \end{aligned}$$
(1)

where \(K_\mathrm{p}=A^2(X,T)/8\) is the local permeability of an isolated pore (which follows from the Hagen-Poiseuille formula, see, e.g., (Probstein 1994)). This is equivalent to a Darcy flow model with superficial velocity U(T) within the membrane related to \(U_\mathrm{p}(X,T)\) via porosity \(\varPhi _\mathrm{m}=\pi A^2(X,T)/(2W)^2\),

$$\begin{aligned} U(T)=\varPhi _\mathrm{m} U_\mathrm{p}(X,T)=-\frac{K (X,T)}{\mu } \frac{\partial P}{\partial X}, \end{aligned}$$
(2)

where \(K(X,T)={\pi A (X,T)^4}/({32 W^2})\) is the local membrane permeability. The flow is driven by constant pressure drop \(P_0\) across the membrane. We note here that our model is only valid for slender type pores for which \(A\ll D\) and \(|\partial A/\partial X| \ll 1\); for short or wide pores, a more complicated flow model, such as that represented by the Darcy-Weisbach equation, is needed due to possible turbulent flow phenomena. Conservation of mass then closes the model, giving the equation and boundary conditions governing the pressure P(XT) within the membrane as

$$\begin{aligned} \frac{\partial }{\partial X} \bigl [ K(X,T) \frac{\partial P}{\partial X} \bigr ]= & {} 0, \qquad 0\le X\le D, \end{aligned}$$
(3)
$$\begin{aligned} \quad P(0,T)= & {} P_0, \quad P(D,T)=0. \end{aligned}$$
(4)

Extending the approach of Sanaei and Cummings (2017), we propose the following fouling model equations, which assume that the two particle types are transported independently by the solvent and do not interact with each other:

$$\begin{aligned} U_\mathrm{p} \frac{\partial C_i}{\partial X}&=-\varLambda _i \frac{C_i}{A}, \quad&C_i(0,T)=C_{0i}, \quad i=1,2; \end{aligned}$$
(5)
$$\begin{aligned} \frac{\partial A}{\partial T}&=-\sum _{i=1,2}\varLambda _i\alpha _iC_i, \quad&A(X,0)=A_0(X), \end{aligned}$$
(6)

where \(C_i(X,T)\) is the concentration (mass per unit volume of solution) of type i particles; \(\varLambda _i\) is a particle deposition coefficient for type i particles; and \(\alpha _i\) is an unknown (problem-dependent) constant, related inversely to the density of the material that comprises type i particles. Equations (5) follow from a systematic asymptotic analysis (based on the small parameter \(\epsilon \) defined above, see also Table 2) of advection-diffusion equations for each particle species. Within our “slender pore” approximation, Brownian diffusion is assumed to dominate in the radial direction, so that particle concentration is uniform (to leading order) over the pore cross section. However, in the axial direction, advection dominates, leading to equation (5). Full details are provided in Sanaei and Cummings (2017).Footnote 1 Equation (6) assumes the rate of pore radius shrinkage (due to the particle deposition) is a linear function of the local particle concentrations at depth X and derives from a mass-balance of the particles removed from the feed, consistent with Eq. (5). Derivations of these results for filtration of a feed with just one particle type were given previously ( (Sanaei and Cummings 2017) Appendix A, (Sanaei and Cummings 2018)).

2.2 Non-Dimensionalization

We non-dimensionalize our model Eqs. (26) using the following scalings, with lower-case fonts indicating the dimensionless variables:

$$\begin{aligned} p=\frac{P}{P_0},&\,u=U\frac{32 D \mu }{\pi W^2 P_0},&u_\mathrm{p}=U_\mathrm{p} \frac{32 D \mu }{\pi W^2 P_0}, \end{aligned}$$
(7)
$$\begin{aligned} c_1=\frac{C_1}{C_{01}+C_{02}},&\,c_2=\frac{C_2}{C_{01}+C_{02}},&a=\frac{A}{W}, \end{aligned}$$
(8)
$$\begin{aligned} x=\frac{X}{D},&\,t=\frac{T}{T_0},&\text {with}~~~ T_0=\frac{W}{\varLambda _1 \alpha _1 (C_{01}+C_{02})}, \end{aligned}$$
(9)

where the chosen timescale is based on the deposition rate of particle type 1. The resulting non-dimensionalized equations are listed below: Eqs. (24) become

$$\begin{aligned} u= \frac{\pi a^2}{4} u_\mathrm{p} =-a^4 \frac{\partial p}{\partial x},\nonumber \\ ~~\frac{\partial }{\partial x}\left( a^4 \frac{\partial p}{\partial x}\right) =0,\nonumber \\ ~~p(0,t)=1,~~~ p(1, t)=0, \end{aligned}$$
(10)

so that dimensionless permeability is just \(a^4\) with the chosen scalings; and Eqs. (56) take the form

$$\begin{aligned} u_\mathrm{p} \frac{\partial c_1}{\partial x}&=-\lambda _1 \frac{c_1}{a},&c_1(0,t)=\xi , \end{aligned}$$
(11)
$$\begin{aligned} u_\mathrm{p} \frac{\partial c_2}{\partial x}&=-\lambda _2 \frac{c_2}{a},&c_2(0,t)=1-\xi , \end{aligned}$$
(12)
$$\begin{aligned} \frac{\partial a}{\partial t}&=-c_1-\beta c_2,&a(x,0)=a_0(x), \end{aligned}$$
(13)

where \(\lambda _i={32\varLambda _i D^2 \mu }/({\pi W^3 P_0})\) is the deposition coefficient for particle type i, \(\xi ={C_{01}}/{(C_{01}+C_{02})}\) is the concentration ratio between the two types of particles, \(\beta =\varLambda _2 \alpha _2 / (\varLambda _1 \alpha _1)\) is the ratio for effective particle deposition coefficients between the two types of particles, and \(0<a_0(x) \le 1\) is the pore profile at initial time \(t=0\). Since we consider scenarios where particle type 1 is to be removed by filtration, while type 2 should be retained in the filtrate, only values \(\beta \in (0,1)\) will be considered in this paper. The model parameters are summarized in Table 2 for future reference.

Table 1 Dimensional parameters, with approximate values (where known) (Kumar 2014)
Table 2 Dimensionless parameters and descriptions (from Table 1)

To solve this system numerically, we first note that Eq. (10) can be solved to give

$$\begin{aligned} u(t)= \Big ( \int _0^1 \frac{1}{a^4(x,t)} dx \Big )^{-1}. \end{aligned}$$
(14)

Given \(a_0(x)\), we compute u(0) via Eq. (14), which allows us to find \(u_\mathrm{p} (x,0)\) via Eq. (10), and hence \(c_1 (x,0), c_2 (x,0)\) via Eqs. (11 and 12) , respectively. With \(c_1, c_2\) determined we compute the pore shape a(xt) for the next time step via Eq. (13), then repeat the above process until the chosen termination condition (based on flux falling below some minimum threshold) for the simulation is satisfied.

3 Optimization

In this section, we explore the specific scenarios introduced in Sect. 1 to find the optimized initial pore shape \(a_0(x)\) by defining a suitable objective function \(J(a_0)\) with corresponding constraints. For the purpose of the mathematical formulation of the optimization problem, we assume \(a_0(x)\) to be a real-valued function continuous on the real interval [0, 1]; however, for practical purposes to obtain solutions within reasonable computing time, we restrict the search space for the optimizer \(a_0(x)\) to low degree polynomial functions (numerical implementation details will be given in Sect. 3.2). In addition, we require \(0<a_0(x)\le 1\) so that the initial profile is contained within its unit prism (see Fig. 1).

In Sect. 3.1, we define key metrics that we use to measure the performance of the filter design and use these to set up the optimization problems. In Sect. 3.2, we outline our optimization methods: first a “slow method” (described in Sect. 3.2.1) based directly on the objective function defined in Sect. 3.1 below; then, we propose a “fast method” (in Sect. 3.2.2), motivated by results obtained using the slow method. We demonstrate the feasibility of using our model with fast optimization to predict and optimize for various filtration scenarios with multiple species of particles in the feed.

3.1 Definitions and Objective Functions

Adapting the approach taken in our earlier work (Sun et al. 2020), we first define some key (dimensionless) quantities that will be used to measure the performance of the filter. We define instantaneous flux through the membrane as u(t), and cumulative throughput j(t) as the time integral of the flux,

$$\begin{aligned} j(t)=\int _0^t u(\tau ) \mathrm{d}\tau . \end{aligned}$$
(15)

We denote the instantaneous concentration at the outlet (\(x=1\)) for each particle type i in the filtrate, \(c_i(1,t)\) as \(c_{i,\mathrm ins}(t)\), and the accumulative concentrations (the measured particle concentration if all filtrate processed by time t is well-mixed and collected in a large vessel) of each particle type i in the filtrate, \(c_{i, \mathrm acm}\) as

$$\begin{aligned} c_{i, \mathrm acm} (t)=\frac{\int _0^t c_{i,\mathrm ins}(\tau ) u(\tau ) \mathrm{d}\tau }{j(t)}. \end{aligned}$$
(16)

Let \(t_\mathrm{f}\) denote the final time of the filtration process, when the termination condition is reached. For the constant pressure driven filtration considered here, we define this to be when the flux drops below some specified fraction \(\vartheta \) of its initial value (throughout our work here \(\vartheta =0.1\), based on common industrial practice, see, e.g., (Van Reis and Zydney 2007)).

To specify the particle removal requirement from the feed for each type of particles, we define the instantaneous particle removal ratio for type i particles, \(R_{i}(t) \in [0,1]\), as

$$\begin{aligned} R_{i}(t)=1- \frac{c_{i,\mathrm ins}(t)}{c_i(0,t)}, \end{aligned}$$
(17)

where \(c_{i,\mathrm ins}(t)\) is instantaneous concentration of particle type i at the outlet, and \(c_i(0,t)\) is the type i particle concentration in the feed at time t.Footnote 2 Then, the initial particle removal ratio \(R_{i}(0)\) is the fraction of type i particles removed after the feed passes through the clean filter. We also define the accumulative particle removal ratio for type i particles, \({{\bar{R}}}_i (t)\), as

$$\begin{aligned} {{\bar{R}}}_i (t)=1- \frac{c_{i, \mathrm acm} (t)}{c_i(0,t)}, \qquad i=1,2, \end{aligned}$$
(18)

where \(c_{i, \mathrm acm} (t)\) is defined in (16). The final accumulative particle removal ratios at the end of the filtration are then \({{\bar{R}}}_i (t_\mathrm{f})\).

Table 3 Key metrics defined in Sect. 3.1 and Sect. 4.1.2 for measuring membrane performance and their ranges, values (where fixed across all simulations) or definitions.

Preliminary investigations for our multi-species filtration model indicate that the particle removal capability of the filter improves as the filtration proceeds and pores shrink; thus, in our optimizations, we impose the particle removal requirement only at the initial step, i.e., we require \(R_1(0)\) to be greater than a specified number (R) between 0 and 1. Throughout this work, we consider the desired final particle removal ratio for type 1 particles to be 0.99 and denote this fixed value by \(\tilde{R}\). Other values of R are used for “intermediate” filtration stages in our description of multi-stage filtration later, with the understanding that the final goal is to reach removal ratio \(\tilde{R}=0.99\). With these definitions, we illustrate our methods by considering a number of membrane design optimization scenarios, outlined below.

Problem 1

In many situations, there are competing demands, and it may be useful to consider objective functions that assign weights to different quantities of interest. Suppose we have a feed with known concentrations of type 1 and type 2 particles, where the goal is to remove type 1 particles from the feed, while retaining type 2 particles in the filtrate and simultaneously collecting as much filtrate as possible, until the termination time \( t_{{\text{f}}} : = {\text{inf}}\left\{ {t:u(t) \le \vartheta u(0)} \right\} \) is reached. Which filter design \(a_0(x)\) - the initial pore profile, within our searching space - will remove a specified fraction \(R_{}\in [0,1]\) of type 1 particles and simultaneously maximize the objective function \(J(a_0):=w_1 j(t_\mathrm{f})+ w_2 c_{2 \mathrm acm}(t_\mathrm{f})\) (where \(w_1\) and \(w_2\) are weights associated with the total throughput and final cumulative concentration of type 2 particles in the filtrate, respectively)? For example, in water purification (Hoslett et al. 2018), type 1 particles could be toxins such as lead (which we insist are removed), while type 2 particles are desirable minerals. In this application, it is of interest to retain type 2 particles, but the primary concern is to produce the purified water, so a larger value might be assigned to \(w_1\) than \(w_2\). This example motivates the following design optimization problem.

Optimization Problem 1

Maximize

$$\begin{aligned} J(a_0):= w_1 j(t_\mathrm{f})+ w_2 c_{2 \mathrm acm}(t_\mathrm{f}) \end{aligned}$$
(19)

subject to Eqs. (1013), and

$$\begin{aligned} 0 < a_0 (x) \le 1, ~ \forall x \in [0, 1]; \quad R_1(0) \ge R_{} ; \quad t_\mathrm{f}=\mathrm{inf} { \Big \{ t: u(t) \le \vartheta u(0) \Big \} }. \end{aligned}$$

Here, we seek the optimum pore shape \(a_0(x)\) to maximize \(J (a_0)\), a weighted combination of \(j(t_\mathrm{f})\) and \(c_{2 \mathrm acm}(t_\mathrm{f})\), subject to the flow and fouling rules dictated by our model (Eqs. (1013)), and the physical constraints that the pore is initially contained within the unit prism (so that adjacent pores cannot overlap), and the desired user-specified fraction \(R_{}\) of type 1 particles is removed from the feed at the start of filtration. For example, if \(w_1=1\), \(w_2=0\), \(R_{}=\tilde{R}\) then we are maximizing the total throughput of filtrate, with a hard constraint that at least \(99\%\) of type 1 particles are removed initially, and no concern for the proportion of type 2 particles retained in the filtrate. On the other hand, if \(w_1=0.5\), \(w_2=0.5\), \(R_{}=\tilde{R}\) then (assuming the dimensionless quantities \(j(t_\mathrm{f})\) and \(c_{2 \mathrm acm}(t_\mathrm{f})\) are of similar magnitude) we care equally about total throughput and the proportion of type 2 particles retained in the filtrate, again with a hard constraint on removal of type 1 particles.

Problem 2

Suppose we have a large quantity of feed containing known concentrations of type 1 and type 2 particles, where the goal is to remove type 1 particles and collect the maximum quantity of type 2 particles in the filtrate (e.g., for vaccine production after fermentation, one would want to filter out the live virus—type 1 particles—and retain as much vaccine—type 2 particles—as possible in the filtrate), until the termination time \(t_\mathrm{f}\) is reached, which filter design \(a_0(x)\), within our searching space, will remove a specified fraction \(R_{}\in [0,1]\) of type 1 particles and simultaneously maximize the final yield of type 2 particles in the filtrate, \(c_{2 \mathrm acm}(t_\mathrm{f}) j(t_\mathrm{f})=:J(a_0)\)? This question leads to the following design optimization problem.

Optimization Problem 2

Maximize

$$\begin{aligned} J(a_0):= c_{2 \mathrm acm}(t_\mathrm{f}) j(t_\mathrm{f}) \end{aligned}$$
(20)

subject to Eqs. (1013), and

$$\begin{aligned} 0 < a_0 (x) \le 1, ~ \forall x \in [0, 1]; \quad R_1(0) \ge R_{} ; \quad t_\mathrm{f}=\mathrm{inf} { \Big \{ t: u(t) \le \vartheta u(0) \Big \} }. \end{aligned}$$

Here, we seek the optimum \(a_0(x)\) that maximizes objective function \(J(a_0)\), representing the final mass of type 2 particles in the filtrate, subject to the flow and fouling rules of our model, the physical constraints, and the desired particle removal requirement.

3.2 Optimization Methodology

The design optimization problems outlined above are mathematically challenging and computationally expensive in general due to non-convexity (of both the objective function and the constraints (Boyd and Vandenberghe 2004)), large number of design variables (in our case, the number of possible design variables is infinite, as our searching space for the pore shape \(a_0(x)\) is the infinite-dimensional function class of real-valued continuous functions on the real interval [0, 1]) and the computational cost of evaluating the objective function (which requires that we solve the flow and transport equations until the termination time \(t_\mathrm{f}\)) many times. For simplicity and efficiency, we therefore restrict our searching space for \(a_0(x)\) to (low degree) polynomial functions, the coefficients of which represent our design variables. (The class of searchable functions could be expanded without difficulty but with commensurate increase in computational cost.) In the following two subsections 3.2.1 and 3.2.2, we outline our two optimization routines: first a slow method, which arises naturally from the problems posed and which relies on running many simulations over the entire lifetime of the filter; then, a proposed new fast method, which uses data from only the very earliest stages of filtration to predict the optimum over the filter lifetime. The two methods are compared in Sect. 4.

3.2.1 Slow Method

We vary the coefficients of polynomials \(a_0(x)\) to find the values that maximize the objective functions defined in Problems 1 and 2, under the constraints specified in each case. The functions \(a_0(x)\) are referred to as shape functions in the shape optimization literature (Ta’asan et al. 1992). In the interests of reducing computation time, for the purpose of the demonstration simulations presented here, we restrict our searching space to be the linear pore profile, i.e., we consider initial profiles of the form \(a_0(x)=d_1 x+d_0\), where \(d_1, d_0\) are the design variables to be optimized for each specific scenario, with searching range \((d_1, d_0) \in [-1,1]\times [0,1]\). We use the MultiStart method with fmincon (based on a gradient descent method) as local solver from the MATLAB® Global Optimization toolbox for this optimization. Since this routine minimizes the specified objective, we work with the objective function \(-J (a_0)\); more details of the implementation can be found in our earlier work (Sun et al. 2020).

We specify a starting point \((d_1^0, d_0^0) \in [-1,1]\times [0,1]\) (the initial guess for running the local solver fmincon), cost function (which combines the objective function and constraints), the design variable search range, and number of search points n (in \((d_1,d_0)\)-space) to be explored for the MultiStart method. With the user-specified starting point \((d_1^0, d_0^0)\), an additional \((n-1)\) search points \((d_1^i, d_0^i) \in [-1,1]\times [0,1], i=1, 2, \ldots ,n-1\) are generated by the MultiStart algorithm. The resulting n points are then used to run the local solver fmincon to find a list of local minimizers. We use the best minimizer from the list as the coefficients for our optimized linear pore profile. Note that there is no guarantee the method will find the global minimizer due to the nature of gradient descent methods applied to non-convex problems (the result found depends on the search-points); however, local minimizers can be systematically improved and for practical purposes may be useful if they provide significant improvement over current practice (see, e.g., the study by Hicks et al. (1974) on airfoil design). Simulations using this method are presented in Figs. 2, 3, 4 and 5, described in Sect. 4 later.

3.2.2 Fast Method

The “slow” optimization method described above is straightforward and easy to implement, but reliable results require that many (n large) individual model simulations be run through to the termination time \(t_\mathrm{f}\). The results presented in this paper are restricted to optimizing membrane structure within the class of linear pore profiles only, but in any real application, it may be desirable to optimize over wider function classes, e.g., polynomials of higher order. We find (empirically) that each unit increase of the degree of polynomial pore shape function \(a_0(x)\) requires roughly a tenfold increase in the number of search points to reach the best local optimum, with a corresponding increase in the run time. Run time will also increase if more than two-particle species are considered, or if some of the constraints are removed or inactive (e.g., a less strict particle removal requirement) and the feasible region becomes very large. Maximum computational efficiency in practical situations is therefore critical. Motivated by the idea that imposing carefully chosen conditions on the initial state of a system can, in many cases, guarantee certain features of later states, we propose a fast method based on simulations of the very early stages of filtration. We note that similar ideas have been used to estimate filter capacity (the total amount of feed processed during a filtration) using a method called \(V_\mathrm{max}\), which essentially predicts the filter capacity using only the first 10-15 minutes of filtration data (Zydney and Ho 2002).

Extensive preliminary simulations for Problem 1, with \(w_2=0\),Footnote 3 indicate that the (u(t), j(t)) flux-throughput graph at optimum is initially flat and high (see Fig. 3a, for example), with small gradient \(|u'(0)|\) and large vertical intercept u(0), in comparison with graphs for sub-optimal solutions. Moreover, fouling shrinks the pore and increases resistance, and thus, flux decreases in time and \(u'(0)<0\) for all model solutions. We therefore expect that, at optimum, u(0) should be as large as possible and \(u'(0)\) as close to zero as possible. Similar ideas apply to the case \(w_2>0\), where we wish also to maximize \(c_{2 \mathrm acm}(t_\mathrm{f})\), the cumulative concentration of type 2 particles in the feed at the final time: we propose instead to maximize a function based on the initial state of the system as characterized by \(c_{2\mathrm ins}(0)\) and \(c_{2\mathrm ins}'(0)\) (respectively, the initial concentration and initial concentration gradient, with respect to t, of type 2 particles at the membrane outlet \(x=1\)). Again, preliminary simulations indicate that at optimum \(c_{2\mathrm ins}'(0)\) is close to zero and negative,Footnote 4 while \(c_{2\mathrm ins}(0)\) is large, compared to sub-optimal solutions. With these observations, we expect to maximize \(c_{2 \mathrm acm}(t_\mathrm{f})\) by insisting on large \(c_{2\mathrm ins}(0)\) and small initial gradient \(c_{2\mathrm ins}'(0)\).

With this motivation, we now define modified objective functions for our fast method. In place of (19) in Optimization Problem 1, we propose to maximize the following fast objective function, which uses data from only the initial stage of the model solution:

$$\begin{aligned} J_{1, \mathrm fast}(a_0)=w_1u(0)+w_1u'(0)+ w_2c_{2\mathrm ins}(0)+w_2c_{2\mathrm ins}'(0), \end{aligned}$$
(21)

in which the terms in \(w_1\) act to maximize total throughput and those in \(w_2\) maximize concentration of type 2 particles in the filtrate, where \(w_1\) and \(w_2\) can be tuned depending on the relative importance of the two quantities. Note that the weights assigned to u(0) (\(c_{2\mathrm ins}(0)\)) and \(u'(0)\) (\(c_{2\mathrm ins}'(0)\)) do not have to be the same; we could allow four independent weights for the four quantities in (21). However, for the simple application scenarios considered here, we found just two independent weights \(w_1\), \(w_2\) to be sufficient to give reliable results in an efficient manner.

To replace (20) in Optimization Problem 2, we propose the following fast objective function

$$\begin{aligned} J_{2, \mathrm fast}(a_0)=u(0)c_{2\mathrm ins}(0), \end{aligned}$$
(22)

in which \(u(0)c_{2\mathrm ins}(0)\) captures the initial collection of the particle 2 in the filtrate. Other forms involving \(u'(0)\) and \(c_{2\mathrm ins}'(0)\) were tested, but found to confer no improvements; hence, we opt to maximize the simplest effective objective.

In the following section, we first demonstrate that our fast optimization method is at least as good as or better than the slow method, before using it to investigate a number of model features and predictions.

4 Results

In this section, we present our simulation results for several two-species filtration scenarios, focusing on constant pressure filtration. We focus on the effects of \(\xi \), the concentration ratio of the two particle types in the feed, and \(\beta =\varLambda _2\alpha _2/(\varLambda _1\alpha _1)\), the ratio of the effective particle deposition coefficients for the two particle types (both these parameters are unique to multi-species filtration, having no counterparts in single-species models). For most of our simulations, we fix \(\lambda _1=1\) (particle type 1 has fixed affinity for the membrane throughout) and the initial fraction of type 1 particles to be removed is fixed at \(\tilde{R}\). In Sect. 4.1, we first present sample comparison results between the fast and slow methods for Problem 1 and Problem 2, noting that many more tests than are presented here were conducted to verify that the fast method reliably finds optima as good as or superior to those found by the slow method, under a wide range of conditions. We then use the fast method to study the effects of varying parameters \(\beta \) and \(\xi \) for two-species filtration under constant pressure conditions. Based on these observations, we propose a multi-stage filtration strategy that will increase the mass yield of particle we wish to recover in Sect. 4.1.2. In Sect. 4.2, we summarize the key results for filtration at constant flux, with details relegated to the Supplementary Material.

4.1 Optimization of Constant Pressure Filtration

4.1.1 Efficacy of the Fast Optimization Method

Fig. 2
figure 2

Fouling evolution of the optimized membrane pore \(a_0(x)\) for Problem 1 with \( w_1=1, w_2=0, \xi =0.5, \beta =0.1, \alpha _1=\alpha _2, \lambda _1=1\); ac show evolution for \(a_0(x)=-0.6001x+0.9998\) optimized using slow method and df show evolution of \(a_0(x)=-0.6002x+0.9999\) for the corresponding fast method, at \(t=0\) (unfouled; (a and d)), \(t=t_\mathrm{f}/2\) (halfway through filtration; (b and e)) and \(t=t_\mathrm{f}\) (end of filtration; (c and f))

Fig. 3
figure 3

Comparison of slow method \(J(a_0)=w_1 j(t_\mathrm{f})+w_2c_{2\mathrm acm}\) (dashed curves) with fast method \(J_{1, \mathrm fast}(a_0)=w_1 u(0)+w_1 u'(0)+ w_2c_{2\mathrm ins}(0)+ w_2c_{2\mathrm ins}'(0)\) (dotted curves) for various weights W\(=[w_1,w_2]\), with \(\beta =0.1, \xi =0.5, \lambda _1=1\): a flux versus throughput (uj) plot, b cumulative concentration of type 1 particles versus throughput (\(c_{1\mathrm acm}, j\)) plot, c cumulative concentration of type 2 particles versus throughput (\(c_{2\mathrm acm}, j\)) plot

We begin by demonstrating both slow and fast optimization methods described in Sect. 3.2 above. Figure  2 shows the fouling evolution of the optimized membrane pores \(a_0(x)\) for Problem 1 with \( w_1=1, w_2=0, \xi =0.5, \beta =0.1, \alpha _1=\alpha _2, \lambda _1=1\), and \(R_1(0) \ge \tilde{R}\), using the slow method (top panel) and fast method (bottom panel). The left column shows the clean, unfouled optimized pore profiles at \(t=0\) (Fig. 2a, d); the center column shows the fouling of these pores at \(t=t_\mathrm{f}/2\) halfway through the filtration (Fig. 2b, e); and the right column shows the fouled pores at termination time \(t=t_\mathrm{f}\) (Fig. 2c, f)). The gray region is the filter material, and the dark blue color indicates the fouling by deposited particles. The white area denotes the open pore (void), and the red center line is the axis of symmetry of the pore (which has circular cross section). This figure and the caption illustrate that the optimal linear pore shapes \(a_0(x)\) found by both fast and slow optimization routines are visually and mathematically almost indistinguishable, with parameter values in the linear profiles found differing only in the fourth decimal place. The filtration termination times are also nearly identical for the two cases: \(t_\mathrm{f}=1.610\) for the slow method, and \(t_\mathrm{f}=1.611\) for the fast method.

Figure 3 further compares the slow method (objective function (19), dashed curves) and the corresponding fast method (objective function (21), dotted curves) for Problem 1, with various weights \([w_1, w_2]\) for total throughput and cumulative type-2 particle concentration, respectively, indicated in the legend. The results for \([w_1,w_2]=[1,0]\) correspond to the optimized profiles presented in Fig. 2. Results are plotted as functions of filtrate throughput over the duration of the filtration, \(0\le t\le t_\mathrm{f}\). The quantities shown in Fig. 3, for the optima obtained using both methods, are: (a) flux versus throughput (uj) plot; (b) accumulative concentration of type 1 particles versus throughput, (\(c_{1\mathrm acm}, j\)) plot; and (c) accumulative concentration of type 2 particles versus throughput, (\(c_{2\mathrm acm}, j\)) plot; all simulated with \(\xi =0.5, \beta =0.1, \alpha _1=\alpha _2, \lambda _1=1\), and \(R_1(0) \ge \tilde{R}\). The figure shows that for all three sets of weights considered, \([w_1, w_2]= [1,0], [0.5, 0.5]\) and [0, 1], the fast method finds an optimized pore shape \(a_0(x)\) as good as or better than that found by the slow method (larger or the same values for \(j(t_\mathrm{f})\) and \(c_{2\mathrm acm}(t_\mathrm{f})\), while always satisfying the removal criterion \(\tilde{R}\) for particle type 1).

These results, together with many others not discussed here, demonstrate the robustness and reliability of our fast optimization routine: With the same number of search points, the fast method converges to an optimizer that in all cases is as good as or better than that obtained using the slow method, with considerably shorter running time. (A typical optimization for the slow method takes 40 minutes with 10,000 search points, while the fast method takes only 4 minutes.) We also observe that varying the weights \([w_1, w_2]\) does not change the optimized profile significantly, indicating that maximizations of \(j(t_\mathrm{f})\) and of \(c_{2\mathrm acm}(t_\mathrm{f})\) are correlated for the parameter values considered. One possible explanation for this correlation is that, provided the type 1 particle removal constraint \(R_1(0) \ge \tilde{R}\) is met, the initial concentration of type 2 particles in the filtrate \(c_{2}(1,0)\) should be maximized by maximizing the initial flux u(0), since the higher the flux, the more type 2 particles will escape capture by the filter.

Figure 4 presents direct comparisons of the slow and fast methods for Problem 2.

Fig. 4
figure 4

Comparison of slow method with objective function \(J(a_0)=j(t_\mathrm{f})c_{2\mathrm acm}(t_\mathrm{f})\) (dashed curves) and fast method with objective \(J_{2, \mathrm fast}(a_0)=u(0)c_{2\mathrm ins}(0)\) (dotted curves) (a-c): with \(\xi =0.9, 0.5, 0.1\) and \(\beta =0.1\), \(\alpha _1=\alpha _2\), \(\lambda _1=1\): a (uj) plot, b (\(c_{1\mathrm acm}, j\)) plot, c (\(c_{2\mathrm acm}, j\)) plot. df: with \(\beta \in [0.1,0.9]\) varying and \(\xi =0.5, \lambda _1=1\): d (uj) plot, e (\(c_{1\mathrm acm}, j\)) plot, f (\(c_{2\mathrm acm}, j\)) plot.

Results for the slow method, with objective function (20), are indicated by dashed curves; and those for the corresponding fast method, with objective function (22), by dotted curves. The left panel, Fig. 4a–c, shows results for various feed particle-composition ratios \(\xi \) (other parameters as in Fig. 3); while the right panel, Fig. 4d–f, compares results for various effective particle-membrane interaction ratios \(\beta \), with \(\xi =0.5\). The flux through the membrane and the cumulative particle concentrations of each particle type in the filtrate are plotted as functions of filtrate throughput over the duration of the filtration, \(0\le t\le t_\mathrm{f}\). In all cases, for the same number of search points, the fast method converges to the same optimal pore profile as the slow method across all \(\xi \) and \(\beta \) values considered (though the optima obtained are different for each parameter set). As for Problem 1, the computational speedup is considerable with the fast method.

In addition to demonstrating the efficacy of the fast optimization method, the results also illustrate some general features of the model. When a feed contains a larger fraction (higher \(\xi \)-value) of the type 1 particles to be removed, our model predicts faster fouling and shorter filter lifetime relative to a feed with lower \(\xi \)-value, leading to less total throughput and lower final accumulative particle concentration of type 2 particles in the filtrate, see, e.g., Fig. 4a, c. This is not desirable if we want to maximize total collection of type 2 particles; we will present one possible way to circumvent this issue in Sect. 4.1.2, where a multi-stage filtration is proposed.

Figure  4b is the (\(c_{1\mathrm acm}, j\)) plot. Note that in all cases, the constraint for removal of particle type 1 is tight at the optimum, with the exact specified proportion \(\tilde{R}\) of particles removed from the feed at time \(t=0\). Figure 4d–f shows that larger \(\beta \) values (meaning that the two particle types are more physicochemically similar; recall \(\beta \in (0,1)\) throughout our study, and if \(\beta =1\) both particle types interact identically with the membrane) lead to faster fouling of the filter, with lower total throughput and lower total yield of type 2 particles in the filtrate. This confirms our expectation that the more similar the particle types are, the more challenging it is to separate them by filtration. To achieve effective separation, a sufficient physicochemical difference \(\gamma =1-\beta \) is required.

Encouraged by the excellent results and significant speedup obtained when using the fast method with the same number of search points as the slow method, we next investigate its performance with fewer search points. Figure 5 shows the comparison between the slow method (dashed curves) with 10,000 search points (found, empirically, to be the minimum number required for reliable results) and the fast method (dotted curves) with decreasing number of search points (10,000, 1000, 100). Model parameters are fixed at \(\xi =0.5\) and \( \beta =0.1\); other parameters are as in Fig. 3. These results (as well as many other tests, not shown here) indicate that the fast method produces reliable results with just 1000 search points (blue dotted curves; this optimum even appears superior to the slow method with 10,000 search points, providing slightly higher total throughput). Even with as few as 100 search-points the fast method produces reasonable, though suboptimal, results (black dotted curve). In all cases, the particle removal constraint on \(c_1\) is again tight at the optima found. Since run time for the optimization routine scales in direct proportion to the number of searching points, a tenfold reduction in the number of search points needed represents a significant additional computational saving: The fast method with 1000 search points is approximately 100 times faster than the slow method with 10,000 points.

Fig. 5
figure 5

Comparison of slow method \(J_\mathrm{slow}(a_0)=j(t_\mathrm{f})c_{2\mathrm acm}(t_\mathrm{f})\) (dashed curves) with 10,000 start points, with fast method \(J_\mathrm{fast}(a_0)=u(0)c_{2\mathrm ins}(0)\) (dotted curves) using variable number of searching points, with \(\xi =0.5, \lambda _1=1\) and \( \beta =0.1\): a (uj) plot; b (\(c_{1\mathrm acm}, j\)) plot, and c (\(c_{2\mathrm acm}, j\)) plot

4.1.2 Multi-Stage Filtrations

In Fig. 4a, we observed that with a higher concentration ratio of type 1 particles in the feed, the optimized filter for a single-stage filtration tends to be fouled faster, which leads to lower total throughput per filter. This makes sense as the filter needs to remove a higher mass of impurity (type 1 particles) to achieve the initial particle removal threshold \(R_{1}(0) \ge \tilde{R}\) when \(\xi \) is larger. Our simulations also reveal that the fouling is largely confined to a narrow region adjacent to the upstream surface of the filter at optimum, with the majority of the downstream portion of the filter remaining unused (see Fig. 2). In this section, we propose a multi-stage filtration scenario that has the potential to alleviate some of these inefficiencies. Heuristically, we would like to process more feed per filter by increasing the membrane porosity and simultaneously make more efficient use of the membrane material by fouling a higher proportion of the pore (void) volume. However, this will in general decrease the particle removal efficiency of the membrane, so the filtrate will require further purification to satisfy the particle removal requirement. This provides the motivation for the proposed multi-stage filtration strategy: We will lower the initial particle removal requirement to increase the amount of feed processed per filter and try to satisfy the final particle removal requirement by filtering the collected filtrate again, possibly several times (multi-stage). The multi-stage filtration will be cost-effective if the increase in feed processed can offset the increase in the number of additional filters required to meet the particle removal requirement. From the optimization point of view, we increase the feasible searching space by relaxing the initial particle removal constraint so that a better optimizer might be found.

In the following discussion, we focus on the optimization Problem 2, where the goal is to maximize the yield of type 2 particles per filter used, while achieving effective separation,Footnote 5 which for definiteness we here define as removing the desired fraction \(\tilde{R}\) of particle type 1 from the feed (\({\bar{R}}_1(\mathrm t_f) \ge \tilde{R}\)) while simultaneously recovering a minimum desired yield fraction \(\varUpsilon \) of type 2 particles in the filtrate (\({{\bar{R}}}_2 (t_\mathrm{f}) \le 1-\varUpsilon \)). For all of our simulations, \(\tilde{R}=0.99\) and \(\varUpsilon =0.5\). We define the purity for type i particles in the filtrate, \(k_i \in [0,1]\), as

$$\begin{aligned} k_i =\frac{c_{i, \mathrm acm} (t_\mathrm{f})}{ \sum _{i=1,2} c_{i, \mathrm acm} (t_\mathrm{f})}, \qquad i=1,2, \end{aligned}$$
(23)

where \(c_{i, \mathrm acm} (t_\mathrm{f})\) is the accumulative concentration of the type i particle in the filtrate at the end of the filtration. With our hypothesized scenario of feed containing desired (type 2) and undesired (type 1) particles in mind, we note a simple relationship between the purity of type 2 particles and the final cumulative removal ratios:

$$\begin{aligned} k_2=\frac{(1-\xi )[1-{{\bar{R}}}_2 (t_\mathrm{f})]}{\xi [1-{{\bar{R}}}_1 (t_\mathrm{f})]+(1-\xi ) [1-{{\bar{R}}}_2 (t_\mathrm{f})]}. \end{aligned}$$
(24)

We will return to these definitions in our discussion of the multi-stage filtration results below.

The basic idea behind our multi-stage filtration is to first optimize the filter with a less strict initial type 1 particle removal requirement (i.e., we require \(R_1(0) \ge R <\tilde{R}\)) and filter the feed solution two or more times to achieve a larger total yield per filter of purified type 2 particles than in a single-stage filtration, with the effective separation condition satisfied at the end of the multi-stage filtration. In this simple preliminary study, we consider batch operation, in which at each stage, all filtrate is collected first in a batch, before being filtered again in the next stage. We determine the stage of filtration by how many times the solution has passed through clean filters: for example, the clean stage 1 filter will take feed directly and be used to exhaustion; the filtrate collected from the stage 1 filter will then be sent through a new (clean) stage 2 filter. (In our batch operation scenario, all filtrate processed by the stage 1 filter at exhaustion will be collected, and then, the same batch of filtrate will be sent through the stage 2 filter, which may be used more than once within stage 2.)

We propose the following two-stage or multi-stage filtration strategy for Problem 2 (also summarized as a flow chart in Fig. 6): 1. Optimize the filter with a less strict initial particle removal requirement than desired (\(R_1(0) \ge R <\tilde{R}\)); denote the optimized filter as \(F_{R}\) (e.g., for \(R=0.5\), we denote the optimized filter as \(F_{0.5}\)). 2. (Stage 1) Run the filtration simulation using \(F_{R}\) until the filter is completely fouled; collect the batch of filtrate. In scenarios to be considered later, we allow stage 1 to use several filters simultaneously, with all filtrate from this stage collected in a single batch. 3. Re-filter the batch of collected filtrate through another clean \(F_{R}\); collect the new filtrate batch. 4. Test the filtrate batch from step 3. Does it meet required type 1 particle final removal requirement \({{\bar{R}}}_1 (t_\mathrm{f}) \ge \tilde{R}\)? If yes, we are done; if no, repeat step 3 using the same filter until the requirement is met, or until this \(F_{R}\) is completely fouled. 5. (multi-stage) If \(F_{R}\) is completely fouled before \({{\bar{R}}}_1 (t_\mathrm{f}) \ge \tilde{R}\), use another clean \(F_{R}\) and repeat step 3 until \({{\bar{R}}}_1 (t_\mathrm{f}) \ge \tilde{R}\). 6. Once the threshold \({{\bar{R}}}_1 (t_\mathrm{f}) \ge \tilde{R}\) is met, record the total mass of compound 2 in the filtrate batch and the number of \(F_{R}\) used, to compute the mass yield per filter.

To keep track of the number of filters used and how many times each is reused, we identify each (stage) filter used by \(F_{R,m}\), e.g., the second (stage) \(F_{0.5}\) filter will be denoted \(F_{0.5,2}\), and we track how many times each stage filter has been used by n(m), e.g., n(2) denotes the number of times \(F_{0.5,2}\) is used. In cases where stage 1 involves more than one clean filter (used simultaneously) we also use notation \(l_m\) to denote the total number of mth stage filters used, e.g., \(l_2\) is the number of stage 2 filters used; and we denote the total number of filters used at the end of multi-stage filtration by \(M=\sum _{m} l_m\). After the multi-stage filtration is concluded, we calculate the total mass of type 2 particles collected per filter used, \(c_{2 \mathrm acm}(t_\mathrm{f}) j(t_\mathrm{f})/M\), and compare it with the collected mass from the filter \(F_{R}\) optimized for single-stage filtration. If the mass collected per filter used is larger for the multi-stage filtration, then the process is deemed more cost-effective (but see Sect. 5 for further discussion of this point).

Fig. 6
figure 6

Flow chart of multi-stage filtration. \(F_{R,m}\) signifies the mth stage filter used; for each \(F_{R ,m}\), n(m) records how many times the filter is used

Table 4 Comparisons of single-stage filtration (\(R=\tilde{R}\)) with 2-stage filtrations (\(R =0.7\) and \(R=0.5\))

In table 4, we list results comparing a single-stage filtration using a filter \(F_{\tilde{R}}\) (optimized for particle type 1 initial removal threshold set at the desired value \(\tilde{R}\)), with two separate two-stage filtrations using filters \(F_{0.7}\) and \(F_{0.5}\) (optimized for lower thresholds \(R=0.7\) and \(R=0.5\), respectively). In all cases, fast optimization was carried out using objective function \(J_{2, \mathrm fast}(a_0)=u(0)c_2(0)\) with \(\xi =0.9, \beta =0.1, \alpha _1=\alpha _2\), and \(\lambda _1=1\). The quantities listed in table 4 are: R, initial type 1 particle removal threshold; M, total number of filters used in each case; n(2), the number of times the 2nd (stage 2) filter is used; \({{\bar{R}}}_1 (t_\mathrm{f}) \) and \({{\bar{R}}}_2 (t_\mathrm{f}) \), the final cumulative particle removal ratios for particle types 1 and 2, respectively; \(k_2\), the purity of type 2 particles in the final collected filtrate; \(j(\mathrm t_f)\), the total throughput; and the total mass yield of purified type 2 particles per filter. (All relevant quantities are defined in Table 3.)

These preliminary results show that when our multi-stage filtration protocol is applied, we can achieve the same final particle removal requirement \({{\bar{R}}}_1 (t_\mathrm{f}) \ge \tilde{R}\) as the single-stage filtration but with much higher yield per filter of particle type 2; the third row of Table 4 shows that, with \(R =0.5\) the yield of purified type 2 particles per filter is almost doubled in this two-stage filtration when compared to the single-stage analog optimized for \(R=\tilde{R}\). From Table 4, we also observe that the multi-stage filtrations improve the purity of the filtrate as indicated by the \(k_2\) values. We note that all three filtrations achieve effective separation according to our (somewhat arbitrary) definition, which corresponds to purity \(k_2\ge 0.847\) for the cases considered in Table 4, i.e., \(\xi =0.9\). If higher purity is desired to consider a separation effective, the removal ratios \({{\bar{R}}}_1 (t_\mathrm{f})\) and \({{\bar{R}}}_2(t_\mathrm{f})\) can be adjusted accordingly based on Eq. (24).

Fig. 7
figure 7

Comparison of single-stage filtration and two-stage filtrations. ac show completely fouled filters \(F_{R_{},1}\) optimized for: a \(R =\tilde{R}\) (single-stage filtration), b \(R =0.7\) and c \(R =0.5\), with other parameters fixed at \(\xi =0.9, \beta =0.1, \alpha _1=\alpha _2, \lambda _1=1\). Gray color indicates membrane material, blue is deposited particles, and white is void. d and e show the fouling sequence for the second filtration stages, required when \(R < \tilde{R}\): (d) filtrate from (b) is passed repeatedly through \(F_{0.7,2}\) and (e) filtrate from (c) is passed repeatedly through \(F_{0.5,2}\), with alternating blue and red indicating deposited particles from the successive filtrations (filter reuse). Full details in text

Figure 7 illustrates the results for the optimized filters summarized in Table 4 and described above via the fouling evolution of the filter pores. Figure 7a–c shows the filters from the first filtration stage, optimized for particle removal thresholds \(R_{}=\tilde{R}\), the single-stage filtration (a), \(R= 0.7\) (b), and \(R= 0.5\) (c), at time \(t=t_\mathrm{f}\) (when the flux is reduced to the fraction \(\vartheta =0.1\) of its initial value). The blue and red colors indicate deposited particles; a change of color indicates reuse of the filter. Figure 7d, e shows the fouling of the second stage filters, \(F_{0.7,2}\) and \(F_{0.5,2}\) , respectively. We can see that when the initial removal threshold R is decreased, the fouling of the pore becomes more uniform along its depth, and the porosity of the corresponding optimized filter \(F_{R}\) increases. For the case \(R=0.5\), the optimized pore profile is almost as wide as possible; the gray-colored region corresponding to the membrane material is too thin to be visible. The high mass yield per filter and small quantity of membrane material required to produce \(F_{0.5}\) indicate that if the membrane material has good selectivity (high \(\lambda _1\) value in our model), it may be advantageous to focus on maximizing filter porosity as a design approach to increasing the mass yield per filter, while simultaneously reducing the membrane material cost per filter and achieving effective separation using multi-stage filtration.

Fig. 8
figure 8

Multi-stage filtrations: a and b show second stage of 2-stage filtrations; c and d show 2nd and 3rd stages of a 3-stage filtration. a fouling of \(F_{0.5,2}\) by filtering filtrate collected from two \(F_{0.5,1}\) filters. b fouling of \(F_{0.5,2}\) by filtering filtrate collected from three \(F_{0.5,1}\) filters. c and d: 3-stage filtration with (c) fouling of \(F_{0.5,2}\) by filtering filtrate collected from four \(F_{0.5, 1}\) filters; d fouling of \(F_{0.5,3}\) by filtering filtrate collected from \(F_{0.5,2}\) shown in (c)

From Fig. 7d, e, it is clear that in both multi-stage filtration protocols, the secondary filters \(F_{0.7, 2}\) and \(F_{0.5, 2}\) are only lightly-used at termination and could be used to process more filtrate. Specifically, we could use two or more first-stage filters \(F_{R ,1}\) in order to create sufficient once-filtered fluid to pass through the second stage filter \(F_{R ,2}\) and foul it significantly. We anticipate that increasing the volume of the filtrate batch collected from stage 1 of the filtration using multiple \(F_{R ,1}\) should lead to higher mass yield per filter by more fully utilizing the filtration capacity of the stage 2 filter \(F_{R ,2}\). Before investigating this idea in detail, we first test it using two, three and four stage-1 filters (\(l_1=2,3,4\)), which lead to 2-stage, 2-stage and 3-stage filtrations, respectively. The results are presented in Fig. 8, using the filter \(F_{0.5}\) optimized for \(R =0.5\) as in Fig. 7.

In the first test example, in stage 1, we collect a batch of filtrate by exhausting two \(F_{0.5,1}\) filters (\(l_1=2\); the fouling plot for each of these \(F_{0.5,1}\) is identical to Fig. 7c so is omitted in Fig. 8), and then, in stage 2, we send the combined filtrate batch repeatedly through an initially clean \(F_{0.5,2}\). Figure 8a shows the subsequent fouling of \(F_{0.5,2}\), with alternating blue and red color indicating particle deposition and filter reuse after a batch is processed, as before. After passing the filtrate batch through \(F_{0.5,2}\) three times, the final particle 1 removal requirement is met (so \(l_2=1\) and \(M=l_1+l_2=3\)).

In the second example, in stage 1, we collect a filtrate batch by exhausting three \(F_{0.5, 1}\) filters (\(l_1=3\); again see Fig. 7c for this stage). In stage 2, we pass the combined batch from stage 1 through an initially clean \(F_{0.5,2}\). Figure 8b shows the fouling of this second-stage filter \(F_{0.5,2}\). It is used twice, but during the second use becomes completely fouled before the entire batch can be filtered. Leaving aside for the moment the question of whether a second stage-2 filter should be introduced to deal with the leftover twice-filtered fluid, we check the (thrice filtered) filtrate from this second stage-2 filtration and find that it meets the final particle 1 removal requirement. In this example, \(l_2=1\) and \(M=1_1+l_2=4\).

In the third example, at stage 1, we collect filtrate by exhausting four \(F_{0.5,1}\) filters (\(l_1=4\)). This combined filtrate batch is then passed through a clean second-stage filter, \(F_{0.5,2}\), whose fouling is shown in Fig. 8c. This \(F_{0.5,2}\) filter is completely fouled after one use (\(l_2=1\)). Again, we defer the question of whether a second stage-2 filter would be cost-effective to deal with the remaining once-filtered feed and check the particle 1 removal requirement of the twice-filtered feed. It is not yet satisfied, so we need a third stage of filtration with a new filter \(F_{0.5, 3}\). Figure 8d shows the fouling of this \(F_{0.5,3}\) filter, which is used three times before the final particle 1 removal requirement is satisfied (\(l_3=1\)). Here \(M=l_1+l_2+l_3=6\).

We find that in the first example, when we collect filtrate from two \(F_{0.5,1}\) filters (Fig. 8a), the mass yield of type 2 particles per filter is 0.012, which is indeed greater than the value 0.0091 obtained with the original two-stage filtration of Fig. 7. However, with three stage-1 \(F_{0.5,1}\) filters, the second example of Fig. 8b, the mass yield of type 2 particles per filter decreases to 0.0067 due to the fact that the second stage filter \(F_{0.5,2}\) is completely fouled on its second use before the entire batch obtained from stage 1 can be processed. (The yield loss is due to the discarded filtrate.) Similar loss of filtrate is observed in the third example, the 3-stage filtration of Fig. 8c, d, in which filtrate collected from four \(F_{0.5,1}\) stage 1 filters was sent through a stage-2 filter \(F_{0.5,2}\), which is exhausted before the entire batch of stage-1 filtrate can be filtered a second time. Despite this loss, the mass yield per filter is 0.010, nearly as good as the first example of Fig. 8a. Additional simulations of the second and third test scenarios, in which new filters were introduced to process the discarded filtrate, gave less favorable results than those presented here. These three multi-stage filtration experiments suggest that (with our chosen model parameters), a single stage-2 \(F_{0.5,2}\) filter can process filtrate collected from three to four stage-1 \(F_{0.5,1}\) filters, but no more.

The observations of Fig. 8, though preliminary, indicate there may be an optimal ratio between the number of filters to use at different stages, which would utilize each filter’s filtration capacity as fully as possible and minimize the loss of filtrate at each stage, ultimately maximizing the mass yield per filter. We have used our model to conduct such an (empirical) investigation, the details of which are provided in the Supplementary Material, Sec. B.

4.2 Results Highlight for the Constant Flux Case

In this section, we briefly highlight results for the constant flux case, details of which are presented in the Supplementary Material, Sec. A. Our setup here is slightly different to that considered for the constant pressure filtration: We filter feed in batches of specified volume, so that filtration terminates when the batch is exhausted. Since flux is fixed, pressure rises as the pores become fouled; hence, we also impose an additional constraint that the system pressure cannot rise above a specified maximum operating pressure (taken in our simulations to be 10 times the initial system pressure). We focus on how the particle composition ratio in the feed (\(\xi \)) and the quantity of feed processed (the batch size) affect results. We observe that as \(\xi \) varies, the optimized pore profile changes significantly. Curiously, we found that for feed containing less impurity (the smallest value, \(\xi =0.1\)), the optimized pore profile is narrower at the upstream end (of \(\varLambda \) shape instead of the V shape we observed consistently in the constant pressure case) and particle deposition is more evenly distributed over the length of the pore. At larger \(\xi \)-values, the familiar V-shape is recovered. In addition, as the quantity of feed to be processed decreases, the optimized pore profile changes from a V to a \(\varLambda \) shape. Comparing the simulations of the optimized pore profiles in the cases studied, we see that the \(\varLambda \) shape is more prone to driving pressure increase and particle retention deterioration, as well as the more even distribution of fouling noted earlier. These observations, while initially counterintuitive, can be explained using our model. Full details can be found in Supplementary Material, Sec. A.4.

5 Conclusions and Future Study

In this work, we proposed a simplified mathematical model for filtration of feed containing multiple species of particles. Our focus in the main body of the paper was on a feed that contains just two-particle species, one to be removed (undesirable; type 1) and the other retained (desirable; type 2); a brief discussion of how the model extends to an arbitrary number of species, and an example for three-particle species is given in the Supplementary Material, Sec. C. For the two-species case, two important model parameters were identified and investigated to elucidate their effect on separation and optimal filter design: \(\xi \), the concentration ratio of the undesired to desired particle types in the feed, and \(\beta =\varLambda _2\alpha _2/(\varLambda _1\alpha _1)\), the ratio of the effective particle deposition coefficients for the two particle types. A number of optimization problems for maximizing the mass yield of one particle species in the feed, while effectively removing the other, were considered. For filtration driven by a constant pressure drop, we found that the optimized pore profile is always of V-shape, which is in agreement with our earlier findings for single-particle-species filtration ( (Sun et al. 2020), where the goal is to maximize total throughput of filtrate over the filter lifetime while removing a sufficient fraction of impurity). For filtration driven by a constant flux (Sect. 4.2 and Supplementary Material, Sec. A), the optimized pore profile may take either a V-shape or a \(\varLambda \)-shape depending on the particle composition ratio and the amount of feed considered for the optimization scenarios. These observations, while initially surprising, can be explained on an intuitive level using our model.

To increase the appeal and utility of our model for filter design applications, we proposed new objective functions (the fast optimization method) based on evaluating key quantities at the initial stage of the filtration. Due to the simpler forms of the proposed objectives, the fast method can be carried out with a relatively small number of initial search-points in design parameter space (compared with the slow method, which requires that a large number of simulations be run through to filter failure time). The proposed fast method is approximately 100 times faster than the naive slow method. The ideas that motivated our fast method could potentially be usefully applied to other optimization problems that require evaluation of quantities at the end of the time evolution, provided those quantities exhibit some monotonicity over time.

Observing that (based on our model predictions), effective separation in a single-stage filtration is usually achieved at the expense of short filter lifetime and inefficient filter use (most of the filter remaining only very lightly fouled at the end of the filtration), we also proposed an alternative approach for maximizing the mass yield per filter while achieving effective separation, using multi-stage batch filtration. With this approach, we found that the mass yield per filter could be as much as two-and-a-half times that produced by the optimal single stage filtration, and surprisingly, the purity of the final product is higher as well. In addition to the higher mass yield, the filter optimized for multi-stage filtration is of higher porosity and thus also requires less material to manufacture. However, in this simple preliminary study, we did not consider additional factors such as the operational energy cost and potentially longer operation time of our multi-stage filtration. Such aspects should be included as part of a more detailed future feasibility study. Multi-stage filtration has been utilized in industry (Elsaid et al. 2020) and reported experimentally (Acheampong and Lens 2014; Lau et al. 2020); however, to our best knowledge, little attention has been paid to optimizing this process from the theoretical side. We hope that our work will inspire further systematic studies into this promising approach.

Finally, we note that our model assumes a membrane consisting of identical slender cylindrical pores, each of which is contained within a regular tesselating pore-containing prism, e.g., a square, hexagonal or triangular prism. Moreover, we consider only adsorptive fouling, with a relatively simple particle deposition model. More sophisticated models would be needed to study membranes of more complex structure (e.g., one containing a distribution of different pore sizes, or pores that are non-slender and/or branching), and other fouling modes. Optimization studies for such systems could be an interesting and challenging direction for future work.