finite-volume methods diffusion systems with complex ...

1 downloads 0 Views 733KB Size Report
Jan 20, 2010 - 4Magdalen College, University of Oxford, Oxford OX1 4AU, UK ..... The cut-cell approach requires the distinction between uncut- and cut-cell ...
Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Numerical simulation of two-dimensional and three-dimensional axisymmetric advection− diffusion systems with complex geometries using finite-volume methods J. M. A. Ashbourn, L. Geris, A. Gerisch and C. J. S. Young Proc. R. Soc. A 2010 466, doi: 10.1098/rspa.2009.0527 first published online 20 January 2010

Supplementary data

"Data Supplement" http://rspa.royalsocietypublishing.org/content/suppl/2010/01/19/rs pa.2009.0527.DC1.html

References

This article cites 14 articles

Subject collections

Articles on similar topics can be found in the following collections

http://rspa.royalsocietypublishing.org/content/466/2118/1621.full. html#ref-list-1

biomechanics (18 articles) biomedical engineering (17 articles) computational mathematics (58 articles)

Email alerting service

Receive free email alerts when new articles cite this article - sign up in the box at the top right-hand corner of the article or click here

To subscribe to Proc. R. Soc. A go to: http://rspa.royalsocietypublishing.org/subscriptions

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Proc. R. Soc. A (2010) 466, 1621–1643 doi:10.1098/rspa.2009.0527 Published online 20 January 2010

Numerical simulation of two-dimensional and three-dimensional axisymmetric advection–diffusion systems with complex geometries using finite-volume methods BY J. M. A. ASHBOURN1, *, L. GERIS2, *, A. GERISCH3

AND

C. J. S. YOUNG4

1 Department

of Engineering Science, University of Oxford, Parks Road, Oxford OX1 3PJ, UK 2 Division of Biomechanics and Engineering Design, K.U. Leuven, B-3001 Leuven, Belgium 3 Institut für Mathematik, Martin-Luther-Universität Halle-Wittenberg, 06099 Halle (Saale), Germany 4 Magdalen College, University of Oxford, Oxford OX1 4AU, UK

A finite-volume method has been developed that can deal accurately with complicated, curved boundaries for both two-dimensional and three-dimensional axisymmetric advection–diffusion systems. The motivation behind this is threefold. Firstly, the ability to model the correct geometry of a situation yields more accurate results. Secondly, smooth geometries eliminate corner singularities in the calculation of, for example, mechanical variables and thirdly, different geometries can be tested for experimental applications. An example illustrating each of these is given: fluid carrying a dye and rotating in an annulus, bone fracture healing in mice, and using vessels of different geometry in an ultracentrifuge. Keywords: finite-volume method; advection; diffusion; Cartesian grid; cut cells

1. Introduction There are many physical and biological situations that can be modelled by the advection–diffusion equation: ∂q = ∇ · (D∇q) − ∇ · (uq), (1.1) ∂t where q(x, y, z, t) is the time (t)- and space (x, y, z)-dependent concentration of some chemical or density of some dispersed population, κ(x, y, z) ≥ 0 is the capacity function, D(x, y, z, t) is the diffusion coefficient and u(x, y, z, t) is the velocity vector. Equation (1.1) is posed on a spatial (physical) domain Ω ⊂ R2 κ

*Authors for correspondence ([email protected]; [email protected]). Electronic supplementary material is available at http://dx.doi.org/10.1098/rspa.2009.0527 or via http://rspa.royalsocietypublishing.org. Received 5 October 2009 Accepted 4 December 2009

1621

This journal is © 2010 The Royal Society

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1622

J. M. A. Ashbourn et al.

or ⊂ R3 and for a time interval I = [t0 , tend ]. The problem is complemented with initial and boundary conditions. In the case when Ω ⊂ R3 , we assume that the problem is axisymmetric such that it can be reduced to an equivalent problem on its cross-section in R2 . Note that equation (1.1) is a simple example and the models normally encountered in nature, and later in this paper, are more complicated with multiple variables q = (q1 , . . . , ql ) involved, upon which D and u can depend and with additional reaction terms between the variables. Equation (1.1) and its generalizations are so-called conservation laws, mimicking the conservative nature of the systems being modelled. For equation (1.1) in particular, integrals of κq over a spatial region are conserved in time up to fluxes through the boundary of that region. The finite-volume method is designed to maintain the conservation properties of such equations and hence is a natural approach for the computation of approximate solutions (e.g. LeVeque 2002). Finite-volume methods can be employed on general spatial domains. Unstructured grids are good for boundary fitting of complex boundaries but are typically difficult to implement and can be computationally intensive. The need for fast numerical solution techniques together with a reasonably straightforward implementation of the computational scheme naturally leads to the use of a Cartesian grid on a rectangular spatial domain for equation (1.1). This latter approach is frequently used, although the physical situation might require a nonrectangular spatial domain Ω. Some groups improve on the allowed shape of Ω by using a non-intersecting union of these large rectangles to make up their domain (e.g. Geris et al. 2006). There are several disadvantages to this approach. Firstly, the rectangular domain may not faithfully represent the geometry of the situation modelled, thus creating reliability issues. The magnitude of this problem depends on the specific case and there is no real way of evaluating how large this effect might be. Secondly, if mechanical variables, such as stresses, are introduced into the mathematical model, then corner singularities can arise owing to the hard corners in the non-convex geometry that may arise from the union of rectangles. Mechanical forces play an important role in many biological processes including the example that will be considered here, namely bone fracture healing. The influence of the mechanics on the bone regeneration process will not be captured accurately by the model if singularities are present in the calculation of the mechanical stimuli. Thirdly, if a system is being designed for experimental or any other use, it would be desirable to investigate different geometries explicitly so that one which produced optimal results could be used. The basis of the approach followed in this study is that of Cartesian cut cells in two dimensions developed by Calhoun & LeVeque (2000). The computational domain is a rectangle made up of grid cells (finite volumes) of dimensions x × y. The physical domain Ω, i.e. the domain on which equation (1.1) is to be solved, is a subset of the computational domain. There are uncut cells, i.e. cells that are either completely inside or completely outside Ω, and cut cells, i.e. cells that have been cut by a single straight line. By putting these cells together, an approximation to the physical domain Ω can be achieved figure 1. We will make use of the capacity function κ of the problem, extended to the whole computational domain, in order to encode the fraction of a grid cell that is part of Ω. A characteristic of this approach is that the numerical solution approximates the average of the solution in the Cartesian grid cells intersected with Ω. At times Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion (a)

(b)

1623

(c)

Figure 1. The cut-cell approach: (a) is a collection of empty (grey), cut (grey/white) and full (white) cells with (b) showing how these fit together to form the computational domain and contain an approximation to the physical domain as shown in (c).

