1 Prior work

To date, many topology design algorithms using continuous approximation of the design region have been proposed and exemplified using both, stiff structures and compliant mechanisms. Among the early ones is by Bendsøe and Kikuchi (1988) who proposed the Homogenization approach. The Solid Isotropic Material with Penalization (or SIMP) approach was presented thereafter (Bendsøe 1995) that modeled cell densities as design variables. The elastic modulus E of each cell (or finite element) was approximated as E = ρ n E 0 where E 0 represented the modulus of the desired material. ρ = 0 implied absence of a cell from the topology while ρ = 1 signified its presence. Parameter n(≥3) was used to expedite the cell’s material state to approach one of the two aforementioned binary values. PEAK (Yin and Ananthasuresh 2001) and SIGMOID (Saxena and Saxena 2007) were other material models used to encourage binary topologies in such cell based material layout approaches.

A few node based topology design algorithms were also proposed (e.g., Guest et al. 2004) wherein densities were associated with the nodes (and not the cells). The density at a node was projected using the linear projection and regularized Heaveside functions onto the cells. Many methods employed rectangular finite elements that exhibit well known connectivity singularities like the checkerboards, point flexures, layering and islanding. Filtering was used with cell based approaches to smear out the design and/or the associated gradients (e.g., Sigmund 2007). Mapping of material densities onto the wavelet based design space (Yoon et al. 2004) was another alternative to suppress checkerboards and de facto hinges. Wavelets help express material density in terms of basis functions which are linked to the length scales and are not directly coupled with the finite element mesh (Poulsen 2003). With the node based approaches, it was possible to impose a minimum length scale on the design explicitly (Guest et al. 2004) to prevent single node connections. Formation of local, disconnected layers or islands was avoided with refined finite element meshes (Rahmatallah and Swan 2004).

To naturally eliminate the connectivity singularities, use of honeycomb parameterization was proposed (Saxena and Saxena 2003, 2007). Honeycomb representation offers only edge connectivity between cells and thus ensures finite stiffness at all junctions. Various finite element approximations were employed. E.g., a hexagonal cell was approximated using two four noded elements in three possible ways (Saxena and Saxena 2003, 2007), and using six triangular elements (Langelaar 2007). Intact, six noded Wachspress finite elements (Talischi et al. 2009) were also used to obtain the continuum response. In (Saxena 2010), isoparametric Wachspress hexagonal cells were used to accommodate irregular hexagons that appear when the notches at the contour boundaries are moderated.

Methods that do not directly associate the design with the finite element information (e.g., elements or nodes) exist as well. These use contours to impose the design on the mesh. The level set method is a general purpose approach employed to track and propagate an interface over time (Sethian and Wiegmann 2000; Wang et al. 2005; Luo et al. 2008). In topology optimization, it uses an implicit embedding function LSM(x, t) to evolve its contours z = 0 which represent the continuum boundaries. Here, x ≡ (x, y, z) is a Euclidean point and t represents time. Within iteration, finite element equations pertaining to the physical problem, and finite difference equations associated with the Hamilton-Jacobi level set relation are solved. The velocity field, computed using the finite element analysis, is coupled with the embedding function to drive its isophotes (z = 0 contours) in the subsequent time step. Some other methods that can yield binary material layouts using stochastic techniques are the sub-division scheme (Hull and Canfield 2006) and those by Chapman (Jakiela et al. 2000).

This work aims at reducing the number of function evaluations with the Material Mask Overlay Method while retaining single material (0–1) topologies as much as possible. Use of a gradient based search with a continuous material model is a natural choice. The following section briefs how MMOS determines the continuum topology. Then, continuous material assignment and sensitivity analysis are presented. The algorithm is demonstrated with standard formulations in structural optimization and many synthesis examples. Discussion and closure are drawn last.

2 Material mask overlay method: overview

Figure 1 briefly explains the working of the Material Mask Overlay Method which is based on well-known photolithographic scheme (used in MEMS or IC chip fabrication). A set of M masks, each acting as a ‘material sink’ is employed. A mask of any size or shape lying over some region of the domain is modeled to absorb the material beneath itself. All other regions, not exposed to the masks, remain filled. The continuum topology then gets determined by a set of unexposed cells, that is, those which are not encapsulated within any mask. Properties of the desired material are assigned to such cells. Figure 1 illustrates the use of ‘negative’ circular masks though the masks can be of any other shape (e.g., see Saxena 2010).

Fig. 1
figure 1

Material Mask Overlay Strategy illustrated with negative masks. Masks of circular shape (thick circles) are used for material removal. Hexagonal cells whose centroids (small circles) are inside a mask are empty (white) while those outside the masks are all filled (black) with the desired material. Key: Fix fixed boundary, I input port, triangle expected output deformation(in case of monolithic compliant continua)

Previous implementations of MMOS employed circular (Saxena 2009; Jain and Saxena 2010), elliptic and rectangular masks (Saxena 2010). Circular masks were found to be adequate in determining the material layout (Saxena 2010). Elliptical (that modestly represent simple closed curves) and rectangular (those representing closed polygons) masks do not bring in notable merits. Instead, two variables per mask get additionally introduced in the search space. Both, genetic algorithm (Saxena 2009) and simple mutation based hill climber (Jain and Saxena 2010; Saxena 2010) stochastic algorithm were used in single and a sequence of sub-searches. Additionally, adaptive schemes were used (Saxena 2010) wherein the number of masks (and hence the number of decision variables) was judiciously varied as the search progresses. While MMOS yields well connected binary solutions, the associated stochastic search is computationally expensive. Previous improvements in MMOS were successful in lowering the number of function evaluations from many thousands (∼100,000 or more) to a few thousand. Even then, the computational efficiency of the gradient based approaches is not matched. It is possible to develop analytical material models with MMOS so that a gradient search can be employed. One such possibility is explored below.

3 Material mask overlay method and gradient search

