/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2606                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     thermoFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         200;

deltaT          1;

writeControl    timeStep;

writeInterval   100;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


functions
{
    wallHeatFlux1
    {
        type            wallHeatFlux;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;
        writeInterval   1;
        patches         (".*wall.*"); // 計算したい壁面パッチ名（例: inner_wall outer_wall）
        writeFields     true;         // 0/等に wallHeatFlux 場を出力する
    }

    sampleLine
    {
        type            sets;
        libs            ("libsampling.so");
        // 書き出しのタイマコントロール（writeTime = 結果出力フォルダ作成時）
        writeControl    writeTime;
        // 出力フォーマットの設定 (raw, gnuplot, csv, vtk から選択)
        setFormat       raw; // raw: テキストファイル, csv: CSV形式
        // 挿入補間（セル中心の値をライン上に内挿する方法）
        interpolationScheme cellPoint;
        // 評価したい変数（ここでは G フィールドを指定）
        fields          (G);
        // ラインの定義
        sets
        {
            lineG
            {
                type        uniform;
                axis        distance;
                // サンプリング線の始点と終点
                start       (0 0.05 0.05);  // (x1 y1 z1)
                end         (1 0.05 0.05);  // (x2 y2 z2)
                // ライン上の分割点数（データポイント数）
                nPoints     101;
            }
        }
    }

}


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