Heat conduction

Steady heat conduction with the thermal compliance as objective. The conductivity outside the conductor is called kmin (a void, H0 and H3) or k0 (a second conductor, the volume-to-point problem) here, and Emin in build_heat and bench_case (the name of the bank for the void). The rows of the fixed table are described on the Benchmarks page, with the rule for comparing methods (LUSolver, backend :compiled; "–" marks what a row does not have). The SVG figures are written to the results folder by each script; the ones shown here are copies in docs/src/assets/benchmarks.

Heat conduction with a flux on the boundary (H0 and H3)

Steady conduction on the unit square, k = kmin + (1 − kmin) ρ³ (densities) or kmin + (1 − kmin) χ (the level set), kmin = 1e-3, volume fraction 0.4, the objective the thermal compliance J = ∫ q T dΓ (self-adjoint), rmin = 0.04, τ = 2e-4, the six methods of the bank with their defaults. H0 is the thermal problem of GridapTopOpt (Wegert et al. 2024): T = 0 on x = 0 for y ≤ 0.2 and y ≥ 0.8, a flux density 1 entering on x = 1 for |y − ½| ≤ 0.1; mesh 100 × 100. H3 has one sink, T = 0 on x = 0 for |y − ½| ≤ 0.05, and a total flux 1 entering through three patches of width 0.2 at the middle of the other three sides; mesh 200 × 200. No published value of J exists (GridapTopOpt gives the setup, not J): the reference is density SiMPL, P0, on the same mesh, and in H0 also the mesh (see the mesh study). Rule: J_bin within 5 % for every row. validation/heat_flux.jl.

heat H0, 100 × 100 (H0: sink on x = 0 for y ≤ 0.2 and y ≥ 0.8, flux density 1 on x = 1 for |y − ½| ≤ 0.1)

variantJJ_binvs ref (J_bin)perimeterholesV_bin (½)iterations
density OC, P00.1279180.11462+0.34 %4.5400.399635 (converged)
density OC, P10.1281770.114622+0.35 %4.5400.401235 (converged)
density SiMPL, P00.1267960.114227+0.00 %4.400.400426 (converged)
density SiMPL, P10.1270970.114333+0.09 %4.3800.400824 (converged)
reaction–diffusion level set, Ersatz()0.1132320.114149-0.07 %4.7800.399655 (converged)
reaction–diffusion density0.1175820.113859-0.32 %4.600.401248 (converged)

The six designs of H0 on 100 × 100 read as 0/1 keeping the volume, the reference (density SiMPL, P0) first

heat H3, 200 × 200 (H3: sink on x = 0 for |y − ½| ≤ 0.05, total flux 1 through three patches of width 0.2)

variantJJ_binvs ref (J_bin)perimeterholesV_bin (½)iterations
density OC, P01.973151.80107+0.50 %4.3900.399937 (converged)
density OC, P11.974551.80103+0.49 %4.3900.401236 (converged)
density SiMPL, P01.967111.79219+0.00 %4.4700.400628 (converged)
density SiMPL, P11.967231.79284+0.04 %4.4900.400729 (converged)
reaction–diffusion level set, Ersatz()1.790261.82373+1.76 %4.4600.400051 (converged)
reaction–diffusion density1.843231.79178-0.02 %4.4700.398934 (converged)

The six designs of H3 on 200 × 200 read as 0/1 keeping the volume, the reference (density SiMPL, P0) first

In H0 the six methods are within 0.7 % without changing any option, and every one stops with its default stop: one concentrated heat input, two thick arms, no fine scale. H3 is a trident whose three arms share the material: the density methods and the reaction–diffusion density are within 0.5 %, and the level set is 1.8 % above with its own J (1.790, with Ersatz()) below every other J_bin. The difference is the reading of its cut cells: the whole heat goes through the sink, a neck of width 0.1, and with the contrast 1e3 half a cut cell of conductor more or less there changes J by a few percent. In the probes that chose the setup (on the Validation page) the gap closed with the mesh and with the contrast, not with τ. Spreading the flux over a whole side or over many small patches brought back the fine scale of a uniform source: those setups need a study of the minimum length scale and are not in the bank; a uniform source with a contrast that the mesh resolves is the volume-to-point case below.

The fixed report table:

Apple M5 Max, 4 threads, Julia 1.13.0 · commit 3b98442 · 2026-11-30 17:25.

