1 Introduction

Since the seminal work of Bendsøe and Kikuchi (1988), topology optimization has experienced huge advances and nowadays is being massively adopted in the industry (Pedersen and Allinger 2006; Zhou et al. 2011; Zhu et al. 2016). Among the successful advancements, one can mention the famous density method under the SIMP interpolation scheme (Bendsøe 1989). The well-known shortcomings of SIMP led to a succession of improvements seeking to avoid the mesh dependency, the checkerboard patterns, and the presence of intermediate densities. To date, one of the most effective approaches to dealing with the ill-effects of SIMP is the robust design approach that brings the eroded and dilated versions of the design (Sigmund 2009). This method considers manufacturing errors that may incur in a uniformly thinner or uniformly thicker component compared to the blueprint layout. Sigmund (2009) proposed a robust formulation that maximizes the performance of the worst performing design among the eroded, dilated, and reference (intermediate) designs. This means, the formulation guarantees a design with good performance even if it is eventually eroded or dilated during the manufacturing process. Interestingly, the robust formulation yields a reference (intermediate) design that features minimum member size and minimum cavity size (Wang et al. 2011).

In addition to imposing minimum length scale in topology optimization, it has been seen that the robust formulation provides a more stable convergence than other projection or filtering strategies known so far, which allows to reach almost discrete solutions in the density method (Wang et al. 2011). The formulation has been recently applied in combination with existing methods that allow to impose stress limits (da Silva et al. 2019; Silva et al. 2020), overhang angle constraints (Pellens et al. 2018), maximum size restrictions (Fernández et al. 2020), and geometric non-linearities (Lazarov and Sigmund 2011; Silva et al. 2020), not only in the density method but also in the level set method (Chen and Chen 2011; Andreasen et al. 2020).

Despite proving its effectiveness in several fields of application (Wang et al. 2011b; Christiansen et al. 2015), the robust design approach presents some drawbacks with regard to its implementation. For example, the method requires boundary treatments with respect to the density filter, since the filtering region can be split at the edges of the design domain affecting the imposed minimum size (Clausen and Andreassen 2017). In addition, due to the erosion and dilation distances with respect to the intermediate design, boundary conditions can be disconnected from the designs involved in the formulation (Clausen and Andreassen 2017). Another difficulty posed by the method is that the minimum length scale must be implicitly imposed through the parameters defining the density filter and the Heaviside projection. This drawback has been addressed in the literature using numerical (Wang et al. 2011) and analytical (Qian and Sigmund 2013) approaches. The numerical approach consists of applying the density filter and the Heaviside projection to a 1D design, measuring the resulting length scale, and repeating the process several times with different filter and projection parameters to subsequently construct a graph that relates the involved parameters. The analytical method consists of applying the density filter as a convolution integral in a continuous 1D design. The solution of the integration yields explicit relationships of the projection/filtering parameters with the obtained length scale (Qian and Sigmund 2013). As the three field scheme is a scalar function, the relationships obtained from a 1D design show to be suitable approximations for 2D and 3D designs (Wang et al. 2011).

The numerical and analytical relationships reported by Wang et al. (2011) and Qian and Sigmund (2013) are intended for a particular case where the minimum size of the void phase is set equal to that of the solid phase. This simplifies the procedures to explicitly relate the desired minimum length scales to the filter and projection parameters, but it reduces design freedom. In addition, recent progress in minimum and maximum size control has raised the need to obtain the erosion and dilatation distances (Fernández et al. 2021), which are not provided in the literature and must be derived by topology optimization users.

The aim of this work is to provide a method to obtain the filter and projection parameters that impose user-defined minimum length scales, where the size of the solid phase can be defined differently from that of the void phase. In addition, for the desired minimum length scales, the erosion and dilation distances are provided. To this end, we extend the applicability of the analytical method proposed by Qian and Sigmund (2013) and the resulting relationships are validated using the numerical method proposed by Wang et al. (2011) and a set of 2D topology-optimized designs. To facilitate the replication of results and the application of the methods discussed in this paper, MATLAB codes are provided.

The remainder of the document is developed as follows. Section 2 introduces the robust topology optimization formulation and the case studies used to asses the analytical expressions that relate the minimum length scale to the parameters that impose it. Section 3 presents the analytical method proposed by Qian and Sigmund (2013) and describes the main contribution of our work, which is the extension of these equations to allow choosing independent minimum sizes for the solid and void phases. Section 4 validates the analytical expressions using the numerical method proposed by Wang et al. (2011). Section 5 discusses the sources of error that are inherent to the analytical method. Section 6 assesses the analytical expressions on 2D topology-optimized designs. Section 7 gathers the final conclusions of this work. Authors provide MATLAB codes that allow for replication of results through GitHub link.

2 Problem definition

The analytical expressions that relate the minimum length scale to the parameters that define it are developed for the robust topology optimization formulation based on the eroded, intermediate, and dilated designs. This work considers the density approach based on the SIMP interpolation scheme (Bendsøe 1989), even though the proposed methodology can be applied to other topology optimization approaches with little efforts.

Like most works in the literature, the eroded, intermediate, and dilated designs are built using a three-field scheme (Sigmund and Maute 2013). The first field, denoted by ρ, corresponds to the design variables. The second field, denoted by \(\boldsymbol {\tilde {\rho }}\), is obtained by a weighted average of the design variables within a circle of radius rfil. The third field, denoted by \(\boldsymbol {\bar {\rho }}\), is obtained by projecting the components of the filtered field towards 0 or 1. The filter and projection functions are identical to those provided by Wang et al. (2011); however, these are reminded herein for the sake of clarity.

The filter of design variables (Bruns and Tortorelli 2001; Bourdin 2001) is defined as follows:

$$ \tilde{\rho}_{i} = \frac{\displaystyle\sum\limits_{j = 1}^{N} \rho_{j} \text{v}_{j} w(\mathbf{x}_{i}-\mathbf{x}_{j})}{\displaystyle\sum\limits_{j = 1}^{N} {\text{v}}_{j} w(\mathbf{x}_{i}-\mathbf{x}_{j})} , $$
(1)

where N is the total number of design variables, which is equal to the number of finite elements, ρj is the design variable associated to the element j, and \(\tilde {\rho }_{i}\) is the filtered variable associated to the element i. vj is the volume of the element j and w(xixj) is the weight of ρj in the definition of \(\tilde {\rho }_{i}\). As it is a common practice in the literature, the weighting function w(xixj) is defined as a linear and decreasing function with respect to the distance between the elements i and j, as follows:

$$ w(\mathbf{x}_{i}-\mathbf{x}_{j}) = \max\left( 0, 1-\frac{\|\mathbf{x}_{i}-\mathbf{x}_{j}\|}{r_{\text{fil}}}\right) , $$
(2)

where xi and xj represent the centroid of the elements i and j, respectively, and rfil is the radius of the density filter.

To reduce the amount of intermediate densities present in the filtered field and to build the designs that constitute the robust formulation, the projected field is obtained with the following smoothed Heaviside function (Wang et al. 2011):

$$ \bar{\rho}_{i} = \frac{\tanh{(\beta \eta)} + \tanh{(\beta(\Tilde{\rho}_{i} -\eta))}} {\tanh{(\beta \eta)} + \tanh{(\beta(1 - \eta))}} $$
(3)

