## 1 Introduction

Topology optimization is a mathematical method that optimally places the material within a given design domain for the specific loading and boundary conditions applied. It has been recognized as the most active research area in the field of structural optimization over the past two decades (Deaton and Grandhi 2014). Driven by a major interest from both academia and industry, various topology optimization approaches have been developed (Garreau et al. 2001; Sigmund and Maute 2013; van Dijk et al. 2013; Huang and Xie 2010; Zhang et al. 2017). The density-based methods, especially the so-called SIMP (Solid Isotropic Material with Penalization) method (Sigmund 2001; Bendsøe and Sigmund 2003), are the most widely used techniques. They start from a discretization of the prescribed design domain into a finite element model, whereby a design variable, which is the relative density, is assigned to each finite element. The relative density can take values between zero (a void) and unity (a solid), and is directly related to the element stiffness via a penalization factor. Accordingly, the optimized distribution of the relative density can be determined by adopting an optimization algorithm that computes the minimal structural compliance (which corresponds to the maximal structural stiffness) of the design domain, see also Andreassen et al. (2011), Liu and Tovar (2014), Rojas-Labanda and Stolpe (2015, 2016) and references therein.

Due to the nature of the SIMP method, however, the possible solutions of the density distribution are bounded by the specific size and shape of the design domain chosen. This limitation can be reduced by choosing the design domain as large as possible, although this may lead to relatively large computational times. Alternatively, the construction of the design domain may be formulated as an optimization problem (Kim and Kwak 2002). Such a strategy not only offers the possibility to keep computational times more manageable, it also facilitates the optimization of aeroelastic structures, such as wind turbine blades (Buckney et al. 2013) and aircraft wings (Aage et al. 2017), whereby the applied loads (i.e., the aerodynamic forces) are characterized by the actual size and shape of the design domain.

Previous research has demonstrated that the variation of the design domain within an optimization strategy can be accomplished by means of several approaches. A first possible approach is based on the so-called design space optimization method (Kim and Kwak 2002; Jang and Kwak 2008), which adjusts the design domain boundary during topology optimization by adding new design elements. This approach seems to be relatively straightforward to implement, but has the drawback that the boundaries of the domain are represented by a jagged geometry characterized by the element boundaries of the finite element discretization. A second approach that enables the variation of the design domain is the level-set method (Osher and Sethian 1988). As demonstrated in Luo et al. (2007), Wang et al. (2007), Zhang et al. (2012), Wang and Kang (2018), this method allows to elegantly combine shape and topology optimizations within a single framework. In comparison to density-based topology optimization methods, with the level-set method it is more difficult to mathematically describe the appearance of holes of arbitrary shape inside the design domain (Allaire and Jouve 2006). In addition, level-set functions may become too flat or too steep during the optimization procedure, such that they need to be periodically reinitialized in order to obtain a solution with sufficient numerical accuracy, which increases the computational cost. An approach somewhat similar to the level-set method is the phase-field method, which uses a partial differential equation for describing the evolution of topologies in a structural optimization problem (Takezawa et al. 2010; Gain and Paulino 2012). Although the topologies are solved over the complete design domain without the need of prior information on the location of internal boundaries, the phase-field method does not facilitate the generation of holes, which thus limits the range of possible topological solutions. The same limitation applies to the moving morphable components (MMC) method (Guo et al. 2014a; Zhang et al. 2016), in which the topology of a structure is optimized by adapting the layout of a set of morphable structural components. In contrast to the SIMP method, however, in the MMC method the description of the structural topology is independent of the finite element discretization, which has the advantage that the number of topology design variables reduces strongly, such that the computational efficiency improves significantly.

In order to avoid the jagged geometrical boundaries typically resulting from optimizing the topology of a discretized finite element model with the SIMP method, in Maute and Ramm (1995, 1997), Maute et al. (1998), Schwarz et al. (2001) the structural layout calculated with the SIMP method is smoothed using spline functions. Apart from improving the quality of the optimization result, this adaptation also increases the computational speed of the SIMP approach by reducing the number of active optimization variables. In Ansola et al. (2002) this so-called adaptive topology optimization technique has been subsequently extended towards a combined shape and topology approach for shell structures, whereby the design domain is defined by B-splines and their variability is accounted for by modifying the positions of the control points. The determination of the shape sensitivities is performed numerically using a finite difference method, which, although computationally demanding, has shown to lead to stable, converged results.

Along the lines of Ansola et al. (2002), in the present communication a coupled domain shape and topology optimization method is formulated by incorporating the shape design variables of the design domain in the SIMP topology optimization method. However, the formulation is generalized by considering design domains of arbitrary shape. The shape and topology design variables are incrementally updated in a sequential fashion, using a so-called staggered numerical update scheme. Non-Uniform Rational B-Splines (NURBS) are employed to parameterize the shape of the design domain (Piegl and Tiller 1995). This not only guarantees a highly accurate description of the shape boundaries by means of smooth basis functions with compact support, but also enables an efficient control of the design domain with only a few control points (Hsu 1994). Further, the optimization process is performed in a computationally efficient way by applying a gradient-based optimization algorithm, for which the sensitivities can be computed in closed form; this is another important difference compared to the approach advocated in Ansola et al. (2002). The objective function adopted in the coupled optimization method refers to the structural compliance, which is the common objective used in topology optimization. However, if required, it is relatively straightforward to replace this objective function in the formulation by an alternative choice, or by a combination of various objective functions, in accordance with a multi-objective optimization approach. Minimizing the structural compliance under the constraint of a significant weight reduction by searching for optima regarding the shape as well as the topology certainly has significant practical value. As will be shown through various numerical examples, it may lead to substantially different structural designs compared to when this optimization is performed on the topology only, thus offering interesting, alternative structural solutions. The main features of the coupled optimization method are demonstrated by means of illustrative 2D benchmark problems; for the application of the method in advanced 3D problems the reader is referred to Wang et al. (2020a, 2020b, c).

The manuscript is organized as follows. Section 2 introduces the basic features of the coupled topology and domain shape optimization framework, by starting from the classical formulation for topology optimization. The minimization problem is formulated and the staggered numerical update scheme is described. Section 3 reviews the mathematical description of the geometry of the design domain by means of NURBS. In Sect. 4, the Finite Element Method (FEM) formulation for the coupled optimization formulation is summarized. The FEM formulation forms the basis for the computation of the sensitivities of the structural compliance to the shape and topology design variables, which is presented in Sect. 5 together with a description of the update of the design variables. Section 6 treats several numerical benchmark problems that demonstrate the basic features of the coupled optimization method. Finally, in Sect. 7 some concluding remarks are given.

## 2 Problem formulation and solution strategy

In accordance with the SIMP approach, topology optimization can be mathematically formulated by means of the following minimization problem (Sigmund 2001; Bendsøe and Sigmund 2003):

\begin{aligned} \begin{aligned} \min \limits _{{\varvec{\rho }}} \qquad \,&c({\varvec{\rho }})={\mathbf{f }}^{\text {T}} \mathbf{u } ({\varvec{\rho }}) \, , \\ {\text {subject to}}\qquad&\frac{V({\varvec{\rho }})}{V_0}=f_r \, , \\ {\text {with}} \qquad&0 < \rho _{min} \le \rho ^e \le 1 \, , \qquad \,\,\, e =1,\ldots ,N \, , \end{aligned} \end{aligned}
(1)

where the objective function c typically is referred to as the structural compliance, $${\varvec{\rho }}$$ is the vector of design variables that is composed of the relative densities $$\rho ^e$$ of the elements e, $$\rho _{min}$$ is the prescribed minimum density (which is non-zero to avoid a singular stiffness matrix), N is the total number of elements, $$V({\varvec{\rho }})$$ and $$V_0$$ represent the current (material) volume and the initial volume of the design domain, respectively, and $$f_r$$ is the volume fraction of material. Further, $$\mathbf{f }$$ and $$\mathbf{u }$$ are the global force and displacement vectors, respectively, which are related via

\begin{aligned} {\mathbf{f }}={\mathbf{K }}{\mathbf{u }} , \end{aligned}
(2)

