CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   cuttingPlane is creating unwanted surfaces (https://www.cfd-online.com/Forums/openfoam-post-processing/220073-cuttingplane-creating-unwanted-surfaces.html)

tecmul August 22, 2019 15:15

cuttingPlane is creating unwanted surfaces
 
4 Attachment(s)
Hello everyone, I'm simulating 2D flow in a channel with OpenFOAM 6 and am trying to interpolate some field variables onto a plane and integrate. I do this by including the following function object in my controlDict file.

Code:

cuttingplane
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");

        log            true;
        writeControl    timeStep;
        writeInterval        1;
        writeFields    true;

        // Type of source: patch/faceZone/sampledSurface
        surfaceFormat  vtk;
        regionType      sampledSurface;
        name                        mySurface;

        sampledSurfaceDict
        {
                type cuttingPlane;
                planeType          pointAndNormal;
                pointAndNormalDict
                {
                        basePoint      (0.01 0 0); 
                        normalVector    (1 0 0);
                }
                source cells; // sample cells or boundaryFaces
                interpolate true;
        }

        // Operation: areaAverage/sum/weightedAverage ...
        operation      areaIntegrate;

        fields
        (
            U
        );
    }

The channel is in the x direction and goes from x = 0 to 1. I want a slice of the channel at x = 0.01. This slice is generated correctly, but for some reason the surface generated by the function object includes tetrahedra at x = 0. I've attached images showing these surfaces. Moving the location of the slice towards increasing x results in smaller tetrahedra, until x = 0.5 where they disappear. Moving further to the right, the tetrahedra appear at x = 1 and increase in size as we move along the channel.
Why is this happening?

Attachment 71900

Attachment 71901

Attachment 71902

Attachment 71903

syavash August 26, 2019 13:29

Quote:

Originally Posted by tecmul (Post 742812)
Hello everyone, I'm simulating 2D flow in a channel with OpenFOAM 6 and am trying to interpolate some field variables onto a plane and integrate. I do this by including the following function object in my controlDict file.

Code:

cuttingplane
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");

        log            true;
        writeControl    timeStep;
        writeInterval        1;
        writeFields    true;

        // Type of source: patch/faceZone/sampledSurface
        surfaceFormat  vtk;
        regionType      sampledSurface;
        name                        mySurface;

        sampledSurfaceDict
        {
                type cuttingPlane;
                planeType          pointAndNormal;
                pointAndNormalDict
                {
                        basePoint      (0.01 0 0); 
                        normalVector    (1 0 0);
                }
                source cells; // sample cells or boundaryFaces
                interpolate true;
        }

        // Operation: areaAverage/sum/weightedAverage ...
        operation      areaIntegrate;

        fields
        (
            U
        );
    }

The channel is in the x direction and goes from x = 0 to 1. I want a slice of the channel at x = 0.01. This slice is generated correctly, but for some reason the surface generated by the function object includes tetrahedra at x = 0. I've attached images showing these surfaces. Moving the location of the slice towards increasing x results in smaller tetrahedra, until x = 0.5 where they disappear. Moving further to the right, the tetrahedra appear at x = 1 and increase in size as we move along the channel.
Why is this happening?

Attachment 71900

Attachment 71901

Attachment 71902

Attachment 71903

Are you using parallel mode? I had the same problem when I run in parallel.

tecmul August 28, 2019 11:03

Quote:

Originally Posted by syavash (Post 743117)
Are you using parallel mode? I had the same problem when I run in parallel.

No my case isn't parallel. I was curious and switched to parallel to see what would happen. The same thing happened. Thanks anyway.


All times are GMT -4. The time now is 21:28.