Skip to main content
Log in

IgaTop: an implementation of topology optimization for structures using IGA in MATLAB

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

Abstract

In this paper, the key intention is to present a compact and efficient MATLAB code for the implementation of the isogeometric topology optimization (ITO) method published by Jie Gao et al. (Int J Numer Methods Eng 119: 991–1017, 2019). A main function IgaTop2D with eight inputs in the 56-line MATLAB code is developed, mainly including nine components: (1) Geom_Mod subfunction that uses non-uniform rational B-splines (NURBS) to develop the geometrical model; (2) the preparation of the isogeometric analysis (IGA) that is implemented in Pre_IGA subfunction; (3) the definition of Dirichlet and Neumann boundary conditions in Boun_Cond subfunction; (4) the initialization of control densities and the densities at Gauss quadrature points implemented from lines 11 to 20 of the main function; (5) a Shep_Fun subfunction for the smoothing mechanism; (6) IGA to solve structural responses in three steps: compute IGA element stiffness matrices in Stiff_Ele2D subfunction, assemble all IGA element stiffness matrices in Stiff_Ass2D subfunction, and Solving; (7) calculation of the objective function and sensitivity analysis in lines 32–46 of IgaTop2D; (8) OC to advance design variables; and (9) the representations of the optimized solutions in Plot_Data and Plot_Topy subfunctions. Finally, several numerical examples are shown to demonstrate the effectiveness of the ITO MATLAB implementation IgaTop2D, which are attached in the Appendix, also offering an entry point for newcomers who have an interest in the field of the ITO.

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
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

