CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Writing out interphasechangefoam mass transfer terms as fields (

srivatta October 15, 2013 10:19

Writing out interphasechangefoam mass transfer terms as fields
I am trying to write out the mass condensation and evaporation terms (m+, m-) as fields per time-step in the interPhaseChangeFoam solver. What is the best way of doing this? Has anybody done this before? I am just a beginner with C++
Thank you very much,

eysteinn October 16, 2013 06:00

Hi Sri

Here is a nice tutorial showing how you can modify the solver in order to add a transport equation for temperature.
If you follow what is shown on page 6, so starting by copying the solver to your folder
and ending with wmake on top of page 7.

Then open your myInterPhaseChangeFoam.C and add

just before

and then compile using wmake, I think we should be getting somewhere. . . .


srivatta October 16, 2013 08:18

Re: Writing out mass transfer terms
Thanks for the reply. Although, what you are suggesting writes our alpha1 which is the liquid volume fraction (this is written anyway as a field). I am trying to write out a modified form of mDot() which is in the PhaseChangeMixture folders under the mass transfer models (for my case it is SchnerrSauer.C).

All times are GMT -4. The time now is 16:46.