LAST SEEN ONLINE:
NOV 22, 2026 11:36 UTC
LOCAL_TIME_SYNC:
--:--:-- | -- _
2026 · complete · pimpleFoam / pisoFoam / simpleFoam

Numerical Investigation of Flow Past a Circular Cylinder using OpenFOAM

Development of a fully parameterised, block-structured meshing and automated simulation framework for incompressible bluff-body flow analysis in OpenFOAM.

OpenFOAMPythonBashParaViewMPI
Reynolds numbers
20 to 4500
Mesh topology
Double O-Grid
Blockage ratio
5.0%
Numerical Investigation of Flow Past a Circular Cylinder using OpenFOAM — visualisation

Motivation

The study of flow around bluff bodies, particularly the circular cylinder, is a foundational pillar of applied fluid mechanics. In engineering, cylindrical cross-sections appear in offshore risers, heat-exchanger tubes, and marine mooring cables. The alternating pressure loading from periodic wake shedding can drive resonant structural vibrations—known as vortex-induced vibration (VIV)—which significantly impacts structural fatigue life.

However, computational studies of these flows are often limited by the immense manual effort required to generate consistent, high-quality meshes across various Reynolds numbers and resolutions. This project, completed during a research internship at the University of Split, resolves that bottleneck by developing a fully parameterised, block-structured meshing and case-automation framework in OpenFOAM. This infrastructure bridges the gap between traditional CFD and large-scale data generation, allowing rigorous verification of mesh independence, temporal convergence, and turbulence model sensitivities without manual intervention.

Methodology

To maintain total geometric consistency across the campaign, the computational domain and grid were completely analytically driven via OpenFOAM’s #calc macro within a central geometryProperties dictionary.

  • Parametric Double O-Grid Topology: Instead of a standard single H-grid that introduces highly skewed cells near the cylinder wall, the near-body mesh was constructed using two concentric rings of four hexahedral blocks (a double O-grid). The inner ring resolves the viscous sublayer, while the outer ring acts as a transition buffer into the far-field H-grid.
  • Continuous Mesh Grading: Cell counts and grading expansion ratios were derived mathematically from a matched interface cell width. This ensures smooth cell size continuity across all internal block boundaries.
  • Three-Dimensional Base: Rather than a strict 2D empty planar assumption, the mesh resolves the spanwise direction with multiple cells (Nz=10N_z = 10), establishing a genuine 3D framework ready for future Large Eddy Simulation (LES) extensions.

Automated Simulation Campaign Framework

A robust suite of Bash and Python scripts was engineered to handle unattended, fault-tolerant execution of massive parametric sweeps. A central cases.csv schema dictates physical states, temporal discretizations, solver binaries, and grid parameters.

The primary execution driver, runCases.sh, uses a template-copy architecture. It clones a pristine baseCase, injects the CSV parameters iteratively, executes blockMesh, parallelizes the domain with decomposePar, runs the solver via MPI, and finally reconstructs the data.

Essential Automation Commands

1. Campaign Execution (runCases.sh) The main script automates execution over specified cores and case filters.

# Run the full campaign pipeline on 8 parallel cores
./runCases.sh --parallel 8

# Run only a specific Reynolds number case subset
./runCases.sh --parallel 8 --label case_Re500000

2. Case Cleanup (cleanCases.sh) To clean previous simulation results and logs safely without damaging the baseCase:

# Clean all generated cases and logs
./cleanCases.sh --all

# Clean a specific case and results directory
./cleanCases.sh --label case_Re500000 --results

3. Post-Processing & Visualization (postProcess.py & touch_foam.sh) To automate ParaView .foam initialization and Python-based data extraction (Strouhal number, CdC_d, ClC_l, y+y+):

# Generate marker files for quick ParaView loading
./touch_foam.sh

# Run automated Python data extraction and plot generation
python3 postProcess.py

Results & Numerical Assessment

The framework’s capability was validated through rigorous, automated sensitivity assessments evaluating Reynolds numbers ranging from creeping flow to turbulent regimes.

  • Low-Reynolds Validation: A baseline test at Re≈99.6Re \approx 99.6 successfully matched reference analytical drag coefficients (Cd=1.1564C_d = 1.1564 vs theoretical 1.09381.0938), yielding an absolute error of just ~5.7%. The steady Re=40Re=40 case yielded an error of just 0.2%.
  • Numerical Scheme Sensitivity: We identified deep dependencies on temporal discretization. Adjusting the Crank-Nicolson blending coefficient from 0.2 to 0.8 at Re=100Re=100 forced a systematic CdC_d drift, highlighting the risk of overlooking temporal configuration during verification.
  • Grid & Temporal Independence: At Re=200Re=200 using pimpleFoam, mesh refinement studies identified a “G3” mesh (96,000 cells) and a timestep of 0.00050.0005 s as the optimal balance between computational overhead and force coefficient stabilization. Scaling from 4 to 6 cores on this mesh yielded a 44% reduction in execution time.
  • Turbulence Modelling (RANS): Standard k−ϵk-\epsilon simulations displayed correctly decreasing mean drag (1.291.29 to 1.141.14) from Re=200Re=200 to Re=1000Re=1000. Conversely, the k−ωk-\omega SST model evaluated at higher regimes (Re=1000−4500Re=1000-4500) predicted abnormally high Strouhal numbers (∼0.44−0.49\sim 0.44 - 0.49) and an artificially coherent 2D wake. This critical finding proved that solely swapping RANS closures cannot supplant the physical necessity of 3D modeling and spanwise vortex dislocation in higher transition regimes.

Ultimately, this parametric infrastructure paves a seamless, version-controlled runway for the future deployment of Three-Dimensional RANS and LES on high-performance computing clusters.

💻 View Repository on GitHub

Related Projects