reconstruct addedCells set from parallel meshing
I am meshing in parallel a geometry with viscous layers. I would like to visualize the addedCells set in ParaView (with the command foamToVTK -cellSet addedCells) but this set is not reconstructed with the command reconstructParMesh.
Does anyone knows how to reconstruct it?
- If I run the meshing in serial, the addedCells set is present in 3/polymesh/sets
- If I run the mesh in parallel, the addedCells set is present in processor**/3/polymesh/sets but not in the reconstructed mesh 3/polymesh/sets
no one has any idea?
My mesh is too large to be meshed in serial, or to be entirely imported in paraView. However, I would still like to have an idea of where snappyHexMesh inserted layers in the mesh.
This may not be perfectly correct, but it is what I've found to work.
When using foamToVTK on a mesh created in parallel that foamToVTK also needs to be run in parallel so that would be something like:
foamToVTK -parallel -cellSet addedCells
The syntax is probably wrong as I'm using the mpi parallel method in Widows so I'm guessing what it would look like for you. I think the parellel count needs to go in there somewhere and obviously should match how the mesh was created.
Once that's run I get a VTK folder in which are the file that can be read by ParaView.
In my case I get 8 sets as I'm running 8 threads, when I open one of them in Paraview it opens all 8 in the session.
Hope that helps.
Thanks for the tip, it indeed helps as I had not tried this yet.
As you said, I end up with a VTK directory which contain links to each of the VTK file located in the processors directories. However, I don't have a graphical interface on the cluster where I run computations, so I can't open ParaView and use those links. I need to copy back to my computer each one of the VTK files, which is not very convenient when using many processors. I will start to write a python routine that does it automatically.
If someone knows a way to reconstruct a single VTK file based on the multiple VTK files located in the processors directories, I'd be glad to hear about it!
Yes, I see this problem with the *.vtk file in the VTK/ directory having links to the VTK files in the VTK directories in the processor directories. In my case, I work on a large computing platform where one cannot make system calls (such as "ln -s", as in foamToVTK.C) on the compute nodes. So, I tried the -noLinks option in the foamToVTK executable (when I ran the executable in parallel). I did so because I saw this information in "foamToVTK -help"
-noLinks don't link processor VTK files - parallel only
Guess what, the foamToVTK executable does precisely that (it does not create the links)! Further, the -noLinks option does not create a VTK directory either!! So, while I naively expected that running "foamToVTK -ascii -latestTime -noLinks -parallel" would lead to a set of files in the VTK directory that could be read in by paraView or VisIt, it got me nowhere :(
The only solution available, at present, it to use "reconstructPar -latestTime" to generate one humongous <latest_time>/ directory and then use foamToVTK in serial mode to generate the VTK files for viewing. It works, but this is an in-elegant solution.
You may also want to try the foamToEnsight executable in parallel. Whilst this executable does not make system calls (like "ln -s") I did have problems reading in the resulting file in either VisIt or paraView. And, I have not been able to diagnose the problem.
That's all I can say, at the moment. Hope this helps.
The command foamToVTK -parallel -cellSet addedCells which worked great for me in OpenFOAM2.0.x causes me problems now in OpenFOAM2.2.x.
The cellSet addedCells is properly created by snappyHexMesh, but the names of the patches are not properly written in the boundary conditions files (in 0/) so foamToVKT complains about not finding the patches names.
If I reconstruct my mesh and then run foamToVTK, it works fine but doesn't reconstruct the addedCells into a vtk.
Anyone has an idea how to fix this?
In case someone else faces the same issue, I found out that the following succession of commands does not work:
snappyHexMesh -parallel -overwrite
foamToVTK -parallel -cellSet addedCells
But it works if I do:
foamToVTK -parallel -cellSet addedCells -latestTime
So "problem solved", even if I'd prefer to use the -overwrite in snappyHexMesh!
Try using snappyHexMesh the way you use to (with the overwrite option) and then use this:
|All times are GMT -4. The time now is 13:57.|