OFでcellやfaceの集合を作るときは、setSetコマンドもしくはtopoSetコマンドを使用する。後者はsystem/topoSetDictで指定できるので、わかりやすいかも。
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// set face cell set ① faceSetをパッチ名を指定して作成
{
name fs;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name ".*";
option all;
}
}
// set all cell to "rotor" ② faceSetからcellSetを作成
{
name rotor;
type cellSet;
action new;
source faceToCell;
sourceInfo
{
set fs;
option any;
}
}
);
// ************************************************************************* //