T721_01 OpenFoam pitzDaily

T721_013 LES pitzDailyMapped

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

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

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

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

引用元

<チュートリアルフォルダ>\incompressible\pisoFoam\LES\pitzDailyMapped

結果図

速度表示 下ベクトル

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

作業

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

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

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

//計算実行//
pisoFoam

//ParaView用VTK変換//
foamToVTK

モデル

設定値の抜粋まとめ

全体構造

//初期フォルダ・ファイル構成
pitzDailyMapped                  
├ 0                       
│ ├ epsilon              
│ ├ k                    
│ ├ nut                  
│ ├ nuTilda              
│ ├ omega                
│ ├ p                    
│ └ U                    
├ constant                
│ ├ transportProperties  :物性値
│ └ turbulenceProperties  :乱流設定
└ system                  
   ├ blockMeshDict        :ブロックメッシュ定義
   ├ controlDict          :解析ジョブ設定
   ├ decomposeParDict     :並列計算設定
   ├ fvSchemes            :ソルバー設定
   ├ fvSolution           :ソルバー設定
   └ streamlines          

0

設定確認 k

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type                mapped;
        value               uniform 2e-05;
        interpolationScheme cell;
        setAverage          false;
        average             2e-05;
    }

    outlet
    {
        type                inletOutlet;
        inletValue          uniform 0;
        value               uniform 0;
    }

    upperWall
    {
        type                fixedValue;
        value               uniform 0;
    }

    lowerWall
    {
        type                fixedValue;
        value               uniform 0;
    }

    frontAndBack
    {
        type                empty;
    }
}

設定確認 nut

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }

    upperWall
    {
        type            zeroGradient;
    }

    lowerWall
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 nuTilda

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type                mapped;
        value               uniform 0;
        interpolationScheme cell;
        setAverage          false;
        average             0;
    }

    outlet
    {
        type                inletOutlet;
        inletValue          uniform 0;
        value               uniform 0;
    }

    upperWall
    {
        type                fixedValue;
        value               uniform 0;
    }

    lowerWall
    {
        type                fixedValue;
        value               uniform 0;
    }

    frontAndBack
    {
        type                empty;
    }
}

設定確認 p

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    upperWall
    {
        type            zeroGradient;
    }

    lowerWall
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

設定確認 U

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type                mapped;
        value               uniform (10 0 0);
        interpolationScheme cell;
        setAverage          true;
        average             (10 0 0);
    }

    outlet
    {
        type                inletOutlet;
        inletValue          uniform (0 0 0);
        value               uniform (0 0 0);
    }

    upperWall
    {
        type                fixedValue;
        value               uniform (0 0 0);
    }

    lowerWall
    {
        type                fixedValue;
        value               uniform (0 0 0);
    }

    frontAndBack
    {
        type                empty;
    }
}

constant

設定確認 transportProperties

transportModel  Newtonian;

nu              1e-05;

設定確認 turbulenceProperties

simulationType      LES;

LES
{
    LESModel        kEqn;

    turbulence      on;

    printCoeffs     on;

    delta           cubeRootVol;

    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }

    PrandtlCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }

        smoothCoeffs
        {
            delta           cubeRootVol;
            cubeRootVolCoeffs
            {
                deltaCoeff      1;
            }

            maxDeltaRatio   1.1;
        }

        Cdelta          0.158;
    }

    vanDriestCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }

        smoothCoeffs
        {
            delta           cubeRootVol;
            cubeRootVolCoeffs
            {
                deltaCoeff      1;
            }

            maxDeltaRatio   1.1;
        }

        Aplus           26;
        Cdelta          0.158;
    }

    smoothCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }

        maxDeltaRatio   1.1;
    }
}

system

設定確認 blockMeshDict

scale   0.001;

