FSI Coupling OpenFoam with Membrane solver (mem4py) help needed :)

Hi All,

I am trying to couple mem4py (Dynamic Relaxation Membrane Solver) with OpenFOAM and want to reproduce the Cavity FSI example, so far with no sucess.

A good overview of the example is given here:
https://kratosmultiphysics.github.io/Examples/fluid_structure_interaction/validation/fsi_lid_driven_cavity/

This is also the test case for the mbdyn adapter, so I took it as a base and only made minimal modifications on the openFOAM case. (Stress instead of Force and Displacement instead of DisplacementDelta)

As suggested I started with Fluid to Solid one way coupling, where the solid participant always returns 0 displacement โ†’ membrane oszilates (as expected?):

grafik

When I make a Solid to Fluid one way coupling, solid participant returns a increasing deformation, the mesh in openFoam is deformed. Some plot / picture here.

Next I tried explicit coupling with high stiffness of the membrane, the simulation startes to swing up:

By mistake I discovered that if I use a smaller timestep in OpenFOAM (deltaT 0.01) than for the coupling in preCICE (dT 0.05) I get somthing which looks a little bit more than what I would expect as result:

grafik

I put the examples on github:
https://github.com/NikolausKurcz/mem4py_adapter/
Any suggestions on how to find my mistakes are apreciated !

The membrane should move, but I would expect at least the Fluid simulation to eventually diverge. One-way coupling does not make much physical sense, but it remains a great way to start.

I see some thicker line on the OpenFOAM mesh and I wonder: is this a visualization issue, or a meshing issue? Check if you have very thin / non-orthogonal cells.

In your OpenFOAM controlDict, you have adjustTimeStep no;, which means you are using a fixed time step size. I would expect the Fluid simulation to do many strange things in this setting. Try setting this to yes.

Hi Makis,

Thanks for the information, I did not pay much attention to the openFoam settings as I coupied all from a working example. But I think you are right that the line are some very thin cells after the membrane deformes. I will try to change to the rbf mesh motion and hope that it will be better.

Regarding the adjustTimeStep I did set it to yes without obvious changes.

I think my main problem is with the solid solver probably I do something wrong with the displacements I pass to openFoam.

Could it be that it is a problem that the solid solver, as far as I see it, does not solve the deformation time dependend, but instead simply moves the membrane until a steady state is reached, which causes the oszilations ?

I am not sure about that, but it could be an issue. In principle, you can couple steady-simulations with preCICE, in which case you need to set the coupling time window size to some integer (e.g., 1), which is treated as the number of iterations after which to couple. It is not what preCICE was designed for, but I know it works, e.g., for conjugate heat transfer.

Hi Makis,

Thanks!

I have now managed to run the example with the mem4py transient solver.
My results are not identical compared to the ones I found in the mbdyn adapter example, but mostly quite close. Will not try to improve it for now.

3 Likes

Nice! Could you explain how trusted each of the lines is? Are they exactly the same setups and discretization methods?

actually I have no idea,โ€ฆ
I found them in the mbdyn adapter example from Hagen / Julian:

That would be @JulianSchl! :smile:

@Niki Hi, I am a beginner in openfoam, I saw your problem on the forum and I am interested in it, can you tell me how you solved it? I would like to try to follow your case on github.

Best regards

1 Like

Hi smallduan,

I did update 2 kind of working examples here: GitHub - NikolausKurcz/mem4py_adapter: trying to couple mem4py and openFOAM with PreCICE

One ist with the RBFMeshMotionSolver and one with the mesh motion included in OpenFOAM 2212.

As I had to make some small messy changes in mem4py to make it work, be sure to use the mem4py testing branch as written in the Readme.

Let me know when you could run it!

Cheers,

Niki

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.