# 2 way FSI for a rotating body: divergence of the simulation

**URL:** <https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057>\
**Category:** Using preCICE\
**Tags:** openfoam, calculix, fsi\
**Created:** [May 30, 2022, 11:43am UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057 "2022-05-30T11:43:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AloisT](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AloisT](https://precice.discourse.group/u/AloisT)\
**Post date:** [May 30, 2022, 11:43am UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057/1 "2022-05-30T11:43:44Z")

</div>

Hello preCICE team,

I’m trying to run a 2-way Fluid structure interaction simulation for a rotating body. The simulation is using openFOAM for the fluid side and calculiX for the solid. The preCICE adapter is used, and I’m using a serial implicit coupling scheme.

The simulation is working for several time steps (almost a third of one rotation) and then failed for a floating-point exception.

In paraview and in calculix, it’s possible to see that the pressure starts to increase and oscillating (see attached pictures) and the body to oscillate a lot. The simulation has been run without the coupling, and all is working properly by computing only the fluid flow.

 ![time](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/7/7dd10cafba45f779c956ec9e38d9b35883eb18d5.png)  
 ![time+1](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/c/caaafb414812aeb2929f9afb70c83b0ae38190f9.png)  
 ![time+2](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/4/4296ee4956846624eb08e4fee23c6c06cd84d264.png)

Different modification has been done to try to fix the issue, but the simulation is stopping always at the same time step. The modification done are:

- changing the mesh

- decreasing the residuals tolerance

- increasing the number of iterations

- changing the position of the body at t=0

- changing U and p relaxation factors

With all this tries, it seems that the issue come from a solid instability. I added a structural damping, but it doesn’t seem to be understood well by calculiX since nothing change. The oscillation has the same amplitude as when not using the damping. I wanted to use the Dashpot option as well, but the simulation diverged immediately.

Do you have some advice to use properly the damping or the dashpot option?

Do you know other feature to stabilize the solid body?

Thank you for your help.  
Aloïs

---

<div class="post-metadata">

**Author:** ![uekerman](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/uekerman/32/2199_2.png) [@uekerman](https://precice.discourse.group/u/uekerman)\
**Post date:** [May 30, 2022, 12:46pm UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057/2 "2022-05-30T12:46:31Z")

</div>

Hi @AloisT 👋

The acceleration methods of preCICE should help here as well. Could you please attach your preCICE config file? And maybe also a screenshot of your mesh once the case crashes.

Benjamin

---

<div class="post-metadata">

**Author:** ![AloisT](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AloisT](https://precice.discourse.group/u/AloisT)\
**Post date:** [May 30, 2022, 2:41pm UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057/3 "2022-05-30T14:41:42Z")

</div>

Hi @uekerman,

Thank you for your answer,  
Please find the preCICE config file and the mesh just before it crashes.  
I’m using the IQN-ILS acceleration now. I will launch simulations with Aitken and constant under relaxation configuration, to see if it helps.

 ![mesh](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/b/bf1e7c91087132a618d016114143663f3acb067a.png)  
Uploading: precice-config.xml…

Alois

---

<div class="post-metadata">

**Author:** ![AloisT](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AloisT](https://precice.discourse.group/u/AloisT)\
**Post date:** [June 7, 2022, 9:17am UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057/4 "2022-06-07T09:17:23Z")

</div>

Hello,

I ran simulations with the constant and Aitken acceleration configuration. The constant method stopped at the exact same time step than with the IQN-ILS acceleration. For the Aitken acceleration, it stopped much earlier. Both stopped for the same reason : Floating point exception.

I also ran a coupled simulation by using an initialized flow (some rotation by computing the flow only), but it didn’t help and stopped at the same time step.

Finally, I succeed to run a coupled simulation by putting a rotation speed equal to 0. RPM = 0 and keeping the same dynamicMesh dictionary.

Do you have any ideas to avoid the divergence of the simulation when the body is rotating ?

Aloïs

[precice-config.xml](https://precice.discourse.group/uploads/short-url/myahgZyJdXXKxj4wfTcwAMjiiAQ.xml) (2.5 KB)

---

<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:** [June 11, 2022, 7:36am UTC](https://precice.discourse.group/t/2-way-fsi-for-a-rotating-body-divergence-of-the-simulation/1057/5 "2022-06-11T07:36:24Z")

</div>

@AloisT could it be that fluid cells collapse because of the motion at the time the simulation crashes? A better mesh motion solver could help, then, though that’s a bit complicated to get with OpenFOAM at the moment.

You can check the mesh quality with `checkMesh` (see `checkMesh -help` for options, e.g., `-latestTime`).

Edit: It may also be worth trying different kind of mesh elements in CalculiX. What are you using at the moment? See also [Configure the CalculiX adapter | preCICE - The Coupling Library](https://precice.org/adapter-calculix-config.html#supported-elements)

At some point, we changed our tutorials from `C3D8` to `C3D8I` elements, maybe try this out as well.
