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/)
-   -   sampleDict & surfaces & zoneName (https://www.cfd-online.com/Forums/openfoam-post-processing/76956-sampledict-surfaces-zonename.html)

pbohorquez June 9, 2010 07:38

sampleDict & surfaces & zoneName
 
1 Attachment(s)
Hi

I am facing some difficulties to export the values of some computed variables in a subregion of the whole computational domain. Since the mesh was created outside of OpenFOAM and converted to blockMesh, I have defined a set of cells by means of cellSet and, subsequently, a zone containing those cells was properly defined by using setsToZones.

Indeed, the solution in that zone can be visualized with success with paraFoam. In the attached you can see the boundary of the original domain and the solution in the desired zone.

However, when I try to use the "sample" utility to get the solution in a plane that lies in that zone, that application avoids the restriction imposed by the command line

//- Optional: restrict to a particular zone
zoneName burbuja;

where "burbuja" is the name of the zone shown in the attachment. The sueface was defined as follows:

// Surface sampling definition: choice of
// plane : values on plane defined by point, normal.
// patch : values on patch.
//
// 1] planes are triangulated by default
// 2] patches are not triangulated by default
surfaces
(
constantPlane
{
type plane;
basePoint (0.0001 0.005 0);
normalVector (0 0 1);

//- Optional: restrict to a particular zone
zoneName burbuja;

// Optional: whether to leave as faces or triangulate (=default)
triangulate false;
}
);

Any hint?

pbohorquez June 9, 2010 17:34

OK. After surfing the following file,

OpenFOAM/OpenFOAM-1.5-dev/src/sampling/sampledSurface/plane/sampledPlane.C

I have found that the line

//- Optional: restrict to a particular zone
zoneName burbuja;

should read

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

and then it works for me.

The same applies to other OF distros.

aujamal20 February 27, 2013 14:08

sampling surface
 
Dear
I am trying to use sampleDict to extratct Temperature values for each cell in the domain. And I am having only one region of fluid domain containing 5000 cells. When I define the plane in the following manner

Quote:

constantPlane
{
type plane; // always triangulated
basePoint (0 0 0);
normalVector (0 0 1);

//- Optional: restrict to a particular zone
// zone zone1;
}
then I got 10000 values doulbe the mesh cell numbers.
Please help me out how to specify the plane so that I can get exact number of values.

Following is a sample file which I get after running sample and it depicts the doubleing of values.
Quote:

x y z T
0.013325213 0.013333333 0 563.19152
0.0066626067 0.0066666667 0 563.19152
0.033313033 0.013333333 0 563.18244
0.026650427 0.0066666667 0 563.18244
0.053300853 0.013333333 0 563.17514
0.046638247 0.0066666667 0 563.17514
0.073288673 0.013333333 0 563.17236
0.066626067 0.0066666667 0 563.17236
0.086613887 0.013333333 0 563.17203
-
-
-
-
Thanks


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