where β and η control the steepness and the threshold of the projection, respectively. The eroded, intermediate, and dilated designs, denoted by \({\boldsymbol {\bar {\rho }}}_{\text {ero}}\), \({\boldsymbol {\bar {\rho }}}_{\text {int}}\), and \({\boldsymbol {\bar {\rho }}}_{\text {dil}}\), are obtained from the smoothed Heaviside function of (3) by using the same β but with different thresholds ηero, ηint, and ηdil, thus leading to \({{\boldsymbol {\bar {\rho }}}_{\text {ero}}}(\boldsymbol {\tilde {\rho }},\beta ,{\eta _{\text {ero}}})\), \({{\boldsymbol {\bar {\rho }}}_{\text {int}}}(\boldsymbol {\tilde {\rho }},\beta ,{\eta _{\text {int}}})\), and \({{\boldsymbol {\bar {\rho }}}_{\text {dil}}}(\boldsymbol {\tilde {\rho }},\beta ,{\eta _{\text {dil}}})\).

To assess the scope of the equations that provide the necessary parameters to impose the minimum length scale, different topology optimization problems are sol-ved with variations in the desired minimum length scale. The minimum size of the optimized designs is measured and compared against the intended values. In this work, the chosen problems are the heat conduction and the non-linear compliant mechanism design. The former aims at minimizing the thermal compliance subject to a volume restriction (Wang et al. 2011), while in the latter, the formulation of a force inverter is considered where an output displacement is maximized for a given input force (Sigmund 1997). The design domains are shown in Fig. 1. According to the robust design approach, the topology optimization problems can be written as follows:

$$ \begin{array}{ll} &\min \max \left( c({{\boldsymbol{\bar{\rho}}}_{\text{ero}}}), c({{\boldsymbol{\bar{\rho}}}_{\text{int}}}) , c({{\boldsymbol{\bar{\rho}}}_{\text{dil}}}) \right) \\ \text{s.t.:} & \mathbf{v}^{\intercal} {{\boldsymbol{\bar{\rho}}}_{\text{dil}}} \leq V^{*}_{\text{dil}}(V^{*}_{\text{int}}) \\ & 0 \leq \rho_{i} \leq 1 , i=1,...,N , \end{array} $$
(4)

where c represents the thermal compliance of the heat sink or the output displacement of the force inverter, and \(V^{*}_{\text {dil}}\) is the upper bound of the volume restriction applied on the dilated field. As the design intended for manufacturing is the intermediate design, the upper bound of the volume constraint is scaled according to the user-defined volume limit (\(V^{*}_{\text {int}}\)) as follows:

$$ V^{*}_{\text{dil}}(V^{*}_{\text{int}}) = \frac{\mathbf{v}^{\intercal} {{\boldsymbol{\bar{\rho}}}_{\text{dil}}}}{\mathbf{v}^{\intercal} {{\boldsymbol{\bar{\rho}}}_{\text{int}}}}V^{*}_{\text{int}} $$
(5)

The scaling operation in (5) is performed every 10 iterations of the topology optimization problem.

Fig. 1
figure 1

(a) Heat sink and (b) force inverter design domains considered in this study

For the heat conduction problem, the implementation of the topology optimization problem is the same as described by Wang et al. (2011). For the nonlinear force inverter, the method to deal with mesh distorsion appearing in low-density elements is the same as explained by Wang et al. (2014). To avoid overextending the contents of the manuscript, the interested reader is referred to the cited articles.

3 Analytical minimum length scale

Comprehensive numerical tests have shown that the robust formulation in (4) yields intermediate designs featuring minimum length scales (Wang et al. 2011). Considering a two-dimensional design domain, the minimum size of the solid (void) phase is defined by the radius rmin.Solid (rmin.Void) of the largest circle that can be circumscribed into the smallest solid member (cavity) of the topology. It has been shown that the minimum length scale, rmin.Solid, and rmin.Void are defined by the filter radius rfil and the projection thresholds ηero, ηint, and ηdil. Therefore, if specific values are to be imposed for the minimum length scale, these must be implicitly imposed through the 4 parameters that define the density filter and the Heaviside projection.

To obtain an explicit relation between the minimum length scale and the parameters that define it, Qian and Sigmund (2013) proposed to apply the three-field scheme over a uni-dimensional and continuous design domainFootnote 1. For instance, to obtain the minimum size of the solid phase, a design domain ρ(x) centered at the coordinate xm and containing solid elements on a stretch of size h is assumed, as shown in Fig. 2a. The continuous form of the density filter reads as follows:

$$ \begin{array}{@{}rcl@{}} {\tilde{\rho}}(x_{i}) &=& \frac{\displaystyle{\int}_{x_{i}-r_{\text{fil}}}^{x_{i}+r_{\text{fil}}} \boldsymbol{\rho}(x) \left( 1-\frac{\left |x_{i} - x\right |}{r_{\text{fil}}}\right) dx} {\displaystyle{\int}_{x_{i}-r_{\text{fil}}}^{x_{i}+r_{\text{fil}}} \left( 1-\frac{\left |x_{i} - x \right |}{r_{\text{fil}}}\right) dx } \\ &=& \displaystyle{\int}_{x_{i}-r_{\text{fil}}}^{x_{i}+r_{\text{fil}}} \frac{\boldsymbol{\rho}(x)}{r_{\text{fil}}} \left( 1-\frac{\left |x_{i} - x \right |}{r_{\text{fil}}}\right) dx \end{array} $$
(6)

where xi is any coordinate of x. For example, by choosing a filter radius greater than h/2, the one-dimensional filtered field in Fig. 2b is obtained. The filtered field can be projected using the smoothed Heaviside function of (3). To simplify the analysis, an infinite steepness parameter (\(\beta \to \infty \)) is assumed. For example, for a Heaviside threshold η = 0.2, the design of Fig. 2c is obtained. The size of the solid phase in the projected design is defined by the length Li, which can be obtained by finding xi from the equation \(\tilde {\rho }(x_{i})=\eta \), where η is a threshold that meets 0 ≤ η ≤ 1. To this extent, the size of the solid phase is a function Li(rfil,η,h) that depends on the assumed h value. To determine the value of h and to discover the explicit relation between the size L of the projected field and the filter and projection parameters, it is necessary to refer to the foundation of the robust formulation.

Fig. 2
figure 2

The three field scheme applied to a one-dimensional design domain in order to obtain the analytical minimum length scale

An erosion projection removes solid material from the surface of the reference design. This operation enlarges the cavities and thins the structural members present in the intermediate reference design (Sigmund 2009). When robustness with respect to erosion is desired, the structural members must be present in both the eroded and the reference designs. It has been shown that a sufficient condition to preserve robustness is that the solid member in the eroded design has to be projected by at least an infinitesimal size, i.e. L(ηero) ≈ 0, as shown in Fig 2d. This condition allows determining the assumed size h by solving the following equation:

$$ \Tilde{\rho}(x_{\text{ero}}) = {\int}_{-h/2}^{h/2} \frac{1}{r_{\text{fil}}} \left( 1-\frac{|x|}{r_{\text{fil}}} \right) dx ={\eta_{\text{ero}}} $$
(7)

where the reference system is placed at xero for integration. By solving the expression in (7), the size h is obtained as:

$$ h = 2 r_{\text{fil}} (1 - \sqrt{1-{\eta_{\text{ero}}}}) $$
(8)

Knowing the distance h that produces an eroded projection of infinitesimal size, it is possible to relate the minimum size to the filter radius for any projection whose threshold meets η < ηero. A particular case is to choose η = 0.5, which is the value chosen by Qian and Sigmund (2013) to define the intermediate design. However, to extend the analytical method we use an arbitrary η such that η< ηero. It means that we can compute the size if another value of the intermediate threshold is used but also that we can provide the sizes in the other phases of the robust formulation.

As mentioned above, the size of the solid phase L in the projected field can be obtained by equating \(\tilde {\rho }(x_{i})\) to η. Since the condition of robustness is imposed on h (8), the length corresponds to the minimum size, i.e. L = 2rmin.Solid. The expression that allows to relate the minimum size to the filter radius is as follows:

