CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Coloring of 'alphas' from OpenFOAM case when comparing two solvers (https://www.cfd-online.com/Forums/paraview/252271-coloring-alphas-openfoam-case-when-comparing-two-solvers.html)

woutie October 8, 2023 15:54

Coloring of 'alphas' from OpenFOAM case when comparing two solvers
 
1 Attachment(s)
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!

AtoHM October 10, 2023 01:40

To me it is a bit unclear what you mean by "Just want the alphas to match colors both sides"?

woutie October 10, 2023 03:05

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

AtoHM October 12, 2023 01:17

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 October 20, 2023 22:52

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!


All times are GMT -4. The time now is 08:18.