CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Curvature of the interface using interFoam (

Andrea_85 March 1, 2011 14:16

Curvature of the interface using interFoam
2 Attachment(s)
Hi all,

I am using interFoam to simulate multiphase flow in different geometries and I tried to write a little piece of code (writeCurvature.C that i call as a post processing) to calculate the curvature of the interface following the same method that openFoam normally use in the VOF method. (the calculations that i have done are identical to those in interfaceProperties.C). The problem is that I get strange result. I expected to find high values near the interface and values close to zero in the bulk but it is not!

i attached 2 jpg. one is the colour plot of alpha1 and the other one is the colour plot of the curvature that i got.
Any suggestion?


Andrea_85 March 2, 2011 05:19

someone who has any idea why I find this curvature?
These are the calculations I've done:


reading alpha1 first

// now calc the gradients
        volVectorField gradAlpha1 = fvc::grad(alpha1);

        Info<< "Writing gradAlpha1 to " << << " in "
            << runTime.timeName() << endl;


        // Interpolated face-gradient of alpha
        surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha1);

        dimensionedScalar deltaN_ =  1e-8/pow(average(alpha1.mesh().V()), 1.0/3.0);

        // Face unit interface normal
        surfaceVectorField nHatfv = gradAlphaf/(mag(gradAlphaf) + deltaN_);

        // Face unit interface normal flux
        const surfaceVectorField& Sf = mesh.Sf();
        surfaceScalarField nHatf_ = nHatfv & Sf;

        volScalarField curvature



The thing that I can not understand is if I'm doing something wrong or if it is normal to find such values


All times are GMT -4. The time now is 23:30.