these averages are interpreted as solution approximations in the centroids of those intersections. The approach of Calhoun & LeVeque (2000) can be traced back to earlier work, e.g. Berger & LeVeque (1989), where the Euler equations in irregular two-dimensional spatial domains are considered. Even earlier, Cartesian cut-cell methods were applied in aerospace research for the solution of the transonic full potential equation in general domains (e.g. Wedan & South 1983). More current work in this direction is, for example, the h-box method for hyperbolic conservation laws (e.g. Berger et al. 2003). There is a substantial body of literature dealing with cut-cell approaches to various applied problems. One slightly different line of research is that of Colella et al. (2006). Johansen & Colella (1998) use a cut-cell or ‘Cartesian-grid embedded boundary’ method to solve the (time-independent) Poisson equation with variable coefficients and Dirichlet boundary conditions on irregular-shaped domains Ω in one dimension and two dimensions. Their approach employs a cell-centred finitevolume discretization of the problem where the numerical solution approximates the exact solution in the centres of the Cartesian grid cells (and not in the centroids of those cells intersected with Ω). For certain geometries, this leads to cut cells where the solution is approximated outside Ω. This could be seen as a disadvantage but on the other hand it is key to arriving at linear equation systems whose condition is relatively unaffected by small cut cells. The Dirichlet boundary data are incorporated using a quadratic polynomial to approximate the solution and lead to one-sided finite differences for the computation of the boundary fluxes. The scheme displays second-order accuracy for test examples. The approach above has been extended to the time-dependent case (McCorquodale et al. 2001), and the heat equation for irregular two-dimensional spatial domains is considered. Here, a dedicated implicit, second-order time-stepping scheme (without timestep size control) is employed. For a particular parameter choice, this scheme encompasses the Crank–Nicolson method. The method is extended to three dimensions in Schwartz et al. (2006). A similar approach is taken by Colella et al. (2006) for hyperbolic conservation laws. The spatial discretization uses a flux-redistribution approach to ensure an overall conservative scheme despite the use of some non-conservative algorithmic ingredients. Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1624

J. M. A. Ashbourn et al.

In the case where the irregular domain Ω is rather simple, e.g. a circle or a ring or similar, then logically Cartesian grids can be employed, often more easily (for a current review see Calhoun et al. 2008). This study modifies the two-dimensional Cartesian cut-cell technique of Calhoun & LeVeque (2000) for use in a method of lines (MOL) approach. It is extended to allow for Dirichlet boundary conditions. The use of limiter functions yields accurate advective flux approximations and avoids the introduction of oscillations into the numerical solution. Finally, the spatially two-dimensional approach is extended to be applicable for three-dimensional axisymmetric systems. Whereas Calhoun & LeVeque (2000) consider the discretization of diffusion and advection individually and combine them in a fractional-step timestepping scheme, the MOL approach (e.g. Hundsdorfer & Verwer 2003; Gerisch & Chaplain 2006) treats the discretization of both parts in the same framework resulting in a single system of ordinary differential equations (ODEs), the MOL– ODE. This has the advantage that the MOL–ODE can be, and is, solved with advanced time-stepping schemes of high order and with automatic time-step control to ensure an efficient and accurate solution.

2. Derivation of an MOL cut-cell discretization In this section the derivation of the cut-cell discretization is presented for the model problem equation (1.1) for two spatial dimensions (x, y). As already described in the introduction, the method of Cartesian cut cells involves defining a grid that covers a computational domain greater than the physical domain Ω. The grid cells are denoted by Ωij ; i runs in the x-direction and j in the y-direction. With (xi , yj ) we denote the centre of grid cell Ωij . When the grid is placed over Ω, there will be cells Ωij that lie totally outside, those that are totally inside and those that are cut by part of the boundary of the physical domain. Following Calhoun & LeVeque (2000), we assume that cut cells are cut with a single straight line and extend the capacity function κ of equation (1.1) from Ω to the whole computational domain by defining it to be zero outside Ω. Then for each cell, we can define its average capacity as  1 κ(x, y) dx dy. κij := xy Ωij It readily follows that κij = 0 for all cells Ωij totally outside Ω. In many applications, we have κ ≡ 1 in Ω and then κij = 1 for Ωij totally inside Ω and 0 < κij < 1 for cut cells. Hence, in that case κij is the fraction of Ωij , which is part of the physical domain. The quantities that we wish to compute are timedependent approximations to the spatial average of the solution q, weighted with the capacity function, in each grid cell, i.e.  1 κ(x, y)q(x, y, t) dx dy. Qij = Qij (t) ≈ κij xy Ωij If κ ≡ 1 in Ω, then Qij (t) simply approximates the average of q at time t in the intersection Ωij ∩ Ω. The set-up of a system of ODEs for the averages Qij (t), based on the partial differential equation (1.1) at hand, constitutes the first step Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

1625

of the MOL. The initial values Qij (0) for this MOL–ODE are taken from the initial data that accompany equation (1.1). In this paper, we are primarily concerned with the set-up of the MOL–ODE. For the second step of the MOL, the time integration of the MOL–ODE, we employ the linearly implicit Runge– Kutta method of order four ROWMAP (Weiner et al. 1997). This fourth-order method employs Krylov techniques for the solution of the large linear equation systems arising in its stages and is well suited for the numerical solution of large and stiff ODE systems such as our MOL–ODE. For a grid cell Ωij with zero capacity κij , as is the case in cells completely outside the physical domain, we define the corresponding ODE and initial condition dQij = 0, dt

Qij (0) = 0

for all (i, j) such that κij = 0.

(2.1a)

For all other grid cells, the ODE is obtained by accounting for the fluxes through all the grid-cell boundaries. Following the finite-volume methodology in Calhoun & LeVeque (2000), this then amounts to Fi+1/2,j − Fi−1/2,j Fi,j+1/2 − Fi,j−1/2 lij Hij dQij =− − − . dt κij x κij y κij xy

(2.1b)

In this equation, Fi+1/2,j , −Fi−1/2,j , Fi,j+1/2 and −Fi,j−1/2 are the average (per unit length) fluxes across the right, left, upper and lower edges of Ωij in the outward normal direction. This means, for example, that yFi+1/2,j is the total flux out of Ωij through the right boundary edge. Conservation of mass dictates that Fi−1/2,j = F(i−1)+1/2,j and Fi,j−1/2 = Fi,(j−1)+1/2 and consequently for each grid cell only the fluxes out across the right and upper edges must be computed. In cut cells, there is another boundary segment, namely that which coincides with or represents a part of the physical boundary ∂Ω. We denote the length of this segment by lij and the average (per unit length) flux out through this segment by Hij . It should be noted that in the case of no-flux boundary conditions, Hij = 0 holds. Reaction terms can also be added to this ODE (e.g. Gerisch & Chaplain 2006). In the following §2a,b, we treat the definition of the average fluxes through the edges of grid cells. These fluxes are in the direction n = (1, 0)T for a right gridcell edge, n = (0, 1)T for an upper grid-cell edge and in the direction of the unit outward normal vector n of Ω for the additional edge of length lij of a cut cell. The average flux F through an edge in the direction n is the sum of an average diffusive, F D , and an average advective, F A , flux in the direction n. The diffusive and the advective flux in direction n in a point (x, y, t) in equation (1.1) are −D(x, y, t)∇q(x, y, t) · n

and

(u1 (x, y, t), u2 (x, y, t))T q(x, y, t) · n,

