壁面熱流束の計算

2015年10月10日

はじめに

壁面熱流束の計算について。

使用バージョン

OpenFOAM 2.4.0

壁面熱流束の計算

計算結果からの計算

計算結果から壁面熱流束の計算をするには、ユーティリティ wallHeatFlux を使う。

$ wallHeatFlux -latestTime

マルチリージョンの場合は、オプション "-region" でリージョンを指定する。

計算中のモニタリング

計算中に壁面熱流束をモニターすることを考える。chtMultiRegionSimpleFoam のチュートリアルケースの multiRegionHeaterRadiation を用いる。function object をつぎのように設定する。

system/controlDict

libs
(
    "libutilityFunctionObjects.so"
);

functions
{
    wallHeatFlux
    {
        type coded;
        redirectType wallHeatFlux;
        region topAir;

        codeInclude
        #{
            #include "basicThermo.H"
            #include "turbulenceModel.H"
            #include "wallFvPatch.H"
        #};

        codeOptions
        #{
            -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
            -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude
        #};

        code
        #{
            const basicThermo& thermo =
                mesh().lookupObject<basicThermo>("thermophysicalProperties");

            const compressible::turbulenceModel& turbulence =
                mesh().lookupObject<compressible::turbulenceModel>(
                    "turbulenceModel"
                );

            const volScalarField& h = thermo.he();

            surfaceScalarField heatFlux
            (
                fvc::interpolate
                (
                    turbulence.alphaEff()
                )*fvc::snGrad(h)
            );

            const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
                heatFlux.boundaryField();

            Info<< "\nWall heat fluxes [W]" << endl;
            forAll(patchHeatFlux, patchi)
            {   
                if (isA<wallFvPatch>(mesh().boundary()[patchi]))
                {   
                    Info<< mesh().boundary()[patchi].name()
                        << " " 
                        << gSum
                            (   
                                mesh().magSf().boundaryField()[patchi]
                                *patchHeatFlux[patchi]
                            )   
                        << endl;
                }   
            }   
            Info<< endl;
        #};

        outputControl timeStep;
        outputInterval 1;
    }
}

計算結果はつぎのようになる。

Time = 2000

...

Wall heat fluxes [W]
maxY 0
minZ 0
maxZ 0
topAir_to_rightSolid 5.668651
topAir_to_heater 1.823996
topAir_to_leftSolid 7.328825

wallHeatFlux を用いた場合はつぎのようになる。

$ wallHeatFlux -region topAir -latestTime

Wall heat fluxes [W]
maxY 0
minZ 0
maxZ 0
topAir_to_rightSolid 5.628206
topAir_to_heater 1.814757
topAir_to_leftSolid 7.282286