CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Bounded cuttingPlane? (http://www.cfd-online.com/Forums/openfoam/91252-bounded-cuttingplane.html)

CedricVH August 4, 2011 11:15

Bounded cuttingPlane?
 
4 Attachment(s)
Dear all,

I have a model as given in the first attachment (model.png). As I want to sample the pressures and velocities in the middle of the model, I am defining a plane perpendicular to the boundary with the following code in the sampleDict file:

Code:

setFormat raw;

surfaceFormat vtk;

interpolationScheme cellPoint;

// Fields to sample.
fields
(
    p
    U
);

surfaces
(
    plane
    {
        type cuttingPlane;
        planeType pointAndNormal;
        pointAndNormalDict
        {
            basePoint (0.130244487182737 0.111573016987418 -0.0419832355596031);
            normalVector (0 0 1);
        }
        interpolate true;
    }
);

The pointAndNormalDict part of this code defines a new plane given a base point and a normal vector as visualised in the second attachment (defineCuttingPlane.png).

The cuttingPlane function will then remove the parts of the plane that are outside the mesh, as shown in the third attachment (defaultCuttingPlane.png).

However, this is not what I want! I only want to sample the values in the middle of my model as shown in the fourth attachment (defaultCuttingPlane.png).

Is there a way to do that? I think there are two possibilities:
  • Making a bounded plane: A rectangular plane which has not an infinite size, but which is bounded by 4 corners. In this way it can be made small enough so it does not cross other boundaries except the middle ones.
  • Using the base point of the plane to specify the region: Only the middle region that contains the basepoint is valid. The regions at the inlet and outlet do not contain this point and should thus be removed.
I have no idea how to achieve this. Maybe somebody has already encountered this problem and came up with a solution.

Thanks in advance!

markusrehm August 5, 2011 04:31

Hi Cenerik,

I would define a faceSet and sample over that one.

Markus

CedricVH August 5, 2011 05:10

Quote:

Originally Posted by markusrehm (Post 318973)
Hi Cenerik,

I would define a faceSet and sample over that one.

Markus

Thanks for your answer Markus!

Is there a possibility to create a faceSet from the intersection between a plane (can be in stl format and added via sampledTriSurfaceMesh) and the cells of a mesh?

Or is there another good method to specify this set?

The mesh is created in TGrid and converted using fluent3DMeshToFoam.


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