respectively. The cut-cell approach requires the distinction between uncut- and cut-cell edges of grid cells. For the diffusive flux computation, an edge is an uncutcell edge if and only if the two adjacent grid cells are uncut grid cells, otherwise that edge is a cut-cell edge for diffusion. For the advective flux computation, an edge is an uncut-cell edge if and only if the two adjacent grid cells upstream and the one downstream are uncut grid cells, otherwise that edge is a cut edge for advection (see figure S1 in the electronic supplementary material for an Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1626

J. M. A. Ashbourn et al.

illustrative sketch). Subsequently, the implementation of boundary conditions for equation (1.1) (§2c), and an extension of the two-dimensional cut-cell approach for the three-dimensional axisymmetric problems (§2d), are presented.

(a) Flux computation on uncut-cell edges In the case of an uncut-cell edge, on either side of that edge there is an uncut (full) grid cell Ωij (in the case of the advective flux computation, there are even two uncut grid cells upstream) with the average concentration of q given by Qij . We can also interpret Qij as an approximation of q in the grid-cell centre (xi , yj ), which is equal to the centre of the mass of Ωij . For these reasons, we therefore apply standard finite-volume approximation techniques to define the fluxes for the MOL–ODE.

(i) The diffusive flux on uncut-cell edges For a right edge, the outward normal vector is n = (1, 0) and the diffusive flux through that edge is −Dqx . We follow Calhoun & LeVeque (2000) and approximate the derivative qx by central differencing across the edge, then evaluate D in the edge centre and consequently define   Qi+1,j − Qij x D := −D xi + , yj , t . (2.2) Fi+1/2,j 2 x Accordingly, for an upper edge, the normal is given by n = (0, 1), and we define   Qi,j+1 − Qij y D . (2.3) ,t Fi,j+1/2 := −D xi , yj + y 2

(ii) The advective flux on uncut-cell edges In many systems, steep gradients exist in the exact solution and within the numerical solution process, these cause oscillations to appear in the numerical solution if the advection term is not carefully discretized. These oscillations may result in negative numerical solution values, although the exact solution is nonnegative, for example modelling a concentration. These negative values create major problems in many systems, particularly those which also involve reaction terms that may render the differential equation unstable if they are evaluated for negative (numerical) solution values and hence amplify the oscillatory behaviour. To combat this, higher-order upwinding discretizations together with so-called limiter functions have been introduced (see Hundsdorfer & Verwer 2003 for more details). In the following approach, we make use of the van Leer (1974) limiter. The introduction of limiters effectively means that a locally appropriate combination of higher- and first-order upwind difference schemes is used to create an accurate but non-oscillatory solution. Let us firstly consider the advective flux through a right uncut-cell edge, A . The definition of that flux depends on the sign of the normal velocity in Fi+1/2,j the centre of the uncut-cell edge, u(xi + x/2, yj , t) · (1, 0)T = u1 (xi + x/2, yj , t). Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

For a positive velocity, u1 (xi + x/2, yj , t) > 0, we use    x 1 A , yj , t Qij + L(ri+1/2,j )(Qij − Qi−1,j ) Fi+1/2,j := u1 xi + 2 2 and Qi+1,j − Qij , ri+1/2,j = Qij − Qi−1,j together with the van Leer limiter function r + |r| L(r) = . 1 + |r|

1627

(2.4a)

(2.4b)

(2.5)

Here ri+1/2,j is a measure of the monotonicity of the grid data. In particular, if Qij is an extrema with respect to its neighbours Qi−1,j and Qi+1,j then ri+1/2,j = 0 and also L(ri+1/2,j ) = 0. This implies that in this case the flux is computed using the first-order upwind discretization. If L(ri+1/2,j ) = 0 then a higher-order discretization is employed on the edge. From the above equations, it is also apparent that the two grid-cell values Qi−1,j and Qij upstream and the gridA cell value Qi+1,j downstream of the edge are used in the definition of Fi+1/2,j . These grid cells must therefore be uncut grid cells completely within the physical domain Ω. If they are not, then the edge under consideration is a cut-cell edge (for advection) and a flux computation appropriate for this case (see further below) must be employed. For a negative velocity, u1 (xi + x/2, yj , t) < 0, the upwind direction changes A but the equations for the advective flux Fi+1/2,j are similar and given by    x 1 −1 A Fi+1/2,j := u1 xi + , yj , t Qi+1,j + L(ri+1/2,j )(Qi+1,j − Qi+2,j ) (2.6a) 2 2 and Qi+1,j − Qij −1 = . (2.6b) ri+1/2,j Qi+2,j − Qi+1,j Here again, two values, Qi+1,j and Qi+2,j upstream and one value, Qij , downstream A of the edge are used in the definition of Fi+1/2,j . It is straightforward to write A on an upper uncut-cell edge, down the definition of the advective flux Fi,j+1/2 although we abstain from it here. A thorough investigation of the advective flux discretization as given above can be found in Gerisch (2001). There is a slight error in this approach caused by the splitting of the flux in the x- and y-direction. This is illustrated in figure 2, in which we assume a constant advection velocity u = [u1 , u2 ] with u1 , u2 > 0 and assume that the concentration q is constant in each grid cell Ωij at the value Qij . Then, over a small time span δt, the differences between the actual and computed (first-order upwind) fluxes in and out of Ωij as well as their sum are given by Fin = u1 u2 (δt)2 (Qi−1,j + Qi,j−1 − Qi−1,j−1 ), Fout = u1 u2 (δt)2 (−Qij ) and

Ftotal = u1 u2 (δt)2 (Qi−1,j + Qi,j−1 − Qi−1,j−1 − Qij ).

Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1628

J. M. A. Ashbourn et al. (a)

(b)

(c)

(d)

(e)

(f)

Figure 2. Images showing the slight errors between the discretized and the actual advective fluxes for a velocity u1 = u2 = 1 over a time span δt. (a) Actual flux in; (b) discretized flux in through left edge; (c) discretized flux in through bottom edge; (d) actual flux out; (e) discretized flux out through right edge and (f ) discretized flux through top edge.

These errors decrease with δt and so smaller time steps (resulting in longer integration times) will produce more accurate results such that the temporal integration can deal with these errors to the required degree of accuracy. If the concentration gradient is small, then all the concentration terms will almost entirely cancel each other out, thus relaxing the constraints on δt and reducing the integration time.

(b) Flux computation on cut-cell edges The situation is now different from that for uncut-cell edges: there will be at least one adjacent (or next to adjacent for the advective flux) grid cell, which is a cut cell. For such a cut cell Ωij , the value of Qij approximates the average of q in Ωij ∩ Ω. So we should not interpret Qij as an approximation of q in the grid-cell centre (xi , yj ) but as an approximation in the centre of mass of Ωij ∩ Ω. If we consider the average flux Fi+1/2,j on a right cut-cell edge, then Fi+1/2,j must be defined such that yFi+1/2,j is the total flux through that edge. This total flux accumulates only on that part of the grid-cell edge which is within the physical domain. If we denote the length of this part by hi+1/2,j , then as in Calhoun & LeVeque (2000), a consistent definition is obtained by letting Fi+1/2,j := Proc. R. Soc. A (2010)

hi+1/2,j ˆ F i+1/2,j , y

(2.7)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

1629