$$ {\tilde{\rho}}(x_{i}) = \displaystyle{\int}_{x_{i}-r_{\text{fil}}}^{x_{i}+r_{\text{fil}}} \frac{\boldsymbol{\rho}(x)}{r_{\text{fil}}} \left( 1-\frac{\left |x_{i} - x \right |}{r_{\text{fil}}}\right) dx= \eta $$
(9)

For the integration, the origin of the reference system is placed at xi. To solve (9), four situations must be considered when defining the integration limits, which are summarized in Fig. 3. For example, taking into account Fig. 3a, (9) becomes:

$$ {\tilde{\rho}}(x_{i}) = \displaystyle{\int}_{\frac{L-h}{2}}^{L-\frac{L-h}{2}} \frac{1}{r_{\text{fil}}} \left( 1-\frac{\left | x \right |}{r_{\text{fil}}}\right) dx = \eta $$
(10)
Fig. 3
figure 3

Situations to be considered when defining the limits of integration. Here, integration is performed around xi. Each graph displays 3 curves. The one in black represents the field to be filtered (ρ). The blue curve represents the filtered field (\(\boldsymbol {\tilde {\rho }}\)). The orange dashed curve represents the filter weights (w). The shaded area highlights the integration limits of (9), and the red arrows show the size of the projected field

Solving the integral of (10) leads to the following expression:

$$ {\tilde{\rho}}(x_{i}) = \frac{h}{r_{\text{fil}}}(1-\frac{L}{2 r_{\text{fil}}}) = \eta $$
(11)

Finally, replacing (8) in (11):

$$ \frac{2r_{\text{min.Solid}}}{r_{\text{fil}}} = 2 - \frac{\eta}{1-\sqrt{1-{\eta_{\text{ero}}}}} $$
(12)

Equation (12) explicitly relates the minimum size of the solid phase of a projected field defined by η, with the filter radius and the erosion threshold. However, (12) is only valid for L > h and rfil ≥ (L + h)/2. For implementation purposes, it is more convenient to express the range of application in terms of the projection thresholds. To this end, h can be replaced from (8) and L from (12), which leads to conditions depending only on ηi and ηero, as follows:

$$ \begin{array}{@{}rcl@{}} L > h & \implies \eta < 2 \eta_{\text{ero}} - 2 + 2 \sqrt{1-{\eta_{\text{ero}}}} \\ r_{\text{fil}} \geq (L+h)/2 &\implies \eta \geq 4 - 4 \sqrt{1-{\eta_{\text{ero}}}} - 2{\eta_{\text{ero}}} \end{array} $$
(13)

By repeating the procedure from (10) to (13) for the 4 integration conditions shown in Fig. 3, a set of equations is obtained which relate the filter and projection parameters with the minimum size for any projection threshold η < ηero. The set of equations is summarized in the four first rows of Table 1.

Table 1 The explicit relationship between the minimum length scale and the filter and projection parameters

To obtain the relationships that define the minimum size of the void phase, the same procedure must be used as for the solid phase, however, now starting from a one-dimensional design domain containing a cavity of size h. To avoid overextending the document with redundant information, this section is limited to presenting the final equations that define the minimum size of the void phase. The expressions are summarized in the last 4 rows of Table 1.

Having delivered the set of equations that expand the scope of the method proposed by Qian and Sigmund (2013), the following section presents a methodology to use these equations.

4 Imposing the desired minimum length scale

In structural design, the minimum length scale control is usually desired because of design requirements or manufacturing limitations; hence, in most cases, the minimum sizes of the solid and void phases are known values established for the intermediate design. Therefore, for the set of equations presented in Table 1, the radii \(r_{\text {min.Solid}}^{\text {int}}\) and \(r_{\text {min.Void}}^{\text {int}}\) are assumed user-defined input values. In this case, the projection threshold η corresponds to the projection threshold ηint; hence, the desired length scale for the intermediate design is a function of the projection thresholds and of the size of the filter, namely, \(r_{\text {min.Solid}}^{\text {int}}({\eta _{\text {int}}}, {\eta _{\text {ero}}}, r_{\text {fil}})\) and \(r_{\text {min.Void}}^{\text {int}}({\eta _{\text {int}}}, {\eta _{\text {dil}}}, r_{\text {fil}})\). Given the number of unknowns (rfil,ηero,ηint,ηdil), the system of equations in Table 1 becomes indeterminate and the desired minimum length scale can be imposed through multiple combinations of parameters. Nevertheless, such freedom of parameters selection can be reduced by considering the following three recommendations.

Firstly, a number of advantages have been observed when defining the intermediate design with a threshold ηint = 0.5. For instance, the projection features lower amounts of intermediate densities compared to those projections that use a threshold other than 0.5 (Xu et al. 2010; Wang et al. 2011; da Silva et al. 2019). In addition, a threshold ηint set to 0.5 provides symmetric ranges (0.5) for the erosion and dilatation thresholds, which is convenient for reducing rounding errors, since small differences in projection thresholds could be insensitive to the minimum size when using a coarse discretization of the design domain (Qian and Sigmund 2013). Symmetric ranges are also useful to simplify the development of the analytical equations, since it is sufficient to develop the equations for one phase and to consider the symmetric projection with respect to ηint to obtain the expressions for the other phase. This symmetry relationship can be seen in Fig. 4. There, the diagonal line represents the same length scale for the solid and void phases, as in the set of equations provided by Qian and Sigmund (2013). The other curves in the figure illustrate the contribution of this work, where \(r_{\text {min.Void}}^{\text {int}} \neq r_{\text {min.Solid}}^{\text {int}}\). Similar curves have been plotted for the offset distances and are available in the Appendix.

Fig. 4
figure 4

Graphical relationship between minimum length scales and projection thresholds. Graph built at ηint = 0.5

Secondly, for a particular combination of thresholds, the filter size (rfil) can become considerably larger than the desired minimum length scale, which could significantly increase computational requirements (Lazarov and Sigmund 2011). This can be seen in Figs. 5 and 6b. Maybe we can reduce a little here These figures show graphs that relate the filter size (rfil) to the minimum size of solid or void phases and the erosion or dilation threshold. These graphs show that the closer ηero and ηdil are to ηint, the larger the filter radius, which inevitably increases computational requirements. On the contrary, the closer ηero and ηdil are to 1 and 0, the smaller the filter radius. Extreme values achieve the smallest filter size \(r_{\text {fil}}=r_{\min \limits }\). Under these observations, we recommend choosing ηero ≥ 0.75 and ηdil ≤ 0.25, thus it is ensured that \(r_{\text {fil}}\leq 2 r_{\text {min.Solid}}^{\text {int}}\) and \(r_{\text {fil}}\leq 2 r_{\text {min.Void}}^{\text {int}}\). Thirdly, erosion and dilation thresholds too distant or too close to the intermediate threshold increase oscillations of design variables during the optimization process. In general, a good compromise is to choose 0.10 ≤ ηdil ≤ 0.4 and 0.60 ≤ ηero ≤ 0.9.

Fig. 5
figure 5

Graphical relationship between the minimum size of the void phase, the filter radius and the dilation projection

Fig. 6
figure 6

Graphical relationships between the minimum length scale and ηero, ηint, ηdil, and rfil. The minimum length scale is defined for the intermediate design. The graphs are built using both, the analytical and the numerical method. Graphs (a) and (b) are designed to obtain the projection thresholds and the filter radius, respectively. Graphs (c) and (d) are designed to obtain the dilation and erosion distances, respectively

