1 Introduction

Topology optimization has become the most commonly used design method in structural design and material optimization design. Since the homogenization method (Bendsøe and Kikuchi 1988) was proposed in 1988, topology optimization has attracted tremendous attention from a large number of scholars and entered a stage of rapid development. In the past few decades, a variety of topology optimization methods, such as the solid isotropic material with penalization (SIMP) method (Bendsøe and Sigmund 1999; Sigmund 2001), the level set method (LSM) (Sethian and Wiegmann 2000; Wang et al. 2003), the evolutionary structural optimization (ESO) method (Xie and Steven 1993; Zhang et al. 2018), the moving morphable components/voids (MMC/Vs) method (Guo et al. 2014; Zhang et al. 2016), and the moving iso-surface threshold (MIST) method (Tong and Lin 2011; Vasista and Tong 2014) have been developed successively.

In MIST, similar to SIMP, artificial densities are introduced on the element as design variables. Similar to ESO, the physical response of the objective function is employed. Similar to LSM, a moving iso-surface threshold is defined to evolve the structural boundaries. Similar to LSM, but unlike SIMP and ESO, MIST can generate optimal topologies with clear, non-zigzag structural boundaries. Similar to ESO, but unlike SIMP and LSM, MIST does not require explicit sensitivity analysis. Therefore, MIST does not need to store and extract element stiffness, simplifying the interface to in-house or commercial finite element analysis programs without any modification to the commercial software source code. In this way, the user can fully master MIST, continuously develop it and utilize the powerful tools and functions of commercial software, such as the automatic mesh and efficient solution generators. The algorithm has already been used to solve a variety of structural topology optimization issues, e.g., pressurized cellular planar morphing structure design (Vasista and Tong 2012), pressure-driven morphing-aerofoil trailing-edge structure design (Vasista and Tong 2013), three-dimensional structure design (Vasista and Tong 2014), piezoelectric structure design (Luo and Tong 2015a), structural buckling problem (Luo and Tong 2015b), two-scale homogeneous structural optimization (Chen et al. 2017), microstructure design with extreme properties (Chen et al. 2018), and two-scale inhomogeneous structural optimization (Su et al. 2021).

In the previously mentioned topology optimization methods, the classical finite element method (FEM) (Andrianov et al. 2008) is applied for structural response analysis. The geometry model and numerical analysis model are established based on spline basis functions and Lagrangian/Hermitian polynomials, respectively. The inconsistency of the geometrical model and the analysis model leads to the following disadvantages in the finite element method when calculating the structural response. First, the finite element mesh is just an approximant of the structural geometry, rather than the exact representation. Therefore, discretization error will be generated, the accuracy of structural response analysis will be greatly affected in FEM. Second, the structural response has low-order (C0) continuity between adjacent finite elements, and when higher-order elements are used, the efficiency is greatly reduced. Third, it takes a great deal of time to obtain a high-quality finite element mesh. In addition, topology optimization based on FEM usually requires postprocessing to extract geometric information from the resulting designs. This allows topology optimization results to be imported to a computer-aided design (CAD)/computer-aided engineering (CAE) system for subsequent detailed size and shape optimization. The postprocessing is troublesome and difficult, requiring a considerable time cost to achieve high-quality CAD designs. This also limits the wide application of topology optimization in industry. To overcome the abovementioned shortcomings, the IGA method was proposed by Hughes et al. (2005) as a promising and powerful alternative to FEM to implement structural analysis. In IGA, the same spline basis functions are applied into the representation of the structural geometry and solve the numerical analysis. This unification of the mathematical model in structural geometry and numerical analysis can effectively eliminate the above numerical drawbacks in FEM and provide more benefits for later topology optimization.

The role of IGA in topology optimization has received increased attention from many researchers in recent years. Seo et al. (2010) presented the first work about isogeometric topology optimization (ITO) using trimmed spline surfaces. Dedè et al. (2012) studied the combination of the phase field method and IGA. The spatial approximation of IGA encapsulates the accuracy of the design domain representation, which is especially suitable for the analysis of phase field problems. Hassani et al. (2012) constructed a smooth continuous function based on NURBS over the whole design domain to alleviate the grid dependence problem, and pointed out that the proposed ITO does not suffer from the checkerboard problem even on rough control grids. Wang and Benson (2016) proposed the level-set-base ITO, which used NURBS basis functions to parameterize the level set function and construct the solution space of numerical analysis. Jahangiry and Tavakkoli (2017) proposed a level-set-based ITO by parameterizing the level set function with high-dimensional NURBS basis functions, and applied it to solve a series of problems. Ghasemi et al. (2017) proposed a level-set-based ITO for flexible electrical material. Numerical examples show that the proposed topology optimization method can improve the electromechanical coupling coefficient. Since then, there have been many other works combining LSM and IGA (Xia et al. 2017; Nguyen et al. 2020; Gao et al. 2022; Jiang et al. 2022). Hou et al. (2017) first proposed an MMC-based explicit ITO, which using explicit design parameters to represent the geometry of structural components. Xie et al. (2018) employed the differentiable R-function to substitute the max function and presented a new MMC-based ITO. Yin et al. (2019) proposed an efficient ITO based on bidirectional evolutionary structural optimization (BESO), in which a NURBS filter was designed to smooth the sensitivity numbers according to the local support property of NURBS. Qiu et al. (2022) combined IGA and eXtended finite element method (X-FEM) to model arbitrary evolving geometries and developed an ITO combining BESO and IGA. To gain a comprehensive of IGA and its applications in topology optimization, several existing studies (Wang et al 2018; Gao et al. 2020) are recommended.

The main contribution of this paper is to extend the MIST by combining MIST with IGA to develop a MIST-based ITO and publish the MATLAB code to provide an entry point for newcomers interested in the ITO field. In MIST-based ITO, the same NURBS basis functions are used to represent the structural geometry and compute the physical response function, respectively. The physical response function of the control points is obtained by using Gauss points and the NURBS basis functions, and then the physical response function of the knots (element nodes) is obtained by fitting the control points using the NURBS basis functions. The physical response surface is formed by connecting element nodal values. The topology boundary is obtained by an iso-surface to cut the physical response surface. Numerical examples show that compared with the traditional MIST, the proposed MIST-based ITO improves the computational efficiency and accuracy. The remainder of this paper is organized as follows: In Sect. 2, the NURBS-based IGA is briefly introduced. In Sect. 3, the MIST-based ITO is proposed. Section 4 gives several examples to demonstrate the effectiveness of the proposed method and the validity of the corresponding MATLAB code. Section 5 concludes the paper.

