メッシュの結合2013年8月24日 | |
はじめに複数のメッシュを結合する方法について。 使用バージョンOpenFOAM 2.2.1 ファイル
モデルicoFoam のチュートリアルケース cavity をふたつにわけ、結合する。結合面でメッシュが一致する場合としない場合について考える。 とりあえず合体mergeMeshes で複数のメッシュを合体できる。たとえば、ケース cavity1 と ケース cavity2 のメッシュを合体するには、つぎのようにすればよい。 $ cp -r cavity1 cavity12 $ mergeMeshes -overwrite cavity12 cavity2 メッシュの結合メッシュが一致する場合stitchMesh を使うstitchMesh で面をくっつけることができる。 $ stitchMesh -overwrite internalWallRight internalWallLeft cyclic を使う結合面の境界タイプを cyclic にすれば、両者をつなぐことができる。changeDictionary を使うなら、つぎのようにする。 system/changeDictionaryDict
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
boundary
{
internalWallRight
{
type cyclic;
neighbourPatch internalWallLeft;
}
internalWallLeft
{
type cyclic;
neighbourPatch internalWallRight;
}
}
}
// ************************************************************************* //
実行 $ changeDictionary メッシュが一致しない場合stitchMesh を使うstitchMesh で面をくっつけることができる。 $ stitchMesh -overwrite internalWallRight internalWallLeft ![]() cyclicAMI を使う結合面の境界タイプを cyclicAMI (AMI: Arbitrary Mesh Interface) にすれば、両者をつなぐことができる。changeDictionary を使うなら、つぎのようにする。 system/changeDictionaryDict
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
boundary
{
internalWallRight
{
type cyclicAMI;
neighbourPatch internalWallLeft;
}
internalWallLeft
{
type cyclicAMI;
neighbourPatch internalWallRight;
}
}
}
// ************************************************************************* //
実行 $ changeDictionary ![]() cyclic, cyclicAMI では、結合面のメッシュのずれの大きさによっては、matchTolerance を設定する必要が生じる場合がある。 | |
| PENGUINITIS | |