Given the advantages of using ηint = 0.5 and the fact that most of the related works in the literature use that value, it is convenient and meaningful to set the intermediate threshold at 0.5. Thus, an unknown is removed from the system of equations. The second and third observations limit the range of the erosion and dilation thresholds. Then, for a user-defined minimum length scale, it is possible to develop an algorithm that solves the system of equations considering the three observations. Here, we propose an algorithm based on graphic relationships, so that the reader can easily find the desired parameters without the need to resort to a computational algorithm. Nonetheless, we also provide as supplementary material a code written in MATLAB named SizeSolution.m that performs the procedure described below.

It is important to note that the above observations are based on numerical tests considered for specific optimization problems formulated in the density approach. Therefore, it is possible that under other topology optimization approaches or formulations the above observations are no longer valid. However, the proposed procedure can be applied for any other value of ηint, or any other combination of parameters that the user may consider convenient.

The first graph proposed in this work is shown in Fig. 6a and gathers 4 parameters, the minimum length scale (\(r_{\text {min.Solid}}^{\text {int}}\) and \(r_{\text {min.Void}}^{\text {int}}\)) and the projection thresholds (ηero and ηdil), provided that ηint = 0.5. In this graph, the user can easily find the set of erosion and dilation threshold that leads to the desired length scale. Then, the user can access the graph in Fig. 6b to obtain the filter radius. For example, for the following minimum length scale, \(r_{\text {min.Solid}}^{\text {int}}=r_{\text {min.Void}}^{\text {int}}=3\) elements, the graph in Fig. 6a is accessed with a value of 1.0 for the ordinate. According to the aforementioned observations, the combination of thresholds [ηero, ηdil] that can be chosen among others are:

$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& [0.75, 0.25] , \end{array} $$
(14a)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& [0.80, 0.20] , \end{array} $$
(14b)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& [0.85, 0.15] , \end{array} $$
(14c)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& {[}0.90, 0.10{]} . \end{array} $$
(14d)

Arbitrarily, [0.75, 0.25] is selected, and using Fig. 6b, it is obtained that \(r_{\text {fil}}=2r_{\text {min.Solid}}^{\text {int}} = 6\) elements.

It should be noted that graphs in Fig. 6 are constructed considering a step size of 0.05 in the dilation threshold. This is due to the fact that discretization of the filter radius in topology optimization is generally coarse, and decimal numbers smaller than 0.05 in the threshold value have usually a negligible effect on the minimum length scale. However, a smaller step size is used for the erosion threshold in case the user decides to interpolate threshold values. In addition, if higher accuracy is desired for interpolation, the user can resort to the attached MATLAB code SizeSolution.m.

As previously mentioned, the erosion and dilation distances could be required, for instance, when implementing maximum size restrictions (Fernández et al. 2020). These distances can be easily obtained from the equations of Table 1. As shown in Fig. 2d, the dilation and erosion distances, denoted by tdil and tero, can be computed as follows:

$$ \begin{array}{@{}rcl@{}} t_{\text{dil}} &=& r_{\text{min.Solid}}^{\text{dil}} {(\eta_{\text{dil}},\eta_{\text{ero}},r_{\text{fil}})} - r_{\text{min.Solid}}^{\text{int}} {(\eta_{\text{int}},\eta_{\text{ero}},r_{\text{fil}})} \\ t_{\text{ero}} &=& r_{\text{min.Void}}^{\text{ero}} {(\eta_{\text{ero}},\eta_{\text{dil}},r_{\text{fil}})} - r_{\text{min.Void}}^{\text{int}} {(\eta_{\text{int}},\eta_{\text{dil}},r_{\text{fil}})} \end{array} $$
(15)

where the minimum size of the solid phase in the dilated design (\(r_{\text {min.Solid}}^{\text {dil}}\)) is obtained by choosing η = ηdil in the equations of Table 1. Anagously, \(r_{\text {min.Void}}^{\text {ero}}\) is obtained by using η = ηero.

It is noted from (15) that the erosion and dilation depend on the 3 projection thresholds and on the filter size. Therefore, if the user needs to impose the minimum length scale, and the erosion and dilation distances, then the following system of equations must be solved:

$$ \begin{array}{@{}rcl@{}} r_{\text{min.Solid}}^{\text{int}} = r_{\text{min.Solid}}^{\text{int}}(r_{\text{fil}} , \eta_{\text{int}}, \eta_{\text{ero}}) \\ r_{\text{min.Void}}^{\text{int}} = r_{\text{min.Void}}^{\text{int}}(r_{\text{fil}} , \eta_{\text{int}}, \eta_{\text{dil}}) \\ t_{\text{ero}} = t_{\text{ero}} (r_{\text{fil}}, \eta_{\text{ero}} , \eta_{\text{int}}, \eta_{\text{dil}})\\ 2 t_{\text{dil}} = t_{\text{dil}} (r_{\text{fil}}, \eta_{\text{ero}} , \eta_{\text{int}}, \eta_{\text{dil}})\\ \end{array} $$
(16)

The system in (16) is determined and there is only one combination of parameters [rfil, ηero, ηint, ηdil] that leads to the desired length scale [\(r_{\text {min.Solid}}^{\text {int}}\), \(r_{\text {min.Void}}^{\text {int}}\), tero, tdil]. This can be illustrated with the following example. For each combination of thresholds [ηero, ηdil] given in (14a), the erosion and dilation distances [tero, tdil ] are provided, as follows:

$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& {[}0.75, 0.25{]} , [{t_{\text{ero}}} , {t_{\text{dil}}} ] = [1.76, 1.76] \end{array} $$
(17a)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}] &=& {[}0.80, 0.20{]} , {[}{t_{\text{ero}}} , {t_{\text{dil}}} {]} = [1.99, 1.99] \end{array} $$
(17b)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& {[}0.85, 0.15{]} , {[}{t_{\text{ero}}} , {t_{\text{dil}}} {]} = {[}2.21, 2.21{]} \end{array} $$
(17c)
$$ \begin{array}{@{}rcl@{}} {[}{\eta_{\text{ero}}}, {\eta_{\text{dil}}}{]} &=& {[}0.90, 0.10{]} , {[}{t_{\text{ero}}} , {t_{\text{dil}}} {]} = {[}2.43, 2.43{]} \end{array} $$
(17d)

It is recalled that all combinations of thresholds [ηero, ηdil] in (17d) lead to the minimum length scale \(r_{\text {min.Solid}}^{\text {int}} = r_{\text {min.Void}}^{\text {int}} = 3\) elements. However, they all use different filter radii (6.0, 5.4, 4.9, and 4.4 elements, respectively), and they all result in different erosion and dilation distances.

To the authors’ knowledge, the need to impose specific values for the erosion and dilation distances has not yet been claimed in topology optimization, so this manuscript is limited to providing these values for a given combination of parameters. The proposed graphs are shown in Fig. 6c and d, which depend on the erosion and dilation thresholds and on the corresponding minimum size.

5 Sources of error

The analytical procedure developed in this article allows to quickly obtain the set of filtering and projection parameters that imposes the desired minimum length scale. However, in practice, the length scale of the optimized design often differs from the desired values (Qian and Sigmund 2013). This is mainly due to the fact that the analytical method assumes (i) a continuous domain, (ii) a perfect Heaviside projection (\(\beta \to \infty \)), (iii) that the eroded and dilated fields project an infinitesimal minimum size in the solid and void phases, and (iv) a 1-dimensional design domain. To assess the error introduced by these assumptions, in the following, we compare the analytical method with the numerical method proposed by Wang et al. (2011), which considers a discrete domain and a smoothed Heaviside function.

