How do I apply a wall thermal boundary condition in OpenFOAM?

Our Training fully explains OpenFOAM's wall thermal boundary conditions

See Training

6.6 Thermal boundary conditions

For solutions involving thermal energy, boundary conditions are required for the temperature field eqn in the 0/T file. While conventional conditions can be used at inlet and outlet patches, e.g. fixedValue and zeroGradient, respectively, the following bespoke conditions are available for wall patches.

  • externalTemperature: models heat transfer at an external wall, with various options to specify the heat flux.

  • coupledTemperature: models heat transfer between regions (fluid or solid) in a conjugate heat transfer simulation.

The externalTemperature condition, illustrated in Figure 6.5 , can include one or more of the following heat fluxes.

  • Prescribed power Q (W) or power flux q (W meqn).

  • Thermal radiation from inside the domain, qr specifies the radiation field name.

  • Convective heat transfer with a coefficient h and ambient temperature Ta, both a Function1 of time.

  • The coefficient h can alternatively be configured using a specialised externalWallLayersHeatTransferCoefficient field function, which can emulate conduction through additional layers of material on the outside of the wall patch.

  • External thermal radiation with a specified emissivity.


PICT\relax \special {t4ht=


Figure 6.5: The externalTemperature boundary condition.


The foamInfo script provides further details and examples of the use of the externalTemperature condition.


    foamInfo externalTemperature
The following example shows the use with a straightforward heat transfer coefficient h.


    wall
    {
        type    externalTemperature;
        Ta      constant 300;
        h       constant 10;
        value   uniform  400;
    }
The example below demonstrates the externalWallLayersHeatTransferCoefficient field function which includes conduction through layers of material. The conducting layers are described by a list of thicknesses and corresponding conductivities via the thicknessLayers and kappaLayers lists, respectively.


    wall
    {
        type    externalTemperature;
        Ta      constant 300;
        h
        {
            type             externalWallLayersHeatTransferCoefficient;
            h                10.0;
            thicknessLayers  (0.1 0.2 0.3 0.4);
            kappaLayers      (1 2 3 4);
        }
        value   uniform  400;
    }

The coupledTemperature condition calculates the heat flux between regions in a conjugate heat transfer simulation. It is shown in Figure 6.6 with regions labelled 1 and 2. The condition is applied at the interface patches of both regions. If we imagine the condition applied to region 1 in the figure, qr specifies the name of the variable for thermal radiation from within region 1, and qrNbr is the name of the variable in the neighbour region, i.e. region 2.


PICT\relax \special {t4ht=


Figure 6.6: The coupledTemperature boundary condition.


The condition is similar it externalTemperature and can include additional conducting layers at the interface between the regions, e.g. to simulate a contact material, contaminant, liquid film, etc. The conducting layers are specified by the wallLayersHeatTransferCoefficient field function which includes the thicknessLayers and kappaLayers parameters. An example of a coupledTemperature condition with conducting layers is shown below.


    wall
    {
        type    coupledTemperature;
        h
        {
            type             wallLayersHeatTransferCoefficient;
            thicknessLayers  (0.1 0.2 0.3 0.4);
            kappaLayers      (1 2 3 4);
        }
        value   uniform  400;
    }
The conducting layers are implemented as a field function so that they can be extending to cases where the layer thickness is non-uniform. This is demonstrated in the example case in the $FOAM_TUTORIALS/multiRegion/CHT/thermalBending, which uses a specialised displacementGapHeatTransferCoefficient field function which models a gap of non-uniform thickness between two regions, due to a displacement of one region due to thermal bending.
OpenFOAM v14 User Guide - 6.6 Thermal boundary conditions
OpenFOAM User Guide