OpenFoamのサンプル確認(パラメータやキーワードの覚書)です。
バージョン : Windows版(OpenFOAM-v2206-windows-mingw.exe)
ベース
チュートリアルフォルダ:チュートリアル場所(windows)
引用元
<チュートリアルフォルダ>\multiphase\twoLiquidMixingFoam\lockExchange
結果図
密度の異なる液体の混合です。赤:密度1000 青:密度990
作業
基本的な流れはT703 OpenFoam tipsと同じです。(または作業)
//チュートリアルからサンプルをコピーしておきます。// //0.origから0へ(.org削除) //コマンド:メッシュ作成 blockMesh //コマンド実行 setFields //計算実行// twoLiquidMixingFoam //ParaView用VTK変換// foamToVTK
全体構造
//初期フォルダ・ファイル構成 lockExchange ├ 0.orig │ ├ alpha.sludge │ ├ p_rgh │ └ U ├ constant │ ├ g │ ├ transportProperties │ └ turbulenceProperties ├ system │ ├ blockMeshDict │ ├ controlDict │ ├ fvSchemes │ ├ fvSolution │ └ setFieldsDict ├ Allclean └ Allrun
0.orig
alpha.sludge
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(left|right|bottom|top)"
{
type zeroGradient;
}
frontBack
{
type empty;
}
}
p_rgh
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(left|right|bottom|top)"
{
type fixedFluxPressure;
}
frontBack
{
type empty;
}
}
U
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
"(left|right|bottom|top)"
{
type slip;
}
frontBack
{
type empty;
}
}
constant
g
dimensions [0 1 -2 0 0 0 0]; value (0 -9.81 0);
transportProperties
Dab 1e-06;
alphatab 1;
phases (sludge water);
sludge
{
transportModel Newtonian;
nu 1e-06;
rho 1000;
}
water
{
transportModel Newtonian;
nu 1e-06;
rho 990;
}
turbulenceProperties
simulationType laminar;
system
blockMeshDict
scale 1;
vertices
(
(0 0 0)
(10 0 0)
(10 2 0)
(0 2 0)
(0 0 2)
(10 0 2)
(10 2 2)
(0 2 2));
blocks
(
hex (0 1 2 3 4 5 6 7) (200 40 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
left
{
type wall;
faces
(
(0 4 7 3)
);
}
right
{
type wall;
faces
(
(1 5 6 2)
);
}
bottom
{
type wall;
faces
(
(0 1 5 4)
);
}
top
{
type wall;
faces
(
(3 2 6 7)
);
}
frontBack
{
type empty;
faces
(
(0 1 2 3)
(4 5 6 7)
);
}
);
mergePatchPairs
(
);
controlDict
application twoLiquidMixingFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 100; deltaT 0.05; writeControl adjustable; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep on; maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1;
fvSchemes
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(rhoPhi,U) Gauss linear;
div(phi,alpha) Gauss vanLeer;
div(phi,k) Gauss limitedLinear 1;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fvSolution
solvers
{
"alpha.sludge.*"
{
nAlphaSubCycles 2;
nAlphaCorr 1;
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-9;
relTol 0;
nSweeps 1;
}
p_rgh
{
solver GAMG;
tolerance 1e-7;
relTol 0.01;
smoother GaussSeidel;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.1;
nSweeps 1;
}
UFinal
{
$U;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefValue 0;
pRefPoint (0.1 0.1 1);
}
setFieldsDict
defaultFieldValues
(
volScalarFieldValue alpha.sludge 0
volVectorFieldValue U (0 0 0)
);
regions
(
boxToCell
{
box (0 0 0) (5 2 2);
fieldValues
(
volScalarFieldValue alpha.sludge 1
);
}
);
コメント