1 Introduction

In classical continuum structure topology optimization using finite element discretization (Bendsøe and Kikuchi 1988; Bendsøe 1989), two numerical problems called checkerboards and mesh-dependency (Cheng and Olhoff 1981) attracted interests of many researchers. The checkerboard problem refers to the transition fields of alternating black and white elements arranged in a checkerboard-like pattern. The mesh-dependency problem, also called nonexistence of solutions in discretized topology optimization, refers to obtaining different solutions for different mesh sizes or discretizations. As is well known, these two artificial problems will cause numerical instabilities in optimization (Sigmund and Petersson 1998) and lead to results unacceptable. To prevent such problems and obtain black and white topology, restriction methods should be applied to optimization (Sigmund and Petersson 1998).

During the past twenty years, various kinds of restriction methods have been proposed in topology optimization to avoid checkerboards and mesh-dependency problems. The first literature concerned about restriction methods can be traced to 1983 written by Niordson (1983). After the appearance of density-based topology optimization (Bendsøe 1989), Ambrosio and Buttazzo (1993) suggested a perimeter control method in optimal design problem; Haber et al. (1996) used a constraint on perimeter in topology optimization. At the same time, a sensitivity filtering scheme was proposed by Sigmund (1994) which is being widely used in topology optimization because of its simplicity and efficiency. Before long, slope constraint method appeared (Bendsøe 1995; Petersson and Sigmund 1998; Borrvall 2001; Zhou et al. 2001). And then, another popular filtering method called density filter came out (Bourdin 2001; Bruns and Tortorelli 2001). There are also other restriction methods such as level-set method (Sethian and Wiegmann 2000; Wang et al. 2003; Allaire et al. 2004), wavelet parameterization (Kim and Yoon 2000; Poulsen 2002) and phase-field approach (Bourdin and Chambolle 2003; Wang and Zhou 2004).

Among all the restriction methods, filtering methods are probably the most popular ones because they are very simple and efficient. After the basic sensitivity filter (Sigmund 1994) and density filter (Bruns 2001; Bourdin 2001), many other filtering methods based on these two filters have been proposed, such as modified density filter (Guo and Gu 2004), bi-lateral density filter (Wang and Wang 2005), density filter with a Heaviside function (Guest et al. 2004), modified density filter with a Heaviside function (Sigmund 2007), alternative sensitivity filter (Borrvall 2001), sensitivity filter without density weighting (Sigmund 2001), mean sensitivity filter (Sigmund 2007) and bi-lateral sensitivity filter (Wang and Wang 2005). Recently, Sigmund (2007) introduced a new class of morphology-based restriction schemes that work as density filters, which can provide black and white designs with minimum length-scale constraints on hole sizes and structural feature sizes. In general, sensitivity filters and density filters are usually easy for implementation and can eliminate checkerboards and mesh-dependencies effectively. But their results have grey elements around boundaries (boundary diffusion effect), which will bring difficulties to boundary identification in post-processing. This problem can be alleviated by decreasing filter size, but more details in structure will emerge, which is also not expected in topology optimization. Density filters using Heaviside functions and the morphology-based restriction schemes can also solve both the checkerboards and mesh-dependency problems without grey elements at boundaries, but there are other problems like volume preservation and stability.

In this paper, we propose a new filtering method which is volume preserving combining the Heaviside filter (Guest et al. 2004) and the modified Heaviside filter (Sigmund 2007). As will be shown in the following, the new filter is volume preserving, which is a very important feature in filtering (Sigmund 2007). It has several other advantages, such as stable and fast convergence, black and white solutions, etc., which will be discussed in detail in the following.

This paper is organized in the following structure. In Section 2, we give definitions of a compliance minimization problem that is used to test the filters. In Section 3, we introduce several filtering methods in which we are interested briefly. In Section 4, we present the new volume preserving filter which is based on the Heaviside and modified Heaviside density filters. In Section 5, we test and discuss the new filter, and compare it with the filters introduced in Section 3. In Section 6, we discuss some topics associated with filtering. Finally, in Section 7, we summarize and give conclusions.

