CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [cfMesh] using cfMesh with interFoam ends in a Floating point exception (https://www.cfd-online.com/Forums/openfoam-community-contributions/177502-using-cfmesh-interfoam-ends-floating-point-exception.html)

STEFGER September 15, 2016 04:51

using cfMesh with interFoam ends in a Floating point exception
 
2 Attachment(s)
Hello,

I have a problem which seems to be caused by the combination of cfMesh and interFoam. I used cfMesh several times with simpleFoam and got very good (and easy to achieve) results without any problems; but when using with multiphase solver interFoam, I sometimes run into a numerical problem (at least it looks to me like a numerical problem): At a certain time in simulation, the timesteps (deltaT) are getting smaller and smaller (down to 10E-90 or similar), until finally a Floating point exception happens. I have no idea how to look further in these cases, therefore I started from an existing (and running) tutorial and change it step by step to see when the problem arises.

Since I want to use the boubdary condition "variableHeightFlowRateInletVelocity", I started with the tutorial "weirOverflow" (located in multiphase/interFoam/ras/weirOverflow/), which has a blockMesh-generated 2D-geometry. I stretched the z-axis by factor 10, and still everything runs fine.

Then I rebuild the same geometry with salome and created a new mesh with cfMesh, and then I run into the well-known trouble: When the water reaches the end of the weir and start to flow down, the time steps decrease down to 4.37805e-86 and causes then a Floating point exception. To be near to the tutorial, I didn't use boundary layers; in fact, I only defined a maxCellSize (later I also tried with boundary layers but run into similar problems). The resulting mesh looks good to me (at least good enough for such a simple geometry). I'm pretty sure that the problem is caused by the mesh since everything runs fine if I exchange the constant/polyMesh - directory with the blockMesh-case.


I have no idea where to search for the reason, since the mesh looks good to me. Are there any special mesh requirements for multiphase simulation with interFoam?

EDIT: I've added clip images of the blockMesh / cfMesh

TobM September 22, 2016 08:47

I have made very good experience with cfMesh and compressibleInterFoam, so I am a little bit surprised about your problem.
Can you please post the results of checkMesh, the meshDict file...?
Are all settings ok and the same as in the blockMesh case? fvSchemes, fvSolutions, controlDict, ...

STEFGER October 11, 2016 10:23

2 Attachment(s)
Hello TobM,

sorry for my late reply, I thought I would be informed by email if somebody answers, but it didn't work (?)

I've added the two cases which I used for the pictures above. I used OpenFOAM V3.0.1 for simulation and cfMesh V1.1 for mesh creation (I had to remove the created mesh since the zipped files would be too big for upload). I think the only difference between the two cases is the used mesh. The cfMesh version runs fine untl 5.3 seconds, but then the problems arise.

In the meantime, I worked on more complex geometries with blockMesh. I found another one which is problematic for cfMesh but works fine with blockMesh (but it's far more complex to compare).
I hope very much that there is my fault when using cfMesh, since it is so much nicer to use it (compared with blockMesh)

STEFGER October 17, 2016 02:33

I've found a small problem in the mesh created by cfMesh: in "polyMesh/boundary", inlet, outlet and atmosphere are of type "wall" (should be "patch" of course). I changed it manually in my local working copy (don't know how to get cfMesh to handle it correctly), but unfortunately, this doesn't affect the instability problem: Still the same behaviour :(


All times are GMT -4. The time now is 21:21.