Examples / 1 of 1
MBB beam, topology optimization
Topology optimization decides where material should go. The MBB beam is its standard test: a simply supported beam with a load at mid-span, and half of the block's volume to spend. The stiffest layout is a truss, with a compression chord on top, a tension tie along the bottom and diagonals between them. The model opens in the Optimize step, ready to run.
The problem
| 300 mm | |
| 50 mm | |
| 10 mm | |
| 210 GPa | |
| 0.3 | |
| 1 kN |
| Supports | Bottom-left pad fixed (Ux, Uy, Uz); bottom-right pad Uy only (a roller). |
|---|---|
| Load | F in −y as a force on the pad at the top of mid-span. |
| Measured | Compliance F·u, the work done by the load, at half the volume. |
The optimization problem
Each element gets a density between 0 (void) and 1 (solid). SIMP (solid isotropic material with penalisation) scales the element's stiffness with a power of its density,
so intermediate densities give little stiffness for their volume and the optimum is pushed towards 0 or 1. The problem is to minimise the compliance, the work done by the load, at a fixed volume:
Lower compliance means a stiffer structure. The sensitivities are filtered over a radius , which prevents checkerboard patterns and makes the layout independent of the mesh. The densities are updated by MMA, the method of moving asymptotes, with a move limit of 0.2 per iteration.
There is no closed-form answer to compare with. The check is that the run converges and that the layout matches the published one.
Finite element model
| Mesh | Netgen, 5 mm maximum element size: 7,887 linear 4-node tetrahedra (P1) |
|---|---|
| Unknowns | 2,225 nodes, 6,675 degrees of freedom |
| Material | Linear elastic, isotropic |
| Solver | KoFEM engine (MFEM), the WebAssembly build the app runs: engine-5ceb743373dd |
The block is a STEP file, cut with the app's split tool so that the two supports and the load each sit on their own CAD face. Netgen meshes it at 5 mm. The whole beam is modelled rather than the symmetric half. The optimizer stops when no density changes by more than 0.01 between iterations, or after 100. The figure shows the elements with .
Results
| Iterations | 88, converged (largest density change 6.1221 × 10−3) |
|---|---|
| Compliance | 192.55 N·mm at the start, 47.499 N·mm at the end |
| Volume | 0.500 of the block (target 0.5) |
| Elements | 1,806 solid (ρ > 0.9), 1,913 void (ρ < 0.1) |
Discussion
The compliance falls by 75 % from the uniform start, most of it in the first iterations, while the volume stays at the target. The layout is the one in the literature: a chord along the top, a tie along the bottom and diagonals between them, as in Sigmund's 99-line and Andreassen's 88-line codes.
The tetrahedral mesh leaves a ragged surface where the threshold cuts through elements. The layout is the result, not the final part: export it, smooth it and check it with a solve of the solid design.
Reproduce
In the app: open the model, with its supports, loads and settings.
From a clone (Node.js 20+, bash, curl), this rebuilds the model and its figure:
git clone https://github.com/mkofler96/KoFEM.git && cd KoFEM
bash scripts/fetch-wasm-engine.sh
cd web && bun install && bun run examples:generate-mbb-topopt
References
- M. P. Bendsøe and O. Sigmund, Topology Optimization: Theory, Methods and Applications, Springer, 2003.
- O. Sigmund, “A 99 line topology optimization code written in Matlab”, Structural and Multidisciplinary Optimization 21 (2001) 120–127.
- E. Andreassen, A. Clausen, M. Schevenels, B. S. Lazarov and O. Sigmund, “Efficient topology optimization in MATLAB using 88 lines of code”, Structural and Multidisciplinary Optimization 43 (2011) 1–16.
- K. Svanberg, “The method of moving asymptotes: a new method for structural optimization”, International Journal for Numerical Methods in Engineering 24 (1987) 359–373.
KoFEM is research software and is not certified for safety-critical design. It solves linear-static, linear-elastic problems. Check results that matter against your own references.