Abstract
This paper presents a computationally efficient MATLAB implementation of two-dimensional/three-dimensional (2D/3D) topology optimization in non-uniform rational basis spline (NURBS) framework for educational purposes. The pseudo-densities and the related weights at control points define the NURBS-based density surface and are also simultaneously taken as the design variables, which extremely increases the computational expense due to the iterative numerical operations at Gauss integration points for isogeometric analysis (IGA) and sensitivity calculation. Thus, this paper designs the page-wise matrix operation and its implementation on graphics processing unit (GPU) to replace the element loop-based iteration to improve the computational efficiency. For the 2D problems, the main program of valid 34 lines of code (Appendix 1) is mainly divided by initialization of lines 3–11, IGA and sensitivity analysis of lines 13–30, and optimizer of lines 32–34. The sensitivity analysis function of valid 51 lines of code (Appendix 2) is programmed by the page-wise matrix operation. The optimization problems are solved by the Method of Moving Asymptotes (MMA) algorithm. The computational efficiency is largely improved in terms of the performance evaluation of the benchmark cases between the page-wise matrix-based procedure structure and the conventional element loop-based iteration algorithm. All programs that support the results of this study are completely provided and serve educational purposes for students and newcomers.
Abbreviations
- 2D:
-
Two-dimensional
- 3D:
-
Three-dimensional
- CAD:
-
Computer-aided design
- ELP:
-
Element loop
- ESO:
-
Evolutionary structural optimization
- GPU:
-
Graphics processing unit
- IGA:
-
Isogeometric analysis
- MMA:
-
Method of Moving Asymptotes
- NURBS:
-
Non-uniform rational basis spline
- PWM:
-
Page-wise matrix
- SIMP:
-
Solid isotropic material with penalization
References
Agrawal V, Gautam SS (2019) IGA: a simplified introduction and implementation details for finite element users. J Inst Eng C 100(3):561–585
Allaire G, Michailidis G (2018) Modal basis approaches in shape and topology optimization of frequency response problems. Int J Numer Methods Eng 113(8):1258–1299
Allaire G, Jouve F, Toader AM (2004) Structural optimization using sensitivity analysis and a level-set method. J Comput Phys 194(1):363–393
Andreassen E, Andreasen CS (2014) How to determine composite material properties using numerical homogenization. Comput Mater Sci 83:488–495
Andreassen E, Clausen A, Schevenels M, Lazarov BS, Sigmund O (2011) Efficient topology optimization in MATLAB using 88 lines of code. Struct Multidisc Optim 43(1):1–16
Bendsøe MP (1989) Optimal shape design as a material distribution problem. Struct Optim 1:193–202
Bendsøe MP, Kikuchi N (1988) Generating optimal topologies in structural design using homogenization method. Comput Methods Appl Mech Eng 71(2):197–224
Bendsøe MP, Sigmund O (2003) Topology optimization: theory, methods and applications. Springer, Berlin
Challis VJ (2010) A discrete level-set topology optimization code written in MATLAB. Struct Multidisc Optim 41(3):453–464
Cheng GD, Jiang Z (1992) Study on topology optimization with stress constraints. Eng Optim 20(2):129–148
Costa G, Montemurro M, Pailhés J (2018) A 2D topology optimization algorithm in NURBS framework with geometric constraints. Int J Mech Mater Des 14:669–696
Costa G, Montemurro M, Pailhés J (2019a) Minimum length scale control in a NURBS-based SIMP method. Comput Methods Appl Mech Eng 354:963–989
Costa G, Montemurro M, Pailhés J, Perry N (2019b) Maximum length scale requirement in a topology optimization method based on NURBS hyper-surfaces. CIRP Ann Manuf Technol 68:153–156
Costa G, Montemurro M, Pailhés J (2021) NURBS hyper-surfaces for 3D topology optimization problems. Mech Adv Mater Struct 28(7):665–684
Cottrell JA, Hughes TJR, Bazilevs Y (2009) Isogeometric analysis: toward integration of CAD and FEA. John, New York
Da CD, Xia L, Li GY, Huang XD (2018) Evolutionary topology optimization of continuum structures with smooth boundary representation. Struct Multidisc Optim 57(6):2143–2159
Dong GY, Tang YL, Zhao YYF (2019) A 149 line homogenization code for three-dimensional cellular materials written in MATLAB. J Eng Mater Technol Trans ASME 141:011005
Gao J, Gao L, Luo Z, Li PG (2019a) Isogeometric topology optimization for continuum structures using density distribution function. Int J Numer Methods Eng 119:991–1017
Gao J, Luo Z, Xia L, Gao L (2019b) Concurrent topology optimization of multiscale composite structures in MATLAB. Struct Multidisc Optim 60(6):2621–2651
Gao J, Xue HP, Gao L, Luo Z (2019c) Topology optimization for auxetic metamaterials based on isogeometric analysis. Comput Methods Appl Mech Eng 352:211–236
Gao J, Luo Z, Xiao M, Gao L, Li PG (2020a) A NURBS-based multi-material interpolation (N-MMI) for isogeometric topology optimization of structures. Appl Math Model 81:818–843
Gao J, Xiao M, Gao L, Yan JH, Yan WT (2020b) Isogeometric topology optimization for computational design of re-entrant and chiral auxetic composites. Comput Methods Appl Mech Eng 362:112876
Gao J, Xiao M, Zhang Y, Gao L (2020c) A comprehensive review of isogeometric topology optimization: methods, applications and prospects. Chinese J Mech Eng 33:87
Gao J, Wang L, Luo Z, Gao L (2021) IgaTop: an implementation of topology optimization for structures using IGA in MATLAB. Struct Multidisc Optim 64(3):223–233
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
Gupta V, Jameel A, Verma SK, Anand S, Anand Y (2023) An insight on NURBS based isogeometric analysis, its current status and involvement in mechanical applications. Arch Comput Methods Eng 30(2):1187–1230
Hassani B, Hinton E (1999) Homogenization and structural topology optimization: theory, practice and software. Springer, Berlin
Hassani B, Khanzadi M, Tavakkoli SM (2012) An isogeometrical approach to structural topology optimization by optimality criteria. Struct Multidisc Optim 45(2):223–233
Huang XD, Xie YM (2010) A further review of ESO type methods for topology optimization. Struct Multidisc Optim 41(5):671–683
Hughes TJR, Cottrell JA, Bazilevs Y (2005) Isogeometric analysis: CAD, finite elements, NURBS, exact geometry and mesh refinement. Comput Methods Appl Mech Eng 194:4135–4195
Kang Z, Wang YQ (2011) Structural topology optimization based on non-local Shepard interpolation of density field. Comput Methods Appl Mech Eng 200(49–52):1669–1700
Kang Z, Wang YQ (2012) A nodal variable method of structural topology optimization based on Shepard interpolant. Int J Numer Methods Eng 90(3):329–342
Liu K, Tovar A (2014) An efficient 3D topology optimization code written in MATLAB. Struct Multidisc Optim 50(6):1175–1196
Liu P, Shi LT, Kang Z (2020) Multi-material structural topology optimization considering material interfacial stress constraints. Comput Methods Appl Mech Eng 363:112887
Montemurro M (2022) On the structural stiffness maximisation of anisotropic continua under inhomogeneous Neumann-Dirichlet boundary conditions. Compos Struct 287:115289
Montemurro M, Roiné T, Pailhès J (2022) Multi-scale design of multi-material lattice structures through a CAD-compatible topology optimisation algorithm. Eng Struct 273:115009
Nguyen VP, Anitescu C, Bordas SPA, Rabczuk T (2015) Isogeometric analysis: an overview and computer implementation aspects. Math Comput Simul 117:89–116
Piegl L, Tiller W (1997) The NURBS book, 2nd edn. Springer, New York
Qian XP (2013) Topology optimization in B-spline space. Comput Methods Appl Mech Eng 265:15–35
Rodriguez T, Montemurro M, Texier PL, Pailhès J (2020) Structural displacement requirement in a topology optimization algorithm based on isogeometric entities. J Optim Theor Appl 184:250–276
Roiné T, Montemurro M, Pailhès J (2021) Stress-based topology optimization through non-uniform rational basis spline hyper-surfaces. Mech Adv Mater Struct 29(23):3387–3407
Sigmund O (2001) A 99 line topology optimization code written in MATLAB. Struct Multidisc Optim 21(2):120–127
Sigmund O, Maute K (2013) Topology optimization approaches: a comparative review. Struct Multidisc Optim 48(6):1031–1055
Spink M, Claxton D, de Falco C, Vázquez R (2001) NURBS Toolbox. http://octave.sourceforge.net/nurbs
Suzuki K, Kikuchi N (1991) A homogenization method for shape and topology optimization. Comput Methods Appl Mech Eng 93(3):291–318
Svanberg K (1987) The method of moving asymptotes—a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373
Svanberg K (2002) A class of globally convergent optimization methods based on conservative convex separable approximations. SIAM J Optim 12(2):555–573
Thel S, Hahn D, Haupt M, Heimbs S (2022) A passive load alleviation aircraft wing: topology optimization for maximizing nonlinear bending-torsion coupling. Struct Multidisc Optim 65(5):155
Voet Y (2023) On the fast assemblage of finite element matrices with application to nonlinear heat transfer problems. Appl Math Comput 436:127516
Wang MY, Wang XM, Guo DM (2003) A level set method for structural topology optimization. Comput Methods Appl Mech Eng 192(1–2):227–324
Wei P, Li ZY, Li XP, Wang MY (2018) An 88-line MATLAB code for the parameterized level set method based topology optimization using radial basis functions. Struct Multidisc Optim 58(2):831–849
Xia L, Breitkopf P (2015) Design of materials using topology optimization and energy-based homogenization approach in MATLAB. Struct Multidisc Optim 52(6):1229–1241
Xie YM, Steven GP (1993) A simple evolutionary procedure for structural optimization. Comput Struct 49(5):885–896
Xie YM, Steven GP (1997) Evolutionary structural optimization. Springer, London
Xu J, Gao L, Xiao M, Gao J, Li H (2020) Isogeometric topology optimization for rational design of ultra-lightweight architected materials. Int J Mech Sci 166:105103
Zhang ZD, Ibhadode O, Bonakdar A, Toyserkani E (2021) TopADD: a 2D/3D integrated topology optimization parallel-computing framework for arbitrary design domains. Struct Multidisc Optim 64(3):1701–1723
Zhou M, Rozvany GIN (1991) The COC algorithm, part II: topological, geometry and generalized shape optimization. Comput Methods Appl Mech Eng 89(1–3):309–336
Acknowledgements
The authors are grateful to Professor K. Svanberg for the assistance on the MMA and GCMMA algorithms. The insightful comments of the reviewers are cordially appreciated.
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 source codes can be downloaded from the relative website of this paper. All the presented results are obtained by direct running of the codes.
Additional information
Responsible Editor: Shikui Chen
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix 1
Appendix 2
Appendix 3
The meanings of some parameters mentioned in this paper are presented in Table 11, and the information on other parameters can be obtained according to the instruction of the available codes.
Rights and permissions
About this article
Cite this article
Zhuang, C., Xiong, Z. & Ding, H. An efficient 2D/3D NURBS-based topology optimization implementation using page-wise matrix operation in MATLAB. Struct Multidisc Optim 66, 254 (2023). https://doi.org/10.1007/s00158-023-03701-x
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00158-023-03701-x