How to Use GPU in ANSYS Fluent?

In computational fluid dynamics (CFD) simulations, achieving faster and more efficient computations is a critical goal for engineers and researchers. With the increasing complexity and scale of simulations, leveraging advanced hardware like Graphics Processing Units (GPUs) has become essential for reducing simulation time and enhancing solver performance. ANSYS Fluent, one of the leading CFD software tools, integrates GPU acceleration to optimize solver efficiency, particularly for pressure-based solvers and large-scale simulations.

This comprehensive guide explores the step-by-step process to enable GPU acceleration in ANSYS Fluent, discusses its numerous advantages, and provides practical recommendations for maximizing your hardware utilization for CFD simulations. Whether you’re new to GPU computing or looking to optimize your existing simulation workflow, this article will help you understand how to effectively use GPUs in ANSYS Fluent.

 

What is a GPU, and How Does it Differ from a CPU? Applications in Engineering

In the world of computing technology, two fundamental processing units drive almost all computational tasks: the CPU (Central Processing Unit) and the GPU (Graphics Processing Unit). While they share the common goal of processing data, their architecture, functionality, and applications differ significantly, particularly in the context of engineering simulations and scientific computing.

How to Use GPU in ANSYS Fluent?

Figure 1: CPU Vs. GPU

What is a GPU?

A Graphics Processing Unit (GPU) is a specialized hardware component specifically designed for parallel processing. GPUs were originally developed to handle the demanding graphical rendering tasks required for gaming and visualization. However, their remarkable ability to perform thousands of calculations simultaneously has made them absolutely indispensable for computationally intensive tasks beyond graphics, such as machine learning, scientific simulations, and engineering analysis like CFD.

Key features of a GPU include:

  • ParallelismGPUs excel at performing multiple operations concurrently, making them ideal for tasks involving large datasets such as CFD mesh calculations.
  • High Throughput: They process data at an exceptionally high speed, especially for repetitive calculations common in fluid dynamics simulations.
  • Specialized Architecture: Designed with hundreds to thousands of cores optimized for parallel execution of similar instructions.

What is a CPU?

The Central Processing Unit (CPU) is the primary processor in a computer, responsible for executing all general-purpose tasks. CPUs are optimized for serial processing, meaning they handle tasks sequentially, with a focus on versatility and precision.

Key features of a CPU include:

  • Low LatencyCPUs are designed to handle tasks requiring high accuracy and responsiveness, making them suitable for system operations.
  • Flexibility: They can perform a broad range of operations, making them suitable for managing system-level functions and varied computational tasks.
  • Limited ParallelismCPUs typically have fewer cores than GPUs (usually 4-64 cores compared to thousands), optimized for sequential processing rather than parallel tasks.

Key Differences Between GPU and CPU

The key differences between GPU and CPU are summarized in the table below, highlighting aspects such as processing type, core count, clock speed, task suitability, memory bandwidth, and latency:

Table 1- Key Differences Between GPU and CPU.

Aspect CPU GPU
Processing Type Serial processing Parallel processing
Core Count Few cores (e.g., 4-64 cores) Hundreds to thousands of cores
Clock Speed Higher clock speed per core Lower clock speed per core
Task Suitability General-purpose tasks Specialized, repetitive tasks
Memory Bandwidth Lower Higher
Latency Optimized for low latency Optimized for high throughput

While CPUs remain critical for general-purpose tasks and system-level operations, GPUs are revolutionizing engineering workflows by enabling faster and more efficient simulations. By understanding the strengths and limitations of both processors, engineers can optimize their computational setups to achieve the best performance for their specific CFD simulation needs.

 

What is GPU solver?

A GPU solver is a specialized computational tool designed to utilize the parallel processing capabilities of Graphics Processing Units (GPUs) for accelerating numerical simulations in applications like CFD. Unlike traditional CPU solvers, which rely on sequential processing, GPU solvers can execute numerous calculations simultaneously. This parallelism drastically reduces computation time, making GPU solvers ideal for handling large-scale CFD problems where millions of equations are solved iteratively.