casevariantJJ_binrefvs refVV_bingreyperimeterholesiterationssolves state/adjoint/filter/steptime (s)time ÷ state solves (s)
heat H0 100×100density OC, P00.1279180.114620.114227+0.34 % (J_bin)0.40000.40000.1314.54035 (converged, objective_range)36/0/71/01.00.0283
heat H0 100×100density OC, P10.1281770.1146220.114227+0.35 % (J_bin)0.40000.40000.1334.54035 (converged, objective_range)36/0/71/00.90.0253
heat H0 100×100density SiMPL, P0 (reference)0.1267960.1142270.114227+0.00 % (J_bin)0.40000.40000.1274.4026 (converged, objective_range)30/0/56/00.70.0234
heat H0 100×100density SiMPL, P10.1270970.1143330.114227+0.09 % (J_bin)0.40000.40000.1304.38024 (converged, objective_range)43/0/67/00.90.0218
heat H0 100×100reaction–diffusion level set, Ersatz()0.1132320.1141490.114227-0.07 % (J_bin)0.40000.40000.0264.78055 (converged, all)56/0/0/551.60.028
heat H0 100×100reaction–diffusion density0.1175820.1138590.114227-0.32 % (J_bin)0.40010.40000.0554.6048 (converged, all)49/0/0/481.20.0236
heat H3 200×200density OC, P01.973151.801071.79219+0.50 % (J_bin)0.40000.40000.1234.39037 (converged, objective_range)38/0/75/02.80.0734
heat H3 200×200density OC, P11.974551.801031.79219+0.49 % (J_bin)0.40000.40000.1244.39036 (converged, objective_range)37/0/73/03.00.0815
heat H3 200×200density SiMPL, P0 (reference)1.967111.792191.79219+0.00 % (J_bin)0.40000.40000.1264.47028 (converged, objective_range)30/0/58/02.40.0813
heat H3 200×200density SiMPL, P11.967231.792841.79219+0.04 % (J_bin)0.40000.40000.1264.49029 (converged, objective_range)32/0/61/02.30.0721
heat H3 200×200reaction–diffusion level set, Ersatz()1.790261.823731.79219+1.76 % (J_bin)0.40010.40000.0114.46051 (converged, all)52/0/0/514.10.0792
heat H3 200×200reaction–diffusion density1.843231.791781.79219-0.02 % (J_bin)0.39990.40000.0454.47034 (converged, all)35/0/0/342.50.0718

Volume-to-point heat conduction (Bejan 1997)

The classical tree: the unit square generates heat uniformly (q = 1, total 1) and is insulated except for a short sink, T = 0 on y = 0 for |x − ½| ≤ 0.05; a fraction 0.2 of a good conductor (k = 1) is laid out in a poor one (k0 = 1e-2, a second material: contrast 100) to minimise J = ∫ q T dΩ, which is the mean temperature; SIMP p = 3, rmin = 0.02 (2 cells), τ = 2e-4, mesh 100 × 100. The problem goes back to Bejan (1997); the topology optimisation version is the heat code of the book of Bendsøe and Sigmund (2003), which is not distributed with the open codes (top88 and top3d refer to the book for it) and uses a sensitivity filter that HyperShape does not have: no published J is reproduced. Contrast 100 and volume 0.2 give a tree of about ten branches that the mesh resolves (with a contrast of 1e3 the branches were thinner than the mesh: Validation page). Three references:

  • a reference driver in Octave written for the bank (validation/data/vtp: its CSV files and a description of the algorithm detailed enough to write it again; the driver is not in the repository): Q1 elements, one density per cell, the cell mean of the Helmholtz-filtered density as in top88, OC with move 0.2, stop at max|Δx| ≤ 0.01. The row "P0, cell mean, OC as top88" is HyperShape with that formulation (CellMean(dΩ) ∘ HelmholtzFilter, OC(adapt = nothing), StopCriteria(change_tol = 0.01)): rule J within 1 % (another code, the same discretisation and formulation). It is a second implementation of the same algorithm, not a published value;
  • between methods, density SiMPL, P0: J_bin within 5 % for density SiMPL P1 and the reaction–diffusion density (Δt = 0.1: with the default step neither reaction–diffusion row stops, as in the inverter);
  • the mesh (informative).

Density OC and the reaction–diffusion level set are informative rows, and so is density SiMPL P0 with a tanh projection (β from 1 to 16, doubling every 40 iterations). validation/heat_vtp.jl.

variantroleJJ_binvs refperimeterholesgreyiterations
reference driver in Octavereference of the implementation3.260423.10695–7.4600.121490
P0, cell mean, OC as top88rule (1 % on J)3.260423.10693-0.00 % (J)7.500.121491 (converged)
density OC, P0informative3.472433.39223+40.55 % (J_bin)7.100.116119 (converged)
density OC, P1informative3.342693.26747+35.38 % (J_bin)6.9800.120226 (converged)
density SiMPL, P0reference between methods2.702642.41349+0.00 % (J_bin)9.4600.14872 (converged)
density SiMPL, P1rule (5 %)2.661832.40572-0.32 % (J_bin)8.500.14580 (converged)
reaction–diffusion level set, Ersatz(), Δt = 0.1informative2.547282.76084+14.39 % (J_bin)6.5200.03975 (converged)
reaction–diffusion density, Δt = 0.1rule (5 %)2.437972.32543-3.65 % (J_bin)8.600.103112 (converged)
density SiMPL, P0, TanhProjection β = 1 → 16 every 40 iterationsinformative2.161192.19147-9.20 % (J_bin)10.8800.063175 (converged)

The volume-to-point designs on 100 × 100 read as 0/1 keeping the volume: the driver in Octave (the reference) and the row of HyperShape that reproduces it, the design with projection, then the six methods with their reference (density SiMPL, P0)

