SearcharxivSearch

arXiv subjects

Joar Bagge

Publications and source records attributed to Joar Bagge.

6 recordsLinked to original sources

A performance portable fast Ewald summation for Stokes flow

We present GPU algorithms for Ewald summation methods for accelerating N-body Stokes flow problems in periodic domains. Like most N-body codes, Ewald sums use a near-field/far-field decomposition. The near field involves particle-to-particle (P2P) interactions. The far field primarily involves particle-to-grid (P2G) and grid-to-particle (G2P) interactions, as well as Fast Fourier Transforms. For each interaction, we investigate several algorithmic variants. Our implementation uses PyKokkos, a Python interface for the Kokkos C++ parallel programming framework, which supports portability to AMD/NVIDIA GPU and ARM/x86 CPU architectures. Double and single-precision numerical results, alongside analytical performance models, confirm the efficiency of our algorithms on AMD and NVIDIA GPU and on ARM and AMD CPU architectures. The P2P interaction achieves around 73% compute efficiency on NVIDIA H200, 84% on NVIDIA A100, 60% on AMD MI300, 52% on Grace CPU, and 68% on AMD Epyc CPU. A straightforward implementation of the P2G kernel can become a computational bottleneck. We introduce a novel P2G algorithm that achieves up to 16$\times$ speedup compared to a baseline GPU implementation. The overall Ewald sum code processes approximately 8 million particles per second on a H200 GPU, and about a half-million particles per second on a Grace CPU, for nine digits of accuracy. We also perform a multi-GPU weak scaling test on up to 256 million particles (64 GPUs) that shows bounded communication cost for all stages except the all-to-all particle sorting, which can be reduced to neighbor communication in the relevant time-stepping regime.

math.NA

A stable and fast method for solving multibody scattering problems via the method of fundamental solutions

The paper describes a numerical method for solving acoustic multibody scattering problems in two and three dimensions. The idea is to compute a highly accurate approximation to the scattering operator for each body through a local computation, and then use these scattering matrices to form a global linear system. The resulting coefficient matrix is relatively well-conditioned, even for problems involving a very large number of scatterers. The linear system is amenable to iterative solvers, and can readily be accelerated via fast algorithms for the matrix-vector multiplication such as the fast multipole method. The key point of the work is that the local scattering matrices can be constructed using potentially ill-conditioned techniques such as the method of fundamental solutions (MFS), while still maintaining scalability and numerical stability of the global solver. The resulting algorithm is simple, as the MFS is far simpler to implement than alternative techniques based on discretizing boundary integral equations using Nyström or Galerkin.

math.NA

Fast Ewald summation for Stokes flow with arbitrary periodicity

A fast and spectrally accurate Ewald summation method for the evaluation of stokeslet, stresslet and rotlet potentials of three-dimensional Stokes flow is presented. This work extends the previously developed Spectral Ewald method for Stokes flow to periodic boundary conditions in any number (three, two, one, or none) of the spatial directions, in a unified framework. The periodic potential is split into a short-range and a long-range part, where the latter is treated in Fourier space using the fast Fourier transform. A crucial component of the method is the modified kernels used to treat singular integration. We derive new modified kernels, and new improved truncation error estimates for the stokeslet and stresslet. An automated procedure for selecting parameters based on a given error tolerance is designed and tested. Analytical formulas for validation in the doubly and singly periodic cases are presented. We show that the computational time of the method scales like O(N log N) for N sources and targets, and investigate how the time depends on the error tolerance and window function, i.e. the function used to smoothly spread irregular point data to a uniform grid. The method is fastest in the fully periodic case, while the run time in the free-space case is around three times as large. Furthermore, the highest efficiency is reached when applying the method to a uniform source distribution in a primary cell with low aspect ratio. The work presented in this paper enables efficient and accurate simulations of three-dimensional Stokes flow with arbitrary periodicity using e.g. boundary integral and potential methods.

math.NA

Parabolic velocity profile causes drift of inertial prolate spheroids -- but gravity is stronger

Motion of elongated particles in shear is studied. In applications where particles are much heavier than the carrying fluid, e.g. aerosols, the influence of particle inertia dominates the particle dynamics. Assuming that the particle only experiences a local linear velocity profile, its rotational and translational motion are independent. However, we show that quadratic terms of the local velocity profile combined with particle inertia cause a lateral drift of prolate spheroidal particles. We find that this drift is maximal when particle inertial forces are of the same order of magnitude as viscous forces, and that both extremely light and extremely heavy particles have negligible drift. In the non-inertial case, the particle rotates according to the local linear velocity profile, with each instantaneous orientation corresponding to a velocity that gives zero force on the particle. This results in a translational motion in the flow direction with periodic velocity fluctuations. With added particle inertia, the particle is slow to react to the surrounding fluid motion and the particle will switch between slower and faster rotation compared to the zero-force solution. The final motion that gives zero integrated force over a rotational period, is a motion with a lateral drift. We show that this drift is purely an effect of the non-sphericity of the particle and its translational inertia, while rotational inertia is negligible. Finally, although this inertial drift will contribute to the lateral motion of heavy elongated particles in channel flow, sedimentation due to gravity will dominate in any practical application on earth.

physics.flu-dyn

Fast Ewald summation for electrostatic potentials with arbitrary periodicity

A unified treatment for fast and spectrally accurate evaluation of electrostatic potentials subject to periodic boundary conditions in any or none of the three spatial dimensions is presented. Ewald decomposition is used to split the problem into a real-space and a Fourier-space part, and the FFT-based Spectral Ewald (SE) method is used to accelerate the computation of the latter. A key component in the unified treatment is an FFT-based solution technique for the free-space Poisson problem in three, two or one dimensions, depending on the number of non-periodic directions. The computational cost is furthermore reduced by employing an adaptive FFT for the doubly and singly periodic cases, allowing for different local upsampling factors. The SE method will always be most efficient for the triply periodic case as the cost of computing FFTs will then be the smallest, whereas the computational cost of the rest of the algorithm is essentially independent of periodicity. We show that the cost of removing periodic boundary conditions from one or two directions out of three will only moderately increase the total runtime. Our comparisons also show that the computational cost of the SE method in the free-space case is around four times that of the triply periodic case. The Gaussian window function previously used in the SE method, is here compared to a piecewise polynomial approximation of the Kaiser-Bessel window function. With a carefully tuned shape parameter that is selected based on an error estimate for this new window function, runtimes for the SE method can be further reduced. Furthermore, we consider different methods for computing the force, and compare the runtime of the SE method with that of the Fast Multipole Method.

math.NA

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

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.

math.NA