Conjugate Heat Transfer
Conjugate heat transfer predicts temperatures and heat exchange in a fluid
and the solids in contact with it. The cht_stream module solves the flow
and energy equations on the fluid mesh and the transient heat-conduction
equation on a separate finite-volume mesh for each stationary solid. The
solid calculation accounts for heat spreading through the material, energy
stored as its temperature changes, and prescribed internal heat generation.
The domains exchange information across matching boundary faces. During each time step, the fluid calculation supplies heat flow to the solid calculation, which returns an updated surface temperature. This exchange is repeated until the coupled solution converges, enforcing perfect thermal contact: surface temperatures agree within the specified tolerances, and heat leaving one domain enters the other. The wall temperature and heat transfer are therefore determined by both the fluid conditions and the solid’s thermal response.
See the CHT Theory Guide for the discretization and coupling method. For a finite-element solid, see Loci-FEM Conjugate Heat Transfer.
Basic Coupled Case
This example starts a fluid at 310 K and a solid at 300 K, with adiabatic outer walls. Put these files in the run directory:
case.varsandcase.vog: fluid settings and mesh.solid.varsandsolid.vog: solid settings and mesh.air.mdl: the single-species material model selected bychemistry_model: air.
Load cht_stream in the fluid file and select the solid with
couplingPartner. The fluid file controls time stepping and output cadence;
the solid file supplies materials, boundary conditions, initial temperature
and plot fields. Both domains run in one Stream invocation and MPI rank group.
Solid paths resolve from the fluid case directory. Use distinct case basenames.
Matching Interfaces
Use fixed Cartesian meshes with coordinates in metres and
grid_file_info: <Lref=1 m>. Generate both interface patches from the same
surface discretization so their faces match one to one with opposing outward
normals. Triangular, quadrilateral and general polygonal faces may be used.
The example connects fluid boundary interface to solid boundary maxx.
Their shared label, plate, links noslip(cht=plate) in the fluid to
coupled(name="plate") in the solid. Each remaining boundary is named
minx, miny, maxy, minz or maxz.
Control Files
loadModule: cht_stream
{
// Grid file information
grid_file_info: <Lref=1 m>
// Boundary conditions
boundary_conditions: <
interface=noslip(cht=plate),
minx=noslip(adiabatic),
miny=noslip(adiabatic),
maxy=noslip(adiabatic),
minz=noslip(adiabatic),
maxz=noslip(adiabatic)
>
// Initial conditions
initialCondition: <v=[0 m/s, 0 m/s, 0 m/s], p=101325 Pa, T=310 K>
// Flow properties
flowRegime: laminar
flowCompressibility: compressible
// Equation of state and transport properties
chemistry_model: air
thermodynamic_model: curve_fit
transport_model: const_viscosity
mu: 1.0e-3
kcond: 2.0
// Time-stepping
timeIntegrator: BDF
timeStep: 0.01
numTimeSteps: 10
maxIterationsPerTimeStep: 100
convergenceAbsoluteTolerance: <default=1e-8>
// Momentum equation
momentumEquationOptions: <linearSolver=PETSC, relaxationFactor=0.7, maxIterations=100>
// Pressure correction equation
pressureCorrectionEquationOptions: <linearSolver=PETSC, relaxationFactor=0.3, maxIterations=100>
// Energy equation
energyEquationOptions: <linearSolver=PETSC, relaxationFactor=0.7, maxIterations=100, form=temperature>
// Coupling
couplingPartner: <solver=Stream, case="solid.vars">
couplingControls: <maxIterations=50>
// Printing, plotting, and restart parameters
print_freq: 1
plot_freq: 1
restart_freq: 5
plot_output: t, pg, r, v
}
{
// Boundary conditions
boundary_conditions: <
maxx=coupled(name="plate"),
minx=adiabatic(),
miny=adiabatic(),
maxy=adiabatic(),
minz=adiabatic(),
maxz=adiabatic()
>
// Initial conditions
initialCondition: <T=300 K>
// Material properties
materials: <all=material(density=7800 kg/m/m/m, specificHeat=500 J/kg/K, conductivity=15 W/m/K)>
// Printing, plotting, and restart parameters
plot_output: t
}
Run the Case
Check the interface setup, then advance the solution:
stream -q chtSetup case
stream -q solution case
extract -vtk case 10 t
extract -vtk solid 10 t
The fluid cools and the solid warms. Open the extracted VTK files to view
both temperature fields. For parallel execution, launch the two stream
commands with the site’s MPI launcher.
Solid Setup
Materials
Conductivity controls heat conduction through the solid; density and specific heat determine how much energy is stored as its temperature changes.
Use materials: <all=material(...)> as in the basic example to assign one
material throughout the solid. Properties are constant within each region;
conductivity is isotropic, and material interfaces have perfect thermal contact.
Bare values use SI units.
Option |
SI unit |
Default |
Meaning |
|---|---|---|---|
|
kg/m³ |
Required |
Positive mass density. |
|
J/(kg K) |
Required |
Positive specific heat. |
|
W/(m K) |
Required |
Positive scalar conductivity. |
|
W/m³ |
|
Volumetric heat source; positive heats the solid, negative cools it. |
For multiple materials, use disjoint VOG volume tags covering every solid
cell in place of all:
materials: <metal=material(density=7800, specificHeat=500, conductivity=15), ceramic=material(density=3000, specificHeat=800, conductivity=2)>
Initial Temperature
Set a uniform temperature with initialCondition: <T=300 K>. For a spatial
field, replace it with initialConditionProgram, available directly in the
solid module:
initialConditionProgram: <version=1, parameters=[T0=300 K, slope=10 K/m], base=state(T=expression("T0+slope*x"))>
Use positive temperatures; expressions use solid cell-center coordinates in metres.
Use set overlays to replace T within geometric regions. See
Initial Condition Programs for expressions, named states and selectors.
Boundary Conditions
Specify every solid mesh boundary in boundary_conditions:
Input |
Meaning |
|---|---|
|
Coupled fluid–solid interface; the name matches the fluid wall’s |
|
Zero heat flow. |
|
Prescribed positive surface temperature. |
|
Prescribed outward heat flux. Positive values cool the solid; negative values heat it. |
|
Heat exchange with an exterior reservoir through a resistance per unit area. |
Prescribed values are uniform and constant on each patch. Treservoir is
positive in K and Rwall is positive in K m²/W. For a film coefficient
\(h\), set \(R_{\mathrm{wall}}=1/h\). The outward surface heat flux is
\(q_{s,\mathrm{out}}=(T_b-T_{\mathrm{reservoir}})/R_{\mathrm{wall}}\);
cell-to-surface conduction resistance is included separately.
Fluid Options
CHT requires compressible flow. The solid setup is the same for each fluid
model below. Keep SIMPLEC pressure coupling, select linearSolver=PETSC
for every active fluid equation, and use curve_fit thermodynamics and
const_viscosity transport.
Model |
Setup |
|---|---|
Compressible flow |
Select |
Nonreacting species |
Select a nonreacting material model, supply the
initial mixture and inlet
composition, and set |
Menter turbulence |
Use |
k-epsilon turbulence |
Use |
Turbulent CHT uses compressible flow. For Menter wall functions, set
noslip(cht=plate,wallFunction) on the interface; the wall law uses the
coupled surface temperature.
Time Stepping, Output and Restart
In the fluid file, set a positive fixed timeStep in seconds and a
positive numTimeSteps. Select BDF (default), BDF2 or CN;
see Integration Method for the methods and CNBDFBlend.
All solids share the fluid’s physical time and integrator. BDF2 and CN take
one shared backward-Euler step at a cold start.
Set print_freq, plot_freq and restart_freq, or their _dt
alternatives, in the fluid file using the output cadence options. Both domains write at accepted steps.
Keep plot_modulo and restart_modulo at their default zero values.
touch plot requests a plot of both domains at the next accepted step.
touch stop requests plots, histories and a paired checkpoint, then
stops at that step. maximumRunTime (wall-clock seconds) and
maximumSimulationTime (physical seconds) use the same stop behavior.
Field Output
Select fluid plot_output fields for the active equations:
Field |
Unit |
Meaning |
|---|---|---|
|
K |
Temperature. |
|
Pa |
Gauge pressure, relative to |
|
kg/m³ |
Density. |
|
m/s |
Velocity vector. |
|
J/kg |
Total enthalpy or total energy; select the field for the active energy form. |
|
m²/s² |
Turbulent kinetic energy for an active RANS model. |
|
1/s |
Specific dissipation for a Menter model. |
|
m²/s³ |
Dissipation for a k-epsilon model. |
|
dimensionless |
All transported species mass fractions, written as |
Select plot_output separately in each domain’s file; the solid field is
t. Each domain writes its own geometry and node-projected fields with
its case basename. Use that basename when extracting fields, as in the
basic example, or with stream_auto_extract --casename.
Selecting pg also writes the reference pressure needed to extract P.
Heat Transfer Histories
output/interface.N_case stores these HDF5 fields on fluid interface faces:
Field |
Unit |
Meaning |
|---|---|---|
|
W |
Transferred face power, positive into the solid. |
|
K |
Surface temperature returned by the solid. |
|
m² |
Interface face area. |
Divide power by area for heat flux into the solid. print_freq or
print_freq_dt also writes the following histories for each solid case:
File |
Contents |
|---|---|
|
Total boundary area, heat rate into the solid and area-weighted surface temperature. |
|
The same quantities for each BC type, such as |
|
The same quantities for each named mesh boundary. |
|
Solid thermal energy, volumetric-source power, total boundary heat rate, and minimum/maximum cell temperatures. |
Rows begin with the accepted step number and time in seconds; headers give
column names and units. Heat rates are positive into the solid, opposite to
the outward qwall boundary convention. Thermal energy is
\(\sum_P \rho_P c_{p,P} V_P T_P\) in J.
Heat rates are instantaneous endpoint values. For an energy balance, use the selected method’s time weights as described in the CHT Theory Guide.
Histories append on continuation. Use a fresh output directory when branching from an older checkpoint.
Restart
Continue both domains from step 5 with:
stream -q solution case 5
Keep the complete restart/cht.5_case/ directory. Retain the same MPI rank
count, ordered solid-case list, meshes, interfaces, material files, boundary
conditions, equation physics, timestep, integrator and CNBDFBlend.
numTimeSteps requests additional steps after the checkpoint. Run length,
output cadence, plot fields, convergence tolerances and solver iteration
limits may change. Step numbering and output cadence continue from the
restored step.
Multiple Solids
Give each solid its own control file and VOG mesh. Replace case with
cases in the fluid’s couplingPartner:
couplingPartner: <solver=Stream, cases=["plate.vars", "housing.vars", "insert.vars"]>
Each solid has its own materials, boundaries, initial temperature, equation controls and plot fields. Use distinct basenames for every fluid and solid case, including files in different directories.
Pair every fluid cht label with the corresponding solid coupled label.
A solid may have several coupled patches. All solids share the fluid’s
physical time, output cadence and paired checkpoint.
Coupling Controls
Each physical step is accepted when both domain solves converge and the interface criteria are satisfied.
The fluid’s maxIterationsPerTimeStep limits its nonlinear iterations per
trial; convergenceAbsoluteTolerance and convergenceRelativeTolerance
set its residual criteria. The corresponding solid controls apply to solid
corrections. maxIterations in couplingControls limits interface trials.
Each equation’s maxIterations limits its linear solve.
Interface Matching
Faces are paired geometrically; face and node numbering may differ. The
coordinate tolerance is the greater of 1e-12 m and 1e-10 times the largest
paired face dimension. Use stream -q chtSetup case to check the pairing
before advancing the solution.
Interface Coupling
Set couplingControls in the fluid file. Reduce relaxation if interface
temperatures oscillate or diverge. Increasing maxIterations gives the
interface more trials to reach the requested tolerance.
If the mismatch stalls above tolerance, tighten the fluid energy and solid
convergence tolerances.
Option |
Default |
Meaning |
|---|---|---|
|
|
Positive integer limit on interface trials per physical step. |
|
|
Temperature relaxation factor in |
|
|
Maximum surface-temperature mismatch. |
|
|
Temperature tolerance relative to |
|
|
Positive reference temperature difference. |
|
|
Total interface power-transfer discrepancy. |
|
|
Tolerance relative to the larger sum of absolute face powers on either side. |
|
|
Per-face power-transfer discrepancy divided by face area. |
|
|
Per-face tolerance relative to the larger magnitude of received or applied heat flux. |
Tolerances are nonnegative, with at least one positive value in each absolute/relative pair. Bare values use SI units; explicit units for temperature differences are K. Acceptance uses the larger of the absolute and scaled relative tolerances. For temperature,
Here \(T_b\) is the wall temperature used by the fluid and \(\widehat T_b\) is returned by the solid. The mismatch is evaluated before relaxation. Power tolerances check agreement between the power sent by the fluid and applied to the solid, per face and over the whole interface. A step that fails convergence stops the calculation at the last accepted state.
Solid Equation
Solid defaults suit the basic case. To tighten its absolute energy-residual tolerance, for example, add this to the solid file:
convergenceAbsoluteTolerance: <energy=1e-10 W>
Input |
Default |
Meaning |
|---|---|---|
|
|
Maximum solid correction iterations per interface trial. |
|
|
Positive cell energy-residual tolerance in W. Use |
|
|
Nonnegative tolerance relative to the assembled cell source. Use |
|
|
PETSc relative tolerance, strictly between zero and one. |
|
|
PETSc method; see Appendix: Linear Solvers. Also accepts |
|
|
PETSc preconditioner; availability depends on the PETSc build and MPI configuration. |
energyEquationOptions defaults to linearSolver=PETSC,
form=temperature, relaxationFactor=1 and maxIterations=1000.
The relaxation factor lies in (0,1]. Equation-level
linearSolverTolerance, petscSolverName and petscPreconditionerName
override the corresponding global settings.
Each cell’s energy residual satisfies \(|r_P|\leq\epsilon_{\mathrm{abs}}+\epsilon_{\mathrm{rel}}|b_P|\), where \(b_P\) is the assembled right-hand side in W.
Convergence Reports
CHT_STEP reports the attempted step, old and target times, interface
iteration count, mismatch_K (maximum temperature difference),
mismatch_W (total interface power discrepancy), and accepted (1 or 0).
CHT_RESULT gives the final accepted time, step number ordinal and
number of steps completed in this invocation. CHT_SOLID summarizes solid
energy, boundary heating and temperature bounds on the print cadence.
For solid correction details, add diagnostics: <nonlinearConvergence>
to its control file. SOLID_RESIDUAL reports residual_ratio normalized
by the solid acceptance limits; values at or below one pass.