2 A brief summary of NURBS-based IGA

In IGA, NURBS is a generalized form of the B-spline, which is a method of generating and representing curves and surfaces commonly used in CAD systems. In NURBS, a knot vector \(\Xi\), which is a non-decreasing sequence representing the parametric coordinates of a curve, needs to be defined.

$$\Xi = \left\{ {\xi_{1} ,\xi_{2} , \ldots ,\xi_{n + p + 1} } \right\},\quad \xi_{i} \le \xi_{i + 1},$$
(1)

where \(\xi_{i}\) is the ith knot, n denotes the number of NURBS basis functions and control points, and p is the order of the NURBS basis functions. The interval \(\left[ {\xi_{1} ,\xi_{n + p + 1} } \right]\) denotes an NURBS patch, and the half-open interval \(\left[ {\xi_{i} ,\xi_{i + 1} } \right)\) denotes the ith knot span, which can have a length of zero since knots need not be distinct.

After the knot vector is given, the Cox–de Boor formula (De Boor C 1972) is used to define the B-spline basis functions recursively:

For p = 0

$$N_{{i,p}} \left( \xi \right) = \left\{ \begin{gathered} 1,\quad {\text{if }}\xi _{i} \le \xi \le \xi _{{i + 1}} \hfill \\ 0,\quad {\text{otherwise}} \hfill \\ \end{gathered} \right.$$
(2)

For \(p \ge 1\)

$$N_{i,p} \left( \xi \right) = \frac{{\xi - \xi_{i} }}{{\xi_{i + p} - \xi_{i} }}N_{i,p - 1} \left( \xi \right) + \frac{{\xi_{i + p + 1} - \xi }}{{\xi_{i + p + 1} - \xi_{i + 1} }}N_{i + 1,p - 1} \left( \xi \right).$$
(3)

NURBS basis functions are defined by assigning a positive weight \(\omega_{i}\) to each B-spline basis function.

$$R_{i,p} \left( \xi \right) = \frac{{N_{i,p} \left( \xi \right)\omega_{i} }}{{\sum\nolimits_{j = 1}^{n} {N_{j,p} \left( \xi \right)\omega_{j} } }}.$$
(4)

The two-dimensional NURBS basis function is defined as follows:

$$R_{i,p}^{j,q} \left( {\xi ,\eta } \right) = \frac{{N_{i,p} \left( \xi \right)N_{j,q} \left( \eta \right)\omega_{i,j} }}{{\sum\nolimits_{k = 1}^{n} {\sum\nolimits_{l = 1}^{m} {N_{k,p} \left( \xi \right)N_{l,q} \left( \eta \right)\omega_{k,l} } } }},$$
(5)

where \(N_{i,p}\) and \(N_{j,q}\) are B-spline basis functions in two parametric directions, constructed by knot vectors \({\rm H} = \left\{ {\xi_{1} ,\xi_{2} , \ldots \xi_{n + p + 1} } \right\}\) and \({\rm Z} = \left\{ {\eta_{1} ,\eta_{2} , \ldots \eta_{m + q + 1} } \right\}\), respectively. p and q are the polynomial orders in two parametric directions. n and m are the corresponding numbers of B-spline basis functions in each parametric direction. Therefore, the mathematical model of the NURBS surface is defined as follows:

$${\mathbf{S}}\left( {\xi ,\eta } \right) = \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{m} {R_{i,j}^{p,q} \left( {\xi ,\eta } \right)} } {\mathbf{P}}_{i,j},$$
(6)

where S represents the NURBS surface of the two-dimensional structural geometry and \({\mathbf{P}}_{i,j}\) are the control points.

In this paper, the modeling of the NURBS geometry model and application of the boundary conditions are realized by calling subfunction geom_bound in Line 5 of the main program. The subfunction geom_bound refers to the work of Gao et al. (2021). In the geom_bound, a NURBS toolbox is developed by Spink et al. (2010), and the detailed numerical algorithms for NURBS are described by Piegl and Tiller (2012). The MATLAB code of the subfunction geom_bound is given in Online Appendix 2.

3 MIST-based isogeometric topology optimization

3.1 A brief view of MIST

In MIST, the structural topology optimization problem can be expressed in the following general form:

$$\begin{gathered} {\text{Find }}x \hfill \\ {\text{Min }}J\left( x \right) = \int_{Y} {\Phi \left( x \right)} {\text{d}}Y \hfill \\ {\text{S}}{\text{.t}}{\text{. g}}_{r} \left( x \right) = 0 \hfill \\ {\text{ g}}_{s} \left( x \right) \le 0 \hfill \\ \end{gathered},$$
(7)

where x is the element pseudo-density, ranging from 0 to 1. J is the objective function in integral form. \(\Phi\) represents the physical response function. \({\text{g}}_{r} \left( x \right) = 0\) represents the governing equation of the physical system, and \({\text{g}}_{s} \left( x \right)\) represents the constraint condition, such as the volume constraint. Y denotes the design domain.

The MIST algorithm solves the above problem through a nested iterative process. In each iteration, the physical response function of the system is calculated using the design variables from the previous iteration (or the initial design variables guessed at the first iteration). An iso-surface threshold value t is determined by imposing volume fraction constraints or other constraints. As shown in Fig. 1, the iso-surface S intersects the physical response surface \(\Phi\), and the contour formed by the intersection is the structural boundary.

Fig. 1
figure 1

Illustration of a physical response function surface Φ, an iso-surface S at level t and the contour formed by the intersection

In MIST, the objective function is constructed by integrating the physical response function in the entire domain. The physical response function describes the contribution of the design variables to the objective function. The physical response function in the design domain is estimated from the weak solution of the governing equation of a physical system. The physical response function Φ is calculated at all element nodes throughout the design domain. It gives an indication of the relative structural performance of all points in the domain. In this paper, the problem of minimization compliance topology optimization under volume constraints is considered for linear elastic materials. Therefore, the strain energy density can be used as the physical response function \(\Phi \left( x \right)\), which is defined as follows:

$$\Phi \left( x \right) = E_{ijkl} \left( x \right)\varepsilon_{ij} \left( x \right)\varepsilon_{kl} \left( x \right),$$
(8)

