Using preCICE to simulate a free-falling wedge over water in a multiphase simulation

Hello, everyone, I hope you are having a lovely day.

I am new to preCICE and have some experience in openFOAM. I am trying to simulate a simple case of a 2D falling wedge (similar to this) using FSI to couple openFOAM and calculix to also assess the deformation along the structure besides the wedge motion itself. In a first try using a box intead of a wedge, the following error appeared:

    From void adapterInfo(std::__cxx11::string, std::__cxx11::string)
    in file Utilities.C at line 50
    Error (deferred - will exit later) in the preCICE adapter:

    failed lookup of cellDisplacement (objectRegistry region0)
    available objects of type volVectorField:
2(Force U)

Then, looking up and trying to understand what is going on, I found out that the problem (so far) is in the dynamic mesh dict, where I was using the sixDoFRigidBodyMotionSolver. In this case, I was wondering if preCICE can be used for my case and, if it can, what can I do to run it? Is there an alternative for this solver where I can input mass and initial velocity and it can work in preCICE? I’ve seen topics related to the subject, but none of them could help a beginner like me.

Thank you, any assistance would be gladly appreciated.

Welcome, @matfuji,

I understand that you are trying to simulate a rigid body - fluid interaction, not a fluid-structure interaction. The sixDoFRigidBodyMotionSolver probably does not register a displacement field, leading to this error.
On the adapter level, if you want to use this mesh motion solver, you can try extending or modifying the adapter: Extend the OpenFOAM adapter | preCICE - The Coupling Library (the benefits of open-source!)

My main question here, however, is: what do you want to couple?

If you want to couple the rigid body to the two-phase flow, then this is not easily possible with preCICE at the moment (we are working on a re-meshing feature, @fsimonis). Note that, in our Quickstart case, we are also coupling an OpenFOAM fluid case with a rigid body solver. Admitedly, there we only simulate small motions, instead of letting the rigid body fall through the complete domain, so this probably does not really help.

If you want to couple the two phases to each other, then preCICE is probably not the right tool for you.

Sounds related: FSI: Support solidBody solver · Issue #86 · precice/openfoam-adapter · GitHub