Skip to main content
Log in

A 213-line topology optimization code for geometrically nonlinear structures

  • Educational Article
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

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–16

    Article  MATH  Google Scholar 

  • Bourdin B (2001) Filters in topology optimization. Int J Numer Methods Eng 50(9):2143–2158

    Article  MathSciNet  MATH  Google 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–1237

    Article  MATH  Google 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–1430

    Article  MATH  Google 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–4000

    Article  MathSciNet  MATH  Google Scholar 

  • Buhl T, Pedersen C BW, Sigmund O (2000) Stiffness design of geometrically nonlinear structures using topology optimization. Struct Multidiscip Optim 19(2):93–104

    Article  Google 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–454

    Article  MathSciNet  Google 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–2553

    Article  MATH  Google Scholar 

  • Huang X, Xie Y M (2008) Topology optimization of nonlinear structures under displacement loading. Eng Struct 30(7):2057–2068

    Article  Google Scholar 

  • Huang XH, Xie Y (2007) Bidirectional evolutionary topology optimization for structures with geometrical and material nonlinearities. AIAA J 45(1):308–313

    Article  Google Scholar 

  • Huang X, Xie Y-M (2010) A further review of ESO type methods for topology optimization. Struct Multidiscip Optim 41(5):671–683

    Article  Google Scholar 

  • James KA, Waisman H (2016) Layout design of a bi-stable cardiovascular stent using topology optimization. Comput Methods Appl Mech Eng 305:869–890

    Article  MathSciNet  Google Scholar 

  • Klarbring A, Strömberg N (2013) Topology optimization of hyperelastic bodies including non-zero prescribed displacements. Struct Multidiscip Optim 47(1):37–48

    Article  MathSciNet  MATH  Google 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–214

    Article  MathSciNet  MATH  Google 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–797

    Article  MathSciNet  MATH  Google 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):031004

    Article  Google Scholar 

  • Liu K, Tovar A (2014) An efficient 3D topology optimization code written in Matlab. Struct Multidiscip Optim 50(6):1175–1196

    Article  MathSciNet  Google 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–441

    Article  MathSciNet  MATH  Google 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–1410

    Article  MathSciNet  Google Scholar 

  • Qi C, Zhang X, Zhu B (2018b) Topology optimization of fusiform muscles with a maximum contraction. Int J Numer Meth Biomed Engng 34:e3096

    Article  MathSciNet  Google Scholar 

  • Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidiscip Optim 21 (2):120–127

    Article  Google Scholar 

  • Svanberg K (1987) The method of moving asymptotes<aa new method for structural optimization. Int J Numer Methods Eng 24(2):359–373

    Article  MathSciNet  MATH  Google 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–357

    Article  MathSciNet  MATH  Google 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–642

    Article  MathSciNet  Google 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–6496

    Article  Google 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–560

    Article  MathSciNet  Google Scholar 

  • Vivien J (2010) Challis. a discrete level-set topology optimization code written in Matlab. Struct Multidiscip Optim 41(3):453–464

    Article  MathSciNet  MATH  Google Scholar 

  • Wallin M, Ivarsson N, Tortorelli D (2018) Stiffness optimization of non-linear elastic structures. Comput Methods Appl Mech Eng 330:292–307

    Article  MathSciNet  Google 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–472

    Article  MathSciNet  MATH  Google 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):055011

    Article  Google 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–849

    Article  MathSciNet  Google Scholar 

  • Yoon GH, Kim YY (2005) Element connectivity parameterization for topology optimization of geometrically nonlinear structures. Int J Solids Struct 42(7):1983–2009

    Article  MathSciNet  MATH  Google 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–1304

    Article  MATH  Google 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–1260

    Article  MathSciNet  Google 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–329

    Article  MathSciNet  Google Scholar 

  • Zuo ZH, Yi MX (2015) A simple and compact python code for complex 3D topology optimization. Adv Eng Softw 85:1–11

    Article  Google Scholar 

Download references

Funding

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xianmin Zhang.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Responsible Editor: Emilio Carlos Nelli Silva

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

(M 21.4 KB)

(M 22.4 KB)

Appendices

Appendix A

figure a
figure b

Appendix B

Fig. 10
figure 10

The deformation of the first iteration

Table 5 The finite difference check of the sensitivity (in J)

A finite difference check is performed to validated the approximate sensitivity given in Section 2.3. The optimization problem in Section 4.1 with 2 × 8 elements is considered. The additive hyperelasticity technique is utilized. The external load is applied in one node instead of uniformly distributed over nine nodes (Luo et al. 2015) in Section 4.1. The applied external force is 250 N. The sensitivity in the first optimization iteration is checked. The initial density, \(\tilde {x}_{i}\), of all elements is 0.8. The deformation of the first iteration is shown in Fig. 10.

The approximate sensitivity, \({\partial C}/{\partial {{{\tilde {x}}}_{i}}}\), in (20) is obtained. Then, for each element, we reduce the element density, \(\tilde {x}_{i}\), to 0.795 and calculate the corresponding structure compliance. According to the finite difference method, the estimated sensitivity, \({\partial C_{d}}/{\partial {{{\tilde {x}}}_{i}}}\), is given by the following:

$$ {{\frac{\partial C_{d}}{\partial {{{\tilde{x}}}_{i}}}=\frac{{\Delta} C}{{\Delta} {{{\tilde{x}}}_{i}}}}} $$
(27)

where \({\Delta } {{{\tilde {x}}}_{i}}= 0.795-0.8=-~0.005\), ΔC is the increment of the structure compliance.

\({\partial C}/{\partial {{{\tilde {x}}}_{i}}}\) and \({\partial C_{d}}/{\partial {{{\tilde {x}}}_{i}}}\) for each element are given in Table 5.

The approximate sensitivity \({\partial C}/{\partial {{{\tilde {x}}}_{i}}}\) in (20) is nearly the same as the estimated sensitivity, \({\partial C_{d}}/{\partial {{{\tilde {x}}}_{i}}}\), obtained by the finite difference method. The accuracy of the approximation is validated.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chen, Q., Zhang, X. & Zhu, B. A 213-line topology optimization code for geometrically nonlinear structures. Struct Multidisc Optim 59, 1863–1879 (2019). https://doi.org/10.1007/s00158-018-2138-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00158-018-2138-5

Keywords

Navigation