2 Compliance minimization problem

We consider a simple compliance minimization problem with a material resource constraint. The structure is a cantilever beam shown in Fig. 1.

Fig. 1
figure 1

Design domain and boundaries for the compliance minimization problem

The cantilever beam is discretized with 120×40 bi-linear quadrilateral finite elements. The test example is based on the standard density-based topology optimization, i.e. the design variables are piece-wise constant element densities ρ e . We use linear isotropic materials, and the artificial Young’s modulus of an element is a function of the element density given by the modified simplified isotropic material with penalization (SIMP) interpolation scheme

$$E(\rho_e) = E_{min} + \rho_e^p(E_0-E_{min}),\quad \rho_e \in [0,1], $$
(1)

where E min is a small number representing the stiffness of void material which is used to avoid singularity of the stiffness matrix, E 0 is the Young’s modulus of solid material, and p is the penalization power. In our test example, we choose \(E_{min}=10^{-9}\), E 0 = 1, p = 3, and Poisson’s ratio ν = 0.3.

The optimization problem can be written as

$$ \begin{array}{rcl}\min_{\rho} &:& f(\rho)=\mathbf{U}^T \mathbf{KU}=\sum\limits_e \mathbf{u}_e^T \mathbf{k}_e \mathbf{u}_e\\ s.t. &:& \mathbf{KU=F}\\ &:& g=V(\rho)/V^*-1=\sum\limits_e v_e \rho_e / V^*-1 \leq 0\\ &:& 0 \leq \rho \leq 1 \end{array} $$
(2)

where K, U and F are the global stiffness matrix, displacement vector and force vector respectively. Lower-case symbols represent element-wise quantities. \(\mathbf{k}_e=\mathbf{k}_e(\rho_e)=E(\rho_e)\mathbf{k}_e^0\), E(ρ e ) is defined in (1), \(\mathbf{k}_e^0\) is the element stiffness matrix for unit Young’s modulus. V * is the material resource constraint and v e is the volume of element e. The sensitivity of objective function with respect to design variable is

$$ \begin{array}{rcl} \dfrac{\partial f}{\partial \rho_e} &=& -\mathbf{u}_e^T \frac{\partial \mathbf{k}_e}{\partial \rho_e} \mathbf{u}_e,\\ \dfrac{\partial \mathbf{k}_e}{\partial \rho_e} &=& p (E_0-E_{min}) \rho_e^{p-1} \mathbf{k}_e^0, \\ \dfrac{\partial g}{\partial \rho_e} &=& {v}_e/V^*. \end{array} $$
(3)

It should be pointed out that in optimization using density filters, the density used in (1)–(3) should be physical density, i.e. density after filtering (see Section 6.1 for details).

3 Filtering methods

In this section, we will present four filters that will be used to compare with the new density filter introduced in Section 4. Here we only give their equations with simple explanations. Detailed discussions and comparisons are referred to Sections 5 and 6.

3.1 Sensitivity filter

Sensitivity filter was first presented by Sigmund (1994), which is in the form

$$ \overline{\frac{\partial f}{\partial \rho_e}} = \frac{\sum\limits_{i \in N_e} {w}(\mathbf{x}_i) \rho_i \frac{\partial f}{\partial \rho_i}} {\rho_e \sum\limits_{i \in N_e} {w}(\mathbf{x}_i)}, $$
(4)

where f is the objective or constraint function, ρ e is the density of element e, N e is the neighborhood of element e, which is specified by the elements that have centers within a given filter radius R of the center of element e, i.e.

$$ N_e=\{\, i \mid \|\mathbf{x}_i-\mathbf{x}_e\| \leq R \,\}, $$
(5)

x i is the spatial (center) location of element i, and w(x i ) is the weighting function given by

$$ {w}(\mathbf{x}_i) = R - \|\mathbf{x}_i-\mathbf{x}_e\|. $$
(6)

