内部壁の作成2019年1月26日 | |
はじめに領域内部に壁面を作る方法について。 使用バージョンOpenFOAM 6 内部壁の作成icoFoam のチュートリアルケース cavity を使い、内部に面を作る。内部面は createBaffles で作ることができる。 system/createBafflesDict
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createBafflesDict;
}
internalFacesOnly true;
baffles
{
baffleFaces
{
type faceZone;
zoneName internalWall;
patches
{
master
{
name internalWall;
type wall;
patchFields
{
p
{
type zeroGradient;
}
U
{
type fixedValue;
value uniform (0 0 0);
}
}
}
slave
{
name internalWall-shadow;
type wall;
patchFields
{
$master.patchFields;
}
}
}
}
}
ここで、"baffleFaces" というのは任意の名前である。type では faceZone と searchableSurface が選べる。上記では faceZone を指定している。ここでは topoSet によりつぎのようなゾーンを作成している。 system/topoSetDict
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
actions
(
{
name internalWall;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.049 0 0) (0.051 0.05 0.01);
}
}
{
name internalWall;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet internalWall;
}
}
);
topoSet を実行するとゾーンができる。 $ topoSet searchableSurface で同様のことを行うには、つぎのようにする。
type searchableSurface;
surface searchablePlate;
origin (0.05 0 0);
span (0 0.05 0.01);
surface には triSurface も選べ、STL を指定できる。 patchespatches では表面と裏面 (master, slave) の設定を行うことができる。境界条件も指定できる。 createBaffles の実行 $ createBaffles -overwrite ![]() 透過面の作成透過面を作るには、createBafflesDict で境界面のタイプを cyclic にすればよい。これは jump 条件に使える。 system/createBafflesDict
patches
{
master
{
name internalWall;
type cyclic;
neighbourPatch internalWall-shadow;
patchFields
{
p
{
type cyclic;
}
U
{
type cyclic;
}
}
}
slave
{
name internalWall-shadow;
neighbourPatch internalWall;
$master;
}
}
ただし、jump 条件を 0/p に設定して "createBaffles -overwrite" を実行すると設定が上書きされてしまうので、jump 条件の設定を createBaffles の後にするか、createBafflesDict の patchFields に直接 jump 条件を書いておくかする。 | |
| PENGUINITIS | |