# A 213-line topology optimization code for geometrically nonlinear structures

- 1.2k Downloads
- 1 Citations

## Abstract

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.

## Keywords

MATLAB code ANSYS Topology optimization Geometrical nonlinearity## Notes

### 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

## References

- 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
- Bourdin B (2001) Filters in topology optimization. Int J Numer Methods Eng 50(9):2143–2158MathSciNetCrossRefzbMATHGoogle Scholar
- 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
- 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
- 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
- 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
- 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
- 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
- Huang X, Xie Y M (2008) Topology optimization of nonlinear structures under displacement loading. Eng Struct 30(7):2057–2068CrossRefGoogle Scholar
- Huang XH, Xie Y (2007) Bidirectional evolutionary topology optimization for structures with geometrical and material nonlinearities. AIAA J 45(1):308–313CrossRefGoogle Scholar
- Huang X, Xie Y-M (2010) A further review of ESO type methods for topology optimization. Struct Multidiscip Optim 41(5):671–683CrossRefGoogle Scholar
- 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
- Klarbring A, Strömberg N (2013) Topology optimization of hyperelastic bodies including non-zero prescribed displacements. Struct Multidiscip Optim 47(1):37–48MathSciNetCrossRefzbMATHGoogle Scholar
- 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
- 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
- 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
- Liu K, Tovar A (2014) An efficient 3D topology optimization code written in Matlab. Struct Multidiscip Optim 50(6):1175–1196MathSciNetCrossRefGoogle Scholar
- 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
- 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
- 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
- Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidiscip Optim 21 (2):120–127CrossRefGoogle Scholar
- Svanberg K (1987) The method of moving asymptotes<
^{a}a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373MathSciNetCrossRefzbMATHGoogle Scholar - 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
- 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
- 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
- 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
- Vivien J (2010) Challis. a discrete level-set topology optimization code written in Matlab. Struct Multidiscip Optim 41(3):453–464MathSciNetCrossRefzbMATHGoogle Scholar
- Wallin M, Ivarsson N, Tortorelli D (2018) Stiffness optimization of non-linear elastic structures. Comput Methods Appl Mech Eng 330:292–307MathSciNetCrossRefGoogle Scholar
- 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
- 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
- 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
- Yoon GH, Kim YY (2005) Element connectivity parameterization for topology optimization of geometrically nonlinear structures. Int J Solids Struct 42(7):1983–2009MathSciNetCrossRefzbMATHGoogle Scholar
- 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
- 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
- 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
- Zuo ZH, Yi MX (2015) A simple and compact python code for complex 3D topology optimization. Adv Eng Softw 85:1–11CrossRefGoogle Scholar