CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Mesh Utilities (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/)
-   -   reconstruct addedCells set from parallel meshing (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/106159-reconstruct-addedcells-set-parallel-meshing.html)

Eloise August 21, 2012 03:23

reconstruct addedCells set from parallel meshing
 
Hi,
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?

Remarks:
- 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

Thanks,
Elo´se

Eloise August 23, 2012 09:19

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.
Elo´se

Doug68 August 27, 2012 23:59

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.

Eloise August 28, 2012 04:22

Hi Doug,

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!

Elo´se

Abracurcix May 29, 2013 14:45

Quote:

Originally Posted by Eloise (Post 379053)
Hi Doug,

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!

Elo´se

Hello Eloise,
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.

Cheers,
Abracurcix

Eloise April 24, 2014 11:52

Hi again,
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?
Regards,
Elo´se

Eloise April 25, 2014 04:01

Hello,
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:
snappyHexMesh -parallel
foamToVTK -parallel -cellSet addedCells -latestTime
So "problem solved", even if I'd prefer to use the -overwrite in snappyHexMesh!
Regards,
Elo´se

wyldckat April 25, 2014 14:45

Hi Elo´se,

Try using snappyHexMesh the way you use to (with the overwrite option) and then use this:
Code:

foamToVTK -parallel -cellSet addedCells -excludePatches '( ".*" )'
For other readers: please keep in mind that the "-parallel" option is to be used only when running in parallel, namely the same way you would use for running a solver in parallel.

Best regards,
Bruno


All times are GMT -4. The time now is 01:16.