where \(\varepsilon_{ij} = \frac{1}{2}\left( {u_{i,j} + u_{j,i} } \right)\) and \(u\) is the displacement fields of the elastic body. Since the displacement fields are a single value and continuous, there is no overlap or fracture in the linear elastic body, so the physical response function is also a single-valued continuous function. Then, we introduce a new variable \(t \in \left( {\Phi_{{{\text{min}}}} ,\Phi_{\max } } \right)\) to define the iso-line or iso-surface level, define \(h\left( {t,\Phi \left( x \right)} \right)\) as the Heaviside function, and

$$\left\{ {\begin{array}{*{20}c} {h\left( {t,\Phi \left( x \right)} \right) = 1,\forall x \in \left\{ {\Phi \left( x \right) > t} \right\}(solid)} \\ {h\left( {t,\Phi \left( x \right)} \right) = 0,\forall x \in \left\{ {\Phi \left( x \right) < t} \right\}(void)} \\ \end{array} } \right.$$
(9)

That is, an element whose physical response function value for all nodes is above the iso-surface is considered to be a solid material, and the element density tends to be 1. An element whose physical response function value for all nodes is below the iso-surface is considered to be a void material, and the element density tends to be 0. For an element whose physical response function value of nodes is partially above and below the iso-surface, the element density is the ratio of the projected positive area to the element total area. Obviously, in MIST, the selection and solution of the physical response function are critical. For more numerical details about MIST, refer to Tong and Lin (2011). At present, MIST method is mostly applied to the topology optimization design of compliance problems, and it is not widely used in the stress-based optimization problem. It has been involved in the previous work of Vasista and Tong (2014). However, the better handling of stress problem requires the use of explicit topology boundary in order to obtain more accurate solutions.

3.2 The generation of physical response function in MIST-based ITO

In MIST-based ITO, the topology optimization problem of minimum compliance can be expressed as follows:

$$\begin{gathered} {\text{Find }}x \hfill \\ {\text{Min }}C(x) = \int_{Y} {{\mathbf{U}}_{e}^{{\text{T}}} {\mathbf{K}}_{e} {\mathbf{U}}_{e} } {\text{d}}Y \hfill \\ {\text{S}}{\text{.t}}{. }{\mathbf{KU}} = {\mathbf{F}} \hfill \\ \, \frac{1}{\left| Y \right|}\int_{Y} x {\text{d}}Y - V_{\max } \le 0 \hfill \\ \, 0 \le \delta \le x \le 1 \hfill \\ \end{gathered},$$
(10)

where x is the element density, which ranges from 0 to 1. \(C\) represents the mean compliance of the structure.\({\mathbf{U}}\) and \({\mathbf{F}}\) denote the nodal displacement vector and the external force vector of the structure, respectively. \({\mathbf{K}}\) denotes the stiffness matrix of the structure, which can be assembled by the element stiffness matrix \({\mathbf{K}}_{e}\). Y represents the design domains of the structure. \(V_{\max }\) is the upper limit of the specified total volume fraction. \(\delta\) (= 10 − 3 normally) is the minimum value of the design variables to prevent matrix singularity.

In MIST-based ITO, the calculation of the physical response function is by using the same NURBS basis function with the above construction of the initial structural geometry. First, the physical response function values of the control points are inverted by using Gauss points and the NURBS basis functions. Second, the physical response function values of the NURBS knots (the element nodes) are obtained by fitting the control points using NURBS basis functions.

In the first step of generating physical response function, the following mathematical model is used to reverse calculate the physical response function values of the control points:

$$\Phi \left( {\xi ,\eta } \right) = \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{m} {R_{i,j}^{p,q} \left( {\xi ,\eta } \right)} } \phi_{i,j}.$$
(11)

In Eq. (11), it is \(\phi_{i,j}\) that needs to be solved. \(\phi_{i,j}\) denotes the physical response values of the control points. And \(\Phi \left( {\xi ,\eta } \right)\) denotes the physical response values of the Gauss points. When the initial design is determined, the initial values of \(\Phi \left( {\xi ,\eta } \right)\) are known. \(R_{i,j}^{p,q} \left( {\xi ,\eta } \right)\) are the NURBS basis function values of the Gauss points. The matrix form of Eq. (11) can be written as follows:

$${\mathbf{A}}\phi = {{\varvec{\Phi}}}.$$
(12)

In Eq. (12), the column vector \(\phi\) is need to be solved. \(\phi\) is an m-dimensional column vector composed of the physical response value of all control points. \({{\varvec{\Phi}}}\) is an n-dimensional column vector composed of the physical response values of Gauss points. matrix A is a column full rank matrix of order n × m (n > m) composed of NURBS basis function values corresponding to Gauss points, Therefore, Eq. (12) is an overdetermined system of equations, which is solved by the least square method. The normal equation of Eq. (12) is

$${\mathbf{A}}^{{\text{T}}} {\mathbf{A}}\phi = {\mathbf{A}}^{{\text{T}}} {{\varvec{\Phi}}}.$$
(13)

The optimal approximate solution of the overdetermined system of equations Eq. (12) is obtained by solving the regular equations Eq. (13). In the physical meaning, when solving a control point using Eq. (12), a set of physical response values will be obtained. The values obtained by Eq. (12) are drawn in the Cartesian coordinate system and denoted as \(y_{i}\), as shown in Fig. 2. Then, the approximate true physical response value of the control point to be guessed is represented by a line parallel to the horizontal axis (because it is guessed, it is represented by a dashed line) and denoted as y. Every point is perpendicular to y, and the length of the perpendicular is \(\left| {y - y_{i} } \right|\). Then, the error between the calculated value and the approximate true value is denoted by \(\left( {y - y_{i} } \right)^{2}\). The \(y\) value that minimizes the sum of squared errors is the approximate true physical response value. That is, the control point physical response value is the \(y\) that satisfies the minimum of \(S_{{\varepsilon^{2} }} = \sum {\left( {y - y_{i} } \right)}^{2}\). Therefore, in the above process of solving, the physical response values of the control points are averaged to a certain extent.

Fig. 2
figure 2

Schematic diagram of the least square method

