원시데이터 수집 시스템
선정목록으로

Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries

관련 모빌리티 소재 · (2) 샤무드(인공피혁)

기본 정보

저자
  1. Joar Bagge — Department of Mathematics/Linné Flow Centre/Swedish e‐Science Research Centre KTH Royal Institute of Technology Stockholm Sweden
  2. Anna-Karin Tornberg — Department of Mathematics/Linné Flow Centre/Swedish e‐Science Research Centre KTH Royal Institute of Technology Stockholm Sweden
DOI
10.1002/fld.4970
저널
International Journal for Numerical Methods in Fluids
발행년도
2021
발행기관
Wiley
피인용수
9
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1002/fld.4970
토픽
Electrostatics and Colloid Interactions
OpenAlex ID
W3028753860

평가 내용

관련도
관련
사업분야
모빌리티 소재 · (2) 샤무드(인공피혁)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '모빌리티 소재 > 샤무드(인공피혁)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Abstract Boundary integral methods are highly suited for problems with complicated geometries, but require special quadrature methods to accurately compute the singular and nearly singular layer potentials that appear in them. This article presents a boundary integral method that can be used to study the motion of rigid particles in three‐dimensional periodic Stokes flow with confining walls. A centerpiece of our method is the highly accurate special quadrature method, which is based on a combination of upsampled quadrature and quadrature by expansion, accelerated using a precomputation scheme. The method is demonstrated for rodlike and spheroidal particles, with the confining geometry given by a pipe or a pair of flat walls. A parameter selection strategy for the special quadrature method is presented and tested. Periodic interactions are computed using the spectral Ewald fast summation method, which allows our method to run in time for n grid points in the primary cell, assuming the number of geometrical objects grows while the grid point concentration is kept fixed.

본문 202,885자

