A MATLAB Implementation of ES-FEM-based Topology Optimization
This paper presents a compact and efficient MATLAB implementation of topology optimization using the edge-based smoothed finite element method (ES-FEM).The framework is designed with pedagogical intent, illustrating how ES-FEM can be effectively vectorized through the systematic construction of smoothing domains around interior and boundary edges, followed by the computation of smoothed stiffness matrices over these domains.Computational efficiency is further enhanced through array preallocation.An improved density filter is incorporated, simplifying the formulation while delivering better performance compared to existing ES-FEM-based topology optimization approaches.With this enhancement, the complete implementation requires only 175 lines of MATLAB code, ensuring both readability and ease of use.Boundary conditions and loading can be customized by modifying only a few lines, making the approach flexible and easily extensible.The full MATLAB code is provided in the Appendix as an accessible starting point for newcomers to topology optimization and ES-FEM, offering a clear and approachable entry point with a gentle learning curve.
Authors
- Changkye Lee
Publication Details
- Journal
- Journal of the Computational Structural Engineering Institute of Korea
- Published
- 2025-12-30
- DOI
- https://doi.org/10.7734/coseik.2025.38.6.371
- Primary Topic
- Topology Optimization in Engineering
- Type
- article
- Field-Weighted Citation Impact
- 0.00