Multi-Resolution Topology Optimization (MTOP)
println("Julia ", VERSION)Julia 1.12.6
Overview
In a standard density-method topology optimization the design variables live on the same mesh as the displacement, so a fine 3D design needs a fine displacement solve. Multi-resolution topology optimization (Kim & Yoon 2013) decouples the two: the design lives on a coarse density grid while the state is solved on a fine displacement mesh. Every fine element takes the density of the coarse cell containing its centroid, and the fine-element compliance sensitivities are summed back into the coarse cells — so a million-element design can be driven by only a few thousand design variables.
using Rasmah
using LinearAlgebra
m = tetrahedralize_box(2.0, 0.5, 0.5, 12, 3, 3)
n = 3 * size(m.nodes, 2)
nn = size(m.nodes, 2)
fixed = Int[]; loads = zeros(n)
for i in 1:nn
m.nodes[1, i] < 1e-12 && append!(fixed, 3i - 2, 3i - 1, 3i)
m.nodes[1, i] > 2 - 1e-12 && (loads[3i - 2] = 1.0)
end
# 8×2×2 coarse design cells over the 12×3×3 displacement mesh
x, hist = mtopt_compliance_topopt(m, 1e3, 0.3, fixed, loads, 0.5; coarse = (8, 2, 2), max_iter = 40)
println("compliance: ", round(hist[1]; digits = 3), " → ", round(hist[end]; digits = 3))
println("coarse volume frac = ", round(sum(x) / length(x); digits = 3), " (", length(x), " design vars)")compliance: 16.524 → 5.234
coarse volume frac = 0.5 (32 design vars)
Verification
The coarse design is a projection of the fine field, so the volume constraint (over the coarse cells) is met exactly, and the compliance matches a fine single-resolution run up to the coarse-cell discretisation:
x_full, hist_full = solve(ComplianceTopOpt(), m, Material(youngs_modulus=1e3, poisson_ratio=0.3);
fixed = fixed, loads = loads, volfrac = 0.5, max_iter = 40)
println("single-resolution compliance = ", round(ustrip(hist_full[end]); digits = 3))single-resolution compliance = 4.249
Next steps
- Density-based topology optimization — the SIMP machinery MTOP decouples.
- Isogeometric (NURBS) topology optimization — another representation-level design method.
