OpenFoamのサンプル確認(パラメータやキーワードの覚書)です。
チュートリアルフォルダ:チュートリアル場所(windows)
次ページ:メッシュの置き換え
ベース
バージョン : Windows版(OpenFOAM-v2106-windows-mingw.exe)
引用元
<チュートリアルフォルダ>\multiphase\interFoam\laminar\damBreak\damBreak
結果図
気相、液相のモデルになります。
作業
基本的な流れはT703 OpenFoam tipsと同じです。(または作業)
//チュートリアルからサンプルをコピーしておきます。// //0.origから0へ(.org削除) //コマンド:メッシュ作成 blockMesh //コマンド実行 setFields //計算実行// interFoam //ParaView用VTK変換// foamToVTK
モデル
設定値の抜粋まとめ
全体構造
//初期フォルダ・ファイル構成 damBreak ├ 0.orig │ ├ alpha.water │ ├ p_rgh │ └ U ├ constant │ ├ g │ ├ transportProperties :物性値 │ └ turbulenceProperties ├ system │ ├ blockMeshDict :ブロックメッシュ定義 │ ├ controlDict :解析ジョブ設定 │ ├ decomposeParDict :未使用(win) │ ├ fvSchemes :ソルバー設定 │ ├ fvSolution :ソルバー設定 │ ├ sampling │ └ setFieldsDict ├ Allclean └ Allrun
0.orig
設定確認 alpha.water
dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { leftWall { type zeroGradient; } rightWall { type zeroGradient; } lowerWall { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } defaultFaces { type empty; } }
p_rgh
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { leftWall { type fixedFluxPressure; value uniform 0; } rightWall { type fixedFluxPressure; value uniform 0; } lowerWall { type fixedFluxPressure; value uniform 0; } atmosphere { type totalPressure; p0 uniform 0; } defaultFaces { type empty; } }
U
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { leftWall { type noSlip; } rightWall { type noSlip; } lowerWall { type noSlip; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } defaultFaces { type empty; } }
constant
g
dimensions [0 1 -2 0 0 0 0]; value (0 -9.81 0);
設定確認 transportProperties
phases (water air); water { transportModel Newtonian; nu 1e-06; rho 1000; } air { transportModel Newtonian; nu 1.48e-05; rho 1; } sigma 0.07;
turbulenceProperties
simulationType laminar;
system
設定確認 blockMeshDict
scale 0.146; vertices ( (0 0 0) (2 0 0) (2.16438 0 0) (4 0 0) (0 0.32876 0) (2 0.32876 0) (2.16438 0.32876 0) (4 0.32876 0) (0 4 0) (2 4 0) (2.16438 4 0) (4 4 0) (0 0 0.1) (2 0 0.1) (2.16438 0 0.1) (4 0 0.1) (0 0.32876 0.1) (2 0.32876 0.1) (2.16438 0.32876 0.1) (4 0.32876 0.1) (0 4 0.1) (2 4 0.1) (2.16438 4 0.1) (4 4 0.1) ); blocks ( hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) ); edges ( ); boundary ( leftWall { type wall; faces ( (0 12 16 4) (4 16 20 8) ); } rightWall { type wall; faces ( (7 19 15 3) (11 23 19 7) ); } lowerWall { type wall; faces ( (0 1 13 12) (1 5 17 13) (5 6 18 17) (2 14 18 6) (2 3 15 14) ); } atmosphere { type patch; faces ( (8 20 21 9) (9 21 22 10) (10 22 23 11) ); } ); mergePatchPairs ( );
設定確認 controlDict
application interFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 1; deltaT 0.001; writeControl adjustable; writeInterval 0.05; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 1; maxAlphaCo 1; maxDeltaT 1; #sinclude "sampling"
decomposeParDict
numberOfSubdomains 4; method simple; coeffs { n (2 2 1); }
設定確認 fvSchemes
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; }
設定確認 fvSolution
solvers { "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 1; cAlpha 1; MULESCorr yes; nLimiterIter 5; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; } "pcorr.*" { solver PCG; preconditioner DIC; tolerance 1e-5; relTol 0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } p_rghFinal { $p_rgh; relTol 0; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; relTol 0; } } PIMPLE { momentumPredictor no; nOuterCorrectors 1; nCorrectors 3; nNonOrthogonalCorrectors 0; } relaxationFactors { equations { ".*" 1; } }
sampling
functions { sampleSets { type sets; libs (sampling); writeControl timeStep; writeInterval 1; setFormat vtk; interpolationScheme cellPointFace; fields ( alpha.water ); sets ( gauge_1 { type face; axis y; start (0.02 0.20 0.005); end (0.02 0.25 0.005); nPoints 100; } gauge_2 { type face; axis y; start (0.2 0.03 0.005); end (0.2 0.55 0.005); nPoints 100; } ); } }
設定確認 setFieldsDict
defaultFieldValues ( volScalarFieldValue alpha.water 0 ); regions ( boxToCell { box (0 0 -1) (0.1461 0.292 1); fieldValues ( volScalarFieldValue alpha.water 1 ); } );
その他
次ページ以降
コメント