|
[Sponsors] |
Volume fraction for entire domain in interFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 21, 2012, 09:49 |
Volume fraction for entire domain in interFoam
|
#1 |
New Member
James McNeill
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
All,
I'm trying to determine the total phase-1 volume fraction at each time step of a simulation to calculate the mass of phase-1 in the domain. I've tried a few methods with swak4foam and Paraview, but I'm not confident in the numbers I am seeing. I noticed that the value I want is written to the log file at each time step as "Phase-1 volume fraction =". Is there a simple way to write this value to a separate output file? Thanks in advance. |
|
May 21, 2012, 10:32 |
|
#2 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
Hi
just type on a terminal if your log file is named "log": Code:
cat log | grep Liquid | cut -d' ' -f6 > massLog |
|
May 21, 2012, 11:20 |
|
#3 |
New Member
James McNeill
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
Grep is an interesting thought. Thanks for that. I haven't used grep before, but is there a way to write the time in addition to alpha1? I eventually want to be able to plot alpha1 vs time.
|
|
May 21, 2012, 11:26 |
|
#4 |
Senior Member
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19 |
I think it would be fairly easy to write a python script to do that. Just take into account that you have several mass values each time.
|
|
May 21, 2012, 18:59 |
|
#5 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
|
|||
May 22, 2012, 03:10 |
|
#6 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Alternatively, you can use volumeIntegrate from the simpleFunctionObjects (see contribution by Bernhard Gschaider)
http://openfoamwiki.net/index.php/Co...unctionObjects Advantage here is that you don't need an extra step if you put it in the controlDict. |
|
Tags |
integrate, interfoam, postprocessing, vof modeling |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
volume fraction in mixture model and VOF???? | multiphase-flow | FLUENT | 4 | August 7, 2014 11:35 |
Mass fraction and volume fraction | eric weddle | CFX | 0 | September 26, 2011 06:02 |
Difference between Volume Fraction and Mass Fraction in CEL | foo7 | CFX | 0 | September 21, 2011 09:45 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |