CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Understanding the coordinates of sample utility (http://www.cfd-online.com/Forums/openfoam-post-processing/74149-understanding-coordinates-sample-utility.html)

vishwa March 25, 2010 12:17

Understanding the coordinates of sample utility
 
Hi,
i am using sample utility to get the velocity data on a plane after my simulation is completed.

I make a quick 2 x 2 grid and ran the sample utility and was not sure where the data is actually saved.

Here is the sample dict and the blockMesh dict for your reference.
sampleDict
Quote:

setFormat raw;

surfaceFormat vtk;

interpolationScheme cellPoint;

fields
(
U
);
sets
(
);
surfaces
(
constantPlane
{
type plane; // always triangulated
basePoint (5 5 0);
normalVector (0 0 1);

//- Optional: restrict to a particular zone
// zoneName zone1;
}
);
blockMesh
Quote:

convertToMeters 1;

vertices
(
(0 0 0)
(10 0 0)
(10 10 0)
(0 10 0)
(0 0 1)
(10 0 1)
(10 10 1)
(0 10 1)
);

blocks
(
hex (0 1 2 3 4 5 6 7 ) (2 2 1) simpleGrading (1 1 1)
);
the output of the sample utility is below
Quote:

# "U" FACE_DATA 8
# x y z "U"_x "U"_y "U"_z
1.66667 3.33333 0 0.003 0 0
3.33333 1.66667 0 0.003 0 0
6.66667 1.66667 0 0.003 0 0
8.33333 3.33333 0 0.003 0 0
1.66667 8.33333 0 0.003 0 0
3.33333 6.66667 0 0.003 0 0
6.66667 8.33333 0 0.003 0 0
8.33333 6.66667 0 0.003 0 0
How do I save the coordinates of cell centers?

Regards,
Vishwa

sega March 25, 2010 12:41

Quote:

Originally Posted by vishwa (Post 251644)
How do I save the coordinates of cell centers?

Does this mean you just want to have the velocities on the cell centers (and not on the points)?

Well, I guess this should be possible if you switch of the interpolation.

vishwa March 25, 2010 12:45

Hi,
Thanks for the response...I checked the switches that are present for interpolationScheme in sampleDict

cell, cellPoint and cellPointFace. And, I know that I can use cell to save the cell center values. But what I don't understand are the x and y coordinates it saves..

At least in the case that i just posted, the x, y coordinates don't match the cell centers.

any help?

Regards,
Vishwa

sega March 25, 2010 12:56

Quote:

Originally Posted by vishwa (Post 251656)
At least in the case that i just posted, the x, y coordinates don't match the cell centers.

Is this the case with 'cell' as interpolationScheme? Thats strange ...

vishwa March 25, 2010 13:51

Yes,
This is output when the interpolationScheme is set to cell. I changed it to cellPoint and the result is the same.

Regards,
vishwa


All times are GMT -4. The time now is 15:14.