vertices
(
    (-70 0 -0.5)
    (-70 25.4 -0.5)
    (0 -25.4 -0.5)
    (0 0 -0.5)
    (0 25.4 -0.5)
    (206 -25.4 -0.5)
    (206 0 -0.5)
    (206 25.4 -0.5)
    (290 -16.6 -0.5)
    (290 0 -0.5)
    (290 16.6 -0.5)

    (-70 0 0.5)
    (-70 25.4 0.5)
    (0 -25.4 0.5)
    (0 0 0.5)
    (0 25.4 0.5)
    (206 -25.4 0.5)
    (206 0 0.5)
    (206 25.4 0.5)
    (290 -16.6 0.5)
    (290 0 0.5)
    (290 16.6 0.5)
);

negY
(
    (2 4 1)
    (1 3 0.3)
);

posY
(
    (1 4 2)
    (2 3 4)
    (2 4 0.25)
);

posYR
(
    (2 1 1)
    (1 1 0.25)
);

blocks
(
    hex (0 3 4 1 11 14 15 12)
    (70 30 1)
    simpleGrading (1 $posY 1)

    hex (2 5 6 3 13 16 17 14)
    (180 27 1)
    edgeGrading (4 4 4 4 $negY 1 1 $negY 1 1 1 1)

    hex (3 6 7 4 14 17 18 15)
    (180 30 1)
    edgeGrading (4 4 4 4 $posY $posYR $posYR $posY 1 1 1 1)

    hex (5 8 9 6 16 19 20 17)
    (25 27 1)
    simpleGrading (2.5 1 1)

    hex (6 9 10 7 17 20 21 18)
    (25 30 1)
    simpleGrading (2.5 $posYR 1)
);

boundary
(
    inlet
    {
        type mappedPatch;
        offset          (0.0495 0 0);
        sampleRegion    region0;
        sampleMode      nearestCell;
        samplePatch     none;

        faces
        (
            (0 1 12 11)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (8 9 20 19)
            (9 10 21 20)
        );
    }
    upperWall
    {
        type wall;
        faces
        (
            (1 4 15 12)
            (4 7 18 15)
            (7 10 21 18)
        );
    }
    lowerWall
    {
        type wall;
        faces
        (
            (0 3 14 11)
            (3 2 13 14)
            (2 5 16 13)
            (5 8 19 16)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (0 3 4 1)
            (2 5 6 3)
            (3 6 7 4)
            (5 8 9 6)
            (6 9 10 7)
            (11 14 15 12)
            (13 16 17 14)
            (14 17 18 15)
            (16 19 20 17)
            (17 20 21 18)
        );
    }
);

設定確認 controlDict

application     pisoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.1;

deltaT          1e-05;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    probes
    {
        type            probes;
        libs            (sampling);
        writeControl    timeStep;
        writeInterval   1;

        fields
        (
            p
        );

        probeLocations
        (
            (0.0254 0.0253 0)
            (0.0508 0.0253 0)
            (0.0762 0.0253 0)
            (0.1016 0.0253 0)
            (0.127 0.0253 0)
            (0.1524 0.0253 0)
            (0.1778 0.0253 0)
        );
    }

    fieldAverage1
    {
        type            fieldAverage;
        libs            (fieldFunctionObjects);
        writeControl    writeTime;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

            p
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }

    // Sample near-wall velocity
    surfaceSampling
    {
        type            surfaces;
        libs            (sampling);
        writeControl    onEnd;

        interpolationScheme cellPoint;

        surfaceFormat vtk;

        // Fields to be sampled
        fields
        (
            U
        );

        surfaces
        {
            nearWall
            {
                type            patchInternalField;
                patches         ( lowerWall );
                distance        1E-6;
                interpolate     true;
                triangulate     false;
            }
        }
    }
}

設定確認 decomposeParDict

numberOfSubdomains 8;

method          scotch;

設定確認 fvSchemes

ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss LUST grad(U);

    turbulence      Gauss limitedLinear 1;
    div(phi,k)      $turbulence;
    div(phi,nuTilda) $turbulence;
    div(phi,B)      $turbulence;
    div(B)          Gauss linear;

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

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

設定確認 fvSolution

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

    pFinal
    {
        $p;
        smoother        DICGaussSeidel;
        tolerance       1e-6;
        relTol          0;
    };

    "(U|k|B|nuTilda)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
}

コメント

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