OpenFoam fails with an error "Floating point,probably divide by zero"

Hi all,

I’m trying to run the simulation about FSI by using OpenFOAM (overset mesh) and solids4Foam, via preCICE library. And there is a case from solids4Foam tutorial, flexibleOversetCylinder
However, unfortunately, this case did run as expected. The returned error from fluid part (OpenFOAM) is “Caught signal number 8 FPE: Floating Point Exception,probably divide by zero”.
The precice configure file is here
precice-config.xml (2.3 KB)

And the packages I’m using are OpenFOAM v2012, solids4Foam 2, preCICE v 2.5.0, OpenFOAM-preCICE adapter - v1.2.3. Could you please give some hints to fix this problem?

The possible reasons I’m thinking are 1. mapping method, 2. coupling scheme

Thank you in advance!

when I use morphing mesh or the solid doesn’t deform, then the simulation won’t crash. So does that mean the problem is that I’m trying to deform the overset mesh? Since I know that by default, the overset mesh in OpenFOAM only supports rigid body by default.

at which point of the simulation do you get the error on the fluid part? In my experience it could be that the fkuid domain has some highly distorted cells at some point of the simulation. Have you tried running checkMesh on the latest converged time-step?

1 Like

Hi Claudio,
Thank you for your reply.
I did run the checkMesh for the latest converged time-step, and it looks fine, please check the attachment, I also attached the precice configuration. So I’m wondering if that might be the issue of overset mesh. I plan to run the case by using precice with debug mode to see whether I can get more details about why it crashed.

precice-config.xml (2.4 KB)

Hope you are keeping well.

I rerun this simulation with precice debug mode, and the debug information of the final step is attached.

fluid domain

(0) 17:51:26 [utils::Events]:40 in start: e[0mStarted event advance/
(0) 17:51:26 [mapping::PetRadialBasisFctMapping]:861 in printMappingInfo: e[0mMapping “Displacement” consistent from “Solid-Mesh” (ID 1) to “Fluid-Mesh” (ID 0) for dimension 0 with polynomial set to separate

solid domain

(0) 17:51:26 [com::SocketCommunication]:511 in send: e[31mERROR: e[0mSending data to another participant (using sockets) failed with a system error: write: Broken pipe. This often means that the other participant exited with an error (look there).
(0) 17:51:26 [utils::Events]:59 in stop: e[0mStopped event _GLOBAL

It looks like the solid part is fine, not quite sure if I ignored something for the fluid part, or if is there any issue with the current overset library in OpenFOAM.

Can anyone provide some advice to improve it? Thank you in advance.

According to this debug file, the fluid part, it crashed when mapping the displacement from solid to fluid. I assumed it might be due to the mapping configuration, so I changed the method from




and it works as expected! Since it’s first order, the final result should be investigated further. And will try to figure out how to improve it to second order.

Or, since the mapping method is to map coupling data from one mesh to the other when the two surface meshes do not match. What if the meshes at the interface are matched thoroughly? Can we just copy the data from one component to the other directly?

Will keep updating if I make any progress.


Hello, sunky

For this problem, if rbf can be changed to nn can be coupled normally, then the problem may be the version problem, you can see this post:, I changed the software version, successfully solved this problem, you can try.

Good luck to you


1 Like

Hi xiangxiang,

Thanks for your sharing, I’ll try a different version.

Kind Regards