with $$\mathbf{K }$$ the global stiffness matrix.

The formulation given by Eq. (1) refers to a fixed outer shape of the design domain. To allow for a variable outer shape, Eq. (1) is extended as

\begin{aligned} \begin{aligned} \min \limits _{{\varvec{\rho }},{\mathbf{a }}} \qquad \,&c({\varvec{\rho }},{\mathbf{a }}) ={\mathbf{f }}^{\text {T}} {\mathbf{u }} ({\varvec{\rho }},{\mathbf{a }}) \, , \\ {\text {subject to}} \qquad&\frac{V({\varvec{\rho }},{\mathbf{a }})}{V_0}= f_r \, , \\ {\text {with}} \qquad&\,\, l_m\le a_m\le u_m \, , \quad \qquad \, m =1,\ldots ,M \, , \\&\,\, 0 \le \rho _{min} \le \rho ^e \le 1 \, , \quad \,\,\, e =1,\ldots ,N \, , \end{aligned} \end{aligned}
(3)

where a is the vector of shape-related design variables with the elements $$l_m$$ and $$u_m$$ representing the lower and upper bounds of the design variable $$a_m$$, and M is the total number of shape-related design variables. Note that in Eq. (3) the material volume V is a function of both the shape-related design variables $$\mathbf{a }$$ and the density variables $${\varvec{\rho }}$$, and that the initial volume of the design domain $$V_0$$ corresponds to the initial shape.

The formulation given by Eq. (3) can be solved by updating the shape variables $$\mathbf{a }$$ and density variables $${\varvec{\rho }}$$ in parallel using a so-called monolithic scheme, or by performing the update of the shape and density variables in a sequential fashion using a staggered scheme. In this work a staggered update scheme is used, which at a specific incremental step keeps the shape variables $$\mathbf{a }$$ momentarily fixed while solving for the density variables $${\varvec{\rho }}$$ in accordance with the topology optimization formulation given by Eq. (1). Subsequently, the density variables $${\varvec{\rho }}$$ are frozen, and the shape variables $${\mathbf {a}}$$ are optimized by solving the minimization problem:

\begin{aligned} \begin{aligned} \min \limits _{\mathbf{a }} \qquad \,&c({\mathbf{a }})={\mathbf{f }}^{\text {T}} {\mathbf{u }} ({\mathbf{a }}) \, , \\ {\text {subject to}}\qquad&\frac{V({\mathbf{a }})}{V_0}= f_r \, , \\ {\text {with}} \qquad&\,\, l_m\le a_m\le u_m \, , \quad \qquad \, m =1,\ldots ,M \, . \\ \end{aligned} \end{aligned}
(4)

This sequence of optimization steps is repeated until both optimization formulations have reached their convergence criterion. Figure 1 shows the flowchart of the staggered solution scheme. The first step is to construct a geometry description of the design domain to be analyzed, which is done by decomposing the design domain into design elements and determining the coordinates of the control points of these elements. Subsequently, a finite element model is constructed by meshing the design elements. The relative densities $${\varvec{\rho }}$$ of the finite elements are optimized by solving Eq. (1), which is done by performing a structural analysis, a topology sensitivity analysis, and a density update procedure. Accordingly, the optimized relative density distribution is found for the design domain (for which the shape has been momentarily kept fixed). The next step is to optimize the shape of the design domain, based on the optimized densities of the finite elements just computed in the topology optimization step. This step is carried out by solving Eq. (4), in which a structural analysis, a shape sensitivity analysis, and a shape update procedure are performed. When the relative element densities computed in the last topology optimization step are not optimal for the new shape, a new topology optimization step needs to be conducted based on the new shape. The above sequence of steps is repeated until the stop criteria for both topology optimization and domain shape optimization are satisfied. Note that the solution strategy in Fig. 1 starts with topology optimization and may therefore be referred to as Topology Shape Optimization (TSO). Alternatively, it can start with domain shape optimization, and will then be referred to as Shape Topology Optimization (STO).

Although the element densities are kept fixed during an incremental shape optimization step, the overall density distribution, and thus the internal topology, changes as a result of a change in the nodal coordinates of the finite elements. However, the shape changes during an incremental shape optimization step are such that the corresponding alterations in the topology typically are relatively small and thus acceptable. Moreover, possible inaccuracies generated by these topology alterations may be expected to vanish in the subsequent incremental topology optimization step.

## 3 Geometry description

As visualized in Fig.  2, the description of the geometry of the design domain $${\varvec{\varOmega }}$$ can be obtained from the parametric domain $${\varvec{\varOmega }}_0$$ using a geometry function $${\mathbf {G}}$$, see also Vuong et al. (2010). Accordingly, for an arbitrary point $$(\xi ,\eta )$$ in the parametric domain $${\varvec{\varOmega }}_0$$, the corresponding point (xy) in the physical design domain $${\varvec{\varOmega }}$$ is computed via the projection

\begin{aligned} (x,y)={\mathbf{G }}(\xi ,\eta ) \, , \end{aligned}
(5)

with the geometry function $${\mathbf{G }}(\xi ,\eta )$$ defined by a set of basis functions and control points in the physical design domain. Observe from Fig. 2 that the geometry function $$\mathbf{G }$$ projects the fixed auxiliary mesh defined in the parametric domain to an adequate finite element mesh for the actual design domain, see also Zhang et al. (2010). The geometry function $$\mathbf{G }$$ is here constructed by NURBS, which have the advantage that they can describe a large variety of relatively complex geometries with high accuracy (Hughes et al. 2005). Since NURBS are based on B-splines, these will be reviewed first for reasons of clarity.

### 3.1 B-spline surface

For constructing a B-spline surface, the coordinates in the two-dimensional parametric domain are assembled in a non-decreasing fashion by using so-called knot vectors (Piegl and Tiller 1995)

\begin{aligned} {\varvec{\varXi }}= & {} [\xi _1, \xi _2,\ldots ,\xi _{s+p+1}]^{\text {T}} \, , \nonumber \\ {\varvec{\varTheta }}= & {} [\eta _1, \eta _2,\ldots ,\eta _{t+q+1}]^{\text {T}} \, \qquad \text{ with } \qquad \xi _i, \eta _{j} \in {\mathbb {R}} \, , \end{aligned}
(6)

where i, j are the knot indices, s and t are the number of control points (and thus the number of basis functions used for constructing the B-spline surface) in the x- and y-directions, and p, q are integers defining the polynomial orders of the basis functions. The B-spline basis functions $$S_{i,p}\left( \xi \right)$$ in the $$\xi$$-direction can be obtained recursively as