where Fˆ i+1/2,j is the average (per unit length) flux out of Ωij through the portion of length hi+1/2,j of its right edge. Similarly, we define the average flux Fi,j+1/2 on an upper cut-cell edge by Fi,j+1/2 :=

hi,j+1/2 ˆ F i,j+1/2 . x

(2.8)

(i) The diffusive flux on cut-cell edges For the diffusive flux, the same approach as that by Calhoun & LeVeque (2000) is taken where a bilinear interpolant qˆ (x, y) = αx + βy + γ xy + δ

(2.9)

is fitted to the data Qij in the centres of the mass of four neighbouring cells of the cut-cell edge under question. Then qˆ (x, y) can be differentiated analytically and evaluated at the centre (xe , ye ) of the part of the cut-cell edge within Ω. The diffusion coefficient is also evaluated at this point. In summary, we then obtain for a right cut-cell edge ∂ qˆ (xe , ye ) Fˆ D i+1/2,j := −D(xe , ye , t) ∂x

(2.10)

and for an upper cut-cell edge with a different point (xe , ye ), ∂ qˆ (xe , ye ). Fˆ D i,j+1/2 := −D(xe , ye , t) ∂y

(2.11)

We note that if the approach outlined here for cut-cell edges is applied to uncut-cell edges, then the same flux value on the uncut-cell edge as before is obtained.

(ii) The advective flux on cut-cell edges Here, we firstly consider the case that the second grid cell upstream of the cutcell edge under consideration is outside Ω; this is a typical scenario near an inflow boundary part of Ω. Secondly, we consider the case that this grid cell is, at least partially, contained in Ω, a scenario often encountered near an outflow boundary part of Ω. Finally, the special procedure to compute the total cell flux owing to advection for cut cells Ωij with very small capacity 0 < κij 1 is described. We add this last special case in order to obtain a discretization algorithm that can deal reliably with very small cut cells. If the second grid cell upstream of the cut-cell edge under consideration is outside Ω, then it is not possible to apply the discretization with van Leer limiter owing to unavailable values of Qij . Hence, we resort to the first-order upwind discretization in that case and define for a right cut-cell edge  if u1 (xe , ye , t) > 0, Qi,j A Fˆ i+1/2,j := u1 (xe , ye , t) Qi+1,j if u1 (xe , ye , t) < 0. Here again (xe , ye ) denotes the centre of the part of the cut-cell edge within Ω. The value Fˆ A i,j+1/2 on an upper cut-cell edge is defined accordingly. Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1630

J. M. A. Ashbourn et al.

Also, if the second grid cell upstream of the cut-cell edge under consideration is, at least partially, inside Ω, then we have the available necessary values Qij to apply the discretization with van Leer limiter which we have used to define the advective flux on uncut-cell edges. However, those Qij should be considered approximations to q in the centres of mass of their respective Ωij . Nevertheless, we apply the equations for uncut-cell edges but with the velocity u1 on a right cut-cell edge (respectively, u2 on an upper cut-cell edge) evaluated in (xe , ye , t), where (xe , ye ) again denotes the centre of the part of the cut-cell edge within Ω. In particular, we define for a right cut-cell edge and the case u1 (xe , ye , t) > 0, cf. equation (2.4),   1 Fˆ A (2.12) i+1/2,j := u1 (xe , ye , t) Qij + 2 L(ri+1/2,j )(Qij − Qi−1,j ) , with ri+1/2,j and L(r) defined as before. Fˆ A i+1/2,j for u1 (xe , ye , t) < 0 is defined A ˆ following equation (2.6) and the value F i,j+1/2 on an upper cut-cell edge is defined accordingly. This treatment of the advective flux on these particular edges will in general reduce the order of accuracy to one locally (similar to when the limiter function reduces the accuracy to first order in the vicinity of local extrema of the solution). The advective fluxes computed for a grid cell Ωij are added up and divided by κij (see equation (2.1b)). Whereas this division does not cause a difficulty in the case of uncut grid cells, it may pose a source of error for small cut cells where 0 < κij 1. Therefore, for these small cut cells, we require a different approach since otherwise the discretization may either lead to numerical instability or make it necessary to limit the time step in the time integration to a very small value. In the following, we consider for each Ωij that part of the right-hand side of equation (2.1b) which arises from the discretization of advection and denote it by MijA , MijA := −

A A − Fi−1/2,j Fi+1/2,j

κij x



A A − Fi,j−1/2 Fi,j+1/2

κij y



lij HijA κij xy

.

This value represents the average (per unit area) change of mass of Q in grid cell Ωij owing to advection. Our basic assumption for cut cells Ωij with 0 < κij 1 A is that MijA will be similar to the value Mlm in adjacent grid cells Ωlm as the ∗ ∗ distance between their respective centres of mass, (xij∗ , yij∗ ) and (xlm , ylm ), will be A small. Therefore, we fit a surface through the (known) values Mlm in the adjacent cells and evaluate this surface at the centre of mass of Ωij to find an approximate value of MijA . This may cause some minor problems with the conservation of mass but owing to the fact that this approach is only taken for cells with low values of κij and the mass within a cell is κij xyQij , this slight variation will be minimal (see the electronic supplementary material, Section 2). Also this modification has been shown to have a negligible effect on the numerical errors in test cases but it results in an often substantial reduction of CPU time for the time integration of the resulting MOL-ODE (see also Section 2 in the electronic supplementary material). If in later applications the lack of conservation of the scheme is deemed too large then a flux-redistribution approach such as that in Colella et al. (2006) Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

1631

could be implemented. Numerical tests (not presented in detail in this paper) showed that a suitable condition for a cut cell Ωij to be counted as small was that κij < 0.01. In order to obtain an accurate approximation of the unknown value MijA in a A in as many small cut cell, the surface should be fitted to the (known) values of Mlm as possible adjacent (cut and non-cut) cells. To this end, a procedure with at most five steps is applied to find MijA for all small cut cells by interpolation: in step k, A are already known in we determine all still unknown values MijA where the Mlm at least #k adjacent cells of the small cut cell Ωij . The pairs (k, #k ) are given by (1, 4), (2, 3), (3, 3), (4, 2), (5, 1) so that in the end all MijA have been determined.

(c) Implementation of boundary conditions Boundary conditions for problem (1.1) can apply to cut or uncut upper, lower, left or right edges of a grid cell Ωij or to the special single straight edge that may make Ωij a cut cell. The effect of these boundary edges is captured in equation (2.1b) by the term (one for each boundary edge of Ωij ) −

lij Hij . κij xy

