Heat transfer#

This tutorial goes over how to define boundary conditions for heat transfer simulations.

Objectives:

  • Define homogenous temperature boundary conditions

  • Define heat flux boundary conditions

Imposing homogenous temperature boundary conditions#

The temperature can be imposed on boundaries using FixedTemperatureBC:

/home/docs/checkouts/readthedocs.org/user_builds/festim-workshop/conda/latest/lib/python3.12/site-packages/festim/coupled_heat_hydrogen_problem.py:1: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)
  import tqdm.autonotebook

To define the temperature as space or time dependent, a function can be passed to the value argument, such as:

\[ \text{BC} = 10 + x^2 + t \]
from festim import FixedTemperatureBC, SurfaceSubdomain

boundary = SurfaceSubdomain(id=1)
BC = lambda x, t: 10 + x[0]**2 + t

my_bc = FixedTemperatureBC(subdomain=boundary, value=BC)

Imposing heat flux boundary conditions#

Heat fluxes can be imposed on boundaries using HeatFluxBC, which can depend on space, time, and temperature, such as:

\[ \text{BC} = 2x + 10t + T \]
from festim import HeatFluxBC, SurfaceSubdomain

boundary = SurfaceSubdomain(id=1)
BC = lambda x, t, T: 2 * x[0] + 10 * t + T

my_flux_bc = HeatFluxBC(subdomain=boundary, value=BC)

Note

Read more about heat transfer settings here.