The procedure for obtaining the minimum size using the numerical method is analogous to the analytical method but now using a one-dimensional domain discretized into N elements. For example, to obtain the minimum size of the solid phase the three-field scheme is applied to a one-dimensional design domain ρ containing solid elements in a length h. Then, the sizes of the eroded, intermediate, and dilated fields are measured, and the length h is adjusted so that the resulting eroded field has an infinitesimal size (1 solid element). This process is repeated several times for different values of ηero, and the resulting minimum size is normalized with respect to the size of the chosen filter. For implementation details regarding the numerical method, the reader is referred to the works of Wang et al. (2011) and Fernández et al. (2020), and to the attached MATLAB code named NumericalSolution.m.

To validate the analytical and numerical methods, the latter is implemented using a Heaviside function at β = 500, a filter radius of 1000 elements and a design domain discretized into 10 thousand elements, so the numerical method can be considered continuous and under similar assumptions than the analytical one. The relationships obtained with the numerical method can be seen in the graphs of Fig. 6. The agreement of results from both methods allows us to validate the set of equations provided in Table 1.

The three sources of error that affect the analytical method are discussed below.

5.1 Continuous design domain

When the design domain is discretized using finite elements, the radii that define the minimum sizes (rfil, \(r_{\text {min.Solid}}^{\text {int}}\), \(r_{\text {min.Solid}}^{\text {dil}}\), \(r_{\text {min.Void}}^{\text {int}}\), and \(r^{\text {ero}}_{\text {min.Void}}\)) are described by a discrete number of elements. In this case, the rounding error is ± 1 finite element in the radius. Therefore, to reduce this error, it is sufficient to reduce the size of the elements by mesh refinement. To illustrate this remark graphically, we consider the following two discretizations of a one-dimensional domain, one containing 100 elements and the other containing 200 elements. In our implementation, the size of the filter is chosen equal to 10% of the domain size. Therefore, for the discretizations containing 100 and 200 elements, the filter radius contains 10 and 20 elements, respectively. For each discretization, the relationship between the minimum size of the solid phase, the size of the filter and the erosion threshold is plotted in Fig. 7, using both the analytical and the numerical method.

Fig. 7
figure 7

Relationship between the minimum size of the solid phase, the eroded threshold, and the filter radius. The dotted line represents the analytical relationship including the rounding error

As the analytical method does not depend on the discretization, it provides identical relationships on both discretizations. However, the rounding error associated to the analytical method does depend on the discretization and can be plotted as an offset of the analytical curve, as shown by the dashed curves in Fig. 7. The rounding error, denoted as δr, corresponds to 1 element in the radius, i.e. 2 elements in the diameter. That is, the vertical offset of the analytical curve due to the rounding error is equal to 2δr = 2/10 and to 2δr = 2/20 in Figs. 7a and b, respectively.

The error curves agree with the results obtained from the numerical method, which shows that the error of the analytical method coming from the assumption of a continuous domain can be easily estimated. This estimation allows to know either the margin of error of the minimum size (δr) for a given analytical threshold (ηero or ηdil), or the margin of error of the analytical threshold (δη) for a given minimum size, as shown in Fig. 7a.

If the estimated rounding error is not tolerable, higher precision in the minimum size control can be achieved using the numerical method proposed by Wang et al. (2011), as this uses a design discretized into finite elements. For the sake of completeness, this work provides the reader with a MATLAB implementation of the numerical method, which is called NumericalSolution.m. This code generates the graphs of Fig. 6 taking into account a design domain discretized into finite elements. The discretization is provided by the user by means of an approximate number of finite elements defining the filter radius. From the generated graphs, threshold values and the corresponding filter radius can be determined as described in Section 4.

5.2 Perfect Heaviside projection

The analytical method developed in this work assumes a perfect Heaviside function, which results in a projected field \(\boldsymbol {\bar {\rho }}\) containing discrete densities (0 and 1). However, in topology optimization, the Heaviside function is smoothed resulting in regions of intermediate densities that lie on the surface of the optimized structure. For this reason, in practice, once the optimized solution \({{\boldsymbol {\bar {\rho }}}_{\text {int}}}\) is obtained, a cut-off value ε is applied on the projected densities to get the optimized structure. Therefore, the final design intended for manufacturing is obtained by projecting the design \({{\boldsymbol {\bar {\rho }}}_{\text {int}}}\) as follows:

$$ {\bar{\rho}^{\varepsilon}}_{i} = \left\lbrace \begin{array}{ll} 1, & \text{if} \bar{\rho}_{\text{int}(i)} \geq \varepsilon \\ 0, & \text{otherwise} \end{array} \right. $$
(18)

Since the post-processed design \(\boldsymbol {\bar {\rho }^{\varepsilon }}\) is the one intended for manufacturing, the analytical expressions relating the minimum length scale and the parameters that define it must be elaborated for the field \(\boldsymbol {\bar {\rho }^{\varepsilon }}\). As explained hereafter, equations provided in Table 1 can be easily adapted to consider the cut-off value ε.

Consider Fig. 8 illustrating a transition zone between a solid structure and a void region. The filtered field \(\boldsymbol {\tilde {\rho }}\) is shown in blue and the projected field \(\boldsymbol {\bar {\rho }}\) in red. The latter is obtained with β = 32. In this illustration, the density cut-off is defined as ε = 0.95. A perfect Heaviside projection (\(\beta \to \infty \)) would define the size of the solid zone at the coordinate xi. However, the smoothed Heaviside projection defines the solid/void transition in the coordinate xε. The idea then is to find the projection threshold ηε for which a perfect Heaviside projection produces the same solid/void transition coordinate than the one that is obtained with a smoothed Heaviside projection with a threshold η. To do so, the value of the filtered density at the coordinate xε must be found. To this end, from Fig. 8 it is observed that:

$$ \varepsilon = \frac{\tanh{(\beta \eta)} + \tanh{(\beta(\tilde{\rho}_{\varepsilon} -\eta))}} {\tanh{(\beta \eta)} + \tanh{(\beta(1 - \eta))}} $$
(19)
Fig. 8
figure 8

Illustration of a transition region where projected densities reach intermediate values

Assuming β > 10 at the end of the optimization process, which is a common practice when dealing with Heaviside projection, (19) can be simplified to:

$$ \tanh{(\beta(\tilde{\rho}_{\varepsilon} -\eta))} = 2\varepsilon -1 $$
(20)

From (20), the filtered density \(\tilde {\rho }_{\varepsilon }\) can be obtained:

$$ \tilde{\rho}_{\varepsilon} = \eta + \frac{1}{\beta} \text{atanh}(2\varepsilon -1) $$
(21)

It is recalled that for a perfect Heaviside projection, the threshold parameter represents the density value defining the void to solid transition. In this case, the transition is imposed at \(\tilde {\rho }_{\varepsilon } = \eta _{\varepsilon }\) = \(\eta + \frac {1}{\beta } \text {atanh}(2\varepsilon -1)\). Therefore, to take into account the intermediate densities resulting from a smoothed Heaviside function, the shifting term atanh(2ε − 1)/β must be added to the thresholds involved in the analytical equations. Note that if \(\beta \to \infty \) or ε = 0.50, then the shifting term is zero and ηε = η.

To assess the error introduced by a smoothed Heaviside projection, the minimum length scale obtained with the analytical and numerical methods are compared. The analytical method is applied with \(\beta \to \infty \), so it does not consider the shifting term on the thresholds. For the numerical method we use β = 32, a filter radius equal to 200 and a one-dimensional domain discretized into 2000 elements in order to avoid rounding errors and isolate the effect of using a smoothed Heaviside projection. In the numerical method, three cut-off values are used, ε = 0.01, ε = 0.50 and ε = 0.99. The results are shown in Fig. 9a.

Fig. 9
figure 9

(a) Minimum length scale obtained with the analytical method assuming a perfect Heaviside projection (\(\beta \to \infty \)), and with the numerical method using a smoothed Heaviside projection (β = 32) and three different cut-off values ε. (b) The analytical curves obtained by adding the shifting term atanh(2ε − 1)/β to the thresholds