References

  • Agrawal V, Gautam SS (2019) IGA: a simplified introduction and implementation details for finite element users. J Inst Eng Ser C 100:561–585

    Google Scholar 

  • Allaire G, Jouve F, Toader AM (2004) Structural optimization using sensitivity analysis and a level-set method. J Comput Phys 194:363–393

    MathSciNet  MATH  Google Scholar 

  • Andreassen E, Clausen A, Schevenels M et al (2011) Efficient topology optimization in MATLAB using 88 lines of code. Struct Multidiscip Optim 43:1–16

    MATH  Google Scholar 

  • Bendsøe M, Kikuchi N (1988) Generating optimal topologies in stuctural design using a homogenization method. Comput Methods Appl Mech Eng 71:197–224

    MATH  Google Scholar 

  • Bendsøe MP, Sigmund O (1999) Material interpolation schemes in topology optimization. Arch Appl Mech 69:635–654

    MATH  Google Scholar 

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

    MathSciNet  MATH  Google Scholar 

  • Chen Q, Zhang X, Zhu B (2019) A 213-line topology optimization code for geometrically nonlinear structures. Struct Multidiscip Optim 59:1863–1879

    MathSciNet  Google Scholar 

  • Chu S, Gao L, Xiao M, Li H (2019) Design of sandwich panels with truss cores using explicit topology optimization. Compos Struct 210:892–905

    Google Scholar 

  • Cottrell JA, Hughes TJR, Bazilevs Y (2009) Isogeometric analysis: toward integration of CAD and FEA[M]. John Wiley & Sons

  • Da D, Xia L, Li G, Huang X (2018) Evolutionary topology optimization of continuum structures with smooth boundary representation. Struct Multidiscip Optim 57:2143–2159

    MathSciNet  Google Scholar 

  • De Boor C (1978) A practical guide to splines. Springer-Verlag, New York

    MATH  Google Scholar 

  • de Falco C, Reali A, Vázquez R (2011) GeoPDEs: a research tool for isogeometric analysis of PDEs. Adv Eng Softw 42:1020–1034

    MATH  Google Scholar 

  • Dedè L, Borden MJ, Hughes TJR (2012) Isogeometric analysis for topology optimization with a phase field model. Arch Comput Methods Eng 19:427–465

    MathSciNet  MATH  Google Scholar 

  • Du B, Zhao Y, Yao W et al (2020) Multiresolution isogeometric topology optimisation using moving morphable voids. Comput Model Eng Sci 122:1119–1140

    Google Scholar 

  • Ferrari F, Sigmund O (2020) A new generation 99 line Matlab code for compliance topology optimization and its extension to 3D. Struct Multidiscip Optim 62:2211–2228

    MathSciNet  Google Scholar 

  • Gai Y, Zhu X, Zhang YJ et al (2020) Explicit isogeometric topology optimization based on moving morphable voids with closed B-spline boundary curves. Struct Multidiscip Optim 61:963–982

    MathSciNet  Google Scholar 

  • Gao J, Li H, Gao L, Xiao M (2018) Topological shape optimization of 3D micro-structured materials using energy-based homogenization method. Adv Eng Softw 116:89–102

    Google Scholar 

  • Gao J, Gao L, Luo Z, Li P (2019a) Isogeometric topology optimization for continuum structures using density distribution function. Int J Numer Methods Eng 119:991–1017

    MathSciNet  Google Scholar 

  • Gao J, Luo Z, Li H, Gao L (2019b) Topology optimization for multiscale design of porous composites with multi-domain microstructures. Comput Methods Appl Mech Eng 344:451–476

    MathSciNet  MATH  Google Scholar 

  • Gao J, Luo Z, Xia L, Gao L (2019c) Concurrent topology optimization of multiscale composite structures in Matlab. Struct Multidiscip Optim 60:2621–2651

    MathSciNet  Google Scholar 

  • Gao J, Xue H, Gao L, Luo Z (2019d) Topology optimization for auxetic metamaterials based on isogeometric analysis. Comput Methods Appl Mech Eng 352:211–236

    MathSciNet  MATH  Google Scholar 

  • Gao J, Luo Z, Xiao M et al (2020a) A NURBS-based multi-material interpolation (N-MMI) for isogeometric topology optimization of structures. Appl Math Model 81:818–843

    MathSciNet  Google Scholar 

  • Gao J, Xiao M, Gao L et al (2020b) Isogeometric topology optimization for computational design of re-entrant and chiral auxetic composites. Comput Methods Appl Mech Eng 362:112876

    MathSciNet  MATH  Google Scholar 

  • 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. https://doi.org/10.1186/s10033-020-00503-w

    Article  Google Scholar 

  • Ghasemi H, Park HS, Rabczuk T (2017) A level-set based IGA formulation for topology optimization of flexoelectric materials. Comput Methods Appl Mech Eng 313:239–258

    MathSciNet  MATH  Google Scholar 

  • Guo X, Zhang W, Zhong W (2014) Doing topology optimization explicitly and geometrically—a mew moving morphable components based framework. J Appl Mech 81:081009

    Google Scholar 

  • Hassani B, Khanzadi M, Tavakkoli SM (2012) An isogeometrical approach to structural topology optimization by optimality criteria. Struct Multidiscip Optim 45:223–233

    MathSciNet  MATH  Google Scholar 

  • Hou W, Gai Y, Zhu X et al (2017) Explicit isogeometric topology optimization using moving morphable components. Comput Methods Appl Mech Eng 326:694–712

    MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  • Hughes TJR (2012) The finite element method: linear static and dynamic finite element analysis. Courier Corporation

  • Hughes TJR, Cottrell JAA, Bazilevs Y (2005) Isogeometric analysis: CAD, finite elements, NURBS, exact geometry and mesh refinement. Comput Methods Appl Mech Eng 194:4135–4195

    MathSciNet  MATH  Google Scholar 

  • Jahangiry HA, Tavakkoli SM (2017) An isogeometrical approach to structural level set topology optimization. Comput Methods Appl Mech Eng 319:240–257

    MathSciNet  MATH  Google Scholar 

  • Kang Z, Wang Y (2011) Structural topology optimization based on non-local Shepard interpolation of density field. Comput Methods Appl Mech Eng 200:3515–3525

    MathSciNet  MATH  Google Scholar 

  • Kang Z, Wang Y (2012) A nodal variable method of structural topology optimization based on Shepard interpolant. Int J Numer Methods Eng 90:329–342

    MathSciNet  MATH  Google Scholar 

  • Kato J, Ogawa S, Ichibangase T, Takaki T (2018) Multi-phase field topology optimization of polycrystalline microstructure for maximizing heat conductivity. Struct Multidiscip Optim 57:1937–1954

    MathSciNet  Google Scholar 

  • Li H, Luo Z, Zhang N et al (2016) Integrated design of cellular composites using a level-set topology optimization method. Comput Methods Appl Mech Eng 309:453–475

    MathSciNet  MATH  Google Scholar 

  • 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:411–431

    Google Scholar 

  • Lieu QX, Lee J (2017a) Multiresolution topology optimization using isogeometric analysis. Int J Numer Methods Eng 112:2025–2047

    MathSciNet  Google Scholar 

  • Lieu QX, Lee J (2017b) A multi-resolution approach for multi-material topology optimization based on isogeometric analysis. Comput Methods Appl Mech Eng 323:272–302

    MathSciNet  MATH  Google Scholar 

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

    MathSciNet  Google Scholar 

  • Nguyen VP, Anitescu C, Bordas SPA, Rabczuk T (2015) Isogeometric analysis: an overview and computer implementation aspects. Math Comput Simul 117:89–116

    MathSciNet  MATH  Google Scholar 

  • Nguyen C, Zhuang X, Chamoin L et al (2020) Three-dimensional topology optimization of auxetic metamaterial using isogeometric analysis and model order reduction. Comput Methods Appl Mech Eng 371:113306

    MathSciNet  MATH  Google Scholar 

  • Nishi S, Yamada T, Izui K et al (2020) Isogeometric topology optimization of anisotropic metamaterials for controlling high-frequency electromagnetic wave. Int J Numer Methods Eng 121:1218–1247

    MathSciNet  Google Scholar 

  • 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:1159–1172

    MathSciNet  Google Scholar 

  • 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:935–954

  • Piegl L, Tiller W (2012) The NURBS book. Springer Science & Business Media

  • Qian X (2013) Topology optimization in B-spline space. Comput Methods Appl Mech Eng 265:15–35

    MathSciNet  MATH  Google Scholar 

  • Sanders ED, Pereira A, Aguiló MA, Paulino GH (2018) PolyMat: an efficient Matlab code for multi-material topology optimization. Struct Multidiscip Optim 58:2727–2759

    MathSciNet  Google Scholar 

  • Seo Y-D, Kim H-J, Youn S-K (2010) Isogeometric topology optimization using trimmed spline surfaces. Comput Methods Appl Mech Eng 199:3270–3296

    MathSciNet  MATH  Google Scholar 

  • Sethian JA, Wiegmann A (2000) Structural boundary design via level set and immersed interface methods. J Comput Phys 163:489–528

    MathSciNet  MATH  Google Scholar 

  • Shepard D (1968) A two-dimensional interpolation function for irregularly-spaced data. In: Proceedings of the 1968 23rd ACM national conference. ACM, pp 517–524

  • Sigmund O (1994) Materials with prescribed constitutive parameters: an inverse homogenization problem. Int J Solids Struct 31:2313–2329

    MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  • Spink M, Claxton D, Falco C de, Vazquez R (2010) NURBS toolbox. Octave Forge. https://octave.sourceforge.io/nurbs/overview.html

  • Suresh K (2010) A 199-line Matlab code for Pareto-optimal tracing in topology optimization. Struct Multidiscip Optim 42:665–679

    MathSciNet  MATH  Google Scholar 

  • Taheri AH, Suresh K (2017) An isogeometric approach to topology optimization of multi-material and functionally graded structures. Int J Numer Methods Eng 109:668–696

    MathSciNet  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:329–357

    MathSciNet  MATH  Google Scholar 

  • Vázquez R (2016) A new design for the implementation of isogeometric analysis in Octave and Matlab: GeoPDEs 3.0. Comput Math Appl 72:523–554

    MathSciNet  MATH  Google Scholar 

  • Vogiatzis P, Chen S, Wang X et al (2017a) Topology optimization of multi-material negative Poisson’s ratio metamaterials using a reconciled level set method. Comput Des 83:15–32

    MathSciNet  Google Scholar 

  • Vogiatzis P, Chen S, Zhou C (2017b) An open source framework for integrated additive manufacturing and level-set-based topology optimization. J Comput Inf Sci Eng 17:041012

    Google Scholar 

  • Wang Y, Benson DJ (2016) Isogeometric analysis for parameterized LSM-based structural topology optimization. Comput Mech 57:19–35

    MathSciNet  MATH  Google Scholar 

  • Wang Z-P, Poh LH (2018) Optimal form and size characterization of planar isotropic petal-shaped auxetics with tunable effective properties using IGA. Compos Struct 201:486–502

    Google Scholar 

  • Wang S, Wang MY (2006) Radial basis functions and level set method for structural topology optimization. Int J Numer Methods Eng 65:2060–2090

    MathSciNet  MATH  Google Scholar 

  • Wang MY, Wang X, Guo D (2003) A level set method for structural topology optimization. Comput Methods Appl Mech Eng 192:227–246

    MathSciNet  MATH  Google Scholar 

  • Wang Y, Chen F, Wang MY (2017a) Concurrent design with connectable graded microstructures. Comput Methods Appl Mech Eng 317:84–101

    MathSciNet  MATH  Google Scholar 

  • Wang Z-P, Poh LH, Dirrenberger J et al (2017b) Isogeometric shape optimization of smoothed petal auxetic structures via computational periodic homogenization. Comput Methods Appl Mech Eng 323:250–271

    MathSciNet  MATH  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:831–849

    MathSciNet  Google Scholar 

  • Xia L, Breitkopf P (2014) Concurrent topology optimization design of material and structure within FE2 nonlinear multiscale analysis framework. Comput Methods Appl Mech Eng 278:524–542

    MATH  Google Scholar 

  • Xia L, Breitkopf P (2015) Design of materials using topology optimization and energy-based homogenization approach in Matlab. Struct Multidiscip Optim 52:1229–1241

    MathSciNet  Google Scholar 

  • Xia Z, Wang Y, Wang Q, Mei C (2017) GPU parallel strategy for parameterized LSM-based topology optimization using isogeometric analysis. Struct Multidiscip Optim 56:413–434

    MathSciNet  Google Scholar 

  • Xie YM, Steven GP (1993) A simple evolutionary procedure for structural optimization. Comput Struct 49:885–969

    Google Scholar 

  • Xie X, Wang S, Xu M, Wang Y (2018) A new isogeometric topology optimization using moving morphable components based on R-functions and collocation schemes. Comput Methods Appl Mech Eng 339:61–90

    MathSciNet  MATH  Google Scholar 

  • Xie X, Wang S, Xu M et al (2020) A hierarchical spline based isogeometric topology optimization using moving morphable components. Comput Methods Appl Mech Eng 360:112696

    MathSciNet  MATH  Google Scholar 

  • Xu J, Gao L, Xiao M et al (2020) Isogeometric topology optimization for rational design of ultra-lightweight architected materials. Int J Mech Sci 166:105103

    Google Scholar 

  • Yang WY, Zhang WS, Guo X (2016) Explicit structural topology optimization via moving morphable voids (MMV) approach. In: 2016 Asian Congress of Structural and Multidisciplinary Optimization, Nagasaki, Japan. p 98

  • Zhang W, Yuan J, Zhang J, Guo X (2016) A new topology optimization approach based on moving morphable components (MMC) and the ersatz material model. Struct Multidiscip Optim 53:1243–1260

    MathSciNet  Google Scholar 

  • Zhang W, Yang W, Zhou J et al (2017) Structural topology optimization through explicit boundary evolution. J Appl Mech 84:011011

    Google Scholar 

  • Zhang W, Li D, Kang P et al (2020a) Explicit topology optimization using IGA-based moving morphable void (MMV) approach. Comput Methods Appl Mech Eng 360:112685

    MathSciNet  MATH  Google Scholar 

  • Zhang Y, Xiao M, Gao L et al (2020b) Multiscale topology optimization for minimizing frequency responses of cellular composites with connectable graded microstructures. Mech Syst Signal Process 135:106369

    Google Scholar 

  • Zhao G, Yang J, Wang W et al (2020a) T-splines based isogeometric topology optimization with arbitrarily shaped design domains. Comput Model Eng Sci 123:1033–1059

    Google Scholar 

  • Zhao Q, Fan C-M, Wang F, Qu W (2020b) Topology optimization of steady-state heat conduction structures using meshless generalized finite difference method. Eng Anal Bound Elem 119:13–24

    MathSciNet  MATH  Google Scholar 

  • Zhou M, Rozvany GIN (1991) The COC algorithm, Part II: Topological, geometrical and generalized shape optimization. Comput Methods Appl Mech Eng 89:309–336

    Google Scholar 

