Computational Fluid Dynamics (CFD) Solving Techniques and Implementation

Sankalp Thakur
4 min readApr 12, 2022

--

This piece presents an overview of various CFD solving techniques, discretization methods, and software tools that are widely used in industrial research and development departments. The report focuses on the key discretization techniques, such as Finite Difference, Finite Volume, and Finite Element, as well as other methods like Spectral Methods, Boundary Element Methods, and Particle Methods. It also covers grid generation, mesh generation, and popular techniques for analyzing and solving various types of equations. Lastly, the report introduces ANSYS Fluent and Workbench as comprehensive software tools for CFD applications in the industry.

Introduction

Computational Fluid Dynamics (CFD) is a crucial tool in the research and development (R&D) process for industries, as it provides valuable insights into fluid flow behavior and facilitates the optimization of designs and processes. CFD involves the numerical solution of partial differential equations (PDEs) that govern fluid flow. This report focuses on the fundamental solving techniques, discretization methods, and software tools that are commonly employed in industrial R&D departments.

Discretisation Techniques

Discretization is the process of approximating the continuous PDEs or integral equations using discrete representations. Information loss is inherent during discretization, making it a critical aspect of CFD. The following techniques are widely used for this purpose:

The Big Three

  • Finite Difference
  • Finite Volume
  • Finite Element

Other Techniques

  • Spectral Methods
  • Boundary Element Methods (BEM)
  • Particle Methods

Grid Generation and Meshing

Grid and mesh generation are essential aspects of discretization, as they represent the geometry and model used in the calculations. The following techniques are commonly used in industrial applications:

  • Grid Generation (for Finite Difference calculations)
  • Mesh Generation (for Finite Volume calculations)
  • Unstructured meshes
  • Cartesian meshes

Solving Techniques

Various solving techniques are employed for different types of equations, including:

Lax-Wendroff Technique: This is an explicit, finite difference menthod. applicable to time and space marching solutions, especially hyperbolic equations

Maccormack’s Technique: applicable to time and space marching solutions, especially hyperbolic equations

Crank-Nicolson Technique: applicable to time and space marching solutions, especially parabolic equations

Relaxation Technique: applicable to elliptic equations

Alternating-Direction-Implicit(ADI) Technique: applicable to time and space-marching solutions, hyperbolic and parabolic equations

The pressure correction technique: application to elliptic, parabolic and hyperbolic equations

Software Tools for Industrial R&D

ANSYS Fluent and Workbench are comprehensive software tools that are widely used in industrial R&D for CFD applications. These tools provide a complete suite of functionalities, from geometry creation and meshing to solving and post-processing. Some of their features include:

  • Geometry/Drawing: SpaceClaim
  • Meshing: ANSYS Meshing Tool
  • Finite Element Analysis (FEA): Global and local settings, various meshing methods, and mesh convergence
  • Fluid Flow Solver: CFX and FLUENT
  • Post-Processing

Conclusion

CFD solving techniques, discretization methods, and software tools play a vital role in industrial R&D departments. Understanding the fundamentals of these methods and tools is essential for engineers and researchers to effectively analyze fluid flow problems and optimize designs and processes. With the appropriate choice of techniques and software tools, R&D departments can harness the power of CFD to drive innovation and improve product performance.

Running a CFD simulation

Outlining the steps required to run a CFD simulation on OpenFOAM with variable motor geometry and boundary conditions:

  1. Preprocessing: The first step is to prepare the 3D model of the motor for simulation. This would involve creating a computational mesh that divides the motor into a set of discrete cells or elements. The mesh should be fine enough to capture the important flow features of the motor, but not so fine that the computational cost becomes prohibitively high. This can be done using OpenFOAM’s built-in meshing utilities or external software like Salome, Gmsh, or Pointwise.
  2. Setting up the case: Next, you need to create a case directory for the simulation, which contains the mesh and input files for the simulation. You can use the OpenFOAM case setup utility, foam-extend-4.1/bin/foamNew for this purpose. Within the case directory, you can also define the simulation parameters, such as the simulation time, timestep size, and solver settings, as well as the boundary conditions for each surface of the motor.
  3. Defining the physics: After setting up the case, you need to define the physics of the simulation. This involves choosing the appropriate turbulence model (e.g. k-epsilon, k-omega), fluid properties (e.g. density, viscosity), and solver settings (e.g. discretization schemes, relaxation factors). The OpenFOAM solver, icoFoam is a good starting point for incompressible flow simulations.
  4. Running the simulation: Once the physics and boundary conditions are defined, you can start the simulation using the simpleFoam or pimpleFoam solver. The simulation can be run in parallel mode using MPI (Message Passing Interface) to speed up computation on multiple cores or a cluster. You can monitor the simulation progress and convergence using the output files generated by the solver.
  5. Postprocessing the results: After the simulation has completed, you can use OpenFOAM’s built-in postprocessing utilities like ParaView or OpenFOAM’s own post-processing tools to visualize the results. You can plot and animate the simulation results, as well as calculate and export various quantities of interest like pressure, velocity, and heat transfer.
  6. Optimization: If desired, you can optimize the motor design or operating conditions by modifying the geometry or boundary conditions and repeating the simulation. This can be done using OpenFOAM’s built-in optimization toolkit or by writing custom code to automate the process.

In summary, running a CFD simulation on OpenFOAM with variable motor geometry and boundary conditions requires preparing the mesh, setting up the case and simulation parameters, defining the physics, running the simulation, and postprocessing the results.

--

--

Sankalp Thakur

I take notes on medium about everything around the sun.