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

Defining a zone for sampling a plane

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By FerdiFuchs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2014, 05:23
Default Defining a zone for sampling a plane
  #1
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 12
odellar is on a distinguished road
Hi,

I want to sample my data over a plane, and so define the plane in the sampleDict as:

Code:
    plane1
    {
        type            plane;    // always triangulated
        basePoint       (2 0 0.5);
        normalVector    (0 0 1);

        //- Optional: restrict to a particular zone
        // zone        zone1;

        //- Optional: do not triangulate (only for surfaceFormats that support
        //            polygons)
        //triangulate     false;
    }
This of course samples a plane throughout the whole computational domain, but I only want to sample a subsection of it - I think I need to use the optional zone definition, but I'm not sure how to do this.

Can I somehow specify a square plane, for example say I want the region within the four points:

(0,1,0.5)
(4,1,0.5)
(4,-1,0.5)
(0,-1.0.5)

?

Thanks a lot.
odellar is offline   Reply With Quote

Old   October 23, 2014, 11:15
Default
  #2
Member
 
Ferdinand Pfender
Join Date: May 2013
Location: Berlin, Germany
Posts: 40
Rep Power: 12
FerdiFuchs is on a distinguished road
Hi!

I had the same problem for today.

It works by defining your zones via topoSet or setSet (cellSet) and use this zone for the sample-utility:

In your case it would be something like this for the use with topoSet and sample:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(

    {
        name    zone1;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0 -1 0.5) (4 1 0.5);
        }
    }
    {
        name    zone1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set zone1;
        }
    }

);

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

interpolationScheme cell;

surfaceFormat raw;

surfaces
(

    plane1
    {
        type            plane;    // always triangulated
        basePoint       (2 0 0.5);
        normalVector    (0 0 1);
        zone            zone1;
    }

);

fields          ( p );


// ************************************************************************* //
Maybe you have to adjust the box for toposet to be 3-dimensional, for example: box (0 -1 0.49999) (4 1 0.5);
bmikuz, giack, _el_jugador and 1 others like this.
FerdiFuchs is offline   Reply With Quote

Reply

Tags
plane, sampledict, surface, zone


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
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 01:08


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