3.1 Material model

The material assignment approximation used herein employs the logistic function f (α, t) given by

$$ f\left( {\alpha ,t} \right)=\frac{1}{1+e^{-\alpha t}} $$
(1)

where α is a parameter. A sigmoid function (Saxena and Saxena 2007) or any other continuous regularization of the Heaveside step function is applicable. Figure 2 depicts the behavior of f (α, t) as α is varied. For large α, f (α, t) ≈ 0 or 1 for t ∈ {− ∞, ∞ } − {− δ, δ} where δ depends on α. With increasing α, δ decreases which makes the interval {− δ, δ} smaller. If α → ∞, f (α, t) → H(t) which is the Heaveside function defined as H(t) = 1 for t > 0, and H(t) = 0 otherwise. The density ρ j of the jth cell can be associated with a circular mask M K identified by (x K , y K , R K ) where (x K , y K ) are its center coordinates and R K is its radius. This relation can be expressed as

$$ \rho_j \propto \frac{1}{1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} $$
(2)

Here \(d_{jK} =\sqrt {\left( {x_K -x_j } \right)^2+\left( {y_K -y_j } \right)^2} \) is the distance between the centroid (x j , y j ) of the jth cell and the center of M K . For large α, when d jK  < R K , ρ j  ≈ 0 while when d jK > R K , ρ j ≈ 1.This is consistent with the notion of negative masks introduced in (Saxena 2009, 2010; Jain and Saxena 2010). As required, cells enclosed within a mask attain the void state while those outside the mask retain the desired material. If d jK  = R K , ρ j  = 1/2 (irrespective of how large α is) implying that a cell whose centroid lies very near or on the mask boundary is neither fully void (ρ j  = 0) nor fully solid (ρ j  = 1). Such cells get assigned fictitious material states which are not intended in topology optimization. To model the cumulative effect of all M masks on the material state of the jth cell, individual terms in (2) can all be multiplied. Thus, the cell density is now expressed as

$$ \rho_j =\prod\nolimits_{k=1}^{Ma} {\left\{ {\frac{1}{1+e^{-\alpha \left( {d_{jk} -R_k } \right)}}} \right\}+\varepsilon } $$
(3)

where Ma is the number of masks. Equation (3) suggests that if a cell’s centroid is not encapsulated within any mask, the cell is filled with material. Otherwise, the material is absorbed by the mask(s) laying over that cell. A small positive ε is added to ensure that the overall stiffness matrix stays non-singular throughout the small deformation analysis.

Fig. 2
figure 2

The logistic function used inthe material model. Higher values of α encourage 0–1 material assignment

3.2 Gradient computation

The position and size of each circular mask over the domain determine the material layout governed by the objective and a set of constraints used. To determine these variables using a gradient search algorithm, design sensitivities (function/constraint gradients) are computed below. Let Φ represent a function or constraint and let ψ K represent the variables x K , y K or R K for the Kth mask with respect to which the derivatives are needed. Using chain rule

$$ \frac{\partial \Phi}{\partial \psi_K }=\sum\nolimits_{j=1}^{Nc} {\left[ {\frac{\partial \Phi }{\partial \rho_j }} \right]\left[ {\frac{\partial \rho_j }{\partial \psi_K }} \right]} $$
(4)

where Nc is the number of cells. \(\frac{\partial \Phi} {\partial \rho_j}\) is usually available for a design problem after the finite element analysis (see Section 4.1). To compute \(\frac{\partial \rho_j} {\partial \psi_K }\), let C be given by

$$ C=\prod\nolimits_{p\ne K}^{\!\!\tiny\begin{array}{l} Ma \\ p=1 \\ \end{array}} {\left\{ {\frac{1}{1+e^{-\alpha \left( {d_{jp} -R_p } \right)}}} \right\}} $$
(5)

The contribution of the Kth mask on the material density ρ j is given by f K (α, d, R) where

$$ f_K \left( {\alpha ,d,R} \right)=\frac{1}{1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} $$
(6)

Then

$$ \frac{\partial f_K \left( {\alpha ,d,R} \right)}{\partial \psi_K }=\frac{\alpha e^{-\alpha \left( {d_{jK} -R_K } \right)}}{\left[ {1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} \right]^2}\frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K } $$
(7)

If ψ K  ≡ x K ,

$$ \frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K }=\frac{\left( {x_K -x_j } \right)}{{d}_{jK} } $$
(8)

If ψ K  ≡ y K ,

$$ \frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K }=\frac{\left( {y_K -y_j } \right)}{d_{jK} } $$
(9)

and if ψ K  ≡ R K , then

$$ \frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K }=-1 $$
(10)

Finally, \(\frac{\partial \rho_j }{\partial \psi_K }=C\frac{\partial f_K \left( {\alpha ,d,R} \right)}{\partial \psi_K }\) which requires (710). \(\frac{\partial \rho_j }{\partial \psi_K }\) can be simplified using (3), (5) and (7) as

$$ \frac{\partial \rho_j }{\partial \psi_K }=\rho_j \frac{\alpha e^{-\alpha \left( {d_{jK} -R_K } \right)}}{\left[ {1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} \right]}\frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K } $$
(11)

3.3 Discontinuity of derivatives

The derivatives in (11) are discontinuous for ψ K  ≡ x K and y K when the center of the Kth mask tends to coincide with the centroid of the jth cell (i.e., when d jK → 0). Let (x K , y K ) approach (x j , y j ) along a line yy j  = m(xx j ). Let the mask radius R K be constant. Then