In addition, it is noted that matrix A is constant during optimization. The LU decomposition of matrix A is performed only once, and each update only requires inexpensive forward and backward substitutions. Therefore, before entering the optimization cycle, matrix A needs to be obtained by calling the MATLAB code in Lines 14–21 of the main program. The MATLAB code is given as follows:

figure a

After entering the optimization cycle, the physical response value of all Gauss points is calculated by calling the MATLAB code in Lines 29–37 of the main program. The MATLAB code is given as follows:

figure b

The physical response function values of all control points are calculated by using Eq. (12). The MATLAB code is given as follows:

figure c

The MATLAB code Con.C=Gau.C/Gau.R' is implemented to return the least squares solution of Eq. (12).

After obtaining the physical response function values of the control points, the physical response function values of the knots (the element nodes) are obtained by fitting the control points using NURBS basis functions. The mathematical model is as follows:

$$\hat{\Phi }\left( {\xi ,\eta } \right) = \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{m} {\hat{R}_{i,j}^{p,q} \left( {\xi ,\eta } \right)} } \phi_{i,j}.$$
(14)

In Eq. (14), it is \(\hat{\Phi }\left( {\xi ,\eta } \right)\) need to be solved. The \(\hat{\Phi }\left( {\xi ,\eta } \right)\) denotes the physical response function values of the knots (the element nodes). \(\hat{R}_{i,j}^{p,q} \left( {\xi ,\eta } \right)\) denotes the NURBS basis function values of the knots. \(\phi_{i,j}\) denotes the physical response function values of the control points. The MATLAB code for solving the physical response function values of the knots (the element nodes) is as follows:

figure d

The NURBS basis functions of the knots (the element nodes) are calculated by calling the MATLAB code in Lines 7–13 of the main program.

figure e

3.3 Update of design variables

An iterative bisection method is used to calculate the threshold t of the iso-surface and update the element design variables. The calculation of the iso-surface threshold t should satisfy the volume constraint. In this method, the initial value of t is the average value of the maximum of \(\hat{\Phi }\) (the physical response function values of the element nodes) and the minimum of \(\hat{\Phi }\). The difference between \(\hat{\Phi }\) and t at all element nodes in the design domain is calculated, and the pseudo-density of all IGA elements in the design domain is updated. If the sum of the materials is greater than the material constraint, tmin is updated to the current value tk, and the iso-surface moves up in the next iteration. If the sum of materials is less than the material constraint, tmin is updated to the current value tk, and the iso-surface moves down in the next iteration. This process is repeated until the sum of the materials and the material constraints are within a small tolerance \(\varepsilon\) (e.g., \(1 \times 10^{ - 4}\)), and the iterative bisection method is stopped. The specific steps are as follows:

Step 1: Calculate \(t_{{\max_{0} }} = {\text{max}}(\hat{\Phi })\) and \(t_{{\min_{0} }} = \min (\hat{\Phi })\)

Step 2: Calculate the iso-surface threshold \(t_{k} = \frac{{t_{{\max_{k} }} + t_{{\min_{k} }} }}{2}\)

Step 3: Calculate \(\Phi - t_{k}\) at all element nodes, and update \(x_{{i_{k} }}\) for all IGA elements based on the element area ratio

Step 4: If \(\left| {\frac{{\sum\nolimits_{i = 1}^{{N_{E} }} {\left( {x_{{i_{k} }} A_{i} } \right)} }}{{fA_{{{\text{tot}}}} }} - 1} \right| < \varepsilon\), the iterative bisection method is stopped; otherwise,

Case (a) \(\left. \begin{gathered} t_{{\min_{k + 1} }} = t_{k} \hfill \\ t_{{\max_{k + 1} }} = t_{{\max_{k} }} \hfill \\ \end{gathered} \right\},\quad if\sum\nolimits_{i = 1}^{{N_{E} }} {\left( {x_{{i_{k} }} A_{i} } \right) > fA_{{{\text{tot}}}} }\)

or

Case (b)\(\left. \begin{gathered} t_{{\min_{k + 1} }} = t_{{\min_{k} }} \hfill \\ t_{{\max_{k + 1} }} = t_{k} \hfill \\ \end{gathered} \right\},\quad {\text{if}}\sum\nolimits_{i = 1}^{{N_{E} }} {\left( {x_{{i_{k} }} A_{i} } \right) < fA_{{{\text{tot}}}} }\)

Then, go to step 2 and repeat.

\(N_{E}\) represents the number of IGA elements, and \(A_{i}\) is the area of element i. k represents the current iteration in the iterative bisection method. \(x_{{i_{k} }}\) represents the element density of the ith element in the kth iteration step.\(A_{{{\text{tot}}}}\) represents the total IGA element area, and f denotes the volume constraint fraction.

In step 3, the \(x_{{i_{k} }}\) of each element is calculated according to the value of \(\Phi - t_{k}\) at all element nodes. The iso-surface cuts the physical response function, and the element can be divided into 18 types, as shown in Fig. 3. If \(\Phi - t_{k}\) are negative at all element nodes (see Fig. 3a), the element is considered to be a void material, and the element pseudo-density moves toward 0. If \(\Phi - t_{k}\) are positive at all elements nodes (see Fig. 3b), the element is considered to be a solid material, and the element pseudo-density moves toward 1. Figure 3c–f shows the case with three negative element nodes. Figure 3g–n shows the case with two negative element nodes. Figure 3q–t shows the case with only one negative element node. Especially, when two diagonal vertices are positive and the other two diagonal vertices are negative, we introduce a new point \(\Phi_{5}\) in the middle of the element, as shown in Fig. 3k–n. When the value of \(\Phi_{5} - t_{k} < 0\), two solid triangles will appear at the positive element nodes, as shown in Fig. 3l and n. when the value of \(\Phi_{5} - t_{k} > 0\), two empty triangles will appear at the negative element nodes, as shown in Fig. 3k and m. Since the 3 × 3 Gauss quadrature rule is used in this paper, the new point at the center of element takes the fifth Gauss integral point of the element, as shown in Fig. 4. Then, the element density is the ratio of the projected positive area to the total element area, as shown in Eq. (15). The projected positive area denotes the projected areas of the response function that lie above the current iso-surface threshold, as shown by the blue area in Fig. 3b. One problem with this approach is that the boundary element stiffness is calculated approximately, especially the case of there are two solid triangles in IGA element (Fig. 3l, n). However, this type of element only exists in the first few iteration steps, and only a few elements have two solid triangles, so they have a small impact on the overall structure. At present, there are a number of methods to solve this problem, but this paper focuses on the combination of IGA and MIST. In future work, we will focus on the stiffness of boundary elements.

