1 Introduction

The basis of the structural topology optimization were established by Bendsøe and Kikuchi in 1988 (Bendsøe and Kikuchi 1988). Since then, a wide range of different approaches have been developed to extent the use of the structural topology optimization to different applications; for this reason, an important number of contributions has been published. Although an important number of different kind of problems have been formulated in this field, the Maximum Stiffness Problem (minimum compliance) (Bendsøe 1995; Bendsøe and Kikuchi 1988; Niu et al. 2011; Stolpe and Svanberg 2001; Wang et al. 2020) is the most deeply analyzed. However, in this paper, the Minimum Weight with Stress Constraints Problem (Bruggi and Duysinx 2012; Duysinx and Bendsøe 1998; Navarrina et al. 2005; París et al. 2007, 2009, 2010a) is chosen to solve the topology optimization problem due to its high interest from the engineering point of view. The Minimum Weight with Stress Constraints problem provides the cheapest structure, in terms of material cost, which supports a set of loads with the requirement that the structural stresses do not exceed its maximum allowable value. Different alternatives have been used to solve the Minimum Weight with Stress Constraints problem due to the drawbacks emerged during the solution process. These alternatives consider different ways to formulate the material distribution in the domain or the stress constraints in the problem. The different strategies used to formulate the stress constraints in the problem has been commented in Villalba et al. (2022).

