openfoamquest

OpenFOAMや流体解析の使い方を紹介しています

OpenFOAM v2012 averageNeighbour tetra mesh test

 

openfoamquest.hatenablog.jp

OpenFOAM v2012の機能を確認。

https://www.openfoam.com/releases/openfoam-v2012/numerics.php#numerics-runtime-geometry-selection

averageNeighbourというものがあります。

Google翻訳によると

*******************************************************************

averageNeighbourスキームは、四面体および高アスペクト比のプリズム境界層メッシュに非常に効果的です。これらは、トランケーションエラーとアライメントのために、プリズム境界層で非常に高い非直交角を持っている可能性があります。

*******************************************************************

四面体に非常に効果がありそうです。

過去記事でテトラメッシュの設定方法を記載したので、これで比較してみました。

openfoamquest.hatenablog.jp

チュートリアル mesh/snappyHexMesh/airfoilWithLayersの
fvSchemesとfvSolutionをコピーして貼り付け後

fvSchemesを編集します。

fvSchemes

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
FoamFile
{
   version 2;
   format ascii;
   class dictionary;
   object fvSchemes;
}

ddtSchemes
{
   default steadyState;
}

gradSchemes
{
   default Gauss linear;
   grad(p) Gauss linear;
   unlimitedGrad(U) Gauss linear;
}

divSchemes
{
   default none;
   div(phi,U) bounded Gauss linearUpwindV unlimitedGrad(U);
   turbulence bounded Gauss limitedLinear 1;
   div(phi,k) bounded Gauss limitedLinear 1;
   div(phi,omega) bounded Gauss limitedLinear 1;
   div(phi,nuTilda) bounded Gauss limitedLinear 1;
   div(phi,epsilon) bounded Gauss limitedLinear 1;
   div(phi,phit) bounded Gauss limitedLinear 1;
   div(phi,f) bounded Gauss limitedLinear 1;
   div(phi,gammaInt) bounded Gauss linearUpwind grad;
   div(phi,ReThetat) bounded Gauss linearUpwind grad;
   div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
   default Gauss linear limited corrected 0.33;
}

interpolationSchemes
{
   default linear;
}

snGradSchemes
{
   default limited corrected 0.33;
}

wallDist
{
   method meshWave;
}

geometry
{
   type highAspectRatio;
   minAspect 10;
   maxAspect 100;
}


// ************************************************************************* //

fvSolution

\*---------------------------------------------------------------------------*/
FoamFile
{
   version 2.0;
   format ascii;
   class dictionary;
   object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
   p
   {
     solver GAMG;
     smoother GaussSeidel;
     tolerance 1e-06;
     relTol 0.1;
   }

  "(U|k|omega|nuTilda|gammaInt|ReThetat)"
   {
     solver smoothSolver;
     smoother symGaussSeidel;
     tolerance 1e-08;
     relTol 0.1;
     maxIter 50;
   }

  "(epsilon|phit)"
   {
     solver PBiCGStab;
     preconditioner DILU;
     tolerance 1e-8;
     relTol 0;
   }

  f
  {
     solver PBiCGStab;
     preconditioner DIC;
     tolerance 1e-8;
     relTol 0;
   }
}

SIMPLE
{
   nNonOrthogonalCorrectors 0;
   consistent true;
   convergence 1e-5;
}

relaxationFactors
{
   equations
   {
     ".*" 0.9;
     "(gammaInt|ReThetat|k|nuTilda)" 0.8;
     "(phit|f)" 0.7;
     epsilon 0.5;
   }
}


// ************************************************************************* //

fvSchemesのgeometryのtypeをaverageNeighbourに変更します。

コードを確認すると

nIters、relax、minRatioの設定がいるようですが

デフォルト設定でnItersは1、minRatioは0.5になるようです。

relaxは0より大きく1以下のため、今回は1にしてみました。

geometry
{
  type averageNeighbour;
  minAspect 10;
  maxAspect 100;
  relax 1;
}

 

v2006 過去記事の残差

f:id:openfoamquest:20210103223308p:plain

 

 v2012 今回の残差

 

f:id:openfoamquest:20210103213601p:plain

今までは収束しづらかったのが残差も改善されて、

公式通りに非常に効果がありそうです。

ただ乱流モデルkEpsilonでは結果がよくなかったため、今後に期待。

 当分は以下の方法がよさそう。

openfoamquest.hatenablog.jp