Introduction

Topology optimization aims at finding the optimal structural layout under relevant design specifications. Topology optimization of multi-scale structures, which dates back to the seminal paper by Bendsøe and Kikuchi (1988), has been a topic of great interest in recent years. The rapid development in this field is partially stimulated by the possibility to fabricate complex structures using additive manufacturing. For an overview of topology optimization approaches for designing multi-scale structures, we refer readers to a recent review article by Wu et al. (2021a).

It has been shown that density-based topology optimization for compliance minimization, under local volume constraints, creates porous infill structures similar to those found in bone (Wu et al. 2018). These bone-mimicking porous structures are lightweight, robust regarding material damages and loading variations, and stable with respect to buckling. The local volume constraints work similarly to maximum length scale control (Guest 2009). They prevent the forming of large solid regions and, consequently, create porous structures distributed more evenly over the design domain. This approach has been extended, in conjunction with a coating approach proposed by Clausen et al. (2015), to design concurrently structures and porous sub-structures therein, referred to as shell-infill composites (Wu et al. 2017). It has also been applied to design porous shell structures (Träff et al. 2021). Other notable extensions include the design of porous structures with gradation in the porosity and pore size (Schmidt et al. 2019; Das and Sutradhar 2020), use of multiple materials (Li et al. 2020; Zhao and Zhang 2021), and fiber-reinforced structures (Li et al. 2021). Besides by density-based approaches, porous infill structures have been designed using an evolutionary design approach (Qiu et al. 2020) and machine learning (Cang et al. 2019).

In this paper, we investigate the convergence behavior of density-based topology optimization with local volume constraints under a single load case. In density-based topology optimization, an important convergence criterion is that the optimized density field converges to a binary or so-called black-white design, i.e., the pseudo density is close to 1 or 0. A few hundred iterations or even more are not uncommon to achieve black-white designs (Wu et al. 2017). To improve the convergence rate, a typical solution is to apply a continuation scheme where parameters are updated after a certain number of iterations. However, in some optimization scenarios under local volume constraints, we have observed that certain regions fail to converge to a binary design even after thousands of iterations (see Fig. 1). Interpreting these intermediate density values by applying a threshold results in large solid or void regions, leading to sub-optimal structures.

To analyze the regions where low convergence is observed, we investigate the stress distribution in these regions via trajectory-based visualization (Wang et al. 2020). In particular, we shed light on the relationship between the convergence behavior and the principal stress directions that occurs when simulating on the solid design domain. This approach is inspired by previous work on infill optimization, where uniformly seeded tensor glyphs have confirmed good agreement between the optimized porous infill and the principal stress directions in the solid under load (Wu et al. 2018). In this paper, we exploit advanced mechanisms to perform a topology-based analysis of the stress field, including the use of degenerate points and topological skeletons. At a degenerate point, the principal stress directions cannot be decided, yet a set of hyperbolic and parabolic sectors exist in its surrounding, in which similar patterns of neighboring trajectories are observed (Delmarcelle and Hesselink 1994). The topological skeleton consists of the boundaries between adjacent sectors—so-called separatrices—and indicates pathways along which the forces are steered towards the degenerate points. In topology optimization, degenerate points have been used to indicate locations where integrability conditions are violated and consistent domain parameterizations cannot be computed (Stutz et al. 2020).

When applying topology analysis to the stress tensor field, it reveals that low convergence occurs around a special type of degenerate points, known as trisectors. Notably, such degenerate points do not always appear, but if so, low convergence is often observed in their surrounding. Due to the isotropy of the stress tensor close to a trisector, the principal stress directions and, thus, a locally consistent binary material layout cannot be decided by the optimizer. In our work, we propose an automatic pre-process that supports the optimizer in finding such a layout, resulting in significantly improved convergence rates in settings where trisectors are paramount. In particular, we build upon the efficient computation of degenerate point locations and separatrices, and prescribe an initial density field where elements along the separatrices are solid and all other elements take an intermediate value (i.e., the local volume upper bound). The solid elements along the separatrices can be changed over the course of the optimization to improve the structural performance, yet we observe that the optimization keeps them more or less unchanged and changes element densities in other parts accordingly. In the vicinity of trisectors, the initialization guides the optimizer towards a stable binary design and enables the optimization process to quickly converge towards a sound global layout. Interestingly, even though one might expect that the imposed initialization biases the optimizer towards a less stiff local optimum, the resulting binary designs show the same or even improved compliance compared to the designs generated by the original approach which exhibit unresolved intermediate density values in the presence of trisectors.

