A multiscale method to calculate filter blockage

Filters that act by adsorbing contaminant onto their pore walls will experience a decrease in porosity over time, and may eventually block. As adsorption will generally be larger towards the entrance of a filter, where the concentration of contaminant particles is higher, these effects can also result in a spatially varying porosity. We investigate this dynamic process using an extension of homogenization theory that accounts for a macroscale variation in microstructure. We formulate and homogenize the coupled problems of flow through a filter with a near-periodic time-dependent microstructure, solute transport due to advection, diffusion, and filter adsorption, and filter structure evolution due to the adsorption of contaminant. We use the homogenized equations to investigate how the contaminant removal and filter lifespan depend on the initial porosity distribution for a unidirectional flow. We confirm a conjecture made in Dalwadi et al. (2015) that filters with an initially negative porosity gradient have a longer lifespan and remove more contaminant than filters with an initially constant porosity, or worse, an initially positive porosity gradient. Additionally, we determine which initial porosity distributions result in a filter that will block everywhere at once by exploiting an asymptotic reduction of the homogenized equations. We show that these filters remove more contaminant than other filters with the same initial average porosity, but that filters which block everywhere at once are limited by how large their initial average porosity can be.

Filters that act by adsorbing contaminant onto their pore walls will experience a decrease in porosity over time, and may eventually block. As adsorption will generally be greater towards the entrance of a filter, where the concentration of contaminant particles is higher, these effects can also result in a spatially varying porosity. We investigate this dynamic process using an extension of homogenization theory that accounts for a macroscale variation in microstructure. We formulate and homogenize the coupled problems of flow through a filter with a near-periodic time-dependent microstructure, solute transport due to advection, diffusion and filter adsorption, and filter structure evolution due to the adsorption of contaminant. We use the homogenized equations to investigate how the contaminant removal and filter lifespan depend on the initial porosity distribution for a unidirectional flow. We confirm a conjecture made by Dalwadi et al. (Proc. R. Soc. Lond. A, vol. 471 (2182 that filters with an initially negative porosity gradient have a longer lifespan and remove more contaminant than filters with an initially constant porosity, or worse, an initially positive porosity gradient. In addition, we determine which initial porosity distributions result in a filter that will block everywhere at once by exploiting an asymptotic reduction of the homogenized equations. We show that these filters remove more contaminant than other filters with the same initial average porosity, but that filters which block everywhere at once are limited by how large their initial average porosity can be.

Introduction
Filtration is a vital process in many industries, such as kidney dialysis (Lonsdale 1982), air purification (Barhate & Ramakrishna 2007), waste water treatment (Vandevivere, Bianchi & Verstraete 1998) and beer production (Fillaudeau & Carrère 2002). Although the industrial applications may vary widely, the main goal is often the same: to maximize the removal of contaminants or particulates entrained within the fluid that passes through the filter. Since a single experiment may take hours to complete, mathematical modelling provides a valuable tool for assisting with filter design. † Email address for correspondence: mohit.dalwadi@nottingham.ac.uk Broadly speaking, filters are composed of either material containing a series of pores (e.g. track-etched membranes) or a fibrous mesh (e.g. so-called depth filters). In the former case, if the contaminants are larger than the pores, filtration occurs at the pore entrance via size exclusion. A cake layer of particulates builds up on the entrance, making it more difficult for fluid to pass through the filter. When the contaminants are smaller than the pores, they are able to penetrate into the pores, where they may become trapped in the tortuous pore network and adhere to the pore walls. This reduces the available space through which contaminated fluid can flow, and again makes it more difficult for fluid to pass through the filter (Griffiths, Kumar & Stewart 2014). Filters composed of a fibrous mesh provide an internal structure of obstacles to which the contaminants can adsorb. As with filters composed of pores, the physical trapping of particulates within the filter will cause a reduction in the available space through which the fluid can flow. Since the contaminants are removed as the fluid flows into the filter depth, their concentration decreases with depth and so this constriction effect is usually more significant towards the filter entrance (Datta & Redner 1998). Over time, this constriction may ultimately become a blockage, halting filtration. To prolong lifespan, filters are often designed such that their porosity decreases with depth, allowing areas of the filter away from the entrance to have trapped more contaminants by the time of blocking (Anderson 1951;Burggraaf & Keizer 1991;Dickerson et al. 2005;Barg, Koch & Grathwohl 2009;Vida Simiti et al. 2012). These are known as porosity-graded filters. Moreover, an initially homogenous filter will become graded over time as the local porosity changes due to local contaminant trapping.
While mathematical methods can provide a cost-effective way to predict solute transport without experimentally sweeping through parameter space, the explicit coupling of solute transport with filter evolution yields a complicated moving boundary problem. This significantly increases the mathematical and computational effort required to solve the system and, as such, many mathematical models of filtration consider only one of these mechanisms. That is, either the problem of solute transport, or the problem of filter evolution. For example, in Griffiths et al. (2014), the filter evolution is considered by simulating a microscale model (on the lengthscale of pore size) for the blocking of a network of pores from a fundamental mechanistic level. While the results are consistent with the standard set of constitutive macroscale laws (on the lengthscale of filter size) used to predict fluid throughput (often fitted with experimental data) (Bowen, Calvo & Hernandez 1995), the flow problem is simplified by assuming Poiseuille flow through the constricting cylindrical pores. This idea is generalized to explore the effect of tapered pores and filters composed of multiple membrane layers in Griffiths, Kumar & Stewart (2016). A different approach to the problem of solute transport past sinks is used in Chernyavsky et al. (2011), where the authors considered blood flow and nutrient delivery in the placenta. Here, the transport of nutrient governed by diffusion and advection with unidirectional flow past randomly placed point sinks in the placenta is considered in one dimension. The effect of placental growth and the nature of the local flow are neglected to focus on the important features of the paper, such as quantifying the error in upscaling techniques. The authors do this by analytically determining the concentration field for different statistical distributions of the sinks using homogenization techniques and comparing these to exact solutions. In Krehel, Muntean & Knabner (2015), the authors also use homogenization techniques to consider colloid particles diffusing around a fluid domain past a periodic array of solid obstacles. The particles are trapped on the surface of these obstacles, where they may aggregate.
Mathematical homogenization provides an upscaling method whereby the fundamental behaviour of concern, such as the contaminant removal rate, is captured without the computational expense of globally calculating the microscale behaviour. This is achieved by averaging the microscale variation while retaining the macroscale variation (see, for example, Bensoussan, Lions & Papanicolaou 1978, Sánchez-Palencia 1980, Mei & Vernescu 2010, Hornung 2012. For this procedure to be valid, it is necessary for the ratio between microscale and macroscale lengthscales to be small. Although traditional homogenization techniques also require the microstructure to be strictly periodic, it can be extended to microstructures that are only near-periodic. Some relevant formal analysis results include Belyaev, Pyatnitskii & Chechkin (1998) and Chechkin & Piatnitski (1999), and more applied work using this homogenization method includes van Noorden (2009), Peter & Böhm (2009), Fatima et al. (2011), van Noorden & Muntean (2011, Richardson & Chapman (2011), Ray et al. (2012 and Ray, Elbinger & Knabner (2015). Of these, Ray et al. (2012) is particularly relevant to the work in this paper. Here, the authors considered the dynamics of colloids suspended within a fluid moving past circular obstacles in a square array. The colloidal particles were transported by diffusion, advection and an interaction potential between particles, and were able to attach to and detach from the obstacles. The colloidal attachment to the obstacles caused the microstructure to vary from its initially strictly periodic state. The authors used near-periodic homogenization techniques to upscale the problem, deriving averaged equations for the flow problem, the colloidal transport and the microstructure evolution, which were all coupled. The solution scheme for these homogenized equations involved solving a cell problem at each point in time and space in the macroscale domain, and the results focused on the impact of the interaction potential between colloidal particles.
Whilst this extension of standard homogenization theory to near-periodic microstructures is very useful, the added generality of the extension comes with a drawback. A varying microstructure means that the cell problem must be solved at every point in the macroscale, increasing the computational expense required to solve the problem. This issue is bypassed in Bruna & Chapman (2015), by considering a microstructure consisting of an array of spherical obstacles whose radii vary spatially over the macroscale length. Imposing a specific one-parameter shape on the microstructure means that the cell problem is identified by a single parameter, the cell porosity, and the macroscale equation can be written explicitly as a function of the porosity. Moreover, as the cell problems are only dependent on the cell porosity, the coefficients for the macroscale problem can be calculated beforehand, yielding a macroscale problem that can be solved at a significantly reduced computational expense.
In a previous work (Dalwadi et al. 2015), we considered solute transport through a porosity-graded filter. The filter was modelled as a series of fixed spherical obstacles with a near-periodic spatial variation on the macroscale, through which the contaminated fluid flowed. The techniques developed in Bruna & Chapman (2015) were used to derive a homogenized advection-diffusion-reaction macroscale equation, where the cell problems defining the macroscale coefficients were only dependent on the cell porosity. Although the particles that make up the solute would physically accumulate on the surface of each obstacle, causing the filter geometry to vary over time, we assumed that the particles were sufficiently small and dilute that this effect was negligible on the timescale of interest. Thus, we did not consider the filter evolution or the subsequent filter blocking. We showed that filters whose porosity decreases with depth have a much more uniform adsorption than those with increasing porosity. Moreover, we conjectured that such uniform adsorption would prolong filter lifespan, as contaminant removal would be distributed throughout the filter rather than near the filter entrance, and thus blocking may occur 'all at once' rather than in just one place. The aim of this paper is to confirm this conjecture, to quantify the time-dependent evolution of the filter and to determine how to construct a filter that will block all at once.
In this paper, we derive a generalized mathematical model for a porosity-graded filter which explicitly accounts for changes in the filter microstructure over time due to particle adsorption. The time evolution of the filter geometry means that the full fluid and transport problems are coupled. We use a homogenization method that accounts for a microstructure that varies over the macroscale to systematically determine an effective macroscale equation. The filter material is modelled as a lattice of obstacles, whose size varies both spatially over a long lengthscale and temporally, past which a fluid with suspended contaminant particles flows. The particles are transported via advection and diffusion, and can be trapped on the filter as they come into contact with the obstacles. The accumulation of contaminant particles via trapping modifies the filter geometry, and this process eventually leads to pore blockage within the filter. We assume that the contaminant particles are small and in dilute suspension within the fluid. Thus, particle-particle interactions are negligible, and the dominant interaction is the adsorption of contaminant on the obstacles, which we assume is proportional to the concentration of contaminant at the surface. Due to the slow accumulation of contaminant particles, the cell problems we obtain are only dependent on the cell porosity, allowing us to solve the macroscale problem we derive in a computationally efficient manner.
We present the full flow and contaminant transport problems in § 2, and homogenize these to obtain effective equations on the macroscale in § 3. In § 4 we investigate the effect of blocking by considering a filter whose porosity varies in one direction only, with a unidirectional flow in the same direction as the porosity gradient. We use asymptotic methods to significantly reduce the computational expense of solving our system, allowing us to perform an efficient parameter sweep, and we use our results to validate the conjectures made in Dalwadi et al. (2015). In addition, these asymptotic results allow us to solve the inverse problem of determining which initial porosity distributions result in filters that block everywhere at once. We conclude in § 5 with an overview and discussion of our results, and we discuss the challenge of determining the filter that globally optimizes contaminant removal.

Model description
We consider the transport of contaminant particles via advection and diffusion through a porosity-graded filter, and its resulting blocking. The filter is modelled as a collection of infinitely long solid cylindrical fibres with circular cross-section, whose axes are parallel and where the fluid flows normal to these axes. Contaminants can adsorb onto the solid fibre surface (obstacle surface) and, over time, the build-up of contaminant will result in a reduction in porosity. We describe the contaminant particle distribution in terms of the concentrationc(x,t), wherec is the number of moles of contaminant per unit volume,x is the spatial vector coordinate andt is time.
Although the problem we have described is three-dimensional, the inherent symmetry allows us to consider a two-dimensional problem as follows. The concentration field is defined within the fluid phase of the domain Ω f (t) ⊂ R 2 . We denote the entire domain by Ω ⊂ R 2 , which we refer to as the porous medium. We define the solid phase of the domain as Ω s ⊂ R 2 , noting that Ω s (t) = Ω \ Ω f (t), and we define the boundary between fluid and solid phases, ∂Ω f (t), which we refer to as the obstacle surface. The solid phase is modelled by a collection of fixed non-overlapping discs, whose centres are located on a hexagonal lattice at a distance δl apart, where δ is a (small) dimensionless parameter and l is the characteristic filter depth. Thus, δ 1 is the ratio of fibre centre separation and filter depth. We allow the radii of the circles to vary in both space and time, and a circle with centre atx has radiusR(t;x), where 2R δl and blocking occurs when equality is reached. Thus, blocking does not correspond to the fraction of solid phase reaching 1. We use a hexagonal lattice in contrast to the cubic lattice used by Dalwadi et al. (2015) so that we can reach a higher solid fraction at the point of blocking: arranging the obstacles on a cubic lattice, we can only reach a blocking fraction of π/4 ≈ 0.785, whereas the hexagonal lattice at contact can reach a blocking fraction of π/(2 √ 3) = 0.907. A schematic of this set-up is shown in figure 1 The pore space is assumed to be entirely saturated by an incompressible Newtonian fluid, which satisfies the Stokes equations, where∇ refers to the nabla operator with respect tox, µ is the constant fluid viscosity, u(x,t) is the fluid velocity,p(x,t) is the fluid pressure and n is the unit normal to the obstacle surface directed into the obstacle. Here, (2.1c) arises from applying a standard no-slip boundary condition to a spherical obstacle, with radiusR(t;x), growing radially. We assume that the contaminant diffuses within the fluid with a constant diffusion coefficient, D, and is advected by the velocity field. The governing equation is thus To determine the correct boundary condition for the concentration on a moving boundary, it is helpful to consider the rate of change of the total number of moles of contaminant in an arbitrary time-dependent volume V(t) with boundary ∂V(t) moving with the flow: whereṽ is the velocity of the boundary and n is the outward unit normal to ∂V(t).
In (2.3), we have used the divergence theorem and (2.2). Asũ =ṽ on ∂V(t), equation We suppose that the rate of change of the concentration is linearly dependent on the concentration at the obstacle surface. Thus, using (2.4) in an infinitesimal fluid volume, partly bounded by some of the obstacle surface, we obtain a partially adsorbing Robin boundary condition: where γ 0 is the constant contaminant-adsorption coefficient. There is no adsorption when γ = 0, and the adsorption is instantaneous in the limit as γ → ∞. Finally, we must couple the growth of the obstacles to the accumulation of contaminant at the obstacle boundary. This is in the form of a volume conservation law, where the volume of contaminant lost to adhesion is equal to the obstacle volume gain. If we multiply (2.3) by V m , the molar volume of the contaminant in the filtrate (defined as the volume of contaminant per mole of contaminant), we now have an equation for the rate of change of the volume of contaminant in an arbitrary volume of fluid. Applying this to an infinitesimal volume, partially bounded by part of the obstacle surface, and equating the loss of contaminant at the surface to the gain of obstacle volume, we obtain (2.6) We have included the effect of filter porosity changing due to contaminant particle adsorption but neglected the effect of particle-particle interactions because the contaminant particles are small compared with the obstacles and in dilute suspension within the fluid, hence particle-particle interactions occur far less frequently than particle-obstacle interactions. The interfacial condition (2.6) is similar to a Stefan condition for phase-change problems in heat transport (Gupta 2003).

Dimensionless equations
We scale the variables viax = lx,ũ = Uu,t = (δl/(c ∞ V m γ ))t,R = δlR,c = c ∞ c and p = (µU /(δ 2 l))p, where U and c ∞ are characteristic velocity and concentration scales respectively. The time scale is chosen to balance obstacle growth with contaminant concentration in (2.6), and the pressure scale is chosen to balance the pressure gradient over the macroscale with viscous forces over the obstacle microscale. The flow problem (2.1) then transforms to For the concentration problem given by (2.2), (2.5) and (2.6), we obtain the dimensionless solute-transport equation where Pe = Ul/D is the Péclet number and k = γ /(δU ). The boundary condition (2.8b) expresses the flux across the moving boundary relative to the boundary, and as such does not contain any velocity component. This system reduces to that considered in Dalwadi et al. (2015) when R is independent of t, i.e. when V m = 0, which can be seen by scaling t ∼ α and then taking α → 0. We assume that α, Pe and k are all O(1) parameters, which corresponds to the richest asymptotic limit. That is, all mechanisms contribute at leading order, from which all asymptotic sublimits may be distilled. In practice, the contaminant accumulates on the obstacles over a much longer timescale than the fluid takes to travel through the porous medium. This manifests in the smallness of the parameter α, and we exploit this feature in § 4.2 to consider the physically relevant effect of slow contaminant accumulation. In dimensionless units, the obstacles now form a two-dimensional hexagonal lattice of circles whose centres are a distance of δ apart, and a circle with centre at x has radius δR(x, t) (figure 1).

Homogenization
The complexity of the problem geometry is reduced by homogenizing the governing equations (2.7)-(2.8) using the method of multiple scales. This provides effective equations on a simpler macroscale domain, which formally capture the relevant information about the microscale geometry (see, for example, Sánchez-Palencia (1980) for a standard derivation of Darcy's law, Conca (1985) for a homogenization of the Navier-Stokes equations for various boundary conditions and Auriault & Adler (1995) for a derivation of an advection-diffusion solute transport model in porous media). Following standard homogenization theory, we introduce a microscale variable y = x/δ and treat x and y as independent. This adds an extra degree of freedom which is later removed by imposing that the solution is periodic in y. Hence, any small variation between unit cells is captured through the macroscale variable x. As shown in figure 1(b), the microscale variable y is defined in the unit cell ω(x, t), whereas the macroscale variable x spans across the whole filter. The solid portion of the cell, occupied by obstacles, is denoted by ω s (x, t). The fluid portion of the cell is The boundary between solid and fluid portions within the cell is denoted by ∂ω f (x, t), while the outer boundary of the unit cell is ∂ω(x, t) (see figure 1). Further, we treat each dependent variable as a function of both x and y. Thus, spatial derivatives transform in the following manner where ∇ x and ∇ y refer to the nabla operator in the xand y-coordinate systems, respectively. The introduction of this new spatial variable also changes the normal vector n, used to evaluate the boundary conditions (2.7c) and (2.8b), to where n y = −∇ y y = −y/ y is the geometric outward unit normal on the obstacle boundary ∂ω f (x, t), and δ∇ x R accounts for the macroscale effect of varying obstacle size. The details of this transformation are described in Dalwadi et al. (2015). As our goal is to derive effective governing equations that are valid in the macroscale domain, we consider variables averaged over an entire cell ω(x, t). To this end, we define the macroscale porosity φ(x, t) to be and the volumetric average concentration C and volumetric average fluid velocity U (known as the Darcy velocity in porous-media formulations (Kaviany 2012)) as follows The homogenization in this section proceeds in a similar manner to other homogenization work, such as van Noorden (2009), Ray et al. (2012Ray et al. ( , 2015, Bruna & Chapman (2015) and Dalwadi et al. (2015). We first consider the flow problem (2.7), and use the results in the solute-transport problem (2.8).

Flow problem
Under the spatial transforms (3.1) and (3.2), the flow equations (2.7) become Expanding the flow velocity and pressure in powers of δ as usual in the multiplescales method (see Dalwadi et al. 2015 for details), we find that the leading-order pressure, p 0 , is independent of the microscale, i.e. p 0 = p 0 (x, t). Considering the next order in (3.5) allows us to write where p is an arbitrary function of the macroscale and time only, and the matrix function K and the vector function Π satisfy the so-called cell problem: Here, I is the two-dimensional identity matrix and the dependence of K and Π on x and t is due to the dependence of the microscale boundary ∂ω f (x, t) on the macroscale variable and time.
Integrating (3.6a) over ω f (x, t) and using (3.4b), we obtain the homogenized Darcy relation at leading order, where K(φ) is a scalar function that contains the necessary microscale structure information, and is defined by We note that the integral of K in (3.8b) is a multiple of the identity matrix due to the symmetry of the cell problem described by (3.7). This would not be the case if, instead of circles, we had considered obstacles with fewer than two orthogonal planes of symmetry. Finally, to obtain a closed homogenized flow problem, we consider the O(δ) terms in (3.5b-d), given by Integrating (3.9a) over ω f (x, t) and using Reynolds transport theorem in conjunction with the periodic and no-slip boundary conditions (3.9b,c) yields a continuity equation for the macroscale fluid velocity (3.10) The system (3.8) and (3.10) determines the flow problem given the obstacle structure, which manifests itself through the source term on the right-hand side of (3.10). This reflects the fact that reducing the available pore space within a cell for an incompressible fluid will push the fluid out of that cell. If ∂R/∂t ≡ 0, we recover the system derived in Dalwadi et al. (2015).

3.2.
Solute-transport problem Under the spatial transforms (3.1) and (3.2), the solute-transport problem (2.8) becomes Expanding c(x, y, t) in powers of δ, we find that the leading-order concentration, c 0 , is independent of the microscale, i.e. c 0 = c 0 (x, t). The O(δ) terms in (3.11) allow us to write c 1 as wherec is an arbitrary function of the macroscale and time only, and the components of the function Γ satisfy the cell problem and n y,i is the ith component of the unit vector n y . The effect of the obstacle growth only appears at the next order. Namely, the O(δ 2 ) terms in (3.11) are c 2 periodic, y ∈ ∂ω(x, t). (3.14c) Integrating (3.14a) over ω f and applying the boundary conditions (3.5c), (3.9b), and (3.14b-c) gives where ds denotes the differential element of the obstacle surface ∂ω f (x, t). Using Reynolds transport theorem, equation (3.15) reduces to kc 0 ds, (3.16) noting that c 0 is independent of y. From now on, we simply write φ but it should be understood that the porosity will be, in general, a function of x and t. In a similar manner, henceforth we use ω f (φ) instead of ω f (x, t) and likewise for ∂ω f . Finally, using (3.12), (3.16) reduces to where (J T Γ ) ij = ∂Γ j /∂y i is the transpose of the Jacobian matrix of Γ , the solution to the cell problem (3.13).
To express (3.17) in terms of the volumetric average concentration C(x, t) defined in (3.4a), we note that C(x, t) ∼ |ω| −1 ω f (φ) c 0 dy = φc 0 (x, t) at leading order in δ. Using this relation and (3.8a), we find that at leading order in δ, where the effective diffusion coefficient is 18b) and the effective adsorption coefficient is using the fact that φ = 1 − 2πR 2 / √ 3, and |∂ω f (φ)| = 4πR. As is the case for the permeability K, we find that the diffusion tensor is a multiple of the identity due to the symmetry of the cell problem (3.13). Finally, the condition to couple contaminant concentration with obstacle growth (2.8c) becomes The effective permeability K(φ) (from (3.8b)) and the effective diffusion D(φ) (from (3.18b)) that encapsulate the microscale physics can be computed by solving the respective cell problems (3.7) and (3.13) for a given cell porosity φ, determined by the size of the obstacles. We calculate this numerically using the finite-element software Comsol Multiphysics and find that K and D are both monotonically increasing with the porosity, as expected, and that there is a sharp decrease in both functions as the porosity tends down towards the critical porosity where blocking occurs (see figure 2).
The homogenization procedure has significantly reduced the mathematical complexity of the growing multiply-connected domain in the full problem (2.8), with only a marginal increase in the complexity of the coefficients in the resulting governing equations (3.18), which capture the microscale structure of the problem in a systematic manner. FIGURE 2. The functions (a) K(φ) and (b) PeD(φ) (defined in (3.8b) and (3.18b), respectively) calculated using Comsol Multiphysics, for circular obstacles whose centres lie on a hexagonal lattice.

Model set-up
We are now in a position to use the homogenized equations (3.8), (3.10) and (3.18) to quantify the effect of blocking and porosity gradients on filter efficiency. We consider a canonical industrial process of interest whereby a three-dimensional filter separates two reservoirs, and a unidirectional flow is induced through the filter. As is common in industrial set-ups, we assume that the filter is graded in the same direction as the fluid flow. This reduces the problem to a one-dimensional description.
We define the direction of porosity variation as x, where x ∈ (0, 1) within the filter (since the dimensional characteristic length l is chosen to be the depth of the filter). Thus, the set-up is similar to that illustrated in figure 1. The upstream is defined for x ∈ (−∞, 0) and the downstream for x ∈ (1, ∞).
Provided the boundary conditions allow for unidirectionality, equations (3.8) and (3.10) yield a unidirectional macroscale flux U = U(x, t)e x (where e x is the unit vector in the x-direction). When filtering at constant (dimensionless) pressure drop P, we find that where Thus, the governing equation (3.18a) becomes and the relationship between obstacle growth and concentration (3.18d) is φ ∂R ∂t = C, x ∈ (0, 1). (4.4) Considering the limit of (3.18b) and (4.3) as φ → 1, and using continuity of fluid flux, we obtain the following governing equations for the upstream C − and downstream C + concentrations We impose continuity of concentration and concentration flux at the boundaries between the filter and the reservoirs. In the far-field of the reservoirs, the concentration tends to a constant value. We may take the upstream concentration C − → 1 (by choice of our non-dimensionalization), while the downstream concentration C + tends to a constant value that must be determined as part of the solution. Mathematically, this corresponds to Thus, with appropriate initial conditions, our homogenized system is given by (4.1)-(4.6). We solve this system numerically using the method of lines, discretizing in space with a second-order finite difference scheme and using the MATLAB program ode15s to solve in time.
A suitable measure of filter efficiency is the cumulative contaminant removal, defined by where the second equality can be deduced from using the relationship φ = 1 − 2πR 2 / √ 3 to obtain ∂φ/∂t = −(|∂ω f |/|ω|)∂R/∂t, in conjunction with (3.18c) and (4.4). A measure of the corresponding structural changes within the filter is captured by the quantity   .7), as a function of minimum pore size. The solid black curves denote the solutions to the full homogenized equations (4.1)-(4.6), the dashed red curves denote the asymptotic approximation when obstacle growth is small (4.12) and the dotted yellow curves denote the asymptotic solution when we further assume a weak porosity gradient (4.13). We see excellent agreement throughout, with only small deviations that occur when the pore size becomes small.
which expresses the ratio of the distance between obstacles and the obstacle centres, or an effective pore size in the filter. We begin by considering the case of a filter whose initial porosity is uniform. Solving (4.6) we find that as filtration proceeds the pore size P(x, t) decreases in time throughout the filter (figure 3a) and the rate of contaminant removal T (t) reduces (figure 3b). The reduction in pore size is more rapid close to the filter entrance than towards the filter exit (figure 3a), which causes the filter to block at the entrance while the rest of the filter is still fit for purpose. This has significant practical disadvantages, and so we now use our model to explore strategies that minimize this wastefulness by varying the initial filter porosity. To do so, we first note that the homogenized system (4.6) can be further simplified by exploiting two relevant asymptotic regimes. We discuss these in the following section.

Asymptotic reductions of the homogenized equations
In the majority of filtration applications the growth of the obstacles, and thus the blocking of the filter, takes place over a timescale that is much longer than the time taken for the fluid to flow through the filter. Mathematically, this corresponds to the quasi-steady limit in which α → 0. At leading order in this limit, returning to the three-dimensional equations for generality, the flow equations (3.8) and (3.10) become where K(φ) is defined in (3.8b); and the transport equations (3.18) become where D(φ) and f (φ) are defined in (3.18b,c), respectively. In this regime, the growth in R decouples from the flow and transport problems, which are now quasi-steady. For a unidirectional porosity variation, the flow velocity becomes independent of x and so (4.9a) simplifies to where K is given in (4.2). Moreover, the upstream and downstream concentrations can be solved to obtain where A(t) and B(t) are arbitrary functions of time. Substituting (4.11) into (4.6), the system for C becomes The governing equation for the porosity (4.4) is unchanged: This problem is similar to that considered in Dalwadi et al. (2015), where the absence of microstructural changes due to filter clogging meant that U(t) ≡ 1 in (4.12), and ∂R/∂t ≡ 0 instead of (4.12d). We can solve the system (4.12) numerically using the method of lines, discretizing in space with a second-order finite difference scheme and using the MATLAB program ode15s to solve in time.
We can make further analytic progress by considering the case where, in addition to the slow obstacle growth, the deviation of the porosity φ(x, t) from its average value in spaceφ(t) = 1 0 φ(x, t) dx is small. In this case, we express the porosity as its average in space plus the deviation, as follows φ(x, t) =φ(t) + Φ(x, t), and assume that max x∈(0,1) |Φ| φ for any given time. Thus, the leading-order coefficients in the linear governing equation (4.12a) are constant in x, and the solution can be written in terms of hyperbolic functions. The O(Φ) correction terms in (4.12a) can then be solved using the method of variation of parameters (a similar calculation is carried out in Dalwadi et al. 2015). From this, we may express the concentration C as a sum of the concentration distribution in a filter with constant porosity, C 0 (x, t), and the adjustment due to the porosity gradient, C 1 (x, t), i.e. (4.13) where |C 1 | C 0 ; C 0 and C 1 are functions of φ that can be solved for explicitly and are given in appendix A. Using this analytic solution, we are able to reduce the entire problem to solving (4.12d). We solve this system numerically using the method of lines, discretizing in space with a second-order finite difference scheme and using the MATLAB program ode15s to solve in time.
In figure 3, we compare the results from these two asymptotic results, (4.12) and (4.13), with the full numerical solution, (4.1)-(4.6) (solid black lines), as dashed red and dotted yellow lines, respectively. Both asymptotic solutions offer very good agreement in the pore size P with the full numerical solution (figure 3a), and in T until around t = 0.45 (figure 3b).
The discrepancy between numeric and asymptotic solutions appears when considering the time taken to reach a minimum pore size rather than in the cumulative contaminant removal metric T . We are able to contextualize this metric by introducing relative timings in a filter lifespan. That is, we define the minimum pore size P * (t) = min x∈(0,1),t 0 P(x, t), (4.14) and the time taken until the minimum pore size reaches a given value, t P * = min{t 0 : P(x, t) P * , for some x ∈ (0, 1)}. (4.15) Blocking occurs at t 0 , but we must consider small finite values of P * due to the singularity in (4.12) when φ → 0, and hence when P * → 0, at the point of blocking. For example, in figure 3 the simulations are stopped at t 0.01 . From figure 3(b), we see that although the maximum time to removal is different between the asymptotic and numerical solutions, the total cumulative removals are very close. We show the former in more detail in figure 3(c), where we see that the numerical and asymptotic solutions agree well in t P * until P * falls below around P * = 0.05. We show the latter in more detail in figure 3(d), where we use P * as the abscissa instead of time, against cumulative contaminant removal. We see that there is excellent agreement between numeric and asymptotic solutions throughout, and henceforth use the full asymptotic approximation (4.13), which offers a very accurate representation of the solution to the full homogenized system (4.1)-(4.6) while enabling further analytic study of the system. Moreover, we note that we halt simulations when P * reaches 0.01, and refer to this as 'blocking', and we see from figure 3(d) that this is unlikely to yield major differences in values of total contaminant removal.

Linearly graded filters
As shown in figure 3, in a depth filter with a uniform porosity the early portion of the media will block before the later portion has been used to its full effect. This can be counteracted by using a filter whose porosity decreases with depth.
In this section we consider linearly graded filters at t = 0, characterized by φ(0, x) = φ 0 + m(x − 0.5), where we vary the initial average porosity, φ 0 , and the initial porosity gradient, m. In a similar manner to Dalwadi et al. (2015), we assume that the pressure drop is kept constant across each filter considered and, noting that the system is invariant to the scaling (U(0), Pe, k) → (ωU(0), Pe/ω, ωk), (4.16) for any constant ω, we impose U(0) = 1 and vary Pe and k accordingly. For short times, a filter with spatially uniform porosity (i.e. m = 0) provides the largest cumulative removal for a given average porosity, and there is an optimum value for this average porosity (figure 4a). This optimum exists because a highly porous filter has less surface area with which to remove contaminant, but a less porous filter will admit a lower flow rate through the filter, relying more on diffusion than advection for contaminant transport and thus lowering the contaminant removal. The result that there is no apparent difference in the total contaminant removal of a filter with a positive or negative porosity gradient for small time replicates the results for the initial instantaneous adsorption obtained in Dalwadi et al. (2015). However, in contrast to Dalwadi et al. (2015) we are now able to capture the asymmetry in removal that arises over longer times as a result of blockages within the filter. In particular, negative initial porosity gradients do provide an inherently larger cumulative removal at a given time than positive initial porosity gradients (figure 4b,c), and their final cumulative removal is larger (figure 4d). We note that whilst negative initial porosity gradients do last for a longer time before blocking, the filters that take the longest time to block do not automatically remove the most contaminant (figure 5).
In Dalwadi et al. (2015), a further metric was introduced to measure the uniformity of uptake, thus allowing us to account for the superior performance of filters with a negative porosity gradient without explicitly accounting for filter evolution. As we are able to account for filter evolution in this work, T is now the better measure of filtration. We show in appendix B that this alternative metric can only provide qualitative insights into filtration, and should not be used when the filter structure evolves in time.
For a given initial average porosity, the largest cumulative removal does not necessarily correspond to a filter with the most negative initial porosity gradient (figure 4d). If the porosity gradient is too negative, the removal is skewed towards the filter exit, and thus blocking occurs at the filter exit too quickly. This effect causes the sharp drop-off in filter performance seen in figure 4(c,d) for large negative values of m. Thus, an optimum initial porosity gradient exists for a given initial average porosity. Whilst this 'optimal' initial porosity gradient maximizes contaminant removal over the space of initially linear graded filters with a given initial average porosity, it will not necessarily maximize contaminant removal over the space of all filters with a given initial average porosity. We explore this idea in more detail in the next section.

Filters that block everywhere at once
Using the framework we have set up in this paper, we can address the question of which initial porosity distributions maximize the cumulative removal for given We vary m for a given φ 0 such that φ ∈ [0.2, 0.95]. Therefore, the available range of m varies with φ 0 . We use the reference values φ = 0.6, Pe = 5, k = 0.1 from which to modify appropriate parameters. The dashed curves denote that the minimum pore size has reached 0.01 and the filtration has stopped. operating conditions. We are able to bypass much of the difficulty involved in the full optimal control problem by noting that, for a given initial average filter porosity, the cumulative adsorption (4.7) is maximized when a filter blocks all at once, rather than in just one place. Most filters will only block in one place, and this is the case for all of the filters represented in figure 4, where the filters block at either the filter entrance or the filter exit. By starting with a filter that is blocked everywhere and running our simulations backwards in time, we can obtain initial porosity distributions whose lifespans end with blocking occurring everywhere in the filter at once. To avoid the computational issues arising when blocking occurs, we approximate the concept of a filter that blocks everywhere at once by a filter that reaches a pore size of 0.01 everywhere at once. An issue with this procedure is that the full homogenized system for the concentration (4.1)-(4.6) is parabolic in time, and thus running the simulations backwards in time results in an ill-posed problem. However, the evolution equation for the filter A related issue, due to solving the system of equations backwards in time, is that only the final flow velocity can be imposed, and the initial flow velocity is now an output to the calculation. Thus, a general final flow velocity U(t 0.01 ) will not necessarily result in U(0) = 1, the condition we prescribe in the forward problem. Moreover, we vary Pe and k according to the initial porosity in the forward problem, using the invariant scaling (4.16), and thus it is not immediately clear what values of Pe and k we should impose for the inverse problem. We overcome these problems by exploiting the fact that we impose a constant pressure drop across the filter, and thus K(0) = U(0)K(t 0.01 )/U(t 0.01 ) = K(t 0.01 )/U(t 0.01 ), where the first equality holds from (4.10), and the second equality holds by using U(0) = 1 (the filter for which we are aiming). This allows us to move between the initial and final average permeabilities as a function of the final flow velocity, as well as imposing values of Pe and k using the final porosity. Hence, we are able to use a shooting method for just one parameter, the final flow velocity U(t 0.01 ), shooting to achieve U(0) = 1.
To summarize, we impose a final constant pore size with P(x, t 0.01 ) ≡ 0.01 and a final flow velocity and run our simulation in reverse, halting the process when the porosity at any point reaches a set maximum. We iterate this process, varying the final flow velocity, until the initial flow velocity U(0) = 1 to within an accuracy of 2 × 10 −3 . We repeat this process for different maximum porosity constraints to (b) The cumulative contaminant removal T for the pseudo-optimal filters (red asterisks) compared with the linear filters considered in § 4.3 (black crosses). The data for the black crosses is from figure 4. We use dimensionless parameters corresponding to the reference values φ(x, 0) ≡ 0.6, Pe = 5, k = 0.1 in the manner described in the text. In (b) we see that the pseudo-optimal filters do provide increased contaminant removal for a given initial average porosity, but the average porosity of the pseudo-optimal filters cannot be increased to an arbitrarily large value.
obtain a family of initial porosity distributions that block everywhere at once when contaminant flows through, each with a different maximum (and average) porosity. The maximum porosities we choose are given by 1 − πR 2 , where R takes the values 0.1174, 0.15, 0.2, 0.25 and 0.3. We produce this range of initial porosity distributions as there may be physical constraints on how large/small the porosity/fibres can be. Each resulting filter has a decreasing porosity with depth and, compared with the region near the filter entrance, the porosity gradient in each filter is more negative towards the centre of the filter and smaller towards the end of the filter (figure 6a). This effect is more pronounced for larger maximum porosities. We compare how these filters remove contaminant against the linear filters we considered in § 4.3 and see that the ideal filters do remove around 20 % more contaminant for a given initial average porosity (figure 6b). However, these filters cannot have arbitrarily large initial average porosity, as a filter whose initial porosity is everywhere close to 1 will not block everywhere at once, and thus a linearly graded filter with a large enough initial average porosity can remove more contaminant than a filter with a lower initial average porosity that blocks everywhere at once. As a result, we may term these pseudo-optimal filters. As a filter may require a maximum porosity to maintain structural integrity, the choice of initial porosity distribution will depend on the operating conditions.

Discussion
We have systematically derived a macroscopic model for the dynamic blocking of a porosity-graded filter from microscale information by a generalization of standard homogenization theory for near-periodic systems. The result is an advection-diffusionreaction equation for the solute concentration within the filter, a modified Darcy law for the fluid transport and an evolution equation for the underlying porosity of the filter. This system depends on the initial porosity distribution of the filter and the operating conditions. In particular, our theory has allowed us to determine solute trapping across the lifetime of a filter whose pores are constricting due to contaminant removal. We have also solved the inverse problem of calculating the initial porosity distributions that lead to a filter that blocks uniformly for given operating conditions.
To track the evolution of filter porosity, we have accounted for a macroscale variation in our filter, using the generalized homogenization technique of Bruna & Chapman (2015). The resulting macroscale equations allow us to efficiently quantify filter performance. By performing a parameter sweep over the functional space of initially linear porosity functions, we have quantified the experimental observation that filters with an initially negative porosity gradient are more effective at removing contaminant over time than filters with an initially zero (or, worse, positive) porosity gradient.
In addition, our asymptotic reductions in the limit of slow filter blocking and weak spatial porosity variation have allowed us to solve an inverse problem to calculate the initial filter porosity distributions that lead to a filter that blocks uniformly for given operating conditions. We show that these filters provide a greater contaminant removal than a linearly graded filter with the same initial average porosity, but there is a maximum initial average porosity that these filters can reach. As a result, we term these pseudo-optimal filters.
In Dalwadi et al. (2015) we showed that, for contaminants that did not alter the geometry of the filter as they adhered, a negative porosity gradient could result in a near-uniform contaminant removal in space, compared with a significantly asymmetric removal for a positive porosity gradient. We conjectured that, were this contaminant removal to result in pore constriction over time, an initially negative porosity gradient would outlast an initially positive porosity gradient. In this paper, we have confirmed and quantified this conjecture. Furthermore, we were able to deduce that a filter with an initially negative porosity gradient yields a larger cumulative contaminant adsorption than an initially positive porosity gradient at a given time, even before blocking occurs.
In this paper we considered a microscale structure consisting of cylindrical fibres, resulting in a method of varying the local porosity through a single parameter (the fibre radius), and an explicit macroscale equation. However, the homogenization procedure we use can be readily extended to a general microstructure, and one could combine this work with that of Richardson & Chapman (2011), who considered a general curvilinear coordinate transform to map a near-periodic microscale to a periodic domain, thus allowing a homogenization method to be applied. In general, the coefficients within the resulting governing equations would have to be determined at each point in space, and thus the resulting macroscale equations are more complicated to solve than in the case presented here. However, there is a computationally efficient middle ground between cylinders and a general microstructure. For instance, one could choose a one-parameter family for the potential microstructure, which allows the macroscale coefficients to be written as functions of the porosity. However, we note that obstacle shape is largely unimportant for high porosities (Bruna & Chapman 2015) and is unlikely to be preserved as particles are adsorbed. Indeed, one may intuitively expect initially non-circular obstacles to tend to a more circular shape as particles are adsorbed, and thus the system would tend towards the one considered in this paper.
One simplifying assumption that we have made in this work is that the contaminant trapping rate is linearly dependent on contaminant concentration, and that the trapping will continue until the microscale cell is fully blocked. In many adsorption models, different trapping conditions, for example, the Langmuir adsorption model, are used (see, for example, Morel & Hering 1993). This model assumes that there are a finite number of adsorption sites on the obstacle surface (thus, the number of sites is proportional to the obstacle surface area), and that the adsorption layer is only one contaminant molecule thick. Thus, while the adsorption rate will be approximately linearly dependent on the contaminant concentration when few adsorption sites are in use, the adsorption rate will decrease to zero as more adsorption sites are used. This adsorption model can easily be included in this work, and the restriction on the number of adsorption sites means that blocking would not occur in most cases. In this case, the filter that maximizes adsorption would be the one with the largest number of adsorption sites, that is, the filter with the maximum surface area.
While we have shown how to maximize contaminant removal across the functional space of filters with the same initial average porosity, our results only apply up to some maximum initial average porosity. This is because filters that block everywhere at once will have an initially decreasing porosity, and the porosity can never exceed one. Thus, the full control problem for any given initial average porosity is still an open problem. This is an important question that would be useful to tackle in future work.
Finally, we note that this work has the potential not only to guide filter manufacture and operating conditions, but also to provide assistance to many other industries. We have introduced a general framework in this paper, which applies to any problem where the underlying transport satisfies an advection-diffusion equation with a general adsorption condition on the microstructure surface. For example, our model can predict drug transport and delivery to tumours, and a simple change of sign to the evolution equation for the porosity will allow prediction of the resultant tumour shrinkage. Using appropriate parameter values, one can predict the effect of various drugs, significantly aiding the task of testing new drug therapies. We vary m for a given φ 0 such that φ ∈ [0.2, 0.95]. Therefore, the available range of m varies with φ 0 . We use the reference values φ = 0.6, Pe = 5, k = 0.1 from which to modify appropriate parameters. The dashed curves denote that the minimum pore size has reached 0.01 and the filtration has stopped.