Regarding the definition of the material distribution in the domain, several strategies have been used until now. Firstly, discontinuous formulations of the relative density, whose value is not continuous in all the domain, were stated. These formulations are defined by means of a microstructure in each division of the domain. The most common approaches are listed below. The homogenization techniques (Allaire et al. 2004; Bendsøe 1995; Murat and Tartar 1985; Zhao et al. 2010) use only one microstructure in all the divisions of the domain and the unknowns are related with the dimensions of the microstructure at each division. The Solid Isotropic Material with Penalty (SIMP) (Bendsøe 1995; Bendsøe and Sigmund 1999; Bruns (2005; Rossow and Taylor 1973; Xu et al. 2021) was initially established from the theoretical point of view and later it was demonstrated the existence of a microstructure that represents faithfully the behavior of the theoretical formulation. The unknowns are related with the amount of material required in each division of the domain. Finally, the Multimicrostructural approaches (Gao et al. 2019a; Nakshatrala et al. 2013; Sivapuram et al. 2016; Rodrigues et al. 2002) use several microstructures in the definition of the material layout. As a result, the microstructure at each division of the domain acts as an unknown. The main problem of these formulations is the mesh dependency phenomena since the solution depends on the discretization of the domain. By contrast, the continuous formulations of the relative density, whose value is continuous in all the domain, were developed to avoid the mesh dependency phenomena. The most frequent formulations used until now are as follows:

  • The Level Set Method (Amstutz and Adrä 2006; Luo et al. 2008; Van Dijk et al. 2013; Wang et al. 2003) uses an auxiliary function to determine the amount of material that have to be placed in each point of the domain. The most common auxiliary function is the Heaviside Function.

  • The Bubble Method (Cai and Zhang 2020; Cai et al. 2019) defines initially the boundary geometry and then an infinitesimal hole is introduced in the most appropriated point of the domain. The process is repeated until an additional hole cannot be incorporated.

  • The Phase Field Approach (Auricchio et al. 2020; Blank et al. 2012; Jeong et al. 2014; Wang and Zhou 2004) defines the material distribution using a parameter that defines the solid region, the void, and the interface between them. The Van der Waals–Cahn–Hilliard theory, a phase transition theory, is the most used in the formulation of the problem.

  • The Isogeometric Analysis (IGA) (Gao et al. 2019b, 2019c, 2020a, 2020b; Gai et al. 2021; Hassani et al. 2012; Liu et al. 2018; Qian 2013; Sahithi and Chandrasekhar 2020; Wang and Benson 2016) defines the material distribution using B-splines or NURBS (Non-Uniform Rational B-Spline). This is the only continuous formulation which does not solve the mesh dependency phenomena since the domain is discretized with knot spans whose role is equivalent to the elements of the Finite Element formulations.

In this research, the formulation of the Overweight Approach previously developed in Villalba et al. (2022) is used to impose the local stress constraints in the problem. The Sequential Linear Programming (SLP) is used for the optimization process. The material layout in the domain is defined with quadratic B-splines. The structural analysis is stated in terms of an Isogeometric Analysis formulation considering several hypotheses: elastic and linear material, small displacements, and small gradients of displacements. This formulation is analogous to the Finite Element formulation with the consideration of several aspects. The elements and the nodes of the mesh are replaced by knot spans and control points, respectively. The shape functions are replaced by B-splines or NURBS interchangeably. The rest of the algorithm remains unchanged. The formulation of structural analysis has to include the effect of the design variables (Navarrina et al. 2005; París et al. 2007, 2009) since they are used in the definition of the material layout. The remainder of this paper is structured as follows. Section 2 describes the topology optimization problem. Section 3 describes the optimization algorithms. In Section 4 the sensitivity analysis is formulated. In Section 5, the most important aspects of the numerical implementation are commented. Section 6 solves different numerical examples with the optimization method. Section 7 makes a comparison of the obtained results with the FEM and IGA formulations. Finally, Conclusions are commented in Section 8.

2 Optimization problem

The optimization problem solved in this paper is stated as follows:

$$\begin{aligned} \begin{aligned} \hbox {Calculate} \hspace{1.5 cm}&\mathbf {\varvec{\rho }} = \left\{ \rho _{i,j} \right\} \hspace{1.6 cm} i=1,...,n \hspace{0.5 cm} j=1,...,m \\ \hbox {which minimize} \hspace{0.5 cm}&F\left( \mathbf {\varvec{\rho }} \right) \hspace{2.3 cm} \\ \hbox {subject to} \hspace{1.4 cm}&g\left( \mathbf {\textbf{r}}^{0},\mathbf {\varvec{\rho }} \right) \le 0 \\&\rho _{min} \le \rho _{i,j} \le \rho _{max} \hspace{0.3 cm} i=1,...,n \hspace{0.5 cm} j=1,...,m \, , \end{aligned} \end{aligned}$$
(1)

where \(\mathbf {\varvec{\rho }} = \left\{ \rho _{i,j} \right\}\) is the design variables vector, \(\mathbf {\textbf{r}}^{0}\) is the coordinates vector of the points considered in the formulation of the Overweight Constraint, \(F\left( \mathbf {\varvec{\rho }}\right)\) is the objective function, and \(g\left( \mathbf {\textbf{r}}^{0},\mathbf {\varvec{\rho }} \right)\) is the Overweight Constraint. n and m are the number of control points in each spatial dimension, and \(\rho _{min}\) and \(\rho _{max}\) are the side constraints of the design variables. The points considered in the formulation of the Overweight Constraint to check the structural stresses are placed at the center point of (i) each knot span of the patch (IGA-based formulations) or (ii) each element of the mesh (FEM-based formulations). The choice of this set of points is crucial for the performance of the topology optimization problem formulated in this manuscript, since it is one of the key points in case of introducing stress constraints in the topology optimization problem.

Quadratic B-splines are used to define the material distribution and the design variables represents the value of the relative density in the control points. As a result, the number of design variables is equal to the number of control points. Linear B-splines are not considered due to its equivalence with the linear Finite Elements when the design variables represent the value of the relative density in the nodes of the mesh. Moreover, the use of linear formulations contributes to the appearance of checkerboard patterns in the solutions. Cubic B-splines are not considered since it requires the use of cubic finite elements to make a coherent comparison between both formulations. Furthermore, the relative density at each point of the domain depends on a higher number of design variables as the degree of the B-splines is increased. Lastly, NURBS are not considered since they require to establish the value of the contribution weights of each control point. The introduction of a contribution weights in the formulation means that the solutions are influenced by this choice. This circumstance does not happen in case of using simple B-splines in the definition of the material layout. All the details about the problem are described in the next subsections and the definition of the most important concepts of Isogeometric Analysis can be found in Hughes et al. (2005).

2.1 Objective function

Minimum weight with stress constraints formulations (Bruggi and Duysinx 2012; Duysinx and Bendsøe 1998; Navarrina et al. 2005; París et al. 2007, 2009, 2010a) is established to attain the lowest cost structures. Since the amount of material required to manufacture the structure has an important impact in its cost, the objective function of the problem is in this case the structural weight that can be stated as follows:

$$\begin{aligned} F(\mathbf {\varvec{\rho }}) = \sum _{e=1}^{N_{e}} \int _{\Omega _{e}} \rho d\Omega _{e} \, . \end{aligned}$$
(2)

The design variables of the problem represent the value of the relative density in each control point. Therefore, the relative density at any point of the domain can be obtained as follows:

$$\begin{aligned} \rho (x,y)=\sum _{i=1}^{n}\sum _{j=1}^{m}N_{i,p}(x)M_{j,q}(y)\rho _{i,j} \, , \end{aligned}$$
(3)

where \(\rho _{i,j}\) is the value of the relative density in the control point (ij) and \(N_{i,p}\) and \(M_{j,q}\) are the quadratic B-splines basis functions of the control point (ij). Since the value of the design variable is independent of coordinates, Eq. (2) can be reduced to

$$\begin{aligned} F(\mathbf {\varvec{\rho }}) = \sum _{e=1}^{N_{e}}\sum _{i=1}^{n}\sum _{j=1}^{m} \rho _{i,j} \int _{\Omega _{e}} N_{i,p}(x)M_{j,q}(y) d\Omega _{e} \, . \end{aligned}$$
(4)

On the other hand, the attainment of full-void solutions is intended in this paper. For this reason, it is necessary to introduce a factor p which penalizes intermediate values of relative density (Navarrina et al. 2003, 2005; París et al. 2007, 2009, 2010a, 2010b). Thus, the objective function of the problem with a penalization of intermediate values of relative density is as follows:

$$\begin{aligned} F(\mathbf {\varvec{\rho }}) = \sum _{e=1}^{N_{e}} \int _{\Omega _{e}} \rho ^{1/p} d\Omega _{e} \, . \end{aligned}$$
(5)

The penalty coefficient p has to be greater than 1 to reduce the appearance of areas with intermediate values of relative density. This penalization of intermediate values of relative density produces an increase of the contribution to the structural weight of these areas. A graphic representation of the relative density penalized with the penalty coefficient p can be seen in Fig. 1. The penalty coefficient of the intermediate densities p is increased step by step during the optimization process to ensure the attainment of full-void solutions. Nevertheless, its value is initially 1 to reduce the non-linearity of the problem. The introduction of the penalty coefficient p in the objective function, Eq. (5), makes necessary to compute first the numerical integration of the structural weight and then its numerical derivative to compute its sensitivity analysis. Due to this numerical complexity, two alternative formulations of the objective function with the penalty coefficient p are developed below. First, it is important to remark that the attainment of full-void solutions does not avoid the appearance of intermediate values of relative density due to its continuity. In the first approach, all the quadratic B-splines are integrated to compute the contribution of each design variable in the whole domain. Then, the penalization factor p is applied over the design variables. Therefore, the equation of the penalized objective function can be stated as follows:

$$\begin{aligned} F(\mathbf {\varvec{\rho }}) = \sum _{i=1}^{n}\sum _{j=1}^{m} \rho _{i,j}^{1/p} \sum _{e=1}^{N_{e}} \int _{\Omega _{e}} N_{i,p}(x)M_{j,q}(y) d\Omega _{e} \, . \end{aligned}$$
(6)
Fig. 1
figure 1

Penalized relative density

In the second approach, the original objective function is integrated in each knot span separately, and the penalization factor p is applied over the result of the integral at each knot span. Consequently, the equation of the penalized objective function with this method is as follows:

$$\begin{aligned} F(\mathbf {\varvec{\rho }}) = \sum _{e=1}^{N_{e}} \rho _{e}^{1/p} S_{\Omega _{ks}} \, . \end{aligned}$$
(7)

where \(S_{\Omega _{ks}}\) is the surface of each knot span and \(\rho _{e}\) is the result of the integral of the relative density in the knot span e, integral that can be computed as follows:

$$\begin{aligned} \rho _{e} = \sum _{i=1}^{n}\sum _{j=1}^{m} \rho _{i,j} \frac{1}{S_{\Omega _{ks}}} \int _{\Omega _{e}} N_{i,p}(x)M_{j,q}(y) d\Omega _{e} \, . \end{aligned}$$
(8)

Both methods have been tested and the results obtained with each of them have been analyzed. The second one is finally chosen, since in the first method the penalization is applied over the design variables that only avoids the appearance of intermediate values on it. This does not avoid intermediate relative density values in the domain. However, the effect that has been intended with the penalization has been obtained with the second method, where intermediate relative densities are penalized in the whole domain. Moreover, this way of introducing the penalization in the formulation introduces an inherent penalization of the perimeter. This perimeter penalization is important since it is related with the reduction of areas with intermediate values of relative densities, as the structural perimeter is defined with a threshold relative density that takes an intermediate value of it.

2.2 Overweight constraint

The overweight approach and the damage approach (Verbart et al. 2016; Villalba et al. 2022) have demonstrated to be a valid alternative to the classical aggregation functions used to combine the effect of a certain number of local stress constraints in the problem. The Overweight Approach penalizes the violation of the local stress constraints in a structure through an extra-weight of the material in the areas where they are violated. This overweight consists in a perturbation of the relative density whose magnitude depends on the level of violation of the constraint. For this purpose, an alternative model of the original structure is created with an increase of the relative density of the material when the local stress constraints are violated. The Overweight approach used in this paper Villalba et al. (2022) is equivalent to the Damage Approach developed by Verbart in Verbart et al. (2016). The main difference between both approaches is the property considered in the formulation of the alternative model, the former uses the relative density and the latter the Young Modulus. The constraint in both approaches consists on the comparison of a global property of both models, the original and the alternative. This global property is related with the property perturbated in the alternative model. The Overweight approach compares the structural weight and the Damage approach the structural stiffness. In brief, the alternative model is created from the original one using the local stress constraints, and the constraint consists on a comparison between both models. Regarding the Overweight Approach, the overweight model is always heavier than the original one without overweight when there are violated local stress constraints. The process to generate the overweight model from the original one can be seen in Villalba et al. (2022). The Overweight Constraint imposed in the problem consists on a comparison between the structural weights of both models as follows:

$$\begin{aligned} g\left( \rho \right) =\frac{\tilde{W}}{W}-1 = 0 \, , \end{aligned}$$
(9)

where W is the structural weight of the original model and \(\tilde{W}\) is the structural weight of the overweight one. This means that the structural weight of both models is different when some local stress constraints are violated. All local stress constraints are checked by comparing only one global property of the structure. Moreover, the structural weight of the overweight model is never lower than the structural weight of the original one. Both structural weights can be computed as follows:

$$\begin{aligned} W \left( \rho \right) = \int _{\Omega } \rho d\Omega \hspace{2 cm} \tilde{W} \left( \tilde{\rho } \right) = \int _{\Omega } \tilde{\rho } d\Omega \, , \end{aligned}$$
(10)

where \(\rho\) and \(\tilde{\rho }\) are the relative density of the original and overweight model, respectively. This definition of the overweight constraint means that the constraint is always active even when all the structural stresses are lower than their maximum value since the structural weight of both models coincides. This circumstance is not desirable since the derivatives of the Overweight Constraint have to be computed in any case. Therefore, in order to relax the equality constraint a small positive parameter \(\zeta\) is introduced in the formulation of the overweight constraint, despite the fact that, theoretically, this means that stress constraints can be slightly violated. Thus, Eq. (9) becomes

$$\begin{aligned} g\left( \rho \right) =\frac{\tilde{W}}{W}-1 \le \zeta \, . \end{aligned}$$
(11)

The value of \(\zeta\) should not be extremely high to avoid an excessive violation of the local stress constraints. By contrast, extremely small values of \(\zeta\) means that the optimal solution is attained in a higher number of iterations. The value of the relaxation parameter of the overweight constraint \(\zeta\) is \(10^{-3}\). On the other hand, the relative density of the overweight model can be computed as follows:

$$\begin{aligned} \tilde{\rho } = \rho _{min} + \beta \left( \rho - \rho _{min} \right) \, , \end{aligned}$$
(12)

where \(\beta\) is the overweight function and \(\beta \left( \sigma ; \sigma _{max} \right) \ge 1\). The overweight function \(\beta\) has to satisfy two conditions: to be at least first order differentiable and to be monotonically increasing when stresses exceed its allowable limit. These conditions are needed to solve the problem with gradient-based methods. The overweight function \(\beta\) considered is as follows:

$$\begin{aligned} \beta (\sigma ;\delta ) = \left\{ \begin{aligned} 1, \hspace{2.9 cm}&\hbox {if} \hspace{0.2 cm} \frac{\sigma }{\sigma _{max}} \le \left( 1 - \psi \right) \\ e^{\left( \frac{\delta \tau ^{2}}{\psi ^{\frac{2\psi }{\tau }}} \left( h(\sigma ) + \psi \right) ^{\frac{2\psi }{\tau }}\right) }, \hspace{0.2 cm}&\hbox {if} \hspace{0.2 cm} \left( 1 - \psi \right)< \frac{\sigma }{\sigma _{max}} < 1 \\ e^{\delta \left( h(\sigma ) + \tau \right) ^2}, \hspace{1.45 cm}&\hbox {if} \hspace{0.2 cm} \frac{\sigma }{\sigma _{max}} \ge 1 \, , \end{aligned} \right. \end{aligned}$$
(13)

where h is the classical local stress constraint normalized, \(\delta > 0\) is the exponential degradation parameter which controls the gradient of the overweight function and the amount of overweight for each stress level, \(\tau\) is the magnitude of the overweight function movement to the left, and \(\psi\) is the size of the definition range of the transition function, being (\(\psi > \tau\)). In this manuscript, the value of these parameters is as follows: (i) exponential degradation parameter \(\delta = 50\), (ii) magnitude of the overweight function movement to the left \(\tau = 0.01\), and (iii) size of the definition range of the transition function \(\psi =0.1\). On the other hand, the classical local stress constraint normalized h is stated as

$$\begin{aligned} h(\varvec{\sigma }) = \frac{\sigma _{VM}(\varvec{\sigma })}{\sigma _{max} \varphi } - 1 \le 0 \, , \end{aligned}$$
(14)

where \(\sigma _{VM}\) is the Von Mises stress, \(\sigma _{max}\) is the maximum allowable value of stresses, and \(\varphi\) is a stress relaxation coefficient included in the formulation to avoid the singularity phenomena of the stress criterion when the relative density tends to zero and to increase the value of the maximum allowable stress for intermediate values of relative density. The basis of the stress relaxation technology and the epsilon-relaxation algorithm has been established in Duysinx and Bendsøe (1998), Cheng and Guo (1997), and Cheng and Jiang (1992). In this manuscript and in the same way that in the literature, this stress relaxation coefficient (\(\varphi \ge 1\)) depends on the value of the relative density as follows:

$$\begin{aligned} \varphi = 1 - \varepsilon + \frac{\varepsilon }{\rho } \, , \end{aligned}$$
(15)

where \(\varepsilon\) is the stress relaxation parameter whose value is progressively increased to make possible the appearance of areas with the lower limit of the relative density that intends the attainment of full-void solutions and \(\rho\) is the relative density at each point of the domain.

2.3 Side constraints

The side constraints establish the maximum and the minimum value of the design variables. The upper limit of the design variables is equal to 1, what means that this part of the domain is full of material. However, the lower limit of the design variables is not equal to zero, since this value produces the singularity of the stiffness matrix. For this reason, the lower limit of the design variables takes a value slightly superior to zero. The lower limit is 0.001 according to other references in the literature (Bendsøe 1995; Bendsøe and Kikuchi 1988; Bruggi and Duysinx 2012; París et al. 2007; Villalba et al. 2022). The value of the lower limit of the design variables does not have a big influence in the problem, since the areas with this value of relative density in the original model maintains this value in the overweight model in any case. This intends to simulate the particular case of relative density equal to zero where the structural stresses do not exist properly. As a consequence, the local stress constraints placed in the areas with relative density equal to its lower limit do not have influence in the formulation of the overweight constraint.

3 Optimization algorithms

An iterative algorithm that involves different approaches is used in the solution of the problem (1). The design variables vector \(\varvec{\rho }\) is updated in each iteration as follows:

$$\begin{aligned} \varvec{\rho _{k+1}} = \varvec{\rho _{k}} + \theta _{k}\mathbf {s_{k}} \, , \end{aligned}$$
(16)

where \(\theta _{k}\) is the improvement factor which establishes the magnitude of modification between two consecutive iterations and \(\mathbf {s_{k}}\) is the improvement design direction. A move limits approach of the design variables is considered to avoid an excessive modification of the design variables between two consecutive iterations. This limitation in the modification of the design variables \(\left( \Delta \rho _{i,j}\right) _{max}\) is introduced due to the high non-linearity of the problem. Nevertheless, it is also important that the move limits do not become considerably small to avoid an important increase in the number of iterations required to solve the problem. Therefore, the main objective of these move limits is to facilitate the convergence to the optimal solution. For this purpose, a reduction of them is done to avoid the oscillation around the optimal solution. This reduction consists on multiplying the move limits by a reduction factor \(\left( F_{Red}\right)\) each certain number of iterations \(\left( N_{It,Red}\right)\). Consequently, the best improvement direction is computed in a first place and then the improvement factor is established. The algorithms used to calculate the improvement direction and the improvement factor can be seen in Villalba et al. (2022). In any case, it is required a complete first-order sensitivity analysis to compute both parameters.

4 Sensitivity analysis

The optimization algorithms require the computation of all the first-order derivatives. This procedure is the key point in the solution of problem with isogeometric analysis since the relationship between relative density and design variables is not as straightforward as with the finite element formulations. The computation of the first-order sensitivity analysis in an efficient way requires to use two different approaches due to the different characteristics of the objective function and the overweight constraint.

4.1 Sensitivity analysis of the objective function

The direct differentiation approach is used to compute the sensitivity analysis of the objective function due to the direct dependence of the structural weight on the design variables. The sensitivity analysis of the objective function, Eq. (7), is computed considering the penalization of the intermediate values of relative density. As mentioned above, the first-order derivative of the objective function is analytically computed as follows:

$$\begin{aligned} \frac{\partial F}{\partial \rho _{i,j}} = \sum _{e=1}^{N_{ks}} \frac{\partial F}{\partial \rho _{e}} \frac{\partial \rho _{e}}{\partial \rho _{i,j}} \, , \end{aligned}$$
(17)

where both terms are computed as follows:

$$\begin{aligned} \begin{aligned}&\frac{\partial F}{\partial \rho _{e}} = \frac{1}{p} \rho _{e}^{\frac{1-p}{p}} S_{\Omega _{ks}} \hspace{0.7 cm} \hbox {and}\\ {}&\frac{\partial \rho _{e}}{\partial \rho _{i,j}} = \frac{1}{S_{\Omega _{ks}}} \int _{\Omega _{e}} N_{i,p}(x)M_{j,q}(y) d\Omega _{e} \, , \end{aligned} \end{aligned}$$
(18)

where \(p \ge 1\) is the penalization factor of intermediate densities, \(\rho _{e}\) is the mean value of the relative density in the knot span e, \(\rho _{i,j}\) is the value of the relative density in the control point (ij), and \(S_{\Omega _{ks}}\) is the surface of the knot span considered.

4.2 Sensitivity analysis of the overweight constraint

Although the direct differentiation techniques can be also used in the computation of the sensitivity analysis of the overweight constraint, its use is not advisable in the majority of the cases. The use of direct differentiation techniques usually supposes an important need of computational requirements since the relationship between the overweight constraint and the design variables is not as straightforward as in the objective function. The dependence of the overweight constraint with respect to the design variables is direct and indirect through the structural stresses. The use of direct differentiation requires to solve as many structural analyses as design variables to obtain the complete sensitivity analysis. However, when the number of constraints is considerably lower in comparison with the number of design variables, the Adjoint Variable Approach is the most efficient method to compute this sensitivity analysis (Holmberg et al. 2013; París et al. 2010a, 2010c; Poon and Martins 2007) , since it is necessary to compute only as many linear equation systems as constraints. This is the case of this problem, where only the overweight constraint is defined. The analytical expression of the first-order derivatives of the overweight constraint can be stated as

$$\begin{aligned} \frac{dg}{d\rho _{i,j}} = \frac{\partial g}{\partial \sigma _{VM}} \frac{d \sigma _{VM}}{d\varvec{\sigma }} \frac{d\varvec{\sigma }}{d\varvec{\alpha }} \frac{\varvec{d \alpha }}{d\rho _{i,j}} + \frac{\partial g}{\partial \rho _{i,j}} \, , \end{aligned}$$
(19)

where \(\varvec{\sigma }\) is the local stress vector used to compute the Von Mises stress \(\sigma _{VM}\) and \(\varvec{\alpha }\) is the nodal displacement vector. These derivatives can be computed by applying the Adjoint variable approach described in Holmberg et al. (2013), París et al. (2010a, 2010c), Poon and Martins (2007) as

$$\begin{aligned} \frac{dg}{d\rho _{i,j}} = \varvec{\lambda ^{T}} \left( \frac{d\textbf{f}}{d\rho _{i,j}} - \frac{d \textbf{K}}{d \rho _{i,j}}\varvec{\alpha } \right) + \frac{\partial g}{\partial \rho _{i,j}} \, , \end{aligned}$$
(20)

where \(\varvec{\lambda }\) is the adjoint variable, \(\textbf{K}\) is the structural stiffness matrix, and \(\textbf{f}\) is the applied loads vector. The adjoint variable \(\varvec{\lambda }\) is computed by solving a system of linear equations

$$\begin{aligned} \textbf{K}^{T} \varvec{\lambda } = \left( \frac{\partial g}{\partial \sigma _{VM}} \frac{d \sigma _{VM}}{d\varvec{\sigma }} \frac{d\varvec{\sigma }}{d\varvec{\alpha }} \right) ^{T} \, . \end{aligned}$$
(21)

The terms \(\frac{\partial g}{\partial \sigma _{VM}}\) and \(\frac{\partial g}{\partial \rho _{i,j}}\) can be computed using the chain rule as

$$\begin{aligned} \frac{\partial g}{\partial \sigma _{VM}} = \frac{\partial g}{\partial \tilde{W}} \frac{\partial \tilde{W}}{\partial \tilde{\rho }} \frac{\partial \tilde{\rho }}{\partial \beta } \frac{\partial \beta }{\partial \sigma _{VM}} \end{aligned}$$
(22)

and

$$\begin{aligned} \frac{\partial g}{\partial \rho _{i,j}} = \frac{\partial g}{\partial \tilde{W}} \frac{\partial \tilde{W}}{\partial \tilde{\rho }} \frac{\partial \tilde{\rho }}{\partial \rho _{i,j}} + \frac{\partial g}{\partial W} \frac{\partial W}{\partial \rho _{i,j}} \, . \end{aligned}$$
(23)

5 Numerical implementation

The most relevant numerical aspects of the algorithm developed in this paper to solve the topology optimization problem using isogeometric analysis (IGA) are commented below. First, Fortran is the programming language used for the numerical implementation of the algorithm developed. The optimization problem solved is extremely non-linear with respect to the overweight constraint. This circumstance produces an important oscillation of the solutions obtained during the optimization process around its optimum. As a consequence, a modification of some parameters of the problem is made to achieve that the solution converges to its optimum. First, the move limits of the design variables are reduced each certain number of iterations to diminish the oscillations around the optimal and guarantee the convergence. The other parameters modified are the penalty coefficient of intermediate values of relative density (p) and the stress relaxation coefficient (\(\varepsilon\)). These parameters are also modified with the objective of attaining full-void solutions. The value of these parameters is also modified each certain number of iterations. At this point, it is important to remark that sharp modifications of the parameters are not advisable since it means an important change of the problem. The optimal solution is achieved when the solution does not experiment important changes after a certain number of iterations and all the considered values for the previous parameters are used.

6 Application examples

The use of the isogeometric analysis to solve the structural problem and to define the material layout is validated by studying two structural problems frequently analyzed in the topology optimization field. These examples are two-dimensional structures in plane stress and are used to compare the performance of the methodology developed in this paper with another formulation to define the relative density in the domain, a uniform relative density per element formulation developed previously in Villalba et al. (2022). In all the examples, the material considered is steel with density \(\rho _{mat}\) \(=\) 7850 \(\hbox {kg}/\hbox {m}^{3}\), Young’s modulus E \(=\) 210 \(\hbox {GPa}\), Poisson’s ratio \(\nu\) \(=\) 0.3, and yield stress \(\hat{\sigma }_{max}\) \(=\) 230 \(\hbox {MPa}\). Self-weight of the structure is included as a structural load. The initial design of all the examples consists on a domain full of material. All the examples have been computed on an Intel(R) Xeon(R) CPU E5-2697 A v4 processor of 2.60 GHz with 64 GB of RAM.

6.1 Cantilever beam

The first example corresponds to a cantilever beam with null displacements in the left edge and a vertical force applied in the middle of the right edge. Figure 2 shows the dimensions of the domain and the position of the vertical forces applied. The domain of the structure has been discretized using a patch with 200 x 100 quadratic knot spans. The thickness of the structure considered is 0.30 m and a vertical load of (1000 kN) has been distributed on ten elements to avoid stress accumulation phenomena. This number of elements only has influence in the stresses placed in the vicinity of the loading point. This influence diminishes as the distance with the area, where the load is applied, increases.

Fig. 2
figure 2

Cantilever beam: domain dimensions. (Units—m)

Figures 3 and 4 show the evolution of the optimal solution of the problem during the optimization process and Figs. 5 and 6 show the optimal solution of the problem with both formulations: the uniform relative density per element and relative density defined using B-splines. Both final solutions consist in a certain number of bars which coincide with the isostatic lines. The most important characteristic of this example is the existence of a certain symmetry in the final solutions between the upper and the lower part of the domain. This circumstance is due to the structural model used that is linear and the material chosen that is steel, which has the same behavior to traction and compression forces. The theoretical solution consists on an infinite number of bars which coincides with the isostatic lines. For this reason, a higher number of iterations is required to solve this problem in contrast with the other example since the topology optimization algorithm has to select and remove the majority of these infinite bars. Figures 7 and 8 show the normalized stress state for the optimal solution. This state is obtained through the quotient between the stress at each point of the domain and the stress relaxation coefficient times the maximum allowable stress. Figures 7 and 8 show the existence of regions where stresses are slightly higher to their maximum value. This circumstance, common to all the examples, is consequence of the relaxation of the overweight constraint required to have an inequality constraint. The violation of the local stress constraints produced by the relaxation of the overweight constraint can be mitigated by decreasing the value of the relaxation parameter or by increasing the value of the exponential degradation parameter of the overweight function. Nevertheless, this is not the only cause that produces the appearance of stresses higher than their maximum. The definition of the relative density in the overweight model also facilitates the appearance of this regions when the relative density is equal to its lower limit. This circumstance is intended since it tries to simulate the absence of material in these areas what means the absence of structural stresses. Figures 9 and 10 show the evolution of the structural weight and the objective function during the optimization process. It is possible to observe in Figs. 9 and 10 that the value of the structural weight is almost constant during the majority of the process. This circumstance is due to the redistribution of the material in the domain that can be observed in Figs. 11 and 12. In contrast, the objective function tends to be reduced during all the process with the exception of the iterations in which the penalty coefficient of intermediate values of relative density is modified. This reduction is zigzag instead of being continuous like the reduction attained when local stress constraints are used. Figures 11 and 12 show the distribution of the design variables in the last iteration in which each value of the penalty coefficient of intermediate values of relative density is applied, the material layout in these iterations can be seen in Figs. 3 and 4. Figures 11 and 12 show that the presence of design variables with intermediate values is reduced considerably as the penalty coefficient of intermediate values is increased.

Fig. 3
figure 3

Cantilever beam: optimal process—uniform density per element formulation

Fig. 4
figure 4

Cantilever beam: optimal process—relative density defined using B-splines

Fig. 5
figure 5

Cantilever beam: optimal solution—uniform density per element formulation

Fig. 6
figure 6

Cantilever beam: optimal solution—relative density defined using B-splines

Fig. 7
figure 7

Cantilever beam: normalized stress—uniform density per element formulation

Fig. 8
figure 8

Cantilever beam: normalized stress—relative density defined using B-splines

Fig. 9
figure 9

Cantilever beam: structural weight—uniform density per element formulation

Fig. 10
figure 10

Cantilever beam: structural weight—relative density defined using B-splines

Fig. 11
figure 11

Cantilever beam: design variables distribution—uniform density per element formulation

Fig. 12
figure 12

Cantilever beam: design variables distribution—relative density defined using B-splines

Table 1 Cantilever beam: general parameters of the problem
Table 2 Cantilever beam: evolutionary parameter of the problem
Table 3 Cantilever beam: results
Table 4 Cantilever beam: distribution of computing time per iteration

Tables 1 and 2 show the value of the most important parameters of the problem. Table 1 shows the value of the parameters related with the definition of the problem and with the optimization process. The former are the number of design variables which coincides with the number of control points and the number of constraints that in this case is equal to 1, since only the overweight constraint is defined. The latter are the initial move limits, in this case 0.005, the reduction factor of the move limits, and its frequency of modification. Table 2 shows the different values that the penalty coefficient of intermediate values of relative density and the stress relaxation coefficient take during the optimization process and the range of iterations in which they are applied. Table 3 shows the results obtained with the solution of the problem: number of iterations, final structural weight, percentage of the domain occupied by material, and total CPU time. 4000 and 4200 iterations were required to guarantee that the solution converges to its optimal. The part of the domain occupied by material is around the 15% and it has been required almost 27 and 18 h to attain the optimal solutions. Finally, Table 4 shows the distribution of the CPU time per algorithm of an average iteration. Table 4 shows that the structural and sensitivity analyses means more than the 90% of the total CPU time required to solve the problem in both cases. As a result, the CPU time required for the rest of the algorithms and the data initialization is considered negligible.

6.2 MBB beam

The second example corresponds to a MBB beam with null vertical displacements in the supports and a vertical distributed force applied in the central part of the structure over the upper edge. Figure 13 shows the dimensions of the domain and the position of the vertical forces applied of the entire structure and the part of the structure considered in the solution of the problem. The structural domain has been discretized using a homogeneous patch with 240 times 80 quadratic knot spans. The thickness of the structure is 0.40 m and an external distributed load of 2700 kN/m is applied over 32 adjacent elements in the upper part of the domain in the proximity of the symmetry axis.

Fig. 13
figure 13

MBB beam: domain dimensions (units—m)

Figures 14 and 15 show the evolution of the optimal solution during the resolution of the problem, while Figs. 16 and 17 show the optimal solution of the problem once the symmetrical replication through the symmetry axis has been made since only half of the structure is computed. In both examples, the quality of the results obtained using quadratic B-splines to define the material layout that is quantified in terms of smoothness, is very good in comparison with the uniform density per element formulation. Figures 18 and 19 show the normalized stress state for the optimal solution with both formulations. In the same way that for the cantilever beam, there are regions with structural stresses slightly higher than their maximum value. The causes of its appearance and the strategies used to mitigate it have been commented in the previous example. Figures 20 and 21 show the evolution of the structural weight and the objective function during the optimization process. Figures 22 and 23 show the distribution of the design variables in the last iteration in which each value of the penalty coefficient of intermediate values of relative density is applied. Figs. 14 and 15 show the material layout at these iterations. All these figures have the same behavior than the figures of the cantilever beam. The consideration of the self-weight as a structural load does not have a big influence in the results since the magnitude of the structural weight only supposes at most 7% of the value of the external loads applied over the structure. This percentage is quickly reduced in the first iterations of the optimization process.

Fig. 14
figure 14

MBB beam: optimal process—uniform density per element formulation

Fig. 15
figure 15

MBB beam: optimal process—relative density defined using B-splines

Fig. 16
figure 16

MBB beam: optimal solution—uniform density per element formulation

Fig. 17
figure 17

MBB beam: optimal solution—relative density defined using B-splines

Fig. 18
figure 18

MBB beam: normalized stress—uniform density per element formulation

Fig. 19
figure 19

MBB beam: normalized stress—relative density defined using B-splines

Fig. 20
figure 20

MBB beam: structural weight—uniform density per element formulation

Fig. 21
figure 21

MBB beam: structural weight—relative density defined using B-splines

Fig. 22
figure 22

MBB beam: design variables distribution—uniform density per element formulation

Fig. 23
figure 23

MBB beam: design variables distribution—relative density defined using B-splines

Tables 5 and 6 show the value of the most important parameters of the problem. Table 5 shows the value of the parameters related with the definition of the problem: number of design variables and number of constraints; and with the optimization process: initial move limits, reduction factor of the move limits, and frequency of modification of the move limits. Table 6 shows the different values that the penalty coefficient of intermediate values of relative density and the stress relaxation coefficient take during the optimization process and the range of iterations in which they are applied. Table 7 shows the results obtained with the solution of the problem: number of iterations, final structural weight, percentage of the domain occupied by material, and total CPU time. 2400 and 2600 iterations were required to guarantee that the solution converges to its optimal. As it was commented previously, it is important to remark that the complexity of the problem is related with the number of iterations required to solve it as it can be seen if a comparison between the number of iterations required to solve both examples is made. Finally, Table 8 shows the distribution of the CPU time per algorithm of an average iteration. Table 8 shows that the structural and sensitivity analyses mean more than the 94% of the total CPU time required to solve the problem. Consequently, the CPU time required for the rest of the algorithms can be considered negligible. The CPU time required by the data initialization is also negligible with respect to the CPU time required to solve one iteration of the problem.

Table 5 MBB beam: general parameters of the problem
Table 6 MBB beam: evolutionary parameter of the problem
Table 7 MBB beam: results
Table 8 MBB beam: distribution of computing time per iteration

6.3 L-shaped beam

The last example corresponds to a L-shaped beam with null displacements in the upper edge and a vertical force applied in the upper part of the right edge. Figure 24 shows the dimensions of the domain and the position of the vertical forces applied. The structural domain has been discretized using a mesh of 19,600 quadratic knot spans. The thickness of the structure is 0.40 m and a vertical load of (900 kN) has been distributed on six elements in order to avoid stress accumulation phenomena.

Fig. 24
figure 24

L-shaped beam: domain dimensions (units—m)

Figures 25 and 26 show the evolution of the optimal solution during the resolution of the problem, while Figs. 27 and 28 show the optimal solution of the problem. In both Figs. 27 and 28, it is possible to observe that the stress concentration phenomena which takes place in the inside corner of the domain is avoided by the formulation with stress constraints developed in this manuscript. For this purpose, the geometry of the optimal solution is rounding in the corners where this stress concentration phenomena appears. Figures 29 and 30 show the normalized stress state for the optimal solution with both formulations. In the same way that for the previous examples, there are regions with structural stresses slightly higher than their maximum value. The causes of its appearance and the strategies used to mitigate it has been commented in the cantilever beam example. The scale of the normalized stress shown in all the figures is fixed in order to facilitate the comparison of the different formulations with each other. Figures 31 and 32 show the evolution of the structural weight and the objective function during the optimization process. Figures 33 and 34 show the distribution of the design variables in the last iteration in which each value of the penalty coefficient of intermediate values of relative density is applied; Figs. 25 and 26 show the material layout at these iterations. All these figures have the same behavior than the figures of the previous examples.

Fig. 25
figure 25

L-shaped beam: optimal process—uniform density per element formulation

Fig. 26
figure 26

L-shaped beam: optimal process—relative density defined using B-splines

Fig. 27
figure 27

L-shaped beam: optimal solution—uniform density per element formulation

Fig. 28
figure 28

L-shaped beam: optimal solution—relative density defined using B-splines

Fig. 29
figure 29

L-shaped beam: normalized stress—uniform density per element formulation

Fig. 30
figure 30

L-shaped beam: normalized stress—relative density defined using B-splines

Fig. 31
figure 31

L-shaped beam: structural weight—uniform density per element formulation

Fig. 32
figure 32

L-shaped beam: structural weight—relative density defined using B-splines

Fig. 33
figure 33

L-shaped beam: design variables distribution—uniform density per element formulation

Fig. 34
figure 34

L-shaped beam: design variables distribution—relative density defined using B-splines

Tables 9 and 10 show the value of the most important parameters of the problem. Table 11 shows the results obtained with the solution of the problem. Finally, Table 12 shows the distribution of the CPU time per algorithm of an average iteration. Table 12 shows that the structural and sensitivity analyses mean more than the 94% of the total CPU time required to solve the problem. Consequently, the CPU time required for the rest of the algorithms can be considered negligible.

Table 9 L-shaped beam: general parameters of the problem
Table 10 L-shaped beam: evolutionary parameter of the problem
Table 11 L-shaped beam: results
Table 12 L-shaped beam: distribution of computing time per iteration

7 Comparative analysis

Once the results obtained with the formulation developed in this paper and the material distribution established in Villalba et al. (2022) have been commented, it is possible to make a comparative analysis between these two ways used to define the material distribution in the domain: a uniform relative density per element formulation (FEM-based) and the density relative defined using B-splines (IGA-based). This comparative analysis considers all the differentiating aspects of the problem.

7.1 Geometry of the domain

FEM-based formulations tend to use, in general, regular meshes in the discretization of the domain for the solution of this kind of problems to reduce the influence of the meshing in the solution to the mesh size (mesh dependence phenomena). Regular meshes can only be attained with IGA formulations using a single B-spline basis functions if the domain is assimilable to a square or a rectangle. For this reason, the geometry of the domain is a limiting criterion in the IGA-based formulations with a single B-spline basis functions in contrast with the FEM-based formulations where geometries of the domain more complex can be defined with regular meshes.

7.2 Design variables

There are a little difference in the number of design variables used with both formulations as it can be seen in Tables 1 and 5. The IGA-based formulation requires \((n_{x}+2) (n_{y}+2)\) design variables while the FEM-based formulation uses only \(n_{x} n_{y}\) design variables. This difference can be considered neglectable in high spatial definition problems where the magnitude of \(n_{x}\) and \(n_{y}\) is considerably high and, as a consequence, it does not have a big influence in the computational requirements.

7.3 Structural stiffness matrix

The size of the structural stiffness matrix is one of the key aspects in the solution of the structural analysis. This is one of the most important aspects, since it means an important difference in the computational requirements used for both formulations. The size of the structural stiffness matrix depends on the dimensions of the problem and the number of nodes required for the structural analysis. The IGA-based formulation requires as many nodes as control points have been used in the definition of the material layout \((n_{x}+2) (n_{y}+2)\). On the contrary, the FEM-based formulation uses eight-node quadrilateral elements and the number of nodes required is equal to \(3 n_{x} n_{y} + 2 n_{x} + 2 n_{y} + 1\). This means that the difference in the number of nodes between both formulations is equal to \(2 n_{x} n_{y} - 3\). This difference is extremely relevant, since in high spatial definition problems the IGA-based formulation only requires one-third of the nodes required by the FEM-based formulation. This supposes an important improvement in the computational requirements used to solve the structural analysis. This circumstance can be observed in Tables 4 and 8 where the percentage of CPU time required by the structural analysis is considerably higher in the FEM-based formulation. Moreover, the bandwidth of the IGA-based matrix is lower than the bandwidth of the FEM-based matrix. The most common bandwidth in IGA-based matrix is equal to \(3 n + 6\), while this parameter with the FEM-based matrix is equal to \(5 n + 3\), where n in two-dimensional problems is equal to the minimum of \((n_{x},n_{y})\). The size of the structural stiffness matrix and the size of the bandwidth supposes with IGA-based formulation a reduction of the CPU time and memory space required with respect to the FEM-based formulation. This reduction of computational requirements is important since the structural analysis became the critical step to solve the topology optimization problem in terms of CPU time and memory when the FEM-based formulations were used.

7.4 Sensitivity analysis

The definition of the material distribution is one of the key aspects in the computation of the sensitivity analysis, since the objective function and the overweight constraint depends on the structural weight. This is the other important aspect since it means a crucial difference in the computational requirements used for both formulations. The sensitivity analysis is the critical step of the IGA-based formulation in terms of CPU time. In the FEM-based formulation the relative density at any point of the domain depends only on one design variable. However, the use of quadratic B-splines to define the material layout means that the relative density at any point depends on nine design variables. This means that the sensitivity analysis of each knot span requires nine times the time required for solving the sensitivity analysis of each element in the FEM-based formulation. This difference is not as important as the size of the structural stiffness matrix since it does not depend directly on the dimensions of the problem. But it supposes a relevant complexity in the computational requirements used to solve the sensitivity analysis. Tables 4 and 8 show that the highest percentage of CPU time is required by the sensitivity analysis in the IGA-based formulation.

7.5 Spatial definition of the solution

The spatial definition of the solutions obtained for the same problem with the FEM-based formulation has been considerably improved with the IGA-based formulation. The FEM-based formulation can only improve its spatial definition using more elements in the domain; however, the IGA-based formulation improves its spatial definition, not only using more knot spans but also by increasing the degree of the B-splines considered in the definition of the material layout.

7.6 Transition from low densities to high densities

The IGA-based formulation avoids the appearance of sharp transitions from low densities to high densities due to the continuity in the value of the relative density. However, these sharp transitions tend to be predominant with the FEM-based formulation as the value of the penalization coefficient of intermediate values of relative density is increased. This is possible because of the discontinuity in the value of the relative density between adjacent elements. The continuity in the value of the relative density in the domain guarantees the structural integrity and avoids the appearance of checkerboard patterns in the solutions obtained. The discontinuity between adjacent elements can introduce a punctual contact between two parts of the structure derived from the appearance of checkerboard patterns.

7.7 CPU time

The CPU time required to solve the same problem with both formulations is quite similar as it can be seen in Tables 3 and 7. In all the problems solved in this paper, the CPU required is slightly lower with the IGA-based formulation, despite of having to use more iterations to solve both problems. This circumstance is important because an improvement in the quality of the results obtained has been achieved without increasing the CPU time required to solve the problem with the FEM-based formulation.

In short, the IGA-based formulation provides important benefits with respect to the FEM-based formulations. A better spatial definition of the solutions is attained due to the continuity of the relative density in the domain that at the same time reduces the mesh dependence of the solutions and avoids the appearance of checkerboard patterns. Solutions with the same spatial definition requires less design variables and the CPU time required to solve the same topology optimization problem is lower. Moreover, an implicit perimeter penalization is introduced with the penalization of intermediate values of relative density.

8 Conclusion

This paper introduces an isogeometric formulation in the solution of the topology optimization of two-dimensional structures problem with minimum weight and stress constraints using the overweight approach. For this purpose, quadratic B-splines are used to define the material layout and to solve the structural analysis.

This method provides solutions with a continuous value of the relative density in all the domain. Moreover, the use of B-splines in the definition of the problem provides solutions with more spatial definition than the majority of the formulations used until now. This is important since the attainment of solutions with the same spatial definition requires the use of less design variables, what means a reduction of the computational requirements. On the other hand, the use of B-splines uses the classical optimization algorithms to attain the optimal solution and avoids the solution of complex differential equations required by the Level Set or the Phase Field methods. However, the solutions attained with B-splines presents a certain mesh dependence.

The use of B-splines and an Overweight Constraint means that the sensitivity analysis is the critical step of the algorithm developed in this paper in terms of CPU time and memory. Moreover, the use of B-splines in the definition of the material layout provides solutions without checkerboard patterns due to its continuous character. The introduction of a penalty coefficient over the intermediate values of the relative density to obtain full-void solutions also introduces a perimeter penalization. On the other hand, the use of the same B-splines to define the material layout in the domain and to compute the structural analysis has several important advantages since the relative density is considered in the definition of the structural stiffness matrix.

In conclusion, the use of quadratic B-splines to define the material distribution reports important benefits from a computational point of view in topology optimization problems. The CPU time required to obtain solutions with high spatial definition is not extremely high since these solutions can be obtained using less design variables than the existing formulations. However, if the number of design variables is increased the smoothness of the obtained solutions is improved. Moreover, the use of a penalty coefficient over the intermediate values of the relative density provides solutions whose topology is clearly defined.