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

**URL:** <https://precice.discourse.group/t/using-precice-to-simulate-a-free-falling-wedge-over-water-in-a-multiphase-simulation/1156>\
**Category:** Is preCICE for me?\
**Tags:** openfoam, calculix\
**Created:** [September 12, 2022, 6:38pm UTC](https://precice.discourse.group/t/using-precice-to-simulate-a-free-falling-wedge-over-water-in-a-multiphase-simulation/1156 "2022-09-12T18:38:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matfuji](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@matfuji](https://precice.discourse.group/u/matfuji)\
**Post date:** [September 12, 2022, 6:38pm UTC](https://precice.discourse.group/t/using-precice-to-simulate-a-free-falling-wedge-over-water-in-a-multiphase-simulation/1156/1 "2022-09-12T18:38:12Z")

</div>

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](https://www.youtube.com/watch?v=oiRj0fHioyc&ab_channel=CFD-training)) 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:

```nohighlight
    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.

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [September 13, 2022, 10:05am UTC](https://precice.discourse.group/t/using-precice-to-simulate-a-free-falling-wedge-over-water-in-a-multiphase-simulation/1156/2 "2022-09-13T10:05:28Z")

</div>

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](https://precice.org/adapter-openfoam-extend.html) (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](https://precice.org/quickstart.html) 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.

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [September 19, 2022, 9:05am UTC](https://precice.discourse.group/t/using-precice-to-simulate-a-free-falling-wedge-over-water-in-a-multiphase-simulation/1156/3 "2022-09-19T09:05:24Z")

</div>

Sounds related: [FSI: Support solidBody solver · Issue #86 · precice/openfoam-adapter · GitHub](https://github.com/precice/openfoam-adapter/issues/86)
