Integrate mass of phase?

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

 August 11, 2016, 07:20 Integrate mass of phase? #1 New Member   Simo Sepponen Join Date: Jun 2016 Posts: 8 Rep Power: 2 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

 August 12, 2016, 05:56 #2 Senior Member   Tom Fahner Join Date: Mar 2009 Location: Delft, Netherlands Posts: 358 Rep Power: 14 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*`

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post meetsunilkale FLUENT 1 March 25, 2013 04:03 MagnusZeus FLUENT 0 December 2, 2011 18:57 juliom CFX 0 November 8, 2011 20:50 pannsave CFX 10 February 9, 2011 02:12 Swarup FLUENT 0 January 17, 2005 01:47

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