preCICE adapter for MBDyn solver for beam elements

Hi,
I am working on an adapter to couple MBDyn with PreCICE. MBDyn is a moltibody dynamics analysis software. In particular I am working on beam elements. In MBDyn external structural elements are used to exchange load/kinematic information between MBDyn and a CFD solver when beam-like structures are used. Basically I am using the PreCICE interface mesh as a cloud of external points that send forces to the beam nodes and are moved in relation to the beam movement.
I am testing my adapter both with SU2 and OpenFOAM with simple test cases. The interaction with OpenFOAM gives me a lot of problems.
To understand better what is going on, I am working on the vertical flap case with incompressible flow. I made the following steps:

  • I’ve built a dummy fluid solver which simply reads the interface displacements and writes forces on interface nodes. Using simple concentrated forces (i.e. on the tip) or uniform forces gives the expected shape of the beam. This shows that the basic setup of the MBDyn case and its adapter works.
  • I’ve also built a dummy structural solver which simply reads the interface mesh the same way of the adapter, reads the forces coming from the flow in the interface (the fluid is simulated with OpenFOAM) and possibly moves the structure in a prescribed way. I have compared the fluid resultants in OpenFOAM and on the adapter and they match. This also tells me that the way the mesh is loaded in the structural solver is correct.
  • Unfortunately I cannot put everything together. The vertical flap case runs for one time step, converges to a blatantly wrong fluid solution (while the interface mesh barely moves). The fluid solver crashes the next calculation step.

    while the same solution with the dummy solver at the same first step is much more reasonable
    fluid_st
    The only thing that I have noticed, between MBDyn and the dummy solver is that, for some unknown reason, without any external forces, the interface mesh shrinks a little bit. I don’t know why, I am investigating with the MBDyn developers.

There is obviously something wrong but I am not able to see it at the moment. all the interface meshes look ok with coherent data.
Sorry for the lengthy post. I could also provide code and or data, but it would have been even lengthier… If anyone is available to exchange ideas and opinions it would be very much appreciated.
Thank you
Claudio

Hi @Claudio

Are you aware of the MBDyn adapter from @mfolkersma? https://github.com/precice/mbdyn-adapter
Can you successfully run the cavity example there?

Benjamin

Hi @uekerman,
yes, I am aware, thank you. I started from it as a base. That adapter basically works with plate/shell elements, with no external points mapping: i.e. the nodes of the mbdyn mesh are used as nodes of the interface mesh in PreCICE. I needed to use a slightly different approach.
Claudio

Mmh, ok.

Good steps are typically to test uni-directional coupling

  • OpenFOAM -> MBDyn, so deformation is not handed back
  • MBDyn -> OpenFOAM, using some other external force (e.g. a constant force in flow direction) on the structure

For that you have to modify the cplscheme in your config, remove one exchange tag and change to a explicit scheme. See also How to configure one-way coupling