CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

cuttingPlane is creating unwanted surfaces

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By syavash

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2019, 15:15
Default cuttingPlane is creating unwanted surfaces
  #1
Member
 
Join Date: Sep 2018
Posts: 53
Rep Power: 8
tecmul is on a distinguished road
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?

channel.jpg

channel2.jpg

cuttingPlane.jpg

cuttingPlane2.jpg

Last edited by tecmul; August 22, 2019 at 17:26.
tecmul is offline   Reply With Quote

Old   August 26, 2019, 13:29
Default
  #2
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by tecmul View Post
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.
syavash is offline   Reply With Quote

Old   August 28, 2019, 11:03
Default
  #3
Member
 
Join Date: Sep 2018
Posts: 53
Rep Power: 8
tecmul is on a distinguished road
Quote:
Originally Posted by syavash View Post
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.
tecmul is offline   Reply With Quote

Old   February 1, 2021, 11:40
Default
  #4
New Member
 
Luiz Oliveira
Join Date: Aug 2018
Location: Napoli, Italy
Posts: 24
Rep Power: 8
Luiz is on a distinguished road
Did someone work on the problem?
From my experience the area value is different for single/parallel mode, where the single mode gives the correct area. My guess is that the decompose method should be modified although I do not have any idea of what to use instead of scotch.


My function is similar to the others:
Code:
velocityInterface
    {
        type            surfaceFieldValue;
        libs            (fieldFunctionObjects);
        fields          (absUy);
        operation       areaIntegrate;
        regionType      sampledSurface;
        
        sampledSurfaceDict
        {
            type            plane;
            planeType        pointAndNormal;
            
            pointAndNormalDict
            {
                point        (0 0.3 0);
                normal        (0 1 0);
            }
            zone        interfaceSelection;
            interpolate     true;
        }
        name            interface;
        timeStart       0;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   1;
        writeFields     false;
    }
__________________
Luiz Oliveira
PhD. Student in Environmental Fluid Dynamics
University of Napoli: Federico II
Luiz is offline   Reply With Quote

Old   February 1, 2021, 16:12
Default
  #5
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
One solution is to create baffles or faceZone for sampling the desired region. Then in the decomposeParDict, use the "preservePatches" or other similar options to put the baffle or faceZone in one single process altogether.
I tried and it worked for me.

Bests
Luiz likes this.

Last edited by syavash; February 8, 2021 at 08:16.
syavash is offline   Reply With Quote

Reply

Tags
cuttingplane, slice, surfacefieldvalue, wrong surface


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
export calculated variable with cuttingPlane Eloise OpenFOAM Post-Processing 0 June 16, 2014 11:59
How to plot variable (alpha1) on cuttingPlane (runtime postprocessing) pythag0ra5 OpenFOAM Post-Processing 1 September 26, 2013 09:46
Creating Surfaces in Fluid Body Jenny_W Main CFD Forum 2 June 5, 2012 06:05
Modeling both radiation and convection on surfaces - Ansys Transient Thermal R13 s.mishra ANSYS 0 March 31, 2012 05:12
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51


All times are GMT -4. The time now is 03:40.