RasmahRasmah

Acoustic Cavity and Overhang-Constrained Topology Optimization

Overview

Two more specialized goals:

  • Acoustic cavity optimization — maximize the fundamental acoustic mode of a cavity (the Helmholtz eigenproblem K p = (ω²/c²) M p), pushing resonances up for quieter enclosures.
  • Overhang constraint — for additive manufacturing (build direction +z), penalize material that overhangs the layer below it, so the part is self-supporting without scaffolding.

Maximizing the acoustic cavity frequency

AcousticsTopOpt reuses the modal adjoint with the scalar Helmholtz form. Pin one pressure degree of freedom to remove the constant-pressure mode:

using Rasmah

m = tetrahedralize_box(1.0, 1.0, 1.0, 3, 3, 3)

x, hist = solve(AcousticsTopOpt(), m, Material(youngs_modulus=1e3, poisson_ratio=0.3, density=1.0);
                fixed = [1], volfrac = 0.5, max_iter = 30)

println("acoustic objective ", round(hist[1]; digits = 2), " → ", round(hist[end]; digits = 2))

vtk(m; field = x, fieldname = "density", edges = true)
acoustic objective -1.0 → -13.44

Overhang-constrained compliance

OverhangTopOpt keeps the overhang measure

P = Σ ρᵉᵠ max(0, ρᵉ − ρ_below(e))

near zero (build direction +z), so every layer is supported by the one below:

bs = box_boundary_sets(m, 1.0, 1.0, 1.0)
fixed = dofs(m, bs[:zmin])

xo, histo = solve(OverhangTopOpt(), m, Material(youngs_modulus=1e3, poisson_ratio=0.3, density=1.0);
                  fixed = fixed, loads = bs[:zmax] => [0.0, 0.0, -1.0],
                  volfrac = 0.5, overhang_tol = 0.5, max_iter = 30)

println("compliance ", round(histo[1]; digits = 3), " → ", round(histo[end]; digits = 3))

vtk(m; field = xo, fieldname = "density", edges = true)
compliance 0.008 → 0.003

Next steps