1 Introduction

Topology optimization is recognized as a powerful method in innovative structure design (Bendsoe and Kikuchi 1988; Bendsoe and Sigmund 2013; Meng et al. 2019). Its application has been made possible for structures ranging from a single component to multiple components with geometrical (Buhl et al. 2000; Li et al. 2019), material (Xia et al. 2017), and contact nonlinearities (Desmorat 2007) or a combination of them (Luo et al. 2016). Among others, topology optimization of contact problems is of great importance on account of their popularity in engineering since contact interaction modeling for various functionalities including connection, fixation, and load transmission is crucial for an accurate evaluation and design of structural performance (Stromberg and Klarbring 2010).

Earlier works concerned minimization of contact stress (Haug and Kwak 1978) and maximization of beam stiffness in contact with a Winkler-type foundation (Benedict 1982). Contact topology optimization covered trusses (Klarbring et al. 1995; Sokół and Rozvany 2013), sheets (Petersson and Patriksson 1997), compliant mechanisms (Mankame and Ananthasuresh 2004), and continuum structures (Bruggi and Duysinx 2013). Traditional SIMP (solid isotropic material with penalization) method using pseudo-densities (Stromberg and Klarbring 2010), level set method (Lawry and Maute 2015; Lawry and Maute 2018; Myśliński 2015), evolutionary structural optimization (ESO) method (Li et al. 2003), phase field method (Myśliński and Wróblewski 2017), and topological derivative method (Lopes et al. 2017) were developed. It should be mentioned that the SIMP method is the most widely used one owing to its intuitiveness and convenience of combining with the finite element model. Both the elastic-rigid (Fancello 2006) and elastic-elastic (Jeong et al. 2018) problems with frictionless (Stromberg 2010) or frictional (Stromberg 2013) contact have been studied.

In particular, efforts were made in terms of leakproofness of contact seal (Wang et al. 2020; Zhang and Niu 2018), the uniformity of contact pressure (Kristiansen et al. 2020; Niu et al. 2019), the reduction of peak crash force (Ma et al. 2020), and the resistance of wear and fatigue (Paczelt et al. 2016). Recently, the three-field SIMP method (Sigmund and Maute 2013) together with the adjoint sensitivity analysis using load increment reduction rules is developed by Niu et al. (2020) for elastic contact problems with friction. Obtained topological configurations were free of gray densities. However, the SIMP method was applied only to 2D contact problems except that 3D problems with rigid obstacles and frictionless contact were addressed in (Stromberg 2010; Stromberg and Klarbring 2010). Meanwhile, the avoidances of producing zigzag boundaries and prohibitive computing cost are still challenging issues.

The parameterization of pseudo-density field provides a promising approach. It has the advantage of obtaining smooth boundaries and reducing the number of design variables. Nevertheless, only non-contact problems were previously studied by means of B-spline parameterization (Qian 2013; Xu et al. 2020), the Shepard function (Kang and Wang 2011), NURBS (non-uniform rational basis spline) (Costa et al. 2018), and a combination of them (Gao et al. 2019). The contribution of this paper is to extend the B-spline parameterization method for topology optimization of both 2D and 3D linear elastic contact problems with small deformations. The B-spline pseudo-density is further regularized using the threshold projection for the attainment of a nearly 0/1 distribution. The gradient-based optimization algorithm is used to solve the optimization problem efficiently. Here, the penalty method (Wriggers 2006) is adopted to enforce the contact constraints. The tangential friction behavior is assumed to be governed by the regularized Coulomb law (Oden and Pires 1983; Wriggers 2006).

The remainder of this paper is organized as follows. In Section 2, basic theories of the FE formulation of node-to-node (NTN) frictional contact analysis for 3D elastic problems are introduced. In Section 3, the B-spline parameterization method for topology optimization is presented. In Section 4, topology optimization formulation and sensitivity analysis for contact problems are discussed. In Section 5, the detailed implementation of optimization flowchart is given. In Section 6, the proposed topology optimization procedure is validated with 2D and 3D numerical examples. Conclusions are finally drawn out in Section 7.

2 FE formulation of NTN contact analysis

The basic FE formulation of NTN contact analysis is briefly described in this section. One can refer to the monograph (Wriggers 2006) for details. Consider two spatial elastic bodies ΩI and ΩII in contact, as shown in Fig. 1. In the Cartesian coordinate system Oxyz, the normal and tangential unit vectors of contact node pair i are defined as

$$ {\mathbf{n}}_i={\left[{n}_{xi}\kern0.5em {n}_{yi}\kern0.5em {n}_{zi}\right]}^{\mathrm{T}}, $$
(1)
$$ {\mathbf{t}}_i^{\alpha }={\left[{t}_{xi}^{\alpha}\kern0.5em {t}_{yi}^{\alpha}\kern0.5em {t}_{zi}^{\alpha}\right]}^{\mathrm{T}},\kern1em \alpha =1,2, $$
(2)

where α represents the two orthogonal directions on the tangent plane.

Fig. 1
figure 1

Contact problem of two spatial elastic bodies

The relative displacement vector of the contact node pair i is

$$ {\mathbf{g}}_i={g}_{\mathrm{N}i}{\mathbf{n}}_i+{g}_{\mathrm{T}i}^1{\mathbf{t}}_i^1+{g}_{\mathrm{T}i}^2{\mathbf{t}}_i^2, $$
(3)

in which gNi is the normal contact gap. \( {g}_{\mathrm{T}i}^1 \) and \( {g}_{\mathrm{T}i}^2 \) are tangential slips along the \( {\mathbf{t}}_i^1 \) and \( {\mathbf{t}}_i^2 \) directions, respectively. The normal contact behavior is governed by the well-known Hertz-Signorini-Moreau conditions (Wriggers 2006). At contact node pair i, the statement is

$$ {g}_{\mathrm{N}i}\ge 0,\kern1em {f}_{\mathrm{N}i}\le 0,\kern1em {f}_{\mathrm{N}i}{g}_{\mathrm{N}i}=0, $$
(4)

in which fNi is the normal contact force. The friction behavior in the tangential direction is assumed to be governed by the regularized Coulomb friction law (Oden and Pires 1983; Wriggers 2006).

For the FE model of frictional contact problem, the governing equation is solved using the incremental Newton-Raphson method (Wriggers 2006). The applied external load vector f is divided into Ninc finite increments. At the convergence of the nth load increment, the following equilibrium equations hold