The remainder of this paper is organized as follows. In Sect. 2, we first review the problem formulation underlying porous infill optimization. Then, in Sect. 3 we analyse the convergence of porous infill optimization, elaborate on the relationships between optimization convergence and the existence of degenerate points in the stress field, and propose topology-guided density initialization to counteract low optimization convergence. The implementation details of performing the topology analysis to the stress tensor field are discussed in Sect. 4. We demonstrate the effectiveness of our approach in a variety of experiments in Sect. 5. Section 6 concludes the paper with a discussion of the proposed approach as well as future research directions.

Porous infill optimization

The low convergence in some design tasks is observed while using the infill optimization approach (Wu et al. 2018), on which and some of its extensions the effectiveness of our method will be demonstrated. For the sake of completeness, we briefly review the formulation of the density-based infill optimization with local volume constraints.

Local volume constraints

In a discretized design domain, the local volume (\(\bar{\rho }_{{\text{e}}}\)) of a circular region centered at the centroid of an element, \(x_e\), is computed by

$$\begin{aligned} \bar{\rho }_e = \frac{\sum _{i\in N_e}\rho _i}{\sum _{i\in N_e}1}, \quad N_e = \{i| \parallel x_i-x_e \parallel _2 \le R_e \}, \,\, \forall e, \end{aligned}$$
(1)

where \(\rho _i \in [0,1]\) is the pseudo density for the i-th element. \(R_e\) denotes the radius of the region on which the local volume is measured.

An upper bound (\(\alpha _e\), \(0<\alpha _e<1\)) is imposed on the local volume of each element in the design domain, i.e.,

$$\begin{aligned} \bar{\rho }_e \le \alpha _e. \end{aligned}$$
(2)

Thus, the local volume constraint involves two parameters, \(R_e\) and \(\alpha _e\). \(R_e\) indirectly controls the spacing between sub-structures, and \(\alpha _e\) effectively controls the porosity (Wu et al. 2018). In the original approach, both input fields are prescribed to be homogeneous. Recent developments have demonstrated the use of heterogeneous fields to generate gradations of the porosity and pore size of the optimized porous structures (Schmidt et al. 2019; Das and Sutradhar 2020; Zhao and Zhang 2021).

Assigning a local volume constraint to each element results in a large number of constraints that need to be considered by the optimizer. Dividing both sides of Eq. 2 by \(\alpha _e\), these constraints are aggregated by the \(p-\)mean function,

$$\begin{aligned} \left( \frac{1}{n} \sum \limits _e \left( \frac{\bar{\rho }_e}{\alpha _e}\right) ^p \right) ^{\frac{1}{p}} \le 1, \end{aligned}$$
(3)

where n is the number of elements. \(p=16\) is found to give a good approximation, and is used in this paper.

Optimization problem

With the local volume constraint defined, the optimization problem is given by

$$\min \limits _{\varvec{\phi }} \quad c=\frac{1}{2} \varvec{U}^T \varvec{K} \varvec{U},$$
(4)
$$\mathrm {s.t.} \quad \varvec{K} \varvec{U} = \varvec{F},$$
(5)
$$\begin{aligned}&g \left( \varvec{\phi } \right) = \left( \frac{1}{n} \sum \limits _e \left( \frac{\bar{\rho }_e}{\alpha _e}\right) ^p \right) ^{\frac{1}{p}} - 1 \le 0, \end{aligned}$$
(6)
$$\phi _e \in [0.0, \,\, 1.0], \,\, \forall e.$$
(7)

Here the objective is to minimize the compliance, measured by the strain energy c. \(\varvec{K}\) is the stiffness matrix in finite element analysis. \(\varvec{U}\) is the displacement vector, obtained by solving the static elasticity equation (Eq. 5), where \(\varvec{F}\) is the loading vector. \(g \left( \varvec{\phi } \right)\) represents the aggregated local volume constraint.

The formulation takes \(\phi _e\) as the design variable. The pseudo density field (\(\varvec{\rho }\)) is computed from \(\varvec{\phi }\) by a density filter (\(\varvec{\phi } \rightarrow \tilde{\varvec{\phi }}\)), followed by a smoothed Heaviside projection (\(\tilde{\varvec{\phi }} \rightarrow \varvec{\rho }\)). The density filter, with a filter radius \(r_e\) smaller than \(R_e\) (Eq. 1), avoids checkerboard patterns resulting from numerical instabilities. The associated equations of this standard operator are omitted here but can be found in e.g., (Wang et al. 2011; Wu et al. 2018). The purpose of the projection \(\tilde{{\varvec{\phi }}} \rightarrow \varvec{\rho }\) is to promote a 0-1 solution, by thresholding at the value of \(\frac{1}{2}\),