The numerical treatment of all those boundary edges follows the same strategy. We consider one such edge of length lij and centre (xe , ye ) and explain the definition of the average flux Hij out of Ωij through that edge. If the flux on the boundary edge is prescribed as part of problem (1.1), then we define Hij simply as the prescribed value in (xe , ye ). In particular, no-flux boundary conditions lead to Hij = 0. For Dirichlet boundary conditions, the value of q is prescribed on the boundary edge and we make use of the value in its centre, QD := q(xe , ye , t). Furthermore, we let n(xe , ye ) be the unit outward normal vector of the boundary edge. The average advective flux through the boundary edge is defined by first-order upwinding Qij if u(xe , ye , t) · n(xe , ye ) > 0, A Hij := u(xe , ye , t) · n(xe , ye ) q(xe , ye , t) if u(xe , ye , t) · n(xe , ye ) < 0. The situation is slightly more complicated for the average diffusive flux. In that case, we assume that this is aligned with the boundary √ edge but outside Ω with a square ‘ghost’ grid cell with side of length δ := xy in which q takes the constant Dirichlet value QD . The centre of the ghost cell is found by first projecting the centre of mass of Ωij onto the boundary edge extended to a straight line, defining a distance vector αn(xe , ye ) and then continuing in this direction for a distance δ/2. Hence, the distance between the centre of mass of the ghost cell and that of Ωij is given by α + δ/2. The average diffusive flux through the boundary edge is then defined by central differencing across the boundary edge HijD := −D(xe , ye , t) Proc. R. Soc. A (2010)

QD − Qij . α + δ/2

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1632

J. M. A. Ashbourn et al.

(d) Extension to three-dimensional axisymmetric problems Thus far the numerical technique has been developed for problem (1.1) in two spatial dimensions. A considerable number of three-dimensional problems, including two of those treated in §4, have the property of axisymmetry and can equivalently be reduced to a two-dimensional problem on Ω ⊂ R2 corresponding to half of their cross-section. For instance, a three-dimensional axisymmetric problem (1.1) reduces to ∂ (κrq) = ∇ · (rD∇q) − ∇ · (ruq), for (x, r) ∈ Ω ⊂ R2 . ∂t Here x is the axial coordinate and r ≡ y the radial coordinate. It should be noted that this system is still in conservation form but in particular q is multiplied by the radial coordinate r on the left-hand side. By introducing ‘radius-weighted’ averages Qij of the solution and following the approach in Gerisch & Geris (2007), we can apply the numerical techniques developed above to this modified problem.

3. Numerical tests of the cut-cell discretization In this section, particular aspects related to the cut-cell discretization described in §2 are discussed. Convergence studies were carried out to test the influence of the various constituents of the model problem (1.1) as well as the relative size of the cut cells on the spatial discretization. Furthermore, we investigated numerically the influence of the introduction of the van Leer limiter in the spatial discretization of the advective term of equation (1.1) on the overall accuracy and convergence speed. The time integration of the MOL–ODE system was carried out with ROWMAP (Weiner et al. 1997) using a sufficiently strict tolerance of 10−8 such that errors of the time integration process could be considered negligible compared with the spatial discretization errors that are of interest for the convergence studies in this section.

(a) Convergence of the cut-cell discretization Convergence tests were carried out for the numerical solution of problem (1.1) with (i) diffusion alone (ii) advection alone and (iii) diffusion and advection together. A simple model of a pulse of suspension moving along a two-dimensional pipe of width 1 m and at an angle α = π/4 to the positive x-axis with constant velocity v and/or dispersing with constant diffusion coefficient D was used as the basis. Consequently, the velocity vector of equation (1.1) is given by u = v(cos(α), sin(α))T . The initial shape of the pulse is captured in the initial condition      −d + 0.2 d + 0.2 + erf , (x, y) ∈ Ω, q(x, y, 0) := q0 (d(x, y)) = 0.5 erf 0.2 0.2 (figure 3a). Here, d(x, y) is the distance of (x, y) from the line perpendicular to the pipe and through the centre of the computational domain. We assume zero flux boundary conditions along the pipe. The physical domain Ω is embedded in a computational domain of size of 5 m by 5 m (figure 3a) and simulations were run for 8 s. The spatial discretization is also supposed to work well for small cut Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1633

Simulation of advection–diffusion (a)

(b)

Figure 3. (a) The physical domain Ω representing a two-dimensional pipe at an angle α = π/4 embedded in the computational domain (the grey area denotes the area outside the pipe). Within Ω we show the initial pulse on which the numerical convergence results are based; the darker areas represent higher concentrations of suspension. (b) The three different scenarios used to cover various different cut-cell sizes along the pipe boundary are shown.

(a)

(b) 1E-3

0.1

e

1E-4 0.01 20

40

60

80 100 120 140 160

cells per direction

20

40

60

80 100 120140160

cells per direction

Figure 4. Straight lines show first- and second-order convergence. (a) A scatter plot of the mean square error against the grid size for the diffusion algorithm is shown (D = 0.01 m2 s−1 , tend = 8 s). (b) A scatter plot of the mean-square error against the grid size for the advection algorithm is shown (v = 0.25 ms−1 , tend = 8 s). Unfilled triangle, cutting cells in half; filled triangle, cutting cells 1 : 7; inverted unfilled triangle, cutting cells 1 : 799.

cells in the grid. To test the behaviour of the discretization in such cases, the lower edge of the pipe was moved to three different positions to give cut cells of half capacity, one eighth capacity and one eight hundredth capacity as shown in figure 3(b). Figures 4 and 5 show the results of the convergence study. We use grids with square cells of width 5/150  x = y  5/20 and consider the error in space at the final time. To calculate this error for the different cell widths x, a reference solution was needed. For the pure advection case, the analytical solution of the model problem, i.e. the appropriately displaced initial condition of the problem (figure 3a) was used as the reference solution. For the case involving diffusion alone, the results of a computation on the grid with x = 5/150 were taken to be sufficiently accurate and used as the reference solution. Finally, the Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1634 (a)

J. M. A. Ashbourn et al. (b)

1

0.10

0.10

e

0.01

1E-3 0.01 1E-4 20

40

60

80 100 120140 160

cells per direction

20

40

60

80 100 120140160

cells per direction

Figure 5. Straight lines show first- and second-order convergence. (a) A scatter plot of the meansquare error against the grid size for the advection–diffusion algorithm. Half-cut boundary cells were used (D = 0.01 m2 s−1 , tend = 8 s) (unfilled triangle, solely advection (v = 0.25 m s−1 ); filled triangle, solely diffusion; inverted unfilled triangle, advection–diffusion (v = 0.125 m s−1 ); inverted filled triangle, advection–diffusion (v = 0.25 m s−1 )). (b) A scatter plot of the mean-square error against the grid size for the advection algorithm to show the effect of the van Leer limiter (tend = 8 s) (unfilled triangle, v = 0.25 m s−1 (van Leer); filled triangle, v = 0.25 m s−1 (limiter = 0); inverted unfilled triangle, v = 0.125 m s−1 (van Leer); inverted filled triangle, v = 0.125 m s−1 (limiter = 0)).

reference solution for the combined case of diffusion and advection was obtained by analytically displacing the reference solution of the pure diffusion case at the final time to account for the advection. To calculate the reference solution for a grid with cell width x > 5/150, the concentrations at the centre of mass of each cell were linearly interpolated from the finer reference grid. As a measure of error, we approximate the volume weighted L2 (Ω)-norm of the error, function e(x) from the difference between numerical, Qij , and reference solution, Qijref , values on the grid:  2 1 1