$$x_{{i_{k} }} = \frac{{A_{{i_{k} }}^{ + } }}{{A_{{i_{k} }}^{ + } + A_{{i_{k} }}^{ - } }} = \frac{{A_{{i_{k} }}^{ + } }}{{A_{i} }}.$$
(15)
Fig. 3
figure 3

Different IGA element types: a void element with 4 negative vertices, b solid element with 4 positive vertices, cf IGA element with 3 negative vertices, gn IGA element with 2 negative vertices; or IGA element with 1 negative vertices

Fig. 4
figure 4

Elements nodes and Gauss points in a unit cell

In this paper, the value of the projected positive area \(A_{{i_{k} }}^{ + }\) is determined by calculating the coordinates of the vertices of the projected positive area via an edge-based process and using the element connectivity table data. Figure 5 is taken as an example to describe this process. Figure 5a is a schematic diagram of the physical response surface and iso-surface of an element. The blue surface represents the physical response surface, and the white surface represents the iso-surface. Starting at edge 1 of the element, the values of \(\Phi - t_{k}\) at the end of this edge are all negative; therefore, \(A_{{i_{k} }}^{ + }\) has no vertex on edge 1. Then, looking at edge 2, the value of \(\Phi - t_{k}\) at interpolation point 1 is negative, and the value of \(\Phi - t_{k}\) at interpolation point 2 is positive; therefore, vertex 1 is located on edge 2. The X and Y coordinates of vertex 1 are calculated by interpolating the X and Y coordinates of interpolation point 1 and interpolation point 2 of edge 2 according to the ratio of the values of \(\Phi - t_{k}\) at interpolation point 1 and interpolation point 2. The vertex coordinates are calculated using Eq. (15), where subscripts 1 and 2 represent the interpolation points of an edge and subscript v represents the coordinates of the vertex. The value of \(\Phi - t_{k}\) at interpolation point 2 of edge 2 is positive; therefore, vertex 2 is interpolation point 2 of edge 2. On edge 3, the value of \(\Phi - t_{k}\) at interpolation point 2 is positive; therefore, vertex 3 is interpolation point 2 of edge 3. On edge 4, the value of \(\Phi - t_{k}\) at interpolation point 1 is positive, and the value of \(\Phi - t_{k}\) at interpolation point 2 is negative; therefore, vertex 4 is located on edge 4. The coordinates of vertex 4 are also calculated by Eq. (16). Figure 5b shows the projected positive area \(A_{{i_{k} }}^{ + }\) and the vertices of \(A_{{i_{k} }}^{ + }\).

$$\begin{gathered} X_{v} = X_{1} + \eta \left( {X_{2} - X_{1} } \right) \hfill \\ Y_{v} \, = \, Y_{1} \, + \, \eta \left( {Y_{2} - Y_{1} } \right) \hfill \\ \eta = \frac{{\left| {\Phi - t_{k} } \right|_{1} }}{{\left| {\Phi - t_{k} } \right|_{1} + \left| {\Phi - t_{k} } \right|_{2} }} \hfill \\ \end{gathered}.$$
(16)
Fig. 5
figure 5

The illustration of vertices of \(A_{{i_{k} }}^{ + }\): a 3D view of an iso-surface S intersecting the physical response surface for IGA element i, b the top view of a

When all vertex coordinates of \(A_{{i_{k} }}^{ + }\) are determined, the area of \(A_{{i_{k} }}^{ + }\) is obtained by using the standard method for determining nonself-intersecting (simple) arbitrary polygon areas using vertex coordinate data (Masters and Evans 1996), and the vertex coordinates are mapped to the physical space to form structural boundaries.

$$A_{{i_{k} }}^{ + } = \frac{1}{2}\sum\limits_{v = 1}^{{N_{v} }} {\left( {X_{v} Y_{v + 1} - X_{v + 1} Y_{v} } \right)},$$
(17)

where \(N_{v}\) denotes the number of vertices of \(A_{{i_{k} }}^{ + }\), and \(X_{{N_{v} }} + 1\) and \(Y_{{N_{v} }} + 1\) are equal to \(X_{1}\) and \(Y_{1}\), respectively, to ‘close’ the polygon. The vertex coordinates and element density are obtained by calling the MATLAB subfunction IGA_surface. The MATLAB code of the subfunction IGA_surface is given in Online Appendix 2.

The move limit m of the element density can be used to prevent large changes between optimization iterations to stabilize the MIST solution. Equation (15) is replaced with the following formula to implement this process.

$$x_{{i_{k} }} = \left\{ \begin{gathered} \frac{{A_{{i_{k} }}^{ + } }}{{A_{i} }}\quad if \, \left| {\frac{{A_{{i_{k} }}^{ + } }}{{A_{i} }} - x_{{i_{0} }} } \right| \le m \hfill \\ x_{{i_{0} }} + sign\left( {\frac{{A_{{i_{k} }}^{ + } }}{{A_{i} }} - x_{{i_{0} }} } \right)m\quad if \, \left| {\frac{{A_{{i_{k} }}^{ + } }}{{A_{i} }} - x_{{i_{0} }} } \right| > m \hfill \\ \end{gathered} \right. \,$$
(18)

where \(x_{{i_{0} }}\) is the value of the element density before any bisection is completed. In this way, the variation in element density between optimization iterations is limited.

When the total amount of material converges to a value within the specified tolerance range given in step 4, the resulting element density will be used for the next iteration of the main optimization cycle, as shown in Eq. (19).

$${}_{new}x_{i} = x_{{i_{k} }}.$$
(19)

The convergence criteria of the main program may be chosen in terms of the change in the design variables, objective function, or response surface in the element or overall design domain. Setting the convergent parameters is normally problem dependent, and the maximum iterative number (e.g., 150) can also be set to avoid nonending iterations.

In this paper, we choose the change in the objective function as the convergence criterion, i.e., \(\Delta C = \frac{{\left| {C_{k + 1} - C_{k} } \right|}}{{\left| {C_{k} } \right|}} \le \varepsilon \quad \left( {\varepsilon = 10^{ - 5} } \right)\) as one of the convergence criteria. At the same time, to avoid nonending iterations, the maximum number of iteration steps is set to 150 as a convergence condition.

The update of element density (design variable) is realized in subfunction IGA_maket. The MATLAB code of the subfunction IGA_maket is given as follows:

figure f

3.4 Isogeometric analysis

In IGA, the same NURBS basis function as those in the above construction of the initial structural geometry and the solution for the physical response function are used to solve the structural displacement. The corresponding mathematical model is shown as follows:

$${\mathbf{U}}\left( {\xi ,\eta } \right) = \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{m} {R_{i,j}^{p,q} \left( {\xi ,\eta } \right)} } {\mathbf{U}}_{i,j}.$$
(20)