$$\begin{aligned} \rho _e (\tilde{\phi }_e) = \frac{\tanh (\frac{\beta }{2})+\tanh (\beta (\tilde{\phi }_e-\frac{1}{2}))}{2\,\tanh (\frac{\beta }{2})} . \end{aligned}$$
(8)

The smoothed Heaviside function has a parameter, \(\beta\), to control its sharpness. For improving convergence behaviour, a continuation scheme is applied to gradually increase its sharpness, i.e., we start with \(\beta =1\) and double its value every 40 iterations until it reaches 128.

To interpolate the Young’s modulus for intermediate densities, we use the modified SIMP (Solid Isotropic Material with Penalization) model,

$$\begin{aligned} E_e(\rho _e) = E_{min} + \rho _e^\gamma (E_0 - E_{min}), \end{aligned}$$
(9)

where \(E_0\) is the Young’s Modulus of a fully solid element. \(E_{min}\) is a minimum Young’s modulus (\(E_{min}=1.0e^{-6}E_0\) in our test), introduced to avoid the singularity of the global stiffness matrix. \(\gamma\) is the penalization factor, which is typically set to 3. \(E_e(\rho _e)\) is the interpolated Young’s Modulus of the element with density \(\rho _e\).

The commonly used global volume constraint is not included here, but can be added as an additional constraint. An example of incorporating both local and global volume constraints is shown in Fig. 9 in the results section. The average of local volume fractions, i.e., \(\frac{\sum _e \alpha _e}{\sum _e 1}\), gives an estimation of the global volume fraction of the resulting optimized structure. To precisely control the global volume without resorting to an explicit global volume constraint, one may apply a continuation scheme, i.e., adjusting the local volume bound towards the end of optimization. Suppose the intended global volume fraction is \(\alpha _{global}\). The local volume bound can be scaled by \(\alpha ^{new}_e = \frac{\sum _e \alpha _{global}}{\sum _e \rho _e} \alpha _e\).

The optimization problem is solved using the method of moving asymptotes (MMA) (Svanberg 1987). In all experiments performed in this work, the move limit of design variables is set to 0.01 unless specified otherwise.

Fig. 1
figure 1

a Illustration of the design domain (500x250 simulation elements) and boundary conditions. b, c The density distributions after 250 and 1000 iterations, respectively, from topology optimization under local volume constraints. Design parameters are \(\alpha _e=0.6\), \(R_e=18\) and \(r_e=4.5\). d, e, f The sensitivities at 1000 iterations, of the objective \(\frac{\partial c}{\partial {\rho }}\), the constraint \(\frac{\partial g}{\partial {\rho }}\), and \(-\frac{\partial c}{\partial {\rho }} / \frac{\partial g}{\partial {\rho }}\). g, h, i. The optimized density fields under different parameter settings: g \(R_e=12\). h \(r_e=2.6\), \(R_e\) varies linearly from 8 to 24, from the left to right side of the design domain. i \(\alpha _e\) varies linearly from 0.4 to 0.7, from the left to right side of the design domain. All other parameters are kept the same as in (b) and (c)

Convergence analysis and improvement

When applying topology optimization using local volume constraints, in some scenarios it is observed that the iterative optimization process converges very slowly. When inspecting such scenarios in more detail, for instance, by visualizing the density distribution of the intermediate designs, it turns out that in some regions even after several hundreds or thousands of iterations a distinct binary design cannot be achieved by the optimizer. One of such scenarios is shown in Fig. 1. The rectangular design domain is fixed on its left edge. A unit load is applied on the right, while another unit load on the bottom, both in the middle of the edges. In Fig. 1b, i.e., optimization after 250 iterations, two large grey regions can be observed. While the grey region on the left converges to a binary design after another 250 iterations, the grey region on the right does not result in a binary design even after a few thousands iterations. Applying a threshold to the intermediate densities to set them to either 0 or 1 results in large void or solid regions with sub-optimal mechanical properties or use of material.

To further analyze the cause of slow convergence, we examine the sensitivities at the 1000 iterations. In Fig. 1d, the plot of \(\frac{\partial c}{\partial {\rho }}\), the region where low convergence is observed has a high absolute sensitivity, meaning that an increase in density shall be favored for reducing the objective. However, an increase of density in this region will greatly violate the aggregated local volume constraint, as can be seen in Fig. 1e, the plot of \(\frac{\partial g}{\partial {\rho }}\). Shown in Fig. 1f is \(-\frac{\partial c}{\partial {\rho }} / \frac{\partial g}{\partial {\rho }}\), a metric similarly used for deriving a fix-point type update scheme with the optimality criteria (Sigmund 2001). It can be seen that in the low convergence region the ratio is rather homogeneous and does not indicate a clear density update strategy.