(e(x))2 dx ≈ 2 := κij xy Qij − Qijref . (3.1) |Ω| Ω |Ω| i,j From figure 4a it is obvious that the algorithm applied to problem (1.1) with diffusion only converges almost with order two for decreasing spatial grid width. Furthermore, no significant dependence of the error on the size of cut cells is observed. This graph gives the least errors in all the tests shown in figures 4 and 5 and so we checked that the level of temporal tolerance (10−8 ) for ROWMAP is sufficiently strict by recalculating the solution on the 140 × 140 grid with a stricter temporal tolerance of 10−10 . Both errors were found to deviate by less than 3 × 10−5 , thus showing that the original temporal tolerance (10−8 ) was strict enough. The algorithm applied to problem (1.1) with advection only (figure 4b) converges at a slower rate and when it is applied to the combined diffusion– advection problem, figure 5a, the error lies between the error in solely the diffusion case and that in solely the advection case. This is due to the fact that a present diffusion term smoothes the solution (i.e. decreases the gradients). This means Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

1635

that the discretization of the advection (if present) can make more use of the higher-order unlimited approximation of the advective flux than in cases with less or no diffusion where steep gradients together with the limiter function drive the advective flux approximation closer to a first-order upwind discretization; this effectively adds numerical diffusion to the scheme in order to avoid having oscillations occur in the numerical solution. There is also a slight tendency for very small cells to have larger errors, which is the reason for the slight increases in the error at various grid sizes since the upper boundary cuts the cells in different ways. From figure 5b, it can be seen that the worst errors come from systems with large amounts of advection and little diffusion.

(b) The effect of the van Leer limiter One of the major differences between the method used in Calhoun & LeVeque (2000) and our method is that we treat diffusion and advection in the same framework (MOL) resulting in a single ODE system after spatial discretization. This allows the use of off-the-shelf, high-order time integration schemes such as ROWMAP. Calhoun & LeVeque (2000) treat diffusion and advection independently and combine both using a fractional-step method. This usually limits the temporal accuracy to order two. For advection, they employ the cut-cell approach with the CLAWPACK software that provides highresolution discretization of hyperbolic conservation laws such as, for example, problem (1.1) without diffusion. To also have a better than first-order upwind discretization of the advection part in our combined approach to the advection– diffusion problem (1.1), we make use of a van Leer limited, higher-order upwind discretization of the advective flux. This is an important improvement over the simple upwinding but it makes the calculation process slower by up to a factor of two on the same grid. Therefore, the advection convergence test with half-cut cells was also run for two different velocities with the van Leer limiter function replaced by L(r) = 0, leading to the first-order upwind discretization of the advection term, to show its effect. The results are shown in figure 5b. It can be seen that there is a great improvement in accuracy when using the discretization with van Leer limiter: convergence faster than first order and much lower errors are observed. It is therefore well worth spending the additional computational effort to compute the van Leer limited advection discretization as otherwise with firstorder upwinding very fine grids would be required to obtain equally accurate results but these would take much longer to compute.

4. Three example cases This section contains examples that demonstrate the added value of different aspects of the approach presented in this paper. The example of a fluid carrying a dye demonstrates the influence of geometrical approximations on the computed results. The second example demonstrates how the use of unsmooth geometries might induce corner singularities that could adversely influence the model’s predictions. Finally, the added value of the approach in this study on the design of optimal vessel geometries for ultracentrifuge experiments is shown. Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1636