$$\begin{array}{rll} &&{\kern-18pt}\lim\nolimits_{\left( {x_K ,y_K } \right)\to \left( {x_{j},y_j } \right)} \frac{\partial \rho_j }{\partial \psi_K }\\ {\kern6pt}&=&\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_{j},y_j } \right)} \rho_j \frac{\alpha e^{-\alpha \left( {d_{jK} -R_K } \right)}}{\left[ {1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} \right]}\frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K } \\ {\kern6pt}&=&\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_{j},y_j } \right)} C\frac{\alpha e^{-\alpha \left( {d_{jK} -R_K } \right)}}{\left[ {1+e^{-\alpha \left( {d_{jK} -R_K } \right)}} \right]^2}\frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K } \\ {\kern6pt}&=&C\frac{\alpha e^{\alpha \left( {R_K } \right)}}{\left[ {1+e^{\alpha \left( {R_K } \right)}} \right]^2}\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_{j},y_j } \right)} \frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K } \\ {\kern6pt}&=&C\frac{\alpha e^{\alpha \left( {R_K } \right)}}{\left[ {1+e^{\alpha \left( {R_K } \right)}} \right]^2}\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_{j},y_j } \right)} \frac{\left( {x_K-x_j } \right)}{\left( {x_K-x_j } \right)\sqrt {1+m^2} } \\ {\kern6pt}&=&C\frac{\alpha e^{\alpha \left( {R_K } \right)}}{\left[ {1+e^{\alpha \left( {R_K } \right)}}\right]^2}\frac{1}{\sqrt {1+m^2} } \ {\rm for} \ \psi_K \equiv x_K \end{array} $$
(12)

and

$$\begin{array}{rll} &&\lim\nolimits_{\left( {x_K ,y_K } \right)\to \left( {x_j ,y_j } \right)} \frac{\partial \rho_j }{\partial \psi_K }\\ &&{\kern6pt}=C\frac{\alpha e^{\alpha \left( {R_K } \right)}}{\left[ {1+e^{\alpha \left( {R_K } \right)}} \right]^2}\frac{1}{\sqrt {1+\frac{1}{m^2}}} \ {\rm for} \ \psi_K \equiv y_K \end{array} $$
(13)

For any (x K , y K ) and (x j , y j ), if R K → 0, then

$$\begin{array}{rll} &&{\kern-20pt}\lim\nolimits_{R_{K}\rightarrow 0}\frac{\partial_{ \rho_{j}}}{\partial_{\psi_{K}}}\\{\kern6pt}&=& \lim\nolimits_{R_{K}\rightarrow 0} C\frac{\alpha e^{\alpha (d_{jK} - R_{K})}}{\big[1+e^{-\alpha (d_{jK}-R_{K})}\big]^{2}}\frac{\partial (d_{jK}-R_{K})}{\partial_{\psi_{K}}}\\[2pt] {\kern6pt}&=&C \lim\nolimits_{R_{K}\rightarrow 0} \frac{\alpha e ^{-\alpha (d_{jK}-R_{K})}}{\big[1+e^{-\alpha (d_{jK}-R_{K})}\big]^2}\frac{\partial (d_{jK}-R_{K})}{\partial _{\psi_{K}}}\\ {\kern6pt}&=&C\frac{\alpha e^{-\alpha(d_{jK})}}{\big[1+e^{-\alpha (d_{jK})}\big]^2}\frac{\partial (d_{jK}-R_{K})}{\partial _{\psi_{K}}} \end{array} $$

which is well behaved if (x K , y K ) is not close to (x j , y j ). However, the values of the limits in (12), (13) and the one above vary if (x K , y K ) approaches (x j , y j ) along different lines (i.e., those with different slopes m) which is why the derivatives in (11) are discontinuous. Now, let d jK be computed differently such that \(d_{jK} =\sqrt {\left( {x_j -x_K } \right)^2+\left( {y_j -y_K } \right)^2+p} \) for very small but positive p. This change does not alter any of the equations above. Taking the limits as (x K , y K ) → (x j , y j ) gives

$$\begin{array}{rll} &&\lim_{(x_{K},y_{K})\rightarrow (x_{j},y_{j})}\rho_{j}\frac{\alpha e^{-\alpha (d_{jK}-R_{K})}}{\left[1+e^{-\alpha (d_{jK}-R_{K})}\right]}\frac{\partial (d_{jK}-R_{K})}{\partial _{\psi _{k}}}\\[2pt] &&{\kern6pt}=C \frac{\alpha e ^{\alpha (R_K)}}{\left[1+e^{\alpha (R_{K})}\right]^{2}}\lim_{(x_{K},y_{K})\rightarrow (x_{j},y_{j})}\frac{\partial (d_{jK}-R_{K})}{\partial _{\psi _{k}}} \end{array} $$

For ψ K  ≡ x K

$$\begin{array}{rll} &&\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_j ,y_j } \right)} \frac{\partial \left( {d_{jK} -R_K } \right)}{\partial \psi_K }\\ [2pt] &&{\kern6pt}=\lim\limits_{\left( {x_K ,y_K } \right)\to \left( {x_j ,y_j } \right)} \frac{\left( {x_K -x_j } \right)}{\sqrt {\left( {x_j -x_K } \right)^2\left( {1+m^2} \right)+p} }=0\;\forall m.\end{array} $$
(14)

A similar observation can be made for ψ K  ≡ y K . For small p, \(\sqrt {\!\left( {x_j \!-\!x_K } \right)^2\!+\!\left( {y_j\! -\!y_K } \right)^2\!+\!p} \!\approx\! \sqrt {\!\left( {x_j \!-\!x_K } \right)^2\!+\!\left( {y_j \!-\!y_K } \right)^2}\) if (x K , y K ) and (x j , y j ) are quite far apart. Thus, the cell densities may be computed as in (3). However, adding a small positive number to the denominators in (8) and (9) has a similar effect as in (14). Thus