Relationship between convergence and stress

Prior work in infill optimization has shown that the optimized porous structure is in many regions according to the principal stress directions that occur in the solid design domain under equal boundary conditions and external loads. At each point in a 2D solid under load, the stress state is fully described by the stress vectors for two mutually orthogonal orientations. The second-order stress tensor

$$\begin{aligned} S(x, y) = \begin{bmatrix} \sigma _{xx} &{} \tau _{xy} \\ \tau _{xy} &{} \sigma _{yy} \end{bmatrix} _{(x, y)} \end{aligned}$$
(10)

contains these vectors for the axes of a Cartesian coordinate system. \(\sigma _{xx}\) and \(\sigma _{yy}\) are the normal stress components along the x and y directions, respectively, \(\tau _{xy}\) is the shear stress component.

Fig. 2
figure 2

Stress tensor field visualizations. The stress tensor field is according to the scenario shown in Fig. 1a, when simulating on the solid design domain. a Tensor glyphs are drawn at sampled vertices of the Cartesian simulation grid. Colors indicate the sign of the principal stresses, red for positive and green for negative values. b Trajectory-based visualization. Orange and turquoise trajectories represent the major and minor principal stress directions, respectively. c Topology-based visualization. The circle and quads indicate the trisector and wedge degenerate points, respectively, which are connected via the major (red) and minor (blue) topological skeletons

S is symmetric since the shear stresses given by the off-diagonal elements in S are equal on mutually orthogonal lines. The principal stress directions of the stress tensor indicate the two mutually orthogonal directions along which the shear stresses vanish. These directions are given by the eigenvectors of S, with magnitudes given by the corresponding eigenvalues \(\sigma _1\) and \(\sigma _2\) of S. For \(\sigma _1 \ge \sigma _2\), \(\sigma _1\) is called the major principal stress, and \(\sigma _2\) the minor principal stress. Accordingly, the corresponding eigenvectors \(v_1\) and \(v_2\) are called major and minor principal stress directions. The signs of the principal stress magnitudes classify the stresses into tension (positive sign) or compression (negative sign). However, since there are two principal stresses acting at each point, the classification is with respect to a specific direction.

Figure 2a shows a tensor glyph-based visualization of the stress field, corresponding to the scenario in Fig. 1. Here, the stress tensors are represented by oriented ellipses. The axes of the ellipses are oriented according to the eigenvectors of the stress tensor, and the lengths of their radii are determined by the eigenvalues. The colors of axes indicate the sign of the principal stresses, red for positive and green for negative values. Figure 1b, i.e., optimization after 250 iterations, has two large grey regions. Comparing it with Fig. 2a, it can be seen that the grey region on the left corresponds to \(\sigma _1 \approx -\sigma _2\), and the one on the right corresponds to \(\sigma _1 \approx \sigma _2\). While after a few hundred more iterations (see Fig. 1c) the grey region on the left converges to a binary design, the grey region on the right shrinks but remains visible. In these regions, the optimizer can favour material growths either along the major or the minor principal stress direction, and it seems that because no preferential direction is present the optimizer has problems to decide for any of them. In the regions where the optimizer doesn’t converge, however, another specific property can be perceived in addition to isotropic stress. As indicated by principal stress lines (PSLs), which are computed by performing numerical integration along the major and minor principal stress directions (see Fig. 2b), these regions seem to cover locations where the PSLs indicate directional discontinuities in the tensor field. This observation gives rise to a stress topology-based analysis of the optimization convergence, which we provide in the following.

Stress topology-based analysis

Topology analysis of 2D symmetric second-order tensor fields (e.g., stress tensor fields) has been introduced in the seminal work of Delmarcelle and Hesselink (1994). The topology of a 2D stress tensor field is composed of its degenerate points and the corresponding topological skeleton. At a degenerate point, the stress tensor has repeating eigenvalues, i.e., \(\sigma _1 = \sigma _2\), meaning that the major and minor stress directions cannot be decided. The topological skeleton is given by principal stress lines—so-called separatrices—that start from degenerate points.

