CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Post processing a parallel case

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes
  • 1 Post By erklaerbaer
  • 4 Post By herbert
  • 9 Post By Bernhard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2010, 10:33
Default Post processing a parallel case
  #1
Senior Member
 
Join Date: Nov 2009
Posts: 111
Rep Power: 16
Gearb0x is on a distinguished road
Hi

I have a case which is decomposed using the "metis" method.

How can I see the different parts of the mesh? And their results?
I tried to run parafoam in the case/processor0 directory but it didn't work.

Thanks for your help.
Gearb0x is offline   Reply With Quote

Old   April 8, 2010, 14:32
Default
  #2
New Member
 
Andreas
Join Date: May 2009
Location: Germany
Posts: 13
Rep Power: 16
erklaerbaer is on a distinguished road
I am not familiar with the "metis" method but did you try "reconstructPar" to get your results back together?
qutadah.r likes this.
erklaerbaer is offline   Reply With Quote

Old   April 8, 2010, 15:37
Default
  #3
Senior Member
 
Join Date: Nov 2009
Posts: 111
Rep Power: 16
Gearb0x is on a distinguished road
Hello,

Thanks for your answer. In fact getting the cases back together is, indeed, done by typing 'reconstructPar' but what I would to are the part separated and not together To see how the mesh was separated.

By curiosity, How do you use the other methods (other than metis) ? Do you have a tutorial or something?

Thanks for your help
Gearb0x is offline   Reply With Quote

Old   April 8, 2010, 15:46
Default
  #4
New Member
 
Andreas
Join Date: May 2009
Location: Germany
Posts: 13
Rep Power: 16
erklaerbaer is on a distinguished road
Perhaps this helps you http://www.openfoamworkshop.org/2009...InParallel.pdf.

Till now i just used simple and was able to start Paraforam in the "processorX" folder, maybe paraFoarm cant handle the way metis splits up the Mesh

You could try "foamToVTK" an then paraview but thats just a guess.
Perhaps simpleViewer can also help you, but a am not shure what file it reads for showing the mesh.
erklaerbaer is offline   Reply With Quote

Old   April 8, 2010, 16:39
Default
  #5
Senior Member
 
Join Date: Nov 2009
Posts: 111
Rep Power: 16
Gearb0x is on a distinguished road
Again, Thanks for the help!

But it's strange that paraFoam can't handle this
Gearb0x is offline   Reply With Quote

Old   April 8, 2010, 17:01
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Gearb0x and erklaerbaer,

Uhm, I just read diagonally the pdf from the link that Andreas has posted, and I found on the penultimate page:
Quote:
When post-processing cases that have been run in parallel the user has two options:
• reconstruction of the mesh and field data to recreate the complete domain and fields, which can be post-processed as normal;
post-processing each segment of decomposed domain individually;
Although it doesn't specifically say how, and I haven't tested this right now, but my guess is that if you execute paraFoam at the base folder of the case, the PV3FoamReader plugin will detect the processor partitions and allow you to see them independently, by picking them from the list, just as the fields!

By the way, just in case the snapshot "0 seconds" doesn't show anything, try the next snapshot... I have had problems in the past with the first snapshot in single core runs, due to some discrepancy between meshes or boundaries or something like that

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 15, 2010, 09:17
Default
  #7
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17
herbert is on a distinguished road
Hi,

just type "paraFoam -case processorX" to see only the result of processor X.

Good luck
Stefan
herbert is offline   Reply With Quote

Old   May 28, 2014, 00:52
Default
  #8
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
Hi,

I want to visualize the master mesh after running parallelized snappyHexMesh, so I use the utility reconstructParMesh
Code:
 reconstructParMesh -mergeTol 1E-6 -time 0
and yet I keep getting the error
Code:
 --> FOAM FATAL ERROR: 
No times selected

    From function reconstructParMesh
    in file reconstructParMesh.C at line 578.

