1 Introduction

Topology optimization is a computational tool for the distribution of given material resources within a specified spatial domain to achieve the maximum performance, typically maximum stiffness. This technique was originally introduced by Bendsøe and Kikuchi (1988), who sought to optimize the structural layout, instead of structural boundaries as is done in shape optimization. In the early stages, the main focus of topology optimization was on solid mechanics (Sigmund and Torquato 1997); however, this method has been significantly developed and extended throughout the decades to various fields such as heat conduction, fluid dynamics, and multiphysics problems (Alexandersen et al. 2018; Li et al. 1999; Dilgen et al. 2018; Lundgaard and Sigmund 2018; Behrou and Maute 2017; Behrou et al. 2017).

Topology optimization researchers have long recognized the importance of accounting for the manufacturing process during design optimization, in order to allow the algorithms to access to full feasible design space efficiently. Early research on this topic focused on defining appropriate design constraints that would ensure that the resulting optimized designs remained feasible given the limitations of the intended manufacturing process. Early efforts to solve this problem include a 2012 study by Guest and Zhu in which they used projection methods to enforce geometry specifications corresponding to the casting and milling manufacturing processes (Guest and Zhu 2012). More recently, a 2016 paper by Vatanabe et al. presented a unified projection-based method for generating optimized designs that are compatible with a variety of manufacturing processes including extrusion, turning, casting, forging, and rolling (Vatanabe et al. 2016).

In contrast to casting and milling, additive manufacturing (AM) enables the fabrication of very complex, intricate geometries. This capability provides designers with nearly full access to the space of potential designs; however, each AM process comes with its own set of specific limitations that must be considered when developing AM-compatible topology optimization algorithms (Liu et al. 2018). One of the primary challenges when 3D printing topology–optimized designs is the need for postprocessing in order to convert a rasterized representation of the design geometry into a CAD model that can be prototyped. Zegard and Paulino have introduced an algorithm and software tool for automating this process and for ensuring the connectedness of the design geometry using a novel convolution (weighting) function for filtering densities (Zegard and Paulino 2016). Another pervasive challenge in design for additive manufacturing is the issue of overhang. Because 3D printed parts are built layer-by-layer, geometries that have large regions of overhang require the use of extensive support material to be used as scaffolding. It has been estimated that the printing of support material accounts for 40–70% additive manufacturing costs (Liu et al. 2018); therefore, reducing the amount of support material required to manufacture a part can significantly reduce both the time and cost of the manufacturing process. A large number of studies have investigated various approaches to addressing this issue using topology optimization (Leary et al. 2014; Brackett et al. 2011; Mass and Amir 2017), with several authors implementing projection-based approaches (Gaynor and Guest 2016; Langelaar 2016, 2017; Qian 2017) similar to those mentioned above.

Other researchers have sought to develop algorithms that optimally exploit the multimaterial capability of various AM technologies. In a 2014 paper, Gaynor et al. presented a SIMP-style multimaterial topology optimization method for 3D printed mechanisms (Gaynor et al. 2014). In this approach, the material properties were computed as a superposition of the respective properties the various design material options. The method was validated experimentally by prototyping a series of multimaterial compliant mechanisms using the Polyjet 3D printing process. More recently, Conlan-Smith and James presented a multiphase topology optimization method for the design of functionally graded compliant mechanisms (Conlan-Smith et al. 2017). Here, they introduced a novel material interpolation scheme in which the material properties could vary continuously within a set of bounds corresponding to two base material phases. The co-author, James, also published a 2018 paper in which he introduced a method for performing multimaterial topology optimization in which the algorithm optimally selects from a suite of candidate materials. This method was designed to accommodate AM technologies in which the printer offers a wide selection of material options, but can include only two or three of these materials within a single part.

The majority of existing research on design for AM and multimaterial topology optimization focuses on deterministic analysis and optimization. However, the design performance varies due to inherent uncertainties in different parameters such as loading, boundary conditions, material properties, and geometry. The additive manufacturing process presents unique challenges with regard to robust design, since AM methods contain multiple unique sources of uncertainty (Hu and Mahadevan 2017) that can diminish the performance of the manufactured part. Stochastic design methods tackle this deficiency by incorporating uncertainty analysis in the optimization process. Such methods fall into two main categories: robust design optimization (RDO) (Bendsøe and Kikuchi 2016; De Gournay et al. 2008, Keshavarzzadeh et al. 2016, 2017), which minimizes the performance variation, and reliability-based design optimization (RBDO) (Torii et al. 2017; Martinez-Frutos et al. 2018) which constrains the failure probability (or failure events). The computational complexity is the outstanding challenge in these approaches, which require a considerable number of expensive simulations to capture variations in the response function.

In this work, we present a systematic topology optimization approach which considers the scatter in the material properties of candidate materials within an AM process. We present our approach in the context of density-based topology optimization, and focus on RDO to minimize the performance variability in the optimal design. In particular, we take advantage of the stochastic collocation method, which provides a generic tool for estimation of statistical moments and their sensitivities (Xiu and Hesthaven 2005). The key ingredient of the stochastic collocation method is the numerical integration strategy for multivariate functions. Sparse grids are a widely used tool for such integration tasks, as they provide a level of computational efficiency that exceeds that of other integration approaches such as Monte Carlo or the standard tensor product of univariate Gaussian quadrature (Lazarov et al. 2012). In this work, we adopt a newly developed quadrature rule, called designed quadrature, for integration of multivariate functions, which has been shown to be superior to sparse grids integration (Keshavarzzadeh et al. 2018).

