CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Colouring different decomposed mesh regions in paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree20Likes
  • 9 Post By SailorLiu
  • 8 Post By simrego
  • 2 Post By raumpolizei
  • 1 Post By louisgag

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2015, 18:44
Cool Colouring different decomposed mesh regions in paraview
  #1
Member
 
Yuanchuan Liu
Join Date: Oct 2012
Posts: 31
Rep Power: 14
SailorLiu is on a distinguished road
Hi,

I am just wondering if paraview is able to colour different mesh regions in a decomposed case. For example, the mesh region in processor0 is red and that in processor1 is blue, etc. Just like this image in OpenFOAM website introducing ami using a propeller:



It seems very cool
SailorLiu is offline   Reply With Quote

Old   February 2, 2015, 08:10
Cool
  #2
Member
 
Yuanchuan Liu
Join Date: Oct 2012
Posts: 31
Rep Power: 14
SailorLiu is on a distinguished road
I have found a way myself.

1. Create a *.foam file inside every processor folder, e.g., processor0.foam in processor0 and processor1.foam in processor1 etc.
2. Open paraview and load each foam file into it.
3. Now you can colour every piece of the decomposed mesh using the coloring feature.

Hope someone likes it.
SailorLiu is offline   Reply With Quote

Old   January 3, 2019, 13:00
Default
  #3
New Member
 
So Anon
Join Date: Jun 2014
Posts: 28
Rep Power: 12
redbullah is on a distinguished road
hello,
i am also trying to do the same thing.
i can load a *.foam file in paraview in decomposed state. is there any way of coloring each processor's block differently?
if not, is there an easy way of loading each processor*/*.foam file at once? like a script or something?
thanks
redbullah is offline   Reply With Quote

Old   January 8, 2019, 05:04
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


Try to use "decomposePar -cellDist"
This will write the cell distribution as a labelList. So if you open the reconstructed mesh (NOT THE DECOMPOSED!!), there will be a cellDist field which will indicate the proc number for every cell.
simrego is offline   Reply With Quote

Old   May 31, 2019, 03:26
Default
  #5
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Hey there,
I had the same issue so I wrote a small utility that can be run in parallel on a decomposed case. It writes the procID as new field in the processor/time directories. The field can be reconstructed and visualized in paraview. Small changes may be needed as I am using OFv1612.
Cheers
RP
Attached Files
File Type: zip writeProcIDAsField.zip (2.1 KB, 55 views)
louisgag and aow like this.
raumpolizei is offline   Reply With Quote

Old   May 31, 2019, 05:55
Default
  #6
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Thanks for sharing. Simple and useful. I got it running as is on OF-6-dev.
-Louis


PS: I've made a few changes to compile on v1812, did not dig into the explanations for them but it compiles and runs properly, see attached patch files.
Attached Files
File Type: patch options.patch (344 Bytes, 33 views)
File Type: patch writeProcIDAsField.C.patch (381 Bytes, 31 views)
aow likes this.

Last edited by louisgag; May 31, 2019 at 08:30.
louisgag 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
Moving mesh - Multiple Regions user10600 OpenFOAM Programming & Development 1 December 10, 2015 06:01
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
ParaView shows blocky mesh lfbarcelo OpenFOAM 3 June 25, 2010 09:16
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 21:47.