FOAM exiting
I can see the individual mesh without any problem. I can also resemble the master mesh in paraview by loading all of them in. So really I was just wondering why this doesn't work as opposed to desperately trying to get it work. Thanks for any advise anyway.



JHW
f0208secretx is offline   Reply With Quote

Old   May 28, 2014, 02:41
Default
  #9
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I see this thread is quite old, but I wrote a script a time ago that might help you.

Step 1. Create .foam files in all directories
Code:
#!/bin/bash
for dd in `find -name 'proc*' -type d`
do 
 echo $dd
 cd $dd
 echo $PWD
 touch `basename $PWD`".foam"
 cd ..
done
Step 2. Run the following Python script from the Paraview Python shell (some user input in the source is not automated)
Code:
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

import random

procs = 64
for proc in range(procs):
 print proc
 foamfile='case/processor'+str(proc)+'/processor'+str(proc)+'.foam' 
 processor0_foam = OpenFOAMReader(FileName = foamfile)

 processor0_foam.CellArrays = []
 processor0_foam.LagrangianArrays = []
 processor0_foam.MeshRegions = ['internalMesh']
 processor0_foam.PointArrays = []
 processor0_foam.CellArrays = []
 mr0 = GetDisplayProperties(processor0_foam)
 #mr0.DiffuseColor = [1, 1, float(proc)/float(procs-1)]
 mr0.DiffuseColor = [random.random(), random.random(), random.random() ]
 RenderView1 = GetRenderView()
 DataRepresentation2 = Show()

Render()
I hope someone can use these scripts
Bernhard is offline   Reply With Quote

Old   February 24, 2022, 17:45
Default
  #10
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
Quote:
Originally Posted by herbert View Post
Hi,

just type "paraFoam -case processorX" to see only the result of processor X.

Good luck
Stefan
I cannot run paraFoam, I have a problem with paraview and I am not root user to fix it.. Any alternative?


I am also using OptimisationSwitches and fileHandler in my controlDict and it grouped all processors in a single processor, "processors96". So how do I see the decomposed mesh in this case?


I have also seen the option "Case Type" inside paraview in properties panel when importing a case, it has both reconstructed and Decomposed case as options. I have tried decomposed but still whole mesh is there, not sure where to activate only a specific processor. Any idea?





Thanks !
qutadah.r is offline   Reply With Quote

Old   March 8, 2022, 11:04
Default
  #11
Member
 
Join Date: Mar 2018
Posts: 33
Rep Power: 8
ghastbug is on a distinguished road
Personally I can't use the paraFoam command, but I installed paraview on windows and run it without using the shell. If parafoam gives you problem you might be able to install paraview and use it normally instead.


Also, on the topic of decomposed cases: paraview has an option to render decomposed cases instead of deconstructed cases, so you don't even need to use reconstructPar
ghastbug is offline   Reply With Quote

Old   March 8, 2022, 12:16
Default
  #12
Senior Member
 
qutadah
Join Date: Jun 2021
Location: USA
Posts: 101
Rep Power: 4
qutadah.r is on a distinguished road
The thing is, I can run paraview, but I cant use the paraFoam command. I can run paraview xx.foam or just import cases in there, but there is a problem which is quite known that has a fix but I cant because im not root user, so I cannot use paraFoam.


But the thing is, even when importing a case and I saw the option decomposed mesh or reconstructed, but how can I even choose which processor? I cant seem to find that....


Thanks @ghastbug
qutadah.r is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about post processing qtian OpenFOAM Post-Processing 0 July 24, 2007 12:44
fluent for post processing James FLUENT 0 April 21, 2006 04:43
Paradox in parallel processing Vagelis FLUENT 0 October 26, 2005 05:36
Tecplot for CFX post processing pantangi goud CFX 2 August 24, 2005 16:42
Post Processing in FEM Abhijit Tilak Main CFD Forum 0 April 26, 2004 11:59


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