In ANSYS Fluent, the GPU solver is engineered to offload computationally intensive tasks—such as pressure-based coupled solvers and sparse matrix calculations—to the GPU. This offloading process allows engineers to achieve faster convergence rates and tackle complex models with greater efficiency. The key advantages of GPU solvers include:

  • Parallel ComputingGPUs handle multiple operations at once, offering significant time savings for CFD simulations.
  • Scalability: Ideal for large, high-resolution CFD simulations with millions of cells.
  • Cost Efficiency: Reduces hardware requirements by optimizing existing resources, potentially replacing large CPU clusters with fewer GPU cards.

 

ANSYS Fluent GPU Acceleration

ANSYS Fluent offers powerful GPU acceleration to enhance the performance of CFD simulations. By leveraging GPUs, Fluent can efficiently handle computationally demanding tasks like linear algebra calculations, especially for large-scale simulations. The primary benefit of GPU acceleration lies in its ability to improve solver performance for pressure-based solvers, making it suitable for both incompressible and compressible flow simulations.

Recent versions of Fluent have introduced Native GPU support, which offers significant performance enhancements compared to earlier implementations. Native GPU support enables Fluent to directly integrate GPU acceleration into its workflows, providing:

  • Improved Solver Efficiency: Faster convergence and reduced simulation time.
  • Enhanced Usability: Simplified GPU configuration and activation within the Fluent interface.

However, the performance gains from GPU acceleration depend on several factors:

  • Simulation Complexity: Larger and more complex models benefit more from GPU acceleration.
  • Hardware Specifications: The strength of the GPU (e.g., memory and processing power) directly impacts the level of improvement.
  • Solver TypeGPU acceleration is most effective for pressure-based solvers in ANSYS Fluent.

How to Use GPU in ANSYS Fluent?

Figure 2: Numerical CFD simulation using GPU – CPU solvers

Results from CFDLAND Testing

To provide more insight into GPU acceleration performance, the CFDLAND team conducted benchmark tests under controlled conditions. The table below summarizes the results obtained, showcasing the speed improvements achieved with different configurations:

Table 2- results obtained by CFDLAND.com

CPU GPU P-V Coupling Equations Solved by GPU Time/Iteration (s) Total Time (s) Iterations Speed-Up (%)
1 0 Coupled 8.342 2235 268
1 1 Coupled Pressure Coupled 3.574 982 263 55.4
4 0 Coupled 1.873 520 275
4 1 Coupled Pressure Coupled 1.315 354.12 265 32.1

These results clearly indicate that GPU acceleration can significantly reduce computation time, particularly in scenarios where pressure-based solvers are employed. However, it is essential to note that the actual speed-up depends on the specific simulation setup and hardware configuration. Every CFD case must be tested individually to determine the potential performance improvement when using GPU acceleration in ANSYS Fluent.

In conclusion, while GPU acceleration offers exciting possibilities for faster CFD simulations, users should evaluate their hardware capabilities and simulation requirements carefully to optimize its benefits for their specific applications.

 

Ansys Fluent GPU Requirements

To utilize GPU acceleration in ANSYS Fluent, users must meet specific hardware and software requirements. These include:

Supported GPUs: Fluent supports primarily NVIDIA GPUs based on the CUDA architecture. Commonly supported models include:

  • NVIDIA Tesla series
  • NVIDIA Quadro professional cards
  • NVIDIA RTX Series GPUs

Starting with the 2024 version, AMD GPUs are included in ANSYS’s beta services. While full support for AMD GPUs is still under development, future versions are expected to fully integrate AMD hardware for CFD simulations.

GPU Memory: A minimum of 8 GB GPU memory is recommended for small to medium-sized simulations. For large CFD simulations, GPUs with 16 GB or more memory are strongly preferred to handle complex meshes efficiently.