$$ \left\{\begin{array}{c}{\mathbf{r}}_n={\mathbf{f}}_n-{\mathbf{Ku}}_n-{\mathbf{f}}_{\mathrm{N},n}-{\mathbf{f}}_{\mathrm{T},n}=\mathbf{0}\\ {}{\mathbf{q}}_n={\mathbf{f}}_{\mathrm{T},n}-{\mathbf{f}}_{\mathrm{T}\mathrm{k},n}-{\mathbf{f}}_{\mathrm{T}\mathrm{d},n}=\mathbf{0}\end{array}\right., $$
(5)

with

$$ {\mathbf{f}}_{\mathrm{N},n}={\mathbf{K}}_{\mathrm{N},n}\left({\mathbf{u}}_n+\mathbf{x}\right), $$
(6)
$$ {\mathbf{f}}_{\mathrm{T}\mathrm{k},n}={\mathbf{T}}_{\mathrm{T}\mathrm{k},n}{\mathbf{f}}_{\mathrm{T},n-1}+{\mathbf{K}}_{\mathrm{T}\mathrm{k},n}\left({\mathbf{u}}_n-{\mathbf{u}}_{n-1}\right), $$
(7)
$$ {\mathbf{f}}_{\mathrm{Td},n}={\mathbf{K}}_{\mathrm{Td},n}\left({\mathbf{u}}_n+\mathbf{x}\right), $$
(8)

in which rn and qn are the global and local residual vectors. fn is the accumulated external load vector. fN, n and fT, n are the normal and friction contact load vectors. fTk, n and fTd, n are the sticking and sliding friction forces, respectively. \( {\mathbf{T}}_{\mathrm{Tk},n}\in {\mathrm{\mathbb{R}}}^{n_d\times {n}_d} \) is the sticking load extraction matrix. nd is the total number of degrees of freedom of the FE model. un and x are the global displacement of the nth load increment and coordinate vectors of all nodes, respectively. K is the global elastic stiffness matrix. KN, n, KTk, n, and KTd, n are the normal, sticking, and sliding contact stiffness matrices and can be constructed respectively as

$$ {\mathbf{K}}_{\mathrm{N},n}={\varepsilon}_{\mathrm{N}}\sum \limits_{i=1}^{n_{c,n}}\left({\mathbf{C}}_{\mathrm{N}i}{\left({\mathbf{C}}_{\mathrm{N}i}\right)}^{\mathrm{T}}\right), $$
(9)
$$ {\mathbf{K}}_{\mathrm{T}\mathrm{k},n}={\varepsilon}_{\mathrm{T}}\sum \limits_{i=1}^{n_{\mathrm{T}\mathrm{k},n}}\sum \limits_{\alpha =1}^2\left({\mathbf{C}}_{\mathrm{T}i}^{\alpha }{\left({\mathbf{C}}_{\mathrm{T}i}^{\alpha}\right)}^{\mathrm{T}}\right), $$
(10)
$$ {\mathbf{K}}_{\mathrm{T}\mathrm{d},n}=\sum \limits_{i=1}^{n_{\mathrm{T}\mathrm{d},n}}\sum \limits_{\alpha =1}^2\left({\varepsilon}_{\mathrm{T}}\sum \limits_{\beta =1}^2\left(\left({\left({\mathbf{t}}_i^{\alpha}\right)}^{\mathrm{T}}{\mathbf{t}}_i^{\beta }-{n}_{\mathrm{T}i,n}^{\alpha }{n}_{\mathrm{T}i,n}^{\beta}\right)\left({\mathbf{C}}_{\mathrm{T}i}^{\alpha }{\left({\mathbf{C}}_{\mathrm{T}i}^{\beta}\right)}^{\mathrm{T}}\right)\right)+{\mu \varepsilon}_N{n}_{\mathrm{T}i,n}^{\alpha }{\mathbf{C}}_{\mathrm{T}i}^{\alpha }{\left({\mathbf{C}}_{\mathrm{N}i}\right)}^{\mathrm{T}}\right), $$
(11)

where εN and εT are the normal and tangential penalty parameters. μ is the friction coefficient. nTk, n and nTd, n (nc, n = nTk, n + nTd, n) are the numbers of sticking and sliding contact node pairs, respectively. \( {n}_{\mathrm{T}i,n}^{\alpha } \) (\( {n}_{\mathrm{T}i,n}^{\beta } \)) are the components of sliding direction vector nTi, n along the two tangential directions

$$ {n}_{\mathrm{T}i,n}^{\alpha }={\left({\mathbf{n}}_{\mathrm{T}i,n}\right)}^{\mathrm{T}}{\mathbf{t}}_i^{\alpha }. $$
(12)

CNi and \( {\mathbf{C}}_{\mathrm{T}i}^{\alpha } \) (\( {\mathbf{C}}_{\mathrm{T}i}^{\beta } \)) in (9)–(11) are the global normal and tangential kinematic transformation vectors of contact node pair i, which can be represented as follows:

$$ {\mathbf{C}}_{\mathrm{N}i}={\mathbf{T}}_i^{\mathrm{T}}{\left\{-{\mathbf{n}}_i^{\mathrm{T}},\kern0.5em {\mathbf{n}}_i^{\mathrm{T}}\right\}}^{\mathrm{T}}, $$
(13)
$$ {\mathbf{C}}_{\mathrm{T}i}^{\alpha }={\mathbf{T}}_i^{\mathrm{T}}{\left\{-{\left({\mathbf{t}}_i^{\alpha}\right)}^{\mathrm{T}},\kern0.5em {\left({\mathbf{t}}_i^{\alpha}\right)}^{\mathrm{T}}\right\}}^{\mathrm{T}}, $$
(14)

in which \( {\mathbf{T}}_i\in {\mathrm{\mathbb{R}}}^{6\times {n}_d} \) is a coefficient matrix.

According to (6)–(8), (5) can be rewritten as

$$ \left\{\begin{array}{c}{\mathbf{r}}_n={\mathbf{f}}_n-{\mathbf{K}}_{\tan, n}{\mathbf{u}}_n-{\mathbf{K}}_{\mathrm{N},n}\mathbf{x}-{\mathbf{T}}_{\mathrm{T}\mathrm{k},n}{\mathbf{f}}_{\mathrm{T},n-1}+{\mathbf{K}}_{\mathrm{T}\mathrm{k},n}{\mathbf{u}}_{n-1}-{\mathbf{K}}_{\mathrm{T}\mathrm{d},n}\mathbf{x}=\mathbf{0}\\ {}{\mathbf{q}}_n={\mathbf{f}}_{\mathrm{T},n}-{\mathbf{T}}_{\mathrm{T}\mathrm{k},n}{\mathbf{f}}_{\mathrm{T},n-1}-{\mathbf{K}}_{\mathrm{T}\mathrm{k},n}\left({\mathbf{u}}_n-{\mathbf{u}}_{n-1}\right)-{\mathbf{K}}_{\mathrm{T}\mathrm{d},n}\left({\mathbf{u}}_n+\mathbf{x}\right)=\mathbf{0}\end{array}\right., $$
(15)

in which Ktan, n is the tangential stiffness matrix

$$ {\mathbf{K}}_{\tan, n}=\mathbf{K}+{\mathbf{K}}_{\mathrm{N},n}+{\mathbf{K}}_{\mathrm{Tk},n}+{\mathbf{K}}_{\mathrm{Td},n}. $$
(16)

For frictionless contact analysis, (15) can be reduced to

$$ \mathbf{r}=\mathbf{f}-\mathbf{Ku}-{\mathbf{K}}_{\mathrm{N}}\left(\mathbf{u}+\mathbf{x}\right)=\mathbf{0}. $$
(17)

3 B-spline parameterization method

3.1 B-spline basis functions

For a univariate B-spline function, define the knot vector Ξ with an ordered set of non-decreasing parameters in the parametric space [0,  1]

$$ \boldsymbol{\Xi} =\left\{{\xi}_1,{\xi}_2,\dots, {\xi}_{n+p+1}\right\}, $$
(18)

where n and p are the number and degree of the B-spline basis functions, respectively. The B-spline basis functions are defined by the Cox-de Boor formula (Piegl and Tiller 2012) and stated as

$$ \left\{\begin{array}{l}{N}_{i,0}\left(\xi \right)=\left\{\begin{array}{l}1\kern1em \mathrm{if}\kern0.5em {\xi}_i\le \xi \le {\xi}_{i+1}\\ {}0\kern1em \mathrm{otherwise}\end{array}\right.\\ {}{N}_{i,p}\left(\xi \right)=\frac{\xi -{\xi}_i}{\xi_{i+p}-{\xi}_i}{N}_{i,p-1}\left(\xi \right)+\frac{\xi_{i+p+1}-\xi }{\xi_{i+p+1}-{\xi}_{i+1}}{N}_{i+1,p-1}\left(\xi \right)\\ {}\mathrm{provide}\kern1em \frac{0}{0}=0\end{array}\right.. $$
(19)

Figure 2 illustrates the B-spline basis functions defined by the knot vector Ξ. B-spline basis functions have some important properties and three of them are listed below.

  1. (1)

    Local support: Ni, p(ξ) is non-zero only in the interval [ξi, ξi + p + 1];

  2. (2)

    Non-negative: Ni, p(ξ) ≥ 0;

  3. (3)

    Partition of unity: ∀ξ ∈ [ξi, ξi + 1], \( \sum \limits_{j=i-p}^i{N}_{j,p}\left(\xi \right)=1 \).

Fig. 2
figure 2

B-spline basis functions (p = 3, n = 8) with the knot vector Ξ = {0,  0,  0,  0,  0.2,  0.4,  0.6,  0.8,  1,  1,  1,  1}

3.2 B-spline parameterization of pseudo-density field

Consider a 2D contact problem shown in Fig. 3. Suppose two arbitrary shaped bodies are embedded into a regular design domain (x, y) ∈ [0, lx] × [0, ly]. The red dots represent the control parameters unless otherwise specified hereinafter. B-spline parameterization is used to represent the pseudo-density field over the design domain so that

$$ \rho \left(x,y\right)=\sum \limits_{i=1}^{n_x}\sum \limits_{j=1}^{n_y}{N}_{i,p}\left(\xi \right){N}_{j,p}\left(\tau \right){P}_{i,j}=\sum \limits_{i=1}^{n_x}\sum \limits_{j=1}^{n_y}{R}_{i,j}\left(\xi, \tau \right){P}_{i,j}, $$
(20)

where Ni, p and Nj, p are the basis functions defined in (19). Ri, j is the piecewise basis function combined by the B-spline basis functions. {Pi, j} is the input set of nx × ny control parameters whose locations correspond to

$$ \left\{\begin{array}{l}{\xi}_{P_{i,j}}=\frac{1}{p}\left({\xi}_{i+1}+\dots +{\xi}_{i+p}\right)\\ {}{\tau}_{P_{i,j}}=\frac{1}{p}\left({\tau}_{j+1}+\dots +{\tau}_{j+p}\right)\end{array}\right.. $$
(21)
Fig. 3
figure 3

Distribution of control parameters in the design domain

In this case, the following coordinate transformation holds

$$ \xi =\frac{x}{l_x},\kern1em \tau =\frac{y}{l_y}. $$
(22)

Figure 4a shows a B-spline surface, i.e., pseudo-density field ρ(x, y), defined over the design domain. The uneven distribution of control parameters near the boundary is caused by the knot vectors with non-uniform distribution at each end, similar to Fig. 2. The boundary transition region corresponding to the gray area occupies almost one-third of the entire design domain. It should be avoided in order to produce a structure with smooth and clear boundaries.

Fig. 4
figure 4

B-spline surface. a Before projection. b After projection

To this end, the threshold projection method (Wang et al. 2010) based on the smoothed Heaviside function is applied so that

$$ \overline{\rho}={H}_{\mathrm{M}}\left(\rho \right)=\frac{\tanh \left(\beta \eta \right)+\tanh \left(\beta \left(\rho -\eta \right)\right)}{\tanh \left(\beta \eta \right)+\tanh \left(\beta \left(1.0-\eta \right)\right)}, $$
(23)

in which ρ and \( \overline{\rho} \) are the pseudo-density field before and after the projection, respectively. HM(·) represents the smoothed Heaviside function. β controls the sharpness of the function while η is a threshold with values between 0 and 1.

Figure 4b shows the pseudo-density field after the projection by using the smoothed Heaviside function with β = 10 and η = 0.5. Compared with Fig. 4a, the boundary transition region represented by the gray area is narrowed. Notice that the smoothed Heaviside function proposed in (Wang et al. 2010) is adopted here due to its conciseness although a variety of available forms exist (Guest et al. 2004; Kawamoto et al. 2011; Sigmund 2007; Xu et al. 2010).

Hence, the pseudo-density of each element used in the FE analysis model is evaluated from the projected pseudo-density field in an integral way

$$ {\tilde{\rho}}_e=\frac{\int_{\varOmega_e}\overline{\rho}\mathrm{d}\varOmega }{V_e}=\frac{\iint \overline{\rho}\mathrm{d}x\mathrm{d}y}{V_e}, $$
(24)

where \( {\tilde{\rho}}_e \) and Ωe are the pseudo-density and integral domain of the eth element, respectively. Ve is the element volume. Equation (24) is numerically calculated by the Gaussian quadrature

$$ {\tilde{\rho}}_e=\frac{\underset{-1}{\overset{1}{\int }}\underset{-1}{\overset{1}{\int }}\overline{\rho}\left|{\mathbf{J}}_e\right|\mathrm{d}\varphi \mathrm{d}\gamma }{V_e}=\frac{\left|{\mathbf{J}}_e\right|}{V_e}\underset{-1}{\overset{1}{\int }}\underset{-1}{\overset{1}{\int }}\overline{\rho}\mathrm{d}\varphi \mathrm{d}\gamma =\frac{\left|{\mathbf{J}}_e\right|}{V_e}\sum \limits_{q=1}^h\sum \limits_{k=1}^h{a}_q{a}_k\overline{\rho}\left({x}_k,{y}_q\right), $$
(25)

in which |Je| is the determinant of the Jacobian matrix Je. h determines the number of selected Gauss quadrature points and should be appropriately chosen to balance the computational efficiency and accuracy. aq and ak are the weights corresponding to the Gauss quadrature points.

Figure 5a gives the B-spline pseudo-density field dominated by control parameters with black mesh representing the FE mesh. The projected pseudo-density field using the smoothed Heaviside function is shown in Fig. 5b. Figure 5c depicts the mapping of the projected pseudo-density field onto the discrete finite element by the Gaussian quadrature with h = 2.

Fig. 5
figure 5

B-spline parameterization followed by projection and discretization. a B-spline pseudo-density field (ρ). b Projected pseudo-density field (\( \overline{\rho} \)). c Discretized pseudo-density field (\( {\tilde{\rho}}_i \))

According to (20) and (23), (25) can be rewritten as

$$ {\tilde{\rho}}_e=\frac{\left|{\mathbf{J}}_e\right|}{V_e}\sum \limits_{q=1}^h\sum \limits_{k=1}^h{a}_q{a}_k{H}_{\mathrm{M}}\left(\sum \limits_{i=1}^{n_x}\sum \limits_{j=1}^{n_y}{R}_{i,j}\left({\xi}_k,{\tau}_q\right){P}_{i,j}\right). $$
(26)

As {Ri, j(ξk, τq)} are only related to coordinates of the Gauss quadrature points, several interpolation matrices {Wk, q} can be constructed before the optimization process begins. Accordingly, the control parameters should be arranged in vector P as a set of design variables in association with the interpolation matrices {Wk, q}. After this treatment, (26) can be rewritten as

$$ \tilde{\boldsymbol{\uprho}}={\left[\frac{\left|{\mathbf{J}}_1\right|}{V_1},\kern0.5em \frac{\left|{\mathbf{J}}_2\right|}{V_2},\dots, \frac{\left|{\mathbf{J}}_{n_e}\right|}{V_{n_e}}\right]}^{\mathrm{T}}\circ \left(\sum \limits_{\mathrm{q}=1}^h\sum \limits_{\mathrm{k}=1}^h{a}_q{a}_k{H}_{\mathrm{M}}\left({\mathbf{W}}_{k,q}\mathbf{P}\right)\right), $$
(27)

with

$$ \tilde{\boldsymbol{\uprho}}={\left[{\tilde{\rho}}_1,\kern0.5em {\tilde{\rho}}_2,\kern0.5em \dots, {\tilde{\rho}}_{n_e}\right]}^{\mathrm{T}}, $$
(28)
$$ \mathbf{P}=\left\{{P}_{i,j}\right\}={\left[{P}_1,\kern0.5em {P}_2,\kern0.5em \dots, {P}_{n_p}\right]}^{\mathrm{T}}, $$
(29)
$$ {\mathbf{W}}_{k,q}=\left\{{R}_{i,j}\left({\xi}_k,{\tau}_q\right)\right\}\in {\mathrm{\mathbb{R}}}^{n_e\times {n}_p}, $$
(30)

in which ne is the number of elements in FE model and np is the number of parametric design variables. The symbol ∘ is the Hadamard entry-wise product operator.

It is worth to note that the contact problem always contains several objects, which makes the construction of the interpolation (or filter) matrix complex and time-consuming in the traditional density-based method. The B-spline parameterization method is free from this problem since only one parameter field is adequate.

As indicated in (Qian 2013), the B-spline parameterization method has the functionality of intrinsic filtering owing to the inherent local support property of B-spline basis functions. The filter size depends on the degrees and knots of the B-spline. Analogously to the traditional density filter technique (Bourdin 2001; Bruns and Tortorelli 2001), the B-spline basis function acts as the weighting function. The size of the area covered by the B-spline basis function determines the filter size.

To illustrate the filtering effect, Fig. 6 depicts the B-spline basis functions with different degrees and uniform distribution of knots. As the degree increases gradually, the covered area Δp(p = 1, 3, 5, 7, 9) enlarges but the value of B-spline basis function greatly reduces so that the effect of the filter size becomes less significant especially at the position away from the center. To avoid this, the number of knots is used to control the filter size in this paper while the degree of the B-spline basis functions is set to p = 3 constantly.

Fig. 6
figure 6

B-spline basis functions with different degrees

4 Topology optimization formulation and sensitivity analysis

4.1 Topology optimization formulation

For frictional contact problems, the formulation of volume constrained compliance minimization is expressed as

$$ \left\{\begin{array}{c}\mathrm{find}\kern0.75em P={\left[{P}_1,\kern0.33em {P}_2,\kern0.33em \dots, {P}_{n_p}\right]}^{\mathrm{T}}\\ {}\min C={f}^{\mathrm{T}}u(P)\\ {}s.t.\overset{\sim }{\rho }={\left[{\overset{\sim }{\rho}}_1,\kern0.33em {\overset{\sim }{\rho}}_2,\kern0.33em \dots, {\overset{\sim }{\rho}}_{n_e}\right]}^{\mathrm{T}}\\ {}={\left[\frac{\left|{J}_1\right|}{V_1},\kern0.33em \frac{\left|{J}_2\right|}{V_2},\kern0.33em \dots, \frac{\left|{J}_{n_e}\right|}{V_{n_e}}\right]}^{\mathrm{T}}\circ \left(\sum \limits_{q=1}^h\sum \limits_{k=1}^h{a}_q{a}_k{H}_{\mathrm{M}}\left({W}_{k,q}P\right)\right)\\ {}\kern1.33em \left\{\begin{array}{c}{r}_n=0\\ {}{q}_n=0\end{array}\right.\kern9em n=1,2,\cdots, {N}_{\mathrm{inc}}\\ {}\kern2.33em {V}_{\mathrm{f}}=\frac{1}{V_0}\sum \limits_{e=1}^{n_e}{\overset{\sim }{\rho}}_e{V}_e\le {\overline{V}}_{\mathrm{f}}\\ {}\kern2.33em 0\le {P}_i\le 1\kern8.45em i=1,2,\dots, {n}_p\end{array}\right., $$
(31)

in which C is defined as the compliance of the involved contact system. f is the external load vector which is supposed to be design-independent here. u is the nodal displacement vector. Ve is the volume of the eth element. V0 is the total volume of the design domain. Vf and \( {\overline{V}}_{\mathrm{f}} \) denote the volume fraction and upper limit, respectively. Notice that for a frictionless contact problem, we only need to replace the FE equilibrium equation of frictional contact analysis in (31) with the frictionless one.

The stiffness matrix of the eth element is finally calculated as

$$ {\mathbf{K}}_e=\left({E}_{\mathrm{void}}+{\tilde{\rho}}_e^s\left({E}_{\mathrm{solid}}-{E}_{\mathrm{void}}\right)\right){\mathbf{K}}_{e0}, $$
(32)

where Evoid and Esolid denote Young’s modulus of void material (\( {\tilde{\rho}}_e=0 \)) and solid material (\( {\tilde{\rho}}_e=1 \)), respectively. s is the penalization coefficient and s ≥ 1.0. To avoid the numerical singularity of the stiffness matrix, Evoid is set to a small positive value Evoid = 10−9Esolid in this work. Ke0 is the stiffness matrix of element e with unit Young’s modulus.

4.2 Sensitivity analysis

Mathematically, sensitivities of the compliance w.r.t the design variables P correspond to

$$ \frac{\partial C}{\partial \mathbf{P}}=\frac{\partial C}{\partial \tilde{\boldsymbol{\uprho}}}\frac{\partial \tilde{\boldsymbol{\uprho}}}{\partial \overline{\boldsymbol{\uprho}}}\frac{\partial \overline{\boldsymbol{\uprho}}}{\partial \boldsymbol{\uprho}}\frac{\partial \boldsymbol{\uprho}}{\partial \mathbf{P}}=\frac{\partial C}{\partial \tilde{\boldsymbol{\uprho}}}\left(\left[\operatorname{diag}\left(\mathbf{J}\right)\right]\left(\sum \limits_{q=1}^h\sum \limits_{k=1}^h{a}_q{a}_k\left[\operatorname{diag}\left({\mathbf{H}}_{k,q}\right)\right]{\mathbf{W}}_{k,q}\right)\right), $$
(33)

with

$$ \mathbf{J}={\left[\frac{\left|{\mathbf{J}}_1\right|}{V_1},\kern0.5em \frac{\left|{\mathbf{J}}_2\right|}{V_2},\kern0.5em \dots, \frac{\left|{\mathbf{J}}_{n_e}\right|}{V_{n_e}}\right]}^{\mathrm{T}}, $$
(34)
$$ {\mathbf{H}}_{k,q}={\left[\frac{\partial {H}_{\mathrm{M}}\left({\rho}_1\left({x}_k,{y}_q\right)\right)}{\partial {\rho}_1\left({x}_k,{y}_q\right)},\frac{\partial {H}_{\mathrm{M}}\left({\rho}_2\left({x}_k,{y}_q\right)\right)}{\partial {\rho}_2\left({x}_k,{y}_q\right)},\dots, \frac{\partial {H}_{\mathrm{M}}\left({\rho}_{n_e}\left({x}_k,{y}_q\right)\right)}{\partial {\rho}_{n_e}\left({x}_k,{y}_q\right)}\right]}^{\mathrm{T}}, $$
(35)
$$ \frac{\partial {H}_{\mathrm{M}}\left({\rho}_e\left({x}_k,{y}_q\right)\right)}{\partial {\rho}_e\left({x}_k,{y}_q\right)}=\frac{\beta \left(1-{\tanh}^2\left(\beta \left({\rho}_e\left({x}_k,{y}_q\right)-\eta \right)\right)\right)}{\tanh \left(\beta \eta \right)+\tanh \left(\beta \left(1-\eta \right)\right)}, $$
(36)

in which [diag(J)] ([diag(Hk, q)]) means to extract the elements of J (Hk, q) and place them in the principal diagonal of a diagonal matrix with zero off-diagonal elements (Mulaik 2009). ρe(xk, yq) is the B-spline pseudo-density value of element e at the Gauss quadrature point (k, q). \( \frac{\partial C}{\partial \tilde{\boldsymbol{\uprho}}} \) are the sensitivities of the compliance function w.r.t the physical densities.

For frictionless contact problems, \( \frac{\partial C}{\partial \tilde{\boldsymbol{\uprho}}} \) is calculated by using the adjoint method (Niu et al. 2019) which is stated as

$$ \frac{\mathrm{\partial C}}{\partial {\tilde{\rho}}_e}=-{\boldsymbol{\uplambda}}^{\mathrm{T}}\frac{\partial \mathbf{K}}{\partial {\tilde{\rho}}_e}\mathbf{u}=-{\boldsymbol{\uplambda}}_e^{\mathrm{T}}\frac{\partial {\mathbf{K}}_e}{\partial {\tilde{\rho}}_e}{\mathbf{u}}_e, $$
(37)

in which ue and λe contain the nodal displacements and the adjoint vector associated with the eth element. λ is the adjoint vector computed by solving the following adjoint equation

$$ \left(\mathbf{K}+{\mathbf{K}}_{\mathrm{N}}\right)\boldsymbol{\uplambda} =\mathbf{f}. $$
(38)

Particularly, for the frictionless contact problem with zero initial gaps, the compliance is self-adjoint with λ = u such that no additional equation solving is required (Niu et al. 2019).

For frictional contact problem, using the adjoint method (Alberdi et al. 2018; Michaleris et al. 1994; Niu et al. 2020) produces \( \frac{\partial C}{\partial \tilde{\boldsymbol{\uprho}}} \)

$$ \frac{\mathrm{\partial C}}{\partial {\tilde{\rho}}_e}=-\sum \limits_{n=1}^{N_{\mathrm{inc}}}{\boldsymbol{\uplambda}}_{n,e}^{\mathrm{T}}\frac{\partial {\mathbf{K}}_e}{\partial {\tilde{\rho}}_e}{\mathbf{u}}_{n,e}, $$
(39)

with

$$ \frac{\partial {\mathbf{K}}_e}{\partial {\tilde{\rho}}_e}=s{\tilde{\rho}}_e^{s-1}\left({E}_{\mathrm{solid}}-{E}_{\mathrm{void}}\right){\mathbf{K}}_{e0}, $$
(40)

where un, e and λn, e contain the nodal displacements and the adjoint vector of the eth element at the nth load increment. λn(n = 1, 2, …, Ninc) and γn(n = 1, 2, …, Ninc) are adjoint vectors obtained by solving the following adjoint equations

$$ \left\{\begin{array}{c}{N}_{\mathrm{inc}}:\left\{\begin{array}{c}{\gamma}_{N_{\mathrm{inc}}}=0\\ {}{K}_{\tan, {N}_{\mathrm{inc}}}^{\mathrm{T}}{\lambda}_{N_{\mathrm{inc}}}={\left(\frac{\partial C}{\partial {u}_{N_{\mathrm{inc}}}}\right)}^{\mathrm{T}}\end{array}\right.\\ {}n:\left\{\begin{array}{c}{\gamma}_n={T}_{\mathrm{T}\mathrm{k},n+1}\left({\lambda}_{n+1}+{\gamma}_{n+1}\right)\\ {}{K}_{\tan, n}^{\mathrm{T}}{\lambda}_n={K}_{\mathrm{T}\mathrm{k},n+1}\left({\lambda}_{n+1}+{\gamma}_{n+1}\right)-{\left({K}_{\mathrm{T}\mathrm{k},n}+{K}_{\mathrm{T}\mathrm{d},n}\right)}^{\mathrm{T}}{\gamma}_n\end{array}\right.\\ {}\kern0.33em \left(n={N}_{\mathrm{inc}}-1,{N}_{\mathrm{inc}}-2,\cdots, 2,1\right)\end{array}\right.. $$
(41)

Equation (41) needs to be solved in a reverse order (Michaleris et al. 1994). The load increment reduction rules (Niu et al. 2020) are also used in this paper in order to facilitate efficient adjoint sensitivity analysis of the frictional contact problem.

The above adjoint sensitivity analysis method has been verified in the topology optimization of contact problems with small deformations (Niu et al. 2020). For contact problems with changing location and shape of contact regions, the contact stiffness matrices also change as the contact region changes. As a result, these matrices are all design-dependent and their derivatives cannot be eliminated in the sensitivity analysis, so the current sensitivity analysis method needs to be further developed in that case.

The sensitivities of the volume fraction Vf w.r.t the design variables are calculated as

$$ {\displaystyle \begin{array}{l}\frac{\partial {V}_{\mathrm{f}}}{\partial \mathbf{P}}=\frac{\partial {V}_{\mathrm{f}}}{\partial \tilde{\boldsymbol{\uprho}}}\frac{\partial \tilde{\boldsymbol{\uprho}}}{\partial \overline{\boldsymbol{\uprho}}}\frac{\partial \overline{\boldsymbol{\uprho}}}{\partial \boldsymbol{\uprho}}\frac{\partial \boldsymbol{\uprho}}{\partial \mathbf{P}}\\ {}\kern2em =\left(\frac{1}{V_0}\left[{V}_1\ {V}_2\dots {V}_{n_e}\right]\right)\left(\left[\operatorname{diag}\left(\mathbf{J}\right)\right]\left(\sum \limits_{q=1}^h\sum \limits_{k=1}^h{a}_q{a}_k\left[\operatorname{diag}\left({\mathbf{H}}_{k,q}\right)\right]{\mathbf{W}}_{k,q}\right)\right).\end{array}} $$
(42)

5 Implementation aspects

Figure 7 gives the flowchart of optimization method for contact problems with B-spline parameterization. The implementation mainly consists of six stages realized by using VISUAL FORTRAN programming and ANSYS.

  • Stage 1: Initialization. Set the iteration counter l = 0, the initial values of design variables \( \left\{{P}_i\right\}={\overline{V}}_{\mathrm{f}} \), and the penalization coefficient s = 1.0. Set the projection parameters η = 0.5 and β = 1.0, and the parameter of Gauss quadrature h = 3 based on our experience. Construct the B-spline pseudo-density interpolation matrices {Wk, q}.

  • Stage 2: Parameters and design variables updating. Continuation schemes are applied here to update parameters in order to reduce the risk of early getting stuck in local optimum solution and to improve the iteration stability (Wang et al. 2010; Xu et al. 2010). The parameters related to the continuation schemes should be chosen properly to balance the optimization efficiency and robustness. In this work, the penalization coefficient s is increased by 0.4 every 20 iterations from the initial value of 1.0 to the final value of 3.0. Parameter β involved in the smoothed Heaviside function is multiplied by a coefficient of 1.72 every 20 iterations from the initial value of 1.0 to the final value of 128.0.

  • Stage 3: Interpolation-projection-integration. First, the interpolation matrices {Wk, q} and design variables P are used to construct the B-spline pseudo-density field. Then, the smoothed Heaviside function is used to obtain the projected pseudo-density field. Finally, the integral-based mapping method is used to gain the pseudo-densities of elements from the projected pseudo-density field.

  • Stage 4: Contact analysis. Call ANSYS to perform contact analysis and output results including structural compliance, volume, and stiffness matrices.

  • Stage 5: Sensitivity analysis. In combination with the output results of the previous step, the sensitivities are calculated by referring to Section 4.2. Two load increment reduction rules mentioned above are used to improve the efficiency.

    Fig. 7
    figure 7

    Flowchart of optimization method with B-spline parameterization

  • Stage 6: Optimization. Use the algorithm globally convergent method of moving asymptotes (GCMMA) (Svanberg 1995) to solve the volume constrained compliance minimization problem defined in (31). If the maximum change of design variables is lower than 0.001 with all constraints satisfied or if the iteration counter reaches its maximum number lmax = 200, the optimization process is then terminated. Otherwise, update the iteration counter l = l + 1 and go to stage 2 to continue the iterations.

6 Numerical examples

In this section, a 2D arch structure is firstly studied to show the benefits of the B-spline parameterization method. Then, a 2D bracket structure with curved contact boundaries is considered to present the effectiveness of the method. Finally, a 3D elastic-elastic contact problem is studied to further illustrate the generality of the proposed method. All examples are solved as the volume constrained compliance minimization problem defined in (31).

6.1 Arch structure

6.1.1 B-spline parameterization optimization

Figure 8a shows an arch structure in contact with rigid foundation. Only half of the structure is modeled due to the symmetry. Young’s modulus is 2.299 GPa and Poisson’s ratio is 0.39. The geometrical dimensions, load, and boundary conditions of the arch structure are indicated in the diagram. The red dashed line at the lower right corner of the figure represents the elastic-rigid contact interface. In Fig. 8b, the arch structure is discretized into 8000 (80 × 100) plane stress four-node elements with an element size of 1.0 mm. The following examples use clamped knots unless specified otherwise. Figure 8c shows the distribution of parameterized design variables in the design domain and the total number of design variables is 320 (16 × 20). This reduction in number is undoubtedly enormous compared with the traditional density-based method. The initial values of the design variables are assumed to be 0.25 with the allowable volume fraction \( {\overline{V}}_{\mathrm{f}}=0.25 \).

Fig. 8
figure 8

An arch structure in contact with rigid foundation. a Half model. b FE mesh. c Distribution of parameterized design variables

Figure 9 depicts the topology optimization results of the arch structure in frictionless contact. Figure 9a shows the B-spline pseudo-density field with lots of gray areas. The projected pseudo-density field is shown in Fig. 9b, which is an almost clear 0/1 distribution with steep boundary transition regions. The volume fractions of the B-spline and projected pseudo-density fields are 0.25118 and 0.24995, respectively. The latter satisfies the volume constraint while the former does not. Figure 9c shows the projected pseudo-density field onto the horizontal plane. The red areas represent the solid material with pseudo-density \( \overline{\rho}=1.0 \) while the green areas represent the boundary transition regions with pseudo-density \( 0<\overline{\rho}<1 \). Clearly, the boundary transition regions are very narrow.

Fig. 9
figure 9

Topology optimization results of arch structure in frictionless contact. a B-spline pseudo-density field. b Projected pseudo-density field. c Planar view of the projected pseudo-density field

Figure 10 gives the optimized structure defined by the projected pseudo-density field cut by the isosurface of value \( \overline{\rho}=0.5 \) through Boolean intersection, which can be stated as

$$ \left\{\begin{array}{l}0\le \overline{\rho}<0.5\kern2em \mathrm{Void}\\ {}\overline{\rho}=0.5\kern3.5em \mathrm{Boundary}\\ {}0.5<\overline{\rho}\le 1.0\kern1.12em \mathrm{Solid}\end{array}\right.. $$
(43)
Fig. 10
figure 10

Topology optimization results of arch structure in frictionless contact. a Boolean intersection. b Topology result

The same operation is also applied in examples 2 and 3.

Figure 11 shows that the evolution of the projected pseudo-density field is featured with a high smoothness in the early iterations and steadily convergent to an almost clear 0/1 pseudo-density distribution. Meanwhile, the iteration histories of the compliance and volume fraction are shown in Fig. 12. We can observe that the large jumps are caused by the regular changes of parameters s and β.

Fig. 11
figure 11

Evolution history of the projected pseudo-density field

Fig. 12
figure 12

Iteration histories of compliance and volume fraction (μ = 0.0)

In the case of frictional contact, consider two different friction coefficients μ = 0.3, 0.5. Projected pseudo-density fields and topology results are shown in Fig. 13a and b, respectively. Figure 14 gives the iteration histories of compliance and volume fraction with μ = 0.3. Slight oscillations appear due to the interchanges between the sticking and sliding states of some contact node pairs in two successive iterations. By reducing the move limit, the oscillations can be attenuated or eliminated (Yang and Chen 1996). The iteration curves of the test case with μ = 0.5 are similar to those in Fig. 14 and thus omitted.

Fig. 13
figure 13

Topology optimization results of arch structure with frictional contact. a Projected pseudo-density fields. b Topology results

Fig. 14
figure 14

Iteration histories of compliance and volume fraction (μ = 0.3)

6.1.2 Comparison with the three-field SIMP method

Figure 15 shows the comparison of topology optimization results between the B-spline parameterization method and the three-field SIMP method (Niu et al. 2020). The results of the B-spline parameterization method with uniform knots are also listed to clarify the effect of knot distribution. Similar configurations are obtained but with different details caused by different filter methods. The B-spline parameterization method leads to smooth structures with clear boundaries. For both methods, the right leg becomes longer and more inclined with the increase of μ so as to resist possible tangential slip along the contact interface. Both methods are compared in Table 1. For the B-spline parameterization method, as the structure boundary inevitably cuts through the boundary elements, pseudo-densities of boundary elements are between 0 and 1. As a result, the penalization effect with s = 3.0 weakens the stiffness of each concerned boundary element and finally results in an increase of the global compliance result after optimization. For the B-spline parameterization method using different knot distribution, the compliances are almost the same.

Fig. 15
figure 15

Topology optimization results compared with those of the three-field SIMP method (Niu et al. 2020)

Table 1 Quantitative comparison of the three-field SIMP method and the B-spline parameterization method

The B-spline parameterization method is free from zigzag boundaries and thus a relatively coarse mesh can be used for optimization. Figure 16 shows the topology optimization results of arch structure using high-order 8-node elements with element sizes of 1.5 mm and 2.0 mm, respectively. The high-order elements ensure the analysis accuracy with coarse mesh. Figure 16a and b show the projected pseudo-density fields and topology results. The configurations are almost the same as in Fig. 10b. Different mesh sizes are tested in Table 2. The elapsed time represents the average elapsed time per iteration step. The increase of compliance is caused by the increase of material used in the boundary elements and the penalization effect, as explained in the previous paragraph. Notice that although the number of nodes increases as the element size varies from 1.0 to 1.5 mm, the number of elements is decreased by more than half. Meanwhile, the elapsed time is reduced.

Fig. 16
figure 16

Topology optimization results using coarse mesh with high-order elements (μ = 0.0). a Projected pseudo-density fields. b Topology results

Table 2 Quantitative comparison of different mesh sizes

In summary, the implementations of coarse mesh with high-order elements and small number of design variables reduce the computational costs at different stages including FE analysis, sensitivity analysis, and optimization process.

6.2 Bracket structure

Consider an elastic bracket in contact with three elastic pins, as shown in Fig. 17. This example has been studied widely for both shape and topology optimization (Bennett and Botkin 1985; Zhang et al. 2017). Figure 17a illustrates the geometrical dimensions, load, and boundary conditions. The circles with a red dashed line indicate the elastic-elastic contact interfaces. In this example, only the bracket structure is optimized while the pins and ring-shaped black areas shown in Fig. 17a are non-designable. To make it easy to distinguish, the non-design domain and ring-shaped domains are used to represent the pins and ring-shaped areas, respectively. The structure is discretized into 28,614 plane stress four-node elements with an element size of 1.0 mm, as shown in Fig. 17b. Young’s modulus and Poisson’s ratio are assumed to be 207.4 GPa and 0.3 for both the bracket and pins, respectively.

Fig. 17
figure 17

A bracket structure in contact with pins. a Geometric dimensions, load, and boundary conditions. b FE mesh. c Distribution of parameterized design variables

Figure 17c gives the distribution of the parametrized design variables with the total number of 1064 (28 × 38). Notice that there are several design variables distributed across the non-designable circle domains. These design variables may affect the projected pseudo-density field in the design domain due to the local support property of the B-spline basis function. Design variables that do not affect the projected pseudo-density field of the structure design domain should be eliminated to further reduce the number of design variables. To do this, a simple and practical way is to identify useless design variables with zero sensitivity values of the volume fraction function w.r.t the design variables. In this example, all design variables contribute to the pseudo-density field, so no design variables are excluded. Suppose the upper limit of the material volume is set to 18,000 mm3. The corresponding volume fraction is 0.2213. Thus, the initial values of the design variables are assumed to be 0.2213.

Figure 18 indicates the design domain, the projected pseudo-density field, and the ring-shaped domain. To get the final projected pseudo-density field, the following formulation is used

$$ \overline{\rho}=\left\{\begin{array}{l}1\kern1.6em \left(x,y\right)\in \mathrm{ring}\hbox{-} \mathrm{shaped}\kern0.5em \mathrm{domain}\\ {}\overline{\rho}\kern1em \left(x,y\right)\in \mathrm{design}\kern0.5em \mathrm{domain}\\ {}0\kern1.5em \left(x,y\right)\in \mathrm{non}\hbox{-} \mathrm{design}\kern0.5em \mathrm{domain}\end{array}\right.. $$
(44)
Fig. 18
figure 18

Illustration of different domains. a Design domain. b Projected pseudo-density field. c Ring-shaped domains

For both frictionless and frictional contact problems, the optimized results are almost the same, as shown in Fig. 19. The reason is that the friction effect is negligible, as explained in Niu et al. (2020)). The compliances C are 15,444.89 mJ and 14,968.39 mJ, respectively. Figure 20 gives the iteration histories of compliance and volume fraction with μ = 0.3.

Fig. 19
figure 19

Topology optimization results of the bracket structure. a Projected pseudo-density fields. b Topology results

Fig. 20
figure 20

Iteration histories of compliance and volume fraction (μ = 0.3)

Clearly, with the proposed method, both prescribed voids and non-designable solid domains can easily be represented by the level set functions in combination with the parameterized pseudo-density field through Boolean operations. This treatment can, in fact, be generalized to deal with practical engineering contact problems with non-designable domains.

In addition to the load shown in Fig. 17, another point-wise load of 15 kN is added at the same point but in opposite direction. Both loads are applied independently. Correspondingly, the expression of compliance in (31) can be rewritten as

$$ {C}_w=\sum \limits_{i=1}^2{w}_i{C}_i, $$
(45)

in which Ci is the compliance of load case i, and wi is the weight coefficient with w1 = w2 = 0.5. Figure 21 shows the topology optimization results with different distributions of design variables. Clearly, as the number of design variables is increased, the optimized structure is refined with details. Figure 21c shows the non-uniform distribution of design variables on the left and right sides. In this case, a non-symmetric topology is obtained. Compared with the traditional density-based method, the B-spline parameterization method presents a flexible and simple way to achieve a refined design with smooth boundaries.

Fig. 21
figure 21

Topology optimization results with different numbers and distributions of parameterized design variables (μ = 0.0)

6.3 Three-body structure

A 3D contact problem of three-body structure is considered in Fig. 22. Its simplified 2D cases have been studied for both frictionless and frictional contact problems (Niu et al. 2020; Strömberg 2010). Figure 22a gives a 3D view of the structure with both ends fixed. The geometrical dimensions of the upper and lower parts are 200 mm × 50 mm × 50 mm and 100 mm × 50 mm × 50 mm, respectively. A point-wise load of 10 kN is applied in the middle of the upper face. Red squares indicate the contact surfaces whose dimensions are 50 mm × 50 mm on both sides. Young’s modulus and Poisson’s ratio are assumed to be 210 GPa and 0.3 for all the bodies.

Fig. 22
figure 22

A contact problem of three-body structure. a Full model. b Half model. c FE mesh. d Distribution of parameterized design variables

Due to the symmetry, only half of the structure is modeled in Fig. 22b. In Fig. 22c, each body is discretized into 40 × 20 × 20 solid hexahedron elements with an element size of 2.5 mm. Totally, 32,000 elements are involved. The distribution of the parameterized design variables is depicted in Fig. 22d, with 30 × 20 × 10 design variables. Both bodies are parameterized only by one pseudo-density field. The total number of design variables is reduced to 4560 after eliminating the useless ones. The allowable volume fraction is 0.25, so the initial values of the design variables are assumed to be 0.25.

Topology results are shown in Fig. 23 with friction coefficients μ = 0.0, 0.3, 0.5. Figure 23a shows the half structures while Fig. 23b shows the full structures to give a more intuitive representation. Note that although a relatively coarse mesh is used here due to the computational costs, the final results still have clear and smooth boundaries. In the case μ = 0.0, the contact interface has no capability of bearing tangential loads so that the structural members near the contact segment are vertical to avoid horizontal slips. With the increase of μ, the friction behavior contributes more to resist tangential deformations along the contact interface, and thus the connecting segments between different bodies become more inclined and longer. The compliances C are 422.49 mJ, 406.54 mJ, and 372.88 mJ, respectively. Figure 24 gives the iteration histories of compliance and volume fraction for μ = 0.3. The iteration curves of other test cases are similar and omitted here.

Fig. 23
figure 23

Topology results of the three-body structure problem. a Half structures. b Full structures

Fig. 24
figure 24

Iteration histories of compliance and volume fraction (μ = 0.3)

It is noteworthy that this work focuses on contact problems undergoing small deformations. In this case, the potential contact area is predictable and can thus be predefined without fixing the real contact regions. It can change as the topology changes, as shown in Fig. 23. Moreover, the contact regions are all modeled with contact conditions. In other words, only compressive interactions are admitted in the normal direction of the contact interface and the friction behavior in the tangential direction is governed by the Coulomb law. That is quite different from the simplified fixed boundary condition and has been pointed out in several references (Niu et al. 2020; Strömberg 2010).

The storage of the filtering coefficients may be prohibitively expensive for 3D problems. In the future work, we consider utilizing the tensor-product property of the B-spline to reduce the storage expense (Wang and Qian 2015). The main idea of this method is to construct the density dynamically through the tensor product. The storage cost is thus reduced from cubic order to linear order with respect to the filter size. In our example, the memory usage of interpolation matrices is 843.0 MB and can be decreased to 88.9 MB when using the tensor-product form.

7 Conclusions

The B-spline parameterization method is extended to solve the elastic contact problems in both frictionless and frictional conditions. Multi-body structures in contact are optimized as a continuous pseudo-density field governed by parameterized design variables so that smooth boundaries can be achieved directly. Prescribed voids and non-designable domains can easily be imposed through Boolean operation between the level set function and B-spline parameterization. Besides, the B-spline interpolation matrices are easy to construct and need to be constructed only at the initial step of the optimization, which makes the method efficient to implement.

Numerical results indicate that the B-spline parameterization is beneficial in reducing the number of design variables independently of the finite element mesh compared with the traditional density-based method. Coarse meshes with high-order elements can be used to obtain the optimized structure efficiently. Also, the B-spline parameterization method provides an intrinsic filtering scheme and is flexible and simple to implement. Finally, the 3D multi-body contact problem is solved. Effects of friction coefficients upon optimized results are highlighted.

The proposed method opens up a new avenue for topology optimization of contact problems. In the future work, the authors consider extending the current framework to more complex cases, such as contact problems with unknown locations or shapes of contact regions.