It can be observed that Eq. (20) has the same mathematical form as Eqs. (6) and (11), but the physical meaning of the control coefficient in Eq. (20) becomes the structural displacement.

The discrete governing equation (Belytschko 2008) can be written as follows:

$${\mathbf{KU}} = {\mathbf{F}},$$
(21)

where \({\mathbf{K}}\) denotes the stiffness matrix, \({\mathbf{U}}\) denotes the displacement vector, and \({\mathbf{F}}\) denotes the force vector associated with the control points. The stiffness matrix \({\mathbf{K}}\) is composed of the element stiffness matrix \({\mathbf{K}}_{e}\). The formula for calculating the IGA element stiffness matrix \({\mathbf{K}}_{e}\) is as follows:

$$\begin{gathered} {\mathbf{K}}_{e} = \int_{{\Omega_{e} }} {\mathbf{B}}^{T} {\mathbf{DB}}d\Omega_{e} \hfill \\ \, = \int_{{\widehat{\Omega }_{e} }} {\mathbf{B}}^{T} {\mathbf{DB}}\left| {{\mathbf{J}}_{{\mathbf{1}}} } \right|d\widehat{\Omega }_{e} \hfill \\ \, = \int_{{\widetilde{\Omega }_{e} }} {\mathbf{B}}^{T} {\mathbf{DB}}\left| {{\mathbf{J}}_{{\mathbf{1}}} } \right|\left| {{\mathbf{J}}_{{\mathbf{2}}} } \right|d\widetilde{\Omega }_{e} \hfill \\ \end{gathered},$$
(22)

where \({\mathbf{B}}\) represents the strain–displacement matrix, \({\mathbf{D}}\) represents the stress–strain matrix, \(\Omega\) represents the physical space, \(\widehat{\Omega }\) represents the NURBS parametric space \(\left\{ {\xi ,\eta } \right\}\), and \(\widetilde{\Omega }\) represents the Gauss integration space \(\left\{ {\widetilde{\xi },\widetilde{\eta }} \right\}\). Jacobian \({\mathbf{J}}_{{\mathbf{1}}}\) represents the mapping from the NURBS parametric space to the physical space, and \({\mathbf{J}}_{{\mathbf{2}}}\) represents the mapping from the integration parametric space to the NURBS parametric space. In this paper, the Gauss quadrature method is employed to calculate Eq. (22).

The strain–displacement matrix B of the two-dimensional plane stress problem is shown in Eq. (23):

$${\mathbf{B}} = \left[ {\begin{array}{*{20}c} {\frac{{\partial R_{1} }}{\partial x}} & 0 & \ldots & {\frac{{\partial R_{{N_{E} }} }}{\partial x}} & 0 \\ 0 & {\frac{{\partial R_{1} }}{\partial y}} & \ldots & 0 & {\frac{{\partial R_{{N_{E} }} }}{\partial y}} \\ {\frac{{\partial R_{1} }}{\partial y}} & {\frac{{\partial R_{1} }}{\partial x}} & \ldots & {\frac{{\partial R_{{N_{E} }} }}{\partial y}} & {\frac{{\partial R_{{N_{E} }} }}{\partial x}} \\ \end{array} } \right]$$
(23)

and

$$\left[ {\begin{array}{*{20}c} {\frac{{\partial R_{i} }}{\partial x}} & {\frac{{\partial R_{i} }}{\partial y}} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\frac{{\partial R_{i} }}{\partial \xi }} & {\frac{{\partial R_{i} }}{\partial \eta }} \\ \end{array} } \right]{\mathbf{J}}_{{\mathbf{1}}}^{ - 1}$$
(24)

where \(R_{i}\) represents a NURBS basis function and the Jacobian \({\mathbf{J}}_{{\mathbf{1}}}\) can be expressed as follows:

$${\mathbf{J}}_{{\mathbf{1}}} = \left[ {\begin{array}{*{20}c} {\frac{\partial x}{{\partial \xi }}} & {\frac{\partial y}{{\partial \xi }}} \\ {\frac{\partial x}{{\partial \eta }}} & {\frac{\partial y}{{\partial \eta }}} \\ \end{array} } \right].$$
(25)

A linear mapping is used from the integration parametric space to the NURBS parametric space, as shown in Eq. (26).

$$\begin{gathered} \xi = \frac{{\xi_{i + 1} - \xi_{i} }}{2}\left( {\widetilde{\xi } - 1} \right) + \xi_{i} \hfill \\ \eta = \frac{{\eta_{i + 1} - \eta_{i} }}{2}\left( {\widetilde{\eta } - 1} \right) + \eta_{i} \hfill \\ \end{gathered}.$$
(26)

Therefore, the Jacobian \({\mathbf{J}}_{{\mathbf{2}}}\) is expressed as follows:

$${\mathbf{J}}_{{\mathbf{2}}} = \left[ {\begin{array}{*{20}c} {\frac{\partial \xi }{{\partial \widetilde{\xi }}}} & {\frac{\partial \eta }{{\partial \widetilde{\xi }}}} \\ {\frac{\partial \xi }{{\partial \widetilde{\eta }}}} & {\frac{\partial \eta }{{\partial \widetilde{\eta }}}} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\frac{{\xi_{i + 1} - \xi_{i} }}{2}} & 0 \\ 0 & {\frac{{\eta_{i + 1} - \eta_{i} }}{2}} \\ \end{array} } \right],$$
(27)

and the stress–strain matrix D can be expressed as follows:

$${\mathbf{D}} = \frac{E}{{1 - \upsilon^{2} }}\left[ {\begin{array}{*{20}c} 1 & \upsilon & 0 \\ \upsilon & 1 & 0 \\ 0 & 0 & {\frac{1 - \upsilon }{2}} \\ \end{array} } \right],$$
(28)