$$ \frac{\partial \rho_j }{\partial x_K }=\rho_j \left( {\frac{\alpha \exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right.}{1+\exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right)}} \right)\left( {\frac{x_K -x_j }{d_{jK} +\varepsilon }} \right) $$
(15)
$$ \frac{\partial \rho_j }{\partial y_K }\!=\!\rho_j \left(\! {\frac{\alpha \exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right.}{1+\exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right)}}\! \right)\left(\! {\frac{y_K -y_j }{d_{jK} +\varepsilon }} \!\right) $$
(16)
$$ \frac{\partial \rho_j }{\partial R_K }=-\rho_j \left( {\frac{\alpha \exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right.}{1+\exp \left( {-\alpha \left\{ {d_{jK} -R_K } \right\}} \right)}} \right) $$
(17)

3.4 Behavior of the derivatives as α → ∞

All derivatives in (15)–(17) are of the form

$$ \frac{\partial_{\rho_{j}}}{\partial _{\psi_{K}}}= C_{1}\left(\frac{\alpha \exp(-\alpha \{C_{2}\})}{1+\exp (-\alpha \{C_{2}\})}\right) $$

where \(C_1 =\rho_j \left( {\frac{x_K -x_j }{d_{jK} +\varepsilon }} \right)\), \(\rho_j \left( {\frac{y_K -y_j }{d_{jK} +\varepsilon }} \right)\) or − ρ j and C 2 = d jK  − R K . Note that C 1 determines the sign of \(\frac{\partial \rho_j }{\partial \psi_K }\). The plot of the above expression vs. α is shown in Fig. 3 for various values of C 1 and C 2. For C 2 less than or equal to 0, the jth cell is inside the Kth mask and its density value is close to the lower bound ε. Further, \(\left\|\frac{x_{K}-x_{j}}{d_{jK}+\varepsilon}\right\|\) and \(\left\|\frac{y_{K}-y_{j}}{d_{jK}+\varepsilon}\right\| \leqslant 1\) implying that C 1 is small and cannot be chosen independently. Figure 3a shows the plot of \(\frac{\partial \rho_j} {\partial \psi_K }\) for C 2 = 0 and C 1 ∈ [–0.01, 0.01]. Except for C 1 = 0 the magnitudes of the derivatives are all comparatively larger than zero. Further, the derivatives are proportional to C 1. This implies that all cells within a mask influence its position and size.

Fig. 3
figure 3

af Plots of the derivatives (vertical axis) with respect to α (horizontal axis) for various values of C2. In each plot, the arrow indicates increasing values of C1

If the jth cell is outside the Kth mask (i.e., C 2 > 0), C 1 can be chosen independently. Figure 3b–f show these plots for C 1 ∈ [–5, 5]. It is observed that the derivatives converge to zero asymptotically implying that the parameters of the Kth mask are not influenced significantly by a cell which is far from its center. This is expected. The magnitudes of all derivatives converge to zero at a much faster rate for α > 2 which can cause numerical instabilities in the algorithm (see discussion).

The proposed material model with negative masks can be compared to the projection schemes in (Guest et al. 2004; Sigmund 2007). In (Guest et al. 2004), fixed solid circular features are used while in (Sigmund 2007), fixed void circular features are employed. Further in (Sigmund 2007), structures are defined in the modified projection method via circular regions with fixed radius. Here, circular masks are free to relocate and vary in size, and their number is independent of the number of cells used in the discretization. The minimum member size is controlled by the size of the hexagonal cell which makes a solution mesh dependent unless the feature size is indirectly imposed via some constraint in the optimization formulation.

4 Examples

We employ the fmincon function available with the optimization toolbox in MATLABTM to illustrate topology optimization using negative masks. fmincon is a general purpose algorithm that uses many features and parameters. The examples are solved herein with the medium-scale optimization (line search) option that uses Sequential Quadratic Programming (SQP) as one of the search algorithms. A compact educational description of SQP is provided in (Epelman 2010). The MATLAB code (main file: mmos_main.m) used is provided in Appendix A with a brief explanation. It is available via the journal website and can also be downloaded from home.iitk.ac.in/~anupams/mmos81.zip. Many classical examples on optimal stiff structures and compliant mechanisms are solved (Fig. 4). Effect of the grid size, number and maximum size of the negative masks, and other parameters are studied. Filtering (e.g., Sigmund 2007; Wang et al. 2010; Bourdin 2001) or projection (e.g., Guest 2009; Xu et al. 2010) methods are avoided to explore the true nature of the formulation. It is shown in (Saxena 2010) that the number of masks actually required for topology determination can differ from the initially chosen number. Here however, masks are not added or deleted within the iterations.

Fig. 4
figure 4

Various classical problems in stiff structure (Problems 1–4) and compliant mechanism (Problems 5–6) design. Key: Bold arrows show the applied loads P and/or the direction of the desired deformation Δ. Fixed nodes and edges on roller support are also shown

4.1 Small deformation stiff structures and compliant mechanisms

A standard formulation to design stiff structures is to minimize the mean compliance (or strain energy, SE) under a resource constraint. Thus

$$ \begin{array}{rll}&& minimize:SE(\boldsymbol{\rho})=\dfrac{1}{2}{\rm \mathbf{U}}^{T}{\rm \mathbf{KU}}\\ &&{\rm such}\,{\rm that}\,V=\sum\nolimits_{i=1}^{Nc} {\rho_i \le V^o} \end{array} $$
(F1)

where ρ = [ρ 1, ρ 2,..., ρ N ] is a set of cell densities, V represents the volume fraction and V o denotes its upper bound. U is the overall displacement response of an intermediate design computed using linear finite element analysis and K is the global stiffness matrix. Vector F = KU comprises of a set of input static loads. Gradients of the strain energy with respect to the cell densities can be determined as

$$ \frac{\partial SE\left( {\rm\mathbf{\rho}} \right)}{\partial \rho_i }=-\frac{1}{2}\left( {{\bf u}_i } \right)^{\rm T}\frac{\partial k_i }{\partial \rho_i }{\bf u}_i $$
(18)

