Bringing GPU Parallelization and Complex Boundaries to a Computational Fluid Dynamics Solver
Summary
We present optimizations and flexibility improvements to an existing computational fluid dynamics solver based on fast Fourier transforms. The existing solver was implemented partly on the CPU and partly on the GPU, leading a large performance overhead due to context switches. This, among other performance issues, made it unfeasible for practical application. Additionally, the grid-based manner in which the boundaries for solids were implemented limited the range of problems it could accurately depict and solve. Moreover, the abundance of hard-coded features made it cumbersome to use. In this thesis, these problems are resolved as follows: Nearly the entire solver has been ported to the GPU, eliminating the performance overhead introduced by context switches. A host of additional runtime and memory optimizations are implemented into the program. The implementation of boundaries has been improved to handle arbitrary geometries. Finally, a basic command-line interface has been introduced to set a range of solver parameters when launching the program. In optimal situations the runtime is decreased by a factor exceeding 1000x and the memory footprint is reduced by up to a petabyte. In more general cases the runtime decrease is often in the triple digits and the footprint is reduced by many gigabytes. With the introduced improvements the way is paved for the solver to be a tool that is used by researchers in the field of fluid dynamics.