\begin{aligned} \begin{array}{lcl} {\text {for}} \quad p=0 : S_{i,0}\left( \xi \right) = {\left\{ \begin{array}{ll} 1&{} \quad {\text {if}} \,\xi _i\le \xi < \xi _{i+1} \, , \\ 0&{} \quad {\text {otherwise}} \, , \end{array}\right. } \\ \begin{aligned} {\text {for}} \quad p \ge 1 : S_{i,p}\left( \xi \right) = &{}\frac{\xi -\xi _i}{\xi _{i+p}-\xi _i} S_{i,p-1}\left( \xi \right) \\ &{}+ \frac{\xi _{i+p+1}-\xi }{\xi _{i+p+1}-\xi _{i+1}} S_{i+1,p-1} \left( \xi \right) \, , \end{aligned} \end{array} \end{aligned}
(7)

with the index i running from 1 to the number of control points s. The B-spline basis functions $$T_{j,q}\left( \eta \right)$$ in the $$\eta$$-direction can be determined in a similar fashion as shown in Eq. (7). The control points are defined by vectors including their x- and y-coordinates, which construct the geometry in the physical design domain via a two-dimensional control net $$\mathbf{C }_{i,j}$$, with $$i=1,2,\ldots s, \, j=1,2,\ldots t$$. The B-spline surface follows from combining the control net with the tensor product of the basis functions $$S_{i,p}(\xi )$$ and $$T_{j,q}(\eta )$$ as

\begin{aligned} {\mathbf{B }}\left( \xi ,\eta \right) =\sum _{i=1}^s\sum _{j=1}^t S_{i,p}\left( \xi \right) T_{j,q}\left( \eta \right) {\mathbf{C }}_{i,j} \, . \end{aligned}
(8)

Accordingly, the B-spline surface $${\mathbf{B }}(\xi ,\eta )$$ may represent the geometry function $${\mathbf{G }}(\xi ,\eta )$$ indicated in Fig. 2.

### 3.2 NURBS surface

From the B-spline basis functions $$S_{i,p}\left( \xi \right)$$ and $$T_{j,q}\left( \eta \right)$$, a rational surface $$R_{i,j}\left( \xi ,\eta \right)$$ can be constructed as (Hughes et al. 2005)

\begin{aligned} R_{i,j}\left( \xi ,\eta \right) =\frac{ S_{i,p}\left( \xi \right) T_{j,q}\left( \eta \right) \omega _{i,j}}{\sum \nolimits _{{\hat{i}}=1}^s\sum \nolimits _{{\hat{j}}=1}^t S_{{\hat{i}},p}\left( \xi \right) T_{{\hat{j}},q}\left( \eta \right) \omega _{{\hat{i}},{\hat{j}}}} \, , \end{aligned}
(9)

where $$\omega _{i,j}$$ are the weights of the control points. The rational surface can be subsequently combined with the control net $${\mathbf{C }}_{i,j}$$, to obtain the NURBS surface:

\begin{aligned} {\mathbf{G }}\left( \xi ,\eta \right) =\sum _{i=1}^s\sum _{j=1}^t R_{i,j}\left( \xi ,\eta \right) {\mathbf{C }}_{i,j} \, . \end{aligned}
(10)

Using matrix–vector notation, Eq. (9) can be compactly written as

\begin{aligned} R_{i,j}\left( \xi ,\eta \right) =\frac{S_{i,p}\left( \xi \right) T_{j,q}\left( \eta \right) \omega _{i,j}}{{{\mathbf{S }}}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \, , \end{aligned}
(11)

with

\begin{aligned} {\mathbf{S }}=\left[ S_{1,p}\left( \xi \right) , S_{2,p}\left( \xi \right) , \ldots , S_{s,p}\left( \xi \right) \right] ^{\text {T}} \, , \end{aligned}
(12)

and

\begin{aligned} {\mathbf{W }}=\left[ \begin{array}{cccc} \omega _{1,1}&{} \omega _{1,2} &{}\cdots &{}\omega _{1,t}\\ \omega _{2,1}&{} \omega _{2,2} &{}\cdots &{}\omega _{2,t}\\ \vdots &{} \vdots &{}\ddots &{}\vdots \\ \omega _{s,1}&{} \omega _{s,2} &{}\cdots &{}\omega _{s,t} \end{array} \right] \, , \end{aligned}
(13)

and

\begin{aligned} {\mathbf{T }}=\left[ T_{1,q}\left( \eta \right) , T_{2,q}\left( \eta \right) , \ldots , T_{t,q}\left( \eta \right) \right] ^{\text {T}} \, . \end{aligned}
(14)

With these expressions, the NURBS surface given by Eq. (10) becomes

\begin{aligned} {\mathbf{G }}\left( \xi ,\eta \right) =\frac{1}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \sum _{i=1}^s\sum _{j=1}^t S_{i,p}\left( \xi \right) T_{j,q}\left( \eta \right) \omega _{i,j} {\mathbf{C }}_{i,j} \, . \end{aligned}
(15)

Since the basis functions $$S_{i,p}\left( \xi \right)$$ and $$T_{j,q}\left( \eta \right)$$ form a partition of unity, the NURBS surface, Eq. (15), reduces to the B-spline surface, Eq. (8), when all weights $$\omega _{i,j}$$ are set equal to unity (Hughes et al. 2005).

The control points with their corresponding weights can be conveniently stored in the matrices X and Y as

\begin{aligned} {\mathbf{X }}=\left[ \begin{array}{cccc} \omega _{1,1} X_{1,1}&{} \omega _{1,2} X_{1,2} &{}\cdots &{}\omega _{1,t} X_{1,t}\\ \omega _{2,1} X_{2,1}&{} \omega _{2,2} X_{2,2}&{}\cdots &{}\omega _{2,t} X_{2,t}\\ \vdots &{} \vdots &{}\ddots &{}\vdots \\ \omega _{s,1}X_{s,1}&{} \omega _{s,2} X_{s,2}&{}\cdots &{}\omega _{s,t} X_{s,t} \end{array} \right] \, , \end{aligned}
(16)

and

\begin{aligned} {\mathbf{Y }}=\left[ \begin{array}{cccc} \omega _{1,1} Y_{1,1}&{} \omega _{1,2} Y_{1,2} &{}\cdots &{}\omega _{1,t} Y_{1,t}\\ \omega _{2,1} Y_{2,1}&{} \omega _{2,2} Y_{2,2}&{}\cdots &{}\omega _{2,t} Y_{2,t}\\ \vdots &{} \vdots &{}\ddots &{}\vdots \\ \omega _{s,1}Y_{s,1}&{} \omega _{s,2} Y_{s,2}&{}\cdots &{}\omega _{s,t} Y_{s,t} \end{array} \right] \, , \end{aligned}
(17)

where $$X_{i,j}$$, $$Y_{i,j}$$ (with $$i=1,2,\ldots ,s; j=1,2,\ldots ,t$$) are the control point coordinates. Hence, the projection, Eq. (5), of coordinates from the parametric domain $${\varvec{\varOmega }}_0$$ to the physical design domain $${\varvec{\varOmega }}$$ can be reformulated as

\begin{aligned} (x,y)=\left( \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}}, \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}}\right) \, . \end{aligned}
(18)

With Eq. (18), a surface in the physical design domain thus is completely determined once the knot vectors and control points with their weights are defined.

## 4 Structural analysis

In order to solve an optimization problem with the finite element method, the design domain needs to be meshed by finite elements. This is done by creating a fixed auxiliary mesh through defining the finite element node locations in the parametric domain, see also Zhang et al. (2010), and subsequently mapping these node locations to the actual physical design domain using Eq. (18), see Fig. 2. This enables the construction of an explicit relationship between the shape design variables (represented by the locations of the NURBS control points) and the FEM mesh, so that the FEM mesh is automatically adapted for changes of the structural boundary caused by shape optimization.

The main equations of the finite element method are reviewed below. These equations are subsequently used for deriving a gradient-based optimization framework, by determining the sensitivities of the objective function with respect to the shape and topology design variables. Hence, for an individual finite element, the element stiffness matrix $$\mathbf{k }^e$$ is given by

\begin{aligned} {\mathbf{k }}^e = \int _{-1}^1 \int _{-1}^1 ({\mathbf{B }}^e)^{\text {T}} {\mathbf{D }}^e{\mathbf{B }}^e |{\mathbf{J }}^e| d\xi ^e\,d\eta ^e\ \, , \end{aligned}
(19)

where $$\mathbf{B }^e$$ is the strain–displacement matrix, $$\mathbf{D }^e$$ is the constitutive matrix, $$|\mathbf{J }^e|$$ is the determinant of the Jacobian matrix $$\mathbf{J }^e$$, and $$\xi ^e$$ and $$\eta ^e$$ are the parametric coordinates of the finite element shape functions (not to be confused with the parametric coordinates of the geometry function presented in the previous section). The stiffness matrix is calculated by means of numerical integration using Gauss quadrature, i.e.,

\begin{aligned} {\mathbf{k }}^e= \sum _{i^*=1}^{t^*}\sum _{j^*=1}^{t^*} w_{i^*} w_{j^*} \left( ({\mathbf{B }}^e)^{\text {T}} {\mathbf{D }}^e{\mathbf{B }}^e |{\mathbf{J }}^e| \right) _{i^*,j^*} \, , \end{aligned}
(20)

