Expand description
Layer 5 (small solver) — steady heat conduction with a volumetric source,
the steady form of laplacianFoam, with radial and voxel meshers, a
closed-form verification reference and an energy balance (gh:#949).
§Steady heat conduction with a volumetric source (gh:#949)
A small steady conduction solver: the steady form of OpenFOAM’s
laplacianFoam,
-div( k(T) grad T ) = q''' in the solidwith a per-zone uniform heat source q''' (W/m^3), a per-zone
conductivity k(T) (W/(m K)) supplied by the caller, and one thermal
condition per boundary patch: adiabatic, fixed temperature, or convective
(-k dT/dn = h (T - T_ambient)).
It exists for the beginner thermal profile of outram-mc-libs
(gh:#949, under #945): a coarse temperature field for any shape, with an
energy balance (heat generated against heat leaving through the
boundary) reported beside it. Serious thermal-hydraulics is nee_soon’s.
§What is ported, and what is new
| piece | source |
|---|---|
the equation, fvm::laplacian(k, T) == source | laplacianFoam.C (TEqn), run steady (ddt dropped, as with ddtSchemes steadyState) |
the convective boundary as a mixed (Robin) condition, valueFraction = h/(h + k/d), refValue = T_a | externalWallHeatFluxTemperatureFvPatchScalarField.C (hp without radiation or solid layers) |
k(T) re-evaluated between outer passes (Picard) | the outer simple.loop() of laplacianFoam, here with k updated each pass (upstream’s DT is constant) |
face conductivity as series resistance, A / (d_P/k_P + d_N/k_N) | OpenFOAM’s harmonic interpolation (schemes/harmonic/harmonic.H: 1/reverseLinear(1/k)), chosen over the default Gauss linear, which averages k linearly and is wrong at a material interface |
| energy balance from the boundary condition definitions, not from the matrix | new here |
| radial (slab / cylinder / sphere) and voxel meshers | new here (mesh) |
§The energy balance, and what it can catch
The heat leaving each boundary face is recomputed from that face’s own
condition (h, T_a, k of its cell, the face distance) and the solved
cell temperature, independently of the assembled matrix. In a correct
finite-volume solve the interior fluxes cancel pairwise, so generated minus
removed equals the sum of the linear-solver residuals: it is small by
construction. Its job is to catch an assembly that drops or doubles a
boundary contribution (a zero boundary conductivity was such a defect
elsewhere in this workspace; see outram-foam-appbuilder-lib’s
thermo_mechanics::mesh_solve) and an unconverged solve. It does not
measure discretisation error; the closed-form tests in this module do.
§Verification
closed_form is the exact solution for uniform q''' in nested slab,
cylinder and sphere shells with a fixed-temperature or convective surface.
The tests in tests.rs compare the solve against it and measure the
convergence order; the methodology and results are in their doc comments.
Status: untrusted AI-generated draft (2026-10-17) per RESPONSIBLE_USE.md.
For research, education and V&V only.
Re-exports§
pub use closed_form::RadialClosedForm;pub use closed_form::RadialLayer;pub use mesh::radial_mesh;pub use mesh::voxel_mesh;pub use mesh::ConductionMesh;pub use mesh::RadialGeometry;pub use mesh::RadialShell;pub use mesh::VoxelGrid;pub use mesh::VoxelMesh;
Modules§
- closed_
form - Exact steady temperature for uniform heat generation in nested slab, cylinder and sphere shells: the verification reference for the finite-volume solve (gh:#949).
- mesh
- Meshes for the steady conduction solver (gh:#949).
Structs§
- Energy
Balance - Heat generated in the body against heat leaving through its boundary.
- Patch
Condition - A
ThermalBoundaryapplied to one mesh patch, with an optional per-face film-area fraction. - Steady
Conduction Problem - A steady conduction problem: a mesh, the heat source of each zone and the condition on each patch.
- Steady
Conduction Settings - Iteration controls. The defaults converge the energy balance to about
1e-10of the generated power on the meshes in this module’s tests. - Steady
Conduction Solution - The solved steady temperature and its energy balance.
Enums§
- Steady
Conduction Error - What can go wrong setting up or solving a steady conduction problem.
- Thermal
Boundary - The thermal condition on one boundary patch.