CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   How can I define the cell centers without using writeCellCenters? (

Taylorreihe April 21, 2011 07:34

How can I define the cell centers without using writeCellCenters?

I want to define the cell centers so I have the coordinates for my Velocity U and my pressure p without using the command writeCellCenters. I have a mesh that do not move. Can somebody help me and know a method to avoid that the coordinates are written in every time directory?

Thank you in advance.

ngj April 21, 2011 08:35


You can typically write


writeCellCentres -help
to see the available options. In your case you can use either


writeCellCentres -latestTime
writeCellCentres -time <VALUE>

depending on the time folder, where you want the values to be written.

Best regards


Taylorreihe April 23, 2011 17:35

Hi Niels,

thank you very much :-)! It's quite simple :P.

Have a nice weekend.

Best regards,

sakro May 5, 2011 06:54

Hi, my question is pretty much related to this thread =)
is it possible to get cell centers only for a cellSet? Not for every cell in my mesh?

anishtain4 February 19, 2016 13:46

I have some trouble with this utility.
I used it on the channel395 tutorial case and grid points don't make any sense:
Y is defined from 0 to 2 in blockMeshDict, but values for both block start from zero to 1. Also the second block is upside down.
There is only 15 unique Z values while there should be 30. Also there is no block in the Z direction so one doesn't expects any irregularity in that direction.

I don't expect the values be ordered (since the grid is stored in an unstructured manner), but I would expect the grids to have correct physical positions. Does anyone knows how to achieve this?

All times are GMT -4. The time now is 02:46.