CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Vof method in interFoam (http://www.cfd-online.com/Forums/openfoam/85051-vof-method-interfoam.html)

 Andrea_85 February 16, 2011 07:54

Vof method in interFoam

Hi all,

I am a fairly new user of openfoam 1.7. I am working with interFoam to simulate multiphase flow and i would like some explanation on how VOF method is implemented in openfoam.
Which is the equation that OF solves for alpha?

Is something like that d(alpha)/dt+div(alpha U)==0 ?
or is there an additional term to ensure the compression of the interface?

I had a look at alphaEqn.H but I did not understand that equation is solved

Is there extensive documentation on how the VOF is implemented in OF 1.7?

Thanks
andrea

 Bernhard February 16, 2011 08:55

You can have a look here for example, some useful information and references are given:
http://www.cfd-online.com/Forums/ope...of-method.html

 akidess February 16, 2011 08:56

Have a look at the thesis by Henrik Rusche, it contains all the basics.

 Andrea_85 February 16, 2011 09:09

I have already read the previous posts and a little bit the thesis of Henrik Rusche. All these things are related to earlier versions of OF and I would like to know how OF is implemented now, in 1.7 version (i do not know if is the last one but i guess). It is the same?
I do not think so because I read that the VOF implemented now is different from previous versions.

Is there any documentation (paper, manual stuff like that), maybe written by who has implemented the VOF in openfoam 1.7?

thanks
andrea

 Andrea_85 February 16, 2011 11:29

I think, if I understand correctly, that the equation that OF solves is:

d(alpha)/dt +div(alpha*U)+div(Ur*alpha*(1-alpha))=0

Is correct?
where i can find the definition of Ur in the code and and how is it calculated?

andrea

 kathrin_kissling February 17, 2011 03:30

1 Attachment(s)
The definition is inside alphaEqn.H. Notice that we do not work on velocities but on fluxes. Tis operation is performed on the faces.

surfaceScalarField phic = mag(phi/mesh.magSf());
phic = min(interface.cAlpha()*phic, max(phic));
surfaceScalarField phir = phic*interface.nHatf();

The formula is below in the attachment.

Hope this helps.

Best

Kathrin

 Andrea_85 February 17, 2011 04:42

Thanks Kathrin,

I copy and paste from interfacePropierties.H (not all the file):

Code:

```/*---------------------------------------------------------------------------*\ 00052                            Class interfaceProperties Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class interfaceProperties 00056 { 00057    // Private data 00058 00059        //- Keep a reference to the transportProperties dictionary 00060        const dictionary& transportPropertiesDict_; 00061 00062        //- Compression coefficient 00063        scalar cAlpha_; 00064 00065        //- Surface tension 00066        dimensionedScalar sigma_; 00067 00068        //- Stabilisation for normalisation of the interface normal 00069        const dimensionedScalar deltaN_; 00070 00071        const volScalarField& alpha1_; 00072        const volVectorField& U_; 00073        surfaceScalarField nHatf_; 00074        volScalarField K_; 00075```
cAlpha is the compression coefficient but i really do not understand where is defined and which value is used in the calculations. Is a constant? (even if you do not define any cAlpha in constan/transportProperties.)

Thank a lot
andrea

 kathrin_kissling February 17, 2011 04:50

Hi andrea,

it is constant and defined in the fvSolution dictionary.
The read in is in interfaceProperties.C

00146 transportPropertiesDict_(dict),
00147 cAlpha_
00148 (
00150 (
00151 alpha1.mesh().solutionDict().subDict("PISO").lookup("cAlpha")
00152 )
00153 ),

Best

Kathrin

 Andrea_85 February 17, 2011 05:14

Thank you very much, very helpful!

I want to ask one last thing. In the alphaEqn.H what is scalar(1)?

for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
{
surfaceScalarField phiAlpha =
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux

(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
);

Thanks a lot

andrea

 akidess February 17, 2011 05:20

Exactly what it says - a scalar with the value 1. OpenFoam is smart enough to do the arithmetic operation for the entire volField even if one of the operands is a scalar value.

 Andrea_85 February 17, 2011 05:41

Very simple!

Thanks again

andrea

 All times are GMT -4. The time now is 12:20.