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

// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.
internalFacesOnly true;


// Baffles to create.
baffles
{
    baffleFacesThermoBaffle1D
    {
        //- Use predefined faceZone to select faces and orientation.
        type        faceZone;
        zoneName    baffleFaces;


        //- Optional flip
        //flip        false;

        patches
        {
            master
            {
                //- Master side patch
                name            baffle1Wall_0;

                type            mappedWall;
                sampleMode      nearestPatchFace;
                sampleRegion    region0;
                samplePatch     baffle1Wall_1;
                offsetMode      uniform;
                offset          (0 0 0);


                patchFields
                {
                    T
                    {
                        type   compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
                        baffleActivated yes;
                        thickness       uniform 0.005;  // thickness [m]
                        Qs              uniform 100;    // heat flux [W/m2]
                        specie
                        {
                            nMoles          1;
                            molWeight       20;
                        }
                        transport
                        {
                            kappa           1;
                        }
                        thermodynamics
                        {
                            Hf              0;
                            Cp              10;
                        }
                        equationOfState
                        {
                            rho             10;
                        }

                        value               uniform 300;
                    }

                    alphat
                    {
                        type            compressible::alphatWallFunction;
                        value           uniform 0;
                    }
                    epsilon
                    {
                        type            compressible::epsilonWallFunction;
                        value           uniform 0.01;
                    }
                    k
                    {
                        type            compressible::kqRWallFunction;
                        value           uniform 0.01;
                    }
                    mut
                    {
                        type            mutkWallFunction;
                        value           uniform 0;
                    }
                    p
                    {
                        type            calculated;
                        value           uniform 101325;
                    }
                    p_rgh
                    {
                        type            fixedFluxPressure;
                    }
                    U
                    {
                        type            fixedValue;
                        value           uniform (0 0 0);
                    }
                }
            }
            slave
            {
                //- Slave side patch
                name            baffle1Wall_1;

                type            mappedWall;
                sampleMode      nearestPatchFace;
                sampleRegion    region0;
                samplePatch     baffle1Wall_0;
                offsetMode      uniform;
                offset          (0 0 0);

                patchFields
                {
                    ${...master.patchFields}
                }
            }
        }
    }
}


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