OpenONDA: A Python Interface for In-Line Control of OpenFOAM Solvers

Authors

  • Flavio A. C. Martins Faculty of Aerospace Engineering, Flow Physics and Technology Department, Wind Energy Section. Delft University of Technology, Kluyverweg 1, Delft, The Netherlands https://orcid.org/0000-0002-1374-5760
  • Alexander van Zuijlen Faculty of Aerospace Engineering, Flow Physics and Technology Department, Aerodynamics Section https://orcid.org/0000-0003-2759-4008
  • Carlos S. Ferreira Faculty of Aerospace Engineering, Flow Physics and Technology Department, Wind Energy Section. Delft University of Technology, Kluyverweg 1, Delft, The Netherlands https://orcid.org/0000-0003-0192-3651

DOI:

https://doi.org/10.51560/ofj.v6.151

Keywords:

Vortex formation, Software coupling, Python wrapper, Scientific Computing, pimpleFoam

Abstract

This work introduces and demonstrates a Python wrapper for controlling and externally coupling OpenFOAM's PIMPLE-based solver with other solvers and libraries via encapsulation. The proposed framework integrates a custom, stepwise implementation of OpenFOAM's pimpleFoam solver into a Python interface, enabling in-line solver advancement and providing high-level methods for mesh manipulation, boundary condition management, and interaction with scientific computing tools such as NumPy and SciPy. To demonstrate its potential for external coupling of OpenFOAM via Python, the framework is applied to computational fluid dynamics problems with analytically derived boundary conditions, highlighting generalizable coupling and data management strategies across diverse flow scenarios. The selected test cases include (i) vortex-filament flow, (ii) vortex-ring flow, (iii) doublet flow with coupled computational domains, and (iv) moving dipole flow in a non-inertial reference frame. These cases address key challenges such as dynamic meshes, multiple OpenFOAM instances, and non-inertial effects. Additionally, this paper details the data exchange methodology and workflow, assessing the effectiveness of the proposed approach for scriptable coupling and management of OpenFOAM within Python.

Published

2026-12-03

Issue

Section

Full Papers

How to Cite

A. C. Martins, F., van Zuijlen, A., & S. Ferreira, C. (2026). OpenONDA: A Python Interface for In-Line Control of OpenFOAM Solvers. OpenFOAM® Journal, 6, 187-206. https://doi.org/10.51560/ofj.v6.151