| name | topology-optimization |
| description | Topology optimization — SIMP method, compliance minimization, volume constraints, manufacturing constraints (overhang, symmetry, draw direction), density filter, lattice optimization, tools. |
| metadata | {"priority":7,"promptSignals":{"phrases":["topology optimization","topology opt","SIMP","compliance minimization","OptiStruct","nTopology","density filter","lattice optimization","structural optimization","material distribution"],"minScore":3}} |
Topology Optimization — Complete Skill
Problem Formulation
Standard Compliance Minimization
Minimize: C = {U}ᵀ[K]{U} = Σ u_eᵀ k_e u_e (global compliance = strain energy)
Subject to: V(ρ) = Σ ρ_e v_e ≤ V* (volume constraint)
0 < ρ_min ≤ ρ_e ≤ 1 (density bounds)
[K(ρ)]{U} = {F} (equilibrium)
C = compliance (reciprocal of stiffness — lower C = stiffer structure)
ρ_e = element density (design variable, 0 = void, 1 = solid)
V* = prescribed volume fraction × total volume (e.g., V* = 0.3 means 30% material)
SIMP (Solid Isotropic Material with Penalization)
Element stiffness: E_e = ρ_e^p × E₀ + (1-ρ_e^p) × E_min
p = penalization factor (typically p=3)
E_min = small value to avoid singularity (typically 10⁻⁹ E₀)
Sensitivity (compliance gradient):
∂C/∂ρ_e = -p × ρ_e^(p-1) × u_eᵀ k_0 u_e
Negative sensitivity → increasing density reduces compliance → keep high-sensitivity elements
Optimality Criteria (OC) Update
ρ_e^(new) = ρ_e × (B_e^η) clamped between [max(ρ_min, ρ_e - m), min(1, ρ_e + m)]
B_e = -∂C/∂ρ_e / (λ × ∂V/∂ρ_e) (ratio of strain energy density to Lagrange multiplier)
η = damping exponent (typically 0.5)
m = move limit (typically 0.2)
λ = Lagrange multiplier found by bisection to satisfy volume constraint
Density Filter
Sensitivity/Density Filtering
Density filter (Bourdin): ρ̃_e = Σ H_ei ρ_i / Σ H_ei
H_ei = max(0, r_min - dist(e,i)) (cone weighting)
r_min = filter radius (typically r_min = 3 × element size)
Purpose: eliminates checkerboard patterns; imposes minimum length scale
No filter → checkerboard artifacts (one-node-connected alternating solid/void)
Projection (threshold): ρ̄_e = tanh(βη) + tanh(β(ρ̃_e - η)) / (tanh(βη) + tanh(β(1-η)))
η = threshold (0.5 typical), β = sharpness (increase from 1 to 32 during iterations)
Converts grey elements to near-0/1 → cleaner final geometry
Minimum Length Scale Controls
Minimum solid member: filter radius r_min controls solid minimum (solid ≥ r_min)
Minimum void: projection with dilated filter (eroded + dilated envelope method)
Manufacturing Constraints
Minimum Member Size
Solved by density filter: r_min = desired minimum feature size / 2
Elements smaller than r_min are smeared out → no thin features
Symmetry Constraints
Map density: if symmetry about x-axis: ρ(x,y) = ρ(x,-y)
Apply after density update; symmetry reduces design variables
Draw Direction (Castability)
Constraint: no isolated voids in casting draw direction
Implementation: density monotonicity ρ(x, y+Δy) ≤ ρ(x,y) (no re-entrant overhangs in draw direction)
Or: overhang filter — void below solid is penalized
Overhang Constraint (Additive Manufacturing)
45° self-supporting: void below solid at angle < 45° is penalized
Heaviside projection filter in build direction:
ρ_e,support = min(ρ_e, ρ_below) — cannot be more solid than support below it
Slope constraint: ρ_e ≤ max(ρ_e1, ρ_e2, ρ_e3) of neighbors in build direction
Extrusion Constraint
Constant cross-section: ρ(x,y,z) = ρ(x,y) — all z layers equal
Apply by averaging densities along extrusion axis: ρ_e = (1/N_z) Σ ρ_(e,k)
Multiple Load Cases
Weighted Compliance
Minimize: C_total = Σ_j w_j C_j (weighted sum of compliances for each load case j)
Each load case gets separate FEA solve; sensitivities summed (weighted)
Minimax formulation:
Minimize: C_max = max_j C_j (minimize worst-case compliance)
Use smooth approximation: C_max ≈ (1/p) × log(Σ exp(p×C_j)) (p-norm, p=15-20)
Stress Constraints
Stress Constrained Topology Optimization
Qp-aggregation: g(ρ) = (Σ (σ_e/σ_y)^P × v_e)^(1/P) ≤ 1 (P-norm)
P-norm parameter P = 8-20 (higher P → closer to true maximum)
Challenge: large number of local stress constraints; singularity phenomenon
Singularity: void elements have zero stress → stress constraint always satisfied → can eliminate needed material
ε-relaxation: σ̃_e = σ_e / (ρ_e + ε) — scale stress by density to avoid singularity
Lattice Optimization
Graded Lattice
Map density to lattice relative density: ρ̄(x) → strut diameter or wall thickness
Gyroid, Schwartz-D, BCC, FCC: different stiffness/density curves
Gibson-Ashby: E_lattice/E_solid = C × ρ̄^n (n=2 for bending-dominated, n=1 for stretch-dominated)
Workflow:
- Topology optimization → coarse density field
- Map density to lattice element size → variable lattice
- Extract implicit surface (level-set) or explicit strut model
- Refine with FEA on actual lattice geometry
Infill Optimization
Shell + lattice core: solid shell (for surface finish, fatigue resistance) + graded lattice inside
Define: shell thickness (constant), infill density (from TO result)
Software Tools
Commercial
Altair OptiStruct: mature, SIMP + shape + size; manufacturing constraints; widely used
ANSYS Mechanical (Topology Opt. Module): integrated with FEA; good for coupled thermal-structural
Simulia TOSCA (Abaqus): sequential response surface method; stress constraints
SolidWorks Topology Study: entry-level; easy setup, limited constraints
Open Source / Research
88-line MATLAB code (Sigmund 2001): classic educational; FDM elements; no manufacturing constraints
Top3d (Liu 2014): 3D extension; 169 lines; educational
OpenLSTO: level-set method; shape derivatives; manufacturing constraints
nTopology: commercial with lattice + TO integration; CAD-ready output
Workflow Best Practices
- Pre-processing: define loads, BCs, keep-out zones (holes for fasteners), symmetry
- Run TO: start at 30-40% volume fraction with p=1; ramp p to 3; then add projection
- Interpret: smooth with CAD (spline-fit isosurface); maintain minimum wall thickness
- Validate: re-run full FEA on interpreted/smoothed geometry; check stress ≤ allowable
- Iterate: if stress exceeded, add local material; if too conservative, reduce volume fraction
Typical Results
Mass reduction vs. reference solid or intuitive design:
Simple bracket: 30-60% mass reduction at same stiffness
Airframe component: 20-50%
Medical implant: 40-70% (plus improved osseointegration)
Maximum stiffness-to-weight: Michell truss patterns (arch, tension web) for point loads
Output
Provide: volume fraction recommendation [%], minimum member size guidance [mm], dominant load case identification, manufacturing constraint settings (overhang/draw/symmetry), expected mass reduction [%] vs. solid, validation FEA re-check results [MPa].