When using modified SIMP model, there is a possibility that element density ρ e in the denominator of (4) could be zero, thus resulting in an infinite number. In order to avoid such a case, we replace the element density ρ e in the denominator with \(\max(\rho_e,10^{-3})\).

3.2 Density filter

Density filter was introduced by Bruns and Tortorelli (2001) and Bourdin (2001). The formulation is

$$ \bar{\rho}_e = \frac{\sum\limits_{i \in N_e} {w}(\mathbf{x}_i) {v}_i \rho_i}{\sum\limits_{i \in N_e} {w}(\mathbf{x}_i) {v}_i}, $$
(7)

where v i is the volume of element i, and the others are the same as in Section 3.1.

The first derivative of the filtered density \(\bar{\rho}_e\) with respect to ρ i is

$$ \frac{\partial \bar{\rho}_e}{\partial \rho_i} = \frac{{w}(\mathbf{x}_i) {v}_i} {\sum\limits_{j \in N_e} {w}(\mathbf{x}_j) {v}_j}. $$
(8)

The sensitivity of the objective function f with respect to design variable ρ e can be derived by the chain rule

$$ \frac{\partial f}{\partial \rho_e} = \sum\limits_{i \in N_e} \frac{\partial f}{\partial \bar{\rho}_i} \frac{\partial \bar{\rho}_i}{\partial \rho_e}, $$
(9)

where the first part \(\frac{\partial f}{\partial \bar{\rho}_i}\) can be calculated through (3) by replacing ρ e with \(\bar{\rho}_e\), and the second part \(\frac{\partial \bar{\rho}_i}{\partial \rho_e}\) is defined in (8).

3.3 Density filter with a Heaviside function

To obtain 0/1 solutions, Guest et al. (2004) modified the linearly filtered density \(\bar{\rho}_e\) which is obtained by the original density filter in Section 3.2 using a Heaviside step function