The merits of our contribution are twofold. First, it is one of the first few papers which consider a robust design formulation for multimaterial topology optimization. It is noteworthy to mention some of the similar works in the literature at this juncture. In Xu et al. (2015), robust concurrent optimization of material and structure under unknown-but-bounded load uncertainties is investigated in a multiscale framework. Authors in Rostami and Ghoddosian (2018) study the topology optimization for mechanical systems with hybrid material and geometric uncertainties using a memory-less transformation of random fields. In Martínez-Frutos and Herrero-Pérez (2018), authors present an approach for robust topology optimization of continuum structures under loading and material uncertainties based on an optimality criterion obtained from the stochastic linear elasticity problem. In Zhao et al. (2015), authors use stochastic collocation combined with full tensor product grid and Smolyak sparse grid to transform the robust formulation into a weighted multiple loading deterministic problem at the collocation points. Authors in Shintani et al. (2017) propose a density-based approach in conjuction with a univariate dimension-reduction method combined with Gauss-type quadrature sampling for robust multimaterial topology optimization. While these works consider a similar problem to the one we consider in this paper, we believe our contribution is the first one which provides a systematic and rigorous way for robust multimaterial topology optimization. In particular, our approach combines two well-established methods: (1) a SIMP-style approach for multimaterial topology optimization and (2) a stochastic collocation approach for uncertainty analysis. Second, we successfully utilize the designed quadrature capability in approximating statistical moments with reduced cost within a robust design framework. We discuss the key steps of the computational procedure for robust multiphase topology optimization in detail. In addition, we provide the MATLAB code which computes the quantities of interest such as the statistical moments of compliance, volume, and mechanical advantage for multiphase continua, which can be found in the repository whose Uniform Resource Locator (URL) is given in Keshavarzzadeh and James (2018). All gradient-based optimization is performed using the method of moving asymptotes (MMA), details of which can be found in Svanberg (1987). Part of our implementation leverages the fast routine for FEA in Andreassen et al. (2011), and the rest of our implementation uses MATLAB vectorization, which together comprise an efficient code for optimization under uncertainty.

The rest of paper is organized as follows. Section 2 briefly describes the topology optimization method including its deterministic and robust forms. The details of multimaterial parameterization with uncertainty and sensitivity analyses are presented in Section 3. Section 4 presents numerical results for topology optimization of linear elastic structures and a heat sink which involves a similar boundary value problem. Finally, Section 5 contains the concluding remarks.

2 Topology optimization: deterministic and robust

2.1 Notation and setup

  • We use bold characters to denote multivariate quantities such as matrices and vectors; e.g., x indicates a vector of variables in the domain of a multivariate function.

  • We denote sets with uppercase letters; e.g., Ω is a set of events (or event space).

  • We show the index for variable coordinates in multivariate quantities via subscripts .i and the sample realization of such quantities via superscripts .(j). For example, \(y_{i}^{(j)}\) is the (j)th realization of variable yi.

  • Suppose data \((y_{1}^{(j)},y_{2}^{(j)},\ldots ,y_{d}^{(j)})_{j=1}^{n}\) is given. Each datum is sampled from a joint distribution on a compact space \((y_{1}^{(j)},y_{2}^{(j)},\ldots ,y_{d}^{(j)}) \in {\Omega } \subset \mathbb {R}^{d}\), where \({\Omega }=\mathcal {Y}_{1} \times {\ldots } \times \mathcal {Y}_{d}\) is a tensor product space with \(\mathcal {Y}_{k} \subset \mathbb {R}\). The joint distribution is denoted by \(\pi (\boldsymbol y)=\pi _{y_{1}} \times {\ldots } \times \pi _{y_{d}}\), where \(\pi _{y_{k}}\) is the marginal distribution of variable yk.

We solve a robust design optimization problem, which is formulated based on the statistical moments of volume and compliance (cf. Fig. 1). The uncertainty is considered in the nominal elastic modulus of candidate materials in multimaterial topology optimization. Our stochastic analysis at each design iterate is comprised of several deterministic simulations on particularly designed quadrature points to compute the statistical moments of compliance, volume, and their sensitivities (cf. Section 2). We also present a numerical example considering thermal compliance with multiple materials with uncertain thermal conductivity. Our deterministic simulations follow a particular multimaterial algorithm (James 2018), which will be briefly described in Section 3.

Fig. 1
figure 1

Flowchart for robust multiphase topology optimization. FEA and SA stand for finite element analysis and sensitivity analysis respectively

2.2 Deterministic topology optimization

The topology optimization method distributes a given material resource within a prescribed physical domain to maximize structural performance. It is a constrained optimization problem in which typically the objection function is the structural compliance and the constraint is the mass (or volume) of material. The optimization problem in its general form can be written as

$$ \begin{array}{@{}rcl@{}} \underset{\boldsymbol \rho}{\min} && g_{0}(\boldsymbol \rho) \\ \text{subject to} && g_{i}(\boldsymbol \rho) = 0 \quad i=1,\ldots,n_{e} \\ && \tilde{g}_{i}(\boldsymbol \rho) \leq 0 \quad i=1,\ldots,n_{i} \end{array} $$
(1)

where g0 is the objective function, gi and \(\tilde {g}_{i}\) are sets of equality and inequality constraints, and ρ is the design parameter, which, in this article, represents the volume fraction (or relative material density) of each finite element. The elastic response of the structure is characterized by governing equation, which is typically obtained and solved via finite element discretization of the boundary value problem shown below.

