Adaptive-Mesh Topology Optimization
println("Julia ", VERSION)Julia 1.12.6
Overview
A uniform mesh wastes elements in regions where the design is already solid or void. Adaptive-mesh topology optimization refines the mesh stage-wise around the evolving material interface: after each stage the density is projected onto a finer mesh (each fine element takes the density of the coarse cell containing its centroid) and the optimization continues, so resolution concentrates where the boundary moves (Alauzet 2014; Wang, Lazarov & Sigmund 2011).
using Rasmah
x, hist = adaptive_topopt(2.0, 0.5, 0.5, 1e3, 0.3,
(x, y, z) -> x < 1e-9,
(x, y, z) -> x > 2 - 1e-9 ? (1.0, 0.0, 0.0) : nothing,
0.5; resolutions = [(6, 2, 2), (12, 4, 4)], max_iter = 30)
println("stages = ", length(hist), " final compliance = ", round(hist[end]; digits = 2))
println("final volume frac = ", round(sum(x) / length(x); digits = 3))stages = 60 final compliance = 94.87
final volume frac = 0.495
Verification
The staged refinement must preserve the volume budget and give a finite, improving objective — the coarse stage’s design is a valid warm start for the fine stage:
println("all densities in [0,1]: ", all(0.0 .<= x .<= 1.0 + 1e-9))
println("first compliance = ", round(hist[1]; digits = 2))all densities in [0,1]: true
first compliance = 5.19
Next steps
- Multi-resolution topology optimization — coarse design + fine displacement simultaneously (not stage-wise).
- Density-based topology optimization — the SIMP machinery every stage drives.