where E denotes the elastic modulus and \(\upsilon\) denotes Poisson’s ratio.

In this paper, the IGA analysis is realized by calling the subfunction IGA_analy in Line 28 of the main program. The subfunction IGA_analy refers to the work of Gao et al. (2021). The MATLAB code of the subfunction IGA_analy is given in Online Appendix 3.

3.5 Visualization of the optimization results

In the final representation of the numerical results, three numerical designs are given: (1) the element density of the design domain in the parameter space, as shown in Fig. 6a, (2) the iso-surface and physical response function surface in the parameter space, as shown in Fig. 6b, and (3) the mapping in the physical space of the contour formed by the intersection of the iso-surface and physical response function surface, which denotes the topology of the structure, as shown in Fig. 6c. The visualization of the optimization results involves the subfunction IGA_OptimalFig. The corresponding MATLAB code is given as follows:

Fig. 6
figure 6

The representation of the optimized results: a the element density of the design domain in the parameter space; b the iso-surface and physical response function surface in the parameter space; c the topology of the structure

figure g

The flow chart of the overall algorithm MIST_based_ITO is shown in Fig. 7.

Fig. 7
figure 7

Flowchart of the MIST_based_ITO algorithm

4 Numerical examples

In this section, several numerical examples are presented to verify the effectiveness of the proposed method and the MATLAB code. For all examples, the Poisson’s ratio and the Young’s moduli are defined as \(\upsilon = 0.3\) and \(E = 1\), respectively.

4.1 Cantilever beam

As a benchmark problem, the cantilever beam is often used to evaluate the topology optimization method. The design domain of the cantilever beam is shown in Fig. 8. The left edge is fixed, and a vertical force \(F = 1\) is applied on the center of the right edge. The structural sizes are set to L = 10 and W = 5. The orders of the NURBS basis functions in the parametrization are set to 3. The input parameter Order is set to [1, 1]. A total of 81 × 41 unique knots are adopted, and the input parameter Num is set to [81, 41]. Therefore, there are 80 × 40 IGA elements to discretize the design domain, and the total number of control points is 82 × 42. The material volume fraction is set to 0.4.

Fig. 8
figure 8

The design domain of the cantilever beam

The optimized structure is shown in Fig. 9. As shown in Fig. 9e, the topology has clear interfaces between the solids and voids. As seen from Fig. 9a–d, the structural topology always keeps the interface clear, not only in the final design but also in the iterative process. The reason is that the topology is formed by intersecting the physical response surface with an iso-surface. In addition, this method can effectively eliminate well-known numerical instabilities such as checkerboard and zigzag boundaries. The convergence iteration curves of structural compliance and volume fraction in the optimization process are shown in Fig. 10, where the red curve represents the iteration curve of the objective function and the blue curve represents the iteration curve of the volume fraction. Figure 10 shows that the final optimization value of the structural compliance is 78.85, the objective function curve converges stably, and the material volume fraction also satisfies the prescribed volume constraint, namely, 0.4.

Fig. 9
figure 9

Topology structure of the cantilever beam

Fig. 10
figure 10

The iteration curve of the cantilever beam

Figure 11 gives the optimal topologies (102 × 52 control points) in the present study with and without filtering, as well as the optimal topology obtained by the MATLAB code of Gao et al. (2021). The same number of control points and volume fractions are used.

Fig. 11
figure 11

Comparison of optimum topologies. a optimum topology without filtering in this paper; b optimum topology with filtering in this paper; c optimal topology obtained by using the MATLAB code of Gao et al. (2021)

As we can see from Figs. 11b and 13c, when using filtering, the optimal topology obtained in this paper is similar to that in the literature. According to Fig. 11a, when filtering is not used, more small holes will appear in the optimal structure. This illustrates the correctness of the proposed method.

4.1.1 Influence of the number of control points

Figure 12 shows the topology designs obtained for different numbers of control points. The optimal structure obtained is shown in Fig. 12a–d for \(42 \times 22\) control points,\(62 \times 32\) control points, \(82 \times 42\) control points, and \(102 \times 52\) control points, respectively.

Fig. 12
figure 12

The topology optimization results for different numbers of control points: a 42 × 22 control points, b 62 × 32 control points, c 82 × 42 control points, d 102 × 52 control points

As seen from Fig. 12a–d, when the number of control points is small, wave boundaries will appear in the optimized structure. In addition, the solution with a finer mesh is not the same as the solution with a sparser mesh because the length scale is related to the element size. Therefore, a finer mesh allows smaller holes to be represented. In addition, it can be found that the compliance decreases when the control point number increases (82.56 → 81.20 → 78.85 → 78.04). It should be noted that the final objective function will be almost the same when the element size is sufficiently small, as the computational accuracy of IGA is sufficiently high with such a small element size.

4.1.2 Comparisons between MIST-based ITO and traditional MIST

Compared to the conventional MIST, one of the biggest advantages of MIST-based ITO is its high computational efficiency when higher-order elements are used for optimization. As shown in Fig. 13, MIST-based ITO has much fewer degrees of freedom (DOFs) than traditional MIST. The green dots represent element nodes in Fig. 13a and control points in Fig. 13b.

Fig. 13
figure 13

Spatial discretization of FEM and IGA: a quadratic Lagrange elements, b quadratic NURBS elements

When quadratic elements are used and the number of elements (nx × ny) is equal, the number of DOFs of MIST-based ITO is

$$n_{{{\text{IGA}}}} = 2\left( {nx + 2} \right)\left( {ny + 2} \right).$$
(29)

The number of DOFs of traditional MIST is

$$n_{{{\text{FEM}}}} = 2\left( {2nx + 1} \right)\left( {2ny + 1} \right).$$
(30)

When nx and ny are sufficiently large, the ratio \({{n_{{{\text{IGA}}}} } \mathord{\left/ {\vphantom {{n_{{{\text{IGA}}}} } {n_{{{\text{FEM}}}} }}} \right. \kern-0pt} {n_{{{\text{FEM}}}} }}\) is approximately 1/4.

To compare the MIST-based ITO and traditional MIST (Lagrange elements), the optimization results for MIST-based ITO and traditional MIST with different numbers of quadratic elements (\(40 \times 20\),\(60 \times 30\),\(80 \times 40\), and \(100 \times 50\)) are given in Fig. 14. The objective function values with varying elements for MIST-based ITO and traditional MIST are plotted in Fig. 15.

