CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] Trouble using foamFormatConvert (https://www.cfd-online.com/Forums/openfoam-meshing/196331-trouble-using-foamformatconvert.html)

ganem December 1, 2017 09:35

Trouble using foamFormatConvert
 
Hello everyone,

I've tried to use foamFormatConvert to convert the polymesh files from binary format to ascii format. But, when I run it, it convert all files (points, boundaries, ...) except the "faces" file. Does anyone have the same problem?

Thanks,

Agnes

me3840 October 31, 2018 22:46

Not sure if you're still working with this, but it appears the problem is in writeMeshObject.H. There's an if statement that filters out the faces file for some reason. I'm not experienced enough to say why (perhaps someone can help with that), but the faces IOobject does not get past:


Code:

io.typeHeaderOk<Type>(false) && io.headerClassName() == CheckType::typeName
In order to (hopefully) not break anything, I just went around it with this:

Code:

(io.typeHeaderOk<Type>(false) && io.headerClassName() == CheckType::typeName)||(runTime.timeName()=="constant"&&name=="faces")
I tested this on a simple case with a pre-existing solution and it seemed to work without breaking anything. So if anyone can explain what that if statement is doing and why faces aren't included, that'd be super.


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