Abstract
This paper presents MATLAB implementations of the velocity field level set method for topology optimization. An 80-line code and a 100-line code are provided for 2D and 3D static compliance minimization problems, respectively. The velocity field level set method inherits the implicit topology and shape representation of the standard level set method but advances the design boundaries with a velocity field constructed from the velocity design variables and basis functions. Therefore, it can achieve structural designs with relatively clear and smooth material boundaries. Moreover, it allows general mathematical programming algorithms to be conveniently employed to handle more constraints when solving the optimization problem. In the presented codes, the method of moving asymptotes is used as the optimizer. For simplification, the presented MATLAB code is in a basic version. Some modifications and extensions are given in the examples to show the validity and efficiency of the codes. Further adaption of the current codes can also be made to fulfill various requirements.
References
Allaire G (2009) A 2-d Scilab Code for shape and topology optimization by the level set method. In: http://www.cmap.polytechnique.fr/~allaire/levelset_en.html. Accessed December 2020
Allaire G, Dapogny C, Estevez R, Faure A, Michailidis G (2017) Structural optimization under overhang constraints imposed by additive manufacturing technologies. J Comput Phys 351:295–328
Allaire G, De Gournay F, Jouve F, Toader AM (2005) Structural optimization using topological and shape sensitivity via a level set method. Control Cybern 34:59–81
Allaire G, Jouve F, Toader AM (2004) Structural optimization using sensitivity analysis and a level-set method. J Comput Phys 194:363–393
Andreassen E, Clausen A, Schevenels M, Lazarov BS, Sigmund O (2011) Efficient topology optimization in MATLAB using 88 lines of code. Struct Multidiscip Optim 43:1–16
Burger M, Hackl B, Ring W (2004) Incorporating topological derivatives into level set methods. J Comput Phys 194:344–362
Challis VJ (2010) A discrete level-set topology optimization code written in Matlab. Struct Multidiscip Optim 41:453–464
Coffin P, Maute K (2016) Level set topology optimization of cooling and heating devices using a simplified convection model. Struct Multidiscip Optim 53:985–1003
Deaton JD, Grandhi RV (2014) A survey of structural and multidisciplinary continuum topology optimization: post 2000. Struct Multidiscip Optim 49:1–38
Dilgen CB, Dilgen SB, Aage N, Jensen JS (2019) Topology optimization of acoustic mechanical interaction problems: a comparative review. Struct Multidiscip Optim 60:779–801
Dunning PD, Kim HA (2015) Introducing the sequential linear programming level-set method for topology optimization. Struct Multidiscip Optim 51:631–643
Ferrari F, Sigmund O (2020) A new generation 99 line Matlab code for compliance topology optimization and its extension to 3D. Struct Multidiscip Optim 62:2211–2228
Gao J, Luo Z, Xia L, Gao L (2019) Concurrent topology optimization of multiscale composite structures in Matlab. Struct Multidiscip Optim 60:2621–2651
Huang X, Xie YM (2010) Evolutionary topology optimization of continuum structures. John Wiley & Sons, Ltd, Chichester
Jiang L, Chen S, Jiao X (2018) Parametric shape and topology optimization: a new level set approach based on cardinal basis functions. Int J Numer Methods Eng 114:66–87
Kreissl S, Pingen G, Maute K (2011) An explicit level set approach for generalized shape optimization of fluids with the lattice Boltzmann method. Int J Numer Methods Fluids 65:496–519
Laurain A (2018) A level set-based structural optimization code using FEniCS. Struct Multidiscip Optim 58:1311–1334
Liu H, Tian Y, Zong H, Ma Q, Wang MY, Zhang L (2019) Fully parallel level set method for large-scale structural topology optimization. Comput Struct 221:13–27
Liu P, Luo Y, Kang Z (2016) Multi-material topology optimization considering interface behavior via XFEM and level set method. Comput Methods Appl Mech Eng 308:113–133
Luo J, Luo Z, Chen L, Tong L, Yu M (2008a) A semi-implicit level set method for structural shape and topology optimization. J Comput Phys 227:5561–5581
Luo Z, Tong L, Kang Z (2009a) A level set method for structural shape and topology optimization using radial basis functions. Comput Struct 87:425–434
Luo Z, Tong L, Luo J, Wei P, Yu M (2009b) Design of piezoelectric actuators using a multiphase level set method of piecewise constants. J Comput Phys 228:2643–2659
Luo Z, Wang MY, Wang S, Wei P (2008b) A level set-based parameterization method for structural shape and topology optimization. Int J Numer Methods Eng 76:1–26
Mei Y, Wang X (2004) A level set method for structural topology optimization and its applications. Adv Eng Softw 35:415–441
Osher S, Fedkiw R (2003) Level set method and dynamic implicit surfaces. Springer, Berlin
Otomori M, Yamada T, Izui K, Nishiwaki S (2015) Matlab code for a level set-based topology optimization method using a reaction diffusion equation. Struct Multidiscip Optim 51:1159–1172
Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidiscip Optim 21:120–127
Sigmund O, Maute K (2013) Topology optimization approaches: a comparative review. Struct Multidiscip Optim 48:1031–1055
Svanberg K (1987) The method of moving asymptotes-a new method for structural optimization. Int J Numer Methods Eng 24:359–373
Takezawa A, Nishiwaki S, Kitamura M (2010) Shape and topology optimization based on the phase field method and sensitivity analysis. J Comput Phys 229:2697–2718
van Dijk NP, Maute K, Langelaar M, van Keulen F (2013) Level-set methods for structural topology optimization: a review. Struct Multidiscip Optim 48:437–472
Wang M, Chen S, Xia Q (2004) TOPLSM: 199-line version. In: http://ihome.ust.hk/~mywang/download/TOPLSM_199.m
Wang MY, Wang X, Guo D (2003) A level set method for structural topology optimization. Comput Methods Appl Mech Eng 192:227–246
Wang Y, Gao J, Kang Z (2018) Level set-based topology optimization with overhang constraint: towards support-free additive manufacturing. Comput Methods Appl Mech Eng 339:591–614
Wang Y, Kang Z (2018) A velocity field level set method for shape and topology optimization. Int J Numer Methods Eng 115:1315–1336
Wang Y, Kang Z (2019) Concurrent two-scale topological design of multiple unit cells and structure using combined velocity field level set and density model. Comput Methods Appl Mech Eng 347:340–364
Wang Y, Kang Z, Liu P (2019) Velocity field level-set method for topological shape optimization using freely distributed design variables. Int J Numer Methods Eng 120:1411–1427
Wei P, Li Z, Li X, Wang MY (2018) An 88-line MATLAB code for the parameterized level set method based topology optimization using radial basis functions. Struct Multidiscip Optim 58:831–849
Wei P, Yang Y, Chen S, Wang MY (2021) A study on basis functions of the parameterized level set method for topology optimization of continuums. J Mech Des 143(4):1–48
Xia Q, Shi T, Liu S, Wang MY (2012) A level set solution to the stress-based structural shape and topology optimization. Comput Struct 90–91:55–64
Yamada T, Izui K, Nishiwaki S, Takezawa A (2010) A topology optimization method based on the level set method incorporating a fictitious interface energy. Comput Methods Appl Mech Eng 199:2876–2891
Ye Q, Guo Y, Chen S, Lei N, Gu XD (2019) Topology optimization of conformal structures on manifolds using extended level set methods (X-LSM) and conformal geometry theory. Comput Methods Appl Mech Eng 344:164–185
Zuo ZH, Xie YM (2015) A simple and compact Python code for complex 3D topology optimization. Adv Eng Softw 85:1–11
Acknowledgements
The support of the National Science Foundation of China (12002076, 11872140) and China Postdoctoral Science Foundation (2019TQ0047) is gratefully acknowledged.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Replication of results
The MATLAB codes are given in Appendices and can also be downloaded in the supplementary material. The MMA algorithm we use here is Version September 2007 (and a small change August 2008) developed by Professor Krister Svanberg (krille@math.kth.se).
Additional information
Responsible Editor: Zhen Luo
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix 1
Appendix 2
Rights and permissions
About this article
Cite this article
Wang, Y., Kang, Z. MATLAB implementations of velocity field level set method for topology optimization: an 80-line code for 2D and a 100-line code for 3D problems. Struct Multidisc Optim 64, 4325–4342 (2021). https://doi.org/10.1007/s00158-021-02958-4
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00158-021-02958-4