OpenFoamのサンプル確認(パラメータやキーワードの覚書)です。
バージョン : Windows版(OpenFOAM-v2106-windows-mingw.exe)
チュートリアルフォルダ:チュートリアル場所(windows)
引用元
<チュートリアルフォルダ>\preProcessing\createZeroDirectory\cavity
結果図

流体速度のモデルになります。
作業
基本的な流れはT703 OpenFoam tipsと同じです。(または作業)
//チュートリアルからサンプルをコピーしておきます。// //コマンド:メッシュ作成 blockMesh //0フォルダの作成 createZeroDirectory //計算実行// icoFoam //ParaView用VTK変換// foamToVTK
モデル
設定値の抜粋まとめ
全体構造
//初期フォルダ・ファイル構成 cavity ├ constant │ └ transportProperties :物性値 ├ system │ ├ blockMeshDict :ブロックメッシュ定義 │ ├ caseProperties │ ├ controlDict :解析ジョブ設定 │ ├ fvSchemes :ソルバー設定 │ ├ fvSolution :ソルバー設定 ├ Allclean └ Allrun
0 コマンドで作成される
設定確認 p
//ファイル:p//
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0;
boundaryField
{
movingWall
{
type zeroGradient;
}
fixedWalls
{
type zeroGradient;
}
frontAndBack
{
type empty;
value uniform 0;
}
}
設定確認 u
dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform ( 0 0 0 );
boundaryField
{
movingWall
{
type fixedValue;
value uniform ( 1 0 0 );
}
fixedWalls
{
type fixedValue;
value uniform ( 0 0 0 );
}
frontAndBack
{
type empty;
value uniform ( 0 0 0 );
}
}
constant
設定確認 transportProperties
nu 0.01;
system
設定確認 blockMeshDict
scale 0.1;
vertices
(
(0 0 0)
(1 0 0)
(1 1 0)
(0 1 0)
(0 0 0.1)
(1 0 0.1)
(1 1 0.1)
(0 1 0.1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
movingWall
{
type wall;
faces
(
(3 7 6 2)
);
}
fixedWalls
{
type wall;
faces
(
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
);
mergePatchPairs
(
);
設定確認 caseProperties
initialConditions
{
U uniform (0 0 0);
p uniform 0;
}
boundaryConditions
{
topWall
{
category wall;
patches (movingWall);
type noSlip;
options
{
wallFunction highReynolds;
motion moving;
};
values
{
U uniform (1 0 0);
}
}
walls
{
category wall;
patches (fixedWalls);
type noSlip;
options
{
wallFunction highReynolds;
motion stationary;
};
}
}
設定確認 controlDict
deltaTを変更
application icoFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 0.005; deltaT 0.005; //変更 writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true;
設定確認 fvSchemes
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear orthogonal;
laplacian((1|A(U)),p) Gauss linear orthogonal;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default orthogonal;
}
設定確認 fvSolution
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.05;
}
pFinal
{
$p;
relTol 0;
}
U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0;
}
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
コメント