A 262-line Matlab code for the level set topology optimization based on the estimated gradient field in the body-fitted mesh

Zicheng Zhuang, Fengming Xu, Junhong Ye, Wei Tong, Zeyao Chen, Yiwei Weng

Research output: Journal article publicationJournal articleAcademic researchpeer-review

Abstract

Topology optimization is an influential technique engineers and designers employ to achieve desirable material distribution within a designated domain. This educational article introduces a concise and efficient Matlab code, comprising only 262 lines, developed explicitly for the Level Set topology optimization based on the estimated Gradient Field (GFLS) in the body-fitted mesh. Unlike conventional level set methods that rely on the upwind scheme employed in the structured meshes, the proposed algorithm adopts the per-cell linear estimation of the discrete gradient vectors in the body-fitted mesh framework to obtain the velocity field and update the level set function. The Matlab code, named GFLS262, consists of a 62-line main program, 41-line finite element analysis function, and 48-line sub-functions, enabling the implementation of the GFLS method in 2D scenarios. Additionally, a 111-line function describes an improved mesh generator incorporated in the code to facilitate the generation of body-fitted meshes. The superiority of this innovative approach over the previous optimization methods with invariant meshes is demonstrated through various benchmark examples. For ease of access and further learning, the educational Matlab code is available on the website and can also be found in the Appendix section of this article.

Original languageEnglish
Article number171
JournalStructural and Multidisciplinary Optimization
Volume67
Issue number9
DOIs
Publication statusPublished - Sept 2024

Keywords

  • Body-fitted mesh
  • Educational Matlab code
  • Gradient field estimation
  • Level set method
  • Topology optimization

ASJC Scopus subject areas

  • Software
  • Control and Systems Engineering
  • Computer Science Applications
  • Computer Graphics and Computer-Aided Design
  • Control and Optimization

Fingerprint

Dive into the research topics of 'A 262-line Matlab code for the level set topology optimization based on the estimated gradient field in the body-fitted mesh'. Together they form a unique fingerprint.

Cite this