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

Integrate mass of phase?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 9
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: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
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


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
Divergence after change in mass flow rate in two phase flow meetsunilkale FLUENT 1 March 25, 2013 03:03
Discrete Phase & Mass Flow Rate MagnusZeus FLUENT 0 December 2, 2011 17:57
How to calculate mass flow of the discrete phase in Euler-lagrange model juliom CFX 0 November 8, 2011 19:50
Multiphase Multicomponent mass transfer -Initial condition pannsave CFX 10 February 9, 2011 01:12
liquid phase reactions and mass transfer Swarup FLUENT 0 January 17, 2005 00:47


All times are GMT -4. The time now is 02:47.