where u i are the nodal displacements (12 components of U) of the ith hexagonal cell and k i is its stiffness matrix. If k i  = ρ i k o where k o is the stiffness of the solid cell, then\(\frac{\partial k_i} {\partial \rho _i }=\bf{k}^{\rm o}\). Let ψ j represent one of the three design variables of the jth mask. Then, using chain rule, \(\frac{\partial SE\left( \boldsymbol{\rho} \right)}{\partial \psi_j }\) can be expressed as

$$ \frac{\partial SE\left( \boldsymbol{\rho} \right)}{\partial \psi_j }=\sum\nolimits_{i=1}^{Nc} {\left( {\frac{\partial SE\left( \boldsymbol{\rho} \right)}{\partial \rho_i }\frac{\partial \rho_i }{\partial \psi_j }} \right)} $$
(19)

where \(\frac{\partial \rho_j }{\partial \psi_K }\) are available from (15)–(17).

To design an optimal compliant topology, we use the flexibility-stiffness formulation (Saxena and Ananthasuresh 2000). This multi-criteria objective allows maximizing the desired output deformation Δ (see Fig. 1) and minimizing the internal energy stored within the continuum to make it capable of sustaining the external loads. An output spring along the direction of the desired deformation ensures force transfer or non-zero mechanical advantage. In standard form, the flexibility-stiffness objective is written as

$$\begin{array}{rll} && minimize:-\dfrac{MSE\left( \boldsymbol{\rho} \right)}{SE\left( \boldsymbol{\rho} \right)}=-\lambda \dfrac{\bf V^{\rm T}KU}{\frac{1}{2}{\bf U^{\rm T}KU}} \\ && such\;that\;V=\sum\nolimits_{i=1}^{Nc} {\rho_i \le V^o} \end{array} $$
(F2)

Here, V is the displacement response obtained by applying a unit dummy force along the direction of the desired deformation (Yin and Ananthasuresh 2003). That is, if F d is a force vector that contains the dummy load, then F d = KV. MSE or mutual strain energy is the same as the desired output deformation. λ is the scaling constant required to avoid early convergence to a local minimum (see discussion). Other formulations like the maximization of the mechanical advantage or geometric advantage are similar to (F2) but with different scale factors. Derivatives of the strain energy with respect to mask parameters can be obtained using (18) and (19). Gradients of the output displacement can be computed as

$$ \frac{\partial MSE\left( \boldsymbol{\rho} \right)}{\partial \rho_i }=-\left( {{\bf v}_i } \right)^{\rm T}\frac{\partial {\bf k}_i }{\partial \rho_i }{\bf u}_i $$
(20)

where v i are the nodal components of V for the ith cell. Like in 19, \(\frac{\partial MSE\left( \boldsymbol{\rho} \right)}{\partial \psi _j }\) can also be evaluated using the chain rule. That is

$$ \frac{\partial MSE\left( \boldsymbol{\rho} \right)}{\partial \psi_j }=\sum\nolimits_{i=1}^{Nc} {\left( {\frac{\partial MSE\left( \boldsymbol{\rho} \right)}{\partial \rho_i }\frac{\partial \rho_i }{\partial \psi_j }} \right)} $$
(21)

Now, for the gradients of the objective in (F2), i.e., for \(\frac{\partial }{\partial \psi_j }\left( {-\frac{MSE\left( \boldsymbol{\rho} \right)}{SE\left( \boldsymbol{\rho} \right)}} \right)\), we have

$$\begin{array}{rll} &&\frac{\partial }{\partial \psi_j }\left( {-\frac{MSE\left( \boldsymbol{\rho} \right)}{SE\left( \boldsymbol{\rho} \right)}} \right)\\ &&{\kern6pt}=-\left\{ {\frac{\frac{\partial }{\partial \psi_j }MSE\left( \boldsymbol{\rho} \right)}{SE\left( \boldsymbol{\rho} \right)}-\frac{MSE\left( \boldsymbol{\rho} \right)\frac{\partial }{\partial \psi_j }SE\left( \boldsymbol{\rho} \right)}{\left[ {SE\left( \boldsymbol{\rho} \right)} \right]^2}} \right\} \end{array} $$
(22)

which uses (15)–(21).

For all examples below, Ma = M × N user-specified masks are placed uniformly over the domain. M is the number of masks along the horizontal direction while N is the same along the vertical direction. Masks are allowed to move outside the design region. Masks can be positioned within the area \(\left( {L+{2}R_{{\rm max}} } \right)\times \left( {W+{2}R_{{\rm max}} } \right)\) where L and Ware the length and width of the region and R max is the maximum permitted user-specified radius of the mask.

Convergence for optimization is governed by the parameters max_iter, max_eval, tol_fun and tol_var. max_iter is the maximum number of iterations permitted, max_eval corresponds to the upper bound on the number of function evaluations, and tol_fun and tol_var are the minimum tolerances on the function and variable values. For all examples, tol_fun = tol_var = 10 − 10 is used. Different values for the permitted number of function evaluations and iterations are used in different cases.

The focus is to obtain close to binary solutions which can be achieved if the exponent is large. However, for large α, most derivatives in (15)–(17) will be close to zero which may lead to numerical problems (see Section 3.4). Thus, a continuation approach is used wherein α is initially chosen small and is gradually increased with the number of function evaluations. It is expected that with increasing α, the sequence of intermediate designs will converge to a 0–1 solution. Further, the exponents used to compute the objective and resource constraint are decoupled. That is, two exponents α f (for objective and its gradients) and α v (for volume constraint and its derivatives) are used. In the examples presented, α f is gradually increased with iterations while α v is held constant at a low value (for all examples presented, α v = 1) to prevent early convergence. This therefore permits the upper bound V o to control the continuum volume only indirectly which is studied through Problem 1 (Fig. 4).

4.2 Results

4.2.1 Upper bound on the volume fraction

