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, |
Hello David,
what have you tried, and why has it failed? |
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? |
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).
|
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? |
You don't need any simulation data, just the folder structure.
|
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? |
I'm assuming you have no time directories. In that case all you need is "mkdir 0" and all will be good.
|
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. |