今野です.
現バージョンのsampleコマンドはパッチ以外の任意断面を面サンプリングすると,
必ず三角形補間をしてしまうので,サンプリング数と格子数が異なる結果になります.
(補間されていても流入データとして耐えられると考えて,このまま
timeVaryingMappedFixedValue 境界の入力値として使う事もあります.)
格子中心の値をそのままサンプリングするには以下の方法があります.
1. サンプリングしたい格子のゾーン(cellZone)を作成する
2. function機能を用いて,上記のcellZoneの場の値を出力する.
1. のcellZoneを作成する方法はいくつかありますが,例えば以下のような topoSetDictを作成し,
topoSetで作成する事が可能です.
system/topoSetDict
---
actions
(
{
name samplingCellSet;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.745 -1e+10 -1e+10) (0.750 1e+10 1e+10); // サンプリング断面を通る格子のみを含む矩形領域
}
}
{
name samplingCell;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set samplingCellSet;
}
}
);
---
2. を行うには,ソルバのcontrolDictに以下のようなfunctionの設定を追加します.
system/controlDict
---
functions
{
samplingCell
{
type cellSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log false;
valueOutput true;
source cellZone;
sourceName samplingCell;
operation volIntegrate; // 何でも良い.
---
本来,上記はソルバ実行時に機能するのですが,既に計算結果がある場合には,
execFlowFunctionObjectsを用いることで,既往の計算結果に対してfunction が動作しますので,
sample と同様に事後のサンプリングが可能です.
$ execFlowFunctionObjects
または,
$ execFlowFunctionObjects -latestTime
以上です.
2015年10月5日月曜日 17時30分16秒 UTC+9 kayu: