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/)
-   -   Calculate interface curvature in interFoam (http://www.cfd-online.com/Forums/openfoam-solving/111645-calculate-interface-curvature-interfoam.html)

styleworker January 11, 2013 15:26

Calculate interface curvature in interFoam
 
Hi there,

actually I'm solving two phase flows with MRFInterFoam (OF 2.1.1) in a single rotating cylinder, which is half filled with a fluid.

I would like to calculate the resulting capillary pressure, which is connected with the interface curvature. Andrea allready wrote a script for calculating the curvature, but it seems not to work.

Does anybody have a idea?

styleworker January 15, 2013 14:03

I've found that, if I add the following code to controlDict, I can extract the curvature to vtk and ascii format for a defined patch. So I can extract the coordinates in x and y.
If cyclic boundaries are involved, isoSurface has to be changed to isoSurfaceCell, but it isn't possible anymore to extract the surface for a defined patch.

But it is still possible to add a contour filter (alpha=0.5) and slice filter to the model in paraView. The coordinates can easily exported as *.csv.

HTML Code:

functions
{
    elevationVTK
    {
        type            surfaces;
        functionObjectLibs
        (
            "libsampling.so"
        );
        outputControl  outputTime;
        surfaceFormat  vtk;
        interpolationScheme cellPoint;
 
        fields
        (
            alpha1
        );
        surfaces
        (
            topFreeSurface
            {
                type        isoSurface;
                isoField    alpha1;
                isoValue    0.5;
                interpolate true;
                exposedPatchName nameOfPatch; 
            }
        );
    }
 
    elevationRAW
    {
        type            surfaces;
        functionObjectLibs
        (
            "libsampling.so"
        );
        outputControl  outputTime;
        surfaceFormat  raw;
        interpolationScheme cellPoint;
 
        fields
        (
            alpha1
        );
        surfaces
        (
            topFreeSurface
            {
                type        isoSurface;
                isoField    alpha1;
                isoValue    0.5;
                interpolate true;
                exposedPatchName nameOfPatch;
            }
        );
    }
}



All times are GMT -4. The time now is 15:19.