CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to get volume fraction from mass fraction fields?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Krapf

LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2022, 02:09
Question How to get volume fraction from mass fraction fields?
New Member
mactone hsieh
Join Date: Apr 2012
Location: Taiwan
Posts: 18
Rep Power: 12
mactone is on a distinguished road
Dear Former & Paraviewer,

I have case results of CO、CO2、H2O、H2、CH4、N2、O2 (species mass fraction distribution). How can I post-process it into volume fraction?

In Fluent, I can choose plotting using mass fraction or volume fraction. How can I do it in paraview? By using some kind of function to regulate them?

Thank you.
mactone is offline   Reply With Quote

Old   October 3, 2022, 05:05
Senior Member
Join Date: Oct 2017
Posts: 103
Rep Power: 7
Krapf is on a distinguished road
I don't know of any ready-made function in OpenFOAM that converts mass fractions to volume fractions. But if you have access to the density \rho_i of species i, you can use the calculator filter in ParaView:

\varphi_i = \frac{w_i/\rho_i}{\sum_{z=1}^Z {(w_z/\rho_z)}}
  • \varphi - volume fraction
  • w - mass fraction
  • \rho - density
mactone likes this.
Krapf is offline   Reply With Quote


interchange, mass fraction, paraview, volume fraction

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Postprocess: sampleDict works but creates no output folder shock77 OpenFOAM Post-Processing 14 November 15, 2021 09:27
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 12:25
interDyMFoam - change in volume fraction gopala OpenFOAM Running, Solving & CFD 0 April 27, 2009 11:46
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00

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