Structural and Multidisciplinary Optimization

, Volume 59, Issue 5, pp 1863–1879 | Cite as

A 213-line topology optimization code for geometrically nonlinear structures

  • Qi Chen
  • Xianmin ZhangEmail author
  • Benliang Zhu
Educational Article


This paper presents a 213-line MATLAB code for topology optimization of geometrically nonlinear structures. It is developed based on the density method. The code adopts the ANSYS parametric design language (APDL) that provides convenient access to advanced finite element analysis (FEA). An additive hyperelasticity technique is employed to circumvent numerical difficulties in solving the material density-based topology optimization of elastic structures undergoing large displacements. The sensitivity information is obtained by extracting the increment of the element strain energy. The validity of the code is demonstrated by the minimum compliance problem and the compliant inverter problem.


MATLAB code ANSYS Topology optimization Geometrical nonlinearity 


Funding information

This work is supported by the National Natural Science Foundation of China (Grant Nos. 51820105007, U1501247 and 51605166). These support is greatly appreciated. Additionally, the authors thank Dr. K. Svanberg at KTH (Stockholm, Sweden) for providing the MMA code for academic research.

Compliance with Ethical Standards

Conflict of interest

The authors declare that they have no conflict of interest.

Supplementary material

158_2018_2138_MOESM1_ESM.m (21 kb)
(M 21.4 KB)
158_2018_2138_MOESM2_ESM.m (22 kb)
(M 22.4 KB)


  1. 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):1–16CrossRefzbMATHGoogle Scholar
  2. Bourdin B (2001) Filters in topology optimization. Int J Numer Methods Eng 50(9):2143–2158MathSciNetCrossRefzbMATHGoogle Scholar
  3. Bruns T E, Sigmund O, Tortorelli DA (2002) Numerical methods for the topology optimization of structures that exhibit snap-through. Int J Numer Methods Eng 55(10):1215–1237CrossRefzbMATHGoogle Scholar
  4. Bruns TE, Tortorelli DA (2003) An element removal and reintroduction strategy for the topology optimization of structures and compliant mechanisms. Int J Numer Methods Eng 57(10):1413–1430CrossRefzbMATHGoogle Scholar
  5. Bruns T E, Sigmund Ole (2004) Toward the topology design of mechanisms that exhibit snap-through behavior. Comput Methods Appl Mech Eng 193(36-38):3973–4000MathSciNetCrossRefzbMATHGoogle Scholar
  6. Buhl T, Pedersen C BW, Sigmund O (2000) Stiffness design of geometrically nonlinear structures using topology optimization. Struct Multidiscip Optim 19(2):93–104CrossRefGoogle Scholar
  7. Chen F, Wang Y, Wang MY, Zhang YF (2017) Topology optimization of hyperelastic structures using a level set method. J Comput Phys 351:437–454MathSciNetCrossRefGoogle Scholar
  8. Cho S, Jung H-S (2003) Design sensitivity analysis and topology optimization of displacement–loaded non-linear structures. Comput Methods Appl Mech Eng 192(22-24):2539–2553CrossRefzbMATHGoogle Scholar
  9. Huang X, Xie Y M (2008) Topology optimization of nonlinear structures under displacement loading. Eng Struct 30(7):2057–2068CrossRefGoogle Scholar
  10. Huang XH, Xie Y (2007) Bidirectional evolutionary topology optimization for structures with geometrical and material nonlinearities. AIAA J 45(1):308–313CrossRefGoogle Scholar
  11. Huang X, Xie Y-M (2010) A further review of ESO type methods for topology optimization. Struct Multidiscip Optim 41(5):671–683CrossRefGoogle Scholar
  12. James KA, Waisman H (2016) Layout design of a bi-stable cardiovascular stent using topology optimization. Comput Methods Appl Mech Eng 305:869–890MathSciNetCrossRefGoogle Scholar
  13. Klarbring A, Strömberg N (2013) Topology optimization of hyperelastic bodies including non-zero prescribed displacements. Struct Multidiscip Optim 47(1):37–48MathSciNetCrossRefzbMATHGoogle Scholar
  14. Kuhl E, Askes H, Steinmann P (2006) An illustration of the equivalence of the loss of ellipticity conditions in spatial and material settings of hyperelasticity. Eur J Mech-A/Solids 25(2):199–214MathSciNetCrossRefzbMATHGoogle Scholar
  15. Lahuerta RD, Simões ET, Campello EMB, Pimenta PM, Silva ECN (2013) Towards the stabilization of the low density elements in topology optimization with large deformation. Comput Mech 52(4):779–797MathSciNetCrossRefzbMATHGoogle Scholar
  16. Lee H-A, Park G-J (2012) Topology optimization for structures with nonlinear behavior using the equivalent static loads method. J Mech Des 134(3):031004CrossRefGoogle Scholar
  17. Liu K, Tovar A (2014) An efficient 3D topology optimization code written in Matlab. Struct Multidiscip Optim 50(6):1175–1196MathSciNetCrossRefGoogle Scholar
  18. Luo Y, Wang MY, Kang Z (2015) Topology optimization of geometrically nonlinear structures based on an additive hyperelasticity technique. Comput Methods Appl Mech Eng 286:422–441MathSciNetCrossRefzbMATHGoogle Scholar
  19. Qi C, Zhang X, Zhu B (2018a) Design of buckling-induced mechanical metamaterials for energy absorption using topology optimization. Struct Multidiscip Optim 58(4):1395–1410MathSciNetCrossRefGoogle Scholar
  20. Qi C, Zhang X, Zhu B (2018b) Topology optimization of fusiform muscles with a maximum contraction. Int J Numer Meth Biomed Engng 34:e3096MathSciNetCrossRefGoogle Scholar
  21. Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidiscip Optim 21 (2):120–127CrossRefGoogle Scholar
  22. Svanberg K (1987) The method of moving asymptotes<aa new method for structural optimization. Int J Numer Methods Eng 24(2):359–373MathSciNetCrossRefzbMATHGoogle Scholar
  23. Talischi C, Paulino GH, Pereira A, Menezes IFM (2012) Polytop: a Matlab implementation of a general topology optimization framework using unstructured polygonal finite element meshes. Struct Multidiscip Optim 45(3):329–357MathSciNetCrossRefzbMATHGoogle Scholar
  24. Tavakoli R, Mohseni SM (2014) Alternating active-phase algorithm for multimaterial topology optimization problems: a 115-line Matlab implementation. Struct Multidiscip Optim 49(4):621–642MathSciNetCrossRefGoogle Scholar
  25. Tran AV, Zhang X, Zhu B (2018) The development of a new piezoresistive pressure sensor for low pressures. IEEE Trans Ind Electron 65(8):6487–6496CrossRefGoogle Scholar
  26. van Dijk NP , Langelaar M, van Keulen F (2014) Element deformation scaling for robust geometrically nonlinear analyses in topology optimization. Struct Multidiscip Optim 50(4):537–560MathSciNetCrossRefGoogle Scholar
  27. Vivien J (2010) Challis. a discrete level-set topology optimization code written in Matlab. Struct Multidiscip Optim 41(3):453–464MathSciNetCrossRefzbMATHGoogle Scholar
  28. Wallin M, Ivarsson N, Tortorelli D (2018) Stiffness optimization of non-linear elastic structures. Comput Methods Appl Mech Eng 330:292–307MathSciNetCrossRefGoogle Scholar
  29. Wang F, Lazarov BS, Sigmund O, Jensen JS (2014) Interpolation scheme for fictitious domain techniques and topology optimization of finite strain elastic problems. Comput Methods Appl Mech Eng 276:453–472MathSciNetCrossRefzbMATHGoogle Scholar
  30. Wang N, Guo H, Chen B, Cui C, Zhang X (2018) Design of a rotary dielectric elastomer actuator using a topology optimization method based on pairs of curves. Smart Mater Struct 27(5):055011CrossRefGoogle Scholar
  31. 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(2):831–849MathSciNetCrossRefGoogle Scholar
  32. Yoon GH, Kim YY (2005) Element connectivity parameterization for topology optimization of geometrically nonlinear structures. Int J Solids Struct 42(7):1983–2009MathSciNetCrossRefzbMATHGoogle Scholar
  33. Yoon GH, Joung YS, Kim YY (2007) Optimal layout design of three-dimensional geometrically non-linear structures using the element connectivity parameterization method. Int J Numer Methods Eng 69(6):1278–1304CrossRefzbMATHGoogle Scholar
  34. Zhang W, Yuan J, Zhang J, Xu G (2016) A new topology optimization approach based on Moving Morphable Components (MMC) and the ersatz material model. Struct Multidiscip Optim 53(6):1243–1260MathSciNetCrossRefGoogle Scholar
  35. Zhu B, Zhang X, Zhang Y, Fatikow S (2017) Design of diaphragm structure for piezoresistive pressure sensor using topology optimization. Struct Multidiscip Optim 55(1):317–329MathSciNetCrossRefGoogle Scholar
  36. Zuo ZH, Yi MX (2015) A simple and compact python code for complex 3D topology optimization. Adv Eng Softw 85:1–11CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Guangdong Key Laboratory of Precision Equipment and Manufacturing TechnologySouth China University of TechnologyGuangzhouChina

Personalised recommendations