$$ \left\{\begin{array}{ll} \nabla. \boldsymbol \sigma(\boldsymbol x) + \textbf{b}(\boldsymbol x) = 0 & \forall \boldsymbol x \in D \\ \boldsymbol \sigma(\boldsymbol x) \textbf{n} = n(\boldsymbol x) & \forall \boldsymbol x \in {\Gamma}_{N} \\ {\boldsymbol u}(\boldsymbol x) = 0 & \forall \boldsymbol x \in {\Gamma}_{D} \ \end{array}\right. $$
(2)

where the physical domain \(D \subset \mathbb {R}^{d}\), d = 2,3 is a bounded and Lipschitz continuous domain with two sets of Dirichlet ΓD and Neumann ΓN boundary conditions where ΓN ∩ΓD = (cf. Figure 2). The above governing equations are presented in the form of a linear elliptic partial differential equation

Fig. 2
figure 2

Schematic representation of the spatial domain associated with the topology optimization problem

$$ \left\{\begin{array}{ll} -\nabla.(\mathbb{\boldsymbol C}(\boldsymbol x) \nabla \boldsymbol u(\boldsymbol x) ) = f(\boldsymbol x) & \forall \boldsymbol x \in D \\ \boldsymbol u(\boldsymbol x) = 0 & \forall \boldsymbol x \in \partial D \end{array}\right. $$
(3)

where \(\mathbb {\boldsymbol C}\) is the elasticity matrix. We note that the union of the spatial domain with the traction boundary {DDN} is denoted by D, and D denotes the Dirichlet boundary condition.

As standard procedures in density-based topology optimization, we process the design variables throughout the optimization iterations by filtering the densities to impose a minimum length scale (Bruns and Tortorelli 2001) and thresholding them to generate more distinct interfaces (Guest et al. 2004). The filtered volume fractions are expressed via the cone Kernel KF as

$$ \hat{\rho}(\boldsymbol x) = \frac{ {\int}_{R_{F}} K_{F} (\boldsymbol x,\boldsymbol x^{\prime}) \rho(\boldsymbol x^{\prime}) d\boldsymbol x^{\prime}} { {\int}_{R_{F}} K_{F} (\boldsymbol x,\boldsymbol x^{\prime}) d\boldsymbol x^{\prime}} $$
(4)

where RF is the application area of the filter defined by rmin and KF is denoted by

$$ K_{F} (\boldsymbol x,\boldsymbol x^{\prime}) = \left\{\begin{array}{ll} r_{\min} - |\boldsymbol x-\boldsymbol x^{\prime}| & \text{if\ } |\boldsymbol x-\boldsymbol x^{\prime}| \leq r_{\min} \\ 0 &\text{if\ } |\boldsymbol x-\boldsymbol x^{\prime}| > r_{\min} \end{array}\right. $$
(5)

The Heaviside step function is used to ideally threshold the filtered volume fractions to ρmin and 1 where ρmin is the lower bound for volume fractions i.e.

$$ \bar{\rho}=H(\hat{\rho}-\rho_{\min}) = \left\{\begin{array}{lll} 1 & \text{if\ } \hat{\rho} \geq \rho_{\min}, \\ \rho_{\min} &\text{if\ } \hat{\rho} = \rho_{\min}. \end{array}\right. $$
(6)

However, to facilitate gradient-based optimization, a smooth approximation of step function is used by Guest et al. (2004),

$$ \bar{\rho} = H_{\beta}(\hat{\rho}) = 1 - e^{-\beta \hat{\rho}} + \hat{\rho} e^{-\beta}, $$
(7)

where the lower bound ρmin is adjusted for the selected β such that ρmin = Hβ(ρmin). In this approximation, β controls the smoothness of transition from zero to one, i.e. \(\lim _{\beta \rightarrow \infty } H_{\beta }(\hat {\rho }) = H(\hat {\rho }-\rho _{\min })\).

We finally use the standard solid isotropic material with penalization (SIMP) method to penalize intermediate volume fractions (Bendsøe 1989, 1999); i.e., we compute the global stiffness matrix K by using the processed (thresholded-filtered) volume fractions \(\bar {\rho }\),

$$ \boldsymbol K = \sum\limits_{i=1}^{n_{e}} \bar{{\rho_{i}}}^{\kappa} \boldsymbol K_{i}, $$
(8)

where ne is the number of elements, κ = 3 is the penalization parameter, and Ki is the nominal element i stiffness matrix.

2.3 Robust topology optimization

We formulate the optimization problem with respect to the statistical moments of compliance and volume in robust topology optimization,

$$ \begin{array}{@{}rcl@{}} \underset{\boldsymbol \rho}{\min} && Q(\lambda)=\mu(\boldsymbol \rho) + \lambda \sigma (\boldsymbol \rho)\\ \text{subject to} && \mathbb{E}[V(\boldsymbol \rho)] \leq \bar{V} \vspace{0.1cm} \\ &&\rho_{\min} \leq \boldsymbol \rho \leq 1, \end{array} $$
(9)

where μ and σ are the mean and standard deviation of compliance, \( \mathbb {E}\) is the expected value operator, and λ is the weight factor for the standard deviation in robust design. We note that the compliance is dependent on the medium’s elasticity. In this paper, we also formulate the optimization problem with a resource constraint based on the amount of material that can appear in the structure. We in particular assume that stiffer materials are more heavy, or more costly to procure, and therefore they are weighted more heavily in the resource constraint (cf. Eq. (16)). Therefore, the randomness in material resource and compliance is due to the randomness in the uncertain parameters that influence the elasticity of the medium.

Now, let \(({\Omega }, \mathcal {A}, \mathcal {P})\) be a complete probability space, where Ω is the event space, \(\mathcal {A}\subset 2^{\Omega }\) is the σ-algebra, and \(\mathcal {P}\) is the probability measure. Considering the spatial bounded domain D with boundary D, we are interested in the following problem: find a stochastic function, uu(y, x) : Ω × D →R, such that for \(\mathcal {P}\)-almost everywhere y ∈Ω, the following equation (the parametric counterpart of (3)) holds:

$$ \left\{\begin{array}{ll} \nabla.(\mathbb{C}(\boldsymbol y,\boldsymbol x) \nabla \boldsymbol u(\boldsymbol y,\boldsymbol x) ) = f(\boldsymbol x) & \forall (\boldsymbol y,\boldsymbol x) \in {\Omega} \times D \\ \boldsymbol u(\boldsymbol y,\boldsymbol x) = 0 & \forall (\boldsymbol y,\boldsymbol x) \in {\Omega} \times \partial D \end{array}\right. $$
(10)

where \(\boldsymbol y=\{ y_{i}\}_{i=1}^{d}\) denotes the vector of parameters (or random variables), \(\mathbb {C}\) is again the elasticity matrix parameterized with the random variables, and d is the number of random variables. Approximating the stochastic function via Lagrange polynomials Lk(y) such that

$$ \hat{\boldsymbol u}(\boldsymbol y, \boldsymbol x) = \sum\limits_{k=1}^{M} \boldsymbol u(\boldsymbol y^{(k)}, \boldsymbol x)L_{k}(\boldsymbol y) $$
(11)

where M is the number of collocation points and denoting the left-hand side in (10) (top) as \(\mathcal {L}(\boldsymbol u)=\nabla .(\mathbb {C}(\boldsymbol y,\boldsymbol x) \nabla \boldsymbol u(\boldsymbol y,\boldsymbol x) )\), the stochastic collocation approach solves the following residuals

$$ \mathcal{R}(\hat{\boldsymbol u}(\boldsymbol y))|_{\boldsymbol y^{(k)}} = 0 \quad \forall k=1,\ldots,M $$
(12)

where \(\mathcal {R}(\hat {\boldsymbol u}) = \mathcal {L}(\hat {\boldsymbol u}) - f\) (Xiu and Hesthaven 2005). Using the property of Lagrange polynomials, this approach is equivalent to solving the deterministic elliptic PDE problem

$$ \left\{\begin{array}{ll} \nabla.(\mathbb{C}(\boldsymbol y^{(k)},\boldsymbol x) \nabla \boldsymbol u(\boldsymbol y^{(k)},\boldsymbol x) ) = f(x) & \forall \boldsymbol x \in D \\ \boldsymbol u(\boldsymbol y^{(k)},\boldsymbol x) = 0 & \forall \boldsymbol x \in \partial D \end{array}\right. $$
(13)

on collocation points \(\{\boldsymbol y^{(k)}\}_{k = 1}^{M}\) to find coefficients u(y(k), x). Once these coefficients are obtained, computing the statistical moments of the solution (e.g., the expected value) is straightforward:

$$ \mathbb{E}[\hat{\boldsymbol u}(\boldsymbol x)] = \sum\limits_{k=1}^{M} \boldsymbol u(\boldsymbol y^{(k)},\boldsymbol x) {\int}_{\Omega} L_{k}(\boldsymbol y) \pi(\boldsymbol y) d\boldsymbol y $$
(14)

In this equation, π is the multivariate probability density function. The evaluation of the above integral is typically performed via quadrature rules, i.e. \({\int }_{\Omega } f(\boldsymbol y) \pi (\boldsymbol y) d\boldsymbol y = {\sum }_{k=1}^{M} f(\boldsymbol y^{(k)}) w^{(k)}\) where w(k) are quadrature weights. Using a quadrature rule, (14) reduces to

$$ \mathbb{E}[\hat{\boldsymbol u}(\boldsymbol x)] = \sum\limits_{k=1}^{M} \boldsymbol u(\boldsymbol y^{(k)},\boldsymbol x) w^{(k)} $$
(15)

It is clear that the accuracy of statistical moments depends on the quadrature rule, and particularly the number of quadrature points. A common integration rule for multivariate functions is Sparse Grids, which provides a requisite accuracy with smaller cost (i.e., a smaller number of nodes) compared with other integration rules such as the standard tensor product of Gaussian quadratures. However, Sparse Grids suffer from negative weights which in some cases may yield erroneous results. In addition, the number of points is not optimal since the node coordinations are dictated by the univariate Gaussian quadrature rule (Heiss and Winschel 2008, 2007).

In this work, we adopt a newly introduced quadrature rule, designed quadrature (Keshavarzzadeh et al. 2018), which circumvents these challenges. The designed quadrature provides a set of optimized quadrature nodes with positive weights which are considerably fewer than Sparse Grids nodes and hence is more efficient for stochastic collocation computations.

3 Multimaterial topology optimization

3.1 Parametrization of the effective elastic modulus

The multiphase design approach selects a particular solid phase with elastic modulus Ei from multiple solid phases \(\{E_{i}\}_{i=1}^{n_{m}}\) at each element where nm is the number of candidate solid materials.Footnote 1 This formulation allows design of structures with optimal material properties in local regions. In its basic form, the multiphase compliance minimization subject to a mass constraint is expressed as an integer program.

$$ \begin{array}{@{}rcl@{}} \underset{\boldsymbol \eta}{\min} && C(E(\boldsymbol x)) \\ \text{subject to} && E(\boldsymbol x) =\sum\limits_{i=1}^{n_{m}+1} E_{i} \eta_{i}(\boldsymbol x),\\ && \sum\limits_{i=1}^{n_{m}+1} \eta_{i}(\boldsymbol x) = 1 \quad\qquad \forall \boldsymbol x \in D,\\ &&\boldsymbol \eta(\boldsymbol x) \in \{0,1\}^{n_{m}+1}\quad\quad\forall \boldsymbol x \in D,\\ &&{\int}_{D} E(\boldsymbol x) d\boldsymbol x \leq \bar{E}. \end{array} $$
(16)

where \(\boldsymbol \eta = \{\eta _{i}\}_{i=1}^{n_{m}+1}\) is a set of integer numbers taking the binary values of 0 and 1 which parameterize the effective elastic modulus E(x), and \(\bar {E}\) is the upper limit for total elastic modulus within the structure (equivalent to the total mass or volume).

The problem in this present form is a combinatorial problem similar to the original topology optimization problem. To relax these integer constraints, we adopt a similar approach to SIMP and interpolate the effective elastic modulus from discrete elastic modulus values via smooth functions. In particular, we follow the shape function approach in James (2018) for three-phase design which we describe here briefly.

Similar to standard density-based topology optimization, which uses a design parameter ρi for each element, we consider two design parameters ρi, i = 1,2 per element and apply the filtering and thresholding operators on both variables, i.e. \(\rho _{i} \rightarrow \hat {\rho }_{i} \rightarrow \bar {\rho }_{i}, i=1,2\) (cf. Section 2.2), to find processed design variables \(\bar {\rho }_{1},\bar {\rho }_{2}\). We then compute the activation functions ηi (smooth counterparts of integer numbers in (16)) via

$$ \begin{array}{@{}rcl@{}} \eta_{1}&=&\bar{\rho}_{1}^{p} \bar{\rho}^{p}_{2} \qquad\qquad\quad \eta_{2} = \bar{\rho}_{1}^{p} (1-\bar{\rho}_{2})^{p} \\ \eta_{3}&=&(1-\bar{\rho}_{1})^{p} \bar{\rho}^{p}_{2} \qquad\eta_{4} = (1-\bar{\rho}_{1})^{p} (1-\bar{\rho}_{2})^{p} \end{array} $$
(17)

where p is a penalization constant used to penalize the intermediate values of ρi ∈ [0,1] similar to SIMP. The number of activation functions is four which includes the void phase in addition to three material phases. We set the first elastic modulus value as the void phase such that E1 = Emin. For instance, parameter values \(\bar {\rho }_{1}=\bar {\rho }_{2}=1\) activate (or model) the void phase, i.e. when η1 = 1. Note that for p = 1, we recover the standard bilinear finite element shape functions. For p > 1, these functions are convex with respect to parameters ρi which ensures a discrete solution for the optimization problem. Similar to the standard SIMP method, we set p = 3 in our numerical examples. Note that in cases where we have more than three solid material candidates, the formulation can be extended by adding additional design parameters for each element. In general, the method can accommodate up to nm candidate materials with \(n_{m}=2^{n_{p}}-1\), where np is the number of design parameters for each finite element. For example, multiplying each of four ηi in (17) with two multipliers, \(\bar {\rho }^{p}_{3}\) and \((1-\bar {\rho }_{3})^{p}\), where \(\bar {\rho }_{3}\) denotes the third design parameter, results in eight activation functions ηi which parameterize seven solid and one void phases. Now that we have parameterized the design domain with smooth functions, we solve the relaxed version of (16) with constraints ρ1, ρ2 ∈ [0,1] replacing \(\boldsymbol \eta (\boldsymbol x) \in \{0,1\}^{n_{m}+1}\) via the method of moving asymptotes (MMA). MMA is a general nonlinear programming method which generates and solves a sequence of convex subproblems with improved feasible (or almost feasible) solutions of the subject problem. Due to its generality and flexibility, it has been widely used in the field of structural optimization (Svanberg 1987).

3.2 Adjoint sensitivity analysis

In order to use efficient gradient-based optimizers, we need to compute design sensitivities. The subject of sensitivity analysis has been discussed extensively in the literature (Tortorelli and Michaleris 1994); however, we briefly discuss sensitivity analysis for a particular quantity of interest, the mechanical advantage which will be used in one of our numerical examples for designing a compliant mechanism.

The finite element equilibrium equations can be partitioned and expressed in terms of free (f) and constrained (c) degrees of freedom in the residual form

$$ \boldsymbol R = \left[ \begin{array}{c} \boldsymbol R_{f} \\ \boldsymbol R_{c} \end{array} \right]= \left[ \begin{array}{cc} \boldsymbol K_{ff} & \boldsymbol K_{fc} \\ \boldsymbol K_{cf} & \boldsymbol K_{cc} \end{array} \right] \left[ \begin{array}{c} \boldsymbol u_{f} \\ \boldsymbol u_{c} \end{array} \right] - \left[ \begin{array}{c} \boldsymbol F_{f} \\ \boldsymbol F_{c} \end{array} \right] = \left[ \begin{array}{c} \boldsymbol 0 \\ \boldsymbol 0 \end{array} \right] $$
(18)

where in particular Rf and Rc are the residuals of the static equilibrium equation associated with free and constrained degrees of freedom. To perform adjoint sensitivity analysis, we express the quantity of interest Q in the augmented Lagrangian form

$$ \begin{array}{@{}rcl@{}} \mathcal{Q}(\boldsymbol u_{f},\boldsymbol F_{c},\boldsymbol \rho) &=& Q(\boldsymbol u_{f},\boldsymbol F_{c},\boldsymbol \rho) +\boldsymbol {\lambda^{T}_{f}} \boldsymbol R_{f}(\boldsymbol u_{f},\boldsymbol F_{c},\boldsymbol \rho) \\ &&+\boldsymbol {\lambda^{T}_{c}} \boldsymbol R_{c}(\boldsymbol u_{f},\boldsymbol F_{c},\boldsymbol \rho). \end{array} $$
(19)

Now, differentiating the augmented Lagrangian with respect to ρ and using the chain rule results in appearance of implicit derivatives duf/dρ and dFc/dρ which are annihilated by solving the adjoint equations. The adjoint solution yields

$$ \begin{array}{@{}rcl@{}} \boldsymbol \lambda_{c} &=&-\frac{\partial Q}{\partial \boldsymbol F_{c}},\\ \boldsymbol \lambda_{f} &=& \boldsymbol K_{ff}^{-1}\left[\boldsymbol K_{cf} \frac{\partial Q}{\partial \boldsymbol F_{c}} - \frac{\partial Q}{\partial \boldsymbol u_{f}} \right]. \end{array} $$
(20)

Using the adjoint solutions in (19), the total sensitivity reduces to

$$ \frac{d \mathcal{Q}}{d \boldsymbol \rho} = \frac{\partial {Q}}{\partial \boldsymbol \rho} + {\lambda^{T}_{f}} \frac{\partial \boldsymbol R_{f}}{\partial \boldsymbol \rho} + {\lambda^{T}_{c}} \frac{\partial \boldsymbol R_{c}}{\partial \boldsymbol \rho}. $$
(21)

For the case where Q is the structural compliance, we can deduce from (20) that λc = 0 and λf = −KffFf = −uf, which yield C/ρ = −uT(dK/dρ)u.

The mechanical advantage is defined as the ratio of the reaction force (or output force Fout) to the input force Fin i.e. QMA = Fout/|Fin| which can be simply defined with respect to constrained forces as

$$ Q_{MA} =\boldsymbol \psi^{T} \boldsymbol F_{c} $$
(22)

where ψ is an index vector with one nonzero entry corresponding to the reaction force’s degree of freedom, with magnitude ∥ψ∥ = 1/|Fin|. Using these definitions, the adjoint solutions are

$$ \begin{array}{@{}rcl@{}} \boldsymbol \lambda_{c} &=& - \boldsymbol \psi\\ \boldsymbol \lambda_{f} &=& \boldsymbol K_{ff}^{-1}\left[\boldsymbol K_{fc} \boldsymbol \psi \right] \end{array} $$
(23)

which subsequently yield the total derivative

$$ \frac{\partial {Q_{MA}}}{\partial \boldsymbol \rho} = \left[\boldsymbol {\lambda_{f}^{T}} \frac{\partial \boldsymbol K_{ff}}{\partial \boldsymbol \rho} - \boldsymbol \psi^{T} \frac{\partial \boldsymbol K_{cf}}{\partial \boldsymbol \rho} \right] \boldsymbol u_{f} $$
(24)

3.3 Stochastic primal and sensitivity analyses

The randomness is introduced in the elastic modulus of each candidate solid material as

$$ E_{i} ={E^{0}_{i}} \exp{(1+\delta y_{i})} $$
(25)

where \({E^{0}_{i}}\) is the nominal value for material i, δ is a small number controlling the perturbation around the nominal value, and \(y_{i}\thicksim \mathcal {N}(0,1)\) is a standard normal random variable (Ghanem 1999). In this paper, we have three phases of solid materials; therefore, we use a three-dimensional quadrature rule for Gaussian variables y = (y1, y2, y3). Corresponding to each quadrature value y(j) which fixes \(\{E_{i}\}_{i=1}^{3}\), we compute a parametric quantity of interest, e.g. compliance C(y(j)) and compliance sensitivity C(y(j))/ρ (cf. Section 3.2).

We note that in this paper, we assume three distinct materials with uncertain elastic moduli. Evidently, if the number of material phases increases, the computational cost grows factorially as more quadrature points are needed. Using designed quadrature circumvents this issue to some extent; however, the dependence of computational cost on the number of variables remains significant. It is noted that in practice where the realizations of the uncertain parameter, e.g., a random field for elastic modulus are available, utilizing dimension reduction techniques such as principal component analysis is effective. Once the reduced dimensions are determined, a similar quadrature strategy can be used to compute the statistical moments (Keshavarzzadeh et al. 2017).

It is also noted that in this paper, we only consider the problem of robust design optimization and do not optimize for failure mitigation. For reliability-based design optimization, one needs to consider the probability of failure to ensure the structure’s safety which requires development of surrogate models. The computation of failure probability and its sensitivity using polynomial surrogates is detailed in Keshavarzzadeh et al. (2017).

Now that we have the quadrature samples of the primal and sensitivity values, we compute their statistical moments similar to (15). The mean and standard deviation of compliance are

$$ \begin{array}{@{}rcl@{}} \mu &=& \sum\limits_{k=1}^{M} C(\boldsymbol y^{(k)}) w^{(k)},\\ \sigma &=& \left[\sum\limits_{k=1}^{M} C^{2}(\boldsymbol y^{(k)}) w^{(k)} - \mu^{2} \right]^{\frac{1}{2}}, \end{array} $$
(26)

where w(k) is the quadrature weight. Similarly, the sensitivities of statistical moments are obtained as

$$ \begin{array}{@{}rcl@{}} \frac{\partial \mu}{\partial \boldsymbol \rho} &=& \sum\limits_{k=1}^{M} \frac{\partial C(\boldsymbol y^{(k)})}{\partial \boldsymbol \rho} w^{(k)},\\ \\ \frac{\partial \sigma}{\partial \boldsymbol \rho} &=& \frac{1}{{\sigma}} \left[\sum\limits_{k=1}^{M} C(\boldsymbol y^{(k)}) \frac{\partial C(\boldsymbol y^{(k)})}{\partial \boldsymbol \rho} w^{(k)} - \mu \frac{\partial \mu}{\partial \boldsymbol \rho} \right]. \end{array} $$
(27)

Algorithm 1 summarizes the steps of robust multiphase topology optimization for compliance minimization.

figure a

4 Numerical examples

4.1 Modified L-Bracket

In the first example we consider a modified L-bracket used in Le et al. (2010) (cf. Fig. 3). In all numerical examples, structures are subjected to plane stress conditions and the candidate materials have nominal elastic moduli \({E^{0}_{1}}=100 MPa, {E^{0}_{2}}=200 MPa, {E^{0}_{3}}=300 MPa\), with Poisson’s ratio ν = 0.3. The elastic modulus for the void phase is chosen as Evoid = 1Pa. We also add a perturbation δ = 0.05 to the nominal value of the elastic moduli to introduce uncertainty (cf. (25) and Fig. 4). The optimization starts with uniform design variables ρ = 0.5, and the applied force is fy = 100KN on both sides. Taking advantage of the symmetry, we model only the half of the domain, which is discretized using 80 × 80 bilinear square isotropic finite elements.

Fig. 3
figure 3

Design domain for the modified L-bracket

Fig. 4
figure 4

Distribution of candidate materials’ elastic moduli

We define a normalized parametric volume

$$ V(\boldsymbol y) = \frac {\sum\limits_{e=1}^{n_{e}}\sum\limits_{i=1}^{n_{m}+1} \eta_{i}(\boldsymbol x_{e}) E_{i}(\boldsymbol y)}{n_{e} E_{\max}} $$
(28)

where \(E_{\max } = \max {\{{E_{i}^{0}}\}_{i=1}^{3}}\), ne is the number of elements, and the penalization parameter is set to p = 1 for evaluating ηi in this case. The expected value of normalized volume serves as a constraint in the following optimization problem

$$ \begin{array}{@{}rcl@{}} \underset{\boldsymbol \rho}{\min} && \mu(\boldsymbol \rho) + \lambda \sigma(\boldsymbol \rho) \\ \text{subject to} && \mathbb{E}(V(\boldsymbol \rho)) \leq 0.3,\\ && 0 \leq \boldsymbol \rho \leq 1. \end{array} $$
(29)

Figure 5 shows robust designs for different choices of standard deviation weight, i.e., λ = 0.01, λ = 0.1, λ = 1. Figure 6 shows the designed quadrature nodes that we use to compute the statistical moments. This quadrature rule integrates standard normal weight function with d = 3 variables and total polynomial order r = 6. The list of nodes and weights for this quadrature rule is provided in the Appendix.

Fig. 5
figure 5

Optimized material distribution for the modified L-bracket associated with λ = 0.01 (left), λ = 0.1 (middle), and λ = 1 (right). The numbers on the color bar indicate the effective nominal elastic modulus E0 (in Pa) at each finite element

Fig. 6
figure 6

Designed quadrature nodes for integration of standard normal weight function with d = 3 variables and r = 6 total polynomial order

To show the convergence with respect to these points, we compare the probability density function (PDF) of compliance associated with the first design in Fig. 7 obtained with these points versus the PDF obtained using sparse grids quadrature, with almost equal order. We compute the PDF by developing a polynomial chaos expansion (PCE) (Ghanem and Spanos 2002; Xiu and Karniadakis 2002) on standard normal variables (for a detailed discussion on generating PCEs, see Keshavarzzadeh et al. (2017)). It is evident that the PDFs are in close agreement; however, designed quadrature is comprised of M = 22 points, which is significantly smaller than the number of points required for sparse grids quadrature where M = 39. Hence, designed quadrature reduces the computational cost of the uncertainty analysis by nearly half. We also note that sparse grid nodes have one negative weight associated with the center point (y1 = y2 = y3 = 0) which may cause numerical issues in irregular functions (Heiss and Winschel 2007).

Fig. 7
figure 7

Comparison of PDFs obtained with designed quadrature and sparse grids using M = 22 and M = 39 simulations respectively

We compare the robust design (RDO) with a deterministic design (DET) by finding two designs with almost equal volume. Figure 8 shows two designs which are visually distinguishable. We note that the RDO design uses more of the strongest material and both designs converge to a discrete solution. Their performance metrics are listed in Table 1 which clearly shows that the robust design yields a smaller objective value. This result demonstrates that the RDO produces designs whose performance has less mean and less variance and is therefore more robust to uncertainties associated with the manufacturing process. On the other hand, DET design, which is obtained from a deterministic optimization using a nominal value for elastic moduli, exhibits larger mean and larger variance when it is subjected to stochastic simulations (with uncertain elastic moduli).

Fig. 8
figure 8

Topology designs for the modified L-bracket: DET (left), RDO (right)

Table 1 Performance comparison between robust and deterministic designs with \(\lambda =0.01\) for modified L-bracket

To further investigate the accuracy of the quadrature approximate, we compute the mean and standard deviation of the compliance associated with robust optimal design using the standard Monte Carlo analysis with 104 samples. Table 2 lists the mean and standard deviation which shows close agreement between two approaches.

Table 2 Mean and standard deviation of compliance associated with the robust optimal design using designed quadrature and Monte Carlo samples

4.2 Mechanical inverter

We consider the design of a mechanical inverter, whose boundary conditions are given in Fig. 9 to demonstrate the capability of the multiphase approach in designing a structure that combines stiff regions that withstand and transfer the load, with compliant regions for facilitation of motion.

Fig. 9
figure 9

Design domain for the mechanical inverter

In this problem, we maximize mechanical advantage subject to compliance and volume constraints. We impose compliance constraints to prevent overly compliant designs. The optimization problem is stated as

$$ \begin{array}{@{}rcl@{}} \underset{\boldsymbol \rho}{\min} && \mu(Q_{MA})\\ \text{subject to} && \mathbb{E}(V(\boldsymbol \rho)) \leq 0.2,\\ && \mu(\boldsymbol F^{T}_{\text{in}} \boldsymbol u) + \lambda \sigma(\boldsymbol F^{T}_{\text{in}} \boldsymbol u) \leq \bar{C}_{1},\\ && \mu(\boldsymbol F^{T}_{\text{out}} \boldsymbol u) + \lambda \sigma(\boldsymbol F^{T}_{\text{out}} \boldsymbol u) \leq \bar{C}_{2},\\ && 0 \leq \boldsymbol \rho \leq 1. \end{array} $$
(30)

where μ and σ are the mean and standard deviation of the mechanical advantage QMA = Fout/|Fin|, and the compliance upperbounds are set to \(\bar {C}_{1}=7.5 \times 10^{4} N \cdot m\) and \(\bar {C}_{2}=1.91 \times 10^{5} N \cdot m\). The half domain is discretized with 48 × 96 quadrilateral isotropic finite elements.

Figure 10 shows the optimized design for lambda values λ = 0.1, λ = 0.5, and λ = 1. Similar to previous examples, we generate a deterministic design (DET) which has a volume and compliance that is almost equal to that of the robust design (RDO) with λ = 0.1. These designs are shown in Fig. 11. Table 3 compares the performance of the two designs, again showing the superiority of the RDO. More precisely, the objective in this compliant mechanism example was to maximize the mean of mechanical advantage subject to constraining the mean and variance of compliance to ensure enough stiffness in the structure. Again, the RDO exhibits larger mean for the mechanical advantage and smaller robust criteria, i.e. μ + λσ for the compliance. This result indicates that the RDO design has higher capability in motion transfer yet is more stiff in the presence of uncertainty compared with the DET design which does not consider the scatter in the elastic moduli.

Fig. 10
figure 10

Optimized material distribution for the mechanical inverter associated with λ = 0.1 (left), λ = 0.5 (middle), and λ = 1 (right)

Fig. 11
figure 11

Topology designs for the mechanical inverter: DET (left), RDO (right)

Table 3 Performance comparison between robust and deterministic designs with \(\lambda =0.1\) for mechanical inverter

To better investigate the behavior of the optimization procedure in these designs, we show the convergence history of the stochastic quantities i.e. \( \mu (\boldsymbol F^{T}_{\text {in}} \boldsymbol u) + \lambda \sigma (\boldsymbol F^{T}_{\text {in}} \boldsymbol u), \mu (\boldsymbol F^{T}_{\text {out}} \boldsymbol u) + \lambda \sigma (\boldsymbol F^{T}_{\text {our}} \boldsymbol u), \mathbb {E}(V)\) and μ(QMA) evaluated for design iterates of the RDO and DET designs in Fig. 12. It is observed that while both designs exhibit convergence, the DET iterations result in a less optimal value for the mechanical advantage.

Fig. 12
figure 12

Convergences histories of the stochastic quantities for the mechanical inverter optimization: DET (left), RDO (right)

4.3 Heat sink design

The objective in this example is to design a robust heat sink which minimizes the thermal compliance, i.e. maximizes the heat transfer within the domain shown in Fig. 13. The governing equation and boundary conditions for a steady-state heat conduction problem are

Fig. 13
figure 13

Design domain for the heat sink. A zero temperature is imposed at the boundary ΓD

$$ \left\{\begin{array}{ll} \nabla. \boldsymbol q(\boldsymbol x) + \textbf{b}(\boldsymbol x) = 0 & \forall \boldsymbol x \in D \\ {T}(\boldsymbol x) = 0 & \forall \boldsymbol x \in {\Gamma}_{D}, \ \end{array}\right. $$
(31)

where q is the thermal flux and T is the temperature. Similar to (3), the elliptic PDE associated with (31) is expressed as

$$ \left\{\begin{array}{ll} -\nabla.(\mathbb{K}(\boldsymbol x) \nabla T(\boldsymbol x) ) = f(\boldsymbol x) & \forall \boldsymbol x \in D \\ T(\boldsymbol x) = 0 & \forall \boldsymbol x \in \partial D, \end{array}\right. $$
(32)

where \(\mathbb {K}\) is the thermal conductivity matrix and f(x) is the force function. After finite element discretization, the temperature TT(x) is obtained from KT = F where

$$ \begin{array}{@{}rcl@{}} \boldsymbol K &=& {\int}_{D} \boldsymbol B^{T} \mathbb{K} \boldsymbol B dD\\ \boldsymbol F &=&{\int}_{D} \boldsymbol N^{T} f dD \end{array} $$
(33)

are thermal stiffness matrix and thermal load vector, with N and B shape function matrix and its corresponding derivative matrix respectively. The thermal conductivity matrix \(\mathbb {K}\) in this case is given by

$$ \mathbb{K} = \mathcal{K}(\boldsymbol \rho) \boldsymbol I_{2}, $$
(34)

where I2 is a 2 × 2 identity matrix and \(\mathcal {K}(\boldsymbol \rho )\) is the effective thermal conductance parameterized with respect to ρ1 and ρ2 at each element similar to effective elastic modulus as described in Section 3.1.

We now solve a similar optimization problem to the first numerical example (cf. (29)) where we use C(ρ) = TTF as the thermal compliance. We use the same numerical values for nominal thermal conductance as the previous examples, i.e. \(\mathcal {K}_{1}^{0}=100 W/(m \cdot K), \mathcal {K}_{2}^{0} =200 W/(m \cdot K), \mathcal {K}_{3}^{0} = 300 W/(m \cdot K), \mathcal {K}_{\text {void}} =10^{-6} W/(m \cdot K)\) where W/(mK) denotes watts per meter-Kelvin, with a perturbation of δ = 0.05 to introduce uncertainty. We use a finite element mesh containing 80 × 80 quadrilateral isotropic elements to discretize the design domain. Figure 14 shows the robust heat sink designs for different λ values. It is again observed that the most conductive material is placed in the regions with concentrated thermal load.

Fig. 14
figure 14

Optimized material distributions for the heat sink design associated with λ = 0.1 (left), λ = 0.5 (middle), and λ = 1 (right). The numbers on the color bar indicate the effective nominal thermal conductivity \(\mathcal {K}^{0}\) (in W/(mK)) at each finite element

Similar to previous examples, we compare DET and RDO (with λ = 1) designs. Figures 15 and 16 show the optimized design and temperature field for DET and RDO designs. We use the nominal heat conduction values to compute temperature in the RDO case. Similar to the structural topologies, the temperature distributions are visually distinguishable between RDO and DETcases.

Fig. 15
figure 15

Topology designs for the optimized heat sink: DET (left), RDO (right).

Fig. 16
figure 16

Temperature distribution for optimized heat sink designs: DET (left), RDO (right). The numbers on the color bar indicate the temperature T (in Kelvin) evaluated at the centroid of each element

The performance metrics for the two designs are listed in Table 4. The results show that the RDO design achieves a smaller thermal compliance which is in accordance with findings from previous examples.

Table 4 Performance comparison between the robust and deterministic designs with \(\lambda =1\) for heat sink

5 Conclusion

We have presented a systematic approach for multiphase topology optimization under uncertainty. The uncertainty in the design is motivated by the scatter in the material properties of candidate materials that are used in additive manufacturing processes. The optimization problem determines the optimal material at each spatial point in the domain. The robust design formulation ensures the optimal performance of the design in the presence of uncertainty. We have performed uncertainty analysis based on the well-established stochastic collocation approach, which involves simulations on collocation points in the domain of uncertain parameters. We used a novel quadrature strategy to alleviate the costly uncertainty analysis. We demonstrated our approach via numerical examples on linear elastic structures and a heat conduction problem. It is shown that robust designs which consider the scatter in material properties have improved performance when compared with designs obtained using standard deterministic methods.

The uncertainty in the local material properties reflects the inherent variability of the additive manufacturing process, in which multiple parameters can impact the effective properties of the printed parts. These parameters include, for example fluctuations in the velocity of the laser scan, variations in the radii of the powder particles (in powder-based AM technologies), and variability in the material’s diffusion and absorption coefficients, each of which can introduce uncertainty in the manufacturing process (Hu and Mahadevan 2017). The multimaterial robust design method presented in this paper addresses this uncertainty in a systematic and mathematically rigorous way, thereby reducing variance in the performance of the optimized designs.

6 Replication of results

For readers seeking to replicate the results presented in this paper, the MATLAB scripts for computing the __ quantities of interest, namely compliance, volume, and mechanical advantage, as well as statistical moments and their associated sensitivities corresponding to three numerical examples are provided in the public repository linked to in reference (Keshavarzzadeh and James 2018). The data associated with the new quadrature rule, which is used for computation of statistical moments and their sensitivities, are also provided in this repository.