1 Introduction

Light-weight components are widely used in new generations of dynamic systems, which leads to a high material and energy efficiency. In general, the overall motion of such components includes vibrations and deformations. The method of flexible multibody systems is a well-known approach to incorporate the flexible body deformations into modeling and simulation of multibody dynamics, see (Shabana 1997; Wasfy and Noor 2003). In Fig. 1, a flexible multibody system with flexible and rigid bodies is shown. These components are connected to each other, as well as their environment by joints, springs, dampers, and bearings.

For modeling and simulation of flexible multibody systems, different approaches are available. Among others, formalisms based on nonlinear finite element (FE-) methods, such as the absolute nodal coordinate formulation (ANCF), and the floating frame of reference approach are common, see (Shabana 1997; Wasfy and Noor 2003). In case of nonlinear finite element methods, normally large systems of equations of motion with a vast number of degrees of freedom result, whose time integration is connected to a high computational effort. In contrast, assuming that the flexible body deformations remain small and elastic, the floating frame of reference approach provides a more compact formulation of the governing equations of motion, see (Schwertassek and Wallrapp 1999; Seifried 2013; Shabana 2013). Thereby, the body deformations are approximated as elastic coordinates multiplied by a set of global shape functions, which can, for instance, be obtained by a model order reduction from finite element models of flexible bodies. The accuracy and efficiency of the flexible multibody modeling and simulation can be maintained by a careful choice of the global shape functions, see for instance (Held et al. 2016).

Fig. 1
figure 1

Example of a flexible multibody system

The topology optimization of flexible multibody systems is a challenging task. This is among others, due to the complexity and nonlinearity of the equations of motion, as well as time, state and design dependency of dynamic loads. Hence, a gradient-based optimization process is normally required to develop meaningful optimized designs. The gradient calculation can be based on fully and weakly coupled strategies, see (Gufler et al. 2021; Tromme et al. 2018). The fully coupled sensitivity analyses provide a gradient, which is within numerical limits exact. Though, these methods are of a high complexity and computational effort, see (Bestle 1994; Bestle and Seybold 1992; Callejo et al. 2019; Dopico et al. 2018, 2015; Held et al. 2017; Nachbagauer et al. 2015; Sonneville and Brüls 2014) for direct and adjoint sensitivity analyses of multibody systems. On the contrary, a weakly coupled equivalent static load (ESL) method is proposed by Kang et al. (2005). Thereby, the dynamic behavior of the flexible multibody system is replaced by a set of equivalent static load cases. This reduces the required numerical steps, and thus, the computation costs of the gradient calculation. Nevertheless, the developed gradient is an approximation, which lacks the implicit design dependencies of chosen objective functions. For a comparison of topology optimization results of flexible multibody systems using fully and weakly coupled strategies, the interested readers can be referred to Moghadasi et al. (2018).

In literature, the optimization of flexible components in multibody systems is mostly performed by density- or level set-based methods. For instance, in Held et al. (2015, 2016); Moghadasi et al. (2018) a solid isotropic material with penalization (SIMP) law is used to parametrize the underlying finite element model of flexible components in multibody systems. Fully and weakly coupled topology optimizations are then performed using the method of moving asymptotes (MMA). For details on SIMP approaches, interested readers can be referred to Bendsøe (1989); Du and Olhoff (2007); Olhoff and Du (2005); Pedersen (2000), and for MMA to Svanberg (1987). In contrast, Tromme et al. (2015) presents a fully coupled shape optimization, and Sun et al. (2017) presents a weakly coupled topology optimization of flexible multibody systems based on level set methods (LSMs), where the design boundaries are linked to the zero isosurface of a level set function defined over the design domain, see (van Dijk et al. 2013) for a comprehensive review of level set techniques. Moreover, for detailed comparisons of density- and level set-based optimization approaches, interested readers can be referred to the review paper by Sigmund and Maute (2013).

In the current work, a fully coupled topology optimization of flexible multibody systems is proposed, where the flexible bodies are modeled using the floating frame of reference approach. Thereby, similar to Held et al. (2015); Moghadasi et al. (2018), an adjoint sensitivity analysis is used to obtain the exact gradient of flexible bodies based on Bestle (1994); Held et al. (2017). However, in contrast to Held et al. (2015); Moghadasi et al. (2018), the optimization is performed by a modified level set method, see (Azari Nejat et al. 2022) for static optimization examples. Since in a level set-based optimization algorithm, the borderlines between interior and exterior of the design are clear and the gradient of empty elements in the exterior of the design has no physical meaning, the time-consuming adjoint sensitivity analysis should only be performed for elements in the interior of the design and around the free boundaries, which increases the efficiency of the fully coupled topology optimization of flexible multibody systems compared to the standard density-based cases, where the gradient is in each iteration obtained for all design elements. Moreover, a further design space reduction using radial basis functions (RBFs), see (Wang and Wang 2006a; Wei et al. 2018), is considered. This helps to gain even more efficiency by reducing the number of elements in the interior, for which the exact gradient is calculated by the adjoint sensitivity analysis. A gradient approximation using radial basis functions can in addition help to overcome numerical issues regarding the parametrization of material properties of poorly filled elements included in the underlying finite element model.

The remainder of this work is organized as follows: In Sect. 2, the required basics for the topology optimization of flexible multibody systems are briefly addressed and as application example, the compliance minimization problem of a flexible piston rod in a transient slider-crank mechanism is presented. In Sect. 3, the numerical issues regarding different parametrization techniques are shown, and a strategy is proposed to overcome these issues. In Sect. 4, for the application example, the level set-based optimization results are presented and compared with the results from a standard SIMP optimization, which is performed by MMA.

In Sect. 5, the main steps of the implemented adjoint sensitivity analysis are briefly described. The computation times of relevant parts depending on the number of design variables of the flexible piston rod are mentioned. Radial basis functions are then presented for a gradient approximation from sampled gradient data. Subsequently, two sampling patterns are introduced. Based on approximated gradients, optimization examples are performed, and the quality of corresponding optimization results, as well as efficiency gains are compared. In the end, Sect. 6 concludes with a summary of this work.

2 Topology optimization of flexible multibody systems

In this section, the required basics for a fully coupled level set-based topology optimization of flexible multibody systems are briefly described, which are taken from Azari Nejat et al. (2022); Azari Nejat et al. (2019); Held et al. (2017); Moghadasi et al. (2018). First, the floating frame of reference approach for the incorporation of elastic deformations into the multibody models is addressed. After that, the optimization problem is formulated. The adjoint sensitivity analysis is summarized and the application example is presented. In the end, the utilized level set method for topology optimization is introduced.

2.1 Floating frame of reference formulation

In the floating frame of reference method, the deformation of a flexible body, which is assumed to be small and elastic, is described in a reference frame \(\textrm{K}_{\textrm{R}}\). The large nonlinear rigid body motion is captured as the relative movement between the reference frame \(\textrm{K}_{\textrm{R}}\) and the inertial frame \(\textrm{K}_{\textrm{I}}\). This subdivision is depicted in Fig. 2. Using a global Ritz approach, the elastic displacement \(\varvec{u}_\mathrm{{P}}\) and rotation vector \(\varvec{\nu }_\mathrm{{P}}\) of the coordinate system \(\textrm{K}_\mathrm{{P}}\), which is rigidly attached to a point \(\textrm{P}\) on the flexible body, can be approximated at each time point t as

$$\begin{aligned} \begin{aligned} \varvec{u}_{\textrm{P}}(\varvec{R}_\mathrm{{RP}}, t)&\approx {\varvec{\varPhi }}_{\textrm{P}}(\varvec{R}_\mathrm{{RP}})\varvec{q}_\mathrm{{e}}(t),\\ \varvec{\nu }_{\textrm{P}}(\varvec{R}_\mathrm{{RP}}, t)&\approx {\varvec{\varPsi }}_{\textrm{P}}(\varvec{R}_\mathrm{{RP}})\varvec{q}_\mathrm{{e}}(t). \end{aligned} \end{aligned}$$
(1)

In this expression, the vector \(\varvec{q}_{\textrm{e}}\,{\in }\,{\mathbb {R}}^{{n_\mathrm{{e}}}}\) of \(n_\mathrm{{e}}\) elastic coordinates is time-dependent, whereas the matrix \(\varvec{\varPhi }_{\textrm{P}}\,{\in }\,{\mathbb {R}}^{{3}\times {n_\mathrm{{e}}}}\) of \(n_\mathrm{{e}}\) global displacement shape functions and the matrix \(\varvec{\varPsi }_{\textrm{P}}\,{\in }\,{\mathbb {R}}^{{3}\times {n_\mathrm{{e}}}}\) of \({n_\mathrm{{e}}}\) global rotation shape functions depend only on the relative position \(\varvec{R}_\mathrm{{RP}}\) of the point \(\textrm{P}\) in the undeformed configuration. The shape functions can, for instance, be obtained by performing a model order reduction of the linear FE model of the flexible body, which reads as

$$\begin{aligned} \overline{\varvec{M}}\ddot{\varvec{q}}+\overline{\varvec{D}}\dot{\varvec{q}}+\overline{\varvec{K}}\varvec{q}=\overline{\varvec{f}}. \end{aligned}$$
(2)

Thereby, \(\overline{\varvec{M}}\), \(\overline{\varvec{D}}\) , and \(\overline{\varvec{K}}\) are the mass, dam** and stiffness matrix. Moreover, \(\varvec{q}_{\mathrm {}}\in {\mathbb {R}}^{{n_\mathrm{{no}}}}\) is the vector of \(n_\mathrm{{no}}\) nodal coordinates and \(\overline{\varvec{f}}\) represents the vector of applied loads. In order to approximate the elastic behavior of flexible bodies with a high accuracy, usually a fine discretization of the FE model is required, which leads to a great number of nodal coordinates. Different model reduction methods can then be used, see Held et al.  (2016), to maintain the efficiency of the multibody simulation. In this work, the vector \(\varvec{q}\) of nodal coordinates is projected onto the vector \(\varvec{q}_{\textrm{e}}\) of elastic coordinates by applying a modal truncation, where \(n_{\textrm{e}} \ll n_\mathrm{{no}}\). It follows

