CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Integrate mass of phase?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 11, 2016, 07:20
Default Integrate mass of phase?
  #1
New Member
 
Simo Sepponen
Join Date: Jun 2016
Posts: 8
Rep Power: 2
sepponen is on a distinguished road
Hello,

I would like to calculate the mass of a phase as function of time using twoPhaseEulerFoam. Could this be done without modifying the solver, maybe with a function object? Is there a function object which integrates a variable over the domain?

Thank you for your attention,
Simo
sepponen is offline   Reply With Quote

Old   August 12, 2016, 05:56
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 358
Rep Power: 14
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

If the density of the phase is constant you can follow the volume fraction of the phase that you are interested in in the log of the solver. If you want to plot it you can use some bash to extract the values from the log. I typically use something like this:

Code:
grep fra twoPhaseEulerFoam.log | awk '{print $5}' > volumeFraction
The grep command gives you something like this for every occurrence of "fra":
Code:
alpha.particles volume fraction = 0.0005668175397  Min(alpha.particles) = 0  Max(alpha.particles) = 0.05349701286
The awk command gives the 5th column, which is the overal volume fraction of the particles phase. You can than plot the file volumeFraction.

awk also allows multiplication to have the entire mass using:

Code:
awk '{print rho*$5*domainvolume}'
where rho is your density and domainvolume is the entire volume of the domain.

If your density is not constant you maybe can use the volRegion functionObject to obtain a weighted volume average or a volume integral.

Use the following to find some more information:
Code:
find $FOAM_SRC -iname *volRegion*
tomf is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence after change in mass flow rate in two phase flow meetsunilkale FLUENT 1 March 25, 2013 04:03
Discrete Phase & Mass Flow Rate MagnusZeus FLUENT 0 December 2, 2011 18:57
How to calculate mass flow of the discrete phase in Euler-lagrange model juliom CFX 0 November 8, 2011 20:50
Multiphase Multicomponent mass transfer -Initial condition pannsave CFX 10 February 9, 2011 02:12
liquid phase reactions and mass transfer Swarup FLUENT 0 January 17, 2005 01:47


All times are GMT -4. The time now is 12:05.