CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

cfMesh creates binary boundary files

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sadsid

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2020, 05:28
Default cfMesh creates binary boundary files
  #1
New Member
 
Nik Ridhwan
Join Date: Oct 2016
Posts: 1
Rep Power: 0
ridhwan is on a distinguished road
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
Attached Images
File Type: png Face.PNG (14.7 KB, 18 views)
File Type: png head.PNG (68.6 KB, 20 views)
ridhwan is offline   Reply With Quote

Old   December 9, 2021, 21:35
Default
  #2
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by ridhwan View Post
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

I am facing the same problem. Did you find out the solution?
sadsid is offline   Reply With Quote

Old   December 12, 2021, 08:53
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by sadsid View Post
I am facing the same problem. Did you find out the solution?
Please check if this issue also occurs with cfmesh bundled with the www.openfoam.com releases. I hope not.
olesen is offline   Reply With Quote

Old   December 13, 2021, 05:23
Default
  #4
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by olesen View Post
Please check if this issue also occurs with cfmesh bundled with the www.openfoam.com releases. I hope not.

Yes, it wasn't the case with url]www.openfoam.com[/url] releases.!

Thanks for your feedback!
olesen likes this.
sadsid is offline   Reply With Quote

Old   January 3, 2022, 22:37
Default
  #5
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
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.
Ship Designer is offline   Reply With Quote

Old   January 3, 2022, 23:31
Default
  #6
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
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
Ship Designer is offline   Reply With Quote

Old   January 6, 2022, 19:14
Default
  #7
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ship Designer View Post
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.
Thank you for your reply. This is also a solution and it works fine as well. But I shifted my case from of8 to of2106 to avoid any problem!
sadsid is offline   Reply With Quote

Reply

Tags
binary file, cfmesh, openfoam7


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I achieve better convergence? sheaker CFX 12 September 19, 2019 15:36
[Resolved] GPU on Fluent Daveo643 FLUENT 4 March 7, 2018 08:02
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01


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