An efficient parallel spectral code for 3D periodic flow simulations
Kairzhan Karzhaubayev,
Lian-Ping Wang,
Dauren Zhakebayev
Affiliations
Kairzhan Karzhaubayev
Guangdong Provincial Key Laboratory of Turbulence Research and Applications, Center for Complex Flows and Soft Matter Research and Department of Mechanics and Aerospace Engineering, Southern University of Science and Technology, Shenzhen 518055, Guangdong, China
Lian-Ping Wang
Guangdong Provincial Key Laboratory of Turbulence Research and Applications, Center for Complex Flows and Soft Matter Research and Department of Mechanics and Aerospace Engineering, Southern University of Science and Technology, Shenzhen 518055, Guangdong, China; Guangdong-Hong Kong-Macao Joint Laboratory for Data-Driven Fluid Mechanics and Engineering Applications, Southern University of Science and Technology, Shenzhen 518055, China; Corresponding author at: Guangdong Provincial Key Laboratory of Turbulence Research and Applications, Center for Complex Flows and Soft Matter Research and Department of Mechanics and Aerospace Engineering, Southern University of Science and Technology, Shenzhen 518055, Guangdong, China.
Dauren Zhakebayev
National Engineering Academy of Republic of Kazakhstan, Almaty, Kazakhstan
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.