OpenFoamのサンプル確認(パラメータやキーワードの覚書)です。
バージョン : Windows版(OpenFOAM-v2106-windows-mingw.exe)
チュートリアルフォルダ:チュートリアル場所(windows)
引用元
<チュートリアルフォルダ>\heatTransfer\buoyantBoussinesqSimpleFoam\hotRoom
結果図
流体速度のモデルになります。
作業
基本的な流れはT703 OpenFoam tipsと同じです。(または作業)
//チュートリアルからサンプルをコピーしておきます。// //0.origから0へ(.org削除) //コマンド:メッシュ作成 blockMesh //コマンド実行 setFields //計算実行// buoyantBoussinesqSimpleFoam //ParaView用VTK変換// foamToVTK
モデル
設定値の抜粋まとめ
全体構造
//初期フォルダ・ファイル構成 hotRoom ├ 0.orig │ ├ alphat │ ├ epsilon │ ├ k │ ├ nut │ ├ p │ ├ p_rgh │ ├ T │ └ U ├ constant │ ├ g │ ├ transportProperties :物性値 │ └ turbulenceProperties ├ system │ ├ blockMeshDict :ブロックメッシュ定義 │ ├ controlDict :解析ジョブ設定 │ ├ fvSchemes :ソルバー設定 │ ├ fvSolution :ソルバー設定 │ └ setFieldsDict ├ Allclean └ Allrun
0.orig
設定確認 alphat
dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { floor { type alphatJayatillekeWallFunction; Prt 0.85; value uniform 0; } ceiling { type alphatJayatillekeWallFunction; Prt 0.85; value uniform 0; } fixedWalls { type alphatJayatillekeWallFunction; Prt 0.85; value uniform 0; } }
epsilon
dimensions [0 2 -3 0 0 0 0]; internalField uniform 0.01; boundaryField { floor { type epsilonWallFunction; value uniform 0.01; } ceiling { type epsilonWallFunction; value uniform 0.01; } fixedWalls { type epsilonWallFunction; value uniform 0.01; } }
k
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.1; boundaryField { floor { type kqRWallFunction; value uniform 0.1; } ceiling { type kqRWallFunction; value uniform 0.1; } fixedWalls { type kqRWallFunction; value uniform 0.1; } }
nut
dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { floor { type nutkWallFunction; value uniform 0; } ceiling { type nutkWallFunction; value uniform 0; } fixedWalls { type nutkWallFunction; value uniform 0; } }
設定確認 p
//ファイル:p// dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { floor { type calculated; value $internalField; } ceiling { type calculated; value $internalField; } fixedWalls { type calculated; value $internalField; } }
p_rgh
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { floor { type fixedFluxPressure; rho rhok; value uniform 0; } ceiling { type fixedFluxPressure; rho rhok; value uniform 0; } fixedWalls { type fixedFluxPressure; rho rhok; value uniform 0; } }
T
dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { floor { type fixedValue; value nonuniform List<scalar> 400 ( 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 600 600 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 600 600 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 ) ; } ceiling { type fixedValue; value uniform 300; } fixedWalls { type zeroGradient; } }
設定確認 U
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { floor { type noSlip; } ceiling { type noSlip; } fixedWalls { type noSlip; } }
constant
g
dimensions [0 1 -2 0 0 0 0]; value (0 -9.81 0);
設定確認 transportProperties
transportModel Newtonian; // Laminar viscosity nu 1e-05; // Thermal expansion coefficient beta 3e-03; // Reference temperature TRef 300; // Laminar Prandtl number Pr 0.7; // Turbulent Prandtl number Prt 0.85;
turbulenceProperties
simulationType RAS; RAS { RASModel kEpsilon; turbulence on; printCoeffs on; }
system
設定確認 blockMeshDict
scale 1; vertices ( (0 0 0) (10 0 0) (10 5 0) (0 5 0) (0 0 10) (10 0 10) (10 5 10) (0 5 10) ); blocks ( hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1) ); edges ( ); boundary ( floor { type wall; faces ( (1 5 4 0) ); } ceiling { type wall; faces ( (3 7 6 2) ); } fixedWalls { type wall; faces ( (0 4 7 3) (2 6 5 1) (0 3 2 1) (4 5 6 7) ); } ); mergePatchPairs ( );
設定確認 controlDict
application buoyantBoussinesqSimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1000; deltaT 1; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true;
設定確認 fvSchemes
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phi,T) bounded Gauss upwind; turbulence bounded Gauss upwind; div(phi,k) $turbulence; div(phi,epsilon) $turbulence; div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; }
設定確認 fvSolution
solvers { p_rgh { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0.01; } "(U|T|k|epsilon|R)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; residualControl { p_rgh 1e-2; U 1e-4; T 1e-2; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; } } relaxationFactors { fields { p_rgh 0.7; } equations { U 0.3; T 0.5; "(k|epsilon|R)" 0.7; } }
設定確認 setFieldsDict
defaultFieldValues ( volScalarFieldValue T 300 ); regions ( boxToFace { box (4.5 -1000 4.5) (5.5 1e-5 5.5); fieldValues ( volScalarFieldValue T 600 ); } );
コメント