The results show that the influence of using a smoothed Heaviside function is observed when ε≠ 0.5 and when ηero > 0.75. For this reason, we recommend to use a density cut-off value equal to 0.5, as this avoids the need to add the shifting term to the projection thresholds. Nevertheless, the user can easily adjust the analytical curves for ε≠ 0.5, since it is only required to add atanh(2ε − 1)/β to the projection thresholds, as shown in the corrected curves in Fig. 9b.

It is worth mentioning that probably the effect of using a smoothed Heaviside function is only seen for ηero ≥ 0.75 because the projected field becomes more discrete as the projection threshold is closer to 0.5 (Wang et al. 2011).

5.3 Infinitesimal size

To obtain the minimum size, the analytical method assumes that the size of the structural members/cavities is infinitesimal (≈ 0) in the eroded/dilated design, but in practice this does not occur. In topology optimization, it is observed that the smallest structural members/cavities in the eroded/dilated design are composed of one or a few elements, generally described with intermediate densities. Thus, in practice, the minimum size of the solid phase in the eroded design (\(r_{\text {min.Solid}}^{\text {ero}}\)) results in a discrete number of elements. This can be seen in Fig. 10, which is build using the numerical method. There, a filtered field and its eroded projection under the robust condition are shown. It can be seen that the minimum size of the eroded design is not infinitesimal, and therefore the minimum size of the solid phase in the intermediate and dilated design would be larger than the value predicted by the analytical method.

Fig. 10
figure 10

Illustration in which an infinitesimal size is not reached for the eroded projection

The minimum size of the solid and void phases in the eroded and dilated designs (\(r_{\text {min.Solid}}^{\text {ero}}\) and \(r_{\text {min.Void}}^{\text {dil}}\)) is defined by the size of the elements that discretize the design space. In addition, the amount of elements with intermediate densities defining the minimum size depends on the steepness of the smoothed Heaviside function (β); therefore, the error introduced by assuming an infinitesimal size in the robust condition is related to the two sources of error mentioned previously. To isolate the effect of the infinitesimal size in the robust condition and illustrate the error introduced by the assumption of infinitesimal size, we make use of the numerical method. The attached MATLAB code is called using a one-dimensional domain discretized into a large number of elements (104 elements), and using a large filter radius (103 elements) to simulate a continuous domain. The steepness parameter of the smoothed Heaviside projection is set as β = 512. Thus, the size and density of the elements are excluded from the analysis. The effect of not achieving an infinitesimal size in the condition of robustness is intentionally imposed in the numerical code. For this, the robustness condition is considered satisfied if \(r_{\text {min.Solid}}^{\text {ero}} = \alpha r_{\text {fil}}\). Considering that \(r_{\text {min.Solid}}^{\text {ero}}\) represents one finite element in topology optimization, and that representative values for rfil are between 2 and 10 elements, it is reasonable to consider values for α ranging from 0.1 to 0.5. Taking into consideration the above, we build the graphical solutions that relate the minimum size in the solid phase (\(r_{\text {min.Solid}}^{\text {int}}\)), the filter radius, and the erosion threshold. The graph is shown in Fig. 11.

Fig. 11
figure 11

Effect of not reaching an infinitesimal size in the condition of robustness \(r_{\text {min.Solid}}^{\text {ero}}=0\). This condition is assessed by imposing \(r_{\text {min.Solid}}^{\text {ero}}= \alpha r_{\text {fil}}\)

The graph shows that the error of not achieving an infinitesimal size in the eroded design produces a minimum size of the solid phase bigger than the value predicted by the analytical method. The error related to the infinitesimal size is low in comparison to the rounding error, so the latter would be the most relevant source of error from the analytical method that assumes a continuous design domain.

5.4 Dimensional difference

The analytical equations were developed for a 1D design. In 2D and 3D cases, the analytical method results in numerous equations that are arduous to obtain. In turn, they depend on the desired geometry with minimum size, which in 2D could be a circle or the thickness of a bar for example. To illustrate the error resulting from assuming a 1D design, we use the numerical method in 1D, 2D, and 3D design fields. In all three cases, we filter a design discretized in N elements with a solid part of size h. The geometries to be filtered are shown in Fig. 12a, and the filtered fields along the symmetry axis in Fig. 12b. One can appreciate significant differences between the 1D field and the 2D circular and 3D spherical ones. The latter are smaller in size than the 1D design, probably due to the curvature of such designs. However, the 1D case and 2D bar are quite similar, since the cross-section of the bar resembles the 1D case. This observation was also noted when considering 3D plates, which proves that the 1D case provides a good approximation for bar and plates members. For other design features, such as bar tips or circular cavities, the error introduced by the dimensional difference could be significant and even greater than the rounding error. Therefore, in such cases, it is advisable to resort to the numerical method using 2D or 3D designs, or to work out the system of equations for 2D and 3D.

Fig. 12
figure 12

Comparison of filtered fields for different dimensions. (a) Initial design fields. (b) Filtered fields. In each case, h = 40 elements and rfil = 30

In summary, this section discussed the scope of the analytical method (Qian and Sigmund 2013) by comparing it with the numerical one (Wang et al. 2011), both developed for a one-dimensional design domain. To this end, different sources of error were examined. In general, the errors can be controlled by mesh refinement or by correcting the projection thresholds according to the cut-off ε value. In the following section, the analytical method is assessed using 2D-topology optimization problems.

6 Numerical examples and discussion

This section examines the reliability of the analytical expressions provided in Table 1. To this end, a set of 2D topology optimization problems are solved, from which the length scale is measured graphically and compared with the imposed values. Then, some designs obtained with maximum size constraints are provided to illustrate the use of the erosion and dilation distances. Finally, this section provides a remark regarding the simplified robust formulation, where the intermediate and dilated designs are removed from the objective function.

6.1 Minimum length scale

The minimum length scale is assessed using the heat exchanger design problem described in Section 2. A set of results is generated from this problem, which differ in the desired minimum length scale and in the discretization used. Specifically, three sets of solutions are obtained by discretizing the design domain into 100 × 100, 200 × 200, and 400 × 400 quadrilateral elements. In addition, three different length scales are prescribed for each discretization, which are reported as the ratio between the minimum size of the solid phase and the minimum size of the void phase, i.e. \(r_{\text {min.Solid}}^{\text {int}}/r_{\text {min.Volid}}^{\text {int}}\). The chosen ratios are 1/2, 1/1, and 2/1. The minimum size in the solid phase is the same in all scenarios and is defined as a physical dimension. In number of finite elements, the radius that defines the minimum size of the solid phase (\(r_{\text {min.Solid}}^{\text {int}}\)) is equal to 1, 2, and 4, for the discretizations that use 1002, 2002, and 4002 elements, respectively. It is well known that the initial values of design variables have a huge influence on the resulting topology when it comes to thermal compliance minimization (Yan et al. 2018); hence, in order to facilitate the comparison of results, we impose a base structure as a starting point, which is shown in Fig. 13. Before presenting the results, the procedure to obtain the minimum length scale from the optimized designs is detailed.

Fig. 13
figure 13

Initial distribution of design variables considered for the thermal compliance minimization problem

The minimum size of the solid phase is measured manually by counting the number of finite elements that define the size of the thinnest structural branch. Similarly, the minimum size of the void phase is measured by counting the elements in the radius of the largest circumference that can be inscribed at the re-entrant corners of the design. For example, consider the design of Fig. 14c where the minimum length scales \(r_{\text {min.Solid}}^{\text {int}} = r_{\text {min.Void}}^{\text {int}} = 2\) elements are imposed. To determine the real minimum size of the void phase, the largest circle in Fig. 14a that falls into the re-entrant corners of the design is identified. The corners analyzed are those that form a sharp angle between two structural branches. Figure 14b shows three representative re-entrant corners of the design depicted in Fig. 14c. From there it is observed that the minimum size is given by a circle of radius 2 elements (zone C). Similarly, the largest region that fits into the thinnest structural members is determined, as shown in Fig. 14d. There, the minimum size of the solid phase is given by a circle of radius 1.5 elements (zone D).