Driver Compatibility: Ensure that the latest CUDA drivers are installed for NVIDIA GPUs to achieve optimal performance with ANSYS Fluent.

Fluent Version: GPU acceleration is available in newer versions of ANSYS Fluent. It is strongly recommended to use the latest release to access advanced features and optimizations for GPU computing.

By fulfilling these requirements, users can unlock the full potential of GPU acceleration and achieve substantial performance gains in Fluent for their CFD simulations.

 

How to Use GPU in ANSYS Fluent?

Using GPU acceleration in ANSYS Fluent involves a few simple steps that any engineer can follow:

  1. Verify Hardware Compatibility: Ensure that your system has a supported NVIDIA GPU with sufficient memory and the latest CUDA drivers installed.
  2. Launch Fluent: Open ANSYS Fluent and select the “Double Precision” option for improved numerical accuracy (optional but recommended for most CFD simulations).
  3. Enable GPU Acceleration: In the Fluent launcher, navigate to the “Parallel Settings” tab. Select the GPU option and specify the number of GPUs to use for your simulation.
  4. Run the Simulation: Set up your CFD simulation as usual and start the solver. Fluent will automatically offload eligible computations to the GPU for faster processing.

Figure 1 and Figure 2 illustrate the GPU acceleration setup in ANSYS Fluent for versions 2022 R1 and 2023 R2. While both allow users to configure the number of GPUs, there is a slight difference in their interface configuration and layout.

How to Use GPU in ANSYS Fluent?

Figure 3: GPU setup in ANSYS Fluent 2022 R1.

How to Use GPU in ANSYS Fluent?

Figure 4: GPU setup in ANSYS Fluent 2023 R2.

You can also check your GPU information in the console from the GPU info section. The asterisk (*) next to your GPU name indicates that the GPU is active and properly recognized by ANSYS Fluent. This is shown in the images below.

GPU CFD

Figure 5- Your GPU information.

 

Limitations of GPU Usage in ANSYS Fluent

While GPU acceleration in ANSYS Fluent offers significant performance benefits, it is not universally compatible with all modules and simulation types. Understanding the limitations of GPU usage is essential for optimizing simulation workflows and avoiding potential issues. This section explores which modules in Fluent support GPU acceleration, which do not, and the compatibility of GPUs with 2D and 3D simulations based on official ANSYS documentation.

 

Modules Compatible with GPU in Fluent

ANSYS Fluent supports GPU acceleration for certain computational tasks and solver types. The modules and features compatible with GPU acceleration include:

Pressure-Based Solvers:

  • Ideal for both incompressible and compressible flow simulations.
  • Sparse matrix calculations and linear algebra tasks are offloaded to GPUs for faster processing.

Energy Equations:

  • Heat transfer calculations benefit from GPU acceleration when coupled with pressure-based solvers.

These modules are specifically designed to leverage the parallel computing capabilities of GPUs, ensuring faster convergence and improved computational efficiency for your CFD simulations.

 

Modules NOT Compatible with GPU in Fluent

According to official ANSYS documentation, several modules and simulation types are not compatible with GPU acceleration. These include:

Chemical Reactions and Combustion Models:

  • Modules involving detailed chemical kinetics or combustion processes are not accelerated by GPUs. These tasks require CPU-based processing due to their complexity and sequential nature.

Multiphase Flow Models:

  • Advanced multiphase models (e.g., Volume of Fluid (VOF), Eulerian multiphase, and mixture models) are not supported by GPU acceleration. Only single-phase or simpler flow setups can utilize GPU computing.

Discrete Phase Model (DPM):

  • Particle tracking and interactions are CPU-bound and do not benefit from GPU acceleration.

Turbulence Models:

  • Complex turbulence models, such as Reynolds Stress Model (RSM) and Large Eddy Simulation (LES), are not compatible with GPU acceleration.

