SoftwareX (Dec 2022)
An efficient parallel spectral code for 3D periodic flow simulations
Abstract
Numerical results from a spectral code are the defacto standard in CFD community for many fluid flow problems. Their popularity is motivated by the highest accuracy coupled with decent computational performance. In this work, we introduce the Fortran code based on a pseudospectral solver for tri-periodic flows. The code relies on the Fast Fourier Transform (FFT) and one of the fastest implementations of the FFT–FFTW Version 3. Code parallelization is performed using 2D domain decomposition and FFTW library. Whenever it is possible we tried to keep the code more explicit, even in cases which resulted in a bit more memory usage by allocating new memory for variables and arrays instead of reusing existing ones. Code validation was performed using results for a decaying 3D Taylor–Green vortex flow. In addition, the code was adapted to use the CUDA parallelization technology. The code can be used and extended by the research community for various periodic flow simulations. The availability of both CPU and GPU parallelized versions of the code provides additional flexibility in choosing the hardware platform.