After Erik Andreassen, Anders Clausen, Mattias Schevenels, Boyan S. Lazarov, Ole Sigmund,“Efficient topology optimization in MATLAB using 88 lines of code”, Structural and Multidisciplinary Optimization (2011), doi:10.1007/s00158-010-0594-7.
- Against the author’s code
- 12 of 12 checks pass· see the checks
- Against the paper’s figures
- Compared with the authors’ unmodified top88.m in GNU Octave; Figure 3 settings.
Research, not a design tool. Nothing here is an engineering result.
An educational SIMP optimizer: redistribute a fixed amount of material to reduce compliance.
The experiment
The authors’ abstract describes a compact successor to the 99-line code, adding density filtering and improving efficiency through preallocation and vectorization. Here we implement its main minimum-compliance method.
Each square uses a bilinear plane-stress element. SIMP interpolates its stiffness as E = 10⁻⁹ + ρᵖ(1 − 10⁻⁹). Optimality criteria redistribute material, with a move limit of 0.2. The engine’s sparse Cholesky solves equilibrium at every iteration.
Half-MBB beam: unit-square elements, horizontal restraints along the left edge and a vertical restraint at the lower-right corner. A unit downward load acts at the upper-left corner. E0 = 1, ν = 0.3; all quantities are nondimensional. Filter radius is measured in element widths.
Reproduction
Defaults: 60 × 20 elements, volume fraction 0.5, penalization 3, filter radius 2.4. These are section 3.4 and Figure 3(a) of the authors’ manuscript (pages 6–7). Sensitivity and density filtering use the same settings. Physical densities are shown.
Compliance is measured before each update; volume and density are recorded after it, exactly as in top88. Stop when the largest design change is at most 0.01. The reference overlay is shown only for matching default parameters.
Replay densities are rounded to 256 levels for display (maximum error 0.5/255); live densities and reported histories retain full precision.
Evidence and limitations
The reference runner downloads the authors’ unmodified function, checks its SHA-256, and observes full-precision data at its plotting calls in GNU Octave. Rust tests compare iteration counts, every compliance, volume and change, and final densities, alongside independent element and filter checks.
| Check | Observed error | Tolerance | Reason |
|---|---|---|---|
| Filter 1: OC volume constraint | 0.0002278489296336783 | 0.0005 | Finite OC bisection tolerance |
| Filter 1: Relative compliance | 0.00000000001299176807270785 | 0.000001 | Different sparse factorization order |
| Filter 1: Absolute volume | 0.000000000002697342349478049 | 0.00000001 | Propagation through the OC volume update |
| Filter 1: Absolute design change | 0.00000000001153943607334895 | 0.000001 | Sensitivity to the OC stopping threshold |
| Filter 1: Maximum absolute final density | 0.00000000003041600304953818 | 0.00001 | Accumulated optimization sensitivity |
| Filter 1: Iteration count | 0 | 0 | Exact convergence step |
| Filter 2: OC volume constraint | 0.0002443420758061476 | 0.0005 | Finite OC bisection tolerance |
| Filter 2: Relative compliance | 0.00000000001628639154775679 | 0.000001 | Different sparse factorization order |
| Filter 2: Absolute volume | 0.000000000003500422174340656 | 0.00000001 | Propagation through the OC volume update |
| Filter 2: Absolute design change | 0.00000000008664191586404968 | 0.000001 | Sensitivity to the OC stopping threshold |
| Filter 2: Maximum absolute final density | 0.00000000005127798186066457 | 0.00001 | Accumulated optimization sensitivity |
| Filter 2: Iteration count | 0 | 0 | Exact convergence step |
| Stiffness symmetry | 0 | 0.0000000000001 | Floating-point roundoff |
| Constant strain and rigid modes | 0.0000000000000002220446049250313 | 0.0000000000001 | Floating-point roundoff |
| Filter partition of unity | 0 | 0.0000000000001 | Floating-point roundoff |
The numerical comparison uses the authors’ unmodified top88.m in GNU Octave. The accessible manuscript reports optimized images and timing tables, not final compliance or iteration counts for these cases. We do not claim a paper-figure comparison. Agreement between implementations is not experimental validation or engineering certification. Alternate boundary conditions are delegated to the 2001 paper; this experiment supports the MBB load case.
Abstract, manuscript and authors’ reference. Journal volume 43 (2011), pages 1–16; Crossref records the online publication in 2010.
Cite this
Stabileo Research, “Topology optimization of an MBB beam”, reproduction of Erik Andreassen, Anders Clausen, Mattias Schevenels, Boyan S. Lazarov, Ole Sigmund (2011), doi:10.1007/s00158-010-0594-7. Implementation: research/optimization/andreassen-2011 at commit fb241aa04936. Engine: the Stabileo engine at the same commit.