$$\begin{aligned} {\varvec{q}\approx \varvec{\varPhi }\varvec{q}_{\textrm{e}}.} \end{aligned}$$
(3)

In this formulation, \(\varvec{\varPhi }\,{\in }\,{\mathbb {R}}^{{n_{\textrm{no}}}\times {n_\mathrm{{e}}}}\) is the matrix of global shape functions, assembled from \(n_{\textrm{e}}\) eigenmodes of the flexible body. The eigenmodes are obtained from the undamped eigenvalue problem of the FE model (2).

Fig. 2
figure 2

Floating frame of reference approach

Considering the elastic coordinates \(\varvec{q}_{\textrm{e}}\) and in addition to the rigid body coordinates as degrees of freedom, the equations of motion of a free flexible body can be formulated by applying, for instance, Jourdain’s principle, see Schwertassek and Wallrapp (1999). As shown in Fig. 1, in multibody systems, different elements connect rigid and flexible bodies with each other and their environment and reduce, in this way, the number of degrees of freedom. Performing a coordinate partitioning similar to Held et al. (2017), the equations of motion of a flexible multibody system with \(f_{\textrm{r}}\) redundant coordinates and f degrees of freedom can be derived in minimal form as ordinary differential equations (ODEs) with the following general formulation

$$\begin{aligned} \dot{\varvec{y}}&=\varvec{Z}(\varvec{y}_\mathrm{{r}})\varvec{z}_\mathrm{{r}}, \end{aligned}$$
(4)
$$\begin{aligned} \varvec{M}(t,\varvec{y}_\mathrm{{r}})\dot{\varvec{z}}+\varvec{\gamma }(t,\varvec{y}_\mathrm{{r}},\varvec{z}_\mathrm{{r}})&=\varvec{f}(t,\varvec{y}_\mathrm{{r}},\varvec{z}_\mathrm{{r}}). \end{aligned}$$
(5)

Thereby, \(\varvec{y}\in {\mathbb {R}}^f\) and \(\varvec{z}\in {\mathbb {R}}^f\) are the generalized position and velocity coordinates, whereas \(\varvec{y}_\mathrm{{r}}\in {\mathbb {R}}^{f_\textrm{r}}\) and \(\varvec{z}_\mathrm{{r}}\in {\mathbb {R}}^{f_\textrm{r}}\) are the redundant position and velocity coordinates. In the kinematic Eq. (4), \(\varvec{Z}\) is the kinematic matrix, which connects the first time derivative of generalized position coordinates \(\varvec{y}\) to the redundant velocity coordinates \(\varvec{z}_\mathrm{{r}}\). Besides, in the kinetic Eq. (5), \(\varvec{M}\), \(\varvec{\gamma }\) , and \(\varvec{f}\) represent the global mass matrix, the vector of generalized local accelerations, and the vector of generalized applied forces, respectively. In this work, the solver ode15s is utilized to solve the Eqs. (4),(5) of motion in MATLAB.

2.2 Optimization problem

In the current work, the compliance minimization problem of flexible bodies in multibody systems is considered. The optimization problem can be defined as

