T721_02 Cavity

T721_029 rhoPimpleFoam RAS Cavity

この記事は約14分で読めます。

OpenFoamのサンプル確認(パラメータやキーワードの覚書)です。

バージョン : Windows版(OpenFOAM-v2106-windows-mingw.exe)

チュートリアルフォルダ:チュートリアル場所(windows)

引用元

<チュートリアルフォルダ>\compressible\rhoPimpleFoam\RAS

結果図

流速結果

流体速度のモデルになります。

作業

基本的な流れはT703 OpenFoam tipsと同じです。(または作業

//チュートリアルからサンプルをコピーしておきます。//

//コマンド:メッシュ作成
blockMesh

//計算実行//
rhoPimpleFoam

//ParaView用VTK変換//
foamToVTK

モデル

設定値の抜粋まとめ

endTimeを10に変更

全体構造

//初期フォルダ・ファイル構成
cavity                                             
├ 0                                               
│ ├ alphat                                       
│ ├ epsilon                                      
│ ├ k                                            
│ ├ nut                                          
│ ├ omega                                        
│ ├ p                                            
│ ├ T                                            
│ └ U                                            
├ constant                                        
│ ├ thermophysicalProperties   :物性値          
│ └ turbulenceProperties                         
└ system                                          
   ├ blockMeshDict           :ブロックメッシュ定義
   ├ controlDict                :解析ジョブ設定  
   ├ fvSchemes                  :ソルバー設定    
   └ fvSolution                 :ソルバー設定    

0

設定確認 alphat

dimensions      [1 -1 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    movingWall
    {
        type            compressible::alphatWallFunction;
        Prt             0.85;
        value           uniform 0;
    }

    fixedWalls
    {
        type            compressible::alphatWallFunction;
        Prt             0.85;
        value           uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 epsilon

dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 0.000765;

boundaryField
{
    movingWall
    {
        type            epsilonWallFunction;
        value           $internalField;
    }

    fixedWalls
    {
        type            epsilonWallFunction;
        value           $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 k

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.00325;

boundaryField
{
    movingWall
    {
        type            kqRWallFunction;
        value           uniform 0.00325;
    }

    fixedWalls
    {
        type            kqRWallFunction;
        value           uniform 0.00325;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 nut

dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    movingWall
    {
        type            nutkWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0;
    }

    fixedWalls
    {
        type            nutkWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 omega

dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 2.6;

boundaryField
{
    movingWall
    {
        type            omegaWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 2.6;
    }

    fixedWalls
    {
        type            omegaWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform 2.6;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 p

//ファイル:p//

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 100000;

boundaryField
{
    movingWall
    {
        type            zeroGradient;
    }

    fixedWalls
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 T

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    movingWall
    {
        type            zeroGradient;
    }

    fixedWalls
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 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;
    }
}

constant

設定確認 thermophysicalProperties

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        molWeight   28.9;
    }
    thermodynamics
    {
        Cp          1007;
        Hf          0;
    }
    transport
    {
        mu          1.84e-05;
        Pr          0.7;
    }
}

設定確認 turbulenceProperties

simulationType          RAS;

RAS
{
    RASModel            kOmegaSST;

    turbulence          on;

    printCoeffs         on;
}

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
(
);

設定確認 controlDict

endTimeを変更

application     rhoPimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         10;

deltaT          0.01;

writeControl    runTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     binary;

writePrecision  10;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;

maxCo           0.3;

maxDeltaT       1;

設定確認 fvSchemes

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss limitedLinearV 1;
    div(U)          Gauss linear;

    div(phid,p)     Gauss limitedLinear 1;
    div(phi,K)      Gauss linear;
    div(phi,h)      Gauss limitedLinear 1;

    turbulence      Gauss limitedLinear 1;
    div(phi,k)      $turbulence;
    div(phi,epsilon) $turbulence;
    div(phi,R)      $turbulence;
    div(phi,omega)  $turbulence;
    div((rho*R))    Gauss linear;
    div(R)          Gauss linear;

    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear orthogonal;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         orthogonal;
}

wallDist
{
    method          meshWave;
}

設定確認 fvSolution

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.01;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "rho.*"
    {
        $p;
        tolerance       1e-05;
        relTol          0;
    }

    "(U|h|R|k|epsilon|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0.1;
    }

    "(U|h|R|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 1;
    nCorrectors     2;
    finalOnLastPimpleIterOnly   true;
    nNonOrthogonalCorrectors 0;

    pMax            1.2e5;
    pMin            0.8e5;
}

コメント

Translate »
タイトルとURLをコピーしました