参考网站
例:提取中轴线上的温度
中轴线:点(0 0 0)至 点(0 0 0.15),等间距取100个点
版本:OpanFOAM-10
文件名:sampleDict
时间:latestTime
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object sampleDict;
}
type sets; //Sample sets (points and lines).
setFormat raw;
//Format of the output file, raw format is a generic format that can be
//read by many applications. The file is human readable (ascii
//format).
interpolationScheme cellPoint;
fields
(
T //Fields to sample
);
sets
(
axis_T //Name of the output file
{
type lineUniform;
axis z;
// axis: how to write point coordinate. Choice of
// - x/y/z: x/y/z coordinate only
// - xyz: three columns
// (probably does not make sense for anything but raw)
// - distance: distance from start of sampling line (if uses line) or
// distance from first specified sampling point
start (0 0 0);
end (0 0 0.15);
nPoints 100; //Number of points
}
);
后处理命令:
postProcess -func sampleDict -latestTime