|
[Sponsors] |
air flux through a boundary with air-water mixture |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 8, 2013, 10:12 |
air flux through a boundary with air-water mixture
|
#1 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Hi,
I have calculated the total flux through boundaries of my model but I further need to calculate the fraction of air flux through the boundaries with air-water mixture. Is there any way to find the air fraction? Thanks a lot Hale |
|
July 8, 2013, 10:19 |
|
#2 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi,
which solver do you use and how is you processing done (calculation within solver or via function objects)? You probably need to account for the alpha/alpha1 values. Cutter |
|
July 8, 2013, 10:30 |
|
#3 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
I'm using InterFoam and the calculation is done via a function object (calcMassFlow that uses the phi file to calculate the fluxes through boundaries; http://www.cfd-online.com/Forums/ope...-boundary.html) You are definitely right. I have to multiply the total mass flux (at each boundary and time step) with the corresponding alpha1 values but is it possible to do it after the calculation is performed? How can I distinguish the alpha1 values for different boundaries? |
||
July 8, 2013, 10:44 |
|
#4 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
This should be possible by using the faceSource function object:
Code:
myFuncObj { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); outputControl timeStep; log true; // Output field values as well valueOutput false; source patch; sourceName outlet; // replace patch name!!! operation sum; fields ( rho*phi*alpha // maybe fix eqn. for your purpose!!! ); } Cutter |
|
July 8, 2013, 10:54 |
|
#5 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
|
||
July 8, 2013, 11:20 |
|
#6 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Function objects are registered within a subdict called 'functions' in $CASE/system/controlDict.
See http://foam.sourceforge.net/docs/cpp/a00002.html and https://www.hpc.ntnu.no/display/hpc/...Postprocessing for example. |
|
July 8, 2013, 11:59 |
|
#7 | |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Quote:
|
||
July 8, 2013, 12:13 |
|
#8 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
It should be written to the solver's text output at the end of each time step.
|
|
July 8, 2013, 12:46 |
|
#9 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
I'm really sorry but nothing is written to the log file. I have attached my controlDict file to this message. I will really be grateful if you could tell me what I have done wrong.
|
|
July 9, 2013, 05:06 |
|
#10 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
I have now fixed the problem with getting output from the solver. When I set rho*phi in the faceSource object function it gives the total flux at each time step but when I add the alpha1 (i.e. rho*phi*alpha1) it gives nothing in the output file. How can this problem be fixed?
Thanks \Hale |
|
December 15, 2014, 05:05 |
|
#11 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi,
sorry for the really late reply. Maybe it still helps you or any other reader of this thread. Have a look at https://github.com/OpenFOAM/OpenFOAM...em/controlDict for a working example for OpenFOAM 2.3.x (there are tutorial cases for other versions of OF as well)! The data will be written into ASCII text files (simple CSV format, with file extension *.dat) in a directory called postProcessing within the root directory of your case. Feel free to ask follow up questions if necessary, hopefully the answer will come faster next time. Cutter |
|
January 6, 2015, 13:56 |
|
#12 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
I have been playing around with this myself and I haven't been able to multiply rho*phi by alpha using faceSource.
One solution is to use swak4foam instead of faceSource. I found this somewhere on the forums, but I can't remember which post it came from. https://openfoamwiki.net/index.php/Contrib/swak4Foam Code:
inlet { type swakExpression; valueType patch; patchName c_inlet; aliases{alpha alpha.water;} verbose true; expression "alpha*U&Sf()"; accumulations ( sum ); outputControlMode outputTime; outputInterval 1; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 18:15 |
Simulating A water bubble in air with periodic boundary condition | cubicmatrixist | Main CFD Forum | 0 | October 14, 2010 13:26 |
water and air interface boundary | Shivakanth | Main CFD Forum | 2 | September 25, 2008 10:11 |
Mixture model - water droplet + air - EVAPORATION | bohis | FLUENT | 4 | January 25, 2008 12:04 |