NOTE: this website is for DAFoam v1.1 and is no longer updated. For DAFoam v2.0+, visit

DAFoam contains two main layers: OpenFOAM and Python, and they interact through file input and output.

The OpenFOAM layer is written in C++ and contains libraries and solvers for the discrete adjoint, the documentation of the classes and functions in the OpenFOAM layer is as follows:

OpenFOAM Layer Doxygen

The Python layer contains wrapper class to control the adjoint solvers and also calls other external modules to perform optimization. The input parameters and the APIs of the Python layer are as follows:

Python Layer Doxygen

Refer to classes-python-pyDAFoam-PYDAFOAM-aCompleteInputParameterSet() for detailed explanation of the optimization input parameters.