An isolated degenerate point can be classified by the winding number of one of the eigenvector fields on a loop surrounding the degenerate point. Delmarcelle and Hesselink (Delmarcelle and Hesselink 1994) proposed an invariant to perform this classification in a stable way. In Sect. 4, we describe how the degenerate points are computed and classified for a stress tensor field given at the vertices of a Cartesian grid. A major/minor separatrix is a principal stress line starting at a degenerate point and following the major/minor eigenvector field. Let us also refer to Sect. 4 for a discussion of how to determine these directions. Figure 2c illustrates the major and minor separatrices in the stress field corresponding to the used test scenario in Fig. 1.

At a trisector there are three separatrices in the major (and three in the minor) principal direction field that divide the neighborhood into three sectors sharing this point. Around a wedge there can be either one sector or three sectors. In a sector, similar stress trajectories in the major and minor principal stress direction fields are observed. Figure 2c, as well as all other experiments we have performed, indicate that the regions where convergence cannot be achieved are always centered around a trisector, while wedges seem to have no influence on the convergence rate. Furthermore, regions where the convergence rate is low but the optimizer can eventually arrive at a stable binary design do not contain any degenerate point (Fig. 1b, left). These regions have major and minor principal stresses that are close in their magnitudes but differ in signs, i.e., \(\sigma _1 \approx -\sigma _2\), yet in these regions there are no topological changes in the stress field. In Fig. 3, we give two more examples which verify our observations, and clearly indicate the relationships between low convergence and existence of trisectors.

The topological skeletons can be perceived as limits of the principal stress lines close to the boundary between different stress regions. We hypothesize that the porous structures in regions where convergence is not achieved, if a stable binary design should be enforced, follow these skeletons, just as porous structures in other regions follow the principal stress directions. To validate this hypothesis, our idea is to guide the material deposition along the topological skeleton via a skeleton-based initialization of the density field. The initialization sets the optimizer to a state in which a stable binary design in the regions around trisectors is prescribed. The design can be changed during the course of the optimization, yet our experiments demonstrate that the optimizer maintains this design and builds additional support structures around it. These results empirically proof the validity of our hypothesis, and they indicate that the deviation from the prescribed skeleton is not favorable for the objective function.

Fig. 3
figure 3

Design domains and boundary conditions of models ’Bracket’ (a) and ’Bearing’ (d) using Cartesian simulation grids of resolutions \(512\times 400\) and \(512\times 512\), respectively. b e Trisector degenerate points and the corresponding topological skeletons. c, f Density distributions after 1000 optimization iterations with \(\alpha _e=0.6\), \(R_e=18\) and \(r_e=4.5\)

Stress topology-guided initialization

Typically in density-based topology optimization, the density field is initialized with a constant value. For infill optimization, the constant is chosen as the local volume upper bound. In accordance to the observation that the material layout in porous infill optimization is guided by the principal stress directions, we propose to augment the initialization by setting the densities of elements close to the topological skeleton to a high value. This strategy is fully automatic, since the computation of neither the degenerate points nor the topological skeleton does involve any user intervention.

To generate the initial material layout, the elements which are near the topological skeleton are identified first. In the current implementation, all elements that are touched by any of the PSLs belonging to the skeleton are identified. Then, the initial volume fraction of these elements is set to solid at the beginning of the optimization process. In this way, the initial density field around a trisector degenerate point becomes inhomogeneous, giving rise to sensitivities favoring a unique topology layout. It is worth noting that these pre-embedded solid elements are not passive elements but still belong to the design space, i.e., the density at these elements can be adjusted by the optimizer if a stiffer design can be achieved. Figure 4 shows the initial density fields that are used in the test cases ’Cantilever’, ’Bracket’ and ’Bearing’.

The proposed initialization process can be integrated into porous infill optimization in a fully automated way. Once the design domain, material parameters, fixations and external load conditions are given, the following steps are performed:

  1. (1)

    Finite element analysis to compute the stress field in the fully solid design domain.

  2. (2)

    Topology analysis including the computation of all trisector degenerate points and the topological skeleton containing these points.

  3. (3)

    Initialization of the density field according to the topological skeleton.

  4. (4)

    Topology optimization using local volume constraints for porous infill optimization.

Fig. 4
figure 4

The initialized density fields of the ’cantilever’ in Fig. 1 and ’Bracket’ and ’Bearing’ in Fig. 3

Implementation details

In the following, we discuss the computation of the locations of degenerate points in a given Cartesian simulation grids, as well as the computation of the topological skeleton that is required to initialize the density field. Given the definition of degenerate points, a degenerate point can be located by solving the following system of equations:

$$\begin{aligned} \begin{array}{l} \sigma _{xx}(x^*, y^*)-\sigma _{yy}(x^*, y^*) = 0, \\ \tau _{xy}(x^*, y^*) = 0, \end{array} \end{aligned}$$
(11)

