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

[OpenFOAM] Coloring of 'alphas' from OpenFOAM case when comparing two solvers

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2023, 15:54
Question Coloring of 'alphas' from OpenFOAM case when comparing two solvers
  #1
New Member
 
Markus
Join Date: Oct 2023
Posts: 3
Rep Power: 2
woutie is on a distinguished road
Hi there


I've got two cases where I'm running multiphaseInterFoam and compressibleMultiphaseInterfoam and then visualising the alphas fields in ParaView. The alphas all represent the same fluids in both cases (a dense bottom layer [alpha.water], a less dense top layer [alpha.oil] and then gas [alpha.gas] - coming in at the inlet with the same gas being the third phase in the simulation). Just want the alphas to match colors both sides, but can't seem to get it right.

Any ideas / clever tricks would be highly appreciated!
Attached Images
File Type: jpg Screenshot from 2023-10-08 21-53-05.jpg (34.1 KB, 8 views)
woutie is offline   Reply With Quote

Old   October 10, 2023, 01:40
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
To me it is a bit unclear what you mean by "Just want the alphas to match colors both sides"?
AtoHM is offline   Reply With Quote

Old   October 10, 2023, 03:05
Default
  #3
New Member
 
Markus
Join Date: Oct 2023
Posts: 3
Rep Power: 2
woutie is on a distinguished road
Hi AtoHM

Many thanks for the reply. What I need is for the three layers to have identical colouring for each of the phases, e.g. that the bottom phase is red in both cases, then the middle one grey and the top one blue. It seems that ParaView is assigning colour based on the OpenFOAM output given for alphas.

I thought it might be easy (e.g. manipulate the RBG values for each alpha), but it turns out it wasn't that simple. Hope you have some ideas!

Thank you,
M
woutie is offline   Reply With Quote

Old   October 12, 2023, 01:17
Default
  #4
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Thanks for the clarification. Altering the rgb values should do the trick. What have you tried there that did not work?


The default blue-to-red scale you use has 3 colors defined. The little "gear" symbol next to the colorbar gives you more options below, where you can see the rgb values and adjust them for each stop.
woutie likes this.
AtoHM is offline   Reply With Quote

Old   October 20, 2023, 22:52
Default
  #5
New Member
 
Markus
Join Date: Oct 2023
Posts: 3
Rep Power: 2
woutie is on a distinguished road
Thanks AtoHM. It turns out, the sequence openfoam uses to write the alphas file was different for the two cases. But the solution was easier than I thought - adding up the individual alphas into a new 'alphas' solved the problem. Thanks again for the input!
woutie 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
Some problems in naca 0012 V&V case of NASA TMR and DPW using OpenFOAM chengdi OpenFOAM Running, Solving & CFD 7 October 5, 2019 13:20
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 5, 2018 23:48
OpenFOAM Foundation releases OpenFOAMŪ 3.0.0 CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 1 November 7, 2015 15:16
Same SimpleFOAM Case converges with openFOAM 2.1 but diverges with openFOAM 2.0.1 alsdia OpenFOAM Running, Solving & CFD 3 October 22, 2012 11:25
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 00:03.