where $$i^*$$ , $$j^*$$ are the indices of the integration points, $$t^*$$ equals the number of integration points along each direction, and $$w_{i^*}$$ and $$w_{j^*}$$ are the weighting factors of the integration points. In the present study the two-dimensional optimization problems analyzed are meshed by 4-node quadrilateral plane-stress elements, for which the element strain–displacement matrix $$\mathbf{B }^e$$ present in Eq. (20) is composed as

\begin{aligned} {\mathbf{B }}^e=\left[ \begin{array}{cccc} {\mathbf{B }}^e_{1}&{\mathbf{B }}_2^{e}&{\mathbf{B }}_3^{e}&{\mathbf{B }}_4^{e} \end{array} \right] \, , \end{aligned}
(21)

in which

\begin{aligned} {\mathbf{B }}^e_{n}= \displaystyle { \left[ \begin{array}{cc} \displaystyle { \frac{\partial N_n }{\partial x}} &{} 0\\ \\ 0 &{} \displaystyle {\frac{\partial N_n}{\partial y}}\\ \\ \displaystyle {\frac{\partial N_n }{\partial y}} &{} \displaystyle { \frac{\partial N_n }{\partial x}} \end{array} \right] } \qquad \text {with} \qquad n \in \{ 1,2,3,4 \} \, , \end{aligned}
(22)

where x and y represent the spatial directions of the coordinate system in the physical design domain, the index n reflects the node number, and $$N_n$$ represents the corresponding displacement shape function. The 4-node plane-stress elements used in this study are equipped with standard quadratic shape functions:

\begin{aligned} \begin{array}{l} N_1 = 0.25 \left( 1-\xi ^e \right) \left( 1-\eta ^e \right) \, , \\ N_2 = 0.25 \left( 1+\xi ^e \right) \left( 1-\eta ^e \right) \, , \\ N_3 = 0.25 \left( 1+\xi ^e \right) \left( 1+\eta ^e \right) \, , \\ N_4 = 0.25 \left( 1-\xi ^e \right) \left( 1+\eta ^e \right) \, . \end{array} \end{aligned}
(23)

Note that in Eq. (22) the spatial derivatives of the shape functions are defined with respect to the spatial coordinates x and y in the physical domain, while in Eq. (23) the shape functions are defined by the spatial coordinates $$\xi ^e$$ and $$\eta ^e$$ in the parametric domain. In order to relate the derivatives of the shape functions in the two domains, the vectors $$\mathbf{o }_n^e$$ and $$\mathbf{v }_n^e$$ are introduced as

\begin{aligned} {\mathbf{o }}_n^e= & {} \displaystyle { \left[ \frac{\partial N_n }{\partial \xi ^e} , \frac{\partial N_n }{\partial \eta ^e} \right] ^{\text {T}}} \, , \nonumber \\ {\mathbf{v }}_n^e= & {} \displaystyle { \left[ \frac{\partial N_n }{\partial x} , \frac{\partial N_n }{\partial y} \right] ^{\text {T}}} \, , \qquad \text {with} \qquad n \in \{ 1,2,3,4 \} \, . \end{aligned}
(24)

The relation between the vectors $$\mathbf{v }_n^e$$ and $$\mathbf{o }_n^e$$ follows as

\begin{aligned} {\mathbf{v }}_n^e = ({\mathbf{J }}^e)^{-1} {\mathbf{o }}^e_n \, , \end{aligned}
(25)

with the Jacobian J$$^e$$ expressed by

\begin{aligned} {\mathbf{J }}^e = \left[ \begin{array}{cc} \displaystyle { \frac{\partial x }{\partial \xi ^e} } &{} \displaystyle { \frac{\partial y }{\partial \xi ^e}}\\ \\ \displaystyle { \frac{\partial x }{\partial \eta ^e} } &{} \displaystyle { \frac{\partial y }{\partial \eta ^e} } \\ \end{array} \right] \, . \end{aligned}
(26)

The Jacobian can be elaborated further from the definition of the displacement field $$\mathbf{u }^e$$ within an element e:

\begin{aligned} \begin{aligned} {\mathbf{u }}^e&= [u^e_{x},u^e_{y}]^T \\&=\left[ \sum _{n=1}^{4} N_n \left( \xi ^e, \eta ^e \right) x_n , \sum _{n=1}^4 N_n \left( \xi ^e, \eta ^e \right) y_n \right] ^{\text {T}} \, , \end{aligned} \end{aligned}
(27)

where $$x_n$$ and $$y_n$$ are the coordinates of the element nodes. Writing the displacement at an arbitrary point within an element e as the difference between its actual coordinate and its initial coordinate, $$u^e_{x}=x-x_0$$ and $$u^e_{y}=y-y_0$$, together with Eq. (27) the Jacobian, Eq. (26), becomes

\begin{aligned} {\mathbf{J }}^e=\left[ \begin{array}{cc} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} x_n} &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} y_n} \\ \\ \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} x_n } &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} y_n } \end{array} \right] \, , \end{aligned}
(28)

by which $$\mathbf{B }^e$$ in Eq. (21) can be expressed in terms of $$\xi ^e$$ and $$\eta ^e$$ using Eqs. (22), (24), (25) and (28).

For a 2D plane-stress state, the constitutive matrix $$\mathbf{D }^e$$ within an element reads

\begin{aligned} {\mathbf{D }}^e=\frac{E^e}{1-{\nu }^2} \left[ \begin{array}{ccc} 1 &{} \nu &{} 0\\ \\ \nu &{} 1 &{} 0\\ \\ 0 &{} 0 &{} \displaystyle { \frac{1-\nu }{2}} \end{array} \right] \, , \end{aligned}
(29)

where $$\nu$$ is Poisson’s ratio (which, for simplicity, is taken as uniform across the whole design domain), and $$E^e$$ is the Young’s modulus of an element, which, in accordance with the SIMP approach for topology optimization, may be formulated as (Bendsøe and Sigmund 1999, 2003; Sigmund 2001; Andreassen et al. 2011)

\begin{aligned} E^e=({\rho }^e)^p E_0 \, , \end{aligned}
(30)

with $$\rho ^e$$ the relative density within an element, p a penalization factor on the bulk stiffness (a typical value being 3, see Sigmund (2001)), and $$E_0$$ the initial Young’s modulus of the material.

With Eqs. (21)–(30), Eq. (20) can be used to calculate the stiffness matrix $$\mathbf{k }^e$$ for each element:

\begin{aligned} {\mathbf{k }}^e= ({\rho }^e)^p \, {\mathbf{k }}_0 \, , \end{aligned}
(31)

with $$\mathbf{k }_0$$ representing the initial element stiffness matrix, computed from Eq. (20), but with the constitutive matrix $$\mathbf{D }^e$$ replaced by

\begin{aligned} {\mathbf{D }}_{0}=\frac{E_{0}}{1-{\nu }^2} \left[ \begin{array}{ccc} 1 &{} \nu &{} 0\\ \\ \nu &{} 1 &{} 0\\ \\ 0 &{} 0 &{} \displaystyle { \frac{1-\nu }{2}} \end{array} \right] \, . \end{aligned}
(32)

Finally, the global stiffness matrix $$\mathbf{K }$$ can be constructed by assembling the contributions of the element stiffness matrices $$\mathbf{k }^e$$:

\begin{aligned} {\mathbf{K }}= \sum _{e=1}^{N} {\mathbf{k }}^{e} \, , \end{aligned}
(33)

where N is the total number of elements, and the sum operator represents the typical element assembly procedure used in the finite element method. Denoting $$\mathbf{K }_{bc}$$ as the global stiffness matrix obtained after incorporating the boundary conditions, the nodal displacements result from inverting Eq. (2), i.e.,

\begin{aligned} {\mathbf{u }}={\mathbf{K }}_{bc}^{-1} {\mathbf{f }} \, . \end{aligned}
(34)

This result can be used to compute the structural compliance as

\begin{aligned} c={\mathbf{u }}^{\text {T}} {\mathbf{K }}_{bc} {\mathbf{u }} . \end{aligned}
(35)

In addition, the volume of each element e follows from