where \((x^*, y^*)\) denotes the coordinates of the point to be solved for. Here we consider the general situation in topology optimization, i.e., the finite element analysis is performed using axis-aligned quadrilateral finite elements with bilinear shape functions. Thus, each element has four nodes that coincide with the element’s vertices, and the values at the nodes are bilinearly interpolated within the element. Then, Eq. 11 becomes a non-linear system of equations, which can be solved by the Newton-Raphson method.

Since degenerate points usually appear only in a few elements, an efficient way is required to test whether a cell can contain such a point and needs to be further analysed, or can be excluded right away. Therefore, each element is first classified according to the following conditions:

$$\begin{aligned} \begin{array}{l} \sigma _{xx}(x_i,y_i)-\sigma _{yy}(x_i,y_i)> 0, \quad i=1:4 \quad \mathrm {or} \\ \sigma _{xx}(x_i,y_i)-\sigma _{yy}(x_i,y_i)< 0, \quad i=1:4 \quad \mathrm {or} \\ \tau _{xy}(x_i,y_i) > 0, \quad i=1:4 \quad \mathrm {or} \\ \tau _{xy}(x_i,y_i) < 0, \quad i=1:4 \end{array} \end{aligned}$$
(12)

where \((x_i, y_i), \,\, i=1:4\) refers to the four nodal coordinates of a finite element. It can be easily shown that an element cannot contain a degenerate point if any of the conditions in Eq. 12 is true. If none of the conditions is true, the element needs to be further analyzed to locate a degenerate point in its interior. Figure 5 shows a possible distribution of the eigenvalues corresponding to the major and minor principal stress directions in a quadrilateral simulation element containing a degenerate point.

Fig. 5
figure 5

The eigenvalues corresponding to the major (\(\sigma _1\)) and minor (\(\sigma _2\)) principal stress direction are shown as height fields over the domain of a simulation element (grey square). At a degenerate point, both eigenvalues have the same value

In a symmetric second tensor field, two types of stable degenerate points exist: trisectors and wedges. They are indicated by characteristic patterns of the PSLs in their vicinity, and are determined from the so-called tensor gradients (see Delmarcelle and Hesselink (1994) for a comprehensive derivation). First, the partial derivatives of the tensor are introduced as

$$\begin{aligned} \begin{array}{l} a = \frac{1}{2} \frac{\partial {(\sigma _{xx}-\sigma _{yy})}}{\partial x} \quad b = \frac{1}{2} \frac{\partial {(\sigma _{xx}-\sigma _{yy})}}{\partial y} \\ c = \frac{\partial {\tau _{xy}}}{\partial x} \quad \quad \quad \quad \,\, d = \frac{\partial {\tau _{xy}}}{\partial y} \end{array} \end{aligned}$$
(13)

These derivatives are then used to compute the invariant under rotation

$$\begin{aligned} \delta = ad - bc. \end{aligned}$$
(14)

The sign of \(\delta\) determines the type of the degenerate point. I.e., a trisector degenerate point is indicated by \(\delta < 0\), and a wedge degenerate point is indicated by \(\delta > 0\). At a trisector degenerate point, there are three major and three minor separatrices starting from this point. In contrast, two separatrices start from a wedge, one coincides with the major PSL and the other one with the minor PSL (see Fig. 2c). These separatrices are termed the topological skeleton of a stress tensor field, i.e., the topological skeleton is composed of the PSLs starting from the degenerate points. Compared to the PSLs not belonging to the topological skeleton, the tangent of the topological skeleton at the degenerate point is not unique, since there is an infinite set of principal stress directions at such points. To solve this problem, Delmarcelle and Hesselink (1994), propose that the tangents to the topological skeleton at the degenerate points are the real root(s) of the cubic equation

$$\begin{aligned} dx^3 + (c+2b)x^2 + (2a-d)x - c = 0. \end{aligned}$$
(15)

Results and discussions

In this section, we use several examples to demonstrate the effectiveness of the proposed initialization for density-based porous infill optimization. The initialization and optimization are both implemented in Matlab. The initialization involves a finite element analysis, followed by a stress topology analysis and computation of the topological skeleton. Running on a desktop PC with an Intel Xeon CPU at 3.60GHz, the initialization in our experiments took less than 2 seconds. All design domains are discretized by Cartesian finite element grids with unit size simulation elements. The Young’s Modulus and Poisson’s ratio are set to 1.0 and 0.3, respectively. Convergence improvement is quantified by the sharpness measurement

$$\begin{aligned} s = \frac{4}{n} \sum \limits _{e} \rho _e(1-\rho _e) \end{aligned}$$
(16)