J. M. A. Ashbourn et al. (a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

( j)

Figure 6. Advection–diffusion in a rotating annulus using a square geometry approximation in (a–e), and a close-to-circular geometry in (f –j). (a) t = 0 min; (b) t = 2.5 min; (c) t = 5 min; (d) t = 7.5 min; (e) t = 10 min; (f ) t = 0 min; (g) t = 2.5 min; (h) t = 5 min; (i) t = 7.5 min; and (j) t = 10 min.

(a) Fluid rotating in an annulus (i) Problem This example illustrates how approximating the geometry of a situation can greatly affect the results. We firstly consider a shallow circular annulus that is rotating slowly so that a viscous liquid contained within it will rotate with constant angular velocity. If a dye is then added to the liquid at a particular time, it will diffuse through the liquid while also being carried round with an advection term owing to the motion of the liquid that it is suspended in. Obviously, this situation could be simplified by changing frames but we remain in our current frame for the purpose of demonstration, as in more complicated cases that approach may not be possible. Here, we consider two possible geometries Ω ⊂ R2 : firstly, Ω is obtained by approximating the annulus by a square structure and secondly, as favoured in the cut-cell approach of this paper, using cut cells to approximate the circular shape of the annulus. In both cases, we use no-flux boundary conditions on the boundary of Ω.

(ii) Results Figure 6 contains the results for both the square (top row) and the cut-cell (bottom row) geometry for an annulus of outer radius L and inner radius 0.25L, rotating at 0.1 r.p.m. anticlockwise and containing a dye with diffusion constant 0.01L2 min−1 . In both cases, square grid cells with x = y = 0.02L were used. The initial conditions are given by      −θ + π/6 θ + π/6 + erf , (x, y) ∈ Ω, q(x, y, 0) = q0 (θ (x, y)) = 0.5 erf 0.2 0.2 where θ(x, y) is the angle of (x, y) measured round the annulus. They are shown in the left column of figure 6 and represent the situation that the dye (dark colour) is slightly diffused in the viscous fluid (light colour) already. It can clearly Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1637

Simulation of advection–diffusion (a) 4 3 2

(b)

(c)

4

4 3

1

Figure 7. Geometry and domain of the fracture callus: (a) cross-section of a generic geometric model of a semi-stabilized murine tibia fracture (1, needle; 2, marrow cavity; 3, cortical bone and 4, fracture callus); (b) the physical domain Ω is only a quarter of the callus for symmetry reasons and (c) Geris et al. (2006) use a further simplified Ω in simulations.

be seen that these give very different results. In the square approximation, the dye is pushed out radially as it rounds the edges of the inner square creating the more concentrated area near the outer edge. Also, dye diffuses out into the corners of the larger square and hence the total amount of dye within the actual annulus appears to decrease over time. This is obviously not physical as it violates mass conservation.

(b) Bone fracture healing in mice (i) Problem The process of bone fracture healing is a complicated one involving many types of cells and biological material. Several different models have been created for this process, normally in the form of a set of differential equations with chemical reaction terms, diffusion terms and advection (taxis, active transport) terms. A typical fracture is characterized by the formation of a callus. This is a loose tissue type that is formed from the blood clot that emerges after fracture and contains most of the cells and factors that are needed for a successful fracture repair. It is within this callus that all the reactions, diffusion and active transport occur. In previous computer simulations of bone fracture healing, this volume was constructed crudely from rectangular sections as shown in figure 7c (see Geris et al. 2006). The method described in this paper is able to more accurately model the geometry of the situation (figure 7b). For this example, the model equations established by Bailón-Plaza & van der Meulen (2001) are applied to simulate the healing process of a semi-stabilized murine tibia fracture in an axisymmetric callus geometry (cf. Gerisch & Geris 2007). We refer to Geris et al. (2006) for more details, initial and boundary conditions and parameter values. In this model, the form of the active transport (taxis) velocity of variable qj is uj = ∇g, where g is a linear combination of the other variables qi , i = j. To approximate ∇g on the edge of a cell, exactly the same formulation as that used to determine ∇q for the diffusive flux is used. As indicated above, we consider here two different geometries for the callus, one of Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1638

J. M. A. Ashbourn et al.

(a) (i)

(ii)

(iii)

(iv)

(v)

(b) (i)

(ii)

(iii)

(iv)

(v)

Figure 8. Selected simulation results for the bone fracture healing model in the simplified geometry (a) as shown in figure 7c and in the more realistic geometry (b) as shown in figure 7b. The plots show the bone matrix density (white = 0 g ml−1 , black = 0.1 g ml−1 ) at different time points. (a) (i) t = 4 days; (ii) t = 8 days; (iii) t = 10 days; (iv) t = 14 days; (v) t = 20 days and (b) (i) t = 4 days; (ii) t = 8 days; (iii) t = 10 days; (iv) t = 14 days; (v) t = 20 days.

which is very similar to that of Geris et al. (2006) (figure 7c) and in the other one, the curved callus boundary is approximated more realistically using cut cells (figure 7b).

(ii) Results Figure 8 shows the time evolution of the density of bone extracellular matrix for the two different callus geometries. (A similar figure but giving the stem cell density is provide in the electronic supplementary material.) It can be seen that the results are very similar thus justifying the approach of Geris et al. (2006). Slight differences are seen in the total healing time, which can be attributed mainly to the difference in the modelled callus volume. The more realistic geometric model (figure 7b), of the fracture callus allows for an improved incorporation of mechanical loading in the mathematical model. Typically, mechanical stimuli such as tissue stresses are involved in the determination of cell fates and in the production of tissues and growth factors by these cells. Incorrect calculations of these mechanical stimuli will lead to incorrect predictions of the biological events by the mathematical model. Using geometries with re-entrant corners may result in singularities in the calculations of these mechanical stimuli and furthermore, the global mechanical behaviour of a structure depends on its actual shape. The presence of additional mass in certain places will enhance the overall stiffness of the structure. With the cutcell approach, the number of re-entrant corners in the physical domain can be reduced (see the two domains in figure 7b,c considered here). Figure 9 shows the intermediate principal strain at time t = 0 for both geometries under normal Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1639

Simulation of advection–diffusion (a)

(b) 3%

1%

–1% Figure 9. Images showing the intermediate principal strain in the callus at t = 0 for the two different geometries shown in figure 7b,c. (a) Rectangular approach and (b) cut-cell approach.

loading conditions. The calculated differences, both owing to corner singularities (arrow) and differences in the structure’s global stiffness, run up to 200 per cent, which would result in significant differences in the predicted regeneration process.

(c) Different geometries in an ultracentrifuge (i) Problem The ultracentrifuge is a centrifuge optimized for spinning a rotor at very high speeds and capable of generating acceleration as high as 1 000 000g (9800 km s−2 ). In an analytical ultracentrifuge, a sample being spun can be monitored in real time through an optical detection system to observe the evolution of the sample concentration versus the axis of rotation profile as a result of the applied centrifugal field. These observations are electronically digitized and stored for further mathematical analysis. The kinds of information that can be obtained from an analytical ultracentrifuge include the gross shape of macromolecules, the conformational changes in macromolecules and size distributions of macromolecular samples. Svedberg & Fåhraeus (1926) provided one of the initial estimates of the molecular weight of haemoglobin using the sedimentation rate and more recently this value has been used to determine the size of proteins in solution (see Selivanova et al. 2003). In this example, we consider whether different geometries of the centrifuge tube could lead to more accurate results in studies of the type mentioned above. Spinning in a centrifuge creates a high, outward, artificial gravitational field. Any suspended particles are therefore accelerated outwards by this field but quickly reach their terminal velocity owing to the drag of the solution. The Mason–Weaver equation ∂q ∂q = D∇ 2 q + sg ∂t ∂z describes the time evolution of the process of build-up of suspension towards the bottom of the tube. It is clear that this is advection–diffusion equation (1.1) with a diffusion constant D and a velocity field u = (0, 0, −sg)T , where g is the Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1640

J. M. A. Ashbourn et al. (a)

(b) 1.70 1.60

3h 1 cm

3h

1.00 0.80

0h

0h 3h

3h

1 cm

1.20

2 cm

1.40 3 cm

concentration (mM)

3 cm

1 cm

0.60 0 7 14 21 28 35 distance from surface (mm)

0 7 14 21 28 35 distance from surface (mm)

Figure 10. The cross-sections of the two centrifuge tube geometries A and B, used in this example, are shown in (a) and (b). The middle plots show the central concentrations in the centrifuge at half-hourly intervals (as indicated in the plots) for the two geometries. A clear influence of the tube geometry on the concentration profiles becomes visible.

gravitational field and s is the sedimentation coefficient. In the simulations, we take D = 1.94 × 10−9 m2 s−1 and s = 2.6 × 10−13 s (roughly equivalent to a low concentration solution of haemoglobin—for high concentrations the variation of D with concentration becomes important). Using a centrifuge that produces a gravitational field of 81 000g enables the comparison of the results that would be expected from two different three-dimensional axisymmetric geometries of centrifuge tube. Geometry A is simply a cylinder of radius 0.5 cm and length 3 cm. Geometry B is a cylinder of length 2 cm and radius 0.5 cm with a cone of height 1 cm and a base of radius 0.5 cm on the end. The cross-sections of both are shown in the outermost plots of figure 10. Owing to the symmetries of these shapes only half of the cross-section needs to be considered. These tubes have large radii in comparison to their length so that the gravitational field g is constant across them. For the computational grid, we use grid widths x = y = 1/20 cm.

(ii) Results The middle plots of figure 10 show the central concentration variation at half-hourly intervals for the first 3 h for an initially uniformly distributed concentration, q(x, y, 0) = 1. There are slight differences between the two different geometries. Using an ultracentrifuge for a suspension with a known diffusion constant D, the experimental data can be fitted to the results of the simulation to find a value of the sedimentation coefficient s. As different geometries generate different concentration profiles, it is important to accurately capture the geometry of the centrifuge tube in order to make correct predictions of the sedimentation coefficient. A simple method of determining the sedimentation coefficient s is to measure the absorption coefficient and then to fit this to the results of a numerical simulation. If the suspension is optically thin then the absorption coefficient is proportional to the integral across the tube diameter of the concentration q. To determine the sensitivity of this method, the simulation can be run with a slightly different value of the sedimentation coefficient, s2 := 1.01s1 , then observing the difference in the integrated concentration q. Figure 11 shows this difference for Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1641

Simulation of advection–diffusion

change in integrated concentration (2 × 105 mM cm)

1075.09 806.32 537.54 268.77 0 –268.77 –537.54 –587.27

0

5

10 15 20 25 30 distance from surface (mm)

35

Figure 11. The difference in the integrated central concentration for a change in sedimentation coefficient of 1% after 3 h is shown. Circle, geometry A; cross, geometry B.

the geometries A and B. The integral of the absolute value of this difference for geometry B is greater than that for geometry A, hence the error in an experiment using geometry B will be smaller. By carrying out these simulations for a variety of geometries prior to the actual experiment, the centrifuge tube geometry can be designed so that the experimental results will be most accurate.

5. Conclusion In this paper, a method of numerically solving the advection–diffusion equation in two-dimensional and three-dimensional axisymmetric space has been developed. An approach using rectangular grid cells that may be cut by a single straight line was used to deal with curved boundaries (cut-cell approach). There are three main advantages of this approach: more accurate results can be obtained, the possibility of singularities being obtained in the calculation of, for example, mechanical variables resulting from geometries with re-entrant corners is minimized and different experimental methods can be simulated to find those that will give the most accurate results. Examples of all of these have been given in the cases of fluid rotating in an annulus, bone fracture healing in mice, and the determination of the sedimentation coefficient in a centrifuge. These suitably demonstrated the usefulness of this approach. Computation of this algorithm was also reasonably quick with the most complicated example being the bone fracture healing that involved seven coupled variables being completed in only a few hours on a standard Pentium 4 processor. We have presented a cut-cell approach within an MOL framework. One of our main motivations for this is that this framework allows us to use high-order timestepping schemes (in our case ROWMAP, order 4), which employ temporal error estimation to adjust the time-step size automatically and which can consequently be expected to work efficiently towards the user-defined temporal accuracy goal. In comparison, fractional-step methods employed for diffusion–reaction problems, Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

1642

J. M. A. Ashbourn et al.

e.g. Calhoun & LeVeque (2000), are at most accurate to second order in time and hence with ROWMAP as a time integration scheme, we can expect a more efficient solution process for higher accuracy demands (and sufficiently smooth problems). We note that the software created for the simulations in this work was conceived in a generic way. This allows the possibility of future extensions of the code to include locally refined grids and to go from two-dimensional to three-dimensional space. The authors would like to acknowledge the valuable and constructive comments from the referees. J.M.A.A., L.G., A.G. and C.J.S.Y. would like to thank the Nuffield Foundation for the award of an Undergraduate Research Bursary (Grant Ref: URB/35427) that supported this research. L.G. is a post-doctoral research fellow of the Research Foundation, Flanders (FWO Vlaanderen).

References Bailón-Plaza, A. & van der Meulen, M. C. H. 2001 A mathematical framework to study the effects of growth factor influences on fracture healing. J. Theor. Biol. 212, 191–209. (doi:10.1006/ jtbi.2001.2372) Berger, M. & LeVeque, R. J. 1989 An adaptive Cartesian mesh algorithm for the Euler equations in arbitrary geometries. In Proc. 9th AIAA Computational Fluid Dynamics Conf., Buffalo, NY, 13–15 June 1989. AIAA paper AIAA-89-1930. Berger, M. J., Helzel, C. & LeVeque, R. J. 2003 h-Box methods for the approximation of hyperbolic conservation laws on irregular grids. SIAM J. Numer. Anal. 41, 893–918. (doi:10.1137/ S0036142902405394) Calhoun, D. & LeVeque, R. J. 2000 A Cartesian grid finite-volume method for the advection– diffusion equation in irregular geometries. J. Comput. Phys. 157, 143–180. (doi:10.1006/ jcph.1999.6369) Calhoun, D. A., Helzel, C. & LeVeque, R. J. 2008 Logically rectangular grids and finite volume methods for PDEs in circular and spherical domains. SIAM Rev. 50, 723–752. (doi:10.1137/ 060664094) Colella, P., Graves, D. T., Keen, B. J. & Modiano, D. 2006 A Cartesian grid embedded boundary method for hyperbolic conservation laws. J. Comput. Phys. 211, 347–366. (doi:10.1016/ j.jcp.2005.05.026) Geris, L., Gerisch, A., Maes, C., Carmeliet, G., Weiner, R., Vander Sloten, J. & Van Oosterwyck, H. 2006 Mathematical modeling of fracture healing in mice: comparison between experimental data and numerical simulation results. Med. Biol. Eng. Comput. 44, 280–289. (doi:10.1007/s11517-006-0040-6) Gerisch, A. 2001 Numerical methods for the simulation of taxis–diffusion–reaction systems. PhD thesis, Martin–Luther Universität, Halle–Wittenberg, Germany. Gerisch, A. & Chaplain, M. A. J. 2006 Robust numerical methods for taxis–diffusion– reaction systems: applications to biomedical problems. Math. Comput. Model. 43, 49–75. (doi:10.1016/j.mcm.2004.05.016) Gerisch, A. & Geris, L. 2007 A finite volume spatial discretisation for taxis–diffusion–reaction systems with axi-symmetry: application to fracture healing. In Mathematical modeling of biological systems (eds A. Deutsch, L. Brusch, H. Byrne, G. de Vries & H. Herzel), pp. 299–311. Boston, MA: Birkhäuser. (doi:10.1007/978-0-8176-4558-8_27) Hundsdorfer, W. & Verwer, J. G. 2003 Numerical solution of time-dependent advection-diffusionreaction equations. Springer Series in Computational Mathematics, no. 33. Berlin, Germany: Springer. Johansen, H. & Colella, P. 1998 A Cartesian grid embedded boundary method for Poisson’s equation on irregular domains. J. Comput. Phys. 147, 60–85. (doi:10.1006/jcph.1998.5965) Proc. R. Soc. A (2010)

Downloaded from rspa.royalsocietypublishing.org on March 12, 2014

Simulation of advection–diffusion

1643

LeVeque, R. J. 2002 Finite volume methods for hyperbolic problems. Cambridge, UK: Cambridge University Press. McCorquodale, P., Colella, P. & Johansen, H. 2001 A Cartesian grid embedded boundary method for the heat equation on irregular domains. J. Comput. Phys. 173, 620–635. (doi:10.1006/ jcph.2001.6900) Schwartz, P., Barad, M., Colella, P. & Ligocki, T. 2006 A Cartesian grid embedded boundary method for the heat equation and Poisson’s equation in three dimensions. J. Comput. Phys. 211, 531–550. (doi:10.1016/j.jcp.2005.06.010) Selivanova, O. M., Shiryaev, V. M., Tiktopulo, E. I., Potekhin, S. A. & Spirin, A. S. 2003 Compact globular structure of Thermus thermophilus ribosomal protein S1 in solution: sedimentation and calorimetric study. J. Biol. Chem. 278, 36 311–36 314. Svedberg, T. & Fåhraeus, R. 1926 A new method for the determination of the molecular weight of the proteins. J. Am. Chem. Soc. 48, 430–438. (doi:10.1021/ja01413a019) van Leer, B. 1974 Towards the ultimate conservative difference scheme. II. Monotonicity and conservation combined in a second-order scheme. J. Comput. Phys. 14, 361–370. (doi:10.1016/ 0021-9991(74)90019-9) Wedan, B. & South, J. C. 1983 A method for solving the transonic full-potential equation for general configurations. In Proc. 6th AIAA Computational Fluid Dynamics Conf., Danvers, MA, July 1983. AIAA paper 83-1889. Weiner, R., Schmitt, B. A. & Podhaisky, H. 1997 ROWMAP—a ROW-code with Krylov techniques for large stiff ODEs. Appl. Numer. Math. 25, 303–319. (doi:10.1016/S0168-9274(97)00067-6)

Proc. R. Soc. A (2010)

Suggest Documents