$$ \tilde{\rho}_e = \left\{ \begin{array}{ll} 0 &\quad \bar{\rho}_e = 0 \\ 1 &\quad 0<\bar{\rho}_e \leq 1 \end{array} \right.. $$
(10)

The Heaviside step function (10) is smoothed by introducing one parameter β, and then the modified density can be written as

$$ \tilde{\rho}_e = 1-e^{-\beta \bar{\rho}_e}+\bar{\rho}_e e^{-\beta}. $$
(11)

A figure illustrating (11) with different β is shown in Fig. 2.

As we can see, for β equal to zero, \(\tilde{\rho}_e\) is equal to \(\bar{\rho}_e\), i.e. (11) does nothing to linearly filtered density \(\bar{\rho}_e\). For β approaching infinity, (11) acts as the step function (10), i.e. only if \(\bar{\rho}_e\) equal to zero will \(\tilde{\rho}_e\) be zero, and when \(\bar{\rho}_e>0\), \(\tilde{\rho}_e\) is equal to one. For other cases of β, (11) acts as a penalty forcing the intermediate density \(\bar{\rho}_e\) moving to one. In practical optimization process, β is set to a small value (e.g. 0.1) at first, and increased gradually during iteration.

Fig. 2
figure 2

Smoothed Heaviside function with different β

The first derivative of \(\tilde{\rho}_e\) with respect to \(\bar{\rho}_e\) is

$$ \frac{\partial \tilde{\rho}_e}{\partial \bar{\rho}_e} = \beta e^{-\beta \bar{\rho}_e} + e^{-\beta}. $$
(12)

The sensitivity of the objective function f with respect to design variable ρ e can be derived by the chain rule

$$ \frac{\partial f}{\partial \rho_e} = \sum\limits_{i \in N_e} \frac{\partial f}{\partial \tilde{\rho}_i} \frac{\partial \tilde{\rho}_i}{\partial \bar{\rho}_i} \frac{\partial \bar{\rho}_i}{\partial \rho_e}, $$
(13)

where the first part \(\frac{\partial f}{\partial \tilde{\rho}_i}\) can be calculated through (3) by replacing ρ e with \(\tilde{\rho}_e\), the second part \(\frac{\partial \tilde{\rho}_i}{\partial \bar{\rho}_i}\) is defined in (12), and the third part \(\frac{\partial \bar{\rho}_i}{\partial \rho_e}\) is defined in (8).

3.4 Modified filter with a Heaviside function

Based on the density filter with a Heaviside function described in Section 3.3, Sigmund (2007) presented another Heaviside filter contrary to that in Section 3.3.

$$ \tilde{\rho}_e = \left\{ \begin{array}{ll} 0 &\quad 0 \leq \bar{\rho}_e < 1 \\ 1 &\quad \bar{\rho}_e = 1 \end{array} \right.. $$
(14)

Following the form of (11), we can also get a smoothed form of (14):

$$ \tilde{\rho}_e = e^{-\beta (1-\bar{\rho}_e)}-(1-\bar{\rho}_e)e^{-\beta}. $$
(15)

A figure illustrating (15) with different β is shown in Fig. 3.

Fig. 3
figure 3

Smoothed modified Heaviside function with different β

As we can see, the modified Heaviside filter (15) acts exactly contrary to the Heaviside filter (11). For β equal to zero, \(\tilde{\rho}_e\) is equal to \(\bar{\rho}_e\), i.e. (15) does nothing to linearly filtered density \(\bar{\rho}_e\). For β approaching infinity, (15) acts as the step function (14), i.e. only if \(\bar{\rho}_e\) equal to one will \(\tilde{\rho}_e\) be one, and when \(\bar{\rho}_e<1\), \(\tilde{\rho}_e\) is equal to zero. For other cases of β, (15) acts as a penalty forcing the intermediate density \(\bar{\rho}_e\) moving to zero. In practical optimization process, β is set to a small value (e.g. 0.1) at first, and increased gradually during iteration.

The first derivative of \(\tilde{\rho}_e\) with respect to \(\bar{\rho}_e\) is

$$ \frac{\partial \tilde{\rho}_e}{\partial \bar{\rho}_e} = \beta e^{\beta (\bar{\rho}_e-1)} + e^{-\beta}. $$
(16)

The sensitivity of the objective function f with respect to design variable ρ e can be derived by the chain rule (13) like the original Heaviside filter in Section 3.3 but with the second part \(\frac{\partial \tilde{\rho}_i}{\partial \bar{\rho}_i}\) defined in (16).

4 Volume preserving density filter based on Heaviside functions

In this section, we propose a new volume preserving density filter with a Heaviside function by combining the two Heaviside density filters in Sections 3.3 and 3.4.

4.1 The new Heaviside function

To satisfy the requirement of volume preservation, our basic idea is that the new Heaviside function should have such a property: for \(0 \leq \bar{\rho}_e <\eta\), \(\tilde{\rho}_e\) is equal to zero; for \(\eta < \bar{\rho}_e \leq 1\), \(\tilde{\rho}_e\) is equal to one; and for \(\bar{\rho}_e\) equal to η, \(\tilde{\rho}_e\) is η. Here η is a new parameter introduced in our new Heaviside function and η ∈ ]0,1[. The new Heaviside function can be written as:

$$ \tilde{\rho}_e = \left\{ \begin{array}{ll} 0 &\quad 0 \leq \bar{\rho}_e < \eta \\ \eta &\quad \bar{\rho}_e = \eta \\ 1 &\quad \eta < \bar{\rho}_e \leq 1 \end{array} \right.. $$
(17)

The smoothed form of (17) can be written as

$$ \tilde{\rho}_e \!=\! \left\{\!\!\!\!\begin{array}{ll} \eta\left[e^{-\beta(1-\bar{\rho}_e / \eta)}-(1-\bar{\rho}_e / \eta)e^{-\beta}\right] &\quad 0 \leq \bar{\rho}_e < \eta \\ \eta &\quad \bar{\rho}_e = \eta \\ (1-\eta)\big[1-e^{-\beta(\bar{\rho}_e - \eta)/(1-\eta)} &\quad \\ \,(\bar{\rho}_e-\eta)e^{-\beta}/(1-\eta)\big]+\eta&\quad \eta < \bar{\rho}_e \leq 1 \end{array} \right., $$
(18)

in which there are two parameters β and η. Note that the first and third expressions of (18) are both equal to η for \(\bar{\rho}_e=\eta\), which means the new Heaviside function (18) is a continuous function. We can rewrite it as

$$ \tilde{\rho}_e \!=\! \left\{\!\!\!\!\begin{array}{ll} \eta\left[e^{-\beta(1-\bar{\rho}_e / \eta)}-(1-\bar{\rho}_e / \eta)e^{-\beta}\right] &\quad 0 \leq \bar{\rho}_e \leq \eta \\[3pt] (1-\eta)\big[1-e^{-\beta(\bar{\rho}_e - \eta)/(1-\eta)} &\quad \\ \,(\bar{\rho}_e-\eta)e^{-\beta}/(1-\eta)\big]+\eta &\quad \eta < \bar{\rho}_e \leq 1 \end{array} \right., $$
(19)

Figures illustrating (19) with different β and η are shown in Figs. 4, 5.

Fig. 4
figure 4

Smoothed volume preserving Heaviside function with different β and η = 0.3

Fig. 5
figure 5

Smoothed volume preserving Heaviside function with different β and η = 0.5

As we can see, the new Heaviside filter (19) is a combination of the original Heaviside filter (11) and the modified Heaviside filter (15) by simply rescaling them from [0,1] to [η,1] and [0,η] respectively. When η approaches 0, (19) is degenerated to the original Heaviside filter (11), and when η approaches 1, (19) is degenerated to the modified Heaviside filter (15). For η between 0 and 1, (19) is a combination of the two, as in Figs. 4, 5. We can also see that for β equal to zero, \(\tilde{\rho}_e\) is equal to \(\bar{\rho}_e\), i.e. (19) does nothing to linearly filtered density \(\bar{\rho}_e\). For β approaching infinity, (19) acts as the step function (17), i.e. only if \(\bar{\rho}_e\) equal to η will \(\tilde{\rho}_e\) be η, and for all other values of \(\bar{\rho}_e\), \(\tilde{\rho}_e\) is equal to 0 or 1. For other cases of β, (19) acts as a penalty forcing the intermediate density \(\bar{\rho}_e\) moving towards 0 and 1. In practical optimization process, β is set to a small value (e.g. 0.1) at first, and increased gradually during iteration.

The derivative of \(\tilde{\rho}_e\) with respect to \(\bar{\rho}_e\) is

$$ \frac{\partial \tilde{\rho}_e}{\partial \bar{\rho}_e} = \left\{ \begin{array}{ll} \beta e^{-\beta(1-\bar{\rho}_e / \eta)}+e^{-\beta} &\quad 0 \leq \bar{\rho}_e \leq \eta \\ \beta e^{-\beta(\bar{\rho}_e - \eta)/(1-\eta)}+e^{-\beta} &\quad \eta < \bar{\rho}_e \leq 1 \end{array} \right.. $$
(20)

Note that the two expressions in (20) are both equal to β + e  − β (which is always greater than 1 for β > 0) for \(\bar{\rho}_e =\eta\), which means the first derivative of \(\tilde{\rho}_e\) with respect to \(\bar{\rho}_e\) (20) is also continuous. A figure illustrating (20) is shown in Fig. 6, from which we can see that it’s larger near density \(\bar{\rho}_e =\eta\), and almost zero for other densities (not including β = 0). The contrast is more distinct for larger β.

Fig. 6
figure 6

The first derivative of \(\tilde{\rho}_e\) with respect to \(\bar{\rho}_e\) with η = 0.5 and different β

The sensitivity of the objective function f with respect to design variable ρ e can be derived by the chain rule (13) like the original Heaviside filter in Section 3.3 but with the second part \(\frac{\partial \tilde{\rho}_i}{\partial \bar{\rho}_i}\) defined in (20).

4.2 Volume preserving and determination of η

When using density filters, the density of a specific element is changed at first, and the volume of the whole structure after filtering is obtained with density filters applied to every element in the structure. The original Heaviside filter and modified Heaviside filter are not volume preserving, i.e. volumes before and after filtering are not the same, especially when there are many grey elements in the structure.

The volume before volume preserving filtering is \(\sum\limits_{i=1}^{N} \bar{\rho}_i {v}_i\), and the volume after filtering is \(\sum\limits_{i=1}^{N} \tilde{\rho}_i {v}_i\), where N is the number of elements. According to volume preserving condition, the volume before and after filtering should be the same:

$$ \sum\limits_{i=1}^{N} \tilde{\rho}_i {v}_i = \sum\limits_{i=1}^{N} \bar{\rho}_i {v}_i. $$
(21)

Note that (21) has only one unknown number η, so η can easily be determined by solving (21) using a simple one-dimensional search (e.g. Bi-section method or golden section search method).

At first steps of iteration when β is small, the penalty of the filter to intermediate densities is weak. At this time, the SIMP interpolation scheme makes the most important role in penalizing grey elements until it comes to near the optimal design. With the optimization going on and β increasing (especially when β is greater than 50, the lines in Figs. 4, 5 is almost vertical near η and horizontal away from it), the volume preserving Heaviside filter takes the control giving great penalty to elements that still have densities other than 0 and 1, and quickly results in discrete solutions. Here we should point out that the volume preserving Heaviside filter does no penalty to density exactly equal to η (\(\tilde{\rho}_e =\eta\) when \(\bar{\rho}_e =\eta\)), but this density will be changed in the next iteration, because the SIMP interpolation scheme is still penalizing intermediate densities including η. Once the density is pulled away from η, it will be penalized greatly by the filter and move to 0 or 1 quickly. So at the end of iteration, elements with intermediate densities are very limited. The volume preserving Heaviside filter and the SIMP interpolation scheme work together with different importance at different stages in optimization, and they match each other very well.

4.3 Filtering implementation

Now we give a summary to the filtering process using volume preserving Heaviside filter. First, we have the design variable ρ e get from last optimization iteration; second, we apply a linear density filtering (7) to design variable ρ e and get \(\bar{\rho}_e\); third, solve (21) to get η using one-dimensional search; fourth, apply volume preserving filtering to linearly filtered density \(\bar{\rho}_e\) and get \(\tilde{\rho}_e\), which is the physical density (Sigmund (2007); Section 6.1). And then, the physical density \(\tilde{\rho}_e\) is used to calculate objective function, sensitivities and other quantities needed in optimizer. Through optimizer, we get a new design and a new iteration starts. The optimization procedure with volume preserving Heaviside filter is shown as follows:

  1. 1.

    Initialize design variable ρ, iter = 0, change = 1, β = 0.1;

  2. 2.

    while change>0.01 and iter< =1000

  3. 3.

    iter = iter + 1;

  4. 4.

    Calculate linearly filtered density \(\bar{\rho}_e\) using (7);

  5. 5.

    Calculate η by solving (21);

  6. 6.

    Calculate physical density \(\tilde{\rho}_e\) using (19);

  7. 7.

    Solve FE problem based on physical density \(\tilde{\rho}_e\);

  8. 8.

    Calculate objective function, constraint function, and sensitivities;

  9. 9.

    Update design variables ρ new using MMA;

  10. 10.

    Calculate change= || ρ new  − ρ|| ∞ ;

  11. 11.

    if { ( mod(iter,50)=1 or change<0.01 ) and β ≤ β max }

    then β = 2β;

    change=0.5;

    end

  12. 12.

    end

where β max is 200 for the volume preserving Heaviside filter. From the algorithm (Step 11), we can see that the final β should be between β max and 2β max (see Table 1).

Table 1 Results of the compliance minimization problem

5 Results of test example

In this section, we’ll test the five filtering methods described in Sections 3 and 4 through a simple compliance minimization problem described in Section 2. Through this example, some issues in filtering are analyzed and discussed in detail (Section 6).

We consider the problem with volume fraction 0.5 and filter radius R = 3.5, and we use the Fortran implementation of the method of moving asymptotes (Svanberg 1987) as the optimizer. The whole procedure has been shown in Section 4.3 where β max is 200 for the volume preserving Heaviside filter and 500 for the non-volume preserving Heaviside filters.

To have a “measure of discreteness”, i.e. a way to tell whether an optimized design has converged to a discrete solution, we adopt the measure (Sigmund 2007)

$$ M_{nd} = \frac{\sum\limits_{e=1}^n 4\tilde{\rho}_e (1-\tilde{\rho}_e)}{n} \times 100\%, $$
(22)

which is in the form of a parabolic function. If a density distribution is fully discrete, i.e. all the element densities are 0 or 1, M nd is 0(%). If the design is totally grey, i.e. all element densities are 0.5, M nd is 100(%).

The results of the test example are shown in Table 1. For comparison, some similar results from Sigmund (2007) are also given.

From Table 1, we can see that our results agreed with the results from the literature. Analyzing the results, we can see that Heaviside filters have clearer topologies (M nd are much smaller) and smaller objective functions. The original Heaviside filter has the smallest objective function, but it is an infeasible design because volume constraint has been violated. The volume preserving Heaviside filter is the clearest with a smaller β. From our experiences, β in volume preserving filter can be very small (about 50) but still gives discrete 0/1 solutions. And, optimization using volume preserving Heaviside filter is more stable than that using non-volume preserving Heaviside filters (see Section 6.2). It should be pointed out that we used standard settings (GHINIT=0.5, GHDECR=0.7, GHINCR=1.2) for MMA optimizer when using sensitivity filter and density filter, while used smaller steps (GHINIT=0.1, GHDECR=0.95, GHINCR=1.0) for the three Heaviside filters. The reason that we used different settings is that when using standard settings, Heaviside filter and modified Heaviside filter are unstable due to big changes of β which results in no good result, and when using smaller settings, sensitivity filter and density filter may satisfy the convergence criteria (max change of design variables in two successive iterations smaller than 0.01) before reaching optimal solution.

We’ll not give more examples here in order to keep the paper from becoming too lengthy, but results from other examples that we have done are consistent with the results of the compliance minimization problem.

6 Discussions

6.1 Relations between design variable and physical density

Sigmund (2007) has given a nice explanation of the relations between design variable and physical density. For completeness of the paper, we’ll include it here again.

When using density-based filters, it is the density after filtering that is used in interpolation scheme and calculation of structural stiffness, which we call physical density (\(\bar{\rho}\) for original density filter, \(\tilde{\rho}\) for Heaviside filters), while the density before filtering ρ has no relation to the physical structure. It is only used in the optimizer as design variable. So depending on the usage of different densities, we can easily distinguish them from each other.

When plotting density distribution of the structure, the physical density (density used in the SIMP interpolation scheme) should be plotted, which represent the real structure, while the density before filtering (design variable) can also be plotted, but only can be used as a comparison. For example, the density distribution before filtering using the original Heaviside filter (Section 3.3) is comprised of very thin structures, and when using the modified Heaviside filter (Section 3.4), the density distribution before filtering is comprised of very thick structures, both of which are not real structures.

As to sensitivity analysis, we should also be clear that the sensitivity used in optimizer is the sensitivity of objective function with respect to design variable, which has been shown in the previous sections calculated by the chain rule, not the sensitivity of objective function with respect to physical density.

6.2 Volume preserving

An important feature in filtering is volume preservation, i.e. the volume of material before and after filtering should be the same. The original Heaviside filter (Guest et al. 2004) and modified Heaviside filter (Sigmund 2007) are non-volume preserving, which will cause oscillation in optimization iteration, while the volume preserving filter presented in this paper prevented this problem. To demonstrate this, the iteration histories of the objective function are shown in Fig. 7 (Figs. 8, 9, 10, 11, 12, 13).

Fig. 7
figure 7

Iteration history

Fig. 8
figure 8

Iteration history of Heaviside filter and the positions where β increases

Fig. 9
figure 9

Volume fraction of Heaviside filter and the positions where β increases

Fig. 10
figure 10

Iteration history of modified Heaviside filter and the positions where β increases

Fig. 11
figure 11

Volume fraction of modified Heaviside filter and the positions where β increases

Fig. 12
figure 12

Iteration history of volume preserving Heaviside filter and the positions where β increases

Fig. 13
figure 13

Volume fraction of volume preserving Heaviside filter and the positions where β increases

From Fig. 7, we can see clearly that optimizations with the two non-volume preserving filters oscillating violently with increased iteration number. This is caused by non-volume preservation. In our optimization scheme, β is initialized with a small value (0.1), and doubled when the inner loop has been converged or iterated for 50 times (see Step 11 of the algorithm in Section 4.3). So at first, the influence of the Heaviside filter is not very strong and the violation of the volume constraint is not obvious. The optimization process is stable in the first few iterations. But when β continues to increase, changes between two successive β become larger and larger. Violation of the volume constraint becomes severe (Fig. 9) which results in infeasible design in Heaviside filter (in modified Heaviside filter, the result after filtering is a feasible design but with a volume much smaller than volume constraint, see Fig. 11). The optimizer is no longer able to draw the infeasible design back into the feasible field in limited iteration steps. The iteration becomes unstable (Figs. 8, 10) and sometimes even can not get to an acceptable design. Using the volume preserving filter, we don’t have to worry about violations of volume constraint, and the iterations are very stable compared to the non-volume preserving ones (Figs. 12, 13).

Note that the small oscillation of volume at the end of iteration in Fig. 13 (similar oscillations also exist in original Heaviside filter and modified Heaviside filter, see Fig. 9 and Fig. 11) is caused by the nature of the Heaviside function, and it has no influence to the iteration history of objective function (Fig. 12). In fact, the topology at this point has been already near to the optimal. What the oscillation does is only small adjustment of intermediate densities around the boundaries. From Figs. 4, 5, we can see that the lines are steep near \(\bar{\rho}_e = \eta\) (when β is greater than 10) which will cause elements with densities near η changing frequently between 0 and 1 (which happens around the boundaries), and consequently the volume changes frequently too. If β continues to increase once it reaches the convergence criteria (change<0.01), like in Fig. 13, lines in Figs. 4, 5 become even steeper. Elements with densities near to η are forced to be 0 or 1 with no chances to change. The volume fraction will move to 0.5 at last and optimization be converged.

Figure 14 shows the evolution history of the parameter η. It can be seen that η is always changing during optimization, because η must satisfy the volume preservation condition in every iteration. It also can be proved that parameter η has and only has one root between 0 and 1, see Appendix A for details.

Fig. 14
figure 14

History of η

7 Conclusions

In this paper, we presented a new volume preserving Heaviside filter by combining original Heaviside filter (Guest et al. 2004) and modified Heaviside filter (Sigmund 2007). The most significant feature of the new filter is its volume preservation, that is, volumes before and after filtering are the same, which makes the optimization procedure stable. Another important feature is that the result of the volume preserving filter is quite discrete (black and white solution) with a smaller β than original Heaviside filter and modified Heaviside filter.

In view of success in using the volume preserving Heaviside filter in compliance minimization problem, we are trying to apply this filter in other fields, and preliminary results showed that the new filter is applicable in various applications.