An efficient parallel spectral code for 3D periodic flow simulations

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-per...

Full description

Bibliographic Details
Main Authors: Kairzhan Karzhaubayev, Lian-Ping Wang, Dauren Zhakebayev
Format: Article
Language:English
Published: Elsevier 2022-12-01
Series:SoftwareX
Subjects:
Online Access:http://www.sciencedirect.com/science/article/pii/S2352711022001625
_version_ 1811202079802261504
author Kairzhan Karzhaubayev
Lian-Ping Wang
Dauren Zhakebayev
author_facet Kairzhan Karzhaubayev
Lian-Ping Wang
Dauren Zhakebayev
author_sort Kairzhan Karzhaubayev
collection DOAJ
description 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.
first_indexed 2024-04-12T02:32:57Z
format Article
id doaj.art-463d8490cbe9406d917a7248b3ef0a47
institution Directory Open Access Journal
issn 2352-7110
language English
last_indexed 2024-04-12T02:32:57Z
publishDate 2022-12-01
publisher Elsevier
record_format Article
series SoftwareX
spelling doaj.art-463d8490cbe9406d917a7248b3ef0a472022-12-22T03:51:39ZengElsevierSoftwareX2352-71102022-12-0120101244An efficient parallel spectral code for 3D periodic flow simulationsKairzhan Karzhaubayev0Lian-Ping Wang1Dauren Zhakebayev2Guangdong 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, ChinaGuangdong 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.National Engineering Academy of Republic of Kazakhstan, Almaty, KazakhstanNumerical 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.http://www.sciencedirect.com/science/article/pii/S2352711022001625Pseudo spectral methodParallelizationDomain decompositionTaylor–Green vortex flowFast Fourier TransformCUDA
spellingShingle Kairzhan Karzhaubayev
Lian-Ping Wang
Dauren Zhakebayev
An efficient parallel spectral code for 3D periodic flow simulations
SoftwareX
Pseudo spectral method
Parallelization
Domain decomposition
Taylor–Green vortex flow
Fast Fourier Transform
CUDA
title An efficient parallel spectral code for 3D periodic flow simulations
title_full An efficient parallel spectral code for 3D periodic flow simulations
title_fullStr An efficient parallel spectral code for 3D periodic flow simulations
title_full_unstemmed An efficient parallel spectral code for 3D periodic flow simulations
title_short An efficient parallel spectral code for 3D periodic flow simulations
title_sort efficient parallel spectral code for 3d periodic flow simulations
topic Pseudo spectral method
Parallelization
Domain decomposition
Taylor–Green vortex flow
Fast Fourier Transform
CUDA
url http://www.sciencedirect.com/science/article/pii/S2352711022001625
work_keys_str_mv AT kairzhankarzhaubayev anefficientparallelspectralcodefor3dperiodicflowsimulations
AT lianpingwang anefficientparallelspectralcodefor3dperiodicflowsimulations
AT daurenzhakebayev anefficientparallelspectralcodefor3dperiodicflowsimulations
AT kairzhankarzhaubayev efficientparallelspectralcodefor3dperiodicflowsimulations
AT lianpingwang efficientparallelspectralcodefor3dperiodicflowsimulations
AT daurenzhakebayev efficientparallelspectralcodefor3dperiodicflowsimulations