# Benchmarking OpenFOAM Solver for CFD Applications

**Abstract:**

The objective of this paper is to build capability in OpenFOAM software. We selected 10 different CFD applications such as internal and external flows – Laminar and turbulence, steady and unsteady simulations, forced convection in laminar and turbulent flows, etc. The selected CFD applications are simulated using OpenFOAM standard solvers & solvers in leading commercial software. The results are compared between softwares for each application separately and correlated with experimental or Theoretical data** **

Also the other objective is to use OpenFoam for IN house projects due to cost benefit, the available commercial softwares are very high priced, whereas OpenFOAM software is free of cost and have 80 different solvers to solve variety of problems. Also, the correlation of OpenFOAM results with experimental or Theoretical data is expected to be very close.

**Introduction:**

OpenFOAM® is free, open source software for Computational Fluid Dynamics, which has a large user base across most areas of engineering and science. It has extensive features to solve from complex fluid flows to solid dynamics and electromagnetics. It includes tools for meshing and pre and post processing. It offers users complete freedom to customize and extend its existing functionality.

CFD applications considered for this paper is taken from learning module in Cornell University courses. Problem definition is modified in some cases based on our requirement.

**Methodology:**

The methodology shown in Fig 1 is followed to make sure one to one comparison between solutions of OpenFOAM and commercial software. Meshing for CFD applications are done in Ansys Mesher with reference to the learning module meshing guidance and exported in .msh format. Then mesh is imported into OpenFOAM & commercial software and solving is carryout in respective solvers.

Fig.1

OpenFOAM solver cannot import 2D Axis-symmetric mesh created in Ansys-Mesher. Therefore BlockMesh tool is used for generating mesh for axis – symmetric applications.

Incompressible and compressible solvers are used in both OpenFOAM and commercial software. OpenFOAM provides different standard solvers for solving incompressible and compressible flows with various turbulence model for steady and unsteady applications. Appropriate OpenFOAM solvers are used based on the type of application.

The Solutions of all CFD applications are post processed in commercial software and Paraview software and results are compared.

** Problem Description, Mesh and Setup:**

Laminar Pipe FlowConsider fluid flowing through a circular pipe of constant radius. The pipe diameter ρ = 1 kg/ m and coefficient of viscosity µ = 2 x 10^{3}^{-3} kg/ (m s).
| ||||||||||||||||||||||||||||||||||

Turbulent Pipe Flow
ρ = 1 kg/ m and coefficient of viscosity µ = 2 x 10^{3}^{-5} kg/ (m s). (Re=100000)
| ||||||||||||||||||||||||||||||||||

Steady Flow Past a Cylinder
| ||||||||||||||||||||||||||||||||||

Unsteady Flow Past a Cylinder
| ||||||||||||||||||||||||||||||||||

Flow Over a Flat Plate
| ||||||||||||||||||||||||||||||||||

Flow Over an Airfoil
| ||||||||||||||||||||||||||||||||||

Laminar Forced ConvectionA fluid enters a pipe of radius 0.06 meters at a constant velocity of 0.1 m/s. The fluid has a density of 1.2 kg/m^3, a thermal conductivity of 0.02 W/m K , a specific heat of 1000 J/kg K , and a viscosity of 1.8e-5 kg/m s . The first 5.76 meters of the pipe are isothermal, held at 300 K. The remaining 2.88 meters of the pipe have a constant heat flux of 37.5 W/m^2 added at the wall.
| ||||||||||||||||||||||||||||||||||

Turbulent Forced Convection
| ||||||||||||||||||||||||||||||||||

Compressible Flow in Nozzle
A = 0.1 + x Where T at the inlet is 300 K. The static pressure _{o}p at the exit is 3,738.9 Pa. The Reynolds number for this high-speed flow is large. So we expect viscous effects to be confined to a small region close to the wall. So it is reasonable to model the flow as inviscid.
| ||||||||||||||||||||||||||||||||||

Supersonic Flow over WedgeA uniform supersonic stream encounters a wedge with a half-angle of 15 degrees as shown in the figure below
| ||||||||||||||||||||||||||||||||||

Commercial Software Result | OpenFOAM Result | |||||||||||||||||||||||||||||||||

PRESSURE | ||||||||||||||||||||||||||||||||||

VELOCITY | ||||||||||||||||||||||||||||||||||

MACH | ||||||||||||||||||||||||||||||||||

**Conclusion:**

** **The wide range of CFD applications such as steady state and unsteady state, incompressible and compressible flow, laminar and turbulent flow, etc. were solved in OpenFOAM and Commercial software. The results for all the applications were compared between OpenFOAM & Commercial software and correlated against experimental or Theoretical data. It has been observed that OpenFOAM results are matching with Commercial software results for the applications. OpenFOAM results are also matching with experimental or Theoretical data very closely.

OpenFOAM offers wide range of solvers for different application. So, the selection of appropriate solver in OpenFOAM is most important for any application. OpenFOAM also allows user to create their own solvers based on the requirement. But to develop new solver, knowledge of programing and deep understanding of the CFD are very important.

**Future Work:**

In continuation to this paper, next work will be focused on solving individual applications with practical scenarios and much more complexities. The application will be solved in both OpenFOAM & Commercial software and the results will be compared against each other. Also, OpenFOAM results will be benchmarked against experimental or Theoretical data.

## Leave A Comment