Loci-FEM Conjugate Heat Transfer
The cht_fem module couples Stream fluid heat transfer to conduction in
a Loci-FEM solid. Use a Stream build configured with
--fem-dir /path/to/Loci-FEM/install. Build both solvers against the same
Loci SDK and shared LociNativeCoupling package.
Basic Coupled Case
Start with the basic CHT fluid file and its mesh and
air.mdl. Keep its laminar, single-species compressible flow, temperature
energy form, BDF time integration and PETSc equation solvers. Replace the
module loading and coupling entries with:
loadModule: cht_fem
{
// Coupling
couplingPartner: <solver=LociFEM, case="solid.vars">
couplingInterfaces: <plate=thermal(fluidBoundary=interface, solidBoundary=maxx)>
}
The fluid boundary remains interface=noslip(cht=plate). Use an affine
tetrahedral solid mesh with coordinates in metres. Its interface triangles
must match the fluid faces one to one with opposing outward normals;
see interface matching.
The following solid.vars uses volume tags left and right in
solid.vog. The coupled patch is maxx; all other boundaries are adiabatic.
The fluid file controls the physical timestep, run length and output cadence
for both domains. Put the solid files beside the fluid files.
{
// Grid file information
meshFile: "solid.vog"
// Boundary conditions
boundary_conditions: <
maxx=heatFlux(provider=coupled),
minx=adiabatic,
miny=adiabatic,
maxy=adiabatic,
minz=adiabatic,
maxz=adiabatic
>
// Initial conditions
initialCondition: <temperature=300 K>
// Material properties
heatMaterials: <
left=conduction(k=15 W/m/K, capacity=3.9e6 J/m/m/m/K),
right=conduction(k=15 W/m/K, capacity=3.9e6 J/m/m/m/K)
>
// Finite element discretization
temperatureSpace: P1
volumeQuadratureDegree: 4
// Heat equation
heatEquationOptions: <mode=transient, timeIntegrator=BDF, residualAbsoluteTolerance=1e-5 W>
// Plot fields
plot_output_exclusive: temperature, heatFlux
}
The patch named by solidBoundary must be the patch marked
heatFlux(provider=coupled). It receives fluid heat flow and returns the
average surface temperature on each matching face. Interface iteration uses
couplingControls from the fluid file; see Interface Coupling.
Check the setup, then run:
stream -q chtSetup case
stream -q solution case
Fluid fields use the usual extraction commands. The solid viewing files
are listed in output/solid/frame.10.txt after step 10.
Solid Options
Materials and Boundaries
conduction(...) uses conductivity k in W/(m K) and volumetric heat
capacity capacity in J/(m³ K), equal to density times mass-specific heat.
Material entries select disjoint volume tags covering the solid. For
volumetric heating, add heatSources: <volumetric=100 W/m/m/m>.
Use these conditions on exterior solid patches:
Input |
Meaning |
|---|---|
|
Zero heat flow. |
|
Prescribed absolute surface temperature. |
|
Prescribed outward heat flux; positive values cool the solid. |
Discretization and Solvers
temperatureSpace selects P1 or P2 (default) temperature
coefficients. fieldSpace selects the viewing space and defaults to
temperatureSpace. Transient heat transfer requires
volumeQuadratureDegree of 4 or 6; surfaceQuadratureDegree defaults to 4.
Use heatEquationOptions for FEM tolerances. Choose
residualAbsoluteTolerance in W for the solid’s heat-flow scale.
Option |
Default |
Meaning |
|---|---|---|
|
|
Absolute thermal residual tolerance. |
|
|
Relative thermal residual tolerance. |
|
|
Relative linear-solver tolerance. |
|
|
Absolute linear-solver tolerance. |
For named PETSc overrides in PETSCSolverControls, the coupled equation
is solid_heat.
Output and Restart
Select solid fields with plot_output or plot_output_exclusive in
solid.vars. temperature is in K; heatFlux is the conductive vector
\(-k\nabla T\) in W/m². FEM writes the selected fields and viewing mesh
under output/solid/; frame.N.txt lists the files at step N.
The interface output records transferred power,
surface temperature and face area. Use its power field to inspect interface
exchange; the FEM heatFlux field is reconstructed from the temperature
gradient.
Continue both domains from step 5 with:
stream -q solution case 5
Keep the entire restart/cht.5_case/ directory and follow the
paired restart requirements. Retain the FEM temperature
space, materials, boundaries and quadrature settings. numTimeSteps in
the fluid file requests additional steps after restart.