Boost your simulation performance with GPU

June 29, 2023
Siddharth Marathe and Andreas Henne

“Time is money”. In the world of simulation this means being able to perform reliable simulations, faster.
Throughout its development, PreonLab has already introduced game-changing approaches, like its unique implicit IISPH formulation (learn more about it here) and advanced adaptive refinement and coarsening with Continuous Particle Size (read about it here) for efficient simulation on CPU hardware.
Over the past decade, the development of more advanced GPUs has gathered up great speed and it is likely that this trend will continue in the future. Behind the scenes, we too have been experimenting with GPUs for some time now, to fully leverage their potential for PreonLab.
Now, PreonLab’s code has been ported to run on GPUs making use of Nvidia’s proprietary CUDA API to push the speed-barrier for particle-based simulation even further.

Share:

So, what’s the speed-up?

The performance boost on GPU is tremendous. This article will give you an overview of what this new possibility means for your simulations. You can see the results from the following showcases, where the simulation performance has been compared between GPU and CPU.

Let’s first take a look at the FZG gearbox simulation, which is a well-established benchmark to analyze, among other things, lubricant distribution based on the standard FZG back-to-back gear test rig. This test rig is a setup for experimental investigations of cylindrical gears developed at the Gear Research Center (FZG) at the Technical University of Munich (TUM). The setup, which is depicted in Figure 1, includes two cylindrical gears – the pinion and the wheel, which are fixed on two parallel shafts. The test rig can be operated at variable speeds – from low rotational speeds to high rotational speeds – with the help of an electric driving motor.
You can find further details of the test rig here: Cylindrical Gears – Chair of Machine Elements (tum.de)

Figure 1: FZG gearbox setup

Showcase 1: FZG gearbox single-phase simulation

At low rotational speeds, single phase simulations are the best option to achieve good results quickly.
Although the application involves more than one fluid, the second, less-significant fluid phase can be modelled as a drag force boundary condition. Simulating on GPU makes it possible to achieve these results even faster.

While performing the simulation with 1.8 million particles for 2 seconds of physical time can take roughly 140 minutes on a 36-cored CPU, the same results can be achieved within just 6 minutes with the GPU – leading to an impressive speed-up factor of around 23.3 times! This speed-up has been depicted in Figure 2.

Figure 2: Speed-up for single-phase gearbox simulations on GPU compared to CPU

Showcase 2: FZG gearbox multiphase simulation

For applications like large gearboxes or cases with high rotational speeds, the second fluid phase (in this case, air) becomes more influential and introduces additional effects which are not captured in single-phase simulations. Hence, it is necessary to perform multiphase simulations to achieve accurate simulation results. This is the case for the FZG gearbox at higher rotational speeds, and the simulation is usually more time-intensive compared to performing a single-phase simulation.
The GPU implementation proves to be highly beneficial for efficient simulation when it comes to such multiphase applications.

Figure 3: Speed-up for multiphase gearbox simulations on GPU compared to CPU

Figure 3 shows the speed-up which can be achieved on GPU for a multiphase gearbox simulation with 3 million particles when compared with CPU with 128 threads.
Simulating on GPU results in a speed-up factor of 6.3 times. Imagine being done with your simulation within a day, instead of having to wait for almost a week!

Another way of looking at this is that simulating on GPU will make it possible to perform simulations longer while staying within the bounds of realistic runtimes.
We recently simulated a multiphase gearbox simulation at high rpms (20 m/s) for 5 seconds of physical time within 45 hours on GPU – basically, simply over the weekend. The simulation contains around 2.2 million particles. Previously, these simulations could even take up to a couple of weeks to complete simulation for just 2 seconds of physical time. The simulation results can be seen in Video 1.

Please agree to the transfer of data to third parties as set out in our privacy policy.

Video 1: Multiphase gearbox (FZG) simulation with PreonLab 6.0

The simulation was performed for high rotational speeds (20 m/s) of the gears, for 5 seconds of physical time – within 45 hours on GPU.

Showcase 3: Impinging jet benchmark – Thermal simulation

Another performance study was performed for a thermal benchmark – the impinging jet. Impinging Jet simulations are fundamental when it comes to performing fluid simulations for e-motor cooling. You can find more details on the impinging jet benchmark here. The study investigated the runtime performance between CPU and GPU for 2.86 million particles. The results of the study and the respective speed-ups have been shown in Figure 4. Again, the simulation on GPU was completed almost six times faster than the simulation on CPU.

Figure 4: Speed-up for an impinging jet (thermal) simulation on GPU compared to CPU

Validation - CPU vs GPU

So, how do the simulation results on the GPU look like compared to the CPU?
Figures 5 and 6 show that the results on GPU are very consistent with the results achieved on CPU – they are simply obtained quicker!

Figure 5: Visualization of multiphase FZG gearbox simulations performed on CPU (left) and GPU (right)

Figure 6: Visualization of wiper simulations performed on CPU (left) and GPU (right)

Conclusion

The ability to simulate with PreonLab on GPU is here and it will give you the greatest leap in performance, yet.
Whether it is single-phase, multiphase, or thermal simulations – the results are validated, and the speed-up is tremendous.

Put the pedal to the metal and switch to fast lane – with PreonLab on GPU!

RELATED ARTICLES

LEARN MORE ABOUT PreonLab Updates

How to get started with
Preonlab CFD software?
Get in Touch