|
[Sponsors] |
[OpenFOAM] Colouring different decomposed mesh regions in paraview |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 29, 2015, 18:44 |
Colouring different decomposed mesh regions in paraview
|
#1 |
Member
Yuanchuan Liu
Join Date: Oct 2012
Posts: 31
Rep Power: 14 |
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 |
|
February 2, 2015, 08:10 |
|
#2 |
Member
Yuanchuan Liu
Join Date: Oct 2012
Posts: 31
Rep Power: 14 |
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. |
|
January 3, 2019, 13:00 |
|
#3 |
New Member
So Anon
Join Date: Jun 2014
Posts: 28
Rep Power: 12 |
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 |
|
January 8, 2019, 05:04 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
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. |
|
May 31, 2019, 03:26 |
|
#5 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 8 |
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 |
|
May 31, 2019, 05:55 |
|
#6 |
Senior Member
|
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. Last edited by louisgag; May 31, 2019 at 08:30. |
|
|
|
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 |