The formulation of the driver is reproduced: J −0.0002 % after 491 iterations against 490 (the history of HyperShape is shifted by one, as with top88), 0.04 % of the cells in a different phase (both printed by the script); the design of the driver evaluated here gives the J that the driver printed to 1e-9 (checked by the script; 6e-12). The problem has many local minima, and the methods land in different trees. OC, in HyperShape and in the driver alike, ends in a tree confined to the lower half of the square (+35 % to +41 % in J_bin); density SiMPL finds a better one (22 % better than the OC of the reference formulation in J_bin, a fact checked by the script); the reaction–diffusion density finds a slightly better one still (−3.7 %), and the projection the sharpest (−9.2 %). The level set, started from solid, only removes material: it grows needles without side branches (+14 % on 100 × 100; on 200 × 200 it does not stop: Validation page) and its needles lose at the 0/1 reading (its own J, 2.547, is below the J_bin of SiMPL). That trees are not the optimum of this problem is the point of Yan, Wang and Sigmund (2018, On the non-optimality of tree structures for heat conduction, Int. J. Heat Mass Transf. 122:660–680); here the rule between methods is kept for the rows that reach the same tree, and the spread of the others is the result. Mesh study (density SiMPL P0, every design read as 0/1 keeping the volume and evaluated on 400 × 400; informative):

methodmeshJJ_bin (own mesh)J_bin on 400 × 400vs 400 × 400 (on it)cells changing phaseperimeteriterations
density SiMPL, P0100 × 1002.702642.413492.45431+12.45 %7.86 %9.4672 (converged)
density SiMPL, P0200 × 2002.554732.216992.2321+2.27 %3.86 %10.3290 (converged)
density SiMPL, P0400 × 4002.54642.182482.18248+0.00 %0.00 %10.7388 (converged)

The tree gains branches as the mesh resolves them (on 100 × 100 rmin is two cells): J_bin on 400 × 400 drops by 12 % from the design of 100 × 100 and by 2.3 % from that of 200 × 200, so the 1 % rule of the mesh study does not hold and is not required.

The fixed report table (the first row is the driver; the rows of the mesh study are compared with the design on 400 × 400 on its own mesh):

Apple M5 Max, 4 threads, Julia 1.13.0 · commit 3b98442 · 2026-11-30 17:29.

casevariantJJ_binrefvs refVV_bingreyperimeterholesiterationssolves state/adjoint/filter/steptime (s)time ÷ state solves (s)
volume-to-point 100×100reference driver in Octave 9.1 (data/vtp): P0, cell mean, OC move 0.2, change ≤ 0.013.260423.10695––0.20000.20000.1217.460490–––
volume-to-point 100×100P0, cell mean, OC as top88 (against the driver: J, 1 %)3.260423.106933.26042-0.00 % (J)0.20000.20000.1217.50491 (converged, change_tol)492/0/983/012.20.0249
volume-to-point 100×100density OC, P0 (informative)3.472433.392232.41349+40.55 % (J_bin)0.20000.20000.1167.10119 (converged, objective_range)120/0/239/02.90.0245
volume-to-point 100×100density OC, P1 (informative)3.342693.267472.41349+35.38 % (J_bin)0.20000.20000.1206.980226 (converged, objective_range)227/0/453/05.70.0251
volume-to-point 100×100density SiMPL, P0 (reference between methods)2.702642.413492.41349+0.00 % (J_bin)0.20000.20000.1489.46072 (converged, objective_range)78/0/150/01.80.0229
volume-to-point 100×100density SiMPL, P12.661832.405722.41349-0.32 % (J_bin)0.20000.20000.1458.5080 (converged, objective_range)89/0/169/02.10.0232
volume-to-point 100×100reaction–diffusion level set, Ersatz(), Δt = 0.1 (informative)2.547282.760842.41349+14.39 % (J_bin)0.20000.20000.0396.52075 (converged, all)76/0/0/752.10.0272
volume-to-point 100×100reaction–diffusion density, Δt = 0.12.437972.325432.41349-3.65 % (J_bin)0.20010.20000.1038.60112 (converged, all)113/0/0/1122.50.0223
volume-to-point 100×100density SiMPL, P0, TanhProjection β = 1 → 16 every 40 iterations (informative)2.161192.191472.41349-9.20 % (J_bin)0.20000.20000.06310.880175 (converged, objective_range)199/0/850/06.50.0329
volume-to-point 100×100 (mesh study)density SiMPL, P02.702642.413492.18248+10.58 % (J_bin)0.20000.20000.1489.46072 (converged, objective_range)78/0/150/01.80.0229
volume-to-point 200×200 (mesh study)density SiMPL, P02.554732.216992.18248+1.58 % (J_bin)0.20000.20000.14210.32090 (converged, objective_range)98/0/188/07.50.0764
volume-to-point 400×400 (mesh study)density SiMPL, P0 (finest: reference)2.54642.182482.18248+0.00 % (J_bin)0.20000.20000.14310.73088 (converged, objective_range)94/0/182/032.00.34