Problem 1 is solved with the elastic modulus E as 1,000 N mm − 2, thickness t as 1 mm, α f (initial) = α v = 1, and R max = W/3. The problem is studied with different mesh sizes while maintaining the L/W ratio. Case I corresponds to a mesh with 80 × 40 cells, case II to 50 × 25 cells, and case III to 100 × 50 cells. Load P is taken as 20 N for all cases. For the examples, α v = 1 while α f is gradually increased as α f = f cont α f after every function evaluation where f cont is the continuation parameter. f cont is chosen as 1.014. The solutions are generated for max_iter = 100 and max_eval = 400. The upper bound V o on the continuum volume is varied for different cases as shown in Fig. 5. The final volume fractions V * computed using the cell densities of the solutions differ from the respective initial fractions V o. This difference is large for coarse meshes. V * gets comparable to V o as the number of cells is increased.

Fig. 5
figure 5

ag Topologies for Problem 1 obtained using three mesh sizes. Solutions are shown with (left) and without (right) masks. The upper bound V o on the volume fraction is varied as shown for the respective cases. V * is the volume fraction computed with the final cell densities

4.2.2 Number of masks

Problem 2 is solved to investigate the effect of change in the number of user-specified masks on the solutions. The elastic modulus and thickness are the same as in Problem 1. The upper bound on the volume fraction is 0.2. All examples are solved for the mesh with 80 × 41 cells. The maximum mask radius is set as R max = W/3 = 41/3. As before, α f (initial) = α v = 1 and α f is gradually increased after every function evaluation while retaining the value of α v. The continuation parameter f cont is 1.014. Two loads of P = −10 N each are applied just above and below the horizontal line of symmetry (nodes do not exist on this line). The problem is solved for three cases. The number of masks are varied as M × N = 15 × 10, 10 × 10 and 20 × 12 respectively. It is observed in problem 1 that when α f is increased, many (but not all) cells are close to their binary states. Here therefore, α f is allowed to increase further by setting max_iter to 150. Alternatively, α f can also be increased by choosing larger f cont which is explored in Problem 4. Maximum permitted function evaluations are 400. The solutions are depicted in Fig.  6.

Fig. 6
figure 6

ac Solutions to Problem 2. Three cases are considered wherein the number of masks is varied in each

4.2.3 Permitted upper bound on the mask size

Problem 3 involves minimization of the mean compliance (strain energy) under multiple loads. Two loads of equal magnitudes act at the middle right edge (Fig. 4). Each load P is 40 N. For multiple load problems, the strain energy is computed individually and their sum is minimized. Correspondingly, their gradients are also added. The mesh used for Problem 3 comprises 60 × 31 cells. Other parameters like the modulus and thickness are the same as the first two problems. The continuation factor is changed to 1.01 and the maximum number of permitted iterations is lowered to 120. Four cases are solved with M × N = 15 × 10 masks with the upper bound on the volume fraction as 0.1. In these, R max is varied as W/3, W/2 and W and W/6 respectively where W = 31, the number of cells along the vertical direction. Figure 7 depicts the resultant topologies.

Fig. 7
figure 7

ad Results for Problem 3. In the four cases considered, the maximum permitted mask size is varied

4.2.4 Continuation parameter

The final stiffness minimization problem is solved for the multi-load case again shown as Problem 4 in Fig. 4. Here, the effect of convergence to the Heaveside function is studied. The parameter choices are different from the first three problems. The elastic modulus and continuum thickness are changed to 100 N mm − 2 and 5 mm respectively. Number of masks along the horizontal and vertical directions are 14 each. The problem is solved with a fixed mesh size of 50 cells × 25 cells. The upper bound V o on the volume fraction is changed to 0.05. Maximum number of iterations is set to 120. For four individual cases, the final values of α f are desired as 10, 20, 30 and 60 after 200 evaluations. Accordingly, the continuation parameter f cont is computed as \( \exp (\frac{1}{200}\log[\alpha_{\rm f}])= 1.0116, 1.0151, 1.0172\) and 1.0207 and the permitted number of design evaluations max_eval is set to 200. The designs are shown in Fig. 8.

Fig. 8
figure 8

ad Topologies for Problem 4. The continuation parameter is increased to obtain close to binary designs

4.2.5 Compliant inverter and crimper

We next synthesize the top symmetric half of a compliant inverter (Problem 5 in Fig. 4) for two different mesh sizes using the formulation in (F2). In the first case, the mesh is chosen to comprise 40 × 20 cells. The magnitude of load P is 40 N at the left bottom corner. The right bottom corner is where the output displacement is maximized along the direction shown. An output spring of 2 N mm − 1 along the direction of desired displacement simulates the reaction force. For this problem, the modulus and thickness are 1,000 N mm − 2 and 1 mm, the number of masks along the horizontal and vertical directions are 10 each, α f (initial) = α v = 1, and upper bound on the volume fraction is 0.2. First, the example is solved with no continuation on the exponent α f. That is, f cont is set to 1. The scaling constant λ in (F2) is set to 10,000. Smaller values (e.g., 1, 10, 100 and 1,000) of λ were not adequate to obtain the positive desired displacement for this example. The permitted numbers of iterations and function evaluations are set to 100 and 400 respectively. The resultant inverter topology (without and with masks) is shown in Fig. 9a. As expected, there exist many gray cells. Next, when continuation is performed with f cont = 1.008 (α f is close to 24.2 after 400 evaluations), close to 0–1 solution is obtained (Fig. 9b) albeit a few gray cells are still present in the solution. Some disconnected regions also appear which can be considered as vestigial and can be ignored (see discussion). Figure 9c shows a compliant displacement inverter synthesized using 80 × 40 cell mesh with V o reduced to 0.15 and λ increased to 50,000.

Fig. 9
figure 9

Compliant inverter topologies generated using a 40 × 20 cells without continuation, b 40 × 20 cells with continuation and c 80 × 40 cells with continuation. The column on the left shows full solutions while that on the right shows top symmetric halves with masks

