Conjugate Heat Transfer
The cht_stream module couples fluid heat transfer to heat conduction in
stationary solids. Each solid has its own finite-volume mesh, material
properties and temperature field. It can store heat, conduct it and
generate it internally.
At the shared boundary, the fluid supplies heat flow and the solid returns a surface temperature. The solvers repeat this exchange within each time step until the interface solution converges. Solids can also exchange heat through contact boundaries.
A Fluid and Solid Case
Air starts at 310 K and the solid at 300 K. All outer walls are adiabatic.
Initial temperatures and boundary conditions.
Meshes and Interfaces
Use separate, fixed meshes with matching faces along the shared boundary. Face and node numbering may differ.
Control Files
The fluid control file is case.vars, with mesh case.vog.
Load cht_stream and select the solid file with couplingPartner.
The wall option cht=plate pairs the fluid boundary with
coupled(name="plate") in the solid file.
loadModule: cht_stream
{
// 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
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
}
The solid control file is solid.vars, with mesh solid.vog.
{
// 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
}
The fluid file controls the fixed time step, run length and integration
scheme for both domains. Select BDF (default), BDF2 or CN as
described in Integration Method.
To check interface matching and solid material and heat-source assignments before running:
stream -q chtSetup case
The report appears in the terminal. This message confirms that the setup check passed:
CHT_SETUP: checked matching interface ready
One Stream run advances both domains:
stream -q solution case
Viewing Results
The fluid and solid write separate results under the case names case
and solid. Extract temperature at time step 10 with:
extract -vtk case 10 t
extract -vtk solid 10 t
Open both VTK datasets in ParaView to view temperature across the fluid and solid domains.
Solid Setup
Materials
Use materials: <all=material(...)> for a uniform solid. Each material specifies
density in kg/m³, specificHeat in J/(kg K), and isotropic conductivity in W/(m K).
Bare values are assumed to use SI units. Properties remain fixed during a simulation.
For several materials in one mesh, replace all with VOG volume tags.
The tags must cover the solid without overlap:
materials: <
metal=material(density=7800, specificHeat=500, conductivity=15),
ceramic=material(density=3000, specificHeat=800, conductivity=2)
>
Cells that share an interior face are assumed to have perfect thermal contact. To reuse a material,
name it in materialDefinitions and assign it to the volume tags. The example below shows how to
specify a materialDefinitions entry.
materialDefinitions: <steel=material(density=7800, specificHeat=500, conductivity=15)>
materials: <
housing=steel,
cover=steel,
insert=material(base=steel, conductivity=2 W/m/K)
>
material(base=steel, ...) overrides selected properties of steel.
Spatial Properties
Use materialProgram in place of materials for coordinate expressions
or regions defined in the run control file. Its base supplies properties
throughout the solid. The sample below varies conductivity with x.
materialProgram: <
version=1,
parameters=[k0=15 W/m/K, slope=10 W/m/m/K],
base=material(density=7800, specificHeat=500, conductivity=expression("k0+slope*x"))
>
To change a property within a region, use a set overlay:
materialProgram: <
version=1,
base=material(density=7800, specificHeat=500, conductivity=15),
overlays=[
set(name=insert,
where=box(min=[0 m, 0 m, 0 m], max=[0.1 m, 1 m, 1 m]),
fields=fields(conductivity=2 W/m/K))
]
>
Later overlays take precedence where they overlap. A material definition like base=steel can be used like
before to reuse a named material. An overlay can use material=steel to assign
all three properties before applying its fields overrides. Expressions and geometric
selectors use solid cell-center coordinates to decide if a cell is enclosed/considered.
See Initial Condition Programs for their syntax.
Solid Boundary Conditions
The table below shows the different boundary conditions that can be specified in the solid’s
run control file boundary_conditions section.
Input |
Meaning |
|---|---|
|
Fluid interface; |
|
|
|
Zero heat flow. |
|
Prescribed surface temperature. |
|
Outward heat flux. Positive values cool the solid; negative values heat it. |
|
Heat exchange with a reservoir through a resistance per unit area. |
Prescribed values are uniform and constant on each boundary patch. For a film coefficient \(h\), a valueu of \(R_{\mathrm{wall}}=1/h\) can be set.
Initial Temperature
For a uniform solid, use initialCondition: <T=300 K>. For a spatial
temperature field, replace it with initialConditionProgram:
initialConditionProgram: <
version=1,
parameters=[T0=300 K, slope=10 K/m],
base=state(T=expression("T0+slope*x"))
>
The initial-condition program syntax also provides named states and regional overrides.
Heat Sources
For uniform heating in a material region, add source to its assignment:
materials: <
all=material(density=7800, specificHeat=500, conductivity=15, source=100 W/m/m/m)
>
For a heater placed independently of the material regions, use
heatSources instead of material source entries:
heatSources: <
version=1,
sources=[source(name=heater, where=volumeTag(heater), power=5 W)]
>
Each source specifies either a volumetric value in W/m³ or a total
power in W. Total power is spread uniformly over the selected volume.
Positive values heat the solid; negative values cool it. Overlapping
sources add.
Select cells with all, volumeTag(name), or the
geometric selectors.
Geometric selections use cell centers. chtSetup reports each source’s
selected volume and total power.
For heating that varies with position, use an expression:
heatSources: <
version=1,
parameters=[q0=1e6 W/m/m/m, L=0.1 m],
sources=[source(name=heater, where=volumeTag(heater), value=expression("q0*(1+x/L)"))]
>
Sources remain fixed in time. Use heatSources with either materials
or materialProgram.
Multiple Solids
For situations where there are multiple solids, give each solid its own control file
and VOG mesh. In the fluid file, replace case with cases:
couplingPartner: <solver=Stream, cases=["housing.vars", "insert.vars"]>
Each solid has its own materials, boundaries, initial temperature and plot fields. Paths resolve from the fluid case directory. Use distinct fluid and solid basenames, even for files in different directories.
Pair each fluid cht label with its solid coupled label.
A solid may have several fluid interfaces.
Solid Contacts
A solid can pass heat to another solid through a contact boundary. For example, a housing can connect the fluid to a buried insert. Define the contact in the fluid file:
solidContacts: <housing_insert=contact(resistance=0.01 K*m*m/W)>
Give the two solid boundaries the same contact name:
insert_surface=contact(name="housing_insert")
housing_surface=contact(name="housing_insert")
The contact boundaries must have matching faces as described under Meshes and Interfaces. Contact resistance is uniform and fixed, in K m²/W. Its default is zero for perfect contact. A nonzero resistance produces a temperature jump proportional to heat flux.
Each connected group of solids needs a fluid interface.
Species and Turbulence
The solid setup is the same for each fluid model. The fluid energy
equation may use temperature, totalEnthalpy or totalEnergy;
see energyEquationOptions.
Model |
Setup |
|---|---|
Nonreacting species |
Use a nonreacting material model, the mixture inputs
and |
Menter turbulence |
Use |
k-epsilon turbulence |
Use |
For Menter wall functions, use noslip(cht=plate, wallFunction).
The wall law uses the coupled surface temperature.
Results and Restart
The fluid file controls output timing and file retention for all domains.
Field Output
Choose plot_output separately in each domain’s file.
The solid fields are t (K), density (kg/m³),
specificHeat (J/(kg K)), conductivity (W/(m K)) and
volumetricSource (W/m³). For example:
plot_output: t, conductivity, volumetricSource
For the fluid, choose from t, pg, r, v, the active energy
field (h or e), turbulence fields (k, omega or epsilon),
and mixture. See field definitions.
mixture writes species mass fractions as f<species> scalars.
Selecting pg also allows extraction of absolute pressure as P.
Heat Transfer Histories
At the print cadence, each solid writes its heat rates and thermal energy.
For a solid case named solid, the files are:
File |
Contents |
|---|---|
|
Thermal energy, source power, boundary heat rate and temperature bounds. |
|
Total boundary area, inward heat rate and mean surface temperature. |
|
The same quantities for a named boundary. |
|
The same quantities for a boundary type, such as |
File headers give the columns and units. Heat rates are positive into the
solid, opposite to the outward qwall boundary convention. Surface
temperatures are area-weighted means.
For per-face results, output/interface.N_case contains HDF5 fields
power (W), temperature (K) and area (m²) on the fluid interface.
N is the plot filename suffix. Power is positive into the solid; divide
by area for heat flux.
Heat rates are instantaneous values. Use the time-integration weights in the CHT Theory Guide when forming an energy balance.
Restart
Restart the fluid and solids together from saved checkpoint 5:
stream -q solution case 5
Keep the complete restart/cht.5_case/ directory and use the same MPI
rank count, ordered solid list, meshes, physical inputs and time-integration
settings. Run length, output settings and convergence controls may change;
numTimeSteps requests additional steps.
Histories append on continuation. Use a fresh output directory when branching from an older checkpoint.
Convergence Controls
If interface temperatures oscillate, reduce relaxation in the fluid’s
couplingControls. If the temperature mismatch keeps falling but reaches
the iteration limit, increase maxIterations. If it stalls above
tolerance, tighten the fluid energy and solid residual tolerances.
Use convergence reports to inspect the iterations.
Interface Coupling
couplingControls sets the interface iteration in the fluid file.
For example, to reduce relaxation and allow more exchanges:
couplingControls: <maxIterations=60, relaxation=0.3>
Option |
Default |
Meaning |
|---|---|---|
|
|
Maximum coupling iterations per time step. |
|
|
Surface-temperature relaxation factor in |
|
|
Maximum surface-temperature mismatch. |
|
|
Temperature tolerance relative to |
|
|
Reference temperature difference for the relative tolerance. |
|
|
Total interface power discrepancy. |
|
|
Tolerance relative to the larger sum of absolute face powers on either side. |
|
|
Per-face heat-flux discrepancy. |
|
|
Per-face tolerance relative to the larger received or applied heat-flux magnitude. |
Each criterion uses the larger of its absolute and scaled relative tolerances. Set either tolerance to zero to use only the other. Temperature mismatch is measured before relaxation.
Solid Solver
In the solid file, maxIterationsPerTimeStep limits correction iterations
within each coupling exchange. It defaults to 100. The solid
convergenceAbsoluteTolerance is a cell energy-residual tolerance in W.
To tighten it:
convergenceAbsoluteTolerance: <energy=1e-10 W>
Its default is <default=1e-9>; convergenceRelativeTolerance defaults
to <default=1e-12>. Both accept energy or default.
The CHT Theory Guide defines the residual and its scaling.
The solid’s energyEquationOptions defaults to linearSolver=PETSC,
form=temperature, relaxationFactor=1 and maxIterations=1000.
It uses GMRES with Jacobi preconditioning and linearSolverTolerance=1e-13.
See Appendix: Linear Solvers for solver options.
Solids joined by contacts share their linear-solver settings, relaxation factor and correction limit. Their energy-residual tolerances may differ.
Convergence Reports
Console messages named CHT_STEP show progress at the print cadence;
CHT_RESULT gives the final time and step count.
To see coupling details, add this to the fluid file:
diagnostics: <cht>
CHT_STEP then reports every step’s exchanges, mismatch_K (maximum
temperature difference) and mismatch_W (total interface power
discrepancy). CHT_SOLID summarizes each solid at the print cadence;
CHT_SOLID_REGION reports region volumes and source powers at startup.
History files are written regardless of this diagnostic setting.
Add nonlinearConvergence to the fluid diagnostics list for its inner
residuals, for example diagnostics: <cht, nonlinearConvergence>.
In a solid file, diagnostics: <nonlinearConvergence> prints
SOLID_RESIDUAL. Its residual_ratio is scaled by the solid tolerance;
values at or below one satisfy that tolerance.