A small value of s indicates a sharper binary design of the optimized topology.

Fig. 6
figure 6

Binary designs by porous infill optimization with stress topology-guided density initialization. The same parameter settings as in Fig. 1c, g, h and i, respectively, are used. A quantitative comparison is given in Table  1

Fig. 7
figure 7

Intermediate density distributions of the results in Fig. 1c (top, using a uniform density initialization) and Fig. 6a (bottom, using the proposed topology-guided density initialization)

Figure 6 shows the binary designs that are generated using an initialization by topological skeleton. The same parameter settings as in Fig. 1 are used here. As can be seen, in all cases a binary design is achieved regardless of the area of the region around the degenerate point where convergence is not achieved by the original approach. Figure 7 compares the intermediate density distributions during the optimization using a uniform density initialization and the proposed topology-guided density initialization. Table 1 compares the mechanical properties of the designs generated by both approaches, as well as the used material and the sharpness (cf. Eq. 16) of the designs after 1000 optimization iterations. Notably, even after some thousands of iterations convergence cannot be reached via original porous infill optimization. As can be seen from the sharpness values, the proposed initialization strategy improves the convergence behavior of porous infill optimization considerably. In all test cases, a distinct binary design has been reached within the given number of iterations. The difference in compliance and material fraction is rather small.

Table 1 Quality and convergence comparison. Each pair of rows shows the compliance, the fraction of solid material, and the sharpness of the resulting designs when using porous infill optimization without (top) and with (bottom) stress topology-guided density initialization
Fig. 8
figure 8

The binary designs that are generated by stress topology-guided porous infill optimization for ’Bracket’ (a) and ’Bearing’ (b) from Fig. 3

Fig. 9
figure 9

Porous infill optimization with both local and global volume fraction constraints. The optimization settings are \(\alpha _e=0.6\), \(\alpha _{global}=0.4\), \(R_e=18\), \(r_e=4.5\) and 1000 iterations. a The design domain (\(200\times 200\)) and boundary conditions. b Trisector degenerate points and the corresponding topological skeletons. c The density distribution generated by porous infill optimization, and d using the proposed topology-guided density initialization. The two rows at the bottom show the intermediate density distributions during optimization, under the two different initializations

Fig. 10
figure 10

Convergence plots for the example shown in Fig. 9, comparing the effects of homogeneous initialization and topology-guided initialization regarding the objective (left) and sharpness (right)

Figure 8 shows the converged density distributions of the ’Bracket’ and ’Bearing’, obtained using the topology-guided initialization strategy. Low convergence regions from the original approach (cf. Fig. 3) are removed. The convergence is again confirmed by a reduction in the sharpness value. In the ’Bearing’ result from the original approach (cf. Fig. 3f) the area of the low convergence regions is large. In this case, the sharpness value is reduced by an order of magnitude by the proposed initialization. It leads to a stiffer structure with less material consumption.

We further test the applicability of the proposed initialization on topology optimization with both local and global volume constraints. The global volume constraint is

$$\begin{aligned} \frac{1}{n} \sum \limits _e \rho _e - \alpha _{global} \le 0. \end{aligned}$$
(17)

The test is performed on a square where its four corners are loaded (Fig. 9a), an example taken from Stutz et al. (2020). This example has two trisectors, as shown in Fig. 9b. From Fig. 9c, it can be seen that the central region is largely grey after 1000 optimization iterations. The grey region disappears in the optimized result from the proposed initialization (Fig. 9d). The significant improvement in convergence can be seen from the evolution of density distributions shown in Fig. 9 and the plot of the sharpness over iterations, shown in Fig. 10(right). As the large grey region is replaced by a binary design, the material consumption reduces from 0.400 to 0.378 and the compliance value decreases marginally from 26.02 to 25.96.

Fig. 11
figure 11

Porous infill optimization under distributed loads. The optimization settings are \(\alpha _e=0.6\), \(R_e=36\), \(r_e=4.5\) and 1000 iterations. a The design domain (\(444\times 444\)) and boundary conditions. b Trisector degenerate points and the corresponding topological skeletons. c Stress visualization using tensor glyphs. d The optimized infills using a uniform density initialization e and the proposed topology-guided density initialization. The intermediate density distributions using different initializations are shown at the bottom