Fig. 14
figure 14

Illustration of the minimum length scale measurement. (a) the test regions and their radius sizes given in number of finite elements. (b) the minimum size of the void phase, (c) the optimized heat exchanger, and (d) the minimum size of the solid phase. The imposed length scales are graphically shown in (c), at the upper left corner of the design

After describing the test case, the obtained results are presented. Table 2 contains the nine results generated in this example (3 length scales × 3 discretizations). The imposed minimum length scales are reported graphically next to each solution. The minimum size of the void phase is indicated in blue, while the minimum size of the solid phase in magenta. The table also reports the 3 parameters required to impose the desired minimum length scales, i.e. ηero, ηdil, and rfil, which have been obtained using the analytical method implemented in the MATLAB code SizeSolution.m. It is recalled that all the examples assume ηint = 0.5.

Table 2 Optimized designs for the heat exchanger problem. The imposed volume constraint is \(V^{*}_{\min \limits }=20\%\)

The measured minimum size of the solid and void phases are reported on Fig. 15a and b, respectively. To construct these graphs, the measured minimum sizes are normalized with respect to the desired minimum sizes, and the values are placed in the ordinate coordinate. This is done for each discretization (which determines the abscissa) and for each length scale. This procedure is also carried out with results obtained from the numerical method, which is executed using representative discretizations for each case. The values obtained from the numerical method are labeled as 1D in the graphs of Fig. 15, while the values measured from the optimized designs are labeled as 2D. The error bars in Fig. 15 illustrate the rounding error present in the analytical method (see Section 5.1 for definition).

Fig. 15
figure 15

The graphs summarize the measured minimum size of (a) the solid phase and (b) the void phase from the designs in Table 2. For each discretization, two sets of results are provided, labeled as 2D and 1D. 2D represents the graphical measurement normalized with respect to the imposed value. 1D represents the minimum size obtained from the numerical method normalized with respect to the imposed value

As a general observation, we can point out from Fig. 15 that mesh refinement reduces the error between the measured minimum size and the desired minimum size. This is consistent with the observations made in the previous section, where a 1D-continuous design domain was used. In addition, the predicted error for the analytical method (the error bars) are also consistent with the measured sizes, which validates the scope and limitations of the analytical equations discussed in Section 5.

Regarding the graph in Fig. 15a, the error between the measured and desired minimum sizes is half a finite element in all nine cases. This error is relatively large in the coarse discretization (50% error), and small in the fine discretization (12.5% error). However, despite the fact that the analytical method is not exact, it seems to be accurate enough in the examples examined, since in all cases the error is the same, half a finite element. It is interesting to note that the numerical method that assumes a discrete 1D domain estimates a minimum size that differs by half a finite element with respect to the imposed value, which matches the measured error. However, the numerical method provides a minimum size of the solid phase larger than the measured one. This is probably due to the fact that the condition of robustness refers to one finite element and not to an infinitesimal size, as discussed in Section 5.3 as well as the fact that the 2D minimum size tends to be smaller than the 1D one as showed in Section 5.4.

On the other hand, the graph built for the void phase (Fig. 15b) shows a different pattern. The measured minimum size of the void phase is often equal to the desired one and even bigger for some designs. This could be explained by the simple fact that the chosen test case does not present a geometric singularity over the minimum size of the void phase; therefore, it is not possible to guarantee that the smallest re-entrant corner of the design will indeed correspond to the minimum size imposed by the robust formulation. The representative case might be that where \(r_{\text {min.Void}}^{\text {int}}\) is chosen twice the size \(r_{\text {min.Solid}}^{\text {int}}\) (ratio 1/2). In such a case, the measured error corresponds to half a finite element smaller than the desired value, that is, the same result as for the solid phase. Finally, in both phases, this example shows that the rounding error is the biggest one and that the 2D error seems to be under this limit.

6.2 Erosion and dilation distances

In the following example, we illustrate the use of the erosion and dilation distances that are provided for a desired minimum length scale. To this end, we use maximum size constraints, where the erosion and dilation distances are essential information to impose a consistent length scale in the robust formulation (Fernández et al. 2020). For the sake of completeness of the manuscript, the non-linear force inverter is considered in this illustrative example. The topology optimization problem of the non-linear force inverter including maximum size constraint reads as follow:

$$ \begin{array}{ll} \min \quad & \max\left( \text{c}({{\boldsymbol{\bar{\rho}}}_{\text{ero}}}), \text{c}({{\boldsymbol{\bar{\rho}}}_{\text{int}}}) , \text{c}({{\boldsymbol{\bar{\rho}}}_{\text{dil}}}) \right) \\ \text{s.t.:} \quad & \mathbf{v}^{\intercal} {{\boldsymbol{\bar{\rho}}}_{\text{dil}}} \leq V^{*}_{\text{dil}}(V^{*}_{\text{int}}) \\ & \text{G}_{\text{ms}}({\boldsymbol{\bar{\rho}}}_{\text{dil}}) \leq 0 \\ & 0 \leq \rho_{i} \leq 1 , i=1,...,N , \end{array} $$
(22)

where Gms is the maximum size constraint defined exactly as in Fernández et al. (2020). Therefore, Gms represents a p-mean aggregation function that gathers local maximum size restrictions. As in the cited work, the p aggregation exponent is set at 100.

Regarding the optimization parameters, these represent the implementation of Wang et al. (2014), i.e. the Heaviside parameter β is initialized at 1 and is increased by 1 every 20 iterations until a value β = 16 is reached. Then, 20 more iterations are carried out with a β = 32. The SIMP penalty parameter is set at 3. We have found that this setting of parameters works well for introducing maximum size restrictions into the non-linear force inverter formulated under the robust design approach.

To impose minimum and maximum length scales, the maximum size constraint Gms is applied on the dilated design (Fernández et al. 2020). To do so, the regions where the local maximum size constraints are applied must be scaled according to the dilation distance. For instance, if the desired maximum size in the intermediate design is defined by a circle of radius \(r_{\text {max.Solid}}^{\text {int}}\), the maximum size constraint should be formulated for the dilated design using a circle of radius:

$$ r_{\text{max.Solid}}^{\text{dil}} = r_{\text{max.Solid}}^{\text{int}} + t_{\text{dil}} $$
(23)

Equation (23) explains the need of knowing the dilation distance which is derived from the size in the dilated projection when imposing maximum size restrictions in the robust formulation. As mentioned previously, this information can be easily obtained from the graphs generated by the analytical equations. For example, in the following, the half force inverter depicted in Fig. 1 is solved. The design domain is discretized into 200 × 100 quadrilateral finite elements. The minimum size of the solid phase is set as \(r_{\text {min.Solid}}^{\text {int}} = 2\) elements, while the maximum size is set as \(r_{\text {max.Solid}}^{\text {int}} = 3\) elements. Two different values for the minimum size of the void phase are chosen, \(r_{\text {min.Void}}^{\text {int}} = 2\) and \(r_{\text {min.Void}}^{\text {int}} = 3\) elements. The filter and projection parameters used to impose the desired length scale are reported in Table 3. In all cases, the volume constraint is set to 25%.

Table 3 Parameters used in Figs. 16 and 17