\begin{aligned} V^e= \sum _{i^*=1}^{t^*}\sum _{j^*=1}^{t^*} w_{i^*} w_{j^*} |{\varvec{J}}^e|_{i^*,j^*} \, , \end{aligned}
(36)

which, in accordance with Eq. (1), can be employed to calculate the total material volume required for topology optimization

\begin{aligned} V= \sum _{e=1}^{N} {\rho }^e V^e \, , \end{aligned}
(37)

as well as the volume of the initial design domain

\begin{aligned} V_0= \sum _{e=1}^{N} V^e \, . \end{aligned}
(38)

## 5 Sensitivity analysis and update of design variables

In order to establish a gradient-based optimization framework, the sensitivity of the objective (i.e., the structural compliance) with respect to the shape design variables (net of control points) and the topology optimization variables (element relative densities) will be derived in this section. Subsequently, the update procedure of the design variables is discussed.

### 5.1 Shape sensitivity analysis

As already explained, the meshing of the design domain is performed by projecting the nodal coordinates $$(\xi _n,\eta _n)$$ of an auxiliary mesh in the parametric domain to the nodal coordinates $$(x_n, y_n)$$ of the actual finite elements in the physical domain. Using the NURBS surface definition given by Eq. (18), with the dependencies on the nodal coordinates of the auxiliary mesh indicated, this projection reads

\begin{aligned} (x_n,y_n)=\left( \frac{{\mathbf{S }}^{\text {T}} (\xi _n) {\mathbf{X }} {\mathbf{T} } (\eta _n)}{{\mathbf{S }}^{\text {T}} (\xi _n) {\mathbf{W }} {\mathbf{T }} (\eta _n)}, \frac{{\mathbf{S }}^{\text {T}} (\xi _n) {\mathbf{Y }} {\mathbf{T }} (\eta _n)}{{\mathbf{S }}^{\text {T}} (\xi _n) {\mathbf{W }} {\mathbf{T }} (\eta _n)}\right) \, . \end{aligned}
(39)

Inserting Eq. (39) into Eq. (28), the Jacobian $$\mathbf{J }^e$$ at element level can be expressed in terms of NURBS surface characteristics:

\begin{aligned} {\mathbf{J }}^e =\left[ \begin{array}{cc} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } \\ \\ \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } \end{array} \right] \, , \end{aligned}
(40)

in which the dependency of the basis functions $$\mathbf{S }$$ and $$\mathbf{T }$$ on, respectively, $$\xi _n$$ and $$\eta _n$$ have been omitted for reasons of brevity. In the domain shape optimization process, a limited number of control points is typically used for varying the shape. These control points are stored in the vector of design variables a. With the use of Eq. (40), the derivative of the Jacobian $$\mathbf{J }^e$$ with respect to a single design variable $$a_m$$ can be expressed as

\begin{aligned} \frac{\partial {\mathbf{J }}^e }{\partial a_m} =\left[ \begin{array}{cc} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{X }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{Y } }}{\partial a_m} {\mathbf{T }}}{{\mathbf{S} }^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } \\ \\ \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S} }^{\text {T}} \frac{\partial {\mathbf{X }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } &{} \displaystyle { \sum \limits _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{Y }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} } \end{array} \right] \, . \end{aligned}
(41)

Furthermore, from Eq. (40) the determinant of the Jacobian matrix becomes

\begin{aligned} \begin{aligned} |{\mathbf{J }}^e|&=\left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S} }^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \\&\quad -\left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \, . \end{aligned} \end{aligned}
(42)

With this expression, the partial derivative of the determinant of the Jacobian $$|\mathbf{J }^e|$$ with respect to design variable $$a_m$$ results from applying the chain rule:

\begin{aligned} \begin{aligned} \frac{\partial |{\mathbf{J }}^e| }{\partial a_m}&= \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{X }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \\&\quad +\left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{Y }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \\&\quad -\left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{Y }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{X }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \\&\quad -\left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \xi ^e} \frac{{\mathbf{S }}^{\text {T}} {\mathbf{Y }} {\mathbf{T }}}{{\mathbf{S }}^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \left( \sum _{n=1}^4 \frac{\partial N_n }{\partial \eta ^e} \frac{{\mathbf{S }}^{\text {T}} \frac{\partial {\mathbf{X }} }{\partial a_m} {\mathbf{T }}}{{\mathbf{S} }^{\text {T}} {\mathbf{W }} {\mathbf{T }}} \right) \, . \end{aligned} \end{aligned}
(43)

Combining Eqs. (21), (22) and (24)$$_2$$, the partial derivative of the element strain–displacement matrix with respect to the design variable $$a_m$$ can be derived as

\begin{aligned} \frac{\partial {\mathbf{B }}^{e} }{\partial a_m} =\left[ \begin{array}{cccc} \displaystyle { \frac{\partial {\mathbf{B }}_{1}^e }{\partial a_m}}&\displaystyle { \frac{\partial {\mathbf{B }}_{2}^e }{\partial a_m}}&\displaystyle {\frac{\partial {\mathbf{B }}_{3}^e }{\partial a_m}}&\displaystyle { \frac{\partial {\mathbf{B }}_{4}^e }{\partial a_m}} \end{array} \right] \, , \end{aligned}
(44)

where

\begin{aligned} \frac{\partial {\mathbf{B }}_{n}^e }{\partial a_m} =\left[ \begin{array}{cc} \displaystyle {\frac{\partial v_{1,n}^e }{\partial a_m}} &{} 0\\ \\ 0 &{} \displaystyle { \frac{\partial v_{2,n}^e }{\partial a_m} } \\ \\ \displaystyle { \frac{\partial v_{2,n}^e }{\partial a_m} } &{} \displaystyle { \frac{\partial v_{1,n}^e }{\partial a_m} } \end{array} \right] \qquad \text{ with } \qquad n \in \{ 1,2,3,4 \} \, , \end{aligned}
(45)

in which, with the use of Eq. (25), it follows that

\begin{aligned} \begin{aligned} \frac{\partial {\mathbf{v }}_n^e }{\partial a_m}= \frac{\partial ({\mathbf{J }}^e)^{-1}}{\partial a_m} {\mathbf{o }}_n^e&= - ({\mathbf{J }}^e)^{-1} \frac{\partial {\mathbf{J }}^e}{\partial a_m} ({\mathbf{J }}^e)^{-1} {\mathbf{o }}_n^e \\&= -({\mathbf{J }}^e)^{-1} \frac{\partial {\mathbf{J }}^e}{\partial a_m} {\mathbf{v }}_n^e \, , \end{aligned} \end{aligned}
(46)

where $$\partial {\mathbf{J }}^e / \partial a_m$$ is given by Eq. (41). Furthermore, combining Eq. (20) with Eqs. (31) and (32), the derivative of $$\mathbf{k }_0$$ with respect to design variable $$a_m$$ can be expressed as

\begin{aligned} \frac{\partial {\mathbf{k }}_0 }{\partial a_m} = \sum _{i^*=1}^{t^*}\sum _{j^*=1}^{t^*} w_{i^*} w_{j^*} \left( \begin{aligned}&\frac{\partial ({\mathbf{B }}^{e})^{\text {T}} }{\partial a_m} {\mathbf{D }}_0 {\mathbf{B }}^{e} |{\mathbf{J }}^{e}| \\&+({\mathbf{B }}^{e})^{\text {T}} {\mathbf{D }}_0 \frac{\partial {\mathbf{B }}^{e} }{\partial a_m} |{\mathbf{J }}^{e}| \\&+ ({\mathbf{B }}^{e})^{\text {T}} {\mathbf{D }}_0 {\mathbf{B }}^{e} \frac{\partial |{\mathbf{J }}^{e}| }{\partial a_m} \end{aligned} \right) _{i^*,j^*} \, , \end{aligned}
(47)

in which $$\partial {\mathbf{B }}^{e} / \partial a_m$$ and $$\partial |{\mathbf{J }}^{e}| / \partial a_m$$ are provided by Eqs. (45) and (43), respectively. Subsequently, from Eq. (31) the partial derivative of the element stiffness matrix $$\mathbf{k }^e$$ with respect to the design variable $$a_m$$ is calculated via

\begin{aligned} \frac{\partial {\mathbf{k }}^e }{\partial a_m} = ({\rho }^e)^p \frac{\partial {\mathbf{k }}_0 }{\partial a_m} \, , \end{aligned}
(48)

with $$\partial {\mathbf{k }}_0 / \partial a_m$$ thus given by Eq. (47). Equation (48) is substituted into the partial derivative of the total stiffness matrix $$\mathbf{K }$$ with respect to the design variable $$a_m$$, which via Eq. (33) becomes:

\begin{aligned} \frac{\partial {\mathbf{K }} }{\partial a_m}= \sum _{e=1}^{N} \frac{\partial {\mathbf{k }}^{e}}{\partial a_m} \, . \end{aligned}
(49)

After taking into account the boundary conditions, $${\mathbf{K }} \rightarrow {\mathbf{K }}_{bc}$$, Eq. (49) is used to construct the partial derivative of the displacement $$\mathbf{u }$$ with respect to design variable $$a_m$$, which, with Eq. (34), leads to

\begin{aligned} \frac{\partial {\mathbf{u }} }{\partial a_m}= {\mathbf{K }}_{bc}^{-1} \left( \frac{\partial {\mathbf{f }} }{\partial a_m}- \frac{\partial {\mathbf{K }}_{bc} }{\partial a_m} {\mathbf{u} } \right) \, . \end{aligned}
(50)

When assuming that the external loads $$\mathbf{f }$$ are independent of the design variables $$a_m$$, Eq. (50) reduces to

\begin{aligned} \frac{\partial {\mathbf{u }} }{\partial a_m}=- {\mathbf{K }}_{bc}^{-1} \frac{\partial {\mathbf{K }}_{bc} }{\partial a_m} {\mathbf{u} } . \end{aligned}
(51)

In order to perform the domain shape optimization procedure given by Eq. (4), from Eq. (35) the partial derivative of the structural compliance c with respect to design variable $$a_m$$ needs to be calculated, which, after substituting Eq. (51), results in

\begin{aligned} \frac{\partial c }{\partial a_m}=- {\mathbf{u} }^{\text {T}} \frac{\partial {\mathbf{K }}_{bc} }{\partial a_m} {\mathbf{u }} . \end{aligned}
(52)

The partial derivative of the material volume V with respect to design variable $$a_m$$ can be formulated based on Eqs. (36) and (37), leading to

\begin{aligned} \frac{\partial V }{\partial a_m}= \sum _{e=1}^{N} {\rho }^e \frac{\partial V^e}{\partial a_m} \, , \end{aligned}
(53)

with

\begin{aligned} \frac{\partial V^e}{\partial a_m}= \sum _{i^*=1}^{t^*}\sum _{j^*=1}^{t^*} w_{i^*} w_{j^*} \left( \frac{\partial |{\mathbf{J }}^e| }{\partial a_m} \right) _{i^*,j^*} \, , \end{aligned}
(54)

whereby $$\partial |{\mathbf{J }}^{e}| / \partial a_m$$ is given by Eq. (43).

### 5.2 Topology sensitivity analysis

To perform the topology optimization procedure presented in Eq. (1), similar to Eq. (52) the partial derivative of the structural compliance c with respect to the relative density $$\rho ^e$$ is computed as

\begin{aligned} \frac{\partial c }{\partial \rho ^e}=- {\mathbf{u }}^{\text {T}} \frac{\partial {\mathbf{K }}_{bc} }{\partial \rho ^e} {\mathbf{u }} \, . \end{aligned}
(55)

The partial derivative of the element stiffness matrix $$\mathbf{k }^e$$ with respect to $$\rho ^e$$ can be determined via Eq. (31):

\begin{aligned} \frac{\partial {\mathbf{k }}_e }{\partial \rho ^e} = p (\rho ^e)^{p-1} {\mathbf{k }}_0 \, . \end{aligned}
(56)

Hence, the dependency of the total stiffness matrix $${\mathbf{K }}_{bc}$$ on $$\rho ^e$$ enters through the individual element stiffness matrices $${\mathbf{k }}^{e}$$. Accordingly, Eq. (55) is developed for a specific element e using Eq. (56), i.e.,

\begin{aligned} \frac{\partial c }{\partial \rho ^e} = -({{\mathbf{u }}^e})^{\text {T}} \frac{\partial {{\mathbf{k }}^e}}{\partial {\rho ^e}} {\mathbf{u }}^e =-({{\mathbf{u }}^e})^{\text {T}} p(\rho ^e)^{p-1} {\mathbf{k }}_0 {\mathbf{u }}^e \, . \end{aligned}
(57)

In order to increase the robustness of the solution procedure and to alleviate possible checkerboard patterns in the spatial distribution of the element relative densities, Eq. (57) is slightly modified by adopting the sensitivity filter suggested in Sigmund (2001), i.e.,

\begin{aligned} \frac{ \partial {\hat{c}} }{\partial \rho ^e} = \frac{ 1 }{\rho ^e \sum \limits _{f=1}^{N} {\hat{H}}^f} \sum \limits _{f=1}^{N} {\hat{H}}^f \rho ^f \frac{\partial c }{\partial \rho ^f} \, , \end{aligned}
(58)

in which $${\hat{H}}^f= \text {max}(0,r_\text {min} - \text {dist}(e,f))$$, where $$\text {dist}(e,f)$$ is the distance between the center of element e and the center of element f, and $$r_\text {min}$$ is the radius adopted for the sensitivity filter. The filter radius is given by $$r_{min}=r_\text {0} \sqrt{V^e}$$, where $$r_\text {0}$$ is a predefined scaling parameter. Although the dependency of the filter radius $$r_{min}$$ on the element volume $$V^e$$ compromises the mesh-independent aspect of the sensitivity filter, it avoids the emergence of checkerboard patterns in regions where shape enlargement causes enlarged elements to lose their filtering capacity in the case the filter radius is kept fixed. Finally, from Eq. (37) the partial derivative of the material volume V with respect to the relative density $$\rho ^e$$ is calculated as

\begin{aligned} \frac{\partial V }{\partial \rho ^e}= V^e \, . \end{aligned}
(59)

### 5.3 Update of design variables

The domain shape optimization procedure formulated by Eq. (4) is carried out by applying a Sequential Quadratic Programming (SQP) method, using the fmincon solver in MATLAB (Version R2016b), see Nocedal and Wright (2006) for more details. The element densities within the topology optimization procedure are updated using the so-called Optimality Criteria (OC) method described in Sigmund (2001). The topology optimization algorithm used in the present work is based on the formulation presented in Sigmund (2001). In this algorithm, however, all finite element volumes are taken as constant, which in the present approach is not the case, due to the combination with the shape optimization algorithm. Therefore, some minor adaptations were made to this topology optimization algorithm in order to account for the variability in element volume.

## 6 Numerical examples

### 6.1 Cantilever beam problem

A popular benchmark problem for evaluating optimization methods is the cantilever beam problem (Wall et al. 2008; Qian 2010; Sigmund 2001; Andreassen et al. 2011). The coupled gradient-based topology and domain shape optimization approach will be applied to this benchmark problem, whereby the goal is to determine the geometry with a minimal structural compliance c, subject to appropriate geometrical constraints and a target material volume.

The initial configuration of an elastic cantilever beam with Young’s modulus E and Poisson’s ratio $$\nu$$ is shown in Fig. 3. The left side of the beam is fully clamped (zero displacements along the left edge in all directions), and a vertical load F is applied at point Q at the right edge. The beam has a fixed length L and an initial height $$H_0$$, whereby during domain shape optimization the actual height H of the beam may vary between $$H_{min}$$ and $$H_{max}$$. The material volume V obtained after the optimization procedure should be 40% of that of the initial configuration, $$V_0$$, in correspondence with a material volume fraction $$f_r=0.4$$. The first problem that will be analyzed is referred to as Case 1, for which the values of the parameters introduced above are summarized in Table 1. Subsequently, two other problems will be studied, referred to as Case 2 and Case 3. Here, Case 2 is similar to Case 1, but the simulation now starts from the maximal beam height, $$H_0=H_{max}$$, while in Case 3 the beam height is left unbounded by not prescribing a maximal value $$H_{max}$$.

The geometry of the cantilever beam is described by NURBS. Setting the polynomial order of the basis functions, Eq. (7), as p=2 and q=1, the knot vectors for the B-spline surface, Eq. (6), can be defined as

\begin{aligned} \begin{array}{lcl} {\varvec{\varXi }} &{} = &{} \left[ 0,0,0,1,1,1 \right] ^{\text {T}} \, , \\ {\varvec{\varTheta }} &{} = &{} \left[ 0,0,1,1 \right] ^{\text {T}} \, , \end{array} \end{aligned}
(60)

which correspond to a total of 6 control points. Table 2 lists the initial coordinates and weights of these control points. For simplicity, all weights have been chosen equal to unity, by which the NURBS surface reduces to a B-spline surface, see Eqs. (8) and (10)–(14). The y-coordinates of the control points $${\mathbf{C }}_{1,2}$$, $${\mathbf{C }}_{2,2}$$, $${\mathbf{C }}_{3,2}$$ govern the height, and thus the shape of the cantilever beam. As such, the vector with shape design variables $${\varvec{a}}$$ can be expressed as

\begin{aligned} {\varvec{a}}=\left[ Y_{1,2} , Y_{2,2} , Y_{3,2} \right] ^{\text {T}} \, . \end{aligned}
(61)

The auxiliary mesh in the initial parametric domain $${\varvec{\varOmega }}_0$$ is constructed by $$200\times 25$$ equal-sized, rectangular parts, of which the corners via Eq. (5) are projected on the finite element nodes in the physical domain. Accordingly, the geometry in the physical domain is meshed with 5000 4-node plane-stress elements, equipped with quadratic shape functions, see Eq. (23). A mesh sensitivity study presented further in this communication will demonstrate that this FEM discretization is sufficiently fine for obtaining accurate numerical results. For the domain shape optimization procedure, the settings of the MATLAB solver fmincon are as follows: the “Algorithm” is set to “sqp” (sequential quadratic programming), the “GradObj” and “GradConstr” are set to “on”, which means that the sensitivities of the objective function and constraints used in the gradient-based domain shape optimization procedure are provided by the user. The remaining options are default. The domain shape optimization procedure is considered to be finished if the structural compliance meets the condition: $$\mid c^{h+1}-c^h \mid \le$$1e-6, with h the iteration number, or if the shape design variables satisfy the criterion: $$\text {max}(\mid {\mathbf{a} }^{h+1}-{\mathbf{a }}^h \mid ) \le$$1e-6. For the topology optimization, the scaling parameter $$r_\text {0}$$ characterizing the filter radius $$r_{min}$$ used in Eq. (58) is set equal to $$r_\text {0}=1.5$$. Furthermore, the move limit appearing in the OC method (Sigmund 2001) is set to $$\phi =0.4$$. The topology optimization procedure is finished if the structural compliance satisfies the requirement: $$\mid c^{g+1}-c^g \mid \le$$1e-6, with g the iteration number. Finally, the stop criterion used in the outer loop in Fig. 1 is: $$\mid c^{k+1}-c^k \mid \le$$1e-5, where k is the iteration number of the outer loop.

The above value of 1e-6 chosen for the stop criteria of the shape and topology optimization inner subloops was selected based on an separate variation study, in which for the STO and the TSO update schemes described in Sect. 2 the value of these stop criteria was systematically varied in the Case 1 and Case 3 problems introduced above. The variation study clearly demonstrated that the value found for the optimized compliance c increases monotonically with a growing value of the stop criteria. In specific, increasing the value of the stop criteria from 1e-6 to 1e-5 typically results in a percentual increase of the optimized compliance between 0.03% and 0.44%, while increasing the value from 1e-6 to 1e-3 increases the optimized compliance between 1.2% and 8.2%. Based on this result, it was concluded that a value of 1e-6 of the stop criteria for the shape and topology inner subloops results in solutions with sufficient numerical accuracy.

First the coupled topology and domain shape optimization with a TSO sequence is analyzed for Case 1. The optimization starts with a topology optimization step of the initial design domain with a fixed shape, as shown in Fig. 4. Subsequently, a domain shape optimization step is performed whereby the finite element densities found at the end of the last topology optimization step are used as initial values, see Fig. 5. Note that the height of the clamped support at the left side of the cantilever beam is allowed to vary during the process of domain shape optimization. According to the solution strategy illustrated in Fig. 1, the alternating topology and shape optimization steps will continue until the stop criterion of the outer loop is satisfied. Figure 6 presents the value c of the objective function and the values of the shape design variables, Eq. (61), as a function of the outer loop iterations k, while Fig. 7 shows the shapes and topologies of the cantilever beam at specific iterations k of the outer loop. It can be observed that during the iterative process the shape changes from convex to concave, and that the topological layout of the interior “trusses” changes significantly as well. During the optimization procedure the shape clearly has a strong influence on the topology and vice versa; hence, the optimized structural layout is a trade-off between the density distribution and the shape.

In order to investigate whether it makes a difference if the optimization procedure starts with a shape or a topology optimization step, Case 1 is also performed using an STO sequence. Figure 8 presents the initial, domain shape optimization step, whereby the relative densities are taken in accordance with a homogeneous distribution. Using the shape obtained at the end of the first step, a topology optimization step is carried out in turn, see Fig. 9. The results obtained after successive, combined shape and topology optimization steps are shown in Figs. 10 and 11, illustrating, respectively, the convergence behavior of the structural compliance c and the shape design variables $${\varvec{a}}$$, and sketching the corresponding structural configurations at various iterations k of the outer loop. Comparing the results for the present STO sequence with those for the TSO sequence depicted in Figs. 6 and 7 shows that the TSO and STO sequences lead to a similar final configuration, but that the TSO sequence requires more iterations ($$k=14$$) to reach this configuration than the STO sequence ($$k=10$$). For both the TSO and STO sequence the number of the inner iterations g (topology) and h (domain shape) decrease with an increase of the outer iterations k. Although the rate of decrease generally is problem-dependent, the number of inner iterations at the final outer iteration before convergence turns out to be fairly constant, with a typical value of 2–3. The differences in the final configurations of the TSO and STO sequences are reflected by the final values of the structural compliance c, i.e., $$c=187.505$$ Nmm (TSO, see Fig. 7) versus $$c=183.313$$ Nmm (STO, see Fig. 11), as well as by the final values of the shape design variables, i.e., $${\varvec{a}}=[10.0,7.8,1.0]^T$$ (TSO) versus $${\varvec{a}}=[10.0,8.6,1.0]^T$$ (STO, measured in m), see Figs. 6 and 10, respectively. The appearance of different local minima under different algorithmic schemes and search paths is well-known within the structural optimization community, see, for example, Sigmund and Petersson (1998). The number of local minima in structural optimization problems typically is large, and is characterized by the “landscape” created by the objective function(s), the design variables and constraints, the characteristics of the boundary value problem and the FEM discretization.

Since in the present coupled topology and domain shape optimization method the finite element mesh is chosen to morph together with design domain, it is necessary to analyze the effect of the FEM discretization on the optimization result in more detail. Accordingly, a comparison study has been performed considering four different initial FEM meshes for Case 1 (STO sequence), which are characterized by uniformly discretizing the parametric domain $${\varvec{\varOmega }}_0$$ into (a) $$160\times 20$$, (b) $$180\times 20$$, (c) $$120\times 40$$ and (d) $$200\times 25$$ elements. Note that the effect of the number of elements on the computational result is analyzed here by choosing meshes (a) and (b) to be 30–40% coarser than meshes (c) and (d). Figure 12 depicts the optimized configurations computed for the different initial meshes, together with the final FEM discretizations (whereby specific details can be distinguished by zooming in on the figures). Clearly, the various FEM meshes lead to similar layouts. In addition, for the relatively fine mesh (d) the final structural compliance c is only 1% higher than the value obtained for the other fine mesh (c), from which it is concluded that the difference in the initial width-to-height element aspect ratio for the two meshes (i.e., about 3:2 for mesh (c) versus 1:2 for mesh (d)) only marginally influences the final numerical result. Note, however, that the significant reduction of the structural height at the right beam end resulting from the domain shape optimization procedure causes the element width-to-height aspect ratio of mesh (c) locally to become nearly two times larger - and thus less optimized - than that of mesh (d). For the relatively coarse meshes (a) and (b) the final structural compliance respectively is only 7% and 5% higher than for the fine mesh (c). Additionally, the number of outer iterations k is the lowest for the relatively coarse mesh (a) (i.e., $$k=7$$) and the highest for the relatively fine mesh (d) (i.e., $$k=10$$). From the differences in the optimization results for the relatively coarse and fine meshes, and the minor sensitivity to the element aspect ratio used in the discretization of the two fine meshes, it may be concluded that the fine mesh (d) adopted in the forthcoming comparison study of Cases 1, 2 and 3 will provide adequate numerical results.

In the comparison study of the three cases, for Case 2 the height of the initial domain is set equal to the maximal value, $$H_0=H_{max}=10$$ m. The volume (per unit depth) of the initial structure ($$V_0=300$$ m$$^2$$) is larger than for Case 1 ($$V_0=210$$ m$$^2$$), which is compensated for by scaling down the required volume fraction $$f_r$$ in accordance with the ratio of the volumes, such that an adequate comparison between the two cases can be made, i.e., $$f_r=(210/300)\times 0.4=0.28$$.

In order to clarify the mutual influence of topology and shape optimization for this case, the cantilever beam is first subjected to topology optimization only. By starting from a homogeneous density distribution, the converged density distribution obtained after $$g=70$$ iterations is shown in Fig.  13. The structural compliance at convergence, $$c=166.325$$ Nmm, turns out to be lower than for the STO optimization procedure of Case 1, $$c=183.313$$ Nmm. In other words, the search path followed for Case 2 with a pure topology optimization procedure has led to a different local minimum for the structural compliance. The question now remains whether this result will alter when the topology optimization procedure for Case 2 is combined with domain shape optimization. The outcome of this analysis is shown in Fig.  14, illustrating that the topologies and the corresponding values of the structural compliance c computed with the TSO (Fig.  14a) and STO (Fig.  14b) sequences are virtually identical to those calculated with the pure topology optimization procedure shown in Fig.  13. Accordingly, it may be concluded that domain shape optimization has a negligible effect on the optimization of Case 2.

The computational results for Case 3, in which the beam height is left unbounded, are shown in Figs. 15 and 16 for the coupled optimization procedure with the TSO sequence, and in Figs. 17 and 18 for the coupled optimization procedure with the STO sequence. A comparison of the topologies of the two sequences depicted in Figs. 16 and 18 illustrates that these are quite similar, both leading to a triangular “truss” structure with no material present inside. The possible appearance of unfavorable element distortions in the triangular structure is avoided by locally using a relatively fine FEM mesh. As illustrated in Fig. 19, the FEM discretization of the structure as obtained after the optimization procedure of Case 3 indeed preserves the mesh quality at sharp corners. An alternative approach that could have been applied for preventing element distortions is based on the use of so-called boundary-cut elements, see Liu et al. (2016), Noël et al. (2017) for more details.

Observe that the final value of the structural compliance c is different for the two update schemes, i.e., $$c=159.647$$ Nmm (TSO) versus $$c=149.705$$ Nmm (STO), and that the outer loop of the TSO sequence requires more iterations ($$k=11$$) to converge than the STO sequence ($$k=8$$). Furthermore, from Figs. 15 and 17 it can be seen that the final values of the shape variables for the two optimization sequences also differ somewhat, i.e., $${\varvec{a}}=[13.0, 5.2, 1.1]^T$$ (TSO) versus $${\varvec{a}}=[13.5, 5.4, 1.1]^T$$ (STO) (measured in m). Note that the final structural compliances c found with the TSO and STO sequences for Case 3 are smaller than for Case 2 and Case 1. Hence, for the present cantilever beam problem the initial value and prescribed bounds of the beam height H have a strong influence on the optimized shape and topology computed. Finally, in Table 3 the minimal compliance values are summarized together with the computational times of Cases 1, 2 and 3 for the coupled optimization procedures with TSO and STO update schemes. The STO sequence appears to be 19–46% faster than the TSO sequence, and results in a minimal compliance value that is up to 6% lower. Hence, it may be concluded that the performance of the coupled optimization procedure with the STO update scheme here is superior to that with the TSO update scheme.

### 6.2 Curved L-shape beam problem

For the cantilever beam problem analyzed above the initial design domain has a basic, rectangular shape. In this section the features of the coupled topology and domain shape optimization approach are further explored for the curved L-shape beam configuration depicted in Fig. 20, which is characterized by a more complicated initial design domain. The L-shape beam configuration has proven to be a useful benchmark problem for the validation of topology optimization techniques, see, e.g., Zhang et al. (2012), Guo et al. (2014b), Duarte et al. (2015), Lian et al. (2017), Lieu and Lee (2017), Picelli et al. (2018).

As illustrated in Fig. 20, the top side of the L-shape beam is fully clamped, and a vertical load $$F=10$$ kN is applied at the top corner of the free edge. The polynomial orders of the NURBS basis functions expressed by Eq. (7) are p=3 and q=1. Accordingly, the knot vectors for the B-spline surface, Eq. (6), are $${\varvec{\varXi }} = \left[ 0,0,0,0,1,1,1,1 \right] ^{\text {T}}$$ and $${\varvec{\varTheta }} = \left[ 0,0,1,1 \right] ^{\text {T}}$$. The initial coordinates and weights of the 8 control points illustrated in Fig. 20 are listed in Table 4. The shape design variables $${\varvec{a}}$$ are selected as $${\varvec{a}}=\left[ X_{1,1} , X_{2,1} , Y_{2,1} , X_{3,1} , Y_{3,1} \right] ^{\text {T}}$$, with their upper and lower bounds given by $$\left[ -5, -5, -20, 6, -20 \right] ^{\text {T}}$$ and $$\left[ -20, -20, -35, 0, -40 \right] ^{\text {T}}$$, respectively. The other settings and parameters are chosen the same as for the cantilever beam analyzed in Sect. 6.1. For clarity, the FEM mesh of the curved L-shape beam is illustrated in Fig. 21, which has been constructed by 5000 plane-stress elements equipped with quadratic shape functions, see Eq. (23).

Figure 22 illustrates the final configurations calculated with the coupled topology and domain shape optimization approach using the TSO sequence, Fig. 22b, and the STO sequence, Fig. 22c, together with the final configuration computed with pure topology optimization, Fig. 22d. Although the final configurations appear as similar, a comparison of the calculated values of the minimal compliance c illustrates that the coupled optimization approach performed with the STO sequence leads to an optimum $$c=146.232$$ Nmm that lies 10% below the value found for the topology optimization procedure, $$c=161.592$$ Nmm. This is, because for the coupled optimization approach the design space during the computational procedure is slightly altered as a result of the shape optimization process, which allows to find a lower optimum than for pure topology optimization in which the design space is kept fixed. In other words, the solutions found for coupled optimization with TSO and STO sequences are not incorporated in the design space for pure topology optimization. In addition, the value determined from the coupled optimization procedure with the TSO sequence, $$c=149.389$$ Nmm, lies 2% above the value $$c=146.232$$ Nmm calculated with the STO sequence, indicating that the STO update scheme results in a more optimized design than the TSO update scheme. Conversely, as shown in Fig. 23, the number of iterations used in the outer loop of the TSO update scheme, $$k=8$$, is considerably lower than for the STO update scheme, $$k=20$$. In summary, from the above comparison study it is concluded that the coupled topology and domain shape optimization approach may find a better optimum than a pure topology optimization procedure when the shape of the initial design domain is specified, whereby the dimensions of this shape are variable within certain bounds.