CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] OpenFoam Mesh Converter (https://www.cfd-online.com/Forums/paraview/82560-openfoam-mesh-converter.html)

Sccrman06 November 29, 2010 17:03

OpenFoam Mesh Converter
 
All,

I am attempting to write a mesh converter that converts an inhouse mesh format to polyMesh format. I have completed, I hope, the converter but am having problems viewing it in paraview. This is what I'm looking to get help with. I am very familiar with the mesh format but am lost as to how to view this kind of mesh in paraview. I have all of the files required in the constant/polyMesh folder, i.e. points, faces, owner, neighbour, and boundary.

Any help would be greatly appreciated.

Thanks,

akidess November 30, 2010 10:42

Hello David,

what have you tried, and why has it failed?

Sccrman06 November 30, 2010 10:52

What has been tried
 
Thanks for the reply. All I have tried is using the documentation to try and figure out how to use paraview to open the mesh. I can't find the correct option in the menu of supported file types in order to read the mesh that I've converted.

What should have I been trying?

akidess November 30, 2010 10:59

You could try to set up a bare-bone OpenFOAM case, then run foamToVTK and open the resulting VTK file with paraview (alternatively paraFoam without the intermediate foamToVTK).

Sccrman06 November 30, 2010 11:07

foamToVTK
 
Thanks for the help. I was thinking that was going to be one my only options. I was trying to find out how to read just the mesh without any simulation data so that I can test larger geometries which will allow me to test the complexity of my algorithm(s) without having to contrive some simulations.

Any other avenues I could explore?

akidess November 30, 2010 11:16

You don't need any simulation data, just the folder structure.

Sccrman06 November 30, 2010 11:28

Just need the folder structure
 
Please pardon my ignorance but I guess I am missing something. When I run foamToVTK it exits with a:

"// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



--> FOAM FATAL ERROR:
No times selected

From function foamToVTK
in file db/Time/timeSelector.C at line 240.

FOAM exiting"

I also still cannot find the correct option in paraview to open the OpenFOAM mesh. Is this possible?

akidess November 30, 2010 14:45

I'm assuming you have no time directories. In that case all you need is "mkdir 0" and all will be good.

Sccrman06 November 30, 2010 14:58

checkMesh and renumberMesh
 
So, I decided to run a checkMesh on the converted mesh and got an error in the form of
"
Foam::primitiveMesh::checkUpperTriangular(bool, Foam::HashSet<int, Foam::Hash<int> >*) const
"

I did some searching on the forum and then tried the following command
"
renumberMesh -constant -overwrite
"

The renumbering, which I thought would take care of the upperTriangular issue, exited with no errors. I then tried the checkMesh utility on the mesh created from renumberMesh and got the same error as before.

Any ideas on this one?


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