Finally, top symmetric halves of compliant crimpers are designed (Problem 6, Fig. 4) using the formulation in (F2) with three different meshes. The following parameters are used. Elastic modulus is 100 N mm − 2, thickness is 2 mm, number of masks along the horizontal and vertical are 15 and 10 respectively, the load P applied is 50 N, and the scaling constant λ in (F2) is 10,000. Maximum number of iterations and function evaluations are set to 100 and 200 respectively. Figure 10 shows full solutions for different mesh sizes, volume fractions and continuation parameters used. As observed, some gray cells do get retained in the topologies.

Fig. 10
figure 10

ah Compliant Crimpers designed using formulation (F2)

5 Discussion

This paper models topology optimization via negative masks to obtain continua using gradient search. No filtering (e.g., Sigmund 2007; Wang et al. 2010; Bourdin 2001) schemes are employed to explore the true nature of the model and to observe how different parameters in the formulation influence the solutions. Problems 1–4 pertain to four standard and different stiffness maximization examples.

5.1 Interpretation of solutions

In all solutions, checkerboards are not observed which is attributed to the honeycomb geometry used. In problem 1, optimal beam solutions are sought for different bounds on the volume fraction. It is observed that for coarse meshes, the discrepancy between the upper bound V o on the volume fraction and the actual volume fraction V * is more. Note that the continuum volume is computed using α v = 1 and not the final exponent \(\alpha_{f\thinspace}\) used to compute the strain energy to avoid undesired early convergence. Thus, this discrepancy is expected. A similar observation is made for solutions (a)–(c) in Fig. 10. The difference between the volume fractions decreases if finer grids are used for domain representation (Fig. 5a, c, e, f, g).

When comparing solutions (a), (e) and (f) in Fig. 5, it is observed that the three topologies are different. For the 80 × 40 cell mesh, the final volume fraction V  ∗  is about 0.29. For the 50 × 25 cell and 100 × 50 cell meshes, the final volume fractions are respectively 0.41 and 0.25. Thus, even when these solutions are generated using the same initial upper bound on the volume fraction, they exist on different final constraint boundaries (those corresponding to α f). This alludes to two aspects. (a) The upper bound V o offers only indirect control on the continuum volume which becomes better with mesh refinement. (b) The final solutions lie on different constraint boundaries and are therefore different.

There is some similarity between solutions (c) and (e) in Fig. 5 with final volume fractions as 0.39 and 0.41. Solutions (a) and (g) are similar as well though the difference between their final volume fractions is more. However, solutions (a) and (d) with V  ∗  = 0.29 and 0.28 respectively are not similar. Likewise, solutions (b) and (g) with final volume fractions as 0.34 and 0.36 are different in appearance. These observations allude to the third aspect that features in the topologies can change with the mesh size (note that relatively coarse meshes are used here). Solution (f) in Fig. 5 is a typical example which shows two additional diagonal bars, each of thickness comparable to the cell-size in the mesh. As mentioned earlier, such solutions are expected since no explicit filtering methods are used. Permitting slightly larger volume fraction (e.g., in solution g) does help eliminate these bars. Also, the member thicknesses improve.

Topologies in Fig. 6 suggest that solutions can vary with the user-specified number of masks. Here as well, the final solutions lie on different constraint boundaries even though all are generated using the same upper bound V o. Thus, all reasons mentioned above hold true. In (Saxena 2010), via adaptively changing the number of masks, existence of their optimal number for a continuum topology optimization problem is suggested. The observation herein is related to some extent with that in (Saxena 2010). In other words, if an optimal continuum is synthesized with a strict final resource constraint and if the number of masks is allowed to vary, the actual number of masks required will usually be different from those initially specified. The results in Fig. 7 suggest that the solutions can change with the variation in the upper bound on the mask radius. Those in Figs. 6 and 8 illustrate that close to binary solutions are possible if the continuation of the exponent α f is handled carefully. Some disconnected islands are observed in Figs. 6, 7, 8, 9 which are addressed later in this section. All topologies have serrated boundaries, which are expected with coarse meshes due to the honeycomb geometry. Also, no explicit boundary smoothing step as in (Saxena 2010) is implemented. When observing compliant topologies, both long and short connections of thickness comparable to the cell size are observed. Also, gray cells exist in such solutions.

5.2 Efficiency: stochastic vs. gradient based search

Amongst the stochastic approaches that determine topologies by overlaying negative masks, the adaptive approach in (Saxena 2010) is the most efficient requiring about 2,000 function evaluations. Other approaches (e.g. Saxena 2009; Jain and Saxena 2010) that use genetic algorithm or successive searches require much more. To exemplify efficiency of the proposed approach, the convergence plots for the first six solutions in Fig. 5 are shown in Fig. 11. The plots suggest that for most cases, the strain energy is minimized significantly much earlier than 200 function evaluations. After 100 evaluations, strain energy is lowered gradually while the exponent α f still increases so that close to binary solutions are obtained near the end of the search. This is about a factor of 10 reduction compared to the stochastic approach in (Saxena 2010). However, the topologies obtained therein are well connected and perfectly binary, the boundaries are smoother with moderated notches, and the number of masks is altered per iteration so that their adequate number is determined. In comparison, here, the solutions are close to binary with some gray (fictitious) cells still present and the number of masks remains the same as those specified by the user. But, there is a significant decrease in the number of evaluations.

Fig. 11
figure 11

Convergence histories for the first six topologies in Fig. 5

5.3 Isolated islands

