Abstract

Smoothed particle hydrodynamics (SPH) is a meshless Lagrangian method that has been successfully applied to computational fluid dynamics (CFD), solid mechanics and many other multi-physics problems. gpuSPHASE is a graphics processing unit (GPU) accelerated solver for 2D SPH simulations that is optimized for relatively small numbers of particles but long physical simulation times as required to solve transport phenomena in process engineering applications. The software aims at a low latency execution pipeline with thousands of iterations per second on contemporary GPU accelerator cards, while using symplectic time integration for long term stability of the simulations. For this, a novel caching algorithm for CUDA shared memory is proposed and implemented. gpuSPHASE is validated against SPHERIC test cases and the performance is evaluated and compared to state of the art implementations of the SPH method. New version program summaryProgram Title: gpuSPHASEProgram Files doi:http://dx.doi.org/10.17632/8vpwwh8th5.2Licensing provisions: GPLv3Programming language: CUDA C++Journal reference of previous version: Comput. Phys. Comm., 213 (2017), 165–180Does the new version supersede the previous version?: YesReasons for the new version: The software is in active development and thus several new features have been added since the initial release. Those improvements are related to accuracy, maintainability and platform independence.Summary of revisions:•Build process: The previous distribution was relatively complicated to build due to the external dependencies of the software. This process has been optimized such that CMake is used for all platforms to build the software. For performance reasons several decisions have to be taken at compile time, which can be configured through the CMake configuration. External dependencies are platform independently retrieved and included using CMake features.•Code: While optimized for performance, zero-cost decorators were added to improve the readability of the code. Furthermore, a weak form of type punning was used previously, which was entirely replaced by a custom defined type to eliminate the possibility of undefined behavior.•Floating point precision: As described in the literature and in the original version of the manuscript, 32 bit floating point precision is generally sufficient for SPH simulations of water [1,2]. While not optimized for the opportunistic caching strategy, 64 bit floating point precision has been added. Due to the significant performance loss of consumer grade GPUs for FP64 computations the performance may be considerably worse. FP64 precision can be used to check if FP32 is sufficient and thus detect simulations where FP64 is required. This feature does not influence the already implemented cell relative position calculations that allow for large computational domains without any loss in accuracy [2]. Improvements can be observed e.g. in the Poiseuille flow test case released with DualSPHysics 4.2 [3] with the configuration of ν=10−6 [m2.s−1], ρ=1000 [kg.m−3] and a body force of Fx=10−4 [m.s−2], as shown in Fig. 1.•Particle shifting: The diffusion based particle shifting method proposed by Skillen et al. (2013) [4] is implemented. As suggested by Lind et al. (2012) [5], the particle concentration is augmented with the factor fij to prevent pairing instability for free surface flows [6]. The improvements are best observed with Poiseuille flow configuration of ν=10−2 [m2.s−1], ρ=1 [kg.m−3] and a body force of Fx=10−1 [m.s−2] [7]. This test case does not converge with gpuSPHASE using single or double precision due to the problems described by [8]. Enabling particle shifting allows to execute the simulation until t>100, as shown in Fig. 2.•Advective-diffusion and heat transfer: Heat transfer is modeled based on the temperature T and the thermal conductivity k as dT∕dt=ρ−1cp−1k∇2T. The SPH discretization is implemented according to Alshaer et al. (2017) [9] and successfully verified [10]. The mass transfer of concentration C is modeled using the advective-diffusion equation dC∕dt=D∇2C−∇⋅(vC). The model is implemented according to the discretization of Aristodemo et al. [11] and successfully verified [12].Nature of problem: gpuSPHASE aims at free surface fluid dynamics simulations of long running physical phenomena that must be calculated in the order of real-time. Due to the long physical time and thus the requirement of millions to billions of iterations, the code is restricted to 2D. This restriction allows for optimizations that would not be possible for more generic approaches [13].Solution method: gpuSPHASE is a 2D SPH solver for CUDA capable devices that is optimized for the computation of real-time simulations. Compile time definitions allow to optimize the code for fast execution of the CUDA kernel functions. Symplectic time integration and correction methods enable stable simulations of long physical time problems.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.