CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Floating point error in BlockMesh for really simple mesh (https://www.cfd-online.com/Forums/openfoam-bugs/66174-floating-point-error-blockmesh-really-simple-mesh.html)

CoenW July 8, 2009 05:47

Floating point error in BlockMesh for really simple mesh
 
3 Attachment(s)
As a first trial with OpenFOAM from the ground up I am creating a really simple simulation: 2D flow across a cylinder. So far I've only edited the blockMeshDict to create this geometry. I've tried two blocking strategies on this problem (the first one is a little weird):
http://www.rcwit.nl/temp/files/blocking1.png
http://www.rcwit.nl/temp/files/blocking2.png
Instead of meshing this geometry correctly blockMesh gives the following error (I've left out the header) :
Quote:

Creating curved edges

Creating blocks
Floating point exception
and crashes back to the terminal.

To determine what the cause of this problem is I've meshed the lower half of the problem, which works without any problem. The same goes when I mesh the complete problem, but without the blocks and faces on the upper half of the cylinder (see attached figures).
http://www.rcwit.nl/temp/files/work_half.png
http://www.rcwit.nl/temp/files/work_hole.png
With the other (normal) blocking strategy, I can't even get half the mesh to work correctly.
Changing the order of the points in the blocking hasn't helped me so far and I'm lost for a solution of this problem. I think it has something to do with the use of arcs, but I'm not sure.
Any solutions or ideas would be greatly appreciated. I'd like to get the whole case to run in OpenFOAM, instead of having to resort to a commercial program for meshing.

I've attached the following files:
blockMeshDict.fail <-- the complete mesh, but with the top blocks near the cylinder commented out
blockMeshDicthalf.work <-- the lower half of the problem, which meshes correctly
blockMeshDict <-- dictionary for a more correct blocking strategy, which also gives the floating point error

mattijs July 9, 2009 04:47

I tried blockMeshDict.txt in 1.5.x and that gives

face 0 in patch 0 does not have neighbour cell face: 4(12 7 27 32).

You can visualise the blocks and points of your blockMesh with the -blockTopology option to dump out an .obj file which you can postprocess with e.g. javaview or with Paraview (using objToVTK).

The blockMeshDict.fail seems to work ok.

CoenW July 9, 2009 06:56

1 Attachment(s)
Quote:

Originally Posted by mattijs (Post 222022)
I tried blockMeshDict.txt in 1.5.x and that gives

face 0 in patch 0 does not have neighbour cell face: 4(12 7 27 32).

You can visualise the blocks and points of your blockMesh with the -blockTopology option to dump out an .obj file which you can postprocess with e.g. javaview or with Paraview (using objToVTK).

The blockMeshDict.fail seems to work ok.

Thanks for having a look at it. Apparently I didn't mention it clearly, but I commented out the sections of the files that cause the floating point error. So that's why it reports the neighbour cell face problem: the face is commented out.

the .fail file creates the mesh depicted in the second image. Again: the offending faces (the missing ones in the middle) have already been commented out. I've attached the uncommented file below. Could you check if it does the same thing on your system?

I didn't know about the -blockTopology option, where does it dump the files? I ran the option while I also got the floating point error and I can't find any .obj files.

mattijs July 22, 2009 06:33

There was a problem with having zero points along the edge (your blocks are 1x1x1). It works with more cells along the edge. I pushed a fix to 1.5.x so it works with 1 cell as well.

Thanks,

Mattijs


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