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/)
-   -   [mesh manipulation] reconstruct addedCells set from parallel meshing (https://www.cfd-online.com/Forums/openfoam-meshing/106159-reconstruct-addedcells-set-parallel-meshing.html)

Eloise August 21, 2012 04: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 10: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 28, 2012 00: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 05: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 15: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 12: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 05: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 15: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 11:38.