CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   volume fraction gradient (http://www.cfd-online.com/Forums/openfoam-solving/109033-volume-fraction-gradient.html)

Gitesh P November 7, 2012 13:42

volume fraction gradient
 
Hello,

Can any one suggest how to get the volume fraction gradient to calculate interfacial area ?

I mean if I have a dispersed phase volume fraction 'alpha'. And I want to calculate the '|grad(alpha)|' field then how I can get the values in OF/paraFoam ?

With regards,
GP

kmooney November 8, 2012 10:51

If you want to be able to see the alpha gradient field during post processing something like this might work for you:

Code:

if(runTime.write())
{
    const volVectorField& gradAlpha = fvc::grad(alpha);
    gradAlpha.write();
}

Cheers!

Gitesh P November 9, 2012 04:14

Hello,

Thank you for that.

Yes now I am able to get the gradients of alpha.

How about absolute value of it. I mean I need to calculate absolute value of gradient of alpha.

Is there any utility where I can direct find those values ?

With regards,
GP

duongquaphim November 9, 2012 10:42

instead of const volVectorField& gradAlpha = fvc::grad(alpha); use const volScalarField& gradAlpha = mag(fvc::grad(alpha));

Gitesh P November 12, 2012 09:04

Hello,

Can you say me where I include/write this line? I mean in which directory/file.

With regards,
GP

duongquaphim November 12, 2012 10:32

you can just put the above code in interFoam.C for instance and compile. The outputs should be exported into time folders in the same way of U, p or alpha1 fields.

Duong

Gitesh P November 13, 2012 08:43

Hello again,

You mean I need to put these lines some where at the end in interFoam.C file ?

With regards,
GP


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