To obtain the dilation distance tdil, the projection thresholds that define the minimum length scale must be defined. These values can be graphically obtained from Fig. 6, or from the attached MATLAB code (SizeSolution.m). For example, using this code, the sets of parameters in Table 3 are obtained. The dilation distance is also reported there. For the minimum sizes \(r_{\text {min.Void}}^{\text {int}} = 2\) and \(r_{\text {min.Void}}^{\text {int}} = 3\) elements, the dilation distances are tdil = 1 and tdil = 2 elements, respectively (the numbers have been rounded to the nearest integer).

The results are shown in Figs. 16 and 17. Each figure reports 2 optimized designs, which are obtained with and without maximum size restrictions. To facilitate the visual comparison between results, the designs are placed with respect to the symmetry axis and are reported in their deformed configuration. The imposed length scale is also reported graphically next to each design. As in the previous examples, the blue and magenta circles represent the minimum size of the void and solid phase, respectively. The black circle represents the maximum size desired for the intermediate design (which is imposed through the dilated design)Footnote 2.

Fig. 16
figure 16

Nonlinear force inverter without (upper half) and with (lower half) maximum size constraints. The minimum length scales are \({r}_{\text {min.Solid}}^{\text {int}} = {r}_{\text {min.Void}}^{\text {int}} = 2\) elements. The maximum size is \({r}_{\text {max.Solid}}^{\text {int}}=3\) elements

Fig. 17
figure 17

Nonlinear force inverter without (upper half) and with (lower half) maximum size constraints. The minimum length scales are \({r}_{\text {min.Solid}}^{\text {int}} = 2\) elements and \({r}_{\text {min.Void}}^{\text {int}} = 3\) elements. The maximum size is \(r_{\text {max.Solid}}^{\text {int}}=3\) elements

The results are consistent with the imposed length scales. In the 4 designs reported in Figs. 16 and 17, the minimum size of the solid and void phases are met with a half-finite element of error (which agrees with the analytical rounding error). Regarding the maximum size, this also matches the imposed value. However, due to the inherent drawbacks of the aggregation function and the strong non-linearity of the force inverter design problem, there are local regions where the imposed maximum size restriction is not met, such as the horizontal bar in the design of Fig. 17.

This force inverter test case shows the usefulness of the proposed equations and provided codes, since they allow to quickly obtain the filter and projection parameters, and the dilation distance that allow to impose the desired length scales.

6.3 Remark on the simplified robust formulation

Before concluding this manuscript we devote a discussion concerning the robust formulation. It is widely known that the robust formulation of the optimization problem can be simplified when the objective function is monotonically dependent on the volume fraction. The most widespread case in the literature is the compliance minimization problem, where the intermediate and dilated fields have less compliance than the eroded design and therefore can be removed from the objective function without compromising the robustness of the formulation. In this case, the objective function is evaluated only for the eroded design, with the intermediate and dilated fields remaining solely for formulating design constraints. When the volume restriction is the only constraint included in the optimization problem, the constraint can be formulated using the intermediate design, assuming that this design field is the one intended for manufacturing. However, it has been mentioned in the literature that evaluating the volume restriction in the dilated design promotes convergence to better optimums since numerical instabilities are prevented. In this section we add another reason that has not been mentioned so far (to the best of the authors’ knowledge). If the dilated design is not included in the volume restriction, then it is not possible to ensure the control over the minimum size of the void phase. To explain this statement, consider the following two robust topology optimization formulations for the thermal compliance minimization problem:

$$ \begin{array}{cc} \text{{P.I}} & \text{{P.II}}\\ \overbrace{\begin{array}{rl} \underset{\boldsymbol{\rho}}{\min} & \quad c(\boldsymbol{\bar{\rho}}_{\text{ero}})\\ \text{s.t. :} & \quad \mathbf{v}^{\intercal} \bar{\boldsymbol{\rho}}_{\text{int}} \leq {V}_{\text{int}}^{*},\\ & \quad 0 \leq {\rho_{i}} \leq 1 \end{array}} & \quad \overbrace{\begin{array}{rl} \underset{\boldsymbol{\rho}}{\min} & \quad c(\bar{\boldsymbol{\rho}}_{\text{ero}}) \\ \text{s.t. :} & \quad \mathbf{v}^{\intercal} \bar{\boldsymbol{\rho}}_{\text{dil}} \leq {V}_{\text{dil}}^{*} ({V}_{\text{int}}^{*})\\ & \quad 0 \leq {\rho_{i}} \leq 1 \end{array}} \end{array} $$
(24)

The two optimization problems, P.I and P.II in (24), are formulated under the robust design approach, but P.I evaluates the volume constraint directly in the intermediate design while P.II does it through the dilated design, whose upper bound \(V^{*}_{\text {dil}}\) is scaled according to \(V^{*}_{\text {int}}\). From (24) it is clear that P.I\(({\boldsymbol {\bar {\rho }}}_{\text {ero}}, {\boldsymbol {\bar {\rho }}}_{\text {int}})\) and P.II\(({\boldsymbol {\bar {\rho }}}_{\text {ero}}, {\boldsymbol {\bar {\rho }}}_{\text {int}}, {\boldsymbol {\bar {\rho }}}_{\text {dil}})\). Therefore, P.I is not influenced by the dilated design nor the dilation threshold.

We recall that the condition of robustness imposed for the void phase involves the dilated design, which has to project a cavity with at least one void element to be present in the 3 fields that constitute the robust formulation. The influence of the dilated design on the minimum size of the void phase can be seen graphically in Fig. 6a by considering a fixed erosion threshold and different dilation thresholds. For example, for [ηdil, ηero] consider the points [0.14,0.60] and [0.40,0.60]. The first point corresponds to a length scale where the minimum size of the void phase is equal to that of the solid phase, while the second point imposes the size of the void phase twice that of the solid phase. In the following, problems P.I and P.II are solved using the two sets of thresholds indicated previously, which are summarized in Table 4. Results are shown in Fig. 18. As in previous examples, blue and magenta circles next to each solution represent the minimum size of void and solid phases, respectively.

Fig. 18
figure 18

Heat exchanger design problem using two different variations of the robust formulation. P.I evaluates the volume constraint directly in the intermediate design, while P.II does it through the dilated design. Here, ηero = 0.60 and \(r_{\text {min.Solid}}^{\text {int}}=4\) elements

Table 4 Parameters used in Fig. 18

Clearly, results obtained using P.II show a length scale consistent with the expected one, as the design in Fig. 18a features bigger reentrant corners than the design in Fig. 18b. However, for any value of ηdil, the result from P.I is always the same and corresponds to that shown in Fig. 18d. The interpretation that can be made of the P.I problem is that it uses a dilation threshold equal to the intermediate one, i.e. ηdil = ηint = 0.5. This can be corroborated by solving P.II with the set [ηdil,ηero] equal to [0.50, 0.60], whose result is shown in Fig. 18c.

7 Conclusion

The robust topology optimization formulation based on uniform manufacturing errors has gained increasing acceptance in the topology optimization community. This is mainly due to its ability to control the minimum size of both the solid and void phases, and its potential to be combined with other topology optimization approaches. Despite the increasing popularity of the formulation, no method was yet available to easily obtain the filter and projection parameters that produce the desired minimum length scales. This need encouraged us to further develop the analytical method proposed by Qian and Sigmund (2013). The scope and limitations of this method were assessed using the numerical method of Wang et al. (2011) and a set of 2D design results from two topology optimization problems, the thermal compliance minimization problem and the non-linear force inverter.

In addition to providing a fast and effective way to obtain the parameters that impose the desired minimum length scale, this work presents an additional justification for applying the volume constraint on the dilated design in the compliance minimization problem subject to a volume constraint. The reason is that all 3 designs must be involved in the optimization problem in order to impose simultaneous control over the minimum size of the solid and void phases.