Fig. 14
figure 14

The topology optimization results of traditional MIST and MIST-based ITO with different numbers of elements: a FEM with elements 40 × 20; b IGA with elements 40 × 20; c FEM with elements 60 × 30; d IGA with elements 60× 30; e FEM with elements 80× 40; f IGA with elements 80 × 40; g FEM with elements 100 × 50; h IGA with elements 100 × 50

Fig. 15
figure 15

Compliance plot for the cantilever beam with varying elements for MIST-based ITO and traditional MIST

When fewer quadratic elements are used, the optimized results obtained by MIST-based ITO have a smoother boundary than those of traditional MIST. In addition, Fig. 15 shows that the objective function value for traditional MIST is larger than that of MIST-based ITO. All of the above is due to the spatial discretization error caused by the FEM. With the increase in elements, the objective function values with traditional MIST and with MIST-based ITO become closer. This is because the discretization error decreases in the FEM scheme when the elements increase. All these results prove that the proposed MIST-based ITO can effectively avoid the discretization error and obtain higher computational accuracy compared with traditional MIST.

To compare the computational efficiency of MIST-based ITO and traditional MIST in detail, Table 1 gives the computational time of one iteration and the number of DOFs with MIST-based ITO and traditional MIST, respectively. \(t_{{{\text{IGA}}}}\) represents the time to iterate once with MIST-based ITO. \(t_{{{\text{FEM}}}}\) represents the time to iterate once with traditional MIST. \(t_{{{\text{FEM}}}} /t_{{{\text{IGA}}}}\) is the ratio of \(t_{{{\text{FEM}}}}\) to \(t_{{{\text{IGA}}}}\). According to Table 1, it can be seen that the rate of \(n_{IGA} /n_{FEM}\) is approximately 1/4, which confirms the estimates from Eqs. (30) and 31. In addition, it can be seen that the computation time of IGA is less than that of FEM. The computational efficiency of MIST-based ITO becomes higher with the increase in the number of elements. The value of \(t_{{{\text{FEM}}}} /t_{{{\text{IGA}}}}\) ranges from 1.22 to 4.85, which demonstrates the high computational efficiency of the proposed MIST-based ITO.

Table 1 Computational efficiency comparison between MIST-based ITO and traditional MIST by the time of one iteration

4.2 Quarter annulus

In this example, consider the quarter annulus with the boundary conditions and load conditions shown in Fig. 16. The bottom edge is fixed, and a horizontal force \(F = 1\) is applied on the left-top corner. The structural sizes are set to L = 10 and R = 5. The orders of the NURBS basis functions in the parametrization are set to 3. The input parameter Order is set to [0, 1]. A total of 81 × 41 unique knots are adopted, and the input parameter Num is set to [81,41]. Therefore, there are 80 × 40 IGA elements to discretize the design domain, and the total number of control points is 82 × 42. The material volume fraction is set to 0.4.

Fig. 16
figure 16

The design domain of the quarter annulus

The optimized structure is depicted in Fig. 17. As shown in Fig. 17e, the final design topology has distinct interfaces. From Fig. 17a–d, it can be observed that the interface is also clear in the process of optimization iteration. The convergence iteration curves of structural compliance and volume fraction in the optimization process are shown in Fig. 18, in which the red curve represents the iteration curve of the objective function and the blue curve represents the iteration curve of the volume fraction. Figure 18 shows that the final optimization value of structural compliance is 93.23, the objective function curve converges stably, and the material volume fraction also satisfies the prescribed volume constraint, namely, 0.4.

Fig. 17
figure 17

Topology structure of the quarter annulus

Fig. 18
figure 18

The iteration curve of the quarter annulus

4.3 MBB beam

In this example, consider an MBB beam with the boundary conditions and load conditions shown in Fig. 19. The bottom edge is fixed, and a horizontal force \(F = 1\) is applied on the left-top corner. The structural sizes are set to L = 10 and W = 3. The orders of the NURBS basis functions in the parametrization are set to 3. The input parameter Order is set to [1 1]. A total of 81 × 41 unique knots are adopted, and the input parameter Num is set to [81,41]. Therefore, there are 80 × 40 IGA elements to discretize the design domain, and the total number of control points is 82 × 42. The material volume fraction is set to 0.4.

Fig. 19
figure 19

The design domain of an MBB beam

The optimized structure is depicted in Fig. 20. The convergence iteration curves of structural compliance and volume fraction in the optimization process are shown in Fig. 21, in which the red curve represents the iteration curve of the objective function and the blue curve represents the iteration curve of the volume fraction. Figure 21 shows that the final optimization value of structural compliance is 106.15, the objective function curve converges stably, and the material volume fraction also satisfies the prescribed volume constraint, namely, 0.4. The results of the MBB beam further demonstrate the effectiveness of the MATLAB code Iga_MIST2D for the isogeometric topology optimization method based on MIST.

Fig. 20
figure 20

Optimized topology of the MBB beam

Fig. 21
figure 21

The iteration curve of the MBB beam

5 Conclusions

In this paper, IGA is first introduced into MIST-based topology optimization, and the proposed MIST-based ITO has the advantages of both MIST and IGA. This novel method is used to construct the physical response function in an accurate and simple way by using the same NURBS basis functions as the geometrical model. The IGA and Gauss quadrature method are used to solve the unknown response of the structure. Considering the problem of minimization compliance topology optimization, the corresponding physical response function is constructed by the same NURBS basis function as the construction of the geometrical model. First, the physical response values of the control points are calculated by using the NURBS basis function and the physical response values of the Gauss points. Second, the physical response function values of the NURBS knots (the element nodes) are obtained by fitting the control points using NURBS basis functions. The structure topology with a smooth and clear boundary is iteratively updated by cutting the physical response surface with an iso-surface with an appropriate threshold, and the movement of the iso-surface is driven by the volume fraction constraint. Compared to the traditional MIST, MIST-based ITO improves the computational accuracy and computational efficiency for high-order elements. Several numerical examples are given to demonstrate the effectiveness and efficiency of the proposed method and verify the validity of the MATLAB code for the numerical implementation of this method. While the current work focuses on the minimum compliance problems only, further work will expand the proposed method to other fields, as well as the extension to more complex engineering problems.