Level-set based topology optimization in MATLAB using density methods

 

Have you ever wondered how easy (or hard!) it is to go from a density design representation to a level set based one? The paper and code available on this page provides an answer to this question - and fortunately, it is not too hard. Try it out for yourself and feel free to extend as you see fit !

 

The Matlab code presented in this page is intended for engineering education. It is aimed at students/researches with a background in density based topology optimziation and provides an easy transition into the world of level set method. The code is NOT optimized for performance (i.e. many for-loops are used instead of vectorizations) in order to ensure maximum transparency. However, feel free to inform us of any modifications that improves speed without losing accessibility.

The complete code can be downloaded from here: download zip

Unzip the files and start Matlab in the directory with the file "topcut.m". Run the program by writing:

>> topcut

in the Matlab prompt.

A paper describing the approach code can be found here: "Level set topology and shape optimization by density methodsusing cut elements with length scale control" (PDF) (1600K) Struct Multidisc Optim (2020).

The original publication is available at https://doi.org/10.1007/s00158-020-02527-1