Some solutions in Figs. 69 contain regions that do not form a part of the respective main topologies. Investigation on whether such regions can be considered vestigial and can be removed is performed. The strain energy density (SED) contours of these solutions are plotted in Fig. 12. For each case, regions in the SED contours are identified by circles with arrows pointing towards the corresponding dark disconnected hexagonal cells in the topologies. It is observed that such regions store 1% or less of the maximum strain energy density implying that they can be considered non-functioning and can be discarded. Note that these exist very close to the perimeters of a few masks and such regions attain the material densities close to 1 not because of their participation in the main continuum. Rather, they seem to be the artifacts of the high exponent value α f. In fact, if the isolated cells are part of the main continuum, the objective (at least for stiff structures) can be improved depending on where in the topology the cells get placed. Since there are only a few islands in a solution, it is reckoned that the improvement will be marginal.

Fig. 12
figure 12

ag Contour plots of the strain energy density (SED) for some solutions in Figs. 6, 7, 8, 9. The SEDs corresponding to the disconnected regions are marked with circles/ellipses

5.4 Numerical intricacies

The method presented here relies on proper choice of initial parameters and initial guess so that small deformation stiff structures and compliant continua can be designed. Care should be taken especially when choosing the initial values of the exponents. In the author’s experience when solving symmetric stiff structure problems (Problems 1–4), specifying α f (initial) and α v > 1 has often led to the loss of symmetry in density and gradient values. A possible reason could be that numerical errors get introduced due to the near zero values of \(\frac{\partial \rho_j} {\partial \psi_K }\) and hence the objective and constraints (Fig. 3). At any time during optimization, the exponent should not be overly large. This is again due to \(\left| {\frac{\partial \rho_j} {\partial \psi_K }} \right|\) being very close to zero making it difficult for the optimization algorithm to proceed further. The scale factor λ in (F2) is a parameter on which the design of a compliant continuum can significantly depend on. At times, an undesired local minimum may result requiring the initial guess (initial position and sizes of the masks) to be altered. Based on experience, the author recommends the following values/ranges for different parameters. Significant improvements in the proposed algorithm are still possible which will be addressed in future endeavors. Interested readers and practitioners are invited to experiment with and modify/improve the MATLAB program (provided as supplementary material and in Appendix A; the interactive interface is accessed via mmos_main.m).The code is inspired by the previous educational articles on topology optimization that employ SIMP and level set methods (e.g., Sigmund 2001; Challis 2010; Andreassen et al. 2011).

  1. 1.

    Exponents α f/α v (alp in the code): A low initial value (α f = α v = 1 strictly recommended, or less) should be used. The author has not experimented much with α f = α v < 1 (e.g., 0.9). For a symmetric problem, if asymmetric mask movement/sizing is observed, optimization can be re-started with lower initial α f and α v. The continuation parameter f cont may also be lowered. Alternatively, the problem can be solved by considering its symmetric half.

  2. 2.

    Continuation parameter f cont (fact in the code): A value very close to but greater than 1 should be used. These values are mentioned with various examples solved in the paper. The parameter can be estimated as \(f_{\rm cont} =\exp \left( {\frac{1}{\max \_eval}\log \left[ {\alpha_f^{\rm f\/inal}} \right]} \right)\) where max_eval is the number of evaluations permitted and \(\alpha_f^{\rm f\/inal} \) is the final value of the exponent. The above relation assumes that the initial α f is 1. The author suggests that the number of evaluations allowed should be large enough so that increase in the exponent value is gradual. \(\alpha_f^{\rm f\/inal} \) will depend on the optimization problem at hand, but use of a very high value is not recommended (e.g., see solutions to Problem 4).

  3. 3.

    Rmax (max_R in the code): Per Fig. 7, values of max_R in the range [1/6W, W] where W is related to the minimum dimension of the rectangular region, has posed no difficulty in yielding solutions. This can however not be generalized.

  4. 4.

    V o (volf in the code): For this parameter, a range of values between [0.05, 0.3] has been employed in the examples. As mentioned before, this parameter controls the continuum volume only indirectly which improves with mesh refinement. For a coarse mesh, one may try with V o as low as 0.05 and expect the final volume fraction to be close to 0.3. For fine meshes, V o will usually approximate the final volume fraction better. If desirable solutions are not obtainable for a low V o, larger values may be tried.

  5. 5.

    λ (lines 28 and 29 in analysis_mmos_ eff.m): The value of this parameter can significantly influence the solution of a compliant mechanism. λ is used to scale the magnitude of the output displacement with respect to the strain energy. For the problems solved herein, λ is set to 10,000 or 50,000. However, choice of λ > 0 is problem dependent.

  6. 6.

    epsilon: A low positive value (e.g., 10 − 3 or 10 − 4) is usually employed as the lower bound for cell densities.

  7. 7.

    adj_x and adj_y: The author has set these values as zero for the examples. They are used to respectively control the horizontal and vertical positions of the entire group of masks in the initial guess.

6 Closure

Topology optimization with negative masks is implemented in this paper with gradient search. It was previously shown using the honeycomb parameterization that well connected perfectly binary solutions could be attained with the stochastic search, but the approach required a large number of design evaluations. The computational effort required herein is about 1/10th compared to its predecessor schemes that use the random mutation based hill climber procedure. Close to binary solutions are possible if the increase in the exponent of the logistic function is gradual. Some fictitious cells can appear at continuum boundaries and at sites where the local critical feature size is comparable to the characteristic size of the mesh. It is conjectured that a hybrid method combining both, gradient and stochastic searches will help obtain well connected, perfectly binary topologies efficiently. This, in particular, will be useful when designing large deformation continua (e.g., Bruns and Tortorelli 2001; Pedersen et al. 2001; Saxena and Ananthasuresh 2001; Rai et al. 2007, 2009; Mankame and Ananthasuresh 2007; Reddy et al. 2010) where computation of the search directions will be possible for solutions with convergent nonlinear displacement analyses. For a non-convergent one, stochastic mutation steps will help alter that intermediate design to a neighboring convergent one which can be used as an initial guess for the subsequent gradient search. Extension of the Material Mask Overlay Method to three-dimensional continuum design is straight forward by replacing the circular masks with the spherical ones and hexagonal cells with tetrakaidecahedrons.