CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

reconstruct addedCells set from parallel meshing

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 21, 2012, 03:23
Default reconstruct addedCells set from parallel meshing
  #1
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
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 is offline   Reply With Quote

Old   August 23, 2012, 09:19
Default
  #2
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
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
Eloise is offline   Reply With Quote

Old   August 27, 2012, 23:59
Default
  #3
Member
 
Join Date: Nov 2010
Posts: 50
Rep Power: 6
Doug68 is on a distinguished road
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.
Doug68 is offline   Reply With Quote

Old   August 28, 2012, 04:22
Default
  #4
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
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
Eloise is offline   Reply With Quote

Old   May 29, 2013, 14:45
Default
  #5
New Member
 
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 4
Abracurcix is on a distinguished road
Quote:
Originally Posted by Eloise View Post
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
Abracurcix is offline   Reply With Quote

Old   April 24, 2014, 11:52
Default
  #6
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
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 is offline   Reply With Quote

Old   April 25, 2014, 04:01
Default
  #7
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 103
Rep Power: 5
Eloise is on a distinguished road
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
Eloise is offline   Reply With Quote

Old   April 25, 2014, 14:45
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Question about the use of ICEM tcl scripting lnk ANSYS Meshing & Geometry 9 January 16, 2013 10:24
[ICEM] ICEM Scripting Issues tylerplowright ANSYS Meshing & Geometry 17 June 3, 2012 21:23
OpenFOAM installation on SUSE92 problems derath OpenFOAM Installation 1 April 3, 2006 06:44
CFX5.6 (Build) Parallel Meshing David Hargreaves CFX 2 January 12, 2005 13:39
Parallel Level Set. Where? XX_x Main CFD Forum 3 May 20, 2003 14:20


All times are GMT -4. The time now is 02:29.