InterFoam and species transport
Hello,
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 fvm::ddt(rho,O2)+fvm::div(rhoPhi,O2)==0 The problem is that there should be included (1gamma) 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 ...+fvm::div(rhoPhi,(1gamma)*O2)==.... I couldn't find such a convection scheme in OpenFOAM. Thanks, Peter. 
Hi,
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? Thanks 
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.

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::ddt(gas) + 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. Peter. (I forgot to mention that eSY is an evaporation related source term…) 
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 gasliquid 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. 
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 ( phi, alpha1, alphaScheme ) + fvc::flux ( fvc::flux(phir, alpha2, alpharScheme), alpha1, alpharScheme ) + fvc::flux ( fvc::flux(phir, alpha3, alpharScheme), alpha1, 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 Peter. 
Dear Peter,
I got it finally thanks to your help. I appreciate it. Sanj 
Dear Sanj,
Greetings. 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. 