Topology Optimizer ⚙️
Draw a 2D part with lines and arcs (or import a DXF), pin it down, hang some loads on it, and run a structural topology optimization: the solver carves away material it doesn't need and keeps only the load paths that matter, converging on the stiffest shape for a given amount of material.
It's the classic SIMP method — solid isotropic material with penalization — minimizing compliance under a volume constraint. Originally a Python/NumPy/SciPy desktop app; the finite-element solver, sensitivity filter, and optimality-criteria update have been ported to vanilla JavaScript. The sparse direct solve became a matrix-free, Jacobi-preconditioned conjugate gradient, so the whole thing runs in your browser with no backend. The smoke-test suite reproduces the Python reference compliance to the second decimal.
Sketch & Solve
Pick a tool, draw the outline as a connected chain of edges (or Import DXF), add at least one force and one support, then hit Run. The dark material that survives is the optimized structure.
Benchmark library
Load a classic problem from the literature — the domain, loads, and boundary conditions are set up exactly as in the source study, then solved automatically. Each links to the original paper.
MBB Beam
Sigmund · 2001 · 99-line codeThe canonical TO benchmark: a half-beam with a symmetry plane, a roller support, and a corner load.
Cantilever Beam
Andreassen et al. · 2011 · 88-line codeClamped left edge, point load at the free end — the reference example for the code this solver is ported from.
Michell Cantilever
Michell · 1904The original analytical optimum — two pinned supports and a tip load produce Michell's fan of orthogonal members.
L-Bracket
Bendsøe & Sigmund · 2003An L-shaped domain clamped on top and loaded at the arm tip; the re-entrant corner is the classic stress concentration.
How it works
- The part is embedded in a regular grid of bilinear quad elements. Elements whose center falls outside your sketched boundary are held as void; circles and inner loops become holes.
- Each iteration solves
K·u = Ffor the displacements, computes how sensitive the compliance is to each element's density, smooths those sensitivities with a cone filter (kills the checkerboard artifact), and nudges densities with the optimality-criteria update under a fixed volume budget. - The linear solve is matrix-free conjugate gradient: instead of
assembling and factoring a sparse matrix, each
K·vis accumulated element by element, preconditioned by the diagonal, and warm-started from the previous iteration's displacement field. - Edge Force distributes a load across every grid node along a selected edge, so it behaves like a real traction rather than a single point poke.