Sample

From OpenFOAMWiki
Revision as of 21:34, 15 August 2005 by Master.philou (Talk | contribs)

Sampling values from a simulation and writing them to a file is done by editing the "sampleDict" file into the "system" folder of the case you run.

An example of such a file is provided at the end of this article.

One must specify:

An "interpolationScheme" choosed in:

"cell" for a sampling-value equal to the one in the cell-center (which is considered constant over the whole cell) "cellPoint" for a sampling-value interpolated according to the cell-center's value and to the vertices values (which are determinated by neighbouring-cell's centers values) "cellPointFace" is the same as the one before with the interpolation including also the faces' values (which are determined by the current face interpolation scheme for the field (linear, gamma, ...)

A "writeFormat" choosed in: "xmgr" for "jplot" for "gnuplot" for the OpenSource program Gnuplot (which is almost a raw format) "raw" for a raw format file

A description of how to sample in the "sampleSets" subset, i.e. which points of the system being simulated must be sampled. One can describe thoose points directly by using the "cloud" method or, maybe smarter, by selecting one of the methods further described.

Thoose methods all share 2 attributes: "name" which will be used to refer to the sampling with the current method and also for the filename produced "axis" which will be used do determine how to write the point's coordinate. Ways of doing it are the following: "x" (or "y" or "z") if you only want the x-coordinate to be reported "xyz" if you want both coordinates to be reported "distance" for the distance to point (0,0,0) to be reported

"uniform" : used to sample evenly distributed points on a line, providing its start and end points


THIS ARTICLE IS BEING WRITTEN...