$$\begin{aligned}&\underset{{\varvec{x}\in {\mathbb {R}}^{n}}}{\textrm{minimize}}\,\,\,\, \psi (\varvec{x}) \end{aligned}$$
(6a)
$$\begin{aligned}&\text {subject to} {\left\{ \begin{array}{ll} \text {equations}\,(4)\,\text {and}\,(5)\,\text {of motion}\\ h\,{=}\,v-v_{\text {max}}= 0 \end{array}\right. } \end{aligned}$$
(6b)

Thereby, the vector \(\varvec{x}\,{\in }\,{\mathbb {R}}^{n}\) contains the continuous density-like design variables \(x_i\) of the corresponding design elements from the discretized finite element model, \(i\,{=}\,1(1)n\). Each design variable \(x_i\) is connected to the fill volume \(0\le v_i^{\textrm{e}}\le 1\) of the design element i as \(x_{i}=\textrm{max}(v_{i}^{\textrm{e}},\,x_{\textrm{min}})\), where a small lower limit \(0<x_{\textrm{min}}\) is considered to avoid numerical difficulties regarding ill-conditioned finite element system matrices. Here, \(x_{\textrm{min}}\) is set to 0.01.

The objective function \(\psi\) is the integral compliance of a flexible body over the simulation time \([t_0,t_1]\), formulated as

(7)

where \(\varvec{q}\) is the vector of nodal displacements and \(\overline{\varvec{K}}\) the stiffness matrix of the flexible body.

The compliance minimization problem is subject to the Eqs. (4),(5) of motion and the volume constraint \(h\,{=}\,0\), which imposes a limit of \(v_{\textrm{max}}\) to the volume fraction \(v\,{=}\,\frac{1}{n} \sum _{i=1}^{n} { v_{i}^{\textrm{e}}\, }\) of the flexible body. It should be noticed that in a level set-based topology optimization, the volume \(v_{i}^{\textrm{e}}\) of a design element i depends on the level set function \(\phi\), which is defined over the design domain. Hence, in the optimization problem (6), \(\varvec{x}\) can be replaced by \(\phi\). Nevertheless, in this work, the gradient is calculated with respect to the design variables \({x_i}\) and then mapped from elements to nodes such that a nodal update of the level set function can be performed. This procedure is explained in Sect. 2.5.

2.3 Adjoint sensitivity analysis

For an exact gradient calculation of flexible multibody systems, direct and adjoint methods are available, see (Bestle 1994; Bestle and Seybold 1992; Callejo et al. 2019; Dopico et al. 2018, 2015; Held et al. 2017; Nachbagauer et al. 2015; Sonneville and Brüls 2014). The key part of these semi-analytical approaches is variational calculus, which helps to expose both explicit and implicit dependencies of the selected objective function \(\psi\) on the design variables \(\varvec{x}\). In case of optimization problems with a large number of design variables, adjoint methods are normally more efficient. In the current work, an adjoint sensitivity analysis is utilized. Here, a brief introduction of this method is given, see (Held et al. 2017) for a detailed explanation.

The variation of the integral objective function \(\psi\) from Eq. (7) can be written as

$$\begin{aligned} \delta \psi = \int \limits _{t_{0}}^{t_{1}} \!\left( {}^{\textrm{y}}\varvec{T}_1\delta \varvec{y}_{}+ {}^{\textrm{x}}\varvec{T}_1\delta \varvec{x} \right) \textrm{d}t. \end{aligned}$$
(8)

In this variational form, both dependent variations \(\delta \varvec{y}\) of generalized position coordinates \(\varvec{y}\) and independent variations \(\delta \varvec{x}\) of design variables \(\varvec{x}\) are included. The terms \({}^{\textrm{y}}\varvec{T}_1\) and \({}^{\textrm{x}}\varvec{T}_1\) represent the derivatives of the integrand F with respect to \(\varvec{y}\) and \(\varvec{x}\). If all dependent variations over the entire time interval \([t_0,t_1]\) can be eliminated, the remaining coefficients of the independent variations \(\delta \varvec{x}\) provide the desired gradient \(\nabla \psi\), see (Bestle 1994; Bestle and Seybold 1992). For this purpose, in the adjoint sensitivity analysis, additional zero terms are added to the varied objective function \(\delta \psi\) from Eq. (8). These zero terms result from the variation of kinematic and kinetic Eqs. (4),(5) multiplied by a set of time-dependent adjoint variables \(\varvec{\mu }(t),\varvec{\nu }(t)\,{\in }\, {\mathbb {R}}^{f}\) and integrated over the simulation time \([t_0,t_1]\), see Held et al. (2017). The required adjoint variables \(\varvec{\mu }(t),\varvec{\nu }(t)\) for elimination of dependent variations can then be obtained by solving the following adjoint system of ODEs

$$\begin{aligned} \begin{aligned} \dot{\varvec{\mu }}&={}^{\textrm{y}}\varvec{T}_2^{\top }\varvec{\mu }+{}^{\textrm{y}}\varvec{T}_3^{\top }\varvec{\nu }-{}^{\textrm{y}}\varvec{T}_1^{\top },\\ \varvec{M}\dot{\varvec{\nu }}&={}^{\textrm{z}}\varvec{T}_2^{\top }\varvec{\mu }-\dot{\varvec{M}}\varvec{\nu }+{}^{\textrm{z}}\varvec{T}_3^{\top }\varvec{\nu },\\ \varvec{\mu }(t_{1})&=\varvec{0}, \varvec{M}(t_{1})\,\varvec{\nu }(t_{1})=\varvec{0}, \end{aligned} \end{aligned}$$
(9)

which is a final value problem over the time interval \([t_0,t_1]\) with the final conditions \(\varvec{\mu }(t_{1})\,{=}\,\varvec{0}, \,\,\varvec{M}(t_{1})\,\varvec{\nu }(t_{1})\,{=}\,\varvec{0}\). The terms \({}^{\textrm{y}}\varvec{T}_2\), \({}^{\textrm{y}}\varvec{T}_3\) include the derivatives of the kinematic and kinetic Eqs. (4),(5) with respect to the generalized position coordinates \(\varvec{y}\), and \({}^{\textrm{z}}\varvec{T}_2\), \({}^{\textrm{z}}\varvec{T}_3\) their derivatives with respect to the generalized velocity coordinates \(\varvec{z}\). The computation of \({}^{\textrm{y}}\varvec{T}_1\), \({}^{\textrm{y}}\varvec{T}_2\), \({}^{\textrm{y}}\varvec{T}_3\), \({}^{\textrm{z}}\varvec{T}_2\), \({}^{\textrm{z}}\varvec{T}_3\) can, for instance, be performed using symbolic toolbox in matlab.

For the numerical solution of the adjoint system (9), the generalized coordinates \(\varvec{y}\) and \(\varvec{z}\) are required at each time point. These state variables have to be determined by solving the Eqs. (4),(5) of motion in a pre-step. It is worth mentioning that in the current work, both the integration of the Eqs. (4),(5) of motion forward in time and the integration of the adjoint system (9) backward in time are performed using the solver ode15s in MATLAB.

With the obtained adjoint variables, the gradient \(\nabla \psi\) can be computed by an evaluation of the following integral function

$$\begin{aligned} \nabla \psi = \int \limits _{t_0}^{t_1} \! \left( {}^{\textrm{x}}\varvec{T}_{1} -\varvec{\mu }^{\top }{}^{\textrm{x}}\varvec{T}_{2} -\varvec{\nu }^{\top }{}^{\textrm{x}}\varvec{T}_{3} \right) \textrm{d}t, \end{aligned}$$
(10)

where \({}^{\textrm{x}}\varvec{T}_2\) and \({}^{\textrm{x}}\varvec{T}_3\) represent the derivatives of the kinematic and kinetic Eqs. (4),(5) with respect to the design variables \(\varvec{x}\). The terms \({}^{\textrm{x}}\varvec{T}_1, {}^{\textrm{x}}\varvec{T}_2\) and \({}^{\textrm{x}}\varvec{T}_3\) are prepared before evaluating Eq. (10). More details about the main numerical steps of the presented adjoint sensitivity analysis and the corresponding computational efforts are given in Sect. 5.1.

In the end, it should also be noticed that in the implemented level set-based topology optimization, the negative of the gradient \(\nabla \psi\) is used to update the level set function \(\phi\). For this reason, the notion negative gradient is introduced as \({\widetilde{\nabla }}\psi \,{:}{=}\,-\nabla \psi\) and utilized in the following.

2.4 Application example

To demonstrate the functionality and capabilities of the methods presented in the current work, a planar flexible slider-crank mechanism is considered as application example, see Fig. 3, which is a well-known representative for the general class of flexible multibody systems with kinematic loops, see also Held et al. (2017, 2016); Moghadasi et al. (2018); Sun et al. (2017); Tromme et al. (2015). This mechanism consists of a rigid crank with an effective length of \(10 \hbox {cm}\), a flexible piston rod with dimensions \((40\,{\times }\,4\,{\times }\,1)\,\hbox {cm}\) and a density of \(\rho _{0}= 8750 \hbox {kg/m}^{3}\), as well as a piston with a weight of \(m= 0.1\hbox {kg}\).

The flexible piston rod is discretized by \(200\,{\times }\,20\) planar bilinear elements. To ensure an appropriate load transfer around the connections, the interface elements of the flexible piston rod are assumed as rigid, and its design domain consists of \(198\times 20\) inner elements with a reference Young’s modulus of \(E_{0}=50 \hbox {GPa}\) and a Poisson’s ratio of \(\nu =0.3{}\). For a model order reduction of the flexible piston rod, 12 elastic coordinates are used, \(\varvec{q}_{\textrm{e}}\,{\in }\,{\mathbb {R}}^{12}\). The body deformations are modeled as the multiplication of elastic coordinates \(\varvec{q}_{\textrm{e}}\) and the matrix \(\varvec{\varPhi }\) of global displacement shape functions. In this example, no rotation shape functions \(\varvec{\varPsi }\) are necessary.

Fig. 3
figure 3

Flexible slider-crank mechanism

In the transient analysis, the system motion of the flexible slider-crank mechanism is considered within a time period of \(T\,{=}\,2\hbox {s}\). Thereby, the rigid crank starts at \(t_{0}\,{=}\,0\hbox {s}\) from the rest position with the angle \(\varphi (0)= 0\hbox {rad}\), the angular velocity \({\dot{\varphi }}(0)=0\hbox {rad/s}\), and is continuously accelerated with a prescribed acceleration \(\ddot{\varphi }(t)\) until it reaches the angular position \(\varphi (2)=12\pi \hbox {rad}\) and the angular velocity \({\dot{\varphi }}(2)=12\pi \hbox {rad/s}\) at \(t_{1}=2\hbox {s}\). In Fig. 4, \(\varphi (t)\), \({\dot{\varphi }}(t)\) , and \(\ddot{\varphi }(t)\) are shown. It is worth mentioning that the slider-crank mechanism is assumed to move horizontally. Hence, the gravity is not involved. Moreover, the inertia moment of the rigid crank has no influence on the dynamic behavior of the modeled system, and thus, it is not specified.

It should also be noticed that all implementations included in this work are carried out using matlab, and the corresponding calculations are performed on a personal computer equipped with a 3.80 GHz Intel® Xeon® E3 - 1270 v6 processor and 64 GB RAM.

Fig. 4
figure 4

Crank motion

Fig. 5
figure 5

Flexible piston rod with a completely filled design domain

As a first example for the adjoint sensitivity analysis from Sect. 2.3, the negative gradient \({\widetilde{\nabla }}\psi\) of the completely filled flexible piston rod, see Fig. 5, is calculated and shown in Fig. 6 over the design domain. Thereby, each node i on the surface plot corresponds to the gradient value \({\widetilde{\nabla }}\psi _i\) with respect to the i-th design variable.

The larger the negative gradient \({\widetilde{\nabla }}\psi _i\), the greater is the role of element i in compliance minimization. The elements around the middle of longitudinal edges have the largest negative gradients. These elements are necessary to dispose of a huge bending of the flexible piston rod. In contrast, the smaller the negative gradient \({\widetilde{\nabla }}\psi _i\), the lower is the contribution of element i to the compliance minimization. For instance, the elements in the middle of the piston rod do not significantly contribute to the structural stiffness. They rather cause bending due to their inertia. These elements possess the lowest negative gradients.

To obtain the presented negative gradient \({\widetilde{\nabla }}\psi\) from Fig. 6, the underlying finite element model of the flexible piston rod is here parametrized using a SIMP law proposed by Du and Olhoff (2005, 2007). More details about the parametrization laws are given in Sect. 3.

Fig. 6
figure 6

Negative gradient \({\widetilde{\nabla }}\psi\) of flexible piston rod

2.5 Modified level set method

In this work, a modified level set method is utilized, which is mainly adopted from the work proposed by Wei et al. (2018), and further developed in Azari Nejat et al. (2022) for the topology optimization of sparsely filled and slender structures. In the following, first the basics of this method are briefly described. After that, the practical formulation of the normal velocity \(V_{\textrm{n}}\) for an appropriate development of the design during the optimization process and the update of the Lagrange multiplier \(\lambda\) associated with the volume constraint h from Eq. (6b) are addressed. In the end, an algorithmic representation of the optimization process is given.

2.5.1 Basics of the method

In a level set-based topology optimization, a level set function \(\phi\) is defined over the design domain D. Depending on the level set function value at each arbitrary point of the design domain with the position vector \(\varvec{r}\), this point can then be assigned to the interior (\(\phi (\varvec{r})\,{>}\,0\)), exterior (\(\phi (\varvec{r})\,{<}\,0\)) or free boundaries (\(\phi (\varvec{r})\,{=}\,0\)) of the structural design. In Fig. 7, this implicit representation is depicted by a 2D example, where the level set function \(\phi\) is defined over a rectangular design domain D and creates due to its negative value in the middle region, a design with a central elliptical hole.

Fig. 7
figure 7

Definition (a) of a level set function \(\phi\) over the design domain D and the resulting design (b)

For the discretization of the level set function \(\phi\) in space, a typical sampling on a fixed Cartesian grid is considered. The nodal level set function variables

\(\{{\phi }_1,\,\dots ,{\phi }_m\}\) at the m grid nodes with position vectors \(\{\varvec{r}_1,\,\dots ,\varvec{r}_m\}\) are then evolved in the optimization process, see also (Wang et al. 2003). In other words, the update of the continuous level set function \(\phi\) is replaced by an update of the discretized level set function \(\varvec{\phi }=[\phi _1,\,\dots ,\phi _m]^{\top }\). In the modified level set method, \(\varvec{\phi }\) is updated by a forward Euler scheme as

$$\begin{aligned} \varvec{\phi }({\tilde{t}}_{k+1})={\varvec{\phi }}({\tilde{t}}_{k})+\varDelta {\tilde{t}}\, \hat{\varvec{B}}({\tilde{t}}_k), \end{aligned}$$
(11)

where \({\tilde{t}}_{k}\) is the k-th pseudo-time point, \({\tilde{t}}_{k+1}\) is the subsequent one, and \(\varDelta {\tilde{t}}\) is the corresponding pseudo-time step size. Moreover, \(\hat{\varvec{B}}\) is the augmented velocity vector, which is defined as

$$\begin{aligned}&\hat{\varvec{B}}({\tilde{t}}_k)= \nonumber \\&[V_{\textrm{n}}(\varvec{r}_1,{\tilde{t}}_k)\cdot {\hat{\delta }}(\phi (\varvec{r}_1,{\tilde{t}}_k)),\, \dots , V_{\textrm{n}}(\varvec{r}_m,{\tilde{t}}_k)\cdot {\hat{\delta }}(\phi (\varvec{r}_m,{\tilde{t}}_k))]^{\top }. \end{aligned}$$
(12)

In this formulation, the normal velocity \(V_{\textrm{n}}\) at each node is multiplied by a distribution function \({\hat{\delta }}\). Depending on the value of \(\phi\), this term gives a smoothing factor between 1, for \(\phi \,{=}\,0\), and 0, for large level set function values such as \(|\phi |\,{\ge }\,10\), see (Wang et al. 2003; Wei et al. 2018) for details. The modification of the normal velocity by the distribution function \({\hat{\delta }}\) hinders, among others, a limitless growth of the level set function \(\phi\) in areas with a high value of normal velocity \(V_{\textrm{n}}\) and, thus, helps to avoid the corresponding convergence issues.

It should be remarked that the update scheme (11) generally describes a steepest descent method with \(\varDelta {\tilde{t}}\) as the step size and \(\varDelta {\tilde{t}}\, \hat{\varvec{B}}\) as the movement towards a close-to-optimal design.

To maintain the regularity of the discretized level set function \(\varvec{\phi }\) in the optimization process, an approximate reinitialization procedure is used, see (Wei et al. 2018). Thereby, the discretized level set function \(\varvec{\phi }\) is divided by the average of the spatial derivative values at selected nodes around the zero-level set. In this way, the spatial derivative value around the zero-level set is kept close to 1. This manipulation is useful and sufficient to retain the regularity of the level set function around the free boundaries. The approximate reinitialization can be considered either after each update or periodically. Here, the reinitialization is performed every 10-th iteration.

The utilized update scheme allows a hole creation in the interior of the design and, thus, is appropriate for a topology optimization. Besides, this scheme alleviates the stability limits included in conventional level set methods, which are, for instance, addressed in Luo et al. (2007); van Dijk et al. (2013). Nevertheless, to avoid issues such as oscillations and loss of the load path, additional adaptations are added to the presented update scheme. These algorithmic steps are adopted from Azari Nejat et al. (2022) and briefly illustrated in Sect. 2.5.4.

2.5.2 Formulation of normal velocity \(V_{\textrm{n}}\)

In this work, the fixed uniform Cartesian grid of the level set function coincides with the underlying FE-mesh, see also (Wei et al. 2018, 2021). Unlike a density-based topology optimization with element-wise design updates, here the nodal variables \(\{\phi _1,\,\dots ,\phi _m\}\) of the discretized level set function \(\varvec{\phi }\) are updated in the optimization process. Hence, the normal velocity \(V_{\textrm{n}}\) is required on each node \(j\,{=}\,1(1)m\) with the position vector \(\varvec{r}_j\). Consequently, the negative gradient \({\widetilde{\nabla }}\psi\) should be mapped from elements to the nodes. Moreover, to keep the optimization process independent of absolute gradient values, the mapped gradient is here shifted and scaled. The adapted negative gradient \({\widehat{\nabla }}\psi _j^{\textrm{ad}}\) of each node j is constructed as

(13)

Thereby, \({\widehat{\nabla }}\psi _j\) is the average negative gradient of \(n_{\textrm{su}}\) surrounding elements of the j-th node. This type of gradient map** from elements to nodes has a filtering and smoothing effect, and helps to avoid checkerboard instabilities. However, this smoothing effect decreases with mesh refinement and is not meant to ensure the mesh-independency of optimization results (Sigmund and Maute 2013).

The term \({\widehat{\nabla }}\psi _j\) is shifted by the minimum \({\widehat{\nabla }}\psi _{\textrm{min},0}\) of average negative gradients of the initial design. The result is then divided by the difference between the maximum \({\widehat{\nabla }}\psi _{\textrm{max},0}\) and minimum \({\widehat{\nabla }}\psi _{\textrm{min},0}\) of average negative gradients of the initial design and multiplied by a scaling factor d. Here, \(d\,{=}\,10\) is chosen. In literature, also other types of gradient scaling, for instance, by the median or average of gradient values are addressed, see (Wei et al. 2018). Depending on the studied examples, the selected gradient scaling can influence the stability and convergence speed of the optimization process. Hence, the scaling strategy should be chosen carefully.

In each pseudo-time point \({\tilde{t}}_k\), the normal velocity \(V_{\textrm{n}}(\varvec{r}_j,{\tilde{t}}_k)\) of each node j is then formulated by the adapted negative gradient \({\widehat{\nabla }}\psi _j^{\textrm{ad}}\) and the current value \(\lambda _{k}\) of the Lagrange multiplier as

$$\begin{aligned} V_{\textrm{n}}(\varvec{r}_j,{\tilde{t}}_{k})= {\widehat{\nabla }}\psi _{j}^{\textrm{ad}} -\lambda _{k}\!\, \, .\!\! \end{aligned}$$
(14)

In this formulation, an appropriate selection of the Lagrange multiplier \(\lambda\) is of great importance. It has a decisive influence on the satisfaction of the volume constraint, the numerical stability, and convergence speed. In literature, the bi-sectioning algorithm (Sigmund 2001; Wang et al. 2007; Wang and Wang 2006b) and the augmented Lagrangian method (Belytschko et al. 2003; Luo et al. 2008; Wei et al. 2018; Wei and Wang 2006) are mostly used to update the Lagrange multiplier \(\lambda\). Unlike bi-sectioning algorithm, in the augmented Lagrangian method, no abrupt correction of the volume fraction is considered, and the constraint violation is decreased gradually. Therefore, in the current work, an augmented Lagrange update scheme is utilized, which is described in the following.

2.5.3 Augmented Lagrange update scheme

Using augmented Lagrange update schemes developed for static optimization problems within the topology optimization of flexible multibody systems, numerical oscillations arise and the convergence is disturbed, see also (Sun et al. 2017). This issue is, among others, due to the design dependency of dynamic loads in flexible multibody systems. For this reason, here the Lagrange update scheme proposed by Wei et al. (2018) is taken and adapted such that the mentioned convergence issues can be avoided.

The utilized update scheme consists of three stages: an early stage up to a selected number \(n_{\textrm{E}}\) of iterations, a middle stage after that, and in the end a final stage as soon as the current volume fraction \(v_k\) drops for first time under a certain limit \(v_{\textrm{c}}=v_{\mathrm {\max }}+\tau\) greater but close to the volume limit \(v_{\textrm{max}}\). Thereby, \(\tau\) is a prescribed tolerance. For the k-th pseudo-time point, it follows

$$\begin{aligned} \lambda _{k}= {\left\{ \begin{array}{ll} \dfrac{k}{n_{\textrm{E}}}\,\,\mu _{k} \quad \text {early stage}\\ \mu _{k}+\gamma _{k}(v_k-v_{\textrm{max}})\quad \text {middle stage}\\ \lambda _{k-1}+\gamma _{k}(v_k-v_{\textrm{max}})\quad \text {final stage} \end{array}\right. }. \end{aligned}$$
(15)

In the early and middle stage, \(\mu _k\) is selected equal to that adapted negative gradient \({\widehat{\nabla }}\psi _j^{\textrm{ad}}\), which is greater than \((1-v_{\textrm{max}})\cdot 100\%\) of all gradient values. This choice is based on the fact that, sooner or later, around \((1-v_{\textrm{max}})\cdot 100\%\) of all nodes should be assigned with a normal velocity \(V_{\textrm{n}}\) less than 0, such that in the end, a design with the volume fraction \(v=v_{\mathrm {\max }}\) results. Moreover, the process parameter \(\gamma\) required in the middle and final stage is updated as

$$\begin{aligned} \gamma _{k}= \textrm{min}(\gamma _{k-1}+\varDelta \gamma ,\gamma _{\textrm{max}}), \text {with}\,\, k> n_{\textrm{E}}\,, \end{aligned}$$
(16)

where \(\gamma _{{n_{\textrm{E}}}}\), \(\varDelta \gamma\) , and \(\gamma _{\textrm{max}}\) are given process parameters.

Using the Lagrange update scheme (15) and (16), the optimization can start with an initial volume fraction \(v_{0}\) far away from the prescribed volume limit \(v_{\textrm{max}}\). The designs in the early stage are developed under a widely relaxed volume constraint. Subsequently, in the middle stage, designs are more strongly moved into the direction of smaller constraint violations. In the final stage, further small volume changes are made such that v gradually converges to \(v_{\textrm{max}}\).

It is worth mentioning that the main difference between the current augmented Lagrange update scheme and the standard ones lies in the additional early and middle stage in Eq. (15). These stages make a meaningful reduction of large volume constraint violations in case of dynamic examples with design-dependent loads possible and help to avoid undesired oscillations of the volume fraction v in the corresponding optimization processes.

2.5.4 Optimization process

The algorithmic representation of the implemented optimization process can be seen in Fig. 8. In this optimization algorithm, first the initial vector \(\varvec{\phi }_{0}\) of the discretized level set function is defined, which captures the initial design. Based on that, the initial multibody simulation and sensitivity analysis are performed. Subsequently, the optimization loop starts with the update of the Lagrange multiplier \(\lambda\). Using \({\widetilde{\nabla }}\psi\) and \(\lambda\), the normal velocity \(V_{\textrm{n}}\) is constructed. In the next step, the discretized level set function \(\varvec{\phi }\) is developed by the update scheme (11). For the resulting design, it is checked whether the load path is lost. In this case, it is reconstructed by an adaptation of Lagrange multiplier \(\lambda\) (adaptation I), see (Azari Nejat et al. 2022) for details.

If the load path is available, the corresponding design is then passed to the multibody simulation and sensitivity analysis. After that, to avoid a large increase of the compliance \(\psi\) from one step to another, and to relax contaminating oscillations, a pseudo-time step size control based on the compliance history is considered (adaptation II), see again (Azari Nejat et al. 2022) for details. After all, the iteration number k is increased by 1 and the optimization loop is repeated until a prescribed iteration number \(n_{\textrm{I}}\) is reached. The simple stop** criterion utilized in this work allows to observe the optimization histories and potential stability issues in a desired number of iterations. Nevertheless, in practical terms, it is meaningful to use an improved stop** criterion, which terminates the optimization process based on the history of compliance and volume fraction changes, see, for instance (Wei et al. 2018).

To perform an appropriate level set-based topology optimization by the presented algorithm, the introduced process parameters can, for instance, be set as \(\varDelta {\tilde{t}}\,{=}\,1\), \(n_{\textrm{E}}\,{=}\,10\), \(\gamma _{{n_{\textrm{E}}}}=0.2\), \(\varDelta \gamma =0.2\), \(\gamma _{\textrm{max}}=10\) , and \(\tau \,{=}\,0.02\). Nevertheless, this set of selected values is only a suggestion, and to tune the optimization properties, such as the convergence behavior, the interested readers shall change the process parameters as desired.

Fig. 8
figure 8

Flow diagram of the optimization process

3 Parametrization laws and their influence on the gradient

In topology optimization, the design domain D is typically discretized by a finite element model. Thereby, the parametrization of the material properties of the finite elements is a crucial task, which has a significant influence on the quality of the model order reduction, and thus, on the calculated gradient and corresponding optimization results. Different parametrization laws have been developed and used for structural and topology optimization of eigenvalue, vibration, and transient problems, see, for instance (Allaire and Jouve 2005; Du and Olhoff 2007; Held et al. 2016; Olhoff and Du 2005; Pedersen 2000).

To show the influence of the parametrization on the gradient of the studied transient slider-crank mechanism from Fig. 3, in the following, two approaches, namely a linear parametrization, as well as the solid isotropic material with penalization (SIMP) law proposed by Olhoff and Du (2005) are considered. These methods are utilized to parametrize the underlying finite element model of an example for the flexible piston rod with a central elliptical hole, see Fig. 9. For this example, the numerical artifacts included in the calculated gradients are demonstrated. A strategy is then proposed, which helps to avoid issues regarding the applied SIMP parametrization. This strategy provides an adapted gradient, which can be used within a level set-based optimization process.

Following the level set-based structural optimization, the density \(\rho _{i}\) and Young’s modulus \(E_{i}\) of each design element i can be linearly penalized by the corresponding design variable \(x_{i}\) as

$$\begin{aligned} \rho _{i}={x_{i}}\rho _{0},\,\, E_{i}={x_{i}}E_{0},\,\, \text {with}\,\,\,\, 0<x_{\textrm{min}}\le x_{i}\le 1. \end{aligned}$$
(17)

Thereby, \(\rho _{0}\) is the density and \(E_{0}\) is the Young’s modulus of the chosen reference material. As mentioned before, to avoid ill-conditioned finite element system matrices, a lower limit \(x_{\textrm{min}}=0.01\) is introduced for all design variables \(x_{i}\). For completely filled elements, it holds \(x_{i}\,{=}\,1\). Due to the high ratio of element density \(\rho _i\) to the Young’s modulus \(E_{i}\) in this parametrization, the low density areas with \(x_{\textrm{min}}\leq x_{i}<0.1\) affect the model order reduction of the corresponding finite element model and lead to spurious modes, see also (Allaire and Jouve 2005; Pedersen 2000).

To indicate the influence of spurious modes on the gradient calculation, the gradient of the flexible piston rod from Fig. 9 is computed. Thereby, the underlying FE model is parametrized by the linear approach (17). In Fig. 10a, the negative gradient \({\widetilde{\nabla }}\psi\) over the design domain is shown. It turns out that the elements with \(x_i=x_{\textrm{min}}\), which form the hole in the middle of the design domain, are assigned with much higher negative gradient values than the filled elements. This is due to the spurious modes and physically not meaningful. This negative gradient is not appropriate for a level set-based topology optimization. Hence, an adapted parametrization concept is required to dispose of mentioned spurious modes and their undesired impact on the gradient.

Fig. 9
figure 9

Design of the flexible piston rod with a central hole

In Held et al. (2016), the influence of different SIMP laws on the eigenmodes of a test structure is studied. The analyses unveil that the adapted SIMP approach by Du and Olhoff (2005, 2007), defined as

$$\begin{aligned} \rho _{i}&={\left\{ \begin{array}{ll} {x_{i}} \rho _{0}\,\,\,\,\,\,\,\,\,\,\,\text {for}\,\,\,\,\,\, 0.1 \le {x_{i}}\le 1,\\ cx_{i}^{q} \rho _{0} \,\,\,\,\,\,\,\,\text {for}\,\,\,\,\,\, x_{\textrm{min}} \le {x_{i}}< 0.1, \end{array}\right. } \end{aligned}$$
(18a)
$$\begin{aligned} E_{i}&={x_{i}}^{p}E_{0}, \end{aligned}$$
(18b)

is suited to avoid the occurrence of spurious modes in the model order reduction. Thereby, the density of elements with a design variable \(x_i\) between 0.1 and 1 is penalized linearly, whereas the density of poorly filled elements with a material amount between \(x_{\textrm{min}}\,{=}\,0.01\) and 0.1 is penalized by a factor c and the power-law \(x_{i}^{q}\). The power q is typically set to 6, and the factor c is selected such that the density penalization around \(x_i=0.1\) is continuous, here \(c\,{=}\,10^5\) is chosen. Besides, the Young’s modulus \(E_{i}\) is penalized by the power-law \(x_{i}^{p}\), where the power p is typically set to 3, see also (Du and Olhoff 2007) for the set of chosen parameters. In this parametrization approach, the exponentiated penalization of the Young’s modulus helps to develop thin connections and struts with a higher stability. Moreover, choosing \(q\,{=}\,6\) and \(p\,{=}\,3\), in the regions with \({x_{i}}=x_{\textrm{min}}\), the penalization of the density \(\rho _{i}\) compared to the Young’s modulus \(E_{i}\) is clearly stronger. In this way, the mentioned spurious modes can be avoided. It should be noticed that in literature, also other parametrization methods for dynamic problems are available, which can be used instead of the utilized SIMP approach by Du and Olhoff (2005, 2007), see, for instance, the rational approximation of material properties (RAMP) method proposed by Stolpe and Svanberg (2001).

In the fully coupled adjoint sensitivity analysis, the partial derivatives of the density \(\rho _{i}\) and Young’s modulus \(E_{i}\) with respect to the design variables are included. Based on the SIMP parametrization (18), these partial derivatives can be formulated as

$$\begin{aligned} \dfrac{\partial \rho _{i}}{\partial x_{i}}&={\left\{ \begin{array}{ll}\rho _{0}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\text {for}\,\,\,\,\,\, 0.1 \le {x_{i}}\le 1,\\ cqx_{i}^{(q-1)} \rho _{0} \,\,\,\,\,\,\,\,\text {for}\,\,\,\,\,\, x_{\textrm{min}} \le {x_{i}}< 0.1, \end{array}\right. } \end{aligned}$$
(19a)
$$\begin{aligned} \dfrac{\partial E_{i}}{\partial x_{i}}&=p{x_{i}}^{(p-1)}E_{0}. \end{aligned}$$
(19b)

Nevertheless, using approach (18) with the partial derivatives from Eq. (19), the obtained gradient includes some irregularities, which are due to the insignificantly small value of \(\frac{\partial \rho _{i}}{\partial x_i}\) in areas with \(x_{i}=x_{\textrm{min}}\) and its discontinuity at \(x_i=0.1\). To indicate these issues clearly, the FE model of the flexible piston rod from Fig. 9 is parametrized using approach (18) and the adjoint sensitivity analysis is repeated. The corresponding negative gradient \({\widetilde{\nabla }}\psi\) over the design domain is shown in Fig. 10b. Here, using a modified ratio of element density \(\rho _i\) to the Young’s modulus \(E_{i}\) for elements in the hole area with \(x_i=x_{\textrm{min}}\), the spurious modes are avoided, and the negative gradient values of these void elements are insignificantly small and around 0, which is in general meaningful.

Fig. 10
figure 10

Negative gradient \({\widetilde{\nabla }}\psi\) of flexible piston rod using linear parametrization (17), SIMP parametrization (18), and gradient strategy (21)

However, due to the difference between partial derivatives \(\frac{\partial \rho _{i}}{\partial x_i}\) with respect to \(x_{\textrm{min}} \le x_i < 0.1\) and \(0.1 \le x_i \le 1\), a jump of negative gradient values between the solid part of the design and the hole area can be observed. Besides, some huge peaks are included in the negative gradient \({\widetilde{\nabla }}\psi\) from Fig. 10b. These are caused by the discontinuity of the partial derivative \(\frac{\partial \rho _{i}}{\partial x_i}\) at \(x_i\,{=}\,0.1\),

$$\begin{aligned}&\frac{\partial \rho _{i}}{\partial x_i}\Big |_{x_i\,{=}\,0.1}=\rho _0\,,\,\,\text {and} \end{aligned}$$
(20a)
$$\begin{aligned}&\lim _{{}\,\,\,{x_i\rightarrow 0.1^{+}}}\frac{\partial \rho _{i}}{\partial x_i}=\rho _0\,,\,\,\text {whereas} \end{aligned}$$
(20b)
$$\begin{aligned}&\lim _{{}\,\,\,{x_i\rightarrow 0.1^{-}}}\frac{\partial \rho _{i}}{\partial x_i}=cq(0.1)^{(q-1)}\rho _0=6\rho _0\,. \end{aligned}$$
(20c)

Thus, considering the mentioned issues, also the negative gradient from Fig. 10b can not be used within a level set-based optimization process. Therefore, an alternative strategy for gradient calculation is considered, where the finite element model is parametrized as before by the SIMP law (18). However, the adjoint sensitivity analysis is used only for gradient calculation of design variables \(0.1\le {x_{i}}\le 1\). For the design variables \(x_{\textrm{min}}<{x_{i}}<0.1\), the gradient is approximated using radial basis functions such as multiquadratic (MQ) splines. In Sect. 5.2, this approximation method is presented. Moreover, the negative gradients of void elements with \({x_{i}}=x_{\textrm{min}}\) have no physical meaning. These are set to a minimum \({\widetilde{\nabla }}\psi _{\textrm{min}}\), which is selected less than or equal to the minimum of negative gradients of all design variables \(x_{\textrm{min}}<{x_{i}}\le 1\). Hence, the gradient computation can be described by the following three cases

$$\begin{aligned} {\left\{ \begin{array}{ll} \text {case 1:}\,\,\, \text {for}\,\,0.1 \le {x_{i}}\le 1\,\,\,\,\,\,\,\, \\ {}\overset{\sim }{\nabla }\psi \,\,\text {from adjoint sensitivity analysis} \\ \text {case 2:}\,\,\,\text {for}\,\,x_{\textrm{min}}<{x_{i}}<0.1\, \\ {}\overset{\sim }{\nabla }\psi \,\,\text {approximated by radial basis functions} \\ \text {case 3:}\,\,\,\text {for}\,\,{x_{i}}=x_{\textrm{min}} \\ {}\overset{\sim }{\nabla }\psi \,\,\text {is set to the minimum}\,\,\overset{\sim }{\nabla }\psi _{\textrm{min}} \end{array}\right. } . \end{aligned}$$
(21)

Since, in this strategy, the gradient of poorly filled elements with \(x_{\textrm{min}}\le {x_{i}}<0.1\) are not obtained by the adjoint sensitivity analysis, numerical artifacts are less likely to occur. Besides, a higher efficiency can be expected than in the case, where the gradient of all elements should be obtained.

To demonstrate the benefits of gradient strategy (21), this procedure is utilized to obtain the gradient of the flexible piston rod from Fig. 9, whereby the flexible piston rod is as before parametrized using approach (18). The obtained negative gradient \({\widetilde{\nabla }}\psi\) over the design domain is shown in Fig. 10c. Compared to the negative gradient from Fig. 10b, the numerical peaks are avoided, and the void elements are provided with the lowest gradient value \({\widetilde{\nabla }}\psi _{\textrm{min}}\). These changes make the negative gradient \({\widetilde{\nabla }}\psi\) appropriate for a level set-based topology optimization of the flexible piston rod.

4 Level set-based optimization example and validation

Using the presented level set algorithm, a topology optimization of the flexible piston rod is performed (example 1-A). In addition, for comparison purposes, also a standard SIMP optimization is considered, where the method of moving asymptotes (MMA) is applied to perform the topology optimization (example 1-B). A similar comparison of these methods within a static optimization example can be found in Azari Nejat et al. (2022).

It is worth mentioning that in both examples, the underlying FE model of the flexible piston rod is parametrized by the SIMP approach from Eq. (18). In this way, a comparison of results is possible. Nevertheless, as presented in the gradient strategy (21), in the applied level set algorithm, the gradient of elements with a density lower than 0.1 is approximated, whereas in the standard SIMP optimization, this distinction of cases is not included. In each iteration, the gradient with respect to all design variables is calculated by the adjoint sensitivity analysis and directly passed to the MMA algorithm.

In both examples, the volume limit \(v_{\textrm{max}}\) is set to 0.4, and the design is developed within a chosen number \(n_{\textrm{I}}\,{=}\,100\) of optimization iterations. However, if desired, \(v_{\textrm{max}}\) and \(n_{\textrm{I}}\) can be freely changed. The level set-based optimization in example 1-A starts with a simple initial level set function \(\phi =1{\cdot }10^{-3}\) over the entire design domain of the flexible piston rod, which leads to a completely filled initial design with a volume fraction \(v_{0}=1\). It should be noticed that the completely filled initial design for different level set-based optimizations in this work is the most general case without any preconditioning. Though, there are no limitations on the choice of initial designs with a volume fraction less than 1. Moreover, the SIMP optimization in example 1-B starts from a homogeneous grey initial design with the volume fraction \(v_{0}=v_{\textrm{max}}\).

Fig. 11 shows the final designs of the examples 1-A and 1-B including their compliance \(\psi _{\textrm{end}}\), volume fraction \(v_{\textrm{end}}\) , and normalized greyness \({\bar{g}}_{\textrm{end}}\). As it is noticed in Sigmund and Maute (2013), the qualitative comparison of smooth designs represented by zero-level contours with density-based greyscale designs is not meaningful. For this reason, in Fig. 11, the final design of example 1-A is represented both as contour plot of the corresponding level set function, created by the function contourf in matlab, and in addition as density-based greyscale plot. The latter is better comparable to the density-based greyscale plot of the optimization result obtained by the standard SIMP optimization.

The problem definitions and optimization results of the mentioned examples are summarized in Tab. 1. Besides, the corresponding optimization histories are shown in Fig. 12.

Fig. 11
figure 11

Final designs of demonstration examples in Sect. 4

Table 1 Problem definitions and optimization results of demonstration examples in Sect. 4
Fig. 12
figure 12

Optimization histories of demonstration examples in Section 4

The optimization results of both examples are in a good agreement. In both cases, a final design with a compliance \(\psi _\textrm{end}\,{=}\,0.049\,\textrm{Nmm}\) and a volume fraction \(v_{\textrm{end}}\,{=}\,0.400\) is reached. Hence, it can be stated that the presented level set algorithm leads to a design with valid quantitative values. Nevertheless, the final designs of both procedures possess clearly different complexities and greynesses. This can be traced back, among others, to the considerable differences of the optimization algorithms, including process parameters and selected initial designs. The optimization histories in Fig. 12 help to understand some similarities and differences of the optimization processes in examples 1-A and 1-B.

As shown in Fig. 12a, due to the chosen grey initial design in example 1-B, the first designs in the corresponding SIMP optimization possess larger compliance values than the first designs in the level set method. Even so, the optimization process in both examples converges to similar compliance values. Moreover, the development of the volume fraction v in example 1-A is different from example 1-B, see Fig. 12b. In example 1-A, the augmented Lagrangian method is used. This method allows to start with a volume fraction \(v_{0}\,{=}\,1\) far away from the volume limit \(v_{\textrm{max}}\) and drives the optimization process towards \(v_{\textrm{max}}\). On the contrary, the utilized MMA in example 1-B includes a Lagrange multiplier, which keeps the volume fraction v in the whole optimization process less than or equal to the volume limit \(v_{\textrm{max}}\). Nevertheless, despite different implementations of the volume constraint, here both procedures converge to similar volume fractions.

In the studied examples, the compliance and volume fraction of the standard SIMP optimization converge faster than in case of the level set-based optimization. However, a close-to-optimal design with a high greyness is not useful. Hence, also the convergence of the greyness in both optimizations should be compared.

It is known that the greyness in a level set-based topology optimization is limited to elements intersected by the zero-level set, whereas the SIMP method normally leads to a higher number of grey intermediate elements. This difference can be qualitatively seen in the final designs of examples 1-A and 1-B in Fig. 11, which speaks in favor of less grey final design of example 1-A using the level set algorithm. Besides, for a quantitative comparison, the normalized greyness \({\bar{g}}\) can be defined as

$$\begin{aligned} {{\bar{g}}=\dfrac{1}{n}\sum _{i=1}^{n}{4\,x_{i}(1-x_{i})}.} \end{aligned}$$
(22)

see also (Sigmund 2007). In Fig. 12c, the greyness histories of examples 1-A and 1-B are shown. The convergence of the greyness in the studied SIMP optimization is clearly slower than in the level set-based optimization. In example 1-A, the greyness is in the beginning equal to 0, increases slightly with the creation of new boundaries, and reaches a final value \({\bar{g}}_{\textrm{end}}\,{=}\,0.12\) in the end of the optimization process. On the other hand, in example 1-B, the SIMP optimization starts with a high greyness close to 1. The greyness decreases during the optimization process and reaches a final value \({\bar{g}}_{\textrm{end}}\,{=}\,0.21\) in the end, which is about 75% higher than the greyness of the final design obtained with the level set algorithm.

The mentioned comparisons with the well-known SIMP optimization show that the proposed level set algorithm provides valid optimization results for the compliance minimization problem of the studied flexible piston rod. Moreover, the possible efficiency gain using the presented level set algorithm is discussed in Sect. 5.

5 Computational effort and reduction of design space

Compared to weakly coupled topology optimization of flexible multibody systems (Kang et al. 2005), fully coupled topology optimization is computationally more expensive due to the tremendous effort in the adjoint sensitivity analysis, see (Moghadasi et al. 2018; Tromme et al. 2018). Hence, one way to improve the numerical efficiency of fully coupled optimization problems is to reduce the number of design variables, which is typically large in topology optimization.

In this section, the main steps of the adjoint sensitivity analysis are briefly reviewed, and the computational effort of the time-consuming steps is shown by test examples. A gradient approximation is presented based on radial basis functions and applied for the gradient calculation of the flexible piston rod. Thereby, different patterns for design space reduction are introduced and compared. In the end, optimization examples are included, which show the efficiency gain and the validity of the obtained results.

5.1 Main steps of the adjoint sensitivity analysis

The adjoint sensitivity analysis in the current work consists of a number of computational steps, which are illustrated in Fig. 13 and described in detail in Held et al. (2017). For a given flexible multibody system, the FE models of the flexible bodies are prepared in a preprocessing step. Then, the corresponding shape functions \(\varvec{\varPhi }_\ell\) with \(\ell \,{=}\,1(1)n_{\scriptscriptstyle {\textrm{e}}}\) are obtained by modal truncation. In the next step, a number \(n_{\scriptscriptstyle {\textrm{SID}}}\) of system matrices \(\varvec{V}_a\) with \(a\,{=}\,1(1)n_{\scriptscriptstyle {\textrm{SID}}}\), the so-called standard input data (SID), see Wallrapp (1993), are computed, which contain all necessary information on the flexible body for the multibody simulation. The SID are object-oriented and structured such that the system equations can be evaluated with high efficiency, see (Schwertassek and Wallrapp 1999). Solving the Eqs. (4), (5) of motion forward in time, the generalized coordinates \(\varvec{y}\) and \(\varvec{z}\) are determined. Using the resulting elastic coordinates \(\varvec{q}_{\textrm{e}}\), the integral compliance \(\psi\) of the flexible bodies is then evaluated.

To efficiently calculate the derivatives \(\textrm{d}_i\varvec{\varPhi }_\ell\) of the shape functions \(\varvec{\varPhi }_\ell\) with respect to the design variables \(x_i\), Nelson’s method (Nelson 1976) is used. After that, the derivatives \(\textrm{d}_i\varvec{V}_a\) of the SID with respect to \(x_i\) can be determined and gathered in the so-called augmented standard input data (ASID) as suggested in Held (2022), which are later required for the evaluation of the gradient Eq. (10). In the next step, the adjoint variables are obtained by solving the adjoint system (9) backward in time. Finally, the sought negative gradient \({\widetilde{\nabla }}\psi\) can be determined by evaluating the gradient Eq. (10) using the previously determined generalized coordinates \(\varvec{y}\) and \(\varvec{z}\), the adjoint variables \(\varvec{\mu }\) and \(\varvec{\nu }\), as well as the derivatives \(\textrm{d}_i\varvec{\varPhi }_\ell\) and ASID.

Fig. 13
figure 13

Flow diagram of the adjoint sensitivity analysis

To indicate the connection between the number n of design variables and the computational effort of the utilized adjoint sensitivity analysis, the sensitivity analysis of the completely filled flexible piston rod shown in Fig. 5 with different FE-discretizations ranging from \(10\,{\times }\,100\) to \(38\,{\times }\,380\) is performed. In Fig. 14, the computation times \(t_{\textrm{c}}\) of the program steps with a significant computational effort are displayed over the number n of design variables \(x_i\).

Fig. 14
figure 14

Computation time of different program steps

Using modal truncation for the model order reduction, the computational effort of the multibody simulation (forward integration) and the solution of the adjoint system (backward integration) are independent of the number \(n_{\mathrm {}}\) of design variables, see Fig. 14a. The computation times of these steps scale with the number \(n_{\textrm{e}}\) of selected elastic coordinates \(\varvec{q}_{\textrm{e}}\). Here, 12 elastic coordinates are used, see also the computation times of the adjoint sensitivity analyses with different numbers \(n_{\textrm{e}}\) of elastic coordinates included in Azari Nejat et al. (2020).

On the contrary, the computation times for the calculation of the derivatives of the global shape functions, the ASID, and for the evaluation of the gradient Eq. (10) rise with an increased number of design variables as shown in Fig. 14b. While the computation times for the derivatives of the global shape functions and the ASID increase exponentially, the effort to evaluate the gradient Eq. (10) rises linearly, compare also (Moghadasi 2019).

5.2 Gradient approximation using radial basis functions

To increase the efficiency of the presented gradient calculation, a design space reduction is of great interest. Here, the aim is to reduce the number of design variables independently of the underlying FE-mesh. To this end, the n design variables \(\varvec{x}\) of elements in design domain D are subdivided into two subsets, namely \({\hat{S}}=\{{\hat{x}}_1,\,\dots ,\,{\hat{x}}_{{\hat{n}}}\}\) and \({\check{S}}=\{{\check{x}}_1,\,\dots ,\,{\check{x}}_{{\check{n}}}\}\), where \(n\,{=}\,{\hat{n}}+{\check{n}}\). The adjoint sensitivity analysis is then performed to obtain the exact value of the negative gradient \({\widetilde{\nabla }}\psi\) only for the \({\hat{n}}\) design variables included in subset \({\hat{S}}\). Based on the obtained gradient values, the negative gradient \({\widetilde{\nabla }}\psi\) with respect to remaining \({\check{n}}\) design variables included in subset \({\check{S}}\) is then approximated. For this purpose, radial basis functions (RBFs) are utilized. In the following, this method is briefly described, see (Wang and Wang 2006a; Wang and Kang 2018; Wei et al. 2018) for more details.

Radial basis functions are radially symmetric functions positioned at desired points in the space, which can be used for a scattered data interpolation (Morse et al. 2001). In literature, radial basis functions are, among others, applied to reconstruct smooth, manifold surfaces from scattered surface points, and to fill incomplete meshes (Carr et al. 2001). The unique solvability of the interpolation problem, as well as the smoothness and convergence of interpolants, are some of interesting properties of a RBF-based interpolation (Wang and Wang 2006a). There exist various types of radial basis functions, e.g., thin-plate spline, exponential spline, multiquadratic (MQ) spline, as well as Gaussian and compactly supported radial basis functions, see also (Wang and Wang 2006a). In the current work, the well-established multiquadratic spline is used for the gradient approximation.

At an arbitrary point of the 2D design domain D with the position vector \(\varvec{r}\,{=}\,[r_{\textrm{x}},r_{\textrm{y}}]^\top\), the value \(g_0(\varvec{r})\) of a multiquadratic spline positioned at a point with the position vector \(\varvec{r}_0\,{=}\,[{r}_{\textrm{x},0},{r}_{\textrm{y},0}]^\top\) can be calculated as

$$\begin{aligned} g_0(\varvec{r})=\sqrt{||\varvec{r}-\varvec{r}_0||^2+\epsilon ^2}. \end{aligned}$$
(23)

Thereby, \(||\cdot ||\) is the Euclidean norm and \(\epsilon\) a shape parameter. In Fig. 15, the shape of a multiquadratic spline positioned at \(\varvec{r}_0\,{=}\,[0,0]^\top\) is shown over a 2D design domain, whereby \(\epsilon\) is set to \(10^{-4}\). Increasing \(\epsilon\), flatter shapes result, which theoretically lead to more accurate approximations. However, in practical terms, the gained accuracy of the interpolation by an increase of \(\epsilon\) is limited, see (Cheng et al. 2003).

Fig. 15
figure 15

Shape of a multiquadratic spline with \(\epsilon \,{=}\,10^{-4}\) over a 2D design domain D

In the considered gradient approximation, radial basis functions are placed at the center of design elements linked to subset \({\hat{S}}\), with the position vectors \({\hat{\varvec{r}}}_i\,{=}\,[\hat{{r}}_{\textrm{x},i},\hat{{r}}_{\textrm{y},i}]^\top\), where \(i\,{=}\,1(1){\hat{n}}\). The negative gradient \({\widetilde{\nabla }}\psi (\varvec{r})\) at an arbitrary point with the position vector \(\varvec{r}\,{=}\,[r_{\textrm{x}},r_{\textrm{y}}]^\top\) can then be parametrized as

(24)

Thereby, \(\alpha _{i}\) is the expansion coefficient of the i-th radial basis function and \(g_i(\varvec{{r}})\) the value of the i-th radial basis function at the point with position vector \(\varvec{r}\). Moreover, P is a first-degree polynomial with coefficients \(p_0,\) \(p_1\) and \(p_2\), which accounts for the constant and linear parts of \({\widetilde{\nabla }}\psi\) and guarantees the positive-definiteness of the solution; nevertheless, P is not necessary for all types of radial basis functions (Morse et al. 2001).

To guarantee the unique solution of the RBF-based interpolation, the following orthogonality or side conditions are imposed upon the expansion coefficients,

$$\begin{aligned} \sum \limits _{{i=1}}^{{\hat{n}}}\! \alpha _{i}=0,\,\,\,\,\,\,\sum \limits _{{i=1}}^{{\hat{n}}}\! \alpha _{i}{\hat{r}}_{\textrm{x},i}=0,\,\,\,\,\,\,\sum \limits _{{i=1}}^{{\hat{n}}}\! \alpha _{i}{\hat{r}}_{\textrm{y},i}=0, \end{aligned}$$
(25)

see (Carr et al. 2001; Morse et al. 2001). Considering Eq. (24) at the center of elements linked to the subset \({\hat{S}}\) and the side conditions (25), a system of \({\hat{n}}\,{+}\,3\) linear equations follows, which can be written in matrix formulation as

$$\begin{aligned} \varvec{G}\varvec{\alpha }=\varvec{d}\,. \end{aligned}$$
(26)

Thereby, \(\varvec{\alpha }\,{=}\,[\alpha _1\,\,\,\dots \,\,\,\alpha _{{\hat{n}}}\,\,\,p_{0}\,\,\,p_{1}\,\,\,p_{2}]^{\top }\) is the vector of generalized expansion coefficients and \(\varvec{G}\) is the collocation matrix gathered as

$$\begin{aligned}&\varvec{G}= \left[ \begin{array}{ll} \varvec{A} &{}\, \varvec{P} \\ \varvec{P}^{\top } &{}\,\, \varvec{0} \\ \end{array}\right] , \,\text {where}\,\, \varvec{A}= \left[ \begin{array}{ccc} g_{1}(\hat{\varvec{r}}_1) &{}\,\, \cdots &{}\,\, g_{{\hat{n}}}(\hat{\varvec{r}}_{1}) \\ \vdots &{}\,\, \ddots &{}\,\, \vdots \\ g_{1}(\hat{\varvec{r}}_{{\hat{n}}}) &{}\,\, \cdots &{}\,\, g_{{\hat{n}}}(\hat{\varvec{r}}_{{\hat{n}}}) \end{array} \right] , \nonumber \\&\text {and}\,\, \varvec{P}= \left[ \begin{array}{ccc} 1 &{}\,\, {\hat{r}}_{\textrm{x},1} &{}\,\, {\hat{r}}_{\textrm{y},1} \\ \vdots &{}\,\, \vdots &{}\,\, \vdots \\ 1 &{}\,\, {\hat{r}}_{\textrm{x},{\hat{n}}} &{}\,\, {\hat{r}}_{\textrm{y},{\hat{n}}} \end{array}\right] . \end{aligned}$$
(27)

Moreover, \(\varvec{d}\,{=}\,[{\widetilde{\nabla }}\psi (\hat{\varvec{r}}_1)\,\,\,\dots \,\,\, {\widetilde{\nabla }}\psi (\hat{\varvec{r}}_{{\hat{n}}})\,\,\,0\,\,\,0\,\,\,0]^{\top }\) is the right-hand-side vector.

As mentioned in (Kansa et al. 2004), the collocation matrix \(\varvec{G}\) is invertible. Solving the system of linear Eqs. (26), the generalized expansion coefficients \(\varvec{\alpha }\) can be obtained. After that, the unknown negative gradient \({\widetilde{\nabla }}\psi\) with respect to design variables from subset \({\check{S}}\) can be approximated by evaluating Eq. (24) at the center of corresponding elements.

Thereby, the accuracy of the approximation depends, among others, on the number \({\hat{n}}\) and position of the design elements, for which the exact value of the negative gradient \({\widetilde{\nabla }}\psi\) is obtained from the adjoint sensitivity analysis. In the following, two different sampling patterns are utilized for the RBF-based gradient approximation.

5.3 Sampling patterns

To indicate the efficiency gain achieved by the described design space reduction, the topology optimization of the flexible piston rod from example  1-A is repeated with two sampling patterns for the RBF-based approximation of the negative gradient \({\widetilde{\nabla }}\psi\). In Fig. 16a, pattern 1 for the distribution of the chosen design elements over the completely filled design domain is shown, where these sample elements are colored blue. Thereby, from the original regular finite element mesh 100 columns, and in each column, 10 elements are selected such that a reduced design space with \({\hat{n}}\,{=}\,1000\) instead of \(n\,{=}\,3960\) design variables results for the sensitivity analysis.

It should be noticed that the chosen elements are not uniformly positioned. Care is only taken that the element distribution is symmetrical with respect to the longitudinal centerline to sustain the symmetry of the evolving design in the optimization process. Besides, the first and last columns of the design elements are completely included in the sampling pattern. In this way, the negative gradient \({\widetilde{\nabla }}\psi\) at the left end and at the right end of the design domain next to the rigid interface elements is obtained with an appropriate accuracy.

In Fig. 16b, pattern 2 for a further element distribution over the completely filled design domain is shown. Thereby 51 columns, and in each column, 6 elements are selected such that a reduced design space with \({\hat{n}}\,=306\,\) elements results. Reducing the number \({\hat{n}}\) of the chosen design elements from 1000 in pattern 1 to 306 in pattern 2, the quality of the gradient approximation decreases. For instance, approximating the negative gradient \({\widetilde{\nabla }}\psi\) over the completely filled design domain by multiquadratic splines with \(\epsilon \,{=}\,10^{-4}\) and gradient values of the sample elements in patterns 1 and 2, the approximation results can be compared with the corresponding exact values from Fig. 6.

In Fig. 17, a histogram of the absolute errors for the gradient approximation using pattern 1 and 2 over the completely filled design domain is given. It can be seen that the absolute errors using pattern 2 are larger and distributed in a wider range than for pattern 1. As mentioned before, larger shape parameters \(\epsilon\) can theoretically help to decrease the gradient approximation error. Nevertheless, higher values for \(\epsilon\) can also lead to the loss of stability, see (Cheng et al. 2003). Hence, in the following, only \(\epsilon \,{=}\,10^{-4}\) is considered for both pattern 1 and 2.

Moreover, to develop the free boundaries of the design with an appropriate accuracy, it is decided not to reduce the design elements in the boundary areas with a design variable \(0.1\,{\le }\,x_i<1\). Hence, in principle, the update of the level set function \(\phi\) over the solid areas and, with that, the hole creation are in the following examples based on the presented gradient approximation, whereas the created boundaries are then developed further based on exact gradient values. For instance, in Fig. 16c, the chosen 450 design elements of the flexible piston rod with an elliptical hole in the center are shown, which consist of blue-colored design elements over the solid area as in pattern 2 and, in addition, red-colored elements in boundary areas.

Fig. 16
figure 16

Different distributions of the chosen design elements for exact gradient calculation

Fig. 17
figure 17

Distribution of gradient approximation error using MQ splines with two different patterns and \(\epsilon \,{=}\,10^{-4}\)

5.4 Topology optimization using approximated gradients

In the following, the RBF-based gradient approximation is employed in the topology optimization of the flexible piston rod. In Fig. 18, the optimization result from example 1-A defined in Tab. 1 is shown together with the results using pattern 1 (example 2-A) and pattern 2 (example 2-B) for gradient approximation in the optimization process.

The problem definitions and optimization results of these examples are summarized in Tab. 2. Some differences between the final designs of the examples 2-A, 2-B, and 1-A are visible, such as the shape, thickness, and position of the cross struts. Besides, compared to Fig. 18a, the final design in Fig. 18b possesses more notches. However, these differences are not critical here and, among others, due to the numerical implementation of the optimization process arguable. The more interesting point is that the final compliances \(\psi _{\textrm{end}}\) in examples 2-A and 2-B are in the same quality range as the final compliance of example 1-A. This confirms the validity of the final designs in examples 2-A and 2-B, and with that, the success of gradient approximation using pattern 1 and 2 in the optimization process.

Fig. 18
figure 18

Final designs of demonstration examples 1-A, 2-A and 2-B

Nevertheless, it should be noticed that the gradient approximation is here only tested for the compliance minimization problem of the flexible piston rod. Considering other problem types or different application examples, other approximation accuracies, and thus, sampling patterns might be required. The presented examples 2-A and 2-B are only meant to show the potential of design space reduction using radial basis functions.

In Fig. 19, the computation times \(t_{\textrm{c}}\) of the calculation of global shape function derivatives with respect to the design variables, ASID terms, and the evaluation of the gradient Eq. (10) for the examples 1-A, 1-B, 2-A, and 2-B, as well as the corresponding number \({\hat{n}}\) of considered design variables for the exact gradient calculation are shown over the iteration number k.

Table 2 Problem definitions and optimization results of demonstration examples 1-A, 1-B, 2-A, and 2-B
Fig. 19
figure 19

Computation times of different program steps and the number \({\hat{n}}\) of chosen design variables in examples 1-A, 1-B, 2-A and 2-B

The computation time plots in Fig. 19 are jagged, and some of them include also jumps from one iteration to the next. Though, these fluctuations of computation times are in complex numerical processes not uncommon. Apart from that, the presented time courses scale in general with the number \({\hat{n}}\) of considered design variables in each iteration k. Unlike in the SIMP optimization example 1-B, where in each iteration, the exact gradient is calculated with respect to all design variables, in the level set-based optimization examples 1-A, 2-A, and 2-B, the number \({\hat{n}}\) of considered design variables for the exact gradient calculation decreases, and with that, the computation times of the three mentioned program steps. Hence, in the following, the computation times of example 1-B are taken as reference computation times.

The sum of computation times for the mentioned program steps is listed in Tab. 2. These take in example 1-B 281 min and in example 1-A 144 min, which is an efficiency gain of 49%. Reducing the number of design variables over the solid structure in example 2-A and 2-B, the numerical effort of mentioned program steps is further decreased, and the sum of corresponding computation times drops to 75 min in example 2-A and 50 min in example 2-B. In other words, 73% and 82% less than the sum of mentioned computation times in example 1-B. The presented efficiency gains might be, in particular, in case of large-scale topology optimizations, a worthwhile contribution.

It should be noticed that in Tab. 2, the entire computation times of the optimization process in different examples are listed as well. These include also the computational efforts of other program steps such as multibody simulation and solution of the adjoint sensitivity analysis, which do not depend on the number \({\hat{n}}\) of chosen design variables. Hence, a comparison of entire computation times in different examples does not directly reflect the efficiency gain obtained by the presented design space reduction.

In the end, it can be stated that the results discussed in this section show the success and time savings of gradient approximation using pattern 1 and 2 in the level set-based topology optimization of flexible piston rod. Nevertheless, as mentioned before, to develop the free boundaries with an appropriate accuracy, the exact gradient for all elements in boundary areas with a design variable \(0.1\,{\le }\,x_i<1\) is provided in each iteration k.

In Fig. 20, the ratio \({\hat{n}}\)/n of design elements used for exact gradient calculation in example 2-B is shown over the iteration number k, whereby it is distinguished between the design elements distributed in the solid areas and around the boundaries. Starting the optimization process with a completely filled design domain, no free boundaries exist in the beginning. With the creation of new holes, the number of design elements chosen in the solid areas decreases, since the void elements in the hole areas are excluded. On the contrary, new boundaries increase the number of design elements considered in these areas, and it can be seen that in example 2-B, the majority of selected design elements after \(k=15\) are around the boundaries.

Fig. 20
figure 20

Ratio \({\hat{n}}\)/n of elements used for exact gradient calculation over iteration number k in example 2-B

For sure, also an appropriate reduction of design elements around the boundaries can be considered. It is even possible to replace the topology optimization of the moving boundaries by an efficient shape optimization, see for instance (Tromme et al. 2015), whereas coarse sampling patterns such as pattern 1 and 2 are further used for a hole creation. These ideas are not included here, and require comprehensive investigations in a separate work.

6 Summary and conclusion

In the current work, the fully coupled level set-based topology optimization of flexible bodies in multibody systems modeled with floating frame of reference formulation is addressed. The deformation of the flexible bodies is described by global shape functions, which are obtained from finite element models using model order reduction. The adjoint sensitivity analysis is utilized for an exact gradient calculation, and the optimization is performed using a modified level set method. The presented approach is studied for the compliance minimization of a flexible piston rod within a slider-crank mechanism.

At first, the significant influence of parameterizing the material properties of the finite element model on the calculated gradient is shown. In particular, the numerical issues of the gradient calculation with a linear and traditional SIMP parametrization are discussed and shown for the example of a flexible piston rod. In case of a linear penalization, which is typically used in structural level set-based topology optimization, the high ratio of the element density to stiffness leads to spurious modes in void areas of the design domain and distorts in this way the gradient calculation.

Using the SIMP parametrization method proposed by Olhoff and Du (2005), these artificial modes can be avoided. Nevertheless, due to the inconsistency between negative gradient values of the solid parts and the hole areas of the design in this approach, the resulting gradient can not be directly used within a level set-based optimization process. Hence, a gradient strategy is included, which replaces the gradient of design elements with a low fill volume by a RBF-based gradient approximation.

Using the proposed gradient strategy, a level set-based topology optimization of the flexible piston rod is performed. Besides, to test the quality of the corresponding results, also a standard SIMP optimization of the flexible piston rod is considered, where the optimization is performed by MMA. Despite clear differences in optimization histories and shapes of final designs, in both cases, similar compliance values are reached. This shows the appropriateness of the optimization result obtained by the level set algorithm.

The adjoint sensitivity analysis is a time-consuming process. To lower the computational effort of program parts, which depend on the number of design variables, the RBF-based gradient approximation is considered. This approach allows a design space reduction independently of the underlying FE-mesh. The topology optimization of the flexible piston rod is performed with two different sampling patterns for the gradient approximation. The validity of corresponding results and the efficiency gains confirm the success of the considered design space reduction.