Abstract
This paper presents an efficient and compact MATLAB code for three-dimensional stress-based sensitivity analysis. The 146 lines code includes the finite element analysis and p-norm stress sensitivity analysis based on the adjoint method. The 3D sensitivity analysis for p-norm global stress measure is derived and explained in detail accompanied by corresponding MATLAB code. The correctness of the analytical sensitivity is verified by comparison with finite difference approximation. The nonlinear optimization solver is chosen as the Method of moving asymptotes (MMA). Three typical volume-constrained stress minimization problems are presented to verify the effectiveness of sensitivity analysis code. The MATLAB code presented in this paper can be extended to resolve different stress related 3D topology optimization problems. The complete program for sensitivity analysis is given in the Appendix and is intended for educational purposes. MATLAB code is additionally provided in electronic supplementary material for a simple cantilever beam optimization.
Similar content being viewed by others
Change history
08 July 2022
A Correction to this paper has been published: https://doi.org/10.1007/s11081-022-09739-y
References
Aage N, Andreassen E, Lazarov BS (2015) Topology optimization using PETSc: an easy-to-use, fully parallel, open source topology optimization framework. Struct Multidiscip Optim 51(3):565–572
Allaire G, Jouve F (2008) Minimum stress optimal design with the level set method. Eng Anal Bound Elem 32(11):909–918
Allaire G, Dapogny C, Frey P (2014) Shape optimization with a level set based mesh evolution method. Comput Methods Appl Mech Eng 282:22–53
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
Bendsoe MP, Sigmund O (2013) Topology optimization: theory, methods, and applications. Springer Science & Business Media.
Bendsoe MP, Kikuchi N (1988) Generating optimal topologies in structural design using a homogenization method. Comput Methods Appl Mech Eng 71(2):197–224
Bendsøe MP, Sigmund O (1999) Material interpolation schemes in topology optimization. Arch Appl Mech 69(9–10):635–654
Bruggi M, Duysinx P (2012) Topology optimization for minimum weight with compliance and stress constraints. Struct Multidiscip Optim 46(3):369–384
Cai S, Zhang W (2015) Stress constrained topology optimization with free-form design domains. Comput Methods Appl Mech Eng 289:267–290
Challis VJ (2010) A discrete level-set topology optimization code written in Matlab. Struct Multidiscip Optim 41(3):453–464
Chen Q, Zhang X, Zhu B (2019) A 213-line topology optimization code for geometrically nonlinear structures. Struct Multidiscip Optim 59(5):1863–1879
Cheng G, Guo X (1997) ε-relaxed approach in structural topology optimization. Struct Optim 13(4):258–266
Dapogny C, Frey P, Omnès F, Privat Y (2018) Geometrical shape optimization in fluid mechanics using FreeFem++. Struct Multidiscip Optim 58(6):2761–2788
Deng H, To AC (2020) Topology optimization based on deep representation learning (DRL) for compliance and stress-constrained design. Comput Mech 66:449–469
Deng H, Cheng L, To AC (2019) Distortion energy-based topology optimization design of hyperelastic materials. Struct Multidiscip Optim 59(6):1895–1913
Deng H, Hinnebusch S, To AC (2020a) Topology optimization design of stretchable metamaterials with Bézier skeleton explicit density (BSED) representation algorithm. Comput Methods Appl Mech Eng 366:113093
Deng H, Cheng L, Liang X, Hayduke D, To AC (2020b) Topology optimization for energy dissipation design of lattice structures through snap-through behavior. Comput Methods Appl Mech Eng 358:112641
Duysinx P, Sigmund O (1998) New developments in handling stress constraints in optimal material distribution. In 7th AIAA/USAF/NASA/ISSMO symposium on multidisciplinary analysis and optimization, p 4906.
Duysinx P, Bendsøe MP (1998) Topology optimization of continuum structures with local stress constraints. Int J Numer Meth Eng 43(8):1453–1478
Emmendoerfer H Jr, Fancello EA (2016) Topology optimization with local stress constraint based on level set evolution via reaction–diffusion. Comput Methods Appl Mech Eng 305:62–88
Fan Z, Xia L, Lai W, Xia Q, Shi T (2019) Evolutionary topology optimization of continuum structures with stress constraints. Struct Multidiscip Optim 59(2):647–658
Ferrari F, Sigmund O (2020) A new generation 99 line Matlab code for compliance Topology Optimization and its extension to 3D. arXiv preprint arXiv:2005.05436.
Gao J, Luo Z, Xia L, Gao L (2019) Concurrent topology optimization of multiscale composite structures in Matlab. Struct Multidiscip Optim 60(6):2621–2651
Guo X, Zhang WS, Wang MY, Wei P (2011) Stress-related topology optimization via level set approach. Comput Methods Appl Mech Eng 200(47–48):3439–3452
Holmberg E, Torstenfelt B, Klarbring A (2013) Stress constrained topology optimization. Struct Multidiscip Optim 48(1):33–47
Huang X, Xie Y-M (2010) A further review of ESO type methods for topology optimization. Struct Multidiscip Optim 41(5):671–683
James KA, Lee E, Martins JR (2012) Stress-based topology optimization using an isoparametric level set method. Finite Elem Anal Des 58:20–30
Kambampati S, Gray JS, Kim HA (2020) Level set topology optimization of structures under stress and temperature constraints. Comput Struct 235:106265
Kirsch U (1990) On singular topologies in optimum structural design. Struct Optim 2(3):133–142
Kočvara M, Stingl M (2012) Solving stress constrained problems in topology and material optimization. Struct Multidiscip Optim 46(1):1–15
Laurain A (2018) A level set-based structural optimization code using FEniCS. Struct Multidiscip Optim 58(3):1311–1334
Le C, Norato J, Bruns T, Ha C, Tortorelli D (2010) Stress-based topology optimization for continua. Struct Multidiscip Optim 41(4):605–620
Liang Y, Cheng G (2020) Further elaborations on topology optimization via sequential integer programming and Canonical relaxation algorithm and 128-line MATLAB code. Struct Multidiscip Optim 61(1):411–431
Lin H, Xu A, Misra A, Zhao R (2020) An ANSYS APDL code for topology optimization of structures with multi-constraints using the BESO method with dynamic evolution rate (DER-BESO). Struct Multidiscip Optim 62:1–26
Liu K, Tovar A (2014) An efficient 3D topology optimization code written in Matlab. Struct Multidiscip Optim 50(6):1175–1196
Liu Z, Korvink JG, Huang R (2005) Structure topology optimization: fully coupled level set method via FEMLAB. Struct Multidiscip Optim 29(6):407–417
Loyola RA, Querin OM, Jiménez AG, Gordoa CA (2018) A sequential element rejection and admission (SERA) topology optimization code written in Matlab. Struct Multidiscip Optim 58(3):1297–1310
Luo Y, Wang MY, Kang Z (2013) An enhanced aggregation method for topology optimization with local stress constraints. Comput Methods Appl Mech Eng 254:31–41
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(5):1159–1172
París J, Navarrina F, Colominas I, Casteleiro M (2009) Topology optimization of continuum structures with local and global stress constraints. Struct Multidiscip Optim 39(4):419–437
Paris J, Navarrina F, Colominas I, Casteleiro M (2010) Stress constraints sensitivity analysis in structural topology optimization. Comput Methods Appl Mech Eng 199(33–36):2110–2122
Pereira A, Talischi C, Paulino GH, Menezes IF, Carvalho MS (2016) Fluid flow topology optimization in PolyTop: stability and computational implementation. Struct Multidiscip Optim 54(5):1345–1364
Picelli R, Townsend S, Brampton C, Norato J, Kim HA (2018a) Stress-based shape and topology optimization with the level set method. Comput Methods Appl Mech Eng 329:1–23
Picelli R, Townsend S, Kim HA (2018b) Stress and strain control via level set topology optimization. Struct Multidiscip Optim 58(5):2037–2051
Picelli R, Sivapuram R, Xie YM (2020) A 101-line MATLAB code for topology optimization using binary variables and integer programming. Struct Multidiscip Optim 63:1–20
Sanders ED, Pereira A, Aguiló MA, Paulino GH (2018) PolyMat: an efficient Matlab code for multi-material topology optimization. Struct Multidiscip Optim 58(6):2727–2759
Senhora FV, Giraldo-Londono O, Menezes IF, Paulino GH (2020) Topology optimization with local stress constraints: a stress aggregation-free approach. Struct Multidiscip Optim 62(4):1639–1668
Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidiscip Optim 21(2):120–127
Sigmund O (2007) Morphology-based black and white filters for topology optimization. Struct Multidiscip Optim 33(4–5):401–424
Smith H, Norato JA (2020) A MATLAB code for topology optimization using the geometry projection method. Struct Multidiscip Optim 62:1–16
Song Y, Ma Q, He Y, Zhou M, Wang MY (2020) Stress-based shape and topology optimization with cellular level set in B-splines. Struct Multidiscip Optim 62(5):2391–2407
Suresh K (2010) A 199-line Matlab code for Pareto-optimal tracing in topology optimization. Struct Multidiscip Optim 42(5):665–679
Suresh K, Takalloozadeh M (2013) Stress-constrained topology optimization: a topological level-set approach. Struct Multidiscip Optim 48(2):295–309
Svanberg K (1987) The method of moving asymptotes—a new method for structural optimization. Int J Numer Meth Eng 24(2):359–373
Talischi C, Paulino GH, Pereira A, Menezes IF (2012) PolyTop: a Matlab implementation of a general topology optimization framework using unstructured polygonal finite element meshes. Struct Multidiscip Optim 45(3):329–357
Van Miegroet L, Duysinx P (2007) Stress concentration minimization of 2D filets using X-FEM and level set description. Struct Multidiscip Optim 33(4–5):425–438
Wang MY, Li L (2013) Shape equilibrium constraint: a strategy for stress-constrained structural topology optimization. Struct Multidiscip Optim 47(3):335–352
Wang MY, Wang X, Guo D (2003) A level set method for structural topology optimization. Comput Methods Appl Mech Eng 192(1–2):227–246
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
Xia L, Breitkopf P (2015) Design of materials using topology optimization and energy-based homogenization approach in Matlab. Struct Multidiscip Optim 52(6):1229–1241
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:55–64
Xia Q, Wang MY, Shi T (2014) A level set method for shape and topology optimization of both structure and support of continuum structures. Comput Methods Appl Mech Eng 272:340–353
Xia L, Zhang L, Xia Q, Shi T (2018) Stress-based topology optimization using bi-directional evolutionary structural optimization method. Comput Methods Appl Mech Eng 333:356–370
Yang D, Liu H, Zhang W, Li S (2018) Stress-constrained topology optimization based on maximum stress measures. Comput Struct 198:23–39
Zegard T, Paulino GH (2014) GRAND—Ground structure based topology optimization for arbitrary 2D domains using MATLAB. Struct Multidiscip Optim 50(5):861–882
Zhang WS, Guo X, Wang MY, Wei P (2013) Optimal topology design of continuum structures with stress concentration alleviation via level set method. Int J Numer Meth Eng 93(9):942–959
Zhang S, Norato JA, Gain AL, Lyu N (2016) A geometry projection method for the topology optimization of plate structures. Struct Multidiscip Optim 54(5):1173–1190
Zhang S, Gain AL, Norato JA (2017) Stress-based topology optimization with discrete geometric components. Comput Methods Appl Mech Eng 325:1–21
Zhang W, Li D, Zhou J, Du Z, Li B, Guo X (2018) A moving morphable void (MMV)-based explicit approach for topology optimization considering stress constraints. Comput Methods Appl Mech Eng 334:381–413
Zhu B et al (2020) Design of compliant mechanisms using continuum topology optimization: a review. Mech Mach Theory 143:103622
Acknowledgements
The financial support for this work from National Science Foundation (CMMI-1634261) is gratefully acknowledged. The authors would like to thank Krister Svanberg for providing the MATLAB implementation of his Method of Moving Asymptotes, which was used in this work.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The original online version of this article was revised:
Appendices
Appendix A: MATLAB Program Stress_3D_Sensitivity
The MATLAB code used in this work can be downloaded from: https://github.com/PittAMRL/StressTopOpt.
Appendix B: MATLAB Program Plot_von_Mises
Rights and permissions
About this article
Cite this article
Deng, H., Vulimiri, P.S. & To, A.C. An efficient 146-line 3D sensitivity analysis code of stress-based topology optimization written in MATLAB. Optim Eng 23, 1733–1757 (2022). https://doi.org/10.1007/s11081-021-09675-3
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11081-021-09675-3