Can preCICE handle intermediate computations?

Hello all,
Thank you for your contributions.

I am trying to couple two OpenFOAM solvers (permaFOAM and olaFlow) in order to simulate the erosion of a frozen cliff. permaFOAM solves the thermodynamics of the frozen cliff and estimates the amount of thawed sediment that is available for erosion, while olaFlow simulates the hydrodynamic condition that drives the erosion. As the simulation progresses, it is expected that the cliff geometry will change, and this change in geometry will affect the two solvers. Here are my questions. The erosion of the cliff is conditioned on the exceedance of the critical shear stress of the sediments in the wall, which can be defined as a constant. However, the wave shear stress has to be computed as a function of the prevailing hydrodynamic condition. Can preCICE handle this intermediate computation and the subsequent implementation of the condition where cells are removed when the wave shear stress exceeds the critical shear stress?
I look forward to your suggestions.
Have a good day.

To understand what you are asking and help you with your question, it would be very useful to sketch a simplistic figure showing the different regions of the domain, their boundary conditions, the exchanged data (which participant writes/reads what), and which solvers you want to use where.

You can always extend the OpenFOAM adapter to compute and exchange custom fields.

preCICE_question.txt (3.6 KB)


Hello @Makis, I appreciate your response. The attached files contain the summarized problem statement for my case. Have a good evening.

Hi @Femi,

please include such descriptions directly in your posts, and not in attachments: this way, they are searchable and much easier to read.

The description is quite extensive, but now I understand that what you actually are asking is:

I assume that this is a mesh-based quantity that you can compute in one of the OpenFOAM-based solvers. As I wrote, you can modify the source code of the adapter to include this computation in the fields you are exchanging (either before writing or after reading).

In case this is not some mesh-based quantity, but a uniform value across the domain, let me know.