In density-based topology optimization, distributed loads are known to be a source of potential low convergence. Fig. 11a sketches a disk with radially compression forces applied on its boundary. Eight vertices equally-spaced on the boundary are fixed in both x- and y-axis, indicated by small triangles. The topological skeleton of the stress field is visualized in Fig. 11b, while the stress field is visualized using tensor glyphs in Fig. 11c. From the visualizations it can be seen that the stress field has a complex topology, and that the stress tensors in the middle are isotropic and exhibit a tiny spatial gradient. This is a challenging case for infill optimization with a uniform density initialization (Fig. 11d). Figure 11e shows the optimized infill using the proposed topology-guided density initialization. The density distributions during the optimization are shown at the bottom. This example demonstrates the effectiveness of the proposed initialization in the case of distributed loads.

Interestingly, under certain design specifications, the original approach is able to create binary designs at the presence of degenerate points. This happens if the specified local volume bound is small. Figure 12a shows the cantilever example optimized with a uniform density initialization under \(\alpha _e=0.4\) (reduced from \(\alpha _e=0.6\) in previous examples). It is not precisely known how the different local volume bounds triggered the different convergence behavior. The proposed topology-guided density initialization is effective for small local volume bounds (Fig. 12b). In this case, the sharpness values of results from both initialization strategies are very close. The one with the proposed initialization leads to a slightly larger compliance (\(104.6\%\)), while consuming \(5.6\%\) less material. From the intermediate density distributions shown in the following two rows, a noticeable difference between the two initializations can be found around the degenerate point after 300 iterations. Our experiments also revealed that the local convergence may, to some extend, be alleviated by a more aggressive move limit in the MMA solver. Figure 12c shows the optimized result with a move limit of 0.1 (in contrast to a limit of 0.01 in previous examples), under a homogeneous initialization. While a binary design is obtained, the design has irregular large void regions that do not agree with the intention of creating distributed porous infill structures. The introduction of the topology-guided initialization is able to fill the void (see Fig. 12d). The difference can be observed in the intermediate density distributions shown at the bottom, e.g., after 300 iterations, around the degenerate point. The latter design consumes \(4.5\%\) more material, and decreases the compliance by \(4.2\%\).

Fig. 12
figure 12

Top row: Density distributions of special cases of ’Cantilever’ after 1000 iterations. Control parameters are kept the same as in Fig. 1c if not stated otherwise. a Using a uniform initial density field and \(\alpha _e = 0.4\). b Using a stress topology-guided initial density field and \(\alpha _e = 0.4\). c Using a homogeneous initial density field and setting the moving limit of MMA to 0.1. d Using a stress topology-guided initial density field and setting the moving limit of MMA to 0.1. The intermediate density distributions using different initializations are shown at the bottom

In this paper we focus on addressing the issue of low convergence associated with degenerate points. We note that there are other causes of low convergence in density-based topology optimization. As discussed in Sect. 3.2, the left hand side in Fig. 1b includes a region of \(\sigma _1 \approx -\sigma _2\). It takes a few hundred iterations for this region to converge (c.f. Fig. 7 bottom). Extending the initialization from the topological skeleton to the entire domain is expected to reduce the number of iterations.

Conclusions

In this work, we have analyzed the convergence of porous infill optimization towards a stable binary design. In a number of experiments we have shown that low convergence regions may appear in this variant of topology optimization, prohibiting an automatic generation of a distinct and mechanically sound binary design. By analyzing the topology of the stress field that arises in the solid object, the existence of trisector degenerate points in this field could be determined as the major cause of low convergence. Based on this observation, we have proposed an initialization process for porous infill optimization that quickly guides the optimization towards a stable binary design. This process generates an initial solid material layout along the topological skeleton of the stress field, which is comprised of principal stress lines starting at the trisector degenerate points.

In the future, we intend to shed light on the following extensions of the proposed approach: Firstly, we aim to consider the application of stress topology-guided density initialization to three-dimensional (3D) domains. Therefore, the convergence of 3D porous infill optimization first needs to be analyzed, using dedicated visualization techniques for 3D scalar fields. Then, since degenerate points become lines and surfaces in 3D (Hesselink et al. 1997; Zheng et al. 2005), the relationships between the 3D stress field topology and the local convergence ratio needs to be investigated. Based on these investigations, specific initialization strategies and material growth processes need to be developed. Secondly, we will consider stress topology analysis for homogenization-based infill optimization. In particular, we will address the automatic generation of a 2D quad-dominant mesh where the mesh edges align with the principal stress directions. Porous infill optimization, under a single load case, tends to lay out the material along the mutually orthogonal principal stress lines, and—with our proposed initialization—automatically handles the material layout around degenerate points where quad meshing approach have difficulties to construct a consistent mesh structure (Wu et al. 2021b). We will build upon this observation and combine stress topology-guided porous infill optimization with the enforcement of material deposition along the principal stress lines.