SIMP Topology Optimization Algorithm

Resource Overview

Implementation of the classic 99-line SIMP topology optimization algorithm with detailed code structure and function explanations

Detailed Documentation

The classic 99-line SIMP (Solid Isotropic Material with Penalization) topology optimization algorithm serves as a fundamental computational tool for structural optimization problems. The algorithm employs an iterative material redistribution approach where element densities are updated using optimality criteria methods until convergence is achieved under specified constraints. Despite its compact implementation, the SIMP method demonstrates remarkable efficiency in generating structurally optimal and weight-minimized designs through density-based parameterization. To implement the SIMP algorithm effectively, users should possess foundational knowledge of finite element analysis and mathematical programming. The code structure typically involves three core modules: finite element analysis for stiffness computation, sensitivity analysis using adjoint methods, and density update via heuristic schemes. Key MATLAB functions include mesh generation using 'rectangleMesh', stiffness matrix assembly through 'assembleK', and density filtering using 'filterDensities' to ensure mesh-independent results. The optimization loop implements the optimality criteria method where element densities are updated based on strain energy sensitivity while enforcing volume constraints. While the SIMP algorithm provides robust solutions for various topology optimization problems, its effectiveness depends on proper parameter selection including penalty factors (typically p=3), filter radii, and convergence tolerance. For complex multi-physics problems or manufacturability requirements, extended formulations like projection methods or multi-material SIMP may be preferable. Nevertheless, this 99-line implementation remains an essential educational and prototyping tool for engineers exploring structural optimization techniques, featuring clear variable naming and modular architecture that facilitates customization for specific applications.