Radiation Models:

  • Radiation heat transfer computations are not offloaded to GPUs.

Acoustics and Aeroacoustics:

  • Sound wave propagation and aeroacoustic simulations rely solely on CPU-based solvers.

These limitations stem from the sequential nature and computational complexity of these models, which are not currently suitable for parallelization on GPUs.

 

2D vs. 3D Simulations with GPU

Another critical limitation of GPU usage in Fluent is its compatibility with 2D and 3D simulations:

2D Simulations:

  • GPU acceleration is generally not supported for 2D simulations in Fluent. This is due to the lower computational load of 2D models, which does not justify offloading tasks to the GPU.

3D Simulations:

  • GPU acceleration is fully supported for 3D simulationsFluent can utilize GPU resources effectively for large-scale 3D models, enabling faster computation and improved solver performance.

Thus, engineers should prioritize GPU usage for 3D CFD simulations to maximize hardware efficiency and get the best return on their GPU investment.

All compatibility and incompatibility aspects of GPU acceleration in ANSYS Fluent should be thoroughly tested, as various factors such as simulation setup, model complexity, and hardware specifications can significantly impact performance. Additionally, it is possible that these limitations may be addressed

 

How to Use GPU in ANSYS Mechanical?

ANSYS Mechanical also supports GPU acceleration, but the setup process differs from Fluent. While Fluent involves configuring GPU acceleration in the “Parallel Settings” under the Solver section, Mechanical requires enabling GPU acceleration in the Solver Preferences or through system settings.

ANSYS Mechanical uses GPU acceleration primarily for solving Finite Element Analysis (FEA) problems. GPU acceleration in Mechanical specifically targets matrix operations and can significantly speed up simulations involving large models with complex meshes, especially during the solution phase (linear/nonlinear). This makes GPU computing particularly valuable for structural and mechanical analyses that complement CFD simulations.

 

Example of GPU-Based Solution: Automotive External Aerodynamics

In the official ANSYS blog post, “Unleashing the Full Power of GPUs for ANSYS Fluent,” a detailed example is provided showcasing the use of GPUs for automotive external aerodynamics simulations[1].

Hardware Configuration:

  • Single GPU: One NVIDIA A100 achieves 5X greater performance than a cluster of 80 Intel Xeon Platinum 8380 cores.
  • Multi-GPU: Scaling up to 8 NVIDIA A100 GPUs results in a remarkable 30X speed-up compared to CPUs alone.

Results:

  • Simulation Time: Reduced drastically from weeks to hours for complex automotive CFD simulations.
  • Power Consumption: A GPU server with 6 NVIDIA V100 GPUs consumes 2400 W, compared to 9600 W for a 1024-core CPU cluster — a 4X reduction in power usage.

The comparison of different configurations for the DrivAer model simulation, including single GPU, multi-GPU, and CPU clusters, is illustrated in Figure 5 of the documentation. This chart clearly highlights the substantial performance improvements achieved with GPU acceleration for automotive CFD applications.

How to Use GPU in ANSYS Fluent?

Figure 6: Car external aerodynamics using GPU CFD in ANSYS Fluent

How to Use GPU in ANSYS Fluent?

Figure 7- Speedup of an automotive external aerodynamics simulation when leveraging GPUs

Related Blogs

While GPU acceleration currently doesn’t support multiphase models in ANSYS Fluent, understanding the Volume of Fluid (VOF) methodology is essential for engineers working with complex multiphase simulations that may benefit from future GPU optimization.

To maximize GPU acceleration benefits in ANSYS Fluent, you’ll need to ensure your system meets or exceeds the recommended hardware specifications outlined in our detailed guide to ANSYS system requirements for both CPU and GPU configurations.

While ANSYS Fluent offers advanced GPU acceleration for complex simulations, ANSYS Discovery provides real-time simulation capabilities with different GPU utilization strategies—learn which software best suits your engineering workflow and hardware capabilities.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Scroll to Top