air flux through a boundary with air-water mixture
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 |
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 |
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? |
This should be possible by using the faceSource function object:
Code:
myFuncObj Cutter |
Quote:
|
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. |
Quote:
|
It should be written to the solver's text output at the end of each time step.
|
1 Attachment(s)
Quote:
|
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 |
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 |
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 |
All times are GMT -4. The time now is 07:25. |