Download references

Acknowledgements

The authors wish to thank Dr. Phu Nguyen, a Lecturer from Department of Civil Engineering, Monash University. Dr. Phu Nguyen offers the complete MATLAB code of IGA (Nguyen et al. 2015) for us to extensively understand the concept and numerical implementation of IGA.

This work was partially supported by the Fundamental Research Funds for the Central Universities of Huazhong University of Science and Technology (5003123021) and the Program for HUST Academic Frontier Youth Team (2017QYTD04).

Author information

Authors and Affiliations

Authors

Contributions

Jie Gao wrote the paper with the conceptualization, writing, formal analysis, investigation and methodology. Prof. Lin Wang, Prof. Zhen Luo and Prof. Liang Gao provided support, including reviewing, modifying and proofing, for this paper. Prof. Liang Gao and Prof. Zhen Luo provided the project support for this paper, and they are co-corresponding authors of this paper. Email of Prof. Zhen Luo: zhen.luo@uts.edu.au and Email of Prof. Liang Gao: gaoliang@mail.hust.edu.cn.

Corresponding author

Correspondence to Liang Gao.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Responsible Editor: Shikui Chen

Publisher's note

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

Supplementary information

ESM 1

(M 4 kb)

ESM 2

(M 3 kb)

ESM 3

(M 3 kb)

ESM 4

(M 4 kb)

ESM 5

(M 3 kb)

ESM 6

(M 3 kb)

ESM 7

(M 5 kb)

ESM 8

(M 3 kb)

ESM 9

(M 3 kb)

ESM 10

(M 3 kb)

ESM 11

(M 4 kb)

Appendix

Appendix

1.1 A 56-line MATLAB code for the main function IgaTop2D

figure jm

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gao, J., Wang, L., Luo, Z. et al. IgaTop: an implementation of topology optimization for structures using IGA in MATLAB. Struct Multidisc Optim 64, 1669–1700 (2021). https://doi.org/10.1007/s00158-021-02858-7

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00158-021-02858-7

Keywords

Navigation