CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   InterFoam and species transport (

PKeller March 31, 2009 03:20

InterFoam and species transport

I would like to include species transport into interFoam. Therefore I want to implement an equation for i.e. oxygen. The equation should first be calculated without any sources which looks like

The problem is that there should be included (1-gamma) in these terms to specify the interface between the gas and liquid phase (assumed gamma equal to mass fraction in case of same density).

My question is how it is possible to calculate something like
I couldn't find such a convection scheme in OpenFOAM.



sanj January 17, 2014 19:58


Did you every figure that out? I am also trying to do the same thing? If you figured it out could you please explain it to me?


kmooney January 18, 2014 19:30

Is there a particular reason why you would need to account for the alpha field? If you're implementing a passive scalar transport equation I'm not sure that you would need to worry about that. The computed flux field should be able to account for your O2 convection accurately.

PKeller January 20, 2014 05:07

Dear Sanj,

I finished working on that a few years ago, but I figured out that it is not necessary to include the alpha in the gas phase equations, too. This is what I have written:

fvScalarMatrix YEqn
+ fvm::div(phiGas_, gas, gasScheme)
- fvm::laplacian(diffusionLimiter_*DSurf,gas)
- eSY(iter().name())

gas is an iterator over all n - 1 components, the diffusionLimiter prohibits the gas diffusing into the liquid phase and phiGas is computed according the solution in interMixingFoam (as I remember right…). The most complex part is to determine the diffusionLimiter since it has to be calculated at the cell surfaces (surfaceScalarField) in dependence of the alpha field in the neighboring cells.

I hope this helps.


(I forgot to mention that eSY is an evaporation related source term…)

sanj January 20, 2014 14:27

Hi guys,

Thanks for your support.

Kyle: I was trying to add a species transport to interFoam regarding addition of surfactant. So i thought i would start with something like oxygen diffusion in the bulk and then move on to surfactants.

Peter: Thanks for the help. It solved my O2 problem. The next step is to add surfactant to interFoam. The problem here is I need the surfactant to move with the gas-liquid interface. To do this i need to add the VoF alpha in the bulk surfactant equation and the interface equation. I am not sure hot to write divergence of (alpha*rho*U*C). Where alpha is the VoF, rho is density of surfactant, U is the velocity, and C is the concentration in mol/m^3.

PKeller January 21, 2014 03:19

Dear Sanj,

you might have a look on interMixingFoam alphaEqns.H where the flux between the faces is calculated according:

// Create the complete convection flux for alpha1
surfaceScalarField phiAlpha1
+ fvc::flux
-fvc::flux(-phir, alpha2, alpharScheme),
+ fvc::flux
-fvc::flux(-phir, alpha3, alpharScheme),

In your case alpha1 would be the gas phase volume fraction, phir would be a surfaceScalarField of U and alphai the liquid fractions. A similar solution is given for interFoam. If you want to include the density you have to determine rhoPhi as given there too.

Best regards

sanj January 22, 2014 15:08

Dear Peter,

I got it finally thanks to your help. I appreciate it.


vigneshTG October 7, 2014 02:40

Dear Sanj,


I am also trying to add surfactant equation to interfoam. I would like to know whether you have added two equations one for the bulk and one for the interface. If so, can you explain me how to proceed.

Since interfoam does not have sharp interface, i would like to know how are you solving for surfactants on the interface !!

All times are GMT -4. The time now is 01:03.