본문 펼치기
HIGHLY ACCURATE SPECIAL QUADRATURE METHODS FOR STOKESIAN PARTICLE SUSPENSIONS IN CONFINED GEOMETRIES JOAR BAGGE <sup>∗</sup> AND ANNA-KARIN TORNBERG <sup>∗</sup> _Department of Mathematics, Linné Flow Centre/Swedish e-Science Research Centre,_ _KTH Royal Institute of Technology, 100 44 Stockholm, Sweden_ Abstract. Boundary integral methods are highly suited for problems with complicated geometries, but require special quadrature methods to accurately compute the singular and nearly singular layer potentials that appear in them. This paper presents a boundary integral method that can be used to study the motion of rigid particles in three-dimensional periodic Stokes flow with confining walls. A centrepiece of our method is the highly accurate special quadrature method, which is based on a combination of upsampled quadrature and quadrature by expansion (QBX), accelerated using a precomputation scheme. The method is demonstrated for rodlike and spheroidal particles, with the confining geometry given by a pipe or a pair of flat walls. A parameter selection strategy for the special quadrature method is presented and tested. Periodic interactions are computed using the Spectral Ewald (SE) fast summation method, which allows our method to run in _O_ ( _n_ log _n_ ) time for _n_ grid points, assuming the number of geometrical objects grows while the grid point concentration is kept fixed. _Keywords:_ Stokes flow, rigid particle suspensions, boundary integral equations, quadrature by expansion, fast Ewald summation, streamline computation. 1. Introduction Microhydrodynamics is the study of fluid flow at low Reynolds numbers, also known as Stokes flow or creeping flow. Applications are found in biology, for example in the swimming of microorganisms [20] and in blood flow [34], as well as in the field of microfluidics, which concerns the design and construction of miniaturized fluid devices [51]. Suspensions of rigid particles in Stokes flow are important both in various applications and in fundamental fluid mechanics [46, 16, 36, 19]. In this paper, we describe a boundary integral method that can be used to study the motion of rigid particles of different shapes in Stokes flow. The particle suspension may also be confined in a container geometry, such as a pipe or a pair of flat walls. The flow in the fluid domain (i.e. within the container but outside the particles) is governed by the _Stokes equations_, which for an incompressible Newtonian fluid take the form ∇ _p_ - _µ_ ∇ <sup>2</sup> _u_ = _f_, (1) ∇· _u_ = 0. (2) Here, _p_ is the pressure, _u_ is the flow velocity, _f_ is the body force per unit volume and _µ_ is the viscosity of the fluid. The Stokes equations arise as a linearization of the Navier–Stokes equations in the case where fluid inertia can be neglected, i.e. when the Reynolds number is much less than 1. On the surfaces of the particles and walls, no-slip boundary conditions are prescribed. A problem of physical interest is the _resistance_ _problem_ : given the velocities of all particles, compute the forces and torques (caused by viscous resistance) acting on them by the fluid. The inverse problem is called the _mobility problem_ : given the forces and torques acting on all particles by the fluid, compute the particle velocities. The mobility problem is useful in the case of noninertial particles, since then the net force on each particle must be zero, so any external forces (such as gravity) must be balanced by viscous forces from the fluid; given external forces and torques, one can then compute the motion of the particles. Since the governing equations (1)–(2) are linear, boundary integral methods can be used to solve them. In these methods, the flow is expressed in terms of layer potentials, which are integrals over the boundary of the fluid domain (i.e. over the container walls and particle surfaces). This reduces the dimensionality of the problem from three to two, and leads to a smaller linear system compared to methods that must discretize the whole volume (such as the finite difference or finite element methods). It it also easy to move the particles, since no remeshing is needed. For a detailed discussion on the properties of boundary integral methods, we refer to the books by Pozrikidis [42], Atkinson [1] and Kress [30]. Of special importance are Fredholm integral equations of the second kind, which when discretized, for example using the Nyström method [1, ch. 4][30, sec. 12.2], are known to remain well-conditioned as the system size increases [1, p. 113][30, p. 282]. ∗ _E-mail addresses:_ [joarb@kth.se (J. Bagge), akto@kth.se (A.-K. Tornberg).](mailto:joarb@kth.se) 2 _J. Bagge and A.-K. Tornberg_ The linear system resulting from the discretization of a boundary integral equation is dense, and thus naive Gaussian elimination would require _O_ ( _N_ <sup>3</sup> ) operations to solve a system of _N_ unknowns. Using an iterative solution method such as the generalized minimal residual method (GMRES) [47], the complexity is reduced to _O_ ( _N_ <sup>2</sup> ) since the condition number and thus the number of iterations are independent of the system size (but may depend on the geometry). For a large system, this complexity is still prohibitive. This can be overcome by using a fast summation method such as the fast multipole method (FMM) [17, 18] or a fast Ewald summation method [13, 32, 27], which reduce the complexity further to _O_ ( _N_ ) or _O_ ( _N_ log _N_ ), respectively. One of the challenges of boundary integral methods is the need for accurate special quadrature methods for singular and nearly singular integrands. These are necessary when evaluating the layer potentials at a point on the boundary (where the integral kernel is singular) or close to the boundary (where the kernel is nearly singular, i.e. hard to resolve using a quadrature rule designed for smooth integrands). Such special quadrature methods are the main focus of this paper. _1.1. Overview of related work_ In two dimensions, there are excellent special quadrature methods available, such as the one introduced by Helsing and Ojala [21], which has been adapted to simulations of clean [37] and surfactant-covered [39] drops in Stokes flow, as well as vesicles [4]. However, this method is based on a complex variable formulation and not easy to generalize to three dimensions. In three dimensions, the development of an accurate and efficient special quadrature method is still an active research problem, especially in the nearly singular case. For an overview of methods that have been used, we refer to [29, sec. 1] and [45, sec. 1]. One of the most promising methods which is still under development is _quadrature_ _by expansion_ (QBX), first introduced by Klöckner et al. [29] and Barnett [3] and applied to the Helmholtz equation in two dimensions. This method is based on the observation that the layer potentials are smooth all the way up to the boundary, and can therefore be locally expanded around a point away from the boundary. The expansions can be evaluated at a point closer to the boundary, or even on the boundary itself. The convergence theory of QBX was developed in [14], while [26] analyzed the error from the underlying quadrature rule used to compute the expansion coefficients. A strength of QBX is that it separates source points and target points; the source points enter only in the computation of the expansion coefficients, which can then be used to evaluate the layer potential in all target points within a ball of convergence. QBX has been applied to spheroidal particles in three-dimensional Stokes flow by af Klinteberg and Tornberg [25], using a geometry-specific precomputation scheme to accelerate the computation of the coefficients. A different approach that has been taken to accelerate QBX is to couple it to a customized FMM, which has been done in two dimensions [43, 44, 58] and more recently in three dimensions [59, 60]. This coupling is a natural step to take since the FMM uses expansions of the same kind as QBX, but it requires nontrivial modifications to the FMM. The resulting method has complexity _O_ ( _N_ ) and works for any smooth geometry. The work published so far has been for the Laplace and Helmholtz equations, but it is likely to be extended to more kernels, including the ones needed for Stokes flow. The QBX-FMM methods above all use _global_ QBX, in which _all_ source points are included in forming the local expansion. An alternative is _local_ QBX, in which only source points that are close to the expansion centre are included. Yet another variant is found in [25], where all source points on a single particle is used when forming expansions close to that particle; we call this variant _particle-global_ . Local QBX is typically combined with a patchbased discretization of the geometry. While it reduces the cost of the method, it also poses a challenge since the local layer potential from a single patch may not be as smooth as the global layer potential from the whole geometry (or a whole particle). Different versions of local QBX have been described in two dimensions [3, 43] and three dimensions [49]. The latter paper also uses target-specific expansions, which need only _O_ ( _p_ ) terms to obtain the same accuracy as a QBX expansion based on spherical harmonics with _O_ ( _p_ <sup>2</sup> ) terms. However, they sacrifice the separation of source and target that is otherwise present in QBX. This separation is in principle necessary in the QBX-FMM methods, but also in these methods can target-specific expansions be used to lower the computational cost of the method [60]. Some of the recent work have focused on automating the parameter selection based on a given error tolerance, resulting in the _adaptive_ QBX method [28]. The results have so far not been generalized to three dimensions. There has also been work on a kernel-independent version of QBX, called _quadrature by kernel-independent expansion_ (QBKIX) [45] and meant to be combined with the kernel-independent FMM. The published work is in two dimensions, but a generalization to three dimensions is expected to follow. Other methods, which are not based on QBX, have also been used successfully as special quadrature methods in three dimensions. One example is the “line interpolation method” introduced by Ying et al. [57]. In this method, a line is constructed through the target point, which is close to the boundary, and its projection onto the boundary. The layer potential is evaluated at points further away from the boundary along this line, and also at the projection _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 3 point where the line intersects the boundary if a separate singular integration method is available. The value at the target point is then computed using interpolation along the line (or extrapolation if no singular integration method is available). Like QBX, the success of this method hinges on the fact that they layer potential is smooth in the domain, so that it can be well interpolated (or extrapolated). It has been applied to surfactant-covered drops [50] and vesicles [35] in three-dimensional Stokes flow. The extrapolatory method used in [34] falls into the same category. Other types of methods are based on regularizing the kernel and adding corrections [5, 53, 6, 54], density interpolation techniques [40], coordinate rotations and a subtraction method [10], asymptotic approximations [11], analytical expressions available only for spheres [12] or floating partitions of unity [9, 61, 23]. Many of these methods are target-specific, and their cost grows rapidly if there are many nearly singular target points. _1.2. Scope of this paper_ In this paper, we present a boundary integral method based on the Stokes double layer potential, which can be used to solve the mobility and resistance problems for a system of rigid particles in incompressible three-dimensional Stokes flow, possibly confined within a container geometry. Our formulation leads to a Fredholm integral equation of the second kind. We use QBX for singular integration, and a combination of QBX and upsampled quadrature for nearly singular integration. Our QBX implementation is based on the work by af Klinteberg and Tornberg [25], which we have extended to rodlike particles, plane walls and pipes (using particle-global QBX for the particles and local QBX for the two wall geometries). A precomputation scheme is used to greatly accelerate the QBX computations for all geometries. For this precomputation scheme to be feasible, we require that each particle or wall is rigid and has some degree of symmetry, such as axisymmetry or reflective symmetry. Nonetheless, we have chosen this route since the implementation is relatively simple compared to e.g. a QBX-FMM method. When container walls are present, we restrict ourselves to periodicity in all three spatial directions and use a fast Ewald summation method called the Spectral Ewald method [31, 23, 24] to accelerate computations. <sup>1</sup> In this situation our method scales as _O_ ( _N_ log _N_ ) in the number of unknowns _N_, assuming fixed grid point concentration. The container geometry is restricted to a periodic straight pipe or a pair of periodic plane walls. Our contributions include: - The combined special quadrature method based on QBX and upsampling, which we have implemented for spheroidal and rodlike particles, plane walls and pipes. (The QBX implementation for spheroids is reused from [25]. Our initial work on QBX for plane walls is published in the conference proceedings [2].) - A strategy for experimentally selecting the parameters of the special quadrature method to meet a given error tolerance. We also demonstrate that the boundary integral method in full meets the given error tolerance and scales as _O_ ( _N_ log _N_ ). - Construction of fully smooth rodlike particles. We demonstrate the effect of smoothness on the convergence of the local expansions in this particular case. - Derivation of a stresslet identity for an infinite pipe and a pair of infinite plane walls. This is used as an exact solution to test the special quadrature method. - An outline of how streamlines can be efficiently computed for periodic problems using the Spectral Ewald method, by reusing data. (This idea was used, but not explicitly described, in [25].) - The so-called completion sources that appear in our formulation are distributed along the axis of symmetry of rodlike particles, and we have studied how the number of completion sources influences the accuracy. _1.3. Organization of the paper_ In section 2, we introduce the mathematical formulation of the problem, including the boundary integral formulation and the boundary integral equations for the resistance and mobility problems. In section 3, we describe the discretization of the geometry and the quadrature method, including the combined special quadrature. The details on our QBX method are then given in section 4, including the precomputation scheme. In section 5, we describe how periodicity is treated and how the special quadrature is combined with the Spectral Ewald method. Then, in section 6, our parameter selection strategy for the special quadrature is described and demonstrated. Numerical results are given in section 7, to demonstrate the accuracy and scaling of our method. Finally, in section 8, we demonstrate <u>1</u> The implementation of the Spectral Ewald method that we use is publicly available at [33]. 4 _J. Bagge and A.-K. Tornberg_ the effect of nonsmooth geometries on the convergence. The appendices include a derivation of the stresslet identity for plane walls and pipes, details on the construction of the smooth rodlike particles, and a note on streamline computation. 2. Mathematical formulation We consider two different kinds of problems: free-space problems and fully periodic problems. In a _free-space prob-_ _lem_, _M_ particles (spheroids or rods) are located in a fluid extending to infinity. We denote the fluid domain by Ω and its boundary, i.e. the union of all particle surfaces, by Γ. The Stokes equations (1)–(2) with _f_ = 0 hold in Ω, while no-slip boundary conditions are imposed on Γ. The unit normal vector _n_ of Γ is defined to point into the fluid domain Ω, as shown in Figure 1 (a). _풏_ Γ Ω (a) Free-space problem (b) Fully periodic problem _풏_ _풏_ Ω _풏_ Γ Figure 1. The geometry for (a) a free-space problem, and (b) a fully periodic problem. In (b), the primary cell is marked with a darker outline than the other cells. The geometry is shown only in the primary cell. The lattice of periodic cells fills the whole space; only a small part is shown here. A _fully periodic problem_, on the other hand, is periodic in all three spatial directions. The _primary cell_ is a box with side lengths _B_ = ( _B_ 1, _B_ 2, _B_ 3), which is considered to be replicated periodically in all three spatial directions, as illustrated by Figure 1 (b). Let the number of particles in the primary cell be _M_ . In this case we also allow a container consisting either of a pair of plane walls or a pipe. Only the geometry inside the primary cell is discretized, which means that Γ consists of the union of the _M_ particle surfaces and the parts of the wall surfaces that lie in the primary cell. <sup>2</sup> The fluid domain Ω lies within the container but outside the particles; the flow is thus external to the particles, but internal to the surrounding walls. The unit normal vector _n_ of Γ is always defined to point into Ω. Below, we introduce our boundary integral formulation in the free-space setting, or for the primary cell without periodicity. Full treatment of the periodic problem is deferred to section 5. _2.1. Boundary integral formulation_ Any flow field _u_ that satisfies the Stokes equations (1)–(2) with _f_ = 0 can be expressed in terms of integrals over the boundary of the fluid domain Ω, as described for example by Pozrikidis [42, ch. 4] and Kim and Karrila [22, ch. 14–16]. The boundary integral formulation that we use is based on the _Stokes double layer potential_ D, which in <u>2</u> For a single infinitely large plane wall, the method of images can be used [8, 15, 52], which has the advantage that the wall itself does not need to be discretized. However, that method does not work when there are more than one wall, or when the wall is curved, which are the cases we consider here. Therefore we must discretize the walls. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 5 free space is given by <sup>3</sup> _Tijk_ ( _x_ - _y_ ) _qj_ ( _y_ ) _nk_ ( _y_ ) d _S_ ( _y_ ), _Tijk_ ( _r_ ) = −6 <sup>_rirjrk_</sup> | _r_ | <sup>~~5~~</sup> (3) <sup>_rjrk_</sup> | _r_ | <sup>~~5~~</sup> <sup>.</sup> D _i_ [Γ, _q_ ]( _x_ ) = ∫ Γ Here, Γ and _n_ are as in Figure 1, and the _double_ _layer_ _density_ _q_ is a continuous vector field defined on Γ. The tensor kernel _T_ in (3) is known as the _stresslet_ . The potential D has a jump discontinuity as _x_ passes over Γ. More specifically, for _x_ ∈ Γ it holds that [42, p. 110] _ε_ lim→0 <sup>+</sup> <sup>D</sup> <sup>[Γ,</sup> <sup>_q_</sup> <sup>](</sup> <sup>_x_</sup> <sup>±</sup> <sup>_εn_</sup> <sup>) =</sup> <sup>D</sup> <sup>[Γ,</sup> <sup>_q_</sup> <sup>](</sup> <sup>_x_</sup> <sup>) ∓</sup> <sup>4</sup> <sup>_πq_</sup> <sup>(</sup> <sup>_x_</sup> <sup>).</sup> (4) For any closed Lyapunov surface Γ <sup>˜</sup> ⊆ Γ and any constant vector _q_ ˜, the _stresslet identity_ [42, p. 28] 0, if _x_ is outside the domain enclosed by Γ <sup>˜</sup>, 4 _π_ ˜ _q_, if _x_ ∈ Γ <sup>˜</sup>, 8 _π_ ˜ _q_, if _x_ is inside the domain enclosed by Γ <sup>˜</sup>, D [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) =   (5) holds. We will use this identity as a test case for the special quadrature method in sections 6 and 7.1. In appendix A we show that a variant of (5) holds also for the wall geometries that we consider, despite them not being closed surfaces. The double layer potential _u_ ( _x_ ) = D [Γ, _q_ ]( _x_ ) is a solution to (1)–(2) in Ω for any continuous vector field _q_ . However, not every solution to (1)–(2) can be represented by a double layer potential alone; for instance, as noted in [41][42, p. 119], the force and torque exerted on any particle by the flow from a double layer potential will always be zero, whereas a Stokes flow in general can exert a nonzero force and torque on the particles (which is a central point of the resistance and mobility problems mentioned in section 1). This is related to the presence of a nontrivial nullspace of the operator _q_ �→ D [Γ, _q_ ] for external flows, which can be immediately seen from the stresslet identity (5). To remove the nontrivial nullspace and allow for nonzero forces and torques on the particles, we add a _completion_ _flow_ V, first introduced by Power and Miranda [41]. The completion flow is also a solution to (1)–(2) and can be identified as the flow from a point force _F_ and a point torque _τ_ located at _y_ . It is given by <u>1</u> -, (6) V _i_ [ _F_, _τ_, _y_ ]( _x_ ) = <u>8</u> _πµ_ - _Sij_ ( _x_ - _y_ ) _Fj_ + _Rij_ ( _x_ - _y_ ) _τj_ _x_ ∈ Ω, where the _stokeslet S_ and the _rotlet R_ are given by <sup>4</sup> _Sij_ ( _r_ ) = <sup>_δ_</sup> | _r_ <sup>_ij_</sup> | <sup>_δ_</sup> | _r_ <sup>_ij_</sup> | <sup>+</sup> <sup>_r_</sup> | _r_ <sup>_ir_</sup> | <sup>~~3~~</sup> <sup>_j_</sup> and _Rij_ ( _r_ ) = _ϵijk_ <sup>_r_</sup> | _r_ <sup>_ir_</sup> | <sup>~~3~~</sup> <sup>_j_</sup> _<u>rk</u>_ (7) | _r_ | <sup>~~3~~</sup> <sup>,</sup> respectively. We call a pair ( _F_, _τ_ ) a _completion source_ . Such completion sources are placed in the interior of every particle. Mathematically, one completion source per particle is sufficient, but this may lead to numerical problems in some cases. In this paper, we allow for multiple completion sources to be distributed along a line segment within the particle; as we show in section 7.2.1, this is important for elongated particles. For the particle with index _α_, let c be the centre _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> and _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> be the net force and torque, respectively, exerted on the fluid by the particle, and let _y_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> c be the centre _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> and _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> be the net force and torque, respectively, exerted on the fluid by the particle, and let _y_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> of mass of the particle. (For a noninertial particle, _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> and _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> would be equal to the net external force and torque, respectively, acting on the particle.) The completion flow associated with particle _α_ is then given by <u>1</u> V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ ) = _N_ src _N_ src _s_ =1 c (8) V [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _y_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> + _C_ ( _s_, _N_ src) _a_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ ), where _N_ src is the number of completion sources per particle, V is given by (6), and _a_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> is a vector specifying the line segment along which completion sources are placed. The function _C_ is given by 0, if _N_ src = 1, (9) if _N_ src - 1. <sup>_<u>s</u>_</sup> <sup><u>−</u></sup> <sup><u>1</u></sup> _N_ src − <u>1</u> <sup>,</sup> _C_ ( _s_, _N_ src) =   −1 + 2 <sup>_<u>s</u>_</sup> <sup><u>−</u></sup> <sup><u>1</u></sup> _N_ src − <u>3The Einstein summation convention is used in this paper, meaning that indices appearing twice in the same term are to be summed over</u> the set {1, 2, 3}. The remaining free indices take values in the same set. 4Here, _δij_ denotes the Kronecker delta, and _ϵijk_ is the Levi-Civita symbol. 4Here, _δij_ denotes the Kronecker delta, and _ϵijk_ is the Levi-Civita symbol. 6 _J. Bagge and A.-K. Tornberg_ Both the double layer potential D and the completion flow V have the property that they decay to zero as _x_ →∞. To be able to represent flows which do not decay, we add a _background flow u_ bg, which is a known solution to (1)–(2) in the whole physical space, ignoring all particles and walls. The total flow _u_ in the presence of particles and walls is thus written as (10) _u_ ( _x_ ) = _u_ bg( _x_ ) + _u_ d( _x_ ), where _u_ d is a _disturbance flow_ which is responsible for enforcing the no-slip boundary conditions on the solid boundary Γ. As _x_ moves away from Γ, the disturbance flow _u_ d should decay to zero, and the total flow should therefore approach the background flow _u_ bg. The disturbance flow is written as _u_ d( _x_ ) = D [Γ, _q_ ]( _x_ ) + _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ ), (11) where V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> is as in (8), and the double layer density _q_ must be determined through the boundary conditions. Note that _u_ d as given by (11) decays as _x_ →∞, and by the superposition principle it satisfies (1)–(2). Also note that completion sources are placed inside the particles since the flow is external to the particles, but not inside the walls since the flow is internal to the walls (for details we refer to [42, sec. 4.5]). On the other hand, the double layer density _q_ is defined on the surfaces of both the particles and walls. The formulation (11) is complete, meaning that any flow which satisfies (1)–(2) and decays as _x_ →∞ can be represented in this way. To derive the fundamental boundary integral equation, which is used to determine the double layer density _q_ in (11), we insert (11) into (10) and then let _x_ ∈ Ω approach the solid boundary Γ. Enforcing no-slip boundary conditions on Γ yields, recalling the jump condition (4), _u_ ( _x_ ) = _u_ bg( _x_ ) + D [Γ, _q_ ]( _x_ ) − 4 _πq_ ( _x_ ) + _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ ) = _U_ Γ( _x_ ), _x_ ∈ Γ. (12) The presence of the term −4 _πq_ ( _x_ ), which is due to the jump condition, makes the boundary integral equation (12) a Fredholm integral equation of the second kind. The right-hand side _U_ Γ is the pointwise velocity of the boundary Γ. We assume the walls to be stationary and the particles to move as rigid bodies. This means that, if we let Γw be the union of all wall surfaces and Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> the surface of particle _α_, _U_ Γ( _x_ ) = �0, _x_ ∈ Γw, _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>+ Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>× (</sup> <sup>_x_</sup> <sup>−</sup> <sup>_y_</sup> c <sup>(</sup> <sup>_α_</sup> <sup>)),</sup> _x_ ∈ Γp <sup>(</sup> <sup>_α_</sup> RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>+ Ω(</sup> <sup>_α_</sup> <sup>)</sup> <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>× (</sup> <sup>_x_</sup> <sup>−</sup> <sup>_y_</sup> c <sup>(</sup> <sup>_α_</sup> <sup>)</sup> c <sup>(</sup> <sup>_α_</sup> <sup>)),</sup> _x_ ∈ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> w, (13) p <sup>(</sup> <sup>_α_</sup> <sup>),</sup> where _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> where _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>are</sup> <sup>the</sup> <sup>translational</sup> <sup>and</sup> <sup>angular</sup> <sup>velocity,</sup> <sup>respectively,</sup> <sup>of</sup> <sup>particle</sup> <sup>_α_</sup> <sup>(with</sup> <sup>RBM</sup> <sup>denoting</sup> rigid body motion). As mentioned in section 1, the viscous resistance that the particles experience from the fluid is related to their velocities. In the _resistance problem_, the velocities (i.e. _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>for each particle) are specified in (12)–(13),</sup> RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> velocities. In the _resistance problem_, the velocities (i.e. _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>for each particle) are specified in (12)–(13),</sup> while in the _mobility problem_, the viscous forces and torques (i.e. _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> and _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> for each particle) are specified [42, p. 129]. The boundary integral equations resulting from these two problems are described in more detail below. In both cases, the resulting integral equation is discretized using the Nyström method, as described in section 3. RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> _2.1.1. The resistance problem_ In this case, the velocities _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>of</sup> <sup>all</sup> <sup>particles</sup> <sup>are</sup> <sup>known,</sup> <sup>while</sup> <sup>the</sup> <sup>corresponding</sup> <sup>forces</sup> <sup>_F_</sup> <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> torques _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> are to be computed. Following [42, p. 130], the forces and torques are related to the unknown double layer density _q_ by stipulating In this case, the velocities _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> ∫ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ( _y_ - _y_ <sup>(</sup> c <sup>_α_</sup> <sup>)) ×</sup> <sup>_q_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> _y_ <sup>.</sup> (14) _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ] = ∫ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> _q_ ( _y_ ) d _Sy_ and _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ] = These relations are inserted into (12), which can then be rearranged as D [Γ, _q_ ]( _x_ ) − 4 _πq_ ( _x_ ) + _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ], _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ]]( _x_ ) = _U_ Γ( _x_ ) − _u_ bg( _x_ ), _x_ ∈ Γ. (15) After solving this integral equation for _q_, the forces and torques can be computed using (14), and the flow field can then be computed using (10)–(11). _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 7 _2.1.2. The mobility problem_ In this case, the force _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> and torque _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> exerted on the fluid by each particle (which for a noninertial particle are equal to the net external force and torque acting on the particle) are known, but not the particle velocities _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> equal to the net external force and torque acting on the particle) are known, but not the particle velocities _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> Ω <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>. Following [42, p. 135], the velocities are related to the double layer density</sup> <sup>_q_</sup> <sup>by</sup> <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>. Following [42, p. 135], the velocities are related to the double layer density</sup> <sup>_q_</sup> <sup>by</sup> <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>[</sup> <sup>_q_</sup> <sup>] = −</sup> <sup><u>4</u></sup> <sup>_<u>π</u>_</sup> p |Γ <sup>(</sup> <sup>_α_</sup> _q_ ( _y_ ) d _Sy_, (16) _U_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> p |Γ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> | p <sup>(</sup> <sup>_α_</sup> <sup>)</sup> | ∫ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> 3 _n_ =1 Γp <sup>(</sup> Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> Ω <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>[</sup> <sup>_q_</sup> <sup>] = −4</sup> <sup>_π_</sup> <sup>(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>[</sup> <sup>_q_</sup> <sup>] = −4</sup> <sup>_π_</sup> _<u>ωn</u>_ <sup><u>(</u></sup> <sup>_α_</sup> <sup><u>)</u></sup> _A_ <sup>(</sup> _n_ <sup>_α_</sup> <sup>)</sup> _n_ _ωn_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> . (17) ( _y_ - _y_ <sup>(</sup> c <sup>_α_</sup> <sup>)) ×</sup> <sup>_q_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> _y_ ∫ _n_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> - Γ p Here, |Γ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> p p <sup>(</sup> <sup>_α_</sup> <sup>)</sup> | is the surface area of Γ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> p, and <sup>(</sup> <sup>_α_</sup> <sup>)</sup> 2 ��� d _Sy_, (18) _A_ <sup>(</sup> _n_ <sup>_α_</sup> <sup>)</sup> = ∫ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> _n_ ��� _ω_ ( _α_ ) × ( _y_ - _y_ <sup>(</sup> c <sup>_α_</sup> <sup>)</sup> <sup>(</sup> c <sup>_α_</sup> <sup>))</sup> while _ωn_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> are three linearly independent unit vectors which must satisfy <u>1</u> ~~<u>�</u>~~ _A_ <sup>(</sup> _m_ <sup>_α_</sup> <sup>)</sup> _n_ - _ωm_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>(</sup> c <sup>_α_</sup> <sup>))</sup> <sup>(</sup> c <sup>_α_</sup> <sup>))</sup> - - _ωn_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> - d _Sy_ = _δmn_, _m_, _n_ = 1, 2, 3. (19) _n_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> × ( _y_ - _y_ <sup>(</sup> c <sup>_α_</sup> <sup>)</sup> <sup>(</sup> _m_ <sup>_α_</sup> <sup>)</sup> <sup>_A_</sup> <sup>(</sup> _n_ <sup>_α_</sup> <sup>)</sup> ∫ Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> _m_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>× (</sup> <sup>_y_</sup> <sup>−</sup> <sup>_y_</sup> <sup>(</sup> c <sup>_α_</sup> <sup>)</sup> The boundary integral equation (12) can then be rearranged as D [Γ, _q_ ]( _x_ ) − 4 _πq_ ( _x_ ) − _U_ Γ[ _q_ ]( _x_ ) = − _u_ bg( _x_ ) − _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ ), _x_ ∈ Γ, (20) where _U_ Γ[ _q_ ] is given by (13) but with _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> After solving (20) for _q_, where _U_ Γ[ _q_ ] is given by (13) but with _U_ RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> <sup>replaced</sup> <sup>by</sup> <sup>the</sup> <sup>expressions</sup> <sup>in</sup> <sup>(16)</sup> <sup>and</sup> <sup>(17),</sup> <sup>respectively.</sup> After solving (20) for _q_, the velocities can be computed using (16)–(17), and the flow field can be computed using (10)–(11). RBM <sup>(</sup> <sup>_α_</sup> <sup>)</sup> <sup>and</sup> <sup>Ω(</sup> RBM <sup>_α_</sup> <sup>)</sup> 3. Discretization and quadrature In order to solve the boundary integral equation (15) associated with the resistance problem, or the boundary integral equation (20) associated with the mobility problem, the integral operators in these equations must be discretized. This amounts to discretizing the double layer potential D, as well as the integrals occurring in relation (14) for the resistance problem, or relation (16)–(17) for the mobility problem. Following [25], we introduce the notation I[ _f_ ] = ∫ Γ _f_ ( _y_ ) d _S_ ( _y_ ) (21) for the integral of the arbitrary function _f_ over the surface Γ. We introduce a quadrature rule _QN_ called the _direct_ _quadrature rule_, defined by a set of _N_ nodes _x_ _i_ ∈ Γ and weights _wi_ ∈ R, _i_ = 1, . . ., _N_ . The details of this quadrature rule is specified in sections 3.1 and 3.2. Using the direct quadrature rule _QN_, the integral in (21) can be approximated as I[ _f_ ] ≈ _QN_ [ _f_ ] = _N_ _i_ =1 (22) _f_ ( _x_ _i_ ) _wi_ . We denote an integral quantity approximated by _QN_ with a superscript _h_, for example the double layer potential _i_ <sup>_h_</sup> <sup>[Γ,</sup> <sup>_q_</sup> <sup>](</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_QN_</sup> <sup>[</sup> <sup>_Tijk_</sup> <sup>(</sup> <sup>_x_</sup> <sup>−·)</sup> <sup>_qj_</sup> <sup>(·)</sup> <sup>_nk_</sup> <sup>(·)].</sup> (23) D _i_ <sup>_h_</sup> We then discretize (15) or (20) using the _Nyström method_ [1, ch. 4][30, sec. 12.2], in which the integral equation is enforced in the quadrature nodes. For the resistance problem, (15) then becomes _M_ D <sup>_h_</sup> [Γ, _q_ ]( _x_ _i_ ) − 4 _πq_ ( _x_ _i_ ) + _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>),</sup> <sup>_h_</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ], _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _q_ ]]( _x_ _i_ ) = _U_ Γ( _x_ _i_ ) − _u_ bg( _x_ _i_ ), _i_ = 1, . . ., _N_ . (24) 8 _J. Bagge and A.-K. Tornberg_ For the mobility problem, (20) becomes D <sup>_h_</sup> [Γ, _q_ ]( _x_ _i_ ) − 4 _πq_ ( _x_ _i_ ) − _U_ <sup>_h_</sup> Γ <sup>[</sup> <sup>_q_</sup> <sup>](</sup> <sup>_x_</sup> <sup>_i_</sup> <sup>) = −</sup> <sup>_u_</sup> <sup>bg(</sup> <sup>_x_</sup> <sup>_i_</sup> <sup>) −</sup> _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ _i_ ), _i_ = 1, . . ., _N_ . (25) The superscript _h_ on V <sup>(</sup> <sup>_α_</sup> <sup>),</sup> <sup>_h_</sup> in (24) and _U_ <sup>_h_</sup> Γ <sup>in</sup> <sup>(25)</sup> <sup>signifies</sup> <sup>that</sup> <sup>these</sup> <sup>quantities,</sup> <sup>while</sup> <sup>not</sup> <sup>integrals</sup> <sup>themselves,</sup> contain integrals – namely (14) or (16)–(17) – which are approximated using the direct quadrature rule _QN_ . In both cases, the resulting linear system is solved iteratively using the generalized minimal residual method (GMRES). In this paper, we consider two distinct types of geometrical objects, namely particles and walls, as indicated by Figure 2. Particles are mobile rigid bodies immersed in the fluid, while walls are stationary and surround the fluid domain. We consider two types of particles: spheroids, which are given by a surface <u>1</u> <sup>2</sup> <sup>+</sup> <sup>_x_</sup> <u>2</u> <sup>2</sup> + <sup>_x_</sup> <u>3</u> <sup>2</sup> _a_ <sup>~~2~~</sup> _c_ <sup>~~2~~</sup> _x_ <u>1</u> <sup>2</sup> <u>3</u> <sup>_x_</sup> _c_ <sup>~~2~~</sup> <sup>2</sup> <sup>= 1</sup> (26) in local coordinates; and rods, which consist of a cylinder with rounded caps, described in appendix B. We also consider two types of walls, namely plane walls and pipes with circular cross section. Both wall geometries extend to infinity in the periodic setting, but we discretize only the part of each object that lies inside the primary cell. Spheroid Rod (a) Particles Particle-global quadrature Plane wall Pipe (b) Walls Local patch-based quadrature Figure 2. The geometrical objects considered in this paper are (a) particles (spheroids and rods) and (b) walls (plane walls and pipes). The quadrature rule is different for particles and walls. The nature of the direct quadrature rule _QN_ is different for particles and walls: for particles, it is a particleglobal quadrature rule described in section 3.1, while for walls it is a local patch-based quadrature rule described in section 3.2. The special quadrature method for particles and walls is introduced in section 3.3. It should be noted that all geometrical objects shown in Figure 2 are smooth, i.e. of class _C_ <sup>∞</sup> . The construction of the smooth rod particles is described in appendix B. In section 8, we consider the effect that a nonsmooth object would have on the convergence of the special quadrature method. _3.1. Direct quadrature for particles_ The discretization and direct quadrature rule of the spheroids are exactly the same as in [25], while for the rods they are a slight variation of the former. Both kinds of particles are axisymmetric, and their parametrizations take this into account, with one parameter _φ_ ∈[0, 2 _π_ ) varying in the azimuthal direction and the other parameter _θ_ ∈[0, _π_ ] varying in the polar direction. For instance, the spheroid (26) is parametrized using spherical coordinates as   _x_ 1 = _a_ sin _θ_ cos _φ_, _x_ 2 = _a_ sin _θ_ sin _φ_, _x_ 3 = _c_ cos _θ_ . (27) _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 9 It is discretized using a tensorial grid with _nθ_ × _nφ_ grid points. For the polar [direction,](https://dlmf.nist.gov/3.5.v) let ( _θi_, _λ_ <sup>_θ_</sup> _i_ <sup>),</sup> <sup>_i_</sup> <sup>=</sup> <sup>1, . . .,</sup> <sup>_nθ_</sup> <sup>,</sup> be the nodes and weights of an _nθ_ [-point Gauss–Legendre quadrature rule [38, sec. 3.5(v)] on the interval [0,](https://dlmf.nist.gov/3.5.v) _π_ ]. For the azimuthal direction, let ( _φj_, _λ_ <sup>_φ_</sup> _j_ <sup>),</sup> <sup>_j_</sup> <sup>=</sup> <sup>1, . . .,</sup> <sup>_nφ_</sup> <sup>, be the nodes and weights of the trapezoidal rule on the interval</sup> It is discretized using a tensorial grid with _nθ_ × _nφ_ grid points. For the polar [direction,](https://dlmf.nist.gov/3.5.v) let ( _θi_, _λ_ <sup>_θ_</sup> _i_ the azimuthal direction, let ( _φj_, _λ_ <sup>_φ_</sup> _j_ <sup>),</sup> <sup>_j_</sup> <sup>=</sup> <sup>1, . . .,</sup> <sup>_nφ_</sup> <sup>, be the nodes and weights of the trapezoidal rule on the interval</sup> [0, 2 _π_ ). Since the integrand is periodic on this interval, the trapezoidal rule has spectral accuracy in this case [56]. The resulting tensorial quadrature rule, called the direct quadrature rule of the spheroid, is _nφ_ _j_ =1 <sup>_φ_</sup> _j_ <sup>,</sup> (28) _Qnθ nφ_ [ _f_ ] = _nθ_ _i_ =1 _f_ ( _x_ ( _θi_, _φj_ )) _W_ sph( _θi_, _φj_ ) _λ_ <sup>_θ_</sup> _i_ <sup>_θ_</sup> _i_ <sup>_λφ_</sup> _j_ where _W_ sph( _θ_, _φ_ ) is the area element associated with the parametrization (27). The rod consists of a cylinder with rounded caps. While the surface is smooth everywhere, the grid is divided into three parts as shown in Figure 3. The reason for this is to be able to increase the resolution at the caps independently of the resolution at the middle of the rod. <sup>5</sup> Figure 3. The grid on the rods consists of three parts: two caps and a middle cylinder. The rod is parametrized as   _x_ 1 = _ϱ_ ( _θ_ ; _L_, _R_ ) cos _φ_, _x_ 2 = _ϱ_ ( _θ_ ; _L_, _R_ ) sin _φ_, _x_ 3 = _β_ ( _θ_ ; _L_, _R_ ), (29) where _L_ is the length of the rod and _R_ its radius. The shape functions _ϱ_ (· ; _L_, _R_ ) : [0, _π_ ] →[0, _R_ ] and _β_ (· ; _L_, _R_ ) : [0, _π_ ] →[− ~~2~~ <sup><u>1</u></sup> <sup>_L_</sup> <sup>,</sup> <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>] are described in appendix B. They are chosen such that</sup> <sup>_θ_</sup> <sup>∈[0,</sup> <sup>_π_</sup> <sup>/3]</sup> <sup>=</sup> <sup>_I_</sup> <sup>1</sup> <sup>and</sup> <sup>_θ_</sup> <sup>∈[2</sup> <sup>_π_</sup> <sup>/3,</sup> <sup>_π_</sup> <sup>]</sup> <sup>=</sup> <sup>_I_</sup> <sup>3</sup> [0, _π_ ] →[− ~~2~~ <sup><u>1</u></sup> <sup>_L_</sup> <sup>,</sup> <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>] are described in appendix B. They are chosen such that</sup> <sup>_θ_</sup> <sup>∈[0,</sup> <sup>_π_</sup> <sup>/3]</sup> <sup>=</sup> <sup>_I_</sup> <sup>1</sup> <sup>and</sup> <sup>_θ_</sup> <sup>∈[2</sup> <sup>_π_</sup> <sup>/3,</sup> <sup>_π_</sup> <sup>]</sup> <sup>=</sup> <sup>_I_</sup> <sup>3</sup> correspond to the two caps, while _θ_ ∈[ _π_ /3, 2 _π_ /3] = _I_ 2 corresponds to the middle part. Each cap is discretized using _n_ 1 × _nφ_ grid points, and the middle cylinder is discretized using _n_ 2 × _nφ_ grid points, so the total grid has (2 _n_ 1 + _n_ 2)× _nφ_ grid points. The trapezoidal rule is again used in the azimuthal direction. In the polar direction, a separate Gauss– Legendre quadrature rule is used for each of the three parts. The tensorial direct quadrature rule of the rod is thus (with _n_ 3 = _n_ 1) _nφ_ _j_ =1 _i_ <sup>_k_</sup> <sup>,</sup> <sup>_φj_</sup> <sup>)</sup> <sup>_λk_</sup> _i_ <sup>_k_</sup> _i_ <sup>_λφ_</sup> _j_ <sup>_φ_</sup> _j_ <sup>,</sup> (30) _Q_ (2 _n_ 1+ _n_ 2) _nφ_ [ _f_ ] = 3 _k_ =1 _nk_ _i_ =1 _f_ ( _x_ ( _θi_ <sup>_k_</sup> _i_ <sup>_k_</sup> <sup>,</sup> <sup>_φj_</sup> <sup>))</sup> <sup>_W_</sup> <sup>rod(</sup> <sup>_θ_</sup> _i_ <sup>_k_</sup> where ( _θi_ <sup>_k_</sup> <sup>,</sup> <sup>_λk_</sup> _i_ <sup>),</sup> <sup>_i_</sup> <sup>= 1, . . .,</sup> <sup>_nk_</sup> <sup>, are the nodes and weights of an</sup> <sup>_nk_</sup> <sup>-point Gauss–Legendre quadrature on the interval</sup> _Ik_, and _W_ rod( _θ_, _φ_ ) is the area element associated with (29). The direct quadrature rules (28) and (30) are both particle-global in the sense that each particle is treated as a where ( _θi_ <sup>_k_</sup> _i_ <sup>_k_</sup> <sup>,</sup> <sup>_λk_</sup> _i_ The direct quadrature rules (28) and (30) are both particle-global in the sense that each particle is treated as a single unit, and the quadrature rule is applied to the particle as a whole. The quadrature rules has spectral accuracy for smooth integrands, i.e. it converges exponentially as the number of grid points increases. _3.2. Direct quadrature for walls_ The wall geometries are present only in the periodic setting, and then only the part inside the primary cell needs to be discretized. For the plane wall, this part consists of a flat rectangle of size _L_ 1 × _L_ 2, which is divided into _P_ 1 × _P_ 2 flat subrectangles, called patches. Each patch is discretized using a tensorial grid with _n_ 1 × _n_ 2 Gauss–Legendre grid points, as shown in Figure 4 (a). In each direction of the patch, an _nd_ -point Gauss–Legendre quadrature rule is used with nodes and weights ( _si_ <sup>_d_</sup> <sup>,</sup> <sup>_λd_</sup> _i_ <sup>),</sup> <sup>_i_</sup> <sup>= 1, . . .,</sup> <sup>_nd_</sup> <sup>,</sup> <sup>_d_</sup> <sup>= 1, 2. The resulting tensorial direct quadrature rule of the patch is</sup> <sup>_d_</sup> _i_ <sup>),</sup> <sup>_i_</sup> <sup>= 1, . . .,</sup> <sup>_nd_</sup> <sup>,</sup> <sup>_d_</sup> <sup>= 1, 2. The resulting tensorial direct quadrature rule of the patch is</sup> _i_ <sup>_d_</sup> <sup>,</sup> <sup>_λd_</sup> _i_ _n_ 2 _j_ =1 _j_ <sup>2))</sup> <sup>_W_</sup> <sup>wall(</sup> <sup>_s_</sup> _i_ <sup>1</sup> _i_ <sup>1,</sup> <sup>_s_</sup> _j_ <sup>2</sup> _j_ <sup>2)</sup> <sup>_λ_</sup> _i_ <sup>1</sup> _i_ <sup>1</sup> <sup>_λ_</sup> <sup>2</sup> _j_ <sup>,</sup> _Qn_ 1 _n_ 2 [ _f_ ] = _n_ 1 _i_ =1 _f_ ( _x_ ( _si_ <sup>1</sup> _i_ <sup>1,</sup> <sup>_s_</sup> _j_ <sup>2</sup> <sup>2</sup> _j_ <sup>,</sup> (31) where _W_ wall( _s_ <sup>1</sup>, _s_ <sup>2</sup> <u>) is the area element of the wall.</u> <u>5We also tested a discretization of the rod using a grid spanning the whole rod without dividing it into parts. We did not find any significant</u> improvement in the quadrature error or computational cost from using such a grid rather than the one shown in Figure 3. 10 _J. Bagge and A.-K. Tornberg_ (a) Plane wall (b) Pipe Figure 4. (a) A plane wall divided into 3 × 3 patches, each patch discretized using 6 × 4 grid points. (b) A pipe divided into 3 × 10 patches, each patch discretized using 4 × 3 grid points. The part of the pipe in the primary cell consists of a cylinder with radius _R_ c and length _L_ c. Like the plane wall, it is divided into rectangular patches, but these are curved, as seen in Figure 4 (b). Apart from that, the discretization and quadrature rule are the same as for the plane wall. The direct quadrature rule of the pipe is thus also given by (31), the only difference compared to the plane wall being the area element _W_ wall and the parametrization ( _s_ <sup>1</sup>, _s_ <sup>2</sup> ) �→ _x_ . The direct quadrature rule (31) is local in the sense that the wall is subdivided into smaller patches, and the quadrature rule is applied to each patch separately. The grid can be refined in two different ways: by adding more grid points to each patch (which we call _n_ -refinement), or by reducing the size of the patches and thus increasing their number (which we call _P_ -refinement). Under _n_ -refinement, the quadrature rule has spectral accuracy like the direct quadrature rule of the particles, while under _P_ -refinement the quadrature rule is polynomially accurate with order determined by _n_ 1 and _n_ 2. _3.3. Special quadrature: upsampled quadrature and quadrature by expansion (QBX)_ The double layer potential D given by (3) is challenging to compute using direct quadrature in two different situations, in both cases due to its kernel _T_ . Firstly, when the evaluation point _x_ is on Γ itself, _T_ becomes singular at the point _y_ = _x_ (we refer to this as the _singular case_ or the _onsurface evaluation case_ ). The integral exists as an improper integral as long as Γ is a Lyapunov surface [42, p. 37], but clearly a special quadrature method of some sort is needed to compute it. Secondly, when _x_ ∈ Ω is close to Γ, but not on Γ, _T_ becomes very peaked and thus hard to resolve using the direct quadrature rule (we refer to this as the _nearly singular case_ or the _offsurface evaluation case_ ). The singular case is always present when solving the boundary integral equation (12), while the nearly singular case occurs when particles are close to each other or close to a wall, and also if the flow field (10)–(11) is to be computed close to a particle or wall. The latter situation is illustrated in Figure 5 (a), where the error grows exponentially as the evaluation point _x_ approaches the boundary Γ. This behaviour is well-known, and in two dimensions there 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Direct quadrature error (b) Upsampled quadrature error, _κ_ = 2 Figure 5. Relative error in the centre plane when evaluating the stresslet identity (5) for two rod particles between a pair of parallel horizontal plane walls in a periodic setting, using the direct quadrature rule in (a) and the upsampled quadrature rule with upsampling factor _κ_ = 2 in (b). Note that the error is still large very close to the particles and walls in (b). The density _q_ is constant in this example, so the error in (a) and (b) comes entirely from the nearly singular behaviour of the stresslet _T_ . _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 11 are error estimates available for the Laplace and Helmholtz potentials in [26] and for the Stokes potential in [39]. To compute the double layer potential accurately close to a particle or wall, _special quadrature_ is needed. Here, we consider two types of special quadrature: upsampled quadrature and quadrature by expansion (QBX). Assuming that the density _q_ itself is well-resolved on the grid, _upsampled quadrature_ provides a partial solution for the nearly singular case. In upsampled quadrature, the double layer density _q_ is interpolated onto a grid refined by a factor _κ_ in both directions, and the integral is then evaluated using direct quadrature on the finer grid. For the particle-global quadrature rules in section 3.1, the grid of the whole particle is refined (increasing the number of grid points of each individual quadrature rule). The density is interpolated onto the finer grid using trigonometric interpolation in the azimuthal direction and barycentric Lagrange interpolation [7] in the polar direction. For the local patch-based quadrature rules in section 3.2, only the _N_ P patches closest to the evaluation point _x_ are refined, using _n_ -refinement (thus increasing the number of grid points on them); other patches are sufficiently far away from the singularity that direct quadrature can be used. This is illustrated in Figure 6 for _N_ P = 9. The refinement has spectral accuracy for both particles and walls. Since all geometrical objects are rigid, interpolation matrices can be precomputed. _푁_ P patches refined <u>×</u> Direct quadrature Figure 6. Upsampled quadrature for a plane wall: the _N_ P patches closest to the evaluation point (marked with ×) are refined, here for _N_ P = 9. The other patches are treated using direct quadrature without refinement. As Figure 5 (b) shows, upsampled quadrature pushes the region where the error is large closer to the boundary Γ. However, the error will always be large very close to Γ no matter how large the upsampling factor _κ_ is. To be able to achieve small errors arbitrarily close to Γ, we use a special quadrature rule specifically designed for layer potentials with singular kernels, namely _quadrature by expansion_ (QBX) [29, 3]. The idea behind QBX is to make a local series expansion of the potential D in the fluid domain, which converges rapidly since D is smooth all the way up to the boundary Γ. The expansion is made around a point _c_, called the _expansion centre_, which is inside the fluid domain (i.e. not on Γ), and it can be used to evaluate the potential inside a ball around _c_ called the _ball_ _of_ _convergence_, as shown in Figure 7. The expansion is valid even at the point where the ball touches Γ [14], and can therefore be used in the singular case as well as the nearly singular case. The application of QBX to the Stokes double layer potential D will be described in detail in section 4. _풄_ _풄_ (a) (b) Figure 7. The idea behind QBX is to make a series expansion of the potential close to a particle (a) or wall (b), valid inside a ball of convergence shown as a blue disc. The expansion is also valid at the point where the ball of convergence touches the boundary. In this paper, we use a _combined quadrature_ strategy, where direct quadrature is used far away from the boundary, upsampled quadrature is used in an intermediate region, and QBX is used in a small region closest to the boundary, as illustrated in Figure 8. For each particle and wall in the geometry, the evaluation point _x_ is classified into one of these three regions, and the contribution to the double layer potential D from that particle or wall is computed as follows: 12 _J. Bagge and A.-K. Tornberg_ - If _x_ is in the direct quadrature region, the double layer potential (3) is computed using direct quadrature (23) over the whole particle or wall, as described in sections 3.1 and 3.2. - If _x_ is in the upsampled quadrature region, the behaviour is different for particles and walls, as described above. For a particle, the density is upsampled globally on the whole particle surface and then integrated using direct quadrature on the fine grid. For a wall, the density is upsampled only on the _N_ P patches closest to the evaluation point, while direct quadrature without upsampling is used on the other patches (as in Figure 6). - If _x_ is in the QBX region, the behaviour is similar to the upsampled quadrature region. For a particle, the density on the whole particle surface is used when computing the coefficients of the local expansion which is then used at the evaluation point (particle-global QBX). For a wall, only the density on the _N_ P patches closest to the expansion centre _c_ is used to compute the expansion (local QBX), while the contribution from other patches is computed using direct quadrature. In other words, the expansion is computed using a truncated wall, with _N_ P determining the number of patches in the truncated wall. The difference between particle-global and local QBX is described in more detail in section 4.2. The total double layer potential at _x_ is then retrieved using superposition, i.e. by summing the contributions from all particles and walls. Direct quadrature Direct quadrature QBX Upsampled quadrature (a) Upsampled quadrature QBX (b) Figure 8. The regions of the combined quadrature strategy, shown here for a rod particle in (a) and a plane wall in (b). Depending on the location of the evaluation point _x_, it is treated using direct quadrature, upsampled quadrature or QBX. When using local QBX, the convergence rate of the local expansion will depend on the ratio between the distance from _c_ to the wall and the distance from _c_ to the edge of the truncated wall [49]. We have observed that _N_ P = 1 is too low for the wall QBX region in our case, since the expansion centre may then be too close to the edge of the truncated wall. Setting _N_ P = 9 seems to be sufficient to remedy this, and increasing _N_ P further has no effect. We therefore fix _N_ P = 9 both for the QBX region and the upsampled quadrature region of plane walls and pipes, for the rest of this paper. The distances from the surface at which to switch from one quadrature region to the next (i.e. direct quadrature, upsampled quadrature, QBX) are parameters to be set, and these will be discussed in section 6. 4. Quadrature by expansion for the Stokes double layer potential In order to apply QBX to the Stokes double layer potential D given by (3), we need to be able to write down a local expansion of the potential. We use the same approach as in [25], which is summarized in section 4.1. The differences between particles (for which particle-global QBX is used) and walls (for which local QBX is used) are summarized in section 4.2. Finally, the precomputation scheme which is crucial for accelerating the method is described in section 4.3. _4.1. Local expansion of the double layer potential_ Instead of expanding the double layer potential D itself directly, we use the fact that D can be expressed in terms of the so-called dipole potential L using the relation [55, 25] <u>∂</u> ∂ _xi_ - _δij_ D _i_ [Γ <sup>˜</sup>, _q_ ]( _x_ ) = _xj_ - L[Γ <sup>˜</sup>, _qjn_ + _njq_ ]( _x_ ) − ∂ <sup><u>∂</u></sup> _xi_ L[Γ <sup>˜</sup>, _ykqkn_ + _yknkq_ ]( _x_ ), (32) _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 13 where Γ <sup>˜</sup> is any subset of Γ. The dipole potential is the double layer potential of the Laplace equation and is defined as L[Γ <sup>˜</sup>, _ρ_ ]( _x_ ) = ∫ Γ˜ <u>1</u> | _x_ - _y_ | <sup>d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (33) _ρ_ ( _y_ ) · ∇ _y_ The kernel of the dipole potential has a natural expansion based on the so-called Laplace expansion <u>1</u> | _x_ - _y_ | <sup>=</sup> �∞ _l_ =0 <u>4</u> _<u>π</u>_ <u>2</u> _l_ + 1 - _l_ _m_ =− _l_ _x_ <sup>_l_</sup> <sup>_Y_</sup> _l_ <sup>−</sup> <sup>_m_</sup> _ry_ <sup>_l_</sup> <sup>+1</sup> _rx_ <sup>_l_</sup> _l_ <sup>−</sup> <sup>_m_</sup> ( _θx_, _φx_ ) _ry_ <sup>_l_</sup> <sup><u>1+</u></sup> _Y_ <sup>_m_</sup> (34) _l_ <sup>(</sup> <sup>_θy_</sup> <sup>,</sup> <sup>_φy_</sup> <sup>),</sup> where _Yl_ <sup>_m_</sup> is the spherical harmonics function of degree _l_ and order _m_ (defined as in [14, Eq. (3.5)]), while ( _rx_, _θx_, _φx_ ) and ( _ry_, _θy_, _φy_ ) are spherical coordinates of the points _x_ and _y_ respectively, with respect to a chosen expansion centre _c_, as shown in Figure 9. The expansion (34) is valid as long as _rx_ < _ry_, i.e., it can be used for all _x_ within the ball of radius _r_ QBX = min _y_ ∈Γ˜ _ry_ centred at _c_ . _푟푥_ _풄_ _푟_ QBX _풙_ _푟푦_ _풚_ Γ˜ Figure 9. Illustration of the points _x_, _y_ and _c_, and the ball of convergence of (34). Inserting (34) into (33) leads to the expansion L[Γ <sup>˜</sup>, _ρ_ ]( _x_ ) = �∞ - _l_ _l_ =0 _m_ =− _l_ _x_ <sup>_l_</sup> <sup>_Y_</sup> _l_ <sup>−</sup> <sup>_m_</sup> _rx_ <sup>_l_</sup> _l_ <sup>−</sup> <sup>_m_</sup> ( _θx_, _φx_ ) _zlm_ [ _ρ_ ] (35) of the dipole potential, where the coefficients _zlm_ [ _ρ_ ] are given by <u>4</u> _<u>π</u>_ _zlm_ [ _ρ_ ] = <u>2</u> _l_ + 1 ∫ Γ˜ _ρ_ ( _y_ ) · ∇ _y_ _l_ <sup>_m_</sup> <sup>(</sup> <sup>_θy_</sup> <sup>,</sup> <sup>_φy_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (36) <u>1</u> _ry_ <sup>_l_</sup> <sup>+1</sup> _Yl_ <sup>_m_</sup> <sup>(</sup> <sup>_θy_</sup> <sup>,</sup> <sup>_φy_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (36) These coefficients are complex-valued due to _Yl_ <sup>_m_</sup> <sup>,</sup> <sup>but the dipole potential</sup> <sup>L</sup> <sup>itself is real.</sup> <sup>Since the spherical har-</sup> monics functions satisfy _Yl_ <sup>−</sup> <sup>_m_</sup> = ( _Yl_ <sup>_m_</sup> <sup>)∗,</sup> <sup>the coefficients also satisfy</sup> <sup>_zl_</sup> <sup>,−</sup> <sup>_m_</sup> <sup>=</sup> <sup>(</sup> <sup>_zlm_</sup> <sup>)∗,</sup> <sup>where the asterisk denotes the</sup> These coefficients are complex-valued due to _Yl_ <sup>_m_</sup> monics functions satisfy _Yl_ <sup>−</sup> <sup>_m_</sup> = ( _Yl_ <sup>_m_</sup> <sup>)∗,</sup> <sup>the coefficients also satisfy</sup> <sup>_zl_</sup> <sup>,−</sup> <sup>_m_</sup> <sup>=</sup> <sup>(</sup> <sup>_zlm_</sup> <sup>)∗,</sup> <sup>where the asterisk denotes the</sup> complex conjugate. It is therefore enough to compute the coefficients for _m_ ≥ 0. The expansion (35) is in fact valid also at the point where the ball in Figure 9 touches Γ <sup>˜</sup> (where _rx_ = _r_ QBX), as established in [14]. This means that the expansion can be used both for offsurface evaluation (in the interior of the ball, where the double layer potential is nearly singular) as well as onsurface evaluation (at the point on Γ <sup>˜</sup> closest to _c_, where the double layer potential is singular). _l_ <sup>−</sup> <sup>_m_</sup> = ( _Yl_ <sup>_m_</sup> Relation (32) allows us to express D using four dipole potentials with densities _ρ_ <sup>(</sup> <sup>_j_</sup> <sup>)</sup> = _qjn_ + _njq_, _j_ = 1, 2, 3, _ρ_ <sup>(4)</sup> = _ykqkn_ + _yknkq_ . (37) Each of the four dipole potentials is expanded using (35), with coefficients given by (36), which together with (32) provides a local expansion of the Stokes double layer potential. In practice, the expansion (35) must be truncated, which is done at _l_ = _l_ max = _p_ QBX. This results in the approximation _p_ QBX _rx_ <sup>_l_</sup> L[Γ <sup>˜</sup>, _ρ_ <sup>(</sup> <sup>_j_</sup> <sup>)</sup> ]( _x_ ) ≈L <sup>QBX</sup> [Γ <sup>˜</sup>, _ρ_ <sup>(</sup> <sup>_j_</sup> <sup>)</sup> ]( _x_ ) = _l_ =0 _lm_ <sup>_h_</sup>, _j_ <sup>,</sup> _j_ = 1, 2, 3, 4. (38) _l_ <sup>−</sup> <sup>_m_</sup> ( _θx_, _φx_ ) _z_ <sup>_h_</sup> - _l_ _m_ =− _l_ _x_ <sup>_l_</sup> <sup>_Y_</sup> _l_ <sup>−</sup> <sup>_m_</sup> The coefficients _z_ <sup>_h_</sup> The coefficients _zlm_ <sup>_h_</sup>, _j_ <sup>=</sup> <sup>_z_</sup> _lm_ <sup>_h_</sup> <sup>[</sup> <sup>_ρ_</sup> <sup>(</sup> <sup>_j_</sup> <sup>)] are here computed using the upsampled quadrature rule introduced in section 3.3,</sup> with upsampling factor _κ_ = _κ_ QBX. Upsampling is needed since the integrand in (36) becomes quite peaked for large _lm_ <sup>_h_</sup>, _j_ <sup>=</sup> <sup>_zh_</sup> 14 _J. Bagge and A.-K. Tornberg_ _l_ . However, the cost of upsampling can be entirely hidden in a precomputation step, as explained in section 4.3. The number of coefficients that needs to be computed in (38) for each _j_ is , (39) _N_ QBX = <sup><u>(</u></sup> <sup>_p_</sup> <sup><u>QBX</u></sup> <sup>+ 1)(</sup> <u>2</u> <sup>_p_</sup> <sup><u>QBX</u></sup> <sup>+ 2)</sup> which takes into account that only coefficients with _m_ ≥ 0 need to be computed directly. If the expansion (35) is absolutely convergent, the terms must decay in magnitude as _l_ →∞. The size of the terms can be estimated using the bound , (40) ����� - _l_ _r_ <sup>_l_</sup> _x_ <sup>_l_</sup> <sup>_Y_</sup> _l_ <sup>−</sup> <sup>_m_</sup> - - _l_ _m_ =− _l_ | _zlm_ | <sup>2</sup> - 1/2 QBX ����� ≤ _r_ _l_ _l_ <sup>−</sup> <sup>_m_</sup> ( _θx_, _φx_ ) _zlm_ - <u>2</u> _<u>l</u>_ <u>+ 1</u> <u>4</u> _π_ _m_ =− _l_ where we have used the fact that [14, Eq. (3.36)] - _l_ _m_ =− _l_ <sup>_m_</sup> <u>4</u> _π_ _l_ <sup>(</sup> <sup>_θ_</sup> <sup>,</sup> <sup>_φ_</sup> <sup>)|2</sup> <sup>=</sup> <sup><u>2</u></sup> <sup>_<u>l</u>_</sup> <sup><u>+ 1</u></sup> | _Y_ <sup>_m_</sup> _l_ . (41) <u>4</u> _π_ <sup><u>+ 1</u></sup> For a single dipole expansion such as (38) with a fixed _j_, the bound (40) with _zlm_ = _z_ <sup>_h_</sup> For a single dipole expansion such as (38) with a fixed _j_, the bound (40) with _zlm_ = _zlm_ <sup>_h_</sup>, _j_ <sup>provides a way to estimate</sup> the decay of the terms and thus the truncation error of the truncated expansion. It is however not directly applicable to the Stokes double layer potential, which involves derivatives of dipole potentials as seen in (32). To estimate the truncation error for the Stokes double layer potential, we instead evaluate the error directly in the grid points, as explained in section 6.1.2. In summary, to compute D [Γ <sup>˜</sup>, _q_ ]( _x_ ) using QBX, the density _q_ is first upsampled to a finer grid with upsampling factor _κ_ QBX and then converted into four dipole densities using (37). From these, four sets of dipole coefficients _zlm_ <sup>_h_</sup>, _j_ are computed using the direct quadrature rule on the refined grid. The coefficients are used to evaluate the dipole potentials (38), from which the Stokes double layer potential D can be computed using (32). Note that the derivatives with respect to _x_ in (32) can be computed analytically. Since QBX can be used for both onsurface and offsurface evaluation, it is useful to introduce one expansion for each grid point. For each grid point _x_ _i_ on the boundary, an expansion centre _ci_ <sup>+</sup> <sup>is thus placed at a distance</sup> <sup>_r_</sup> <sup>QBX away</sup> each grid point. For each grid point _x_ _i_ on the boundary, an expansion centre _ci_ <sup>+</sup> <sup>is thus placed at a distance</sup> <sup>_r_</sup> <sup>QBX away</sup> from the boundary in the normal direction (i.e. in the fluid domain). This expansion centre can be used to evaluate the double layer potential in a ball touching that grid point. In practice the balls of convergence of neighbouring expansion centres will overlap, and for a given evaluation point the closest expansion centre is used to evaluate the QBX potential. For onsurface evaluation (but not offsurface evaluation), we also use a second expansion centre _ci_ <sup>−</sup> <sup>for each grid</sup> point, placed at a distance _r_ QBX away from the boundary in the _negative_ normal direction (i.e. outside the fluid domain), as shown by Figure 10. The reason for this is that it significantly improves the convergence when solving the boundary integral equation using GMRES, since the spectrum of the discrete operator better matches that of the continuous operator, as was noted in [29, 45, 25]. Note that due to the jump condition (4), the correct value of the potential on Γ <sup>˜</sup> is the average of the values from the two sides: For onsurface evaluation (but not offsurface evaluation), we also use a second expansion centre _ci_ <sup>−</sup> , (42) D [Γ <sup>˜</sup>, _q_ ]( _x_ _i_ ) = <sup>D</sup> <sup>+[Γ˜,</sup> <sup>_<u>q</u>_</sup> <sup><u>](</u></sup> <sup>_<u>x</u>_</sup> <sup>_<u>i</u>_</sup> <sup><u>) +</u></sup> <u>2</u> <sup>D</sup> <sup><u>−[Γ˜,</u></sup> <sup>_<u>q</u>_</sup> <sup><u>](</u></sup> <sup>_<u>x</u>_</sup> <sup>_<u>i</u>_</sup> <sup><u>)</u></sup> _ci_ <sup>+</sup> _r_ QBX _x_ _i_ _n_ Γ˜ _r_ QBX _ci_ <sup>−</sup> Figure 10. The two expansion centres _ci_ <sup>+</sup> _i_ <sup>+</sup> <sup>and</sup> <sup>_c_</sup> _i_ <sup>−</sup> _i_ <sup>−</sup> <sup>used for onsurface evaluation in a grid point</sup> <sup>_xi_</sup> <sup>.</sup> _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 15 where D <sup>+</sup> is the limit from the fluid domain and D <sup>−</sup> is the limit from the other side of Γ <sup>˜</sup> . While using two expansions may seem to double the computational cost, the extra cost appears only in the precomputation step, as described in section 4.3, and thus does not affect the cost of evaluation itself. There are two sources of error in the QBX approximation: the _truncation error_ due to the fact that the expansion in (38) is truncated at _l_ = _p_ QBX, and the _coefficient error_ (called the “quadrature error” in [14, 25, 26]) due to the fact that the coefficients (36) are computed using a quadrature rule with finite precision. These two errors are controlled by the following three QBX parameters: - The expansion radius _r_ QBX, which is the distance from the expansion centre to Γ <sup>˜</sup> and also the radius of the ball in which the expansion is valid. Increasing _r_ QBX makes the truncation error grow since the ball of convergence (and hence _rx_ ) becomes larger, but the coefficient error decreases since the integrand in (36) becomes easier to resolve as _ry_ becomes larger. - The expansion order _p_ QBX, which governs the number of terms to be included in the sum in (38). Increasing _p_ QBX makes the truncation error decrease since more terms are included, but the coefficient error grows since the integrand in (36) is harder to resolve for larger _l_ . - The upsampling factor _κ_ QBX, which governs the amount of grid refinement when computing the dipole coefficients (36). Increasing _κ_ QBX makes the coefficient error decrease since the resolution of the underlying quadrature rule increases. A simple way to decrease both the truncation error and coefficient error is to increase _p_ QBX and _κ_ QBX simultaneously while keeping _r_ QBX fixed. We will continue to discuss how the QBX parameters should be selected to achieve a small overall error in section 6. For a more in-depth analysis, we refer to [14] for the truncation error, [26] for the coefficient error, as well as the summary in [25, sec. 3.5]. _4.2. Global and local QBX_ As was mentioned in section 1.1, a QBX method can be either _(fully) global_, _particle-global_ or _local_, the difference being which part of the boundary (i.e. which source points) to include when forming the local expansion. Here we use particle-global QBX for particles and local QBX for walls. In essence, the difference between the three variants is what Γ <sup>˜</sup> in section 4.1 is taken to be: - For a fully global QBX method, all grid points on the whole boundary are used to form the local expansion, i.e. Γ <sup>˜</sup> = Γ. - For a particle-global QBX method, all grid points on a single particle are used to form the expansion, i.e. Γ˜ = Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, where Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> is the surface of the particle with index _α_ . - For a local QBX method, only the grid points which are close to the expansion centre are used to form the expansion. In our case, we choose Γ <sup>˜</sup> to be the _N_ P patches of the wall which are closest to the expansion centre, as shown in Figure 6. (The contribution from patches further away is not included in the expansion but computed using direct quadrature.) p <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, where Γp <sup>(</sup> <sup>_α_</sup> <sup>)</sup> p <sup>(</sup> <sup>_α_</sup> <sup>)</sup> is the surface of the particle with index _α_ . Note that Γ <sup>˜</sup> may depend on the location of the expansion centre to be used, which in turn depends on the evaluation point. In principle, it is sufficient to let Γ <sup>˜</sup> consist of the grid points close to the expansion centre (i.e. local QBX), since that is where the integrand becomes nearly singular; for grid points further away, direct quadrature can be used. The reason to extend Γ <sup>˜</sup> further is to improve the regularity of the layer potential that is being expanded, so that the expansion converges more rapidly. Indeed, in local QBX, the expanded layer potential consists of the contribution from a truncated part of the boundary, and may not be very smooth since Γ <sup>˜</sup> ends abruptly. However, the larger Γ <sup>˜</sup> is, the further away from the ball of convergence will the edge of Γ <sup>˜</sup> be, and the less will it affect the convergence of the expansion. We have observed that _N_ P = 9 is sufficient for Γ <sup>˜</sup> for the walls. In particle-global QBX, the expanded layer potential has the contribution from a whole particle, which consists of a closed and smooth surface, so the potential from it should be smooth. In a fully global QBX, the expanded layer potential is the global potential, which is smooth if Γ is regular enough. Unlike the particle-global QBX, the fully global QBX quickly becomes expensive unless a fast method (such as the FMM) is used to compute the far-field contribution. Therefore the fully global QBX variant is not used in this paper. An advantage of the local and particle-global QBX variants over the fully global QBX is that, if the individual particles and walls are rigid, Γ <sup>˜</sup> is the same (in local coordinates) for all particles or patches of the same shape, even if they have different orientations. This makes precomputation possible, which we shall return to in section 4.3. Another advantage is that expansion centres can be placed without regards to other particles or walls, since each 16 _J. Bagge and A.-K. Tornberg_ expansion contains only the contribution from a single particle or wall segment. In a fully global QBX method, each ball of convergence must be completely outside _all_ particles and walls, which would complicate the placement of the expansion centres. _4.3. Precomputation for QBX_ The mapping given by (37) and the discrete version of (36), which takes the double layer density _q_ on Γ <sup>˜</sup> and returns the dipole coefficients _zlm_ <sup>_h_</sup>, _j_ <sup>for a single expansion centre</sup> <sup>_ci_</sup> <sup>, is a linear function of</sup> <sup>_q_</sup> <sup>and can therefore be represented</sup> the dipole coefficients _zlm_ <sup>_h_</sup>, _j_ <sup>for a single expansion centre</sup> <sup>_ci_</sup> <sup>, is a linear function of</sup> <sup>_q_</sup> <sup>and can therefore be represented</sup> by a matrix _Mi_ . This matrix is of size 4 _N_ QBX × 3 _N_ <sup>˜</sup>, where _N_ QBX is given by (39) and _N_ <sup>˜</sup> is the number of grid points on Γ <sup>˜</sup> (before upsampling). There is one such matrix _Mi_ for every expansion centre, and it depends only on the geometry Γ <sup>˜</sup>, its discretization and the location of the expansion centre in the local coordinates of Γ <sup>˜</sup> . For a rigid geometry Γ <sup>˜</sup>, such as in our case, the matrix _Mi_ can therefore be precomputed and stored. Note that the upsampling factor _κ_ QBX is effectively “hidden” in this precomputation step: upsampling influences the computation of _Mi_ since _q_ is upsampled before being inserted into (37), but it has no effect on the size of _Mi_, which is set by the discretization of Γ <sup>˜</sup> prior to upsampling. Therefore, upsampling does not affect the computational complexity of the method once _Mi_ has been precomputed. The matrix _Mi_ which computes the coefficients _zlm_ <sup>_h_</sup>, _j_ <sup>is used for</sup> <sup>_offsurface_</sup> <sup>evaluation, when the evaluation point</sup> is not known beforehand; the coefficients can then be used to evaluate the expansion at any evaluation point within the ball of convergence. For _onsurface_ evaluation, i.e. evaluation at one of the grid points of the boundary, the evaluation point itself is known beforehand and precomputation can be taken even further. In fact, the mapping that takes the expansion coefficients to the value of the potential D [Γ <sup>˜</sup>, _q_ ]( _x_ _i_ ), given by (38) and (32), is also linear and can therefore be represented by a matrix _Si_ . This allows us to compute a matrix _Ri_ = _Si_ _Mi_ which maps the density _q_ on Γ <sup>˜</sup> directly to the value of the double layer potential D at one of the grid points – effectively representing a set of target-specific quadrature weights for every grid point. The matrix _Ri_ is of size 3 × 3 _N_ <sup>˜</sup> and there is one such matrix for each grid point _x_ _i_ on the boundary. Precomputing the _Ri_ matrix hides not only _κ_ QBX but also _p_ QBX. Since two expansion centres are used for onsurface evaluation, as the reader may recall from Figure 10, there are actually two _Ri_ matrices for each grid point: _Ri_ <sup>+</sup> <sup>and</sup> <sup>_R_</sup> _i_ <sup>−, associated with</sup> <sup>_c_</sup> _i_ <sup>+</sup> <sup>and</sup> <sup>_c_</sup> _i_ <sup>−, respectively. From (42), it is</sup> The matrix _Mi_ which computes the coefficients _z_ <sup>_h_</sup> _i_ <sup>+</sup> <sup>and</sup> <sup>_R_</sup> _i_ <sup>−</sup> _i_ <sup>+</sup> <sup>and</sup> <sup>_c_</sup> _i_ <sup>−</sup> are actually two _Ri_ matrices for each grid point: _Ri_ <sup>+</sup> <sup>and</sup> <sup>_R_</sup> _i_ <sup>−, associated with</sup> <sup>_c_</sup> _i_ <sup>+</sup> <sup>and</sup> <sup>_c_</sup> _i_ <sup>−, respectively. From (42), it is</sup> clear that these matrices can be combined as _i_ <sup>−, associated with</sup> <sup>_c_</sup> _i_ <sup>+</sup> _<u>i</u>_ <sup>+</sup> <sup>+</sup> <sup>_R_</sup> _<u>i</u>_ <sup><u>−</u></sup> _Ri_ = <sup>_R_</sup> _<u>i</u>_ <sup>+</sup> <sup>+</sup> <sup>_R_</sup> _<u>i</u>_ <sup><u>−</u></sup> (43) <u>2</u> to form a single matrix _Ri_ for each grid point. This way, the extra cost of using two expansions is completely hidden in the precomputation step. For the particles, the axisymmetry can be used to vastly reduce the amount of computations and storage needed to precompute the matrices _Mi_ and _Ri_ . In fact, due to reflective symmetry, it suffices to compute _Ri_ for the _nθ_ /2 grid points ( _n_ 1 + _n_ 2/2 grid points for rod particles) shown in Figure 11, and _Mi_ for the corresponding expansion centres. The matrices for all other grid points and their expansion centres are then calculated using rotations and reflections, as in [25]. Note that if several particles of the same shape appear in a simulation, the precomputation only needs to be done for one such particle. Figure 11. The matrices _Mi_ and _Ri_ need only be stored for the grid points along half a line of longitude, here indicated with red dots. For a wall geometry with uniform patch size, as in our case, the geometry has a discrete translational symmetry for offsets equal to the patch size, due to periodicity. This means that the geometry “looks” exactly the same seen from any patch of the wall, and it is therefore enough to precompute the _Mi_ and _Ri_ matrices for the _n_ 1 _n_ 2 grid points and corresponding expansion centres of a single patch of the wall. In this case Γ <sup>˜</sup> consists of that patch and its _N_ P − 1 closest neighbours, as indicated in Figure 6 for _N_ P = 9. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 17 5. Periodicity and fast methods Up to this point we have not taken periodicity into account in the description of the mathematical formulation and its discretization; it is now time to remedy this. We will here give the details of the periodic formulation indicated in Figure 1 (b), and in particular focus on how the special quadrature methods are combined with the fast summation method used for the periodic problem. Consider a primary cell with side lengths _B_ = ( _B_ 1, _B_ 2, _B_ 3) which is replicated periodically in all three spatial directions. The flow field is then periodic, i.e. _u_ ( _x_ ) = _u_ ( _x_ + _k_ - _B_ ) for any _k_ ∈ Z <sup>3</sup> . This changes the boundary integral formulation introduced in section 2.1 in the following way: The layer potential D and completion flow V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> which appear in the flow field (11) and in the fundamental boundary integral equation (12) are replaced by their periodic counterparts D <sup>3P</sup> and V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> . These are defined as infinite sums over the periodic lattice, i.e. D <sup>3P</sup> [Γ, _q_ ]( _x_ ) = _k_ ∈Z <sup>3</sup> _k_ ∈Z <sup>3</sup> D [Γ, _q_ ]( _x_ + _k_ - _B_ ), V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> [ _F_, _τ_ ]( _x_ ) = V <sup>(</sup> <sup>_α_</sup> <sup>)</sup> [ _F_, _τ_ ]( _x_ + _k_ - _B_ ). (44) These sums converge slowly, and their value depends on the order of summation, so they cannot be computed using direct summation. We compute them using the _Spectral Ewald (SE)_ method [31, 32], a fast Ewald summation method based on the fast Fourier transform (FFT). The SE method is described in detail for the stokeslet in [31], for the stresslet in [23] and for the rotlet in [24], and has been combined with QBX previously in [25]. In the SE method, each of the periodic sums in (44) is split into two parts: the _real-space part_, which decays fast and can therefore be summed directly in real space; and the _Fourier-space part_, which is smooth and therefore decays fast in Fourier space. No special treatment is needed for the completion flow V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> since the evaluation point is never close to the singular points (which are inside the particle), so the SE method as described in [31, 24] is used without modification. For the double layer potential D <sup>3P</sup>, special quadrature is needed so SE must be combined with QBX and the upsampled quadrature rule. How this is done is described below. The periodic sum for the double layer potential can be written explicitly as D _i_ <sup>3P[Γ,</sup> <sup>_q_</sup> <sup>](</sup> <sup>_x_</sup> <sup>) =</sup> D _i_ <sup>3P</sup> ∫ Γ _Tijl_ ( _x_ + _k_ - _B_ - _y_ ) _qj_ ( _y_ ) _nl_ ( _y_ ) d _S_ ( _y_ ). (45) The stresslet _T_ is split into two parts _Tijl_ ( _r_ ) = _Tijl_ <sup>R</sup> _k_ ∈Z <sup>3</sup> _ijl_ <sup>R</sup> <sup>(</sup> <sup>_r_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>) +</sup> <sup>_T_</sup> _ijl_ <sup>F</sup> _ijl_ <sup>F</sup> <sup>(</sup> <sup>_r_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>),</sup> (46) where _T_ <sup>R</sup> is the real-space part and _T_ <sup>F</sup> is the Fourier-space part. The Ewald parameter _ξ_ is a positive number which is used to balance the decay of _T_ <sup>R</sup> in real space and the decay of the Fourier coefficients of _T_ <sup>F</sup> (a larger value of _ξ_ makes the real-space part decay faster and the Fourier-space part decay slower, thus shifting computational work into Fourier space). In the split that we use, _T_ <sup>R</sup> is given by [23, 25] <sup>R</sup> _ijl_ <sup>(</sup> <sup>_r_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>) = −</sup> _r_ <sup><u>2</u></sup> <sup>~~4~~</sup> _T_ <sup>R</sup> _r_ <sup>~~4~~</sup> - _r_ <u>3</u> <sup>erfc(</sup> <sup>_ξr_</sup> <sup>) +</sup> ~~√~~ <sup><u>2</u></sup> <sup>_<u>ξ</u>_</sup> _<u>π</u>_ (3 + 2 _ξ_ <sup>2</sup> _r_ <sup>2</sup> - 4 _ξ_ <sup>4</sup> _r_ <sup>4</sup> )e <sup>−</sup> <sup>_ξ_</sup> <sup>2</sup> <sup>_r_</sup> <sup>2</sup> <sup>�</sup> _rirjrl_ + <sup><u>8</u></sup> <sup>_<u>ξ</u>_</sup> <sup>3</sup> ~~√~~ _<u>π</u>_ (2 − _ξ_ <sup>2</sup> _r_ <sup>2</sup> )e <sup>−</sup> <sup>_ξ_</sup> <sup>2</sup> <sup>_r_</sup> <sup>2</sup> ( _δijrl_ + _δjlri_ + _δlirj_ ), (47) where _r_ = | _r_ |. The Fourier-space part is simply given by _T_ <sup>F</sup> = _T_ - _T_ <sup>R</sup> . Inserting (46) into (45) splits the periodic double layer potential into two parts D <sup>3P</sup> = D <sup>3P,R</sup> + D <sup>3P,F</sup>, where _i_ D <sup>3P,R</sup> [Γ, _q_ ]( _x_ ; _ξ_ ) = _i_ D <sup>3P,R</sup> _Tijl_ <sup>R</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_y_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>),</sup> (48) _T_ <sup>R</sup> _i_ D <sup>3P,F</sup> [Γ, _q_ ]( _x_ ; _ξ_ ) = _i_ D <sup>3P,F</sup> _k_ ∈Z <sup>3</sup> _k_ ∈Z <sup>3</sup> ∫ Γ ∫ Γ _Tijl_ <sup>F</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_y_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (49) _T_ <sup>F</sup> The singularity of the stresslet is completely transferred to _T_ <sup>R</sup>, while _T_ <sup>F</sup> is nonsingular [25]. The Fourier-space part (49) is computed using FFTs as described in appendix D and [23]. The real-space potential (48) is evaluated in real space, and requires special quadrature due to the singularity of _T_ <sup>R</sup>, much as in the free-space setting. Note that since _T_ <sup>R</sup> ( _r_ ; _ξ_ ) decays fast as | _r_ | →∞ it can be neglected for | _r_ | - _r_ c, where _r_ c is called the _cutoff_ _radius_ . We can thus change the integration domain in (48) to Γ <sup>⋆</sup> = Γ <sup>⋆</sup> ( _x_, _k_ ; _r_ c) = { _y_ ∈ Γ : | _x_ + _k_ - _B_ - _y_ | ≤ _r_ c} and approximate _ijl_ <sup>R</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_y_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (50) _i_ D <sup>3P,R</sup> _i_ _i_ <sup>3P,R</sup> [Γ, _q_ ]( _x_ ; _ξ_ ) ≈D <sup>3P,R⋆</sup> _i_ <sup>3P,R⋆</sup> [Γ, _q_ ]( _x_ ; _ξ_ ) = _k_ ∈Z <sup>3</sup> ∫ Γ <sup>⋆</sup> <sup>_T_</sup> _ijl_ <sup>R</sup> 18 _J. Bagge and A.-K. Tornberg_ The error of this approximation is determined by the product _ξr_ c as described in [23]. Rather than deriving a new QBX expansion from scratch for the real-space part D <sup>3P,R⋆</sup>, we reuse the expansion of the total layer potential D from section 4. To be able to do this, we insert _T_ <sup>R</sup> = _T_ - _T_ <sup>F</sup> into (50) to get _i_ D <sup>3P,R⋆</sup> [Γ, _q_ ]( _x_ ; _ξ_ ) = _k_ ∈Z <sup>3</sup> ∫Γ <sup>⋆</sup> <sup>_Tijl_</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_y_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> (51) _ijl_ <sup>F</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_y_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_y_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_y_</sup> <sup>) d</sup> <sup>_S_</sup> <sup>(</sup> <sup>_y_</sup> <sup>).</sup> (52) ∫ Γ <sup>⋆</sup> <sup>_T_</sup> _ijl_ <sup>F</sup> _k_ ∈Z <sup>3</sup> Note that the integration domain Γ <sup>⋆</sup> ensures that both of these sums have few terms since _r_ c should be small typically smaller than the size of the periodic cell. The integral in (51) represents the total layer potential from Γ <sup>⋆</sup> and can thus be computed using the combined special quadrature method from section 3.3, with truncation at _r_ c. The integral in (52) is computed using direct quadrature, which is possible since _T_ <sup>F</sup> is nonsingular. As in the free-space setting in section 3.3, the evaluation point _x_ is classified into one of three regions (see Figure 8). The potential is evaluated using (50) in the direct quadrature region and (51)–(52) in the other two regions. The reader may wonder why we in the upsampled quadrature region do not simply evaluate (50) using upsampled quadrature. The reason is that (52) evaluated using the same quadrature method as in the Fourier-space part—i.e. direct quadrature—is needed to cancel discretization errors in the latter. <sup>6</sup> These discretization errors may be larger than the SE error tolerance and are caused by the fact that _T_ <sup>F</sup> ( _r_ ; _ξ_ ), while nonsingular, tends to become slightly peaked for small | _r_ |, i.e. close to Γ <sup>⋆</sup> . Cancellation prevents these errors from influencing the error of the full method. Another important point to note is that _r_ c must be chosen large enough so that no special quadrature is needed for the total potential when | _r_ | - _r_ c. This is because, for | _r_ | - _r_ c, the total potential is equal to the Fourier-space part, which is always computed using direct quadrature. Thus, _r_ c must be at least as large as the distance from Γ to the direct quadrature region. 6. Parameter selection In this section, we develop our strategy for selecting the parameters of the combined special quadrature, i.e. upsampled quadrature and QBX, when evaluating the Stokes double layer potential D . We assume that a discretization of the geometry is given, with sufficient resolution for the density to be well-resolved and the direct quadrature to achieve a given error tolerance _ε_ tol at a given distance (sufficiently far away) from all surfaces. The goal is to select quadrature parameters for each particle and wall so that the error tolerance _ε_ tol is achieved also in the upsampled quadrature region and QBX region. Of course, there are many different ways to choose the parameters, some resulting in higher computational efficiency than others. Here, we do not aim to optimize the efficiency; instead, our focus is on achieving the given error tolerance at an acceptable (albeit not optimal) computational cost. The parameters that must be selected are shown in Figure 12. Note that we allow for multiple upsampled quadrature regions with different upsampling factors _κ_ U _i_, in order to gradually increase the upsampling closer to the surface. Due to the precomputation scheme for QBX, using QBX may in fact be faster than using upsampled quadrature with the same upsampling factor. Therefore, the QBX region may extend further away from the surface than the expansion centre (i.e. _d_ QBX may be larger than _r_ QBX, but of course not larger than 2 _r_ QBX). The parameters to be selected are as follows: - The threshold distances _d_ U _i_ for the upsampled quadrature regions, _i_ = 1, 2, . . ., _N_ U, and the threshold distance _d_ QBX for the QBX region. These determine at what distance from the surface each region starts. If _d_ Γ( _x_ ) is the distance from the evaluation point _x_ to the surface Γ, then _x_ belongs to the _i_ th upsampled quadrature region if _d_ U _i_ ≥ _d_ Γ( _x_ ) ≥ - if _i_ < _N_ U _d_ U( _i_ + 1) (53) _d_ QBX if _i_ = _N_ U, and _x_ belongs to the QBX region if _d_ QBX ≥ _d_ Γ( _x_ ) ≥ 0. Each of these distances should be chosen so that the error does not exceed the tolerance in the region further away from the surface (for example, _d_ U1 is selected based on the direct quadrature error). <u>6</u> Due to the nonlocal nature of the Fourier transform, the Fourier-space part must be computed using the same quadrature method everywhere; here we use direct quadrature. Another possibility would be to use upsampled quadrature, but then upsampling would need to be done for _all_ evaluation points, not only those in the upsampled quadrature region. In that case one might want to remove the direct quadrature region altogether and use only upsampled quadrature and QBX. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 19 Direct quadrature QBX Upsampled quadrature Figure 12. Parameters of the combined special quadrature, here for a rod with _N_ U = 3 upsampled quadrature regions (each geometrical object has its own set of corresponding parameters). Note that while the ball of convergence for QBX can be larger than the QBX region, the expansion is used only inside the QBX region. - The upsampling factors _κ_ U _i_ for the upsampled quadrature regions, _i_ = 1, 2, . . ., _N_ U. These should be increasing, i.e. _κ_ U1 < _κ_ U2 < . . . < _κ_ U _N_ U . The upsampling factor _κ_ U _i_ determines the distance _d_ U( _i_ + 1) at which the next region must begin, which we will come back to in section 6.1. - The QBX upsampling factor _κ_ QBX, which controls the amount of upsampling used when computing the coefficients in (36), and thus the QBX coefficient error as mentioned in section 4.1. It should be chosen large enough so that the coefficient error and the truncation error are balanced. The upsampling factor influences the QBX precomputation time (which grows like _O_ ( _κ_ QBX <sup>2</sup> <sup>)),</sup> <sup>but</sup> <sup>not</sup> <sup>the</sup> <sup>size</sup> <sup>of</sup> <sup>the</sup> <sup>precomputed</sup> <sup>_Mi_</sup> <sup>and</sup> <sup>_Ri_</sup> <sup>matrices,</sup> and thus not the evaluation time. - The QBX expansion order _p_ QBX, which controls the number of terms included in the expansion in (38), and thus the QBX truncation error as mentioned in section 4.1. It should be chosen so that the truncation error is below the error tolerance everywhere in the QBX region. The expansion order affects the size of the _Mi_ matrix used for offsurface evaluation (which grows like _O_ ( _p_ QBX <sup>2</sup> <sup>)),</sup> <sup>but</sup> <sup>not</sup> <sup>that</sup> <sup>of</sup> <sup>the</sup> <sup>_Ri_</sup> <sup>matrix</sup> <sup>used</sup> <sup>for</sup> <sup>onsurface</sup> evaluation. It should be noted that as _p_ QBX increases, the upsampling factor _κ_ QBX must also increase since higher-order coefficients are harder to resolve. - The QBX expansion radius _r_ QBX, which affects both the coefficient error and the truncation error, but neither the precomputation time nor the evaluation time directly. It should typically be chosen as small as possible, since this speeds up the convergence of the expansion in (38) so that _p_ QBX can be chosen small. On the other hand, a very small _r_ QBX means that the upsampling factor _κ_ QBX must be large, since the expansion centre moves closer to the surface. However, in our implementation the primary restriction on _r_ QBX is that it must be large enough for the balls of convergence to cover the QBX region sufficiently well. In general, _r_ QBX should not be smaller than the distance from one expansion centre to the next, to ensure a good coverage. Since we have one expansion centre per grid point, we require that _r_ QBX should not be smaller than the grid spacing. <sup>7</sup> Letting _h_ be some measure of the grid spacing (for example the largest distance between neighbouring grid points on the surface), it is useful to consider the ratio _r_ QBX/ _h_ when selecting parameters. As noted in [25], this has the advantage that if _r_ QBX/ _h_ is kept fixed during refinement of the original grid, then the coefficient error is constant, assuming that the upsampling factor _κ_ QBX is also fixed. We will therefore consider _r_ QBX/ _h_ in the rest of this section. Unfortunately, no general error estimates are available in three dimensions for the quadrature rules that we use here. The parameters must therefore be selected based on numerical experiments, and we present a strategy for <u>7An alternative would be to introduce more expansion centres to maintain the coverage of the QBX region as</u> _r_ QBX decreases below the grid spacing. Doing so would also increase the amount of work and storage needed in the precomputation step. 20 _J. Bagge and A.-K. Tornberg_ doing so here. The idea is to start from the outermost upsampled quadrature region (U1) and then proceed inwards towards the surface of the particle or wall, determining the parameters in the following order: 1. Threshold distances and upsampling factors for the upsampled quadrature regions, 2. The QBX parameters _r_ QBX/ _h_ and _d_ QBX, 3. The QBX parameters _p_ QBX and _κ_ QBX. The process must be repeated for each type of particle and wall to be used. We develop the strategy in the context of a specific rod particle in section 6.1; a summary of the parameter selection strategy in the general case follows in section 6.2. In sections 6.3 and 6.4 we apply the strategy to two more examples (a rod with a higher aspect ratio and a plane wall). In order to estimate the error during the parameter selection process, we apply a constant density _q_ ˜ such that | _q_ ˜ | = 1 to the surface and evaluate the stresslet identity (5). <sup>8</sup> This may seem like an overly simple test case since both the density and the solution are constant. However, the QBX expansions are not of the constant double layer potential D itself, but of the four dipole potentials L defined by (32), and these are _not_ constant. In practice, the stresslet identity seems to provide a decent test case for both direct quadrature, upsampled quadrature and QBX, as shown by the results in section 7.2 where the density is not constant. The Spectral Ewald parameters _ξ_ and _r_ c will not be discussed at length here, but we note that the requirement that no special quadrature be needed for | _r_ | - _r_ c implies that _r_ c must be at least as large as _d_ U1. The Spectral Ewald error is determined by the product _ξr_ c in real space and _ξh_ F in Fourier space, where _h_ F is the grid spacing of the uniform grid used for the Fourier-space part (see appendix D). Given a tolerance _ε_ tol, the parameters _ξ_, _r_ c and _h_ F must satisfy the system _ξr_ c = _A_ ( _ε_ tol), _ξh_ F = _B_ ( _ε_ tol), where _A_ and _B_ are known functions. This leaves one degree of freedom which can be used to minimize the computational cost, albeit under the constraint _r_ c ≥ _d_ U1. For a general discussion on the selection of Spectral Ewald parameters, including the functions _A_ and _B_, we refer to [23] for the stresslet, [31] for the stokeslet, and [24] for the rotlet. _6.1. Introductory example: a rod particle with low aspect ratio_ In this first example, we consider a rod particle of length _L_ = 2 and radius _R_ = 0.5 (i.e. aspect ratio 2), shown in Figure 13. The grid used for the direct quadrature has parameters _n_ 1 = 40, _n_ 2 = 10 and _nφ_ = 25 (introduced in section 3.1), for a total of 2250 grid points. To give an idea of the error associated with the direct quadrature, we apply the constant density _q_ ˜ = (1, 1, 1)/√ ~~3~~ to the particle surface and compute the stresslet identity (5) using direct quadrature in two planes intersecting the particle. The absolute error in these planes is shown in Figure 13. √ apply the constant density _q_ ˜ = (1, 1, 1)/√ ~~3~~ to the particle surface and compute the stresslet identity (5) using direct quadrature in two planes intersecting the particle. The absolute error in these planes is shown in Figure 13. 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Direct quadrature error, slice 1 (b) Direct quadrature error, slice 2 Figure 13. Error in two perpendicular slices (a) and (b) through the rod particle, when evaluating the stresslet identity (5) using direct quadrature in free space. To determine how the error varies with the distance to the surface, we evaluate (5) along several normal lines centred on grid points of the particle; due to the symmetry of the error it is enough to consider the _n_ 1 + _n_ 2/2 = 45 lines shown in Figure 14 (a). The error along these lines is shown in Figure 14 (b). Given an error tolerance _ε_ tol, the smallest distance at which the error does not exceed _ε_ tol can be determined numerically. This distance is taken as <u>8</u> Since the computation of the layer potential is a linear function of _q_, the error will scale with _Q_ = max _x_ ∈Γ | _q_ ( _x_ )|. In particular, if the maximum error is _ε_ tol when _Q_ = 1, the maximum error will be _αε_ tol when the density is multiplied by a constant _α_ . _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 21 _d_ U1. In this example, we will use the error tolerance _ε_ tol = 10 <sup>−10</sup> . As indicated in Figure 14 (b), the error reaches 10 <sup>−10</sup> at _d_ U1 = 1.061; special quadrature must be used within this distance to the surface. Having established the first threshold distance _d_ U1, we now proceed to determine the rest of the parameters for the upsampled quadrature regions, in section 6.1.1. 0.5 1.0 1.5 2.0 Distance to surface 10 <sup>4</sup> 10 <sup>2</sup> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 12 10 14 10 16 0.0 0.5 1.0 1.5 2.0 Distance to surface (b) Direct quadrature error along the lines (a) Lines along which the error is plotted Figure 14. Error of the direct quadrature along 45 normal lines centred on grid points of the particle surface. In (a), the normal lines are shown coloured in groups of ten. In (b), the error along each line is shown with the same colours (here, the blue and purple curves are obscured by the red curve). The line with the greatest error is coloured red; the error along this line reaches the value 10 <sup>−10</sup> at distance 1.061 from the surface. (The smallest distance to surface included here is 0.01.) _6.1.1. Parameters for the upsampled quadrature regions_ For the sake of simplicity we will always choose the upsampling factors to be _κ_ U _i_ = _i_ + 1, meaning that the first upsampling factor will be _κ_ U1 = 2, the next will be _κ_ U2 = 3 and so on (this may not be the optimal strategy with regard to computational cost, but recall that our goal is not to optimize for computational efficiency). In order to determine the threshold distance _d_ U _i_ of every upsampled quadrature region, we repeat the investigation from Figure 14 for different upsampling factors _κ_ = 1, 2, 3, . . ., computing the stresslet identity error as a function of the distance to the surface for each upsampling factor. The maximal error at each distance is shown in Figure 15 ( _κ_ = 1 corresponds to Figure 14). The threshold distance _d_ U( _i_ + 1) is now taken as the distance at which the error curve corresponding to _κ_ = _κ_ U _i_ intersects the error tolerance _ε_ tol ( _i_ = 1, 2, . . .). For instance, in this case the curve corresponding to _κ_ = _κ_ U1 = 2 intersects _ε_ tol = 10 <sup>−10</sup> around 0.391 = _d_ U2. 10 <sup>4</sup> 10 <sup>2</sup> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 12 10 14 10 16 ~~= 1~~ <u>= 2</u> <u>= 3</u> <u>= 4</u> <u>= 5</u> <u>= 6</u> 0.0 0.5 1.0 1.5 2.0 Distance to surface Figure 15. Maximal stresslet identity error along any of the lines shown in Figure 14 (a), for upsampled quadrature with different upsampling factors _κ_ . (The smallest distance to surface included here is 0.01.) This procedure sets all of the parameters for the upsampled quadrature, as shown in Table 1. However, at some point we must switch from upsampled quadrature to QBX, which is determined by the QBX threshold distance _d_ QBX. 22 _J. Bagge and A.-K. Tornberg_ Selecting _d_ QBX will also fix the number of upsampled quadrature regions _N_ U. We will determine _d_ QBX together with the other QBX parameters in section 6.1.2. Table 1. Parameters for the upsampled quadrature regions, tolerance 10 <sup>−10</sup> . _i_ 1 2 3 4 5 6 <u>· · ·</u> _κ_ U _i_ 2 3 4 5 6 7 <u>· · ·</u> _d_ U _i_ 1.061 0.391 0.237 0.169 0.132 0.108 <u>· · ·</u> _6.1.2. Parameters for the QBX region_ To understand how the QBX error behaves, we plot the offsurface error from a single expansion in Figure 16 (a). Note that the QBX parameters used in this figure are not yet selected to achieve the error tolerance, but meant only to demonstrate the general behaviour of the error. Since the QBX error is the largest at the boundary of the ball of convergence (outside this ball the direct quadrature error is shown in Figure 16 (a)), it is sufficient to measure the error at a point on this boundary, for example at the point where the ball touches the particle. Thus, we measure the QBX error at all the grid points of the rod – the onsurface error – shown in Figure 16 (b) for these particular QBX parameters. 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Offsurface error from a single QBX expansion (b) Onsurface error Figure 16. Error when evaluating the stresslet identity (5) using quadrature by expansion with the parameters _r_ QBX = _h_ = _π_ /25, _p_ QBX = 18 and _κ_ QBX = 15: (a) in a slice through the particle centre (i.e. offsurface), using a single QBX expansion centre and direct quadrature outside the ball of convergence; (b) in the grid points of the particle (i.e. onsurface). Note in (b) that the error seems to be related to the curvature of the boundary; in particular the error is larger in areas where the curvature changes, viz. in the smooth transition from cylinder to cap. (Similar observations related to the convexity of the boundary were reported in [3] and [29].) For particles, we define the grid spacing _h_ as the distance between grid points in the azimuthal direction at the equator of the particle, i.e. _h_ = <sup><u>2</u></sup> <sup>_<u>πR</u>_</sup> _nφ_ for rods, _h_ = <sup><u>2</u></sup> <sup>_<u>πa</u>_</sup> _nφ_ for spheroids, (54) where _nφ_ is the number of grid points in the azimuthal direction (as defined in section 3.1), _R_ is the radius of the rod and _a_ is the equatorial semiaxis of the spheroid (which appears in (26)). For the rod that we consider in this example, _R_ = 0.5 and _nφ_ = 25, so _h_ = _π_ /25 ≈ 0.1257. We now focus on selecting the parameters _r_ QBX/ _h_, _p_ QBX and _κ_ QBX such that the error is bounded by _ε_ tol in the whole ball of convergence, for all QBX expansions of the particle. To do this, we consider the maximal onsurface error as we vary these three parameters, shown in Figure 17. As seen in Figure 17 (a), _r_ QBX/ _h_ should be chosen as small as possible since this improves the decay of the truncation error as _p_ QBX grows; if _r_ QBX/ _h_ is small, _p_ QBX can also be chosen small, which is important since the offsurface evaluation time for QBX grows as _O_ ( _p_ QBX <sup>2</sup> <sup>).</sup> <sup>On</sup> <sup>the</sup> other hand, as Figure 18 shows, _r_ QBX must not be too small compared to _h_, since then the balls of convergence would 10 <sup>2</sup> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 12 _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 23 10 <sup>2</sup> 10 <sup>0</sup> 10 2 ~~rQBX/h = 0.5~~ <u>r</u> ~~QBX~~ <u>/h = 1.0</u> rQBX/h = 2.0 10 20 30 40 50 pQBX ~~QBX~~ <sup>~~= 5~~</sup> ~~QBX~~ <sup>~~= 10~~</sup> ~~QBX~~ <sup><u>= 15</u></sup> QBX <sup>= 20</sup> 10 4 10 6 10 8 10 10 10 12 10 20 30 40 50 pQBX (b) Onsurface QBX error for different _κ_ QBX (a) Onsurface QBX error for different _r_ QBX/ _h_ Figure 17. Maximal onsurface error on the rod when evaluating the stresslet identity using QBX. In (a) for different _r_ QBX/ _h_ with _κ_ QBX = 15 fixed, and in (b) for different _κ_ QBX with _r_ QBX/ _h_ = 1 fixed. Note that each curve has a minimum, which is where the truncation error (which decreases as _p_ QBX grows) and the coefficient error (which increases as _p_ QBX grows) balance. The dashed lines indicate the experimental truncation error estimate (55). not overlap properly, and large areas of the QBX region would not be covered by any ball of convergence. <sup>9</sup> For this reason we require that _r_ QBX ≥ _h_ . In fact, since _r_ QBX should be as small as possible, we will always set _r_ QBX = _h_, so that _r_ QBX/ _h_ = 1. To select _p_ QBX and _κ_ QBX, we use the data shown in Figure 17 (b), which is for _r_ QBX/ _h_ = 1. As can be seen there, the truncation error is independent of _κ_ QBX and depends only on _p_ QBX, so we simply select the smallest _p_ QBX such that the truncation error is below the tolerance. <sup>10</sup> Then we select the smallest _κ_ QBX (restricted to multiples of five for convenience) such that the coefficient error is no larger than the truncation error (i.e. such that the minimum point of the error curve is to the right of the selected _p_ QBX). For example, for _ε_ tol = 10 <sup>−10</sup>, we must choose _p_ QBX = 40 and _κ_ QBX = 20. It remains to choose the threshold distance _d_ QBX, which determines the extent of the QBX region as shown in Figure 18. Clearly _d_ QBX cannot be larger than 2 _r_ QBX since then the balls of convergence would not reach the edge of the QBX region. Even with _d_ QBX = 2 _r_ QBX, there would be areas in the QBX region, close to its edge, that would not be inside any ball of convergence. To mitigate this problem, we introduce a safety factor _γ_, derived in appendix C, and require that _d_ QBX ≤ 2 _γr_ QBX, (56) where _γ_ = 0.85. As long as _d_ QBX satisfies (56), it can be chosen arbitrarily, in the sense that its value will not affect _d_ QBX _r_ QBX QBX region _h_ Surface Γ Figure 18. Balls of convergence with the parameters _r_ QBX and _d_ QBX and the grid spacing _h_ marked. <u>9Some areas of the QBX region will inevitably fall outside every ball of convergence no matter how large</u> _r_ QBX is. However, these areas are mainly very close to the surface but not at the grid points, where it is typically not necessary to evaluate the layer potential. 10 The dashed curves in Figure 17 indicate the experimental truncation error estimate _e_ trunc ≈ max �13(0.245 log( _ρ_ ) + 0.43) <sup>_p_</sup> <sup>QBX</sup>, 0.07( _ρ_ - 0.63)(0.175 log( _ρ_ ) + 0.602) <sup>_p_</sup> <sup>QBX</sup> �, (55) where _ρ_ = _r_ QBX/ _h_ . This estimate was constructed for the rod particle in this particular example by applying curve fitting to data from a parameter study similar to that shown in Figure 17 itself. Unfortunately, this experimental estimate is of limited use in the parameter selection process since it would have to be reconstructed for every new geometrical object (such as a rod with a different aspect ratio), while the data used to construct it can just as well be used directly to select _p_ QBX. 24 _J. Bagge and A.-K. Tornberg_ the conformance to the error tolerance, only the computational cost. We introduce the somewhat arbitrary additional constraint that _d_ QBX ≥ _r_ QBX, and then select _d_ QBX as follows: If the interval [ _r_ QBX, 2 _γr_ QBX] contains any threshold distance _d_ U _i_ for the upsampled quadrature regions, set _d_ QBX equal to the largest _d_ U _i_ in the interval (i.e. the one with the smallest _i_ ). Otherwise, set _d_ QBX = _r_ QBX. In any case, this also sets the number of upsampled quadrature regions _N_ U since the last upsampled quadrature region ends where the QBX region begins. Our choices here are motivated by keeping _N_ U as low as possible since this reduces the computational cost, which we will return to in section 6.1.4. In our current example, _d_ QBX should be in the interval [ _r_ QBX, 2 _γr_ QBX] ≈[0.1257, 0.2136]. As seen in Table 1, _d_ U4 = 0.169 is the largest threshold distance in this interval, and thus we select _d_ QBX = 0.169 which means that _N_ U = 3 upsampled quadrature regions are used. _6.1.3. Verification of selected parameters_ To summarize, the parameters that were selected above for the rod in this example was, with error tolerance 10 <sup>−10</sup>, _r_ QBX/ _h_ = 1, _N_ U = 3, _d_ QBX = 0.169, _d_ U1 = 1.061, _κ_ U1 = 2, _p_ QBX = 40, _d_ U2 = 0.391, _κ_ U2 = 3, _κ_ QBX = 20, _d_ U3 = 0.237, _κ_ U3 = 4. (57) If the selected QBX upsampling factor _κ_ QBX seems large, recall that this parameter is completely hidden in the QBX precomputation step, as explained in section 4.3. To verify that the selected parameters keep the error below the tolerance, we plot in Figure 19 (a) the maximum error along the 45 lines that were used earlier (shown in Figure 14 (a)). We also plot the error in two slices in Figure 20. The fact that the error slightly exceeds the tolerance at some points in (b) should come as no surprise, since we have used the error only along certain lines to select the parameters, not in the whole space. All the points where the tolerance is exceeded are close to the boundary between different quadrature regions and could thus be eliminated by adjusting the threshold distances slightly upwards (which we will however not do here). The parameter selection procedure is repeated for the same rod with the looser error tolerance 10 <sup>−6</sup> . The parameters for tolerance 10 <sup>−6</sup> are _r_ QBX/ _h_ = 1, _N_ U = 2, _d_ QBX = 0.149, _d_ U1 = 0.575, _κ_ U1 = 2, _p_ QBX = 21, _d_ U2 = 0.238, _κ_ U2 = 3, _κ_ QBX = 15, (58) and the error is shown in Figure 19 (b) and Figure 21. 10 8 10 10 10 12 10 14 <u>QBX</u> <u>QBX</u> U2 ~~Direct~~ <u>U1</u> <u>quadrature</u> 10 16 U3 Direct U2 U1 quadrature 0.0 U3 0.5 1.0 1.5 2.0 Distance to surface 10 4 10 6 10 8 10 10 10 12 10 14 10 16 0.0 U2 0.5 1.0 1.5 2.0 Distance to surface (a) Special quadrature error, tolerance 10 <sup>−10</sup> (b) Special quadrature error, tolerance 10 <sup>−6</sup> Figure 19. Maximal stresslet identity error along any of the lines shown in Figure 14 (a) as a function of the distance to the surface (for 1000 equispaced distances in [0, 2]), using the combined special quadrature with (a) tolerance 10 <sup>−10</sup> and (b) tolerance 10 <sup>−6</sup> . The different quadrature regions are marked. The largest error is 9.709 × 10 <sup>−11</sup> in (a), and 9.995 × 10 <sup>−7</sup> in (b). _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 25 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Special quadrature error, tolerance 10 <sup>−10</sup>, slice 1 (b) Special quadrature error, tolerance 10 <sup>−10</sup>, slice 2 Figure 20. Error in two perpendicular slices (a) and (b) through the rod particle, when evaluating the stresslet identity (5) using combined special quadrature with tolerance 10 <sup>−10</sup> in free space. Each slice consists of 500 × 500 evaluation points. All points in (a) are below the tolerance, but 166 points in (b), marked red, are above the tolerance. The largest error is 9.768 × 10 <sup>−11</sup> in (a) and 1.074 × 10 <sup>−10</sup> in (b). 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Special quadrature error, tolerance 10 <sup>−6</sup>, slice 1 (b) Special quadrature error, tolerance 10 <sup>−6</sup>, slice 2 Figure 21. Error in two perpendicular slices (a) and (b) through the rod particle, when evaluating the stresslet identity (5) using combined special quadrature with tolerance 10 <sup>−6</sup> in free space. Each slice consists of 500 × 500 evaluation points. All points in (a) are below the tolerance, but 90 points in (b), marked red, are above the tolerance. The largest error is 9.214 × 10 <sup>−7</sup> in (a) and 1.079 × 10 <sup>−6</sup> in (b). _6.1.4. A note on the computational cost_ While our parameter selection strategy does not try to optimize the computational cost, we naturally strive for a reasonably low cost. We therefore comment on the computational cost for the different quadrature methods considered here. The computational complexity for evaluating the layer potential using each quadrature method is shown in Table 2. The precomputation time (for constructing the interpolation matrices and QBX matrices), which is naturally independent of the number of evaluation points, is not included. Note that the total evaluation time depends on the number of evaluation points in each quadrature region, and also on the number of expansions that are used for the evaluation points in the QBX region (recall that the closest expansion centre is used for each evaluation point). An example of evaluation times for a specific computer machine is given in Table 3, again excluding precomputation. The time required to find the closest expansion centre for each evaluation point in the QBX region has been omitted from Tables 2 and 3 since it is negligible (around 10 <sup>−8</sup> × _N_ eval,QBX seconds). For a particle, _N_ grid is the number of grid points on the whole particle, i.e. _N_ grid = 2250 for the rod that we have considered so far. Let us study the special case of a single evaluation point, relevant for example when computing a streamline. Based on Table 3, the evaluation time for this single point can be computed, depending on which quadrature region the point belongs to and the parameter _κ_ U _i_ or _p_ QBX. This is shown in Table 4. From this, it can for example be seen that the evaluation takes roughly 1000 times longer for a point in the upsampled quadrature region with _κ_ U _i_ = 2 compared to the direct quadrature region. (The upsampled quadrature cost is in this case completely dominated by interpolating the density, i.e. multiplying it by the precomputed interpolation matrix.) 26 _J. Bagge and A.-K. Tornberg_ Table 2. Computational complexities for the different quadrature methods. Direct quadrature Evaluate _T_ DE = _O_ <u>(</u> _N_ grid _N_ eval,D) Upsampled quadrature U <sup>2</sup> _i_ <sup>_N_</sup> <sup>2</sup> Interpolate density _T_ UI, _i_ = _O_ ( _κ_ U <sup>2</sup> Interpolate density _T_ UI, _i_ = _O_ ( _κ_ U <sup>2</sup> _i_ <sup>_N_</sup> <sup>2</sup> grid <sup>)</sup> Evaluate _T_ UE, _i_ = _O_ <u>(</u> _κ_ <u>U</u> <sup>2</sup> _<u>i</u>_ <sup>_N_</sup> <sup>grid</sup> QBX <u>U</u> <sup>2</sup> _<u>i</u>_ <sup>_N_</sup> <sup>grid</sup> <sup>_N_</sup> <sup>eval,U</sup> <sup>_i_</sup> <sup><u>)</u></sup> Compute coefficients _T_ QC = _O_ ( _p_ <sup>2</sup> Evaluate expansion Compute coefficients _T_ QC = _O_ ( _p_ QBX <sup>2</sup> <sup>_N_</sup> <sup>grid</sup> <sup>_N_</sup> <sup>exp)</sup> Evaluate expansion _T_ QE = _O_ <u>(</u> _p_ <u>QBX</u> <sup>2</sup> <sup>_N_</sup> <sup>eval,QBX)</sup> <u>QBX</u> <sup>2</sup> <sup>_N_</sup> <sup>eval,QBX)</sup> Time complexities for evaluating the double layer potential D, excluding precomputation time. Here, - _N_ grid is the total number of grid points on the part of the surface included in the special quadrature method (i.e. Γ <sup>˜</sup> as defined in section 4.2), - _N_ eval,D, _N_ eval,U _i_ and _N_ eval,QBX are the number of evaluation points in the direct quadrature region, the _i_ th upsampled quadrature region and the QBX region, respectively, - _N_ exp is the number of expansion centres that are to be used for the evaluation points in the QBX region. Table 3. Example of actual evaluation times [seconds]. Direct quadrature Evaluate _T_ DE = 5.6 × 10 <sup><u>−9</u></sup> <u>×</u> _N_ grid _N_ eval,D Upsampled quadrature U <sup>2</sup> _i_ <sup>_N_</sup> <sup>2</sup> Interpolate density _T_ UI, _i_ = 8.0 × 10 <sup>−10</sup> × _κ_ U <sup>2</sup> Interpolate density U _i_ <sup>_N_</sup> <sup>2</sup> grid _T_ UI, _i_ = 8.0 × 10 <sup>−10</sup> × _κ_ <sup>2</sup> Evaluate <u>U</u> _<u>i</u>_ <sup>_N_</sup> <sup>grid</sup> _T_ UE, _i_ = 5.7 × 10 <sup><u>−9</u></sup> <u>×</u> _κ_ <sup>2</sup> <u>U</u> _<u>i</u>_ <sup>_N_</sup> <sup>grid</sup> <sup>_N_</sup> <sup>eval,U</sup> <sup>_i_</sup> <sup>2</sup> QBX Compute coefficients _T_ QC = 5.3 × 10 <sup>−8</sup> × (0.071 _p_ <sup>2</sup> <u>QBX</u> <sup>2</sup> <sup><u>−</u></sup> <sup>0.0027</sup> <sup>_p_</sup> <sup>QBX + 1)</sup> <sup>_N_</sup> <sup>eval,QBX</sup> Compute coefficients _T_ QC = 5.3 × 10 <sup>−8</sup> × (0.071 _p_ QBX <sup>2</sup> <sup>+ 0.56</sup> <sup>_p_</sup> <sup>QBX + 1)</sup> <sup>_N_</sup> <sup>grid</sup> <sup>_N_</sup> <sup>exp</sup> Evaluate expansion _T_ QE = 2.2 × 10 <sup><u>−5</u></sup> <u>× (0.0053</u> _p_ <u>QBX</u> <sup>2</sup> <sup><u>−</u></sup> <sup>0.0027</sup> <sup>_p_</sup> <sup>QBX + 1)</sup> <sup>_N_</sup> <sup>eval,QBX</sup> These times are for a modern workstation with a 6-core Intel Core i7-8700 CPU (4.6 GHz). Table 4. Evaluation times for _N_ grid = 2250 and a single evaluation point (seconds). <u>Direct quadrature</u> Time [s] 1.3 × 10 <sup><u>−5</u></sup> <u>Upsampled quadrature</u> _κ_ U _i_ Time [s] 2 1.6 × 10 <sup>−2</sup> 3 3.7 × 10 <sup>−2</sup> 4 6.5 × 10 <sup>−2</sup> 5 1.0 × 10 <sup>−1</sup> 6 1.5 × 10 <sup><u>−1</u></sup> <u>QBX (with</u> _<u>N</u>_ <u>exp</u> <u>= 1</u> <u>)</u> _p_ QBX Time [s] 10 1.7 × 10 <sup>−3</sup> 20 4.9 × 10 <sup>−3</sup> 30 9.9 × 10 <sup>−3</sup> 40 1.7 × 10 <sup>−2</sup> 50 2.5 × 10 <sup><u>−2</u></sup> It can also be seen in Table 4 that QBX is often faster than upsampled quadrature. For instance, QBX with _p_ QBX = 40 takes about as much time as upsampled quadrature with _κ_ U _i_ = 2 and is faster than any _κ_ U _i_ ≥ 3. However, note that this conclusion may not hold when there are more than one evaluation point, since the evaluation time depends in an intricate way on both the number of evaluation points in each region and the number of expansions needed for QBX. In particular, if many expansions are needed (large _N_ exp) and there are few evaluation points per expansion, QBX will tend to be slower than upsampled quadrature due to the large cost of computing coefficients. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 27 _6.2. Summary of the parameter selection strategy_ The parameter selection strategy can, in the general case, be summarized as follows. In all steps, the stresslet identity (5) is used to estimate the error. _Input:_ Discretization of the geometry, error tolerance _ε_ tol _Output:_ Parameters _N_ U, ( _d_ U _i_, _κ_ U _i_ ) _i_ <sup>_N_</sup> = <sup>U</sup> 1 <sup>,</sup> <sup>_d_</sup> <sup>QBX,</sup> <sup>_r_</sup> <sup>QBX,</sup> <sup>_p_</sup> <sup>QBX,</sup> <sup>_κ_</sup> _i_ <sup>_N_</sup> = <sup>U</sup> 1 <sup>,</sup> <sup>_d_</sup> <sup>QBX,</sup> <sup>_r_</sup> <sup>QBX,</sup> <sup>_p_</sup> <sup>QBX,</sup> <sup>_κ_</sup> <sup>QBX</sup> <sup>for the special quadrature</sup> For each distinct geometrical object: 1. Put _κ_ U _i_ = _i_ + 1. Numerically determine the threshold distances _d_ U _i_ to keep the error below _ε_ tol, as in Figure 15 and Table 1, up to the first _i_ such that _d_ U _i_ ≤ 2 _γh_, where _γ_ = 0.85 and _h_ is the grid spacing (defined for particles in equation (54) and for walls in section 6.4). 2. Put _r_ QBX = _h_ . If the last (smallest) _d_ U _i_ computed in step 1 lies in the interval [ _h_, 2 _γh_ ], put _d_ QBX equal to it. Otherwise, put _d_ QBX = _h_ . This also sets _N_ U, the number of upsampled quadrature regions. 3. Choose _p_ QBX such that the truncation error is below _ε_ tol, based on a parameter study such as in Figure 17 (b). Choose _κ_ QBX such that the coefficient error is no larger than the truncation error. This strategy is designed to keep the error relative to maxΓ | _q_ | below _ε_ tol when evaluating the layer potential, provided that the density _q_ is well-resolved by the discretization. While there is no guarantee that the error stays strictly below _ε_ tol, empirical evidence in sections 6.1.3, 6.3, 6.4, 7.1 and 7.2 indicates that the error is typically close to the tolerance, and in any case of the correct order of magnitude. Note that the procedure, including the parameter studies, must be repeated every time a new geometrical object, such as a rod particle with a different aspect ratio, is used. We will now apply the procedure to two additional examples. _6.3. Example II: a rod particle with higher aspect ratio_ For the second example, we consider a more slender rod particle, namely the rod of length _L_ = 10 and radius _R_ = 0.5 (aspect ratio 10) shown in Figure 22. The grid has parameters _n_ 1 = 35, _n_ 2 = 60 and _nφ_ = 18, in total 2340 grid points. The grid spacing as defined by (54) is _h_ = _π_ /18 ≈ 0.1745. It should be noted that while _h_ is based only on the grid resolution in the azimuthal direction, the resolution in the polar direction must not be much coarser. Otherwise, the distance between QBX expansion centres would be too large in the polar direction, and the balls of convergence would not cover the QBX region. (This limitation is due to having one expansion centre per grid point.) Applying the same constant density _q_ ˜ = (1, 1, 1)/√ ~~3,~~ the direct quadrature error is shown in Figure 22 (a). The special quadrature parameters are selected as described in section 6.2, with the error along the 65 lines shown in red √ Applying the same constant density _q_ ˜ = (1, 1, 1)/ 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Direct quadrature error (b) Special quadrature error, tolerance 10 <sup>−6</sup> Figure 22. Error in a slice through the rod particle, when evaluating the stresslet identity (5) in free space using (a) direct quadrature, and (b) combined special quadrature with tolerance 10 <sup>−6</sup> . In (b), the tolerance is exceeded in 148 points, marked red; the evaluation grid consists of 500 × 500 points and the largest error is 1.455 × 10 <sup>−6</sup> . In (a), the 65 lines used to select parameters are shown in red. 28 _J. Bagge and A.-K. Tornberg_ in Figure 22 (a) used to select the threshold distances. The parameters for error tolerance 10 <sup>−6</sup> are _r_ QBX/ _h_ = 1, _N_ U = 2, _d_ QBX = 0.234, _d_ U1 = 0.930, _κ_ U1 = 2, _p_ QBX = 28, _d_ U2 = 0.355, _κ_ U2 = 3. _κ_ QBX = 20, (59) The error when using these parameters is shown in Figure 22 (b). As before, the tolerance is not strictly enforced, but the error stays within a factor 2 of the tolerance. The parameters (59) for the slender rod can be compared with the parameters (58) for the less slender rod with the same tolerance; the threshold distances are relative to the diameter of the cylindrical part of the rod in both cases. Note that the slender rod (59) has larger threshold distances than the other rod (58). This reflects the fact that the error of the underlying direct quadrature at a fixed distance from the rod is higher for the slender rod, since it has lower overall resolution (grid points per surface area). The slender rod also requires a higher _p_ QBX since _r_ QBX = _h_ is larger for the slender rod. _6.4. Example III: a pair of plane walls_ In this third example, we select parameters for a plane wall. Since we always consider walls in a periodic setting, we will do so here as well, and use the Spectral Ewald (SE) method described in section 5. We will here select the SE parameters such that the error from SE is completely negligible compared to the quadrature errors which we strive to control here. <sup>11</sup> Since the problem is periodic in all three spatial directions, we must have a pair of walls so that the fluid domain can be confined between them. The periodic cell is here of size _B_ = (1, 1, 1) and the two walls are placed at a distance of 0.6 from each other. The walls are discretized using 11 × 11 patches each, with 8 × 8 grid points on each patch (as described in section 3.2), in total 7744 grid points per wall. For a wall, we define the grid spacing as _h_ = max( _h_ 1, _h_ 2), where _h_ 1 and _h_ 2 are the largest spacings between grid points in each of the two tensorial directions of the patches. The walls considered here have grid spacing _h_ ≈ 0.01668. The constant density _q_ ˜ = (0, 0, 1) is applied in the direction of the normal of the lower wall (pointing into the fluid domain). The direct quadrature error is shown in Figure 23 (a). We follow the procedure in section 6.2. The threshold distances of the upsampled quadrature regions are computed by evaluating the stresslet identity error along normal lines of the walls, with each line centred at a grid point. The error is plotted in Figure 23 (b), and the resulting threshold distances for error tolerance 10 <sup>−6</sup> are _d_ U1 = 0.0687, _d_ U2 = 0.0304 and _d_ QBX = 0.0198. 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> 10 <sup>4</sup> 10 <sup>2</sup> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 12 10 14 <u>= 1</u> <u>= 2</u> <u>= 3</u> ~~= 4~~ ~~= 5~~ ~~= 6~~ 0.00 0.05 0.10 0.15 0.20 Distance to lower wall (a) Direct quadrature error (b) Upsampled quadrature error Figure 23. Errors when evaluating the stresslet identity (5) in the periodic setting. (a) Error in the centre plane for direct quadrature. (b) Largest error for upsampled quadrature with different upsampling factors _κ_, as a function of the distance to the lower wall. To determine _p_ QBX and _κ_ QBX, we do a parameter study, shown in Figure 24 (a). Note that the plane wall needs a significantly lower _p_ QBX than the rod particles to reach a given error. The error curves in Figure 24 (a) level out at around 10 <sup><u>−12</u></sup> due to other errors not controlled by the QBX parameters. In order to reach the tolerance 10 <sup>−6</sup> it is <u>11</u> Specifically, the SE parameters used here are _ξ_ = 15.245, _r_ c = 0.4, _P_ = 24, and the uniform grid used for the Fourier-space part has 64 × 64 × 64 grid points (see section 5 and appendix D for an explanation). These parameters should keep the SE error around 10 <sup>−15</sup> according to [23]. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 29 sufficient to choose _p_ QBX = 7 and _κ_ QBX = 10. The selected parameters are thus _r_ QBX/ _h_ = 1, _N_ U = 2, _d_ QBX = 0.0198, _d_ U1 = 0.0687, _κ_ U1 = 2, _p_ QBX = 7, _d_ U2 = 0.0304, _κ_ U2 = 3. _κ_ QBX = 10, The error when using these parameters is shown in Figure 24 (b). (60) 10 <sup>2</sup> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 12 <u>QBX</u> <sup><u>= 5</u></sup> QBX <sup><u>= 10</u></sup> ~~QBX~~ <sup>~~= 15~~</sup> <u>QBX</u> <sup><u>= 20</u></sup> 5 10 15 20 25 30 pQBX 10 14 <u>QBX</u> 10 4 10 6 10 8 10 10 10 12 0.00 U2 0.05 0.10 0.15 0.20 Distance to lower wall (b) Special quadrature error, tolerance 10 <sup>−6</sup> U2 <u>Direct</u> U1 quadrature (a) Onsurface QBX error for different _κ_ QBX Figure 24. (a) Maximal onsurface error when evaluating the stresslet identity using QBX, for different _κ_ QBX with _r_ QBX/ _h_ = 1 fixed. (b) Maximal stresslet identity error as a function of the distance to the lower wall (for 1000 equispaced distances in [0, 0.2]), using the combined special quadrature with tolerance 10 <sup>−6</sup> . The largest error is 9.812 × 10 <sup>−7</sup> . 7. Numerical results Our numerical method can be summarized as follows: 1. The geometry is discretized as in section 3. Parameters for the combined special quadrature method are selected as in section 6.2. Parameter selection is done in free space for particles, but the same parameters can also be used in the periodic setting. For walls, parameter selection is done in the periodic setting. 2. The matrices _Mi_ and _Ri_ for offsurface QBX and onsurface QBX, respectively, are precomputed as in section 4.3. Interpolation matrices for the upsampled quadrature regions are also precomputed. At this point, the special quadrature is ready to be used to evaluate the layer potential. 3. The boundary integral equation for either a resistance problem or a mobility problem is solved iteratively for _q_ using GMRES. The Spectral Ewald method is used for periodic problems, as described in section 5. A preconditioner is used in all cases, as described below. - For a resistance problem, velocities are given for all particles and the boundary integral equation is given by equation (24). - For a mobility problem, forces and torques are applied to all particles and the boundary integral equation is given by equation (25). 4. The flow field in the fluid domain may be computed in a postprocessing step using _q_ from step 3. For a resistance problem, the forces and torques acting on all particles may also be computed here, while for a mobility problem, the particle velocities may be computed. To improve the convergence of GMRES in step 3, we use a block-diagonal preconditioner similar to the one used in [25]. The preconditioner is constructed by computing the explicit inverse of a single-particle system as well as a system consisting of a single wall patch (if walls are present in the simulation). These two types of blocks are then placed along the diagonal and rotated according to the geometry. This preconditioner has been seen to reduce the number of GMRES iterations by as much as a factor 17 for some systems with many particles, such as the ones in section 7.3. 30 _J. Bagge and A.-K. Tornberg_ In this section, we test some aspects of our numerical method, with focus on the special quadrature. First, in section 7.1, we test the quadrature on its own (i.e. steps 1–2 above) with geometries containing both particles and walls. This serves as a continuation of the tests in section 6, where geometrical objects were considered only separately. In section 7.2, we test the special quadrature in the context of the full numerical method (steps 1–4 above) and in particular how the quadrature tolerance influences the accuracy. Finally, in section 7.3, we test the computational complexity of the method on a more complicated problem, and compute streamlines. _7.1. Special quadrature with composite geometries_ We consider two geometrical setups, shown in Figures 25 and 27. Both problems are periodic with a periodic cell of size _B_ = (1, 1, 1), and the Spectral Ewald parameters are as in section 6.4. As in section 6, we use the stresslet identity (5) to estimate the error. This is the same test used to select the parameters, so it mainly serves as a consistency check (tests with nonconstant densities will follow in section 7.2). _7.1.1. Geometry 1: Two rods between a pair of plane walls_ The first geometry consists of two plane walls discretized as in section 6.4, at a distance 0.6 from each other. Between these walls are two rod particles of length _L_ = 0.5 and radius _R_ = _L_ /20 (aspect ratio 10), discretized as in section 6.3 (but scaled down a factor 20), oriented such that their axes lie in the centre plane. The stresslet identity error is shown for two different quadrature tolerances _ε_ tol in Figure 25. In (a), _ε_ tol = 10 <sup>−6</sup>, the quadrature parameters for the walls are as in section 6.4, i.e. given by (60); for the rods, the parameters are as in section 6.3 but with all distances scaled by 1/20 to account for the difference in size. Thus, the parameters for _ε_ tol = 10 <sup>−6</sup> for the rods are _d_ QBX = 0.0117, _p_ QBX = 28, _κ_ QBX = 20 and _N_ U = 2, _d_ U1 = 0.0465, _d_ U2 = 0.0178. In (b), for tolerance _ε_ tol = 10 <sup>−8</sup>, the parameters selected according to section 6.2 are, for the walls _d_ QBX = 0.0248, _p_ QBX = 10, _κ_ QBX = 10 and _N_ U = 2, _d_ U1 = 0.0944, _d_ U2 = 0.0386; and for the rods _d_ QBX = 0.0146, _p_ QBX = 40, _κ_ QBX = 25 and _N_ U = 2, _d_ U1 = 0.0676, _d_ U2 = 0.0237. The maximal error in the centre plane is plotted for varying quadrature tolerance in Figure 26. This shows that the error more or less follows the tolerance, as expected. 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) Special quadrature error, tolerance 10 <sup>−6</sup> (b) Special quadrature error, tolerance 10 <sup>−8</sup> Figure 25. Stresslet identity error in the centre plane, for geometry 1, in (a) for tolerance 10 <sup>−6</sup> and in (b) for tolerance 10 <sup>−8</sup> . The largest error is 1.205 × 10 <sup>−6</sup> in (a) and 9.389 × 10 <sup>−9</sup> in (b). In (a), the error exceeds the tolerance in 2 points (the evaluation grid has 500 × 500 points), marked red. 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 Max error ~~RMS error~~ 10 10 10 8 10 6 10 4 10 2 10 <sup>0</sup> Tolerance Figure 26. Maximal and root-mean-square (RMS) stresslet identity error in the centre plane as a function of the special quadrature tolerance, for geometry 1. As observed already in section 6, the tolerance is sometimes exceeded slightly at the threshold distances, which causes the max error curve to lie above the identity line Error = Tolerance (dashed). _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 31 _7.1.2. Geometry 2: Two spheroids in a pipe_ The second geometry consists of a pipe of radius 0.3, discretized using 5 × 10 patches with 6 × 6 grid points each. Inside the pipe are two spheroids with semiaxes _a_ = 0.05 and _c_ = 0.1, discretized with parameters _nθ_ = 36 and _nφ_ = 25 (900 grid points per spheroid). We select the error tolerance _ε_ tol = 10 <sup>−6</sup> . The parameters selected according to section 6.2 are, for the pipe _d_ QBX = 0.0614, _p_ QBX = 12, _κ_ QBX = 10 and _N_ U = 2, _d_ U1 = 0.222, _d_ U2 = 0.0888; and for the spheroids _d_ QBX = 0.0153, _p_ QBX = 27, _κ_ QBX = 15 and _N_ U = 2, _d_ U1 = 0.0568, _d_ U2 = 0.0235. The error when using these parameters is shown in Figure 27 (b), together with the direct quadrature error in Figure 27 (a). Note that we have selected a much lower resolution for the pipe in comparison to the walls in geometry 1 (section 7.1.1), which is reflected in the larger threshold distances compared to (60). (a) Direct quadrature error (b) Special quadrature error, tolerance 10 <sup>−6</sup> 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> Figure 27. Stresslet identity error in the centre plane, for geometry 2, in (a) using direct quadrature and in (b) using combined special quadrature with tolerance 10 <sup>−6</sup> . In (b), the tolerance is exceeded in 5 points (the evaluation grid has 500 × 500 points), marked red; the largest error in the slice is 1.323 × 10 <sup>−6</sup> . _7.2. Solving the boundary integral equation_ Here, we investigate how the special quadrature tolerance influences the accuracy of the numerical method, i.e. when solving the boundary integral equation. We will use the mobility problem as our model problem, and apply the force _F_ = (0, 0, −1) to all particles, with zero torque and no background flow. In order to get the expected accuracy when solving the boundary integral equation, the double layer density must be well-resolved by the geometry discretization. It turns out that for elongated particles, the density and how easy it is to resolve depends heavily on the number of completion sources _N_ src (defined in section 2.1). Therefore, we begin in section 7.2.1 by investigating how large _N_ src must be to ensure that the density is well-resolved for a given discretization. Then, in section 7.2.2, we study how the special quadrature tolerance influences the accuracy of the method. _7.2.1. Selecting the number of completion sources_ To study the influence of _N_ src, we consider a single rod particle with length _L_ = 0.5 and radius _R_ = _L_ /20 (aspect ratio 10) in free space, shown in Figure 29 (a) together with the flow field resulting from the force _F_ = (0, 0, −1). We now solve this mobility problem for varying _N_ src, with the special quadrature error tolerance fixed to 10 <sup>−9</sup> here. <sup>12</sup> The completion flow V <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, which appears in the right-hand side of the boundary integral equation (20), will change drastically as _N_ src grows from small values, as shown in Figure 28; the completion flow becomes increasingly smoother as _N_ src increases. Naturally, this means that the density _q_ itself will change as _N_ src grows. However, the real physical quantities – the particle velocity and the flow field – should not change since the net force and torque on the particle does not change. Thus, these physical quantities can be used to gauge how _N_ src affects the accuracy of the solution. As Figure 29 (b) shows, the effect is quite large, and most pronounced in the fluid flow velocity (the blue curve). (For this problem, the magnitude of the fluid flow velocity and particle velocity _U_ RBM are both around 0.6, while the angular velocity ΩRBM is zero.) Thus, it is important to select _N_ src high enough for the error in Figure 29 (b) to satisfy the error tolerance. The effect of _N_ src on the accuracy is stronger the more elongated the particle is; for particles with low aspect ratio, _N_ src = 1 may be sufficient. The effect is very similar for the resistance problem, to the degree that the max flow error in Figure 29 (b) can be used to determine _N_ src for both the mobility problem and resistance problem. Note that _N_ src does not affect the size of the linear system, i.e. (24) or (25). <u>12</u> The rod particle is discretized as in section 7.1, and the special quadrature parameters for _ε_ tol = 10−9 are _r_ QBX/ _h_ = 1, _d_ QBX = 0.0119, _p_ QBX = 45, _κ_ QBX = 25, and _N_ U = 3, _d_ U1 = 0.0810, _d_ U2 = 0.0271, _d_ U3 = 0.0164. 32 _J. Bagge and A.-K. Tornberg_ 2 _._ 6 2 _._ 2 1 _._ 8 1 _._ 4 1 _._ 0 0 _._ 6 0 _._ 2 _푁_ src = 1 _푁_ src = 5 _푁_ src = 11 _푁_ src = 75 0 _._ 9 0 _._ 8 0 _._ 7 0 _._ 6 0 _._ 5 0 _._ 4 0 _._ 3 Figure 28. The magnitude of the completion flow V <sup>(</sup> <sup>_α_</sup> <sup>=1)</sup> [ _F_, 0]( _x_ ) on the surface of the rod, for a few different values of _N_ src. Since the background flow is zero, this is exactly the right-hand side of the boundary integral equation (20). Note that the colour scale is different for _N_ src = 1 compared to the other values. 0 20 40 60 80 100 Number of completion sources (b) Error contribution 0 _._ 6 0 _._ 5 0 _._ 4 0 _._ 3 0 _._ 2 0 _._ 1 0 10 2 10 4 10 6 10 8 10 10 10 12 10 14 <u>Max flow error</u> ~~U~~ RBM ~~error~~ <u>RBM</u> <sup><u>error</u></sup> (a) Flow field Figure 29. (a) Flow field resulting from the mobility problem for a single rod in free space (colour indicates velocity magnitude, small black arrows indicate velocity direction). The large red arrow indicates the applied force, and the large black arrow indicates the velocity of the rod (not to scale with the small arrows). (b) Contribution to the absolute error from the way the completion sources are distributed, as a function of _N_ src (for a rod particle of aspect ratio 10). The error is estimated as the difference to a reference solution with _N_ src = 135. Note that the max flow error flattens out around 10 <sup>−9</sup>, the special quadrature error tolerance. _7.2.2. Effect of the special quadrature on the accuracy_ We continue to study the mobility problem, but now add another rod particle and a pair of plane walls, as shown in Figure 30. We fix _N_ src = 65, which was enough to get the error below 10 <sup>−9</sup> in the previous problem. The walls are discretized using 22 × 22 patches with 8 × 8 grid points each (30 976 grid points per wall), and the rod particles are discretized as in section 7.1. We set the special quadrature tolerance to different values between 10 <sup>−1</sup> and 10 <sup>−8</sup>, solve the mobility problem, and compute the flow field and particle velocities. The errors in the flow field, density and particle velocities are estimated using a reference solution with special quadrature tolerance 10 <sup>−9</sup> ; these are shown in Figures 30 (b) and 31 (a)–(b). Note that the tolerance sets the flow field error relative to max | _q_ | quite accurately; the density and particle velocity errors are even smaller. We would like to point out that the value of the scale factor max | _q_ | is not known a priori, but it is of course known after having solved the boundary integral equation. It should be noted that the error cannot be expected to follow the tolerance unless the density is well-resolved by the geometry discretization, since otherwise the interpolated density will be inaccurate. It has been observed that the density becomes hard to resolve, with either sharp peaks or high-frequency oscillations, when particles come very close to each other or the walls (where “very close” is measured relative to the grid resolution). Thus, one may be forced to increase the grid resolution in these cases. For elongated particles, the set of matrices _Mi_, _i_ = 1, . . ., _nθ_ /2, which are precomputed for offsurface QBX tends to become quite large for strict quadrature tolerances. The reason for this is that with particle-global QBX, the whole set of matrices consists of 3 _nφnθ_ <sup>2</sup> <sup>(</sup> <sup>_p_</sup> <sup>QBX + 1)(</sup> <sup>_p_</sup> <sup>QBX + 2)</sup> (61) complex numbers, i.e. it is quadratic in both _p_ QBX and _nθ_ (where _nθ_ is the number of grid points in the axial direction, _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 33 0 _._ 4 0 _._ 3 0 _._ 2 0 _._ 1 0 10 <sup>0</sup> 10 2 10 4 10 6 10 8 10 10 10 7 10 4 10 1 Max error ~~RMS error~~ 10 10 Tolerance (a) Geometry and flow field (b) Flow field error Figure 30. (a) Flow field from the periodic mobility problem with force _F_ = (0, 0, −1) applied to both particles (colour indicates velocity magnitude, arrows indicate velocity direction). (b) Maximal and root-mean-square (RMS) flow field error in the centre plane (estimated using a reference solution with tolerance 10 <sup>−9</sup> ), scaled by the maximal density magnitude max | _q_ | ≈ 5.4. The dashed line indicates Scaled error = Tolerance. 10 <sup>0</sup> 10 2 10 4 10 6 10 8 Rod 1 ~~Rod 2~~ Wall 1 <u>Wall 2</u> 10 <sup>0</sup> 10 2 10 4 10 6 10 8 <u>URBM of rod 1</u> RBM <sup>~~of rod 1~~</sup> <u>URBM of rod 2</u> RBM <sup>~~of rod 2~~</sup> 10 10 10 10 10 7 10 4 10 1 10 10 10 10 10 7 10 4 10 1 Tolerance Tolerance (a) Layer density error (b) Particle velocity error Figure 31. (a) Maximal absolute error of the layer density on each geometrical object (colors as in Figure 30 (a)), estimated using a reference solution with tolerance 10 <sup>−9</sup> . (b) Absolute error of the particle velocities. which we define as 2 _n_ 1 + _n_ 2 for rod particles). For elongated particles, _nθ_ tends to be large; for example, for the rods considered in this section (aspect ratio 10), _nθ_ = 130 and _nφ_ = 18. The set of matrices for tolerance 10 <sup>−8</sup> ( _p_ QBX = 40) then takes up around 25 gigabytes when stored in double precision, while for tolerance 10 <sup>−6</sup> ( _p_ QBX = 28) the matrices take up around 13 gigabytes. To reduce the size of the matrices in this situation, a local patch-based discretization could be used also for the particles, in the same way it is already used for the walls. This would reduce the number of grid points included in the special quadrature and thus the size of the matrices. _7.3. Computational complexity and computation of streamlines_ _7.3.1. Computational complexity of the method_ The computational cost of our special quadrature method is quadratic in the number of grid points per particle (or patch), but linear in the number of particles (patches) if their discretization is kept fixed. For the Spectral Ewald method, the computational cost scales like _O_ ( _N_ log _N_ ), where _N_ is the number of unknowns in the system (i.e. three times the total number of grid points), assuming that the number of grid points within a ball of radius _r_ c does not change. In other words, for fixed grid resolution and particle concentration, the time required per GMRES iteration when solving the boundary integral equation is expected to scale like _O_ ( _N_ log _N_ ). To test this scaling, we consider a problem with many rod particles confined in a pipe, shown in Figure 32: one 34 _J. Bagge and A.-K. Tornberg_ segment (a) consists of a pipe segment of radius 0.3 and length 0.2 confined in a periodic cell of size _B_ = (0.2, 1, 1), with 20 rods of length _L_ = 0.25 and radius _R_ = _L_ /12 (aspect ratio 6) inside the pipe. <sup>13</sup> This segment is replicated to create a longer pipe, up to 12 times the original length (shown in (b)), with the same grid point concentration as the original segment. For 1, 2, 3, . . ., 12 segments, we solve a resistance problem in which all particles are stationary and a quadratic background flow _u_ bg( _x_ ) = <u>3</u> - _A_ 2 − _x_ <u>22</u> <sup><u>−</u></sup> <sup>_x_</sup> <sup>2</sup>, 0, 0 _A_ <sup>~~2~~</sup> (62) is applied, where _A_ = 0.3 is the radius of the pipe and ( _x_ 2, _x_ 3) = (0, 0) is its centre line. (a) 1 segment (b) 12 segments Figure 32. The geometry in section 7.3.1 is made up of stacked identical segments, where each segment contains 20 rods and 2 × 20 pipe patches. In total, there are 27 360 grid points and 82 080 unknowns in each segment. As seen in Figure 33 (a), the time per GMRES iteration follows the expected scaling _O_ ( _N_ log _N_ ). Since the structure of the linear system changes as the number of segments _n_ s grows, the number of GMRES iterations grows slightly with _n_ s. However, this growth is slow enough for the total solving time to also follow the scaling _O_ ( _N_ log _N_ ), as shown in Figure 33 (b). 0 2 4 6 8 10 12 Number of segments ns (b) Total solving time 150 120 90 60 30 0 0 2 4 6 8 10 12 Number of segments ns (a) Time per GMRES iteration 180 150 120 90 60 30 0 Figure 33. Time required to solve the resistance problem for the geometry in Figure 32 with GMRES tolerance 10 <sup>−6</sup> in MATLAB, (a) per GMRES iteration and (b) in total. With 82 080 unknowns per segment, the number of unknowns ranges from 82 080 to 984 960. The dashed curves are least-squares fits of _T_ = _An_ s log _n_ s + _B n_ s + _C_ to the data, where _n_ s is the number of segments. In (a), _A_ = 5.8, _B_ = −2.4, _C_ = 12.2 (seconds), and in (b), _A_ = 9.0, _B_ = −8.7, _C_ = 18.6 (minutes). Thus, the time scales as _O_ ( _n_ s log _n_ s). <u>13</u> The discretization, special quadrature parameters and Spectral Ewald parameters are fixed as follows. Each pipe patch has 6 × 6 grid points, and each rod is discretized using _n_ 1 = 16, _n_ 2 = 40 and _nφ_ = 18 (1296 grid points per rod). The special quadrature parameters are selected for tolerance _ε_ tol = 10 <sup>−4</sup>, and they are for the pipe _d_ QBX = 0.0319, _p_ QBX = 8, _κ_ QBX = 10 and _N_ U = 1, _d_ U1 = 0.0720; and for the rods _d_ QBX = 0.0110, _p_ QBX = 19, _κ_ QBX = 10 and _N_ U = 1, _d_ U1 = 0.0254. The Spectral Ewald parameters are _ξ_ = 52.954, _r_ c = 0.0897, _P_ = 16, and the uniform grid for the Fourier-space part has 32per rod. _n_ s × 160 × 160 grid points, where _n_ s is the number of segments. Furthermore, we use _N_ src = 45 completion sources _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 35 _7.3.2. Streamline computation_ In the postprocessing step (step 4 of the method summary), streamlines may be computed to visualize the flow field. When using the Spectral Ewald method, the Fourier-space part on the uniform grid can be reused to reduce the computation time, as described in appendix D. Here, we compute streamlines for a periodic resistance problem with 100 rods in a pipe segment of length 1, otherwise identical to the problem in section 7.3.1 (including all parameters). Figure 34 shows 95 streamlines; a typical streamline consists of around 3000 points and takes around 2 minutes to compute (i.e. around 0.04 seconds per time step). A slice of the same flow field is shown in Figure 35. 0 _._ 1 0 _._ 08 0 _._ 06 0 _._ 04 0 _._ 02 0 Figure 34. Streamlines for the resistance problem (colour indicate velocity magnitude). 0 _._ 03 0 _._ 02 0 _._ 01 0 Streamwise velocity Transverse velocity 0 _._ 1 0 _._ 08 0 _._ 06 0 _._ 04 0 _._ 02 0 Figure 35. Flow field shown in a slice at streamwise position _x_ = 2/3. 8. Effects of nonsmooth geometries So far, all geometrical objects considered in this paper have been smooth. In fact, special care has been taken to ensure that the rod particles, constructed in appendix B, are everywhere smooth. The reason is that, as noted in [14], the convergence of the local expansions used in QBX depends on the smoothness of the boundary close to the expansion centre. In this section, we demonstrate this using two different rod particles: one smooth and one nonsmooth, shown in Figure 36 (a). The rods are both of length _L_ and radius _R_, but the smooth rod is constructed as in appendix B, while the nonsmooth rod consists of a cylinder of radius _R_ and length _L_ - 2 _R_ joined to two halfspherical caps of radius _R_ . The nonsmooth rod is thus of class _C_ <sup>1</sup>, since the curvature is discontinuous where the cylinder meets the spherical caps. To illustrate the convergence of QBX, consider rods with _L_ / _R_ = 20 (aspect ratio 10), discretized using _n_ 1 = 35, _n_ 2 = 60, _nφ_ = 18 as described in section 3.1. In Figure 36 (b), the onsurface QBX stresslet identity error is plotted as a function of _p_ QBX, in the same way as in section 6.3 (where this was done for the smooth rod). Clearly, the convergence with respect to _p_ QBX is much worse for the nonsmooth rod compared to the smooth one. The reason for this can be seen in Figure 37: the error decays extremely slowly close to the boundary between the cylinder and 36 _J. Bagge and A.-K. Tornberg_ the caps, where the curvature is discontinuous. This is clearly a local effect, since the convergence is fine a little bit away from the discontinuity. It should be noted that it is entirely possible to use QBX on a nonsmooth geometry, but it requires special measures to be taken. In [29], QBX was applied to a geometry with a corner. In that example, the discretization was dyadically refined around the corner, to ensure that the layer potential appears locally smooth on the scale of the discretization. The same approach could likely be taken also for the nonsmooth rod particle, i.e. refining the grid dyadically around the discontinuity. However, constructing the rod to be smooth in the first place has a clear advantage in this case, since no grid refinement is needed. 10 <sup>2</sup> 10 <sup>0</sup> 5 10 15 20 25 30 pQBX (b) QBX onsurface error Smooth, QBX <sup>= 5</sup> Smooth, QBX <sup>= 10</sup> Smooth, QBX <sup>= 15</sup> Nonsmooth, QBX <sup>= 5</sup> Nonsmooth, QBX <sup>= 10</sup> Nonsmooth, QBX <sup>= 15</sup> Smooth rod Nonsmooth rod 10 2 10 4 10 6 10 8 (a) Geometries Figure 36. (a) A smooth and a nonsmooth rod, both of length _L_ and radius _R_ . Note that each cap of the smooth rod (marked with red lines) has length 1.5 _R_, while each cap of the nonsmooth rod has length _R_ . (b) Maximal onsurface QBX stresslet identity error for the smooth and nonsmooth rod, with expansion radius _r_ QBX = _h_ = 2 _πR_ / _nφ_ fixed. Smooth rod ~~<u>Smooth</u>~~ ~~<u>rod</u>~~ N ~~<u>onsmoo</u>~~ th ~~<u>rod</u>~~ 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> Nonsmooth rod 10 <sup>−2</sup> 10 <sup>−4</sup> 10 <sup>−6</sup> 10 <sup>−8</sup> 10 <sup>−10</sup> 10 <sup>−12</sup> 10 <sup>−14</sup> (a) (b) F ~~i~~ ~~<mark>gure 3</mark>~~ ~~7~~ . (a) The QBX ~~s~~ ~~<mark>tresslet</mark>~~ identity error shown in a slice through selected balls of convergence, for _r_ QBX = _h_, _p_ QBX = 25 an <mark>d</mark> _κ_ QBX = 15. (b) The o <mark>nsurfac</mark> e QBX error on the rods, with the same parameters as in (a). 9. Conclusions We have presented a numerical method based on a boundary integral formulation that can be used to simulate rigid particles in Stokes flow with confining walls. A parameter selection strategy has also been presented for the combined special quadrature used in this method. We have demonstrated that the error of the method is controlled by the special quadrature tolerance as long as the layer density is well-resolved, and that the method scales as _O_ ( _N_ log _N_ ) in the number of unknowns _N_ for fixed grid point concentration. This makes it possible to simulate systems with a large number of particles. The method can deal with particles and walls of different shapes; we have here considered spheroids, rod particles, pipes and plane walls, but it is straightforward to extend the method to any smooth geometry with sufficient symmetry. The method could be further improved for example by using local patch-based quadrature for elongated particles to reduce the size of the QBX matrices, and allowing the size of the wall patches to be set adaptively so that the resolution can be focused where particles are close to the wall. It could also be useful to allow parameters such as _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 37 _p_ QBX to vary along the particle surface (in response to differences in the convergence rate of the local expansions, as seen e.g. in Figure 37), and to allow the expansion centres for QBX to be placed independently of the grid points of the discretization, so that the centres can be placed closer to the surface in order to decrease the expansion order _p_ QBX. Furthermore, if analytical quadrature error estimates were available, these could replace the numerical experiments used to select threshold distances and the QBX upsampling factor. Acknowledgements This work has been supported by the Göran Gustafsson Foundation for Research in Natural Sciences and by the Swedish Research Council under grant no. 2015-04998. The authors gratefully acknowledge this support. The authors are grateful to Dr. Ludvig af Klinteberg for providing us with an implementation of QBX for spheroidal particles, parts of which were reused in this work. Appendix A. The stresslet identity for plane walls and pipes Here we show that a variant of the stresslet identity (5) holds for a pair of parallel infinite plane walls (in section A.1) and an infinitely long pipe (in section A.2). _A.1. A pair of parallel plane walls_ Let Γ1 and Γ2 be two parallel infinite planes oriented as shown in Figure 38, one wall placed at _x_ 3 = _a_ and the other at _x_ 3 = - _a_ for some _a_ - 0. Let the domain between the two walls (which we will think of as the fluid domain) be denoted by Ω. _x_ 3 _n_ <sup>1</sup> _x_ 1 _n_ <sup>2</sup> Γ1 = { _x_ ∈ R <sup>3</sup> : _x_ 3 = _a_ } Ω = { _x_ ∈ R <sup>3</sup> : − _a_ < _x_ 3 < _a_ } Γ2 = { _x_ ∈ R <sup>3</sup> : _x_ 3 = − _a_ } Figure 38. Two parallel infinite planes Γ1 and Γ2. Let Γ <sup>˜</sup> = Γ1 ∪ Γ2, and let _q_ ˜ ∈ R <sup>3</sup> be any constant vector. We shall show that D [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = −8 _π_ ˜ _q_, if _x_ ∈ Ω, −4 _π_ ˜ _q_, if _x_ ∈ Γ <sup>˜</sup>, 0, otherwise, (63) where the double layer potential D is given by (3). Since _q_ ˜ is constant and the normals are given by _n_ <sup>1</sup> = (0, 0, −1) and _n_ <sup>2</sup> = (0, 0, 1), we can write D _i_ [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = _q_ ˜ _j_ ∫ Γ˜ _Tijk_ ( _x_ - _y_ ) _nk_ ( _y_ ) d _S_ ( _y_ ) (64) = − _q_ ˜ _j_ ∫ Γ1 _Tij_ 3( _x_ - _y_ ) d _S_ ( _y_ ) ∫ Γ2 _Tij_ 3( _x_ - _y_ ) d _S_ ( _y_ ) + _q_ ˜ _j_ . (65) �������������������������������������������� �������������������������������������������� _J_ <sup>2</sup> _Jij_ <sup>1</sup> _Jij_ <sup>1</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> _Jij_ <sup>2</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> The two integrals which we have called _Jij_ <sup>1</sup> _ij_ <sup>1</sup> <sup>and</sup> <sup>_J_</sup> _ij_ <sup>2</sup> _ij_ <sup>2</sup> <sup>can both be expressed in terms of the integral</sup> _J_ <sup>0</sup> _ij_ <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> ∫ Γ0 _Tij_ 3( _x_ - _y_ ) d _S_ ( _y_ ), (66) 38 _J. Bagge and A.-K. Tornberg_ where Γ0 = { _x_ ∈ R <sup>3</sup> : _x_ 3 = 0}. The integrals are related through _Jij_ <sup>0</sup> _ij_ <sup>1</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_ae_</sup> <sup>3) =</sup> <sup>_J_</sup> _ij_ <sup>2</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>1</sup> where Γ0 = { _x_ ∈ R <sup>3</sup> : _x_ 3 = 0}. The integrals are related through _Jij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>1</sup> <sup>(</sup> <sup>_x_</sup> <sup>+</sup> <sup>_ae_</sup> <sup>3) =</sup> <sup>_J_</sup> _ij_ <sup>2</sup> <sup>(</sup> <sup>_x_</sup> <sup>−</sup> <sup>_ae_</sup> <sup>3), with</sup> <sup>_e_</sup> <sup>3</sup> <sup>= (0, 0, 1).</sup> In fact, since Γ0 is infinite, the integral _Jij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>) as given by (66) depends only on</sup> <sup>_x_</sup> <sup>3, i.e.</sup> _Jij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>) as given by (66) depends only on</sup> <sup>_x_</sup> <sup>3, i.e.</sup> _Jij_ <sup>0</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>0</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3) =</sup> ∫ Γ0 _Tij_ 3( _x_ 3 _e_ 3 − _y_ ) d _S_ ( _y_ ). (67) Inserting the expression for the stresslet _T_ from (3) into (67), we find ( _y_ 1 <sup>~~2~~</sup> <u>−</u> _yi_ <u>)(</u> _x_ <u>3</u> _δj_ <u>3 −</u> _yj_ <u>)</u> d _y_ 1d _y_ 2, (68) 1 <sup>~~2~~</sup> <sup>+</sup> <sup>_y_</sup> 2 <sup>~~2~~</sup> <sup>+</sup> <sup>_x_</sup> 3 <sup>~~2~~</sup> <sup>)5/2</sup> _Jij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3) = −6</sup> <sup>_x_</sup> <sup>3</sup> _Jij_ <sup>0</sup> ∫ ∞ −∞ ∫ ∞ −∞ <u>(</u> _x_ <u>3</u> _δi_ <u>3 −</u> _yi_ <u>)(</u> _x_ <u>3</u> _δj_ <u>3 −</u> _yj_ <u>)</u> where _y_ 3 = 0. This double integral can be computed analytically, and the result is _Jij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3) = −4</sup> <sup>_π_</sup> <sup>sgn(</sup> <sup>_x_</sup> <sup>3)</sup> <sup>_δij_</sup> <sup>,</sup> (69) where sgn(·) denotes the sign function. Using the relations _Jij_ <sup>1</sup> (69) into (65), we get _ij_ <sup>1</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>0</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3 −</sup> <sup>_a_</sup> <sup>) and</sup> <sup>_J_</sup> _ij_ <sup>2</sup> _ij_ <sup>2</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>0</sup> where sgn(·) denotes the sign function. Using the relations _Jij_ <sup>1</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3 −</sup> <sup>_a_</sup> <sup>) and</sup> <sup>_J_</sup> _ij_ <sup>2</sup> <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <sup>_J_</sup> _ij_ <sup>0</sup> <sup>(</sup> <sup>_x_</sup> <sup>3 +</sup> <sup>_a_</sup> <sup>) and inserting</sup> (69) into (65), we get From this the result (63) follows. _A.2. A pipe_ D _i_ [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = 4 _π_ ˜ _qi_ sgn( _x_ 3 − _a_ ) − 4 _π_ ˜ _qi_ sgn( _x_ 3 + _a_ ). (70) Let now Γ <sup>˜</sup> be an infinitely long pipe given by the equation _x_ 2 <sup>2</sup> <sup>+</sup> <sup>_x_</sup> 3 <sup>2</sup> <sup>=</sup> <sup>_a_</sup> <sup>2</sup> <sup>for some</sup> <sup>_a_</sup> <sup>></sup> <sup>0, as shown in Figure 39.</sup> <sup>Let</sup> the domain inside the pipe be denoted by Ω. We shall show that for any constant vector _q_ ˜ ∈ R <sup>3</sup>, the identity (63) holds. 2 <sup>+</sup> <sup>_x_</sup> <sup>2</sup> Γ˜ = { _x_ ∈ R <sup>3</sup> : _x_ <sup>2</sup> 3 <sup>=</sup> <sup>_a_</sup> <sup>2}</sup> _n_ _x_ 1 _n_ 2 <sup>+</sup> <sup>_x_</sup> <sup>2</sup> <sup>2</sup> 3 <sup><</sup> <sup>_a_</sup> <sup>2}</sup> 2 Ω = { _x_ ∈ R <sup>3</sup> : _x_ <sup>2</sup> Figure 39. An infinite cylindrical pipe Γ <sup>˜</sup> . Let us introduce cylindrical coordinates and write _x_ = _x_ 1 _e_ 1 + _reφ_ and _y_ = _y_ 1 _e_ 1 + _aeθ_ for the evaluation point and integration variable, respectively. The unit vectors are given by _e_ 1 = (1, 0, 0), _eφ_ = (0, cos _φ_, sin _φ_ ) and _eθ_ = (0, cos _θ_, sin _θ_ ), (71) and _r_ ≥ 0. Using the fact that the normal vector is given by _n_ ( _y_ ) = - _eθ_, we can write the double layer potential from (3) as ∫ ∞ _Tijk_ ( _x_ 1 _e_ 1 + _reφ_ - _y_ 1 _e_ 1 − _aeθ_ )( _eθ_ ) _k a_ d _y_ 1d _θ_, (72) D _i_ [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = − _q_ ˜ _j_ ∫ 2 _π_ 0 −∞ where ( _eθ_ ) _k_ denotes the _k_ th component of _eθ_ . Using the variable substitution _y_ 1 - _x_ 1 = _u_, we can eliminate _x_ 1. Writing out the stresslet _T_ from (3), and using a few trigonometric identities, the integral in (72) can be written as ∫ 2 _π_ D _i_ [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = 6 ˜ _qja_ 0 ∫ ∞ −∞ <u>(</u> _reφ_ <u>−</u> _ue_ <u>1 −</u> _aeθ_ <u>)</u> _i_ <u>(</u> _reφ_ <u>−</u> _ue_ <u>1 −</u> _aeθ_ <u>)</u> _j_ <u>(</u> _r_ cos( _φ_ <u>−</u> _θ_ <u>) −</u> _a_ <u>)</u> _aeθ_ <u>)</u> _i_ <u>(</u> _reφ_ <u>−</u> _ue_ <u>1 −</u> _aeθ_ <u>)</u> _j_ <u>(</u> _r_ cos( _φ_ <u>−</u> _θ_ <u>) −</u> _a_ <u>)</u> d _u_ d _θ_ <u>�</u> _u_ 2 + _r_ 2 + _a_ 2 − 2 _ra_ cos( _φ_ - _θ_ )� <u>5/2</u> . (73) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ _Iij_ ( _r_, _φ_ ) At this point it is not immediately apparent that the integral which we have called _Iij_ ( _r_, _φ_ ) is independent of _φ_, but that does indeed turn out to be the case. We expect the offdiagonal elements of _Iij_ to be zero, which can be verified by first integrating in _u_ and then in _θ_ . It thus remains to compute the diagonal elements of _Iij_ . To compute _I_ 11, first integrate in _u_ using the formula _C_ - 0. (74) <u>3</u> _C_ <sup>,</sup> <sup><u>2</u></sup> ∫ ∞ −∞ _<u>u</u>_ <sup>2</sup> <u>3</u> _C_ ( _u_ <sup><u>2</u></sup> + _C_ ) <sup><u>5/2</u></sup> <sup>d</sup> <sup>_u_</sup> <sup>=</sup> <sup><u>2</u></sup> _<u>u</u>_ <sup>2</sup> _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 39 The outer integral becomes ∫ 2 _π_ _I_ 11( _r_, _φ_ ) = <sup><u>2</u></sup> <u>3</u> 0 _r_ <sup>~~2~~</sup> + _<u>r a</u>_ <u>cos</u> <sup>~~2~~</sup> −( _<u>φ</u>_ <u>2</u> _ra_ <u>− cos</u> _<u>θ</u>_ <u>) −(</u> _φa_ - _θ_ ) <sup>d</sup> <sup>_θ_</sup> <sup>.</sup> (75) The variable _φ_ can now be eliminated using the substitution _θ_ - _φ_ = _ν_ (and the limits shifted back to [0, 2 _π_ ] due to periodicity). The value of the integral can then be calculated to be (76) _I_ 11( _r_, _φ_ ) = <sup><u>2</u></sup> <u>3</u> <sup>_<u>π</u>_</sup> _a_ - sgn( _r_ - _a_ ) − 1�, _r_ ≥ 0, where sgn(·) is the sign function. To compute _I_ 22, first integrate in _u_ using the formula <u>1</u> <u>4</u> _C_ - 0, (77) <u>3</u> _C_ <sup>~~2~~</sup> <sup>,</sup> ( _u_ <sup><u>2</u></sup> + _C_ ) <sup><u>5/2</u></sup> <sup>d</sup> <sup>_u_</sup> <sup>=</sup> to get _I_ 22( _r_, _φ_ ) = <u>3</u> <sup><u>4</u></sup> ∫ ∞ −∞ _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>cos</u> _<u>θ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos(</u> _<u>φ</u>_ <u>−</u> _<u>θ</u>_ <u>) −</u> _<u>a</u>_ <u>)</u> d _θ_ . (78) ( _r_ <sup>~~2~~</sup> + _a_ <sup>~~2~~</sup> - <u>2</u> _ra_ <u>cos(</u> _φ_ - _θ_ )) <sup>~~2~~</sup> ∫ 2 _π_ 0 <u>(</u> _<u>r</u>_ <u>cos</u> _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>cos</u> _<u>θ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos(</u> _<u>φ</u>_ <u>−</u> _<u>θ</u>_ <u>) −</u> _<u>a</u>_ <u>)</u> Using the substitution _θ_ - _φ_ = _ν_ and shifting the limits back to [0, 2 _π_ ] yields the integral _<u>ν</u>_ <u>cos</u> _<u>φ</u>_ <u>+</u> _<u>a</u>_ <u>sin</u> _<u>ν</u>_ <u>sin</u> _<u>φ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos</u> _<u>ν</u>_ <u>−</u> _<u>a</u>_ <u>)</u> d _ν_, (79) ( _r_ <sup>~~2~~</sup> + _a_ <sup>~~2~~</sup> - <u>2</u> _ra_ <u>cos</u> _ν_ ) <sup>~~2~~</sup> _I_ 22( _r_, _φ_ ) = <sup><u>4</u></sup> <u>3</u> ∫ 2 _π_ 0 <u>(</u> _<u>r</u>_ <u>cos</u> _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>cos</u> _<u>ν</u>_ <u>cos</u> _<u>φ</u>_ <u>+</u> _<u>a</u>_ <u>sin</u> _<u>ν</u>_ <u>sin</u> _<u>φ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos</u> _<u>ν</u>_ <u>−</u> _<u>a</u>_ <u>)</u> which we compute by expanding the square in the numerator, thus splitting the integral into six terms, after which each term can be integrated separately. The result is (80) _I_ 22( _r_, _φ_ ) = <sup><u>2</u></sup> <u>3</u> <sup>_<u>π</u>_</sup> _a_ - sgn( _r_ - _a_ ) − 1�, _r_ ≥ 0. Note that the dependence on _φ_ disappears when summing the six terms to get the above result. Finally, to compute _I_ 33, we again start by integrating in _u_ using (77), after which we use the substitution _θ_ - _φ_ = _ν_ to get <u>(</u> _<u>r</u>_ <u>sin</u> _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>cos</u> _<u>ν</u>_ <u>sin</u> _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>sin</u> _<u>ν</u>_ <u>cos</u> _<u>φ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos</u> _<u>ν</u>_ <u>−</u> _<u>a</u>_ <u>)</u> _<u>ν</u>_ <u>sin</u> _<u>φ</u>_ <u>−</u> _<u>a</u>_ <u>sin</u> _<u>ν</u>_ <u>cos</u> _<u>φ</u>_ <u>)</u> <sup>2</sup> <u>(</u> _<u>r</u>_ <u>cos</u> _<u>ν</u>_ <u>−</u> _<u>a</u>_ <u>)</u> d _ν_ . (81) ( _r_ <sup>~~2~~</sup> + _a_ <sup>~~2~~</sup> - <u>2</u> _ra_ <u>cos</u> _ν_ ) <sup>~~2~~</sup> _I_ 33( _r_, _φ_ ) = <sup><u>4</u></sup> <u>3</u> ∫ 2 _π_ <u>3</u> 0 Comparing (79) and (81), note that _I_ 33( _r_, _φ_ + _π_ /2) = _I_ 22( _r_, _φ_ ). But as we saw in (80), _I_ 22 does not depend on _φ_, so _I_ 33 = _I_ 22. To summarize, we have shown that (82) _Iij_ ( _r_, _φ_ ) = <sup><u>2</u></sup> <u>3</u> <sup>_<u>π</u>_</sup> _a_ �sgn( _r_ - _a_ ) − 1� _δij_ . Inserting this into (73), we find that D _i_ [Γ <sup>˜</sup>, _q_ ˜ ]( _x_ ) = 4 _π_ ˜ _qi_ from which the result (63) follows for the pipe. Appendix B. Construction of smooth rod particles �sgn( _r_ - _a_ ) − 1�, (83) In this section, we describe how the rod particles are constructed to ensure that they are smooth everywhere. Recall from section 3.1 the parametrization _x_ 1 = _ϱ_ ( _θ_ ; _L_, _R_ ) cos _φ_, _x_ 2 = _ϱ_ ( _θ_ ; _L_, _R_ ) sin _φ_, _x_ 3 = _β_ ( _θ_ ; _L_, _R_ ),   (84) of the rod, where _φ_ ∈[0, 2 _π_ ) and _θ_ ∈[0, _π_ ] are parameters, _L_ is the length of the rod and _R_ the radius. The goal here is to derive the shape functions _ϱ_ (· ; _L_, _R_ ) : [0, _π_ ] →[0, _R_ ] and _β_ (· ; _L_, _R_ ) : [0, _π_ ] →[− <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>,</sup> <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>] so that the rod</sup> has the smooth shape shown in Figure 40. The rod consists of three smoothly joined parts: a top cap, corresponding here is to derive the shape functions _ϱ_ (· ; _L_, _R_ ) : [0, _π_ ] →[0, _R_ ] and _β_ (· ; _L_, _R_ ) : [0, _π_ ] →[− <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>,</sup> <sup><u>1</u></sup> ~~2~~ <sup>_L_</sup> <sup>] so that the rod</sup> has the smooth shape shown in Figure 40. The rod consists of three smoothly joined parts: a top cap, corresponding to _θ_ ∈ _I_ 1 = [0, _π_ /3]; a middle cylinder, corresponding to _θ_ ∈ _I_ 2 = [ _π_ /3, 2 _π_ /3]; and a bottom cap, corresponding to 40 _J. Bagge and A.-K. Tornberg_ _훽_ ( _휃_ = 0) _~~훽~~_ A _퐿_ cap <u>C</u> <u>B</u> _퐿_ _휚_ _푅_ <u>(</u> _<u>휃</u>_ = _휋_ /3) Figure 40. The shape of the smooth rod, here with _L_ = 10 and _R_ = 0.5. _θ_ ∈ _I_ 3 = [2 _π_ /3, _π_ ]. Let the length of each cap be _L_ cap, as shown in Figure 40. The ratio _L_ cap/ _R_ determines the aspect ratio of the cap. Here, we fix this ratio by setting _L_ cap to _L_ cap = 1.5 _R_, (85) which gives the cap a shape similar to a half-sphere. The length of the middle cylinder is then _L_ mid = _L_ - 3 _R_ . (86) However, note that the derivation below is valid for any value of _L_ cap ∈(0, _L_ /2), with _L_ mid = _L_ - 2 _L_ cap. Let us for fixed _L_ and _R_ define _д_ ( _θ_ ) = ( _д_ 1( _θ_ ), _д_ 2( _θ_ )) = ( _ϱ_ ( _θ_ ; _L_, _R_ ), _β_ ( _θ_ ; _L_, _R_ )). For the middle cylinder, the parametrization is <sup><u>mid</u></sup> (87) <u>2</u> <sup>,</sup> _θ_ ∈ _I_ 2 = [ _π_ /3, 2 _π_ /3]. _д_ 1( _θ_ ) = _R_, _д_ 2( _θ_ ) = 1 − _π_ <sup><u>3</u></sup> <sup>_θ_</sup> - _L_ mid + <sup>_<u>L</u>_</sup> <sup><u>mid</u></sup> <u>2</u> Note that _д_ 2 is simply an affine function of _θ_ . At the endpoints of the interval _I_ 2 we have _д_ ( _π_ /3) = ( _R_, _L_ mid/2), and (88) _д_ <sup>′</sup> ( _π_ /3) = (0, −(3/ _π_ ) _L_ mid), _д_ <sup>(</sup> <sup>_n_</sup> <sup>)</sup> (2 _π_ /3) = (0, 0), _n_ ≥ 2. _д_ <sup>′</sup> (2 _π_ /3) = (0, −(3/ _π_ ) _L_ mid), _д_ (2 _π_ /3) = ( _R_, − _L_ mid/2), _д_ <sup>(</sup> <sup>_n_</sup> <sup>)</sup> ( _π_ /3) = (0, 0), _n_ ≥ 2, Our goal is now to extend the parametrization _д_ ( _θ_ ) to _I_ 1 and _I_ 3 in a way such that the unit tangent vector _д_ <sup>′</sup> ( _θ_ )/| _д_ <sup>′</sup> ( _θ_ )| and its higher derivatives are continuous everywhere. As an intermediate step we introduce an auxiliary function - _д_ ( _t_ ) = ( _д_ �1( _t_ ), � _д_ 2( _t_ )) with a different parameter _t_ ∈[−1, 1]. The function � _д_ should trace the curve from C to B via A in Figure 40, with C corresponding to _t_ = −1, A corresponding to _t_ = 0 and B corresponding to _t_ = 1. We will later relate _t_ ∈[0, 1] to _θ_ ∈[0, _π_ /3] to get the final parametrization. At this point, note that to match (88) we must require - _д_ (1) = ( _R_, _L_ mid/2), and (89) - _д_ <sup>′</sup> (1) = (0, − _b_ ), - _д_ <sup>′</sup> (−1) = (0, _b_ ), - _д_ (−1) = (− _R_, _L_ mid/2), - _д_ <sup>(</sup> <sup>_n_</sup> <sup>)</sup> (1) = (0, 0), _n_ ≥ 2, - _д_ <sup>(</sup> <sup>_n_</sup> <sup>)</sup> (−1) = (0, 0), _n_ ≥ 2, where _b_ is some positive constant. In order to construct � _д_ ( _t_ ) we will use a bump function _ψ_ : R → R, which must satisfy the following: - _ψ_ must be infinitely differentiable on R, - _ψ_ must have compact support in [−1, 1], i.e. _ψ_ ( _t_ ) = 0 if _t_ - 1 or _t_ < −1, - _ψ_ ( _t_ ) must be positive for _t_ ∈(−1, 1), - _ψ_ must be even, i.e. _ψ_ ( _t_ ) = _ψ_ (− _t_ ) for all _t_ ∈ R. _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 41 We also introduce its primitive function Ψ( _t_ ) = ∫ _t_ 0 _ψ_ ( _τ_ ) d _τ_, _t_ ∈ R, (90) which is an odd function since _ψ_ is even. We choose a specific bump function, namely <sup>14</sup> (91) (92) <u>(</u> _<u>t</u>_ <sup>2</sup> <u>+ 1) exp[4</u> _<u>t</u>_ <u>/(</u> _<u>t</u>_ <sup>2</sup> <u>−</u> <u>1)]</u> <u>�(</u> _t_ <sup>2</sup> - 1)(1 + exp[4 _t_ /( _t_ <sup>2</sup> - 1)]) <u>�</u> ~~2~~ <sup>,</sup> if _t_ ∈(−1, 1), _ψ_ ( _t_ ) =   0, otherwise. This function has the primitive function Ψ( _t_ ) = We now construct � _д_ ( _t_ ) as   - <sup><u>1</u></sup> <u>8</u> - <u>8</u> <sup><u>1</u></sup> <u>2</u> _<u>t</u>_ <sup><u>1</u></sup> <u>8</u> <sup>tanh</sup> <u>1 −</u> _t_ <sup>~~2~~</sup> , if _t_ ∈(−1, 1), <u>8</u> <sup><u>1</u></sup> <sup>,</sup> if _t_ ≤−1, <u>1</u> <u>8</u> <sup>,</sup> if _t_ ≥ 1. _д_ �1( _t_ ) = _R_ <sup><u>Ψ(</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> _д_ �2( _t_ ) = <sup>_<u>L</u>_</sup> <sup><u>mid</u></sup> <u>2</u> - _b_ Ψ(1) <sup>,</sup> ∫ _t_ −1 <u>Ψ(</u> _<u>τ</u>_ <u>)</u> (93) Ψ(1) <sup>d</sup> <sup>_τ_</sup> <sup>,</sup> _t_ ∈[−1, 1], which satisfies (89). We can determine _b_ by noting that we must have � _д_ 2(0) = _L_ /2 (at point A in Figure 40), which yields _b_ = _L_ cap <u>Ψ(1)</u> <u>∫</u> ~~1~~ <u>Ψ(1)</u> . (94) ~~1~~ 0 <sup>Ψ(</sup> <sup>_τ_</sup> <sup>) d</sup> <sup>_τ_</sup> The integrals of Ψ in (93) and (94) are computed numerically using MATLAB’s _integral_ function. Finally, we go from the parameter _t_ to the parameter _θ_ . We would like the discretization points to be distributed as Gauss–Legendre points in the arclength, and so we must choose _θ_ so that it is proportional to the arclength on the caps. Consider the arclength _s_ ( _t_ ) = ∫ _t_ 0 |� _д_ <sup>′</sup> ( _τ_ )| d _τ_, _t_ ∈[0, 1]. (95) Let us then define _θ_ = _G_ ( _t_ ) = <sup>_<u>π</u>_</sup> <u>3</u> _<u>s</u>_ <u>(</u> _<u>t</u>_ <u>)</u> (96) <sup>_<u>π</u>_</sup> <u>3</u> _t_ ∈[0, 1], _s_ (1) <sup>,</sup> and note that this defines _θ_ ∈ _I_ 1 = [0, _π_ /3] as an invertible function of _t_ ∈[0, 1]. We can now define _д_ ( _θ_ ) = _д_ ( _G_ ( _t_ )) = - _д_ ( _t_ ) for _t_ ∈[0, 1], and thus _д_ ( _θ_ ) = � _д_ ( _G_ <sup>−1</sup> ( _θ_ )), _θ_ ∈ _I_ 1 = [0, _π_ /3]. (97) The bottom cap should be the reflection of the top cap in the plane corresponding to _β_ = 0, so (98) _д_ ( _θ_ ) = ( _д_ 1( _π_ - _θ_ ), − _д_ 2( _π_ - _θ_ )), _θ_ ∈ _I_ 3 = [2 _π_ /3, _π_ ]. Now that we have defined _д_ ( _θ_ ) for all _θ_ ∈[0, _π_ ], its two components _д_ 1 and _д_ 2 correspond to the shape factors _ϱ_ ( _θ_ ; _L_, _R_ ) and _β_ ( _θ_ ; _L_, _R_ ), respectively, which are to be used in (84). Appendix C. Derivation of the safety factor _γ_ Recall from section 6 that one may want to select _d_ QBX larger than _r_ QBX since QBX may be faster than the upsampled quadrature due to the precomputation scheme. Let us call the set of points of the QBX region with distance to Γ greater than _r_ QBX the _upper_ QBX region, and the set of points with distance to Γ smaller than _r_ QBX the _lower_ QBX region, as shown in Figure 41 (a). As noted in section 6.1.2, putting _d_ QBX = 2 _r_ QBX would lead to some areas of the upper QBX region not falling within any ball of convergence. To avoid this, we introduce a safety factor _γ_ and require that _d_ QBX ≤ 2 _γr_ QBX. (99) 42 _J. Bagge and A.-K. Tornberg_ <u>C</u> D E √ ~~2~~ _ℎ_ _ℎ_ <u>F</u> _ℎ_ <u>G</u> (b) <u>A</u> <u>B</u> _푟_ QBX Surface Γ _ℎ_ (a) _푑_ QBX <u>Upper</u> <u>Lower</u> Figure 41. (a) Balls of convergence for a flat surface Γ (c.f. Figure 18), seen from the side. (b) Grid points of Γ, seen from above. Here, _h_ is the largest spacing between grid points in each tensorial direction. The goal here is to derive the value of the safety factor _γ_ . We assume for simplicity that Γ is a flat surface. The key is to choose _d_ QBX below the intersection of neighbouring balls of convergence, marked by the point C in Figure 41 (a). Since the grid on Γ is two-dimensional, the largest distance between neighbouring grid points is not _h_ but √ ~~2~~ _h_, where _h_ is as shown in Figure 41 (b). The four balls of convergence of the expansion centres above the √ _h_ but √ ~~2~~ _h_, where _h_ is as shown in Figure 41 (b). The four balls of convergence of the expansion centres above the grid points D–G in this figure intersect at distance <u>�</u> ~~<u>√2</u>~~ _<u>h</u>_ <u>2</u> <u>�</u> <u>2</u> (100) _d_ ⋆( _h_ ) = _r_ QBX + ~~�~~ _r_ <sup>2</sup> QBX <sup>−</sup> from Γ. Thus, choosing _d_ QBX ≤ _d_ ⋆( _h_ ) is sufficient to ensure that all points in the upper QBX region fall within a ball of convergence. This restriction on _d_ QBX can be simplified by minimizing _d_ ⋆( _h_ ) with respect to _h_, subject to the constraint 0 < _h_ ≤ _r_ QBX. The result is _d_ ⋆⋆ = 0<min _h_ ≤ _r_ QBX <sup>_d_</sup> <sup>⋆(</sup> <sup>_h_</sup> <sup>) =</sup> <sup>_d_</sup> <sup>⋆(</sup> <sup>_r_</sup> <sup>QBX) =</sup> 1 + ~~√~~ <sup><u>1</u></sup> ~~2~~ _r_ QBX. (101) It is thus sufficient to require that _d_ QBX ≤ _d_ ⋆⋆. Comparing (101) and (99), we see that the safety factor should be _γ_ = <sup><u>1</u></sup> <u>2</u> 1 + <sup><u>1</u></sup> ~~√~~ ~~2~~ ≈ 0.85. (102) This derivation holds when Γ is a flat surface, in which case the requirement (99) with _γ_ = 0.85 guarantees that all points in the upper QBX region fall within a ball of convergence, as long as _h_ ≤ _r_ QBX. If Γ is curved, this guarantee holds on the concave side of Γ, but not necessarily on the convex side, where _d_ QBX may have to be even smaller for the guarantee to hold. Nonetheless, we use (99) with _γ_ = 0.85 also for convex surfaces such as rods and spheroids, and it seems to work well in practice. Of course, the parameter selection strategy (section 6.2, step 2) will in most cases choose _d_ QBX less than the upper bound 2 _γr_ QBX. Appendix D. Efficient computation of streamlines in periodic flow To compute streamlines in a periodic problem such as in section 7.3, we must first solve the periodic boundary integral equation as described in section 5 to get the density _q_ on Γ. We can then compute the flow field _u_ ( _x_ e) = _u_ bg( _x_ e) + D <sup>3P</sup> [Γ, _q_ ]( _x_ e) + _M_ _α_ =1 V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> [ _F_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup>, _τ_ <sup>(</sup> <sup>_α_</sup> <sup>)</sup> ]( _x_ e) (103) at any evaluation point _x_ e in the fluid domain. To compute a streamline we pick any point _x_ 0 in the fluid domain and then solve the differential equation <u>d</u> _<u>x</u>_ <u>e</u> (104) <u>d</u> _<u>t</u>_ <sup>=</sup> <sup>_u_</sup> <sup>(</sup> <sup>_x_</sup> <sup>e(</sup> <sup>_t_</sup> <sup>)),</sup> _x_ e(0) = _x_ 0. <u>[14This function was found at https://math.stackexchange.com/a/101484.](https://math.stackexchange.com/a/101484)</u> _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 43 Of course, (104) is discretized using some timestepping method, which must evaluate (103) at every timestep. Recall that the periodic double layer potential D <sup>3P</sup> is split into two parts D <sup>3P</sup> [Γ, _q_ ]( _x_ e) = D <sup>3P,R</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) + D <sup>3P,F</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) (105) and similarly for V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> . The first part D <sup>3P,R</sup> decays fast and is treated according to section 5. The second part D <sup>3P,F</sup> decays slowly in real space, but since it is smooth its Fourier coefficients decay fast. In the Spectral Ewald method, D <sup>3P,F</sup> as given by (49) is first discretized using the direct quadrature rule (22) to give _i_ D <sup>3P,F,</sup> <sup>_h_</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) = _k_ ∈Z <sup>3</sup> _N_ _s_ =1 _Tijl_ <sup>F</sup> <sup>(</sup> <sup>_x_</sup> <sup>e +</sup> <sup>_k_</sup> <sup>·</sup> <sup>_B_</sup> <sup>−</sup> <sup>_x_</sup> <sup>_s_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> <sup>_qj_</sup> <sup>(</sup> <sup>_x_</sup> <sup>_s_</sup> <sup>)</sup> <sup>_nl_</sup> <sup>(</sup> <sup>_x_</sup> <sup>_s_</sup> <sup>)</sup> <sup>_ws_</sup> <sup>.</sup> (106) _Tijl_ <sup>F</sup> This is a periodic sum of point sources with strengths _Zjl_ ( _x_ _s_ ) = _qj_ ( _x_ _s_ ) _nl_ ( _x_ _s_ ) _ws_ . The Spectral Ewald method [23, 31, 32] computes the periodic sum (106) in five steps: 1. Spreading point sources to a grid: A three-dimensional uniform grid is constructed over the primary cell. A window function _W_ ( _r_ ) is convolved with the point sources in the primary cell to give _Hjl_ ( _x_ ) = _N_ _s_ =1 (107) _Zjl_ ( _x_ _s_ ) _W_ ([ _x_ - _x_ _s_ ]∗). Here, [·]∗ denotes that the shortest periodic distance should be used, i.e. [ _r_ ]∗ = _r_ + _B_ - arg min| _r_ + _B_ - _k_ |, (108) _k_ ∈Z <sup>3</sup> where _B_ = ( _B_ 1, _B_ 2, _B_ 3) is the size of the periodic cell. In this work the window function is a truncated Gaussian, given by _W_ ( _r_ ) = _w_ ( _r_ 1) _w_ ( _r_ 2) _w_ ( _r_ 3), where _w_ ( _r_ ) = �e <sup>−</sup> <sup>_A_</sup> <sup>(</sup> <sup>_r_</sup> <sup>/</sup> <sup>_r_</sup> <sup>trunc)2</sup>, if | _r_ | ≤ _r_ trunc = _h_ g _P_ /2, (109) 0, otherwise. Here, _h_ g is the grid spacing of the uniform grid, _P_ is the number of grid points within the support of _w_, and _A_ = 0.9 <sup>2</sup> _πP_ /2. The parameter _P_ is chosen as discussed in [23]. It is also possible to use other window functions than the Gaussian, as discussed for example in [48]. The function _Hjl_ ( _x_ ) as given by (107) is evaluated on the uniform grid. 2. FFT: The three-dimensional Fourier transform _H_ <sup>�</sup> _jl_ ( _k_ ) is computed using the FFT. This is possible since _Hjl_ ( _x_ ) is defined on a uniform grid. 3. Scaling: The result is multiplied by the Fourier transform of _T_ <sup>F</sup>, and divided by the Fourier transform of the window function _W_ to undo the convolution in step 1. Since we will convolve again in step 5, this division is done twice. Thus, we here compute (110) _H_ - _jl_ ( _k_ ), where _T_ - _ijl_ <sup>F</sup> <sup>(</sup> <sup>_k_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>) =</sup> as given in [23]. <u>1</u> _H_ �� _i_ ( _k_ ) = � _Tijl_ F <sup>(</sup> <sup>_k_</sup> <sup>;</sup> <sup>_ξ_</sup> <sup>)</sup> [ _W_ <sup>�</sup> ( _k_ )] <sup>2</sup> √ - ~~1~~ <sup>_<u>π</u>_</sup> | _k_ | <sup>~~2~~</sup> _ξ_ <sup>~~4~~</sup> �� 8 + 2 <sup><u>|</u></sup> <sup>_<u>k</u>_</sup> _ξ_ <sup>~~2~~</sup> <sup><u>|2</u></sup> <sup>_<u>k</u>_</sup> _ξ_ <sup>~~2~~</sup> <sup><u>|2</u></sup> <sup>+</sup> <sup><u>|</u></sup> <sup>_<u>k</u>_</sup> _ξ_ <sup>~~4~~</sup> <sup><u>|4</u></sup> �( _δijkl_ + _δjlki_ + _δlikj_ ) − 2 <sup>_kikjkl_</sup> | _k_ | <sup>~~2~~</sup> e <sup>−|</sup> <sup>_k_</sup> <sup>|2/(4</sup> <sup>_ξ_</sup> <sup>2)</sup>, (111) 4. IFFT: An inverse FFT is applied to _H_ <sup>��</sup> _i_ ( _k_ ) to compute _H_ <sup>�</sup> _i_ ( _x_ ) on the uniform grid. 5. Gathering: In order to compute the final result at the evaluation point _x_ e (which need not be on the uniform grid), another convolution with the window function is performed, i.e. _H_ - _i_ ( _x_ ) _W_ ([ _x_ e − _x_ ]∗) d _x_, (112) _i_ D <sup>3P,F,</sup> <sup>_h_</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) = ∫ _B_ where _B_ denotes the primary cell. The integral in (112) is evaluated using the trapezoidal rule on the uniform grid, which is spectrally accurate since the integrand is periodic. 44 _J. Bagge and A.-K. Tornberg_ Since the density _q_ does not change during the computation of the streamlines, and the evaluation point _x_ e enters only in step 5 above, it is possible to do step 1–4 once before starting to compute the streamlines, and save _H_ <sup>�</sup> _i_ ( _x_ ) on the uniform grid from step 4. When the Fourier-space part D <sup>3P,F</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) is to be evaluated at _x_ e( _t_ ) at every timestep of solving (104), it is then enough to do only step 5. This speeds up the computation of the streamlines since evaluating (112) is fast for a single evaluation point. The real-space part D <sup>3P,R</sup> [Γ, _q_ ]( _x_ e; _ξ_ ) must be computed from scratch at every timestep, but this is fast since it is a local sum due to its rapid decay. The periodic completion flow V <sup>(</sup> <sup>_α_</sup> <sup>),3P</sup> which appears in (103) is treated in a very similar way; for details, we refer to [31, 23, 24]. Note that steps 1–5 of the Spectral Ewald method are also what is used when solving the periodic boundary integral equation as described in section 5, but in that situation all the evaluation points (i.e. the grid points of Γ) are known in advance so they can all be fed into step 5 at the same time. References [1] K. E. Atkinson, _The Numerical Solution of Integral Equations of the Second Kind_, Cambridge University Press, Cambridge, [1997, doi:10.1017/CBO9780511626340.](https://doi.org/10.1017/CBO9780511626340) [2] J. Bagge, A.-K. Tornberg, Accurate quadrature methods with application to Stokes flow with particles in confined geometries, in D. J. Chappell (ed.), _Proceedings of the Eleventh UK Conference on Boundary Integral Methods (UKBIM 11)_, Nottingham, [UK, July 2017, pp. 15–24, ISBN 9780993111297. Available: http://irep.ntu.ac.uk/id/eprint/31463](http://irep.ntu.ac.uk/id/eprint/31463) [3] A. H. Barnett, Evaluation of layer potentials close to the boundary for Laplace and Helmholtz problems on analytic planar domains, _SIAM J. Sci. Comput._ 36 [(2), A427–A451 (2014), doi:10.1137/120900253.](https://doi.org/10.1137/120900253) [4] A. Barnett, B. Wu, S. Veerapaneni, Spectrally accurate quadratures for evaluation of layer potentials close to the boundary for the 2D Stokes and Laplace equations, _SIAM J. Sci. Comput._ 37 [(4), B519–B542 (2015), doi:10.1137/140990826.](https://doi.org/10.1137/140990826) [5] J. T. Beale, M.-C. Lai, A method for computing nearly singular integrals, _SIAM J. Numer. Anal._ 38 (6), 1902–1925 (2001), [doi:10.1137/S0036142999362845.](https://doi.org/10.1137/S0036142999362845) [6] J. T. Beale, W. Ying, J. R. Wilson, A Simple Method for Computing Singular or Nearly Singular Integrals on Closed Surfaces, _Commun. Comput. Phys._ 20 [(3), 733–753 (2016), doi:10.4208/cicp.030815.240216a.](https://doi.org/10.4208/cicp.030815.240216a) [7] J.-P. Berrut, L. N. Trefethen, Barycentric Lagrange Interpolation, _SIAM_ _Rev._ 46 (3), 501–517 (2004), [doi:10.1137/S0036144502417715.](https://doi.org/10.1137/S0036144502417715) [8] J. R. Blake, A note on the image system for a stokeslet in a no-slip boundary, _Proc. Camb. Phil. Soc._ 70 (2), 303–310 (1971), [doi:10.1017/S0305004100049902.](https://doi.org/10.1017/S0305004100049902) [9] O. P. Bruno, L. A. Kunyansky, A Fast, High-Order Algorithm for the Solution of Surface Scattering Problems: Basic Implementation, Tests, and Applications, _J. Comp. Phys._ 169 [(1), 80–110 (2001), doi:10.1006/jcph.2001.6714.](https://doi.org/10.1006/jcph.2001.6714) [10] C. Carvalho, S. Khatri, A. D. Kim, Close evaluation of layer potentials in three dimensions, _[arXiv:1807.02474 [math.NA]](https://arxiv.org/abs/1807.02474)_ (2018). [11] C. Carvalho, S. Khatri, A. D. Kim, Asymptotic approximations for the close evaluation of double-layer potentials, _[arXiv:1810.02483 [math.NA]](https://arxiv.org/abs/1810.02483)_ (2018). [12] E. Corona, S. Veerapaneni, Boundary integral equation analysis for suspension of spheres in Stokes flow, _J. Comp. Phys._ 362 [, 327–345 (2018), doi:10.1016/j.jcp.2018.02.017.](https://doi.org/10.1016/j.jcp.2018.02.017) [13] M. Deserno, C. Holm, How to mesh up Ewald sums. I. A theoretical and numerical comparison of various particle mesh routines, _J. Chem. Phys._ 109 [(18), 7678–7693 (1998), doi:10.1063/1.477414.](https://doi.org/10.1063/1.477414) [14] C. L. Epstein, L. Greengard, A. Klöckner, On the convergence of local expansions of layer potentials, _SIAM J. Numer._ _Anal._ 51 [(5), 2660–2679 (2013), doi:10.1137/120902859.](https://doi.org/10.1137/120902859) [15] Z. Gimbutas, L. Greengard, S. Veerapaneni, Simple and efficient representations for the fundamental solutions of Stokes flow in a half-space, _J. Fluid Mech._ 776 [, R1 (2015), doi:10.1017/jfm.2015.302.](https://doi.org/10.1017/jfm.2015.302) [16] R. G. Gontijo, F. R. Cunha, Dynamic numerical simulations of magnetically interacting suspensions in creeping flow, _Powder Technol._ 279 [, 146–165 (2015), doi:10.1016/j.powtec.2015.03.033.](https://doi.org/10.1016/j.powtec.2015.03.033) [17] L. Greengard, V. Rokhlin, A fast algorithm for particle simulations, _J. Comp. Phys._ 73 [(2), 325–348 (1987), doi:10.1016/0021-](https://doi.org/10.1016/0021-9991%0x2887%0x2990140-9) [9991(87)90140-9.](https://doi.org/10.1016/0021-9991%0x2887%0x2990140-9) [18] L. Greengard, V. Rokhlin, A new version of the Fast Multipole Method for the Laplace equation in three dimensions, _Acta_ _Numer._ 6 [, 229–269 (1997), doi:10.1017/S0962492900002725.](https://doi.org/10.1017/S0962492900002725) [19] J. S. Guasto, A. S. Ross, J. P. Gollub, Hydrodynamic irreversibility in particle suspensions with nonuniform strain, _Phys._ _Rev. E_ 81 [(6), 061401 (2010), doi:10.1103/PhysRevE.81.061401.](https://doi.org/10.1103/PhysRevE.81.061401) [20] J. S. Guasto, R. Rusconi, R. Stocker, Fluid Mechanics of Planktonic Microorganisms, _Annu. Rev. Fluid Mech._ 44, 373–400 [(2012), doi:10.1146/annurev-fluid-120710-101156.](https://doi.org/10.1146/annurev-fluid-120710-101156) _Highly accurate special quadrature methods for Stokesian particle suspensions in confined geometries_ 45 [21] J. Helsing, R. Ojala, On the evaluation of layer potentials close to their sources, _J. Comp. Phys._ 227 (5), 2899–2921 (2008), [doi:10.1016/j.jcp.2007.11.024.](https://doi.org/10.1016/j.jcp.2007.11.024) [22] S. Kim, S. J. Karrila, _Microhydrodynamics_ _:_ _Principles_ _and_ _Selected_ _Applications_, Butterworth–Heinemann, Boston, 1991, [doi:10.1016/C2013-0-04644-0.](https://doi.org/10.1016/C2013-0-04644-0) [23] L. af Klinteberg, A.-K. Tornberg, Fast Ewald summation for Stokesian particle suspensions, _Int. J. Numer. Methods Fluids_ 76 [(10), 669–698 (2014), doi:10.1002/fld.3953.](https://doi.org/10.1002/fld.3953) [24] L. af Klinteberg, Ewald summation for the rotlet singularity of Stokes flow, _[arXiv:1603.07467 [physics.flu-dyn]](https://arxiv.org/abs/1603.07467)_ (2016). [25] L. af Klinteberg, A.-K. Tornberg, A fast integral equation method for solid particles in viscous flow using quadrature by expansion, _J. Comp. Phys._ 326 [, 420–445 (2016), doi:10.1016/j.jcp.2016.09.006.](https://doi.org/10.1016/j.jcp.2016.09.006) [26] L. af Klinteberg, A.-K. Tornberg, Error estimation for quadrature by expansion in layer potential evaluation, _Adv. Com-_ _put. Math._ 43 [, 195–234 (2017), doi:10.1007/s10444-016-9484-x.](https://doi.org/10.1007/s10444-016-9484-x) [27] L. af Klinteberg, D. Saffar Shamshirgar, A.-K. Tornberg, Fast Ewald summation for free-space Stokes potentials, _Res._ _Math. Sci._ 4 [(1), (2017), doi:10.1186/s40687-016-0092-7.](https://doi.org/10.1186/s40687-016-0092-7) [28] L. af Klinteberg, A.-K. Tornberg, Adaptive quadrature by expansion for layer potential evaluation in two dimensions, _SIAM J. Sci. Comput._ 40 [(3), A1225–A1249 (2018), doi:10.1137/17M1121615.](https://doi.org/10.1137/17M1121615) [29] A. Klöckner, A. Barnett, L. Greengard, M. O’Neil, Quadrature by expansion: A new method for the evaluation of layer potentials, _J. Comp. Phys._ 252 [, 332–349 (2013), doi:10.1016/j.jcp.2013.06.027.](https://doi.org/10.1016/j.jcp.2013.06.027) [30] R. Kress, _Linear Integral Equations_ [, Springer, New York, 3rd ed., 2014, doi:10.1007/978-1-4614-9593-2.](https://doi.org/10.1007/978-1-4614-9593-2) [31] D. Lindbo, A.-K. Tornberg, Spectrally accurate fast summation for periodic Stokes potentials, _J._ _Comp._ _Phys._ 229 (23), [8994–9010 (2010), doi:10.1016/j.jcp.2010.08.026.](https://doi.org/10.1016/j.jcp.2010.08.026) [32] D. Lindbo, A.-K. Tornberg, Spectral accuracy in fast Ewald-based methods for particle simulations, _J._ _Comp._ _Phys._ 230 [(24), 8744–8761 (2011), doi:10.1016/j.jcp.2011.08.022.](https://doi.org/10.1016/j.jcp.2011.08.022) [33] D. Lindbo, L. af Klinteberg, D. Saffar Shamshirgar, _The_ _spectral_ _Ewald_ _unified_ _package_, [http://github.com/ludvigak/](http://github.com/ludvigak/SE_unified) [SE_unified, 2018.](http://github.com/ludvigak/SE_unified) [34] L. Lu, M. J. Morse, A. Rahimian, G. Stadler, D. Zorin, Scalable Simulation of Realistic Volume Fraction Red Blood Cell Flows through Vascular Networks, in _Proceedings of the International Conference for High Performance Computing, Network-_ _ing, Storage and Analysis (SC ’19)_ [, Denver, CO, USA, November 2019, article 6, doi:10.1145/3295500.3356203.](https://doi.org/10.1145/3295500.3356203) [35] D. Malhotra, A. Rahimian, D. Zorin, G. Biros, A parallel algorithm for long-timescale simulation of concentrated vesicle [suspensions in three dimensions, 2018. Preprint available: https://cims.nyu.edu/~malhotra/files/pubs/ves3d.pdf](https://cims.nyu.edu/~malhotra/files/pubs/ves3d.pdf) [36] N. Mittal, F. Ansari, K. Gowda. V, C. Brouzet, P. Chen, P. T. Larsson, S. V. Roth, F. Lundell, L. Wågberg, N. A. Kotov, L. D. Söderberg, Multiscale Control of Nanocellulose Assembly: Transferring Remarkable Nanoscale Fibril Mechanics to Macroscale Fibers, _ACS Nano_ 12 [(7), 6378–6388 (2018), doi:10.1021/acsnano.8b01084.](https://doi.org/10.1021/acsnano.8b01084) [37] R. Ojala, A.-K. Tornberg, An accurate integral equation method for simulating multi-phase Stokes flow, _J. Comp. Phys._ 298 [, 145–160 (2015), doi:10.1016/j.jcp.2015.06.002.](https://doi.org/10.1016/j.jcp.2015.06.002) [38] F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I. Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, B. V. Saun ders, H. S. Cohl, M. A. McClain, _NIST Digital Library of Mathematical Functions_, [http://dlmf.nist.gov/,](http://dlmf.nist.gov/) Release 1.0.25 of 2019-12-15. [39] S. Pålsson, M. Siegel, A.-K. Tornberg, Simulation and validation of surfactant-laden drops in two-dimensional Stokes flow, _J. Comp. Phys._ 386 [, 218–247 (2019), doi:10.1016/j.jcp.2018.12.044.](https://doi.org/10.1016/j.jcp.2018.12.044) [40] C. Pérez-Arancibia, L. M. Faria, C. Turc, Harmonic density interpolation methods for high-order evaluation of Laplace layer potentials in 2D and 3D, _J. Comp. Phys._ 376 [, 411–434 (2019), doi:10.1016/j.jcp.2018.10.002.](https://doi.org/10.1016/j.jcp.2018.10.002) [41] H. Power, G. Miranda, Second kind integral equation formulation of Stokes’ flows past a particle of arbitrary shape, _SIAM_ _J. Appl. Math._ 47 [(4), 689–698 (1987), doi:10.1137/0147047.](https://doi.org/10.1137/0147047) [42] C. Pozrikidis, _Boundary integral and singularity methods for linearized viscous flow_, Cambridge University Press, Cambridge, [1992, doi:10.1017/CBO9780511624124.](https://doi.org/10.1017/CBO9780511624124) [43] M. Rachh, _Integral_ _equation_ _methods_ _for_ _problems_ _in_ _electrostatics,_ _elastostatics_ _and_ _viscous_ _flow_, PhD Thesis, New York [University, 2015, ISBN 978-1-321-95485-2. Available: https://search.proquest.com/docview/1710781501](https://search.proquest.com/docview/1710781501) [44] M. Rachh, A. Klöckner, M. O’Neil, Fast algorithms for Quadrature by Expansion I: Globally valid expansions, _J. Comp._ _Phys._ 345 [, 706–731 (2017), doi:10.1016/j.jcp.2017.04.062.](https://doi.org/10.1016/j.jcp.2017.04.062) [45] A. Rahimian, A. Barnett, D. Zorin, Ubiquitous evaluation of layer potentials using Quadrature by Kernel-Independent Expansion, _BIT Numer. Math._ 58 [, 423–456 (2018), doi:10.1007/s10543-017-0689-2.](https://doi.org/10.1007/s10543-017-0689-2) [46] S. Reddig, H. Stark, Nonlinear dynamics of spherical particles in Poiseuille flow under creeping-flow condition, _J. Chem. Phys._ 138 [(23), 234902 (2013), doi:10.1063/1.4809989.](https://doi.org/10.1063/1.4809989) 46 _J. Bagge and A.-K. Tornberg_ [47] Y. Saad, M. H. Schultz, GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems, _SIAM_ _J. Sci. Stat. Comput._ 7 [(3), 856–869 (1986), doi:10.1137/0907058.](https://doi.org/10.1137/0907058) [48] D. Saffar Shamshirgar, A.-K. Tornberg, Fast Ewald summation for electrostatic potentials with arbitrary periodicity, _[arXiv:1712.04732 [math.NA]](https://arxiv.org/abs/1712.04732)_ (2017). [49] M. Siegel, A.-K. Tornberg, A local target specific quadrature by expansion method for evaluation of layer potentials in 3D, _J. Comp. Phys._ 364 [, 365–392 (2018), doi:10.1016/j.jcp.2018.03.006.](https://doi.org/10.1016/j.jcp.2018.03.006) [50] C. Sorgentone, A.-K. Tornberg, A highly accurate boundary integral equation method for surfactant-laden drops in 3D, _J. Comp. Phys._ 360 [, 167–191 (2018), doi:10.1016/j.jcp.2018.01.033.](https://doi.org/10.1016/j.jcp.2018.01.033) [51] T. M. Sqires, S. R. Qake, Microfluidics: Fluid physics at the nanoliter scale, _Rev._ _Mod._ _Phys._ 77 (3), 977–1026 (2005), [doi:10.1103/RevModPhys.77.977.](https://doi.org/10.1103/RevModPhys.77.977) [52] S. Srinivasan, A.-K. Tornberg, Fast Ewald summation for Green’s functions of Stokes flow in a half-space, _Res. Math. Sci._ 5 [(3), article 35 (2018), doi:10.1007/s40687-018-0153-1.](https://doi.org/10.1007/s40687-018-0153-1) [53] S. Tlupova, J. T. Beale, Nearly Singular Integrals in 3D Stokes Flow, _Commun._ _Comput._ _Phys._ 14 (5), 1207–1227 (2013), [doi:10.4208/cicp.020812.080213a.](https://doi.org/10.4208/cicp.020812.080213a) [54] S. Tlupova, J. T. Beale, Regularized single and double layer integrals in 3D Stokes flow, _J. Comp. Phys._ 386, 568–584 (2019), [doi:10.1016/j.jcp.2019.02.031.](https://doi.org/10.1016/j.jcp.2019.02.031) [55] A.-K. Tornberg, L. Greengard, A fast multipole method for the three-dimensional Stokes equations, _J. Comp. Phys._ 227 [(3), 1613–1619 (2008), doi:10.1016/j.jcp.2007.06.029.](https://doi.org/10.1016/j.jcp.2007.06.029) [56] L. N. Trefethen, J. A. C. Weideman, The Exponentially Convergent Trapezoidal Rule, _SIAM Rev._ 56 (3), 385–458 (2014), [doi:10.1137/130932132.](https://doi.org/10.1137/130932132) [57] L. Ying, G. Biros, D. Zorin, A high-order 3D boundary integral equation solver for elliptic PDEs in smooth domains, _J._ _Comp. Phys._ 219 [, 247–275 (2006), doi:10.1016/j.jcp.2006.03.021.](https://doi.org/10.1016/j.jcp.2006.03.021) [58] M. Wala, A. Klöckner, A fast algorithm with error bounds for Quadrature by Expansion, _J._ _Comp._ _Phys._ 374, 135–162 [(2018), doi:10.1016/j.jcp.2018.05.006.](https://doi.org/10.1016/j.jcp.2018.05.006) [59] M. Wala, A. Klöckner, A fast algorithm for Quadrature by Expansion in three dimensions, _J. Comp. Phys._ 388, 655–689 [(2019), doi:10.1016/j.jcp.2019.03.024.](https://doi.org/10.1016/j.jcp.2019.03.024) [60] M. Wala, A. Klöckner, Optimization of fast algorithms for global Quadrature by Expansion using target-specific expan sions, _J. Comp. Phys._ 403 [, 108976 (2020), doi:10.1016/j.jcp.2019.108976.](https://doi.org/10.1016/j.jcp.2019.108976) [61] H. Zhao, A. H. G. Isfahani, L. N. Olson, J. B. Freund, A spectral boundary integral method for flowing blood cells, _J._ _Comp. Phys._ 229 [, 3726–3744 (2010), doi:10.1016/j.jcp.2010.01.024.](https://doi.org/10.1016/j.jcp.2010.01.024)

섹션 본문

섹션 본문이 없습니다.

참고문헌 62건

  1. Fluid Mechanics of Planktonic Microorganisms Annual Review of Fluid Mechanics · Annual Reviews · 2011 10.1146/annurev-fluid-120710-101156
  2. Scalable simulation of realistic volume fraction red blood cell flows through vascular networks 2019 10.1145/3295500.3356203
  3. Microfluidics: Fluid physics at the nanoliter scale Reviews of Modern Physics · American Physical Society · 2005 10.1103/revmodphys.77.977
  4. Nonlinear dynamics of spherical particles in Poiseuille flow under creeping-flow condition The Journal of Chemical Physics · American Institute of Physics · 2013 10.1063/1.4809989
  5. Dynamic numerical simulations of magnetically interacting suspensions in creeping flow Powder Technology · Elsevier BV · 2015 10.1016/j.powtec.2015.03.033
  6. Multiscale Control of Nanocellulose Assembly: Transferring Remarkable Nanoscale Fibril Mechanics to Macroscale Fibers ACS Nano · American Chemical Society · 2018 10.1021/acsnano.8b01084
  7. Hydrodynamic irreversibility in particle suspensions with nonuniform strain Physical Review E · American Physical Society · 2010 10.1103/physreve.81.061401
  8. Boundary Integral and Singularity Methods for Linearized Viscous Flow Cambridge University Press eBooks · Cambridge University Press · 1992 10.1017/cbo9780511624124
  9. The Numerical Solution of Integral Equations of the Second Kind 1997 10.1017/cbo9780511626340
  10. Linear Integral Equations Applied mathematical sciences · Springer Nature · 2013 10.1007/978-1-4614-9593-2
  11. GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems SIAM Journal on Scientific and Statistical Computing · Society for Industrial and Applied Mathematics · 1986 10.1137/0907058
  12. A fast algorithm for particle simulations Journal of Computational Physics · Elsevier BV · 1987 10.1016/0021-9991(87)90140-9
  13. A new version of the Fast Multipole Method for the Laplace equation in three dimensions Acta Numerica · Cambridge University Press · 1997 10.1017/s0962492900002725
  14. How to mesh up Ewald sums. I. A theoretical and numerical comparison of various particle mesh routines The Journal of Chemical Physics · American Institute of Physics · 1998 10.1063/1.477414
  15. Spectral accuracy in fast Ewald-based methods for particle simulations Journal of Computational Physics · Elsevier BV · 2011 10.1016/j.jcp.2011.08.022
  16. Fast Ewald summation for free-space Stokes potentials Research in the Mathematical Sciences · Springer Nature · 2017 10.1186/s40687-016-0092-7
  17. Sedimentation of an ellipsoid inside an infinitely long tube at low and intermediate Reynolds numbers Journal of Fluid Mechanics · Cambridge University Press · 2006 10.1017/s0022112005008402
  18. An immersed boundary method with direct forcing for the simulation of particulate flows Journal of Computational Physics · Elsevier BV · 2005 10.1016/j.jcp.2005.03.017
  19. A fast computation technique for the direct numerical simulation of rigid particulate flows Journal of Computational Physics · Elsevier BV · 2004 10.1016/j.jcp.2004.11.012
  20. Rotational and orientational behaviour of three-dimensional spheroidal particles in Couette flows Journal of Fluid Mechanics · Cambridge University Press · 2003 10.1017/s0022112002003191
  21. Comparison of three simulation methods for colloidal aggregates in Stokes flow: Finite elements, lattice Boltzmann and Stokesian dynamics Computers & Fluids · Elsevier BV · 2013 10.1016/j.compfluid.2013.07.005
  22. Particulate Flow Simulation Via a Boundary Condition-enforced Immersed Boundary-lattice Boltzmann Scheme Communications in Computational Physics · Cambridge University Press · 2009 10.4208/cicp.2009.09.054
  23. Accelerated Stokesian Dynamics simulations Journal of Fluid Mechanics · Cambridge University Press · 2001 10.1017/s0022112001005912
  24. Spectral Ewald Acceleration of Stokesian Dynamics for polydisperse suspensions Journal of Computational Physics · Elsevier BV · 2015 10.1016/j.jcp.2015.11.042
  25. Force-coupling method for flows with ellipsoidal particles Journal of Computational Physics · Elsevier BV · 2009 10.1016/j.jcp.2009.01.020
  26. Stokes flow past a particle of arbitrary shape: a numerical method of solution Journal of Fluid Mechanics · Cambridge University Press · 1975 10.1017/s0022112075001486
  27. Applying a second-kind boundary integral equation for surface tractions in Stokes flow Journal of Computational Physics · Elsevier BV · 2010 10.1016/j.jcp.2010.12.010
  28. On the evaluation of layer potentials close to their sources Journal of Computational Physics · Elsevier BV · 2007 10.1016/j.jcp.2007.11.024
  29. An accurate integral equation method for simulating multi-phase Stokes flow Journal of Computational Physics · Elsevier BV · 2015 10.1016/j.jcp.2015.06.002
  30. Simulation and validation of surfactant-laden drops in two-dimensional Stokes flow Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2018.12.044
  31. Spectrally Accurate Quadratures for Evaluation of Layer Potentials Close to the Boundary for the 2D Stokes and Laplace Equations SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2015 10.1137/140990826
  32. Quadrature by expansion: A new method for the evaluation of layer potentials Journal of Computational Physics · Elsevier BV · 2013 10.1016/j.jcp.2013.06.027
  33. Ubiquitous evaluation of layer potentials using Quadrature by Kernel-Independent Expansion BIT Numerical Mathematics · Springer Science+Business Media · 2017 10.1007/s10543-017-0689-2
  34. Evaluation of Layer Potentials Close to the Boundary for Laplace and Helmholtz Problems on Analytic Planar Domains SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2014 10.1137/120900253
  35. On the Convergence of Local Expansions of Layer Potentials SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2013 10.1137/120902859
  36. Error estimation for quadrature by expansion in layer potential evaluation Advances in Computational Mathematics · Springer Science+Business Media · 2016 10.1007/s10444-016-9484-x
  37. A fast integral equation method for solid particles in viscous flow using quadrature by expansion Journal of Computational Physics · Elsevier BV · 2016 10.1016/j.jcp.2016.09.006
  38. Fast algorithms for Quadrature by Expansion I: Globally valid expansions Journal of Computational Physics · Elsevier BV · 2017 10.1016/j.jcp.2017.04.062
  39. A fast algorithm with error bounds for Quadrature by Expansion Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.05.006
  40. A fast algorithm for Quadrature by Expansion in three dimensions Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2019.03.024
  41. Optimization of fast algorithms for global Quadrature by Expansion using target-specific expansions Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2019.108976
  42. A local target specific quadrature by expansion method for evaluation of layer potentials in 3D Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.03.006
  43. Adaptive Quadrature by Expansion for Layer Potential Evaluation in Two Dimensions SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2018 10.1137/17m1121615
  44. A high-order 3D boundary integral equation solver for elliptic PDEs in smooth domains Journal of Computational Physics · Elsevier BV · 2006 10.1016/j.jcp.2006.03.021
  45. A highly accurate boundary integral equation method for surfactant-laden drops in 3D Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.01.033
  46. A Method for Computing Nearly Singular Integrals SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2001 10.1137/s0036142999362845
  47. Nearly Singular Integrals in 3D Stokes Flow Communications in Computational Physics · Cambridge University Press · 2013 10.4208/cicp.020812.080213a
  48. A Simple Method for Computing Singular or Nearly Singular Integrals on Closed Surfaces Communications in Computational Physics · Cambridge University Press · 2016 10.4208/cicp.030815.240216a
  49. Regularized single and double layer integrals in 3D Stokes flow Journal of Computational Physics · Elsevier BV · 2019 10.1016/j.jcp.2019.02.031
  50. Harmonic density interpolation methods for high-order evaluation of Laplace layer potentials in 2D and 3D Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.10.002
  51. Boundary integral equation analysis for suspension of spheres in Stokes flow Journal of Computational Physics · Elsevier BV · 2018 10.1016/j.jcp.2018.02.017
  52. A Fast, High-Order Algorithm for the Solution of Surface Scattering Problems: Basic Implementation, Tests, and Applications Journal of Computational Physics · Elsevier BV · 2001 10.1006/jcph.2001.6714
  53. A spectral boundary integral method for flowing blood cells Journal of Computational Physics · Elsevier BV · 2010 10.1016/j.jcp.2010.01.024
  54. Fast Ewald summation for Stokesian particle suspensions International Journal for Numerical Methods in Fluids · Wiley · 2014 10.1002/fld.3953
  55. Spectrally accurate fast summation for periodic Stokes potentials Journal of Computational Physics · Elsevier BV · 2010 10.1016/j.jcp.2010.08.026
  56. A note on the image system for a stokeslet in a no-slip boundary Mathematical Proceedings of the Cambridge Philosophical Society · Cambridge University Press · 1971 10.1017/s0305004100049902
  57. Simple and efficient representations for the fundamental solutions of Stokes flow in a half-space arXiv (Cornell University) · Cornell University · 2015 10.1017/jfm.2015.302
  58. Fast Ewald summation for Green’s functions of Stokes flow in a half-space Research in the Mathematical Sciences · Springer Nature · 2018 10.1007/s40687-018-0153-1
  59. Second Kind Integral Equation Formulation of Stokes’ Flows Past a Particle of Arbitrary Shape SIAM Journal on Applied Mathematics · Society for Industrial and Applied Mathematics · 1987 10.1137/0147047
  60. The Exponentially Convergent Trapezoidal Rule SIAM Review · Society for Industrial and Applied Mathematics · 2014 10.1137/130932132
  61. Barycentric Lagrange Interpolation SIAM Review · Society for Industrial and Applied Mathematics · 2004 10.1137/s0036144502417715
  62. A fast multipole method for the three-dimensional Stokes equations Journal of Computational Physics · Elsevier BV · 2007 10.1016/j.jcp.2007.06.029