The OpenFOAM adapter separates the core functionality (e.g. calling preCICE methods) from the problem-specific methods (e.g. accessing fields and converting quantities). The latter is encapsulated into “modules”, which add only a few lines of code in the core. The following, simplified UML diagram gives an overview:
In case you just want to couple a different variable, you need to create a new
coupling data user class in the
preciceAdapter::CHT namespace or in a new one.
Then you need to add an option for it in the configuration part
to add objects of it into the
Note: make sure to include any additional required libraries in the
section of the
Make/options. Since the adapter is a shared library,
another missing library will trigger an “undefined symbol” runtime error.
See also the notes and discussion in issue #7: Create a module for fluid-structure interaction.