cfMesh creates binary boundary files
2 Attachment(s)
Hello everyone, I am a new OF7 user, and cfMesh is used for mesh generation. I have been able to build a good 2D mesh with cfMesh but struggle to generate a 3D one. I've been doing a lot of testing for weeks but everything went wrong.
I was trying to produce mesh for the head of a men.I seem to be able to produce mesh with cfMesh (head.png) but it gives me an error when it comes to checkMesh. I've found that all of these files (faces, neighbour, owner and points) have been generated in binary when I've been through every files in polymesh directory. Only (boundary and meshMetaDict) were generated in ASCII. Does anyone have the same problem as I have and how do you solve it? The checkMesh error messages below: Create time Create polyMesh for time = 0 --> FOAM FATAL IO ERROR: Expected a ')' while reading binaryBlock, found on line 20 an error file: /home/openfoam/run/cfmesh/tutorials/cartesianMesh/Nik_project/head/constant/polyMesh/faces at line 20. From function Foam::Istream& Foam::Istream::readEnd(const char*) in file db/IOstreams/IOstreams/Istream.C at line 109. FOAM exiting |
Quote:
I am facing the same problem. Did you find out the solution? |
Quote:
|
Quote:
Yes, it wasn't the case with url]www.openfoam.com[/url] releases.! Thanks for your feedback! |
Do you want the polyMesh in binary format intentionally? Does checkMesh work if you write the polyMesh in ascii by changing writeFormat in controlDict? You can also try to use the foamFormatConvert utility but please note that this utility will convert not only the polyMesh but also all the field files in your case.
|
I now remember to have had a similar problem with cfMesh once and looked through my notes. I looked once again at your screenshot and believe checkMesh crashes due the class type as indicated in the file header. In your screenshot it says class faceList whereas OpenFOAM writes class faceCompactList when set to binary in controlDict. I've looked at the faces file generated with blockMesh for the pitzDaily tutorial case with OF v7, v8, v9 and v1912. All of them write faceCompactList if set to binary format. My suspicion is that checkMesh does not read binary faceList. You could try to run a solver without checking the mesh just to see if the solver can properly read the polyMesh, out of curiosity.
If you really want your polyMesh to be in binary format, one solution would be to have cfMesh write it in ascii and then convert it with foamFormatConvert afterwards. If that still doesn't work, I found a tool somewhere online which I downloaded but never used called compactFaceToFace, maybe that can help. Otherwise if you are concerned about storage space, I suggest writing to ascii in compressed format. The files get smaller than binary and have the advantage that you can always open and human-read them if necessary. Only downside is that writing files is slower. Hope this helps. Cheers, Claudio |
Quote:
|
All times are GMT -4. The time now is 17:03. |