1 Introduction

Additive manufacturing is a relatively new and rapidly evolving technique that uses computer guided machines to build components in a layer-by-layer fashion. The technique allows for a high degree of design freedom and is capable of producing sophisticated geometries at only a fraction of the costs for traditional manufacturing (Gibson et al. 2015). Although additive manufacturing techniques were initially only viable for rapid prototyping with polymers, later improvements, especially in metal-based techniques, extended their application to end-usable parts (Atzeni and Salmi 2012). In current practice, selective laser melting (SLM) is most commonly used for manufacturing complex metal components (Kruth et al. 2004). SLM is a technique based on powder bed fusion via a micro-welding process (Baufeld et al. 2009). The SLM process, illustrated in Fig. 1, starts with a fully detailed CAD model of the component which is sliced in a number of cross-sections depending on the required accuracy of the finished part. Inside the building chamber of the SLM printer, a re-coater deposits a thin layer of metal powder on the build platform. Next, a high-energy-density laser traces the first cross-section of the part, fusing the powder together. Once the first layer is completed, the build platform drops, the re-coater applies a new layer of powder and the laser traces the next cross-section onto the powder. This process is repeated until the part is finished.

Fig. 1
figure 1

Schematic representation of the SLM printing process: a the re-coater deposits a layer of material, b a laser fuses the powder together, c the build platform drops, d the re-coater deposits a new layer of material on top of the previous layer, and e a laser beam fuses the next layer of material together

The SLM process subjects the component to violent heating and cooling cycles which induce large thermal strains and residual stresses in the final part (Van Belle et al. 2013; Mercelis and Kruth 2006). These internal stresses cause unwanted deformations of the part during manufacturing which may lead to inaccurate results or print failure. Print failure occurs when the upward displacement of the top layer is larger than the layer thickness. In this case, the re-coater is not able to deposit a new layer of metal powder as it will collide with the printed part resulting in a crash, illustrated in Fig. 2.

Fig. 2
figure 2

Schematic representation of the SLM printing process of a part undergoing critical thermal deformations: a a layer of powder is fused together using a laser, b ahermal stresses cause deformations of the part, and c the re-coater collides with the already printed part, causing print failure

This issue can be countered by adding temporary support structures to the part (Hussein et al. 2013; Vandenbroucke and Kruth 2007; Järvinen et al. 2014). These additional supports make sure that (1) horizontal and near-horizontal layers are supported, (2) heat transfer to the build platform is improved and (3) the vertical displacements of individual layers are reduced. By inhibiting critical displacements, the risk of print-failure can be significantly reduced as illustrated in Fig. 3. In current practice, these support structures are manually added to the design, mainly based on engineering experience. Due to the complex thermal behaviour of the part, the deformations can not always be predicted accurately. This results in a time consuming and relatively unreliable support generation process. The excess of support structure generated in this manner is material, time and energy consuming.

Fig. 3
figure 3

Schematic representation of the SLM printing process of a part where thermal deformations are restricted by means of a support structure: a a layer of powder is fused together using a laser, b deformations are restricted by an added support structure, and c the re-coater deposits a new layer of material without any crashes

Recent studies aim at eliminating the uncertainty in the thermal behaviour by extending existing simulation methods, initially developed for welding problems, for applications in metal-based additive manufacturing (Frazier 2014; Schoinochoritis et al. 2014; Cheng et al. 2016; Vastola et al. 2016; Heigel et al. 2014). A full thermal analysis of the additive manufacturing process to calculate the deformations is very time consuming because it is a long time-scale problem which involves transient heat transfer, non-linear mechanical deformation, phase changes in the material, and fluïdum dynamics (Cheng et al. 2016; Vastola et al. 2016). The required simulation time can span from a couple of days to entire weeks, depending on the size of the problem.

The simulation time can significantly be reduced by adopting the inherent strain method, originally developed for fast estimation of part deformation in metal welding (Ueda et al. 1979; Yuan and Ueda 1996; Hill and Nelson 1995). The applied plastic strain method is another efficient model inspired by the inherent strain theory (Michaleris et al. 2013; Wang and Zhang 2008). However, due to the more complicated process of metal additive manufacturing compared to metal welding, some accuracy of the simulation is sacrificed. Liang et al. (2018) propose a modified inherent strain method to improve the accuracy of the estimated thermal behaviour.

A recent study by Cheng et al. (2019) utilizes the modified inherent strain method to optimize the layout of the support structures in order to satisfy a predetermined stress constraint. This method results in components that can be printed without residual stress induced print failure, e.g. delamination. However, it does not take into account possible re-coater collisions due to thermal deformations.

Other studies aim at automatically generating support structures to solve critical overhang angles (Allaire and Bogosel 2019; Strano et al. 2012; Calignano 2014; Vaidya and Anand 2016), focus on improving the heat dissipation in the part during printing (Liu and Zhou 2019), or optimize the build orientation to minimize the required volume of support structure (Das et al. 2015, 2019). Allaire et al. (2018) proposed a method to take into account the thermal stresses during the optimization process. This results in a design for which the thermal stresses induced during the manufacturing process are minimized.

Topology optimization can be used as a tool for the automatic generation of material-efficient support structures. Topology optimization is a numerical, iterative method for finding the optimal distribution of material inside a specified design domain (Rosen 2014; Bendsøe 1989; Zhou and Rozvany 1991). In the density based approach, the domain is discretized using a density field which takes a value of 1 at elements where material is present, and 0 in the void regions. Intermediate densities are also allowed to facilitate the use of a gradient-based optimization scheme. The design’s geometry is usually controlled with the help of filters. Their function is to avoid checkerboard patterns (Díaz and Sigmund 1995) and ensure mesh independent solutions (Jog and Haber 1996). Most filters consist of a spatial averaging operation where the density of an element is replaced by the weighted average of its neighboring elements (Bruns and Tortorelli 2001; Bourdin 2001).

In recent years, topology optimization has been considered in the context of additive manufacturing to design parts taking into account some manufacturing constraints related with this production process. One of these constraints is the need for support structure in order to keep the part stable during production. Eliminating the need for this type of support structure by imposing a maximum overhang angle to the optimization problem has been the focus of various recent studies (Liu and Ma 2016; Brackett et al. 2011; Gaynor and Guest 2014; Qian 2017; Langelaar 2016a; 2016b; Pellens et al. 2018). The bulk of these studies can be divided into two categories. The first approach focusses mainly on enforcing manufacturability by an additional constraint which is formulated in terms of a smoothened approximation of a min/max operator (Gaynor and Guest 2014; Qian 2017), the second uses a filtering scheme to ensure that a part is sufficiently supported during manufacturing (Langelaar 2016a, 2016b; Pellens et al. 2018). Other studies focus on optimizing the support structure without changing the topology of the part itself. A recent study by Cheng et al. (2019) utilizes the modified inherent strain method to optimize the layout of the support structures in order to satisfy a predetermined stress constraint. This method results in components that can be printed without residual stress induced print failure, e.g. delamination. However, it does not take into account possible re-coater collisions due to thermal deformations.

In this paper, a topology optimization framework is presented to optimize the layout of the required support structure for a given part taking into account a maximum allowable vertical displacement in each layer such that print failure due to re-coater collisions is avoided. The general inherent strain method is adopted to simulate the thermal behaviour of the component. This method is computationally less expensive than the modified inherent strain but comes at the expense of sacrificing some accuracy. The support structure used in SLM is usually a lattice structure, which can be regarded as a periodical distribution of unit cells. It is modeled as a homogenized material based on the method proposed by Watts et al. (2019).

This paper is organized as follows: First, a brief description is provided of the homogenized support structure and the general inherent strain method used to simulate the thermal behaviour of a part during manufacturing (Section 2). Next, a topology optimization problem is formulated to automatically generate the layout of the required support structure (Section 3). The proposed optimization scheme is thereafter validated on a set of 2D bench-mark cases; (1) a simple cantilever and (2) a more complex cantilever problem. Following the 2D validation of the method, a 3D problem is described and validated (Section 4). Finally, conclusion are provided.

2 Simulation of the manufacturing process

In this section, the homogenization method proposed by Watts et al. (2019) is briefly summarized. Next, the general inherent strain method used to simulate the thermal behaviour of a part during manufacturing is described and validated on a 2D cantilever example.

2.1 Homogenization

The support structure is assumed to be a lattice structure with the isotruss architecture (Messner 2016). Figure 4 shows the isotruss unit cell. Denoting the diameter of the axially-aligned rods as d, the diagonal rods have a diameter \( \frac{4d}{3\sqrt{3}} \). This diameter ratio results in isotropic macro-scale behaviour. Watts et al. (2019) proposed a method to simulate the homogenized stiffness of an isotropic lattice structure composed of isotruss cells based on surrogate models. These surrogate models are assembled by fitting a low-order polynomial to a set of datapoints representing the homogenized stiffness (Andreassen and Andreasen 2014) of the isotruss cell with a variable rod diameter.

Fig. 4
figure 4

Unit cell of the isotruss lattice

For each unit cell of the support structure, the independent design variable is the relative density ρ, which defines the rod diameter d and the homogenized elastic properties Eh and νh of the lattice. The polynomial expressions for the homogenized properties of the isotruss lattice depend on the density ρ, the Young’s modulus ES and the Poisson’s ratio νS of the constituent material (Watts et al. 2019):

$$ {\displaystyle \begin{array}{rcl}\frac{E^h}{E_S}& =& \left(0.20529-0.03303{\nu}_S\right)\rho \dots \\ {}& & +\left(0.08121+0.27243{\nu}_S\right){\rho}^2\dots \\ {}& & +\left(0.64974-0.24237{\nu}_S\right){\rho}^3\\ {}{\nu}^h& =& \left(0.24776+0.01698{\nu}_S\right)\dots \\ {}& & -\left(0.15929-0.73860{\nu}_S\right)\rho \dots \\ {}& & -\left(0.18628+0.48323{\nu}_S\right){\rho}^2\dots \\ {}& & +\left(0.09775+0.72660{\nu}_S\right){\rho}^3\\ {}d& =& 0.02049+1.05076\rho \dots \\ {}& & -1.59468{\rho}^2+1.09799{\rho}^3.\end{array}} $$
(1)

These expressions for the homogenized material properties are used in this paper to compose the element stiffness matrices of the support structure.

2.2 Inherent strain method

The inherent strain method was originally developed for estimation of part deformation in metal welding. Although the SLM process is more complex than metal welding, applying the inherent strain method results in a sufficiently accurate estimation of the thermal deformation (Cheng et al. 2016).

SLM builds a part by depositing a very high number of individual layers. Simulation considering each individual layer is extremely time consuming and infeasible to adopt in an optimization framework. Therefore, the part is divided into a limited number of printing stages, where each printing stage consists of multiple layers subdivided in a finite number of elements. Every printing stage is described by an activated layer and bulk material, illustrated in Fig. 5. The activated layer is the stage that is being scanned, the bulk material consists of the stages that have already been printed.

Fig. 5
figure 5

Schematic representation of the inherent strain simulation process

The simulation using the general inherent strain method starts at the build platform. The first couple of layers, representing the first printing stage i = 1, are deposited. The inherent strains inh are applied to the elements of the activated layer of the first printing stage i = 1. Using these strains, the displacements u1 of the full printing stage can be calculated using a finite element analysis. Next, the second printing stage i = 2 is deposited on top of the first, the inherent strains are applied to the elements of the activated layer and the displacements u2 of the second printing stage are calculated. The displacements of the previous printing stage ui are not considered in the calculation of u2 as the re-coater compensates for all previous displacements. This process is repeated until the deformations ui of every printing stage are determined.

The displacements ui of printing stage i are calculated as follows:

$$ {\mathbf{K}}_i{\mathbf{u}}_i={\mathbf{f}}_i, $$
(2)

where ui collects the displacements for all degrees of freedom of printing stage i, and fi represents the forces acting on the nodes of the activated layer in printing stage i, derived from the inherent strains inh by the following expression:

$$ {\displaystyle \begin{array}{rcl}{\mathbf{f}}_i^e& =& {\int}_{\varOmega^e}{{\mathbf{B}}^e}^T{\mathbf{D}}^e{\boldsymbol{\in}}^{\mathrm{inh}}d{\varOmega}^e\\ {}{\mathbf{f}}_i& =& \sum \limits_{e=1}^{n_i}{C}^e{\mathbf{f}}_i^e,\end{array}} $$
(3)

where ni is the number of elements in the activated layer of printing stage i and where Be and De are the strain-displacement matrix derived from the shape functions and the constitutive matrix of the considered element e, respectively. The matrix Ce is a binary location matrix mapping local degrees of freedom to global degrees of freedom. The global stiffness matrix Ki of printing stage i is assembled as follows:

$$ {\mathbf{K}}_i=\sum \limits_{e=1}^{n_i}{\mathbf{K}}^e=\sum \limits_{e=1}^{n_i}{{\mathbf{C}}^e}^T{\mathbf{k}}^e{\mathbf{C}}^e, $$
(4)

where Ke is the contribution of element e to the global stiffness matrix and ke is the element stiffness matrix which is calculated as follows:

$$ {\mathbf{k}}^e={\int}_{\varOmega^e}{{\mathbf{B}}^e}^T{\mathbf{D}}^e{\mathbf{B}}^e\mathbf{d}{\boldsymbol{\Omega}}^{\mathbf{e}} $$
(5)

For the part, the constitutive matrix \( {\mathbf{D}}_{\mathrm{part}}^e \) assuming plane strain is given by:

$$ {\mathbf{D}}_{\mathrm{part}}^e=\frac{E_S}{1-{\nu_S}^2}\left[\begin{array}{ccc}1& {\nu}_S& 0\\ {}{\nu}_S& 1& 0\\ {}0& 0& \frac{1-{\nu}_S}{2}\end{array}\right] $$
(6)

For the lattice structure, the constitutive matrix of the homogenized isotruss lattice \( {\mathbf{D}}_{\mathrm{lattice}}^e \) assuming plane strain is assembled using the expressions for the homogenized Young’s modulus Eh and Poisson’s coefficient νh given in Section 2.1:

$$ {\mathbf{D}}_{\mathrm{lattice}}^e=\frac{E^h\left({\rho}_e\right)}{1-{\nu}^h{\left({\rho}_e\right)}^2}\left[\begin{array}{ccc}1& {\nu}^h\left({\rho}_e\right)& 0\\ {}{\nu}^h\left({\rho}_e\right)& 1& 0\\ {}0& 0& \frac{1-{\nu}^h\left({\rho}_e\right)}{2}\end{array}\right] $$
(7)

2.3 Application

The general inherent strain method is applied to a 2D cantilever problem, presented in Fig. 6, to verify the simulated deformations. The design domain with a length L = 150 mm and a height h = 20 mm is discretized using n = 150 × 20 = 3000 square \( {\mathbb{Q}}_1 \) finite elements with a side length of 1 mm. In each individual printing stage i, with an activated layer height hi = 1 mm, a load derived from the general inherent strain method is applied. The TiAl6V4 alloy used in this case has a Young’s modulus of ES = 110 GPa and a Poisson’s ratio νS = 0.3. The strains corresponding with this alloy for an activated layer with height hi = 1 mm were experimentally determined by Materialise and are given by:

$$ {\boldsymbol{\in}}^{\mathrm{inh}}=\left[\begin{array}{c}{\in}_x\\ {}{\in}_y\\ {}{\in}_z\\ {}{\gamma}_{xy}\\ {}{\gamma}_{yz}\\ {}{\gamma}_{xz}\end{array}\right]=\left[\begin{array}{c}-4.41500\times 1{0}^{-3}\\ {}-4.445698\times 1{0}^{-3}\\ {}-1.94260\times 1{0}^{-2}\\ {}0\\ {}0\\ {}0\end{array}\right] $$
(8)

The homogenized properties are determined for a three-dimensional isotruss lattice cell. The 2D examples are therefore modelled as a 3D structure with a thickness of 1 element. The isotruss lattice structure has a cell dimension of 2 × 2 × 2 mm and the rod diameters can take any value between \( {d}_{\mathrm{min}}=0.2 \) mm and \( {d}_{\mathrm{max}}=1.2 \) mm. The lower bound on the diameter d is determined by the minimal printable feature size of the SLM printer and the upper bound is needed to avoid trapping metal powder in the structure. In order to ensure manufacturability of the cantilever, a uniformly distributed support structure with a density ρ of 0.125 is added underneath the horizontal sections. All computations are performed on a MacBook pro 2015 with a 2.7 GHz Intel Core i5 processor.

Fig. 6
figure 6

Design of the 2D cantilever case

The resulting displacements of the simulation are presented in Fig. 7. The full displacement of the part up until a specific printing stage i is determined as a sum of the displacements all layers printed so far. Starting from the first printing stage, i = 1, up to stage i = 16, no significant deformations occur during manufacturing. However, when the first cantilevering stage i = 17 is printed, a large vertical displacement can be observed in the right corner of the cantilever. The printed part behaves similarly in the following stages, but to a lesser extent as they are better supported by the previous cantilevering stages.

Fig. 7
figure 7

Deformation of the 2D cantilever case

In order to verify the inherent strain method, the same cantilever case has been simulated in Materialise Magics, which makes use of the Simufact Solver for SLM simulations. The results for the displacement field are similar with a maximum overestimation of 10% for the values calculated via the general inherent strain method.

In order to check the convergence of the results in terms of the mesh resolution, the inherent strain method is applied to a model with a higher resolution of n = 300 × 40 = 12000 elements. The experimentally determined inherent strains inh of the TiAl6V4 alloy are only valid for an activated layer with a thickness of 1 mm. Therefore, the simulation is performed using a height hi = 1 mm, where 1 printing stage consists of 2 finite element layers. The result is presented in Fig. 8. It shows a similar displacement pattern with a maximum value of 0.073 mm compared to 0.072 mm for the original model.

Fig. 8
figure 8

Displacement plot of the cantilever example with a mesh resolution of n = 300 × 40 = 12000 elements

3 Automatic support generation

This section describes a topology optimization framework to automatically generate the required support structure layout based on the thermal deformations calculated by the general inherent strain method described in Section 2.

3.1 Formulation of the optimization problem

In topology optimization, the structure is subdivided in a finite number of elements. In this paper, the structure is composed of a solid part with a fixed topology and a support structure which forms the design domain in the optimization. Each element e in the design domain is assigned a density ρe (zero density for void, unit density for solid elements) to determine the amount of material. Afterwards, the densities ρe are translated to rod diameters following (1). The optimization problem is formulated as a minimum volume problem with a set of displacement constraints and is given by:

$$ {\displaystyle \begin{array}{rcl}\underset{\boldsymbol{\rho}}{\min }:V& =& \sum \limits_e{v}_e{\rho}_e={\mathbf{v}}^T\boldsymbol{\rho} \\ {}\mathrm{s}.\mathrm{t}.:{u}_{i,j}& =& {\mathbf{L}}_{i,j}^T{\mathbf{u}}_i\le {u}_{\mathrm{max}}\kern1em \forall i,j\\ {}& & {\rho}_{\mathrm{min}}\le {\rho}_e\le {\rho}_{\mathrm{max}},\\ {}& & \end{array}} $$
(9)

where the displacements ui are obtained as the solution of the following system of equations:

$$ {\mathbf{K}}_i\left({E}^h\left(\boldsymbol{\rho} \right),{\nu}^h\left(\boldsymbol{\rho} \right)\right){\mathbf{u}}_i={\mathbf{f}}_i $$
(10)

In (9), the design variables ρe are collected in a vector ρ. Likewise, the volumes ve of the elements are collected in a vector v. The inner product of these vectors is the volume V of material used for the support structure. The objective of the optimization is to minimize this volume. Constraints are imposed on the vertical displacements of the top nodes in every printing stage i. In order to limit the number of constraints and control the computation time, only a subset of the top nodes is considered in the optimization. The vertical displacement of the jth node considered in printing stage i is denoted as ui,j. This value is obtained from the full displacement vector ui in stage i by means of a selection vector Li,j. The maximum allowable value \( {u}_{\mathrm{max}} \) is chosen equal to the layer thickness of the print. Theoretically, this wil make sure that re-coater collisions are avoided. However, due to the accuracy of the thermal simulation, real displacements may vary from the simulated displacements. Therefore, in practical applications, a safety factor on the maximum allowable displacement \( {u}_{\mathrm{max}} \) may be considered. After the optimization, the vertical displacements of all top nodes in every printing stage are checked in order to verify wether they remain limited to the maximum allowable value \( {u}_{\mathrm{max}} \).

In order to guarantee manufacturability, abrupt rod diameter variations between neighboring cells are avoided by applying a density filter to the optimization problem (Bruns and Tortorelli 2001; Bourdin 2001). This spatial filter replaces the density of an element ρe by the weighted average \( {\overset{\sim }{\rho}}_e \) of its neighboring elements, and is defined as:

$$ {\overset{\sim }{\rho}}_e=\frac{\sum_{j\in {\mathbb{N}}_e}{h}_{ej}^R{\rho}_j}{\sum_{j\in {\mathbb{N}}_e}{h}_{ej}^R}, $$
(11)

where \( {\mathbb{N}}_e \) is the neighborhood set and \( {h}_{ej}^R \) is the filter kernel with radius R defined as:

$$ {h}_{ej}^R=\max \left(R-\parallel {x}_e-{x}_j\parallel, 0\right). $$
(12)

where ∥xexj∥ is the center-to-center distance from element e to j. In (11) \( {\mathbb{N}}_e \) is the neighborhood set, or the set of all elements j for which the distance ∥xexj∥ is smaller than or equal to the filter radius R. The density filter in (11) is a linear operator that can be expressed as:

$$ \overset{\sim }{\boldsymbol{\rho}}={\mathbf{H}}^R\boldsymbol{\rho}, $$
(13)

where the coefficient matrix HR consists of elements \( {H}_{ij}^R=\frac{h_{ij}^R}{\sum_{j\in {\mathbb{N}}_e}{h}_{ik}^R} \).

The sensitivity \( \frac{\partial V}{\partial \boldsymbol{\rho}} \) of the objective function V (ρ) with respect to the design variables ρ is computed by applying the chain rule:

$$ \frac{\partial V}{\partial \boldsymbol{\rho}}=\frac{\partial V}{\partial \overset{\sim }{\boldsymbol{\rho}}}\frac{\partial \overset{\sim }{\boldsymbol{\rho}}}{\partial \boldsymbol{\rho}}. $$
(14)

The sensitivity \( \frac{\partial V}{\partial \overset{\sim }{\boldsymbol{\rho}}} \) of the objective function V (ρ) with respect to the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \) is given by the following:

$$ \frac{\partial V}{\partial \overset{\sim }{\boldsymbol{\rho}}}={\mathbf{v}}^T, $$
(15)

The sensitivity \( \frac{\partial \overset{\sim }{\boldsymbol{\rho}}}{\partial \boldsymbol{\rho}} \) of the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \) with respect to the design variables ρ is:

$$ \frac{\partial \overset{\sim }{\boldsymbol{\rho}}}{\partial \boldsymbol{\rho} \left(\mathbf{x}\right)}={\mathbf{H}}^R. $$
(16)

The sensitivity \( \frac{\partial {u}_{i,j}}{\partial \boldsymbol{\rho}} \) of the constraint function \( {\mathbf{L}}_{i,j}{\mathbf{U}}_i\le {u}_{\mathrm{max}} \) on print stage i with respect to the design variables ρ is computed by applying the chain rule:

$$ \frac{\partial {u}_{i,j}}{\partial \boldsymbol{\rho}}=\frac{\partial {u}_{i,j}}{\partial \overset{\sim }{\boldsymbol{\rho}}}\frac{\partial \overset{\sim }{\boldsymbol{\rho}}}{\partial \boldsymbol{\rho}}. $$
(17)

The sensitivity \( \frac{\partial {u}_{i,j}}{\partial \overset{\sim }{\boldsymbol{\rho}}} \) of the constraint function ui with respect to the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \) is computed using the adjoint variable method:

$$ \frac{\partial {u}_{i,j}}{\partial {\overset{\sim }{\rho}}_e}=-{\boldsymbol{\lambda}}_i^T\frac{\partial {\mathbf{K}}_i}{\partial {\overset{\sim }{\rho}}_e}{\mathbf{U}}_i, $$
(18)

where the adjoint variable λi is obtained by solving Kiλi = Li,j and the sensitivity \( \frac{\partial {\mathbf{K}}_i}{\partial {\overset{\sim }{\rho}}_e} \) of the global stiffness matrix Ki with respect to the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \) is given by:

$$ \frac{\partial {\mathbf{K}}_i}{\partial {\overset{\sim }{\rho}}_e}=\frac{\partial {\mathbf{K}}_i}{\partial {E}_{m,e}^h}\frac{\partial {E}_{m,e}^h}{\partial {\overset{\sim }{\rho}}_e}+\frac{\partial {\mathbf{K}}_i}{\partial {\nu}_{m,e}^h}\frac{\partial {\nu}_{m,e}^h}{\partial {\overset{\sim }{\rho}}_e}, $$
(19)

where \( \frac{\partial {E}_{m,e}^h}{\partial {\overset{\sim }{\rho}}_e} \) and \( \frac{\partial {\nu}_{m,e}^h}{\partial {\overset{\sim }{\rho}}_e} \) can be derived from (1).

The sensitivity \( \frac{\partial \overset{\sim }{\boldsymbol{\rho}}}{\partial \boldsymbol{\rho}} \) of the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \) with respect to the design variables ρ is obtained in a similar way as described above.

4 2D example

In this section, the method for automated support layout generation described in Section 3 is demonstrated for a set of 2D examples.

The first benchmark case, presented in Fig. 6, is the 2D cantilever problem described in Section 2.3. The maximum allowable vertical displacement \( {u}_{\mathrm{max}} \) is set to a layer thickness of 0.015 mm. The box constraints on the design variables ρe are set to \( {\rho}_{\mathrm{min}}=0.094 \) and \( {\rho}_{\mathrm{max}}=1 \), corresponding to an axially-aligned rod diameter of \( {d}_{\mathrm{min}}=0.2 \) mm and \( {d}_{\mathrm{max}}=0.6 \) mm. In order to keep the calculation time limited, the set of constraints is limited to 50 nodes with the largest vertical displacements for every print stage i when a uniformly distributed support structure is used, resulting in 50 × 20 = 1000 constraints. A density filter with a radius R = 3 mm is applied to smooth the transition between rod diameters. The optimization is performed in MATLAB using the built-in interior-point optimizer with default settings.

The results of the optimization are presented in Fig. 10. The final volume fraction of the support structure is 16.62% of the total supporting volume and every vertical displacement satisfies the maximum allowable value. The convergence plot, presented in Fig. 9, shows that the interior-point optimizer converges after 220 iterations. The total computation time is 3h 36min 3sec Fig. 10.

Fig. 9
figure 9

Convergence plot of the 2D cantilever case. The x-axis represents the number of iterations needed; The y-axis represents the volume fraction of the support structure expressed using the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \)

Fig. 10
figure 10

Optimized support structure layout of the 2D cantilever case

The displacement plots, presented in Fig. c, show the effect of the optimized support layout on the deformation of the part. On the far right end of the cantilever, the optimization scheme introduced a stiff vertical strut. This strut reduces the vertical displacement of the first cantilevering layer, in printing stage i = 17, in order to limit it to the maximum allowable value \( {u}_{\mathrm{max}} \). By restricting the upward displacement of the first cantilevering layer, the vertical displacement of the following layers is reduced as well. Additionally, a diagonal structure can be observed in the optimized results. In order to explain the role of this diagonal structure, a comparison is made of the thermal deformations with and without this structure in Fig. 11. In both cases, it can be observed that the vertical strut is subjected to bending caused by shrinkage of the cantilever. As a consequence, the right hand side of the strut elongates, resulting in an upward displacement of the first layer of the cantilever. The diagonal structure reduces this bending effect and the resulting upward displacement, such that it remains below the maximum allowable value Fig. 12.

Fig. 11
figure 11

Detailed view of the displacements on the right hand side of the cantilever example: a with a diagonal truss and b without a diagonal truss

Fig. 12
figure 12

Deformation of the 2D cantilever case

In order to check the effect of the mesh resolution on the final result, the optimization is performed again using a mesh size of n = 300 × 40 = 12000 elements. The resulting design is presented in Fig. 14. the final volume fraction of the supporting volume is 20.8% and all vertical displacements are below the maximum allowable value. Compared to the result in Fig. 10 the volume of support structure needed is higher, this is due to the slightly different displacements obtained by the simulation of the higher resolution model. The convergence plot, presented in Fig. 13, shows that the interior-point optimizer converges after 377 iterations. The higher mesh resolution leads to a computation time of 11h 05min 53sec Fig. 14.

Fig. 13
figure 13

Convergence plot of the high resolution 2D cantilever case. The x-axis represents the number of iterations needed; The y-axis represents the volume fraction of the support structure expressed using the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \)

Fig. 14
figure 14

Optimized support structure layout of the 2D cantilever case with a mesh resolution of n = 300 × 40 = 12000

To demonstrate the ability of the optimization framework to handle more complex geometries, the support layout of two additional 2D bench-mark cases is optimized. In the first case, presented in Fig. 15, three notches are added to the previously presented cantilever example. All material properties and optimization parameters are kept the same.

Fig. 15
figure 15

Design of the 2D cantilever case with notches

The resulting support layout after optimization is presented in Fig. 17, the final volume fraction of the supporting volume is 11.88% and all vertical displacements are below the maximum allowable value. The convergence plot, presented in Fig. 16, show that the optimizer converges in 250 iterations. The total computation time is 3h 12min 36sec Fig. 17.

Fig. 16
figure 16

Convergence plot of the 2D cantilever case with notches. The x-axis represents the number of iterations needed; The y-axis represents the volume fraction of the support structure expressed using the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \)

Fig. 17
figure 17

Optimized support structure layout of the 2D cantilever case with notches

Fig. 18
figure 18

Detailed view of the displacements on the right hand side of the cantilever example with notches: a with stiffer support at the notches and b without stiffer support at the notches

The displacement plots, presented in Fig. 19, show the deformation of the part with optimized support layout during manufacturing. It can be noticed that a similar vertical strut as in the previous example is added to the far right corner of the cantilever. Its purpose is again to prevent a large vertical displacement of the first cantilevering layer in printing stage i = 17, and therefore reduce the displacement of the following layers. Starting from print stage i = 9, the notches are being formed. The support structure introduced by the optimizer shows a difference in layout for each of the three notches. The further a notch is removed from the base of the cantilever (left side of the domain), the stiffer the support structure needs to be. Each of the notches needs support structure in order to avoid large vertical displacements of their first layer, demonstrated in Fig. 18. Additionally, the extra support added to the rightmost notch helps in reducing the bending in the vertical strut, and therefore reduces the vertical displacement of the full cantilever introduced in layer i = 17 Fig. 19.

Fig. 19
figure 19

Deformation of the 2D cantilever case with notches

In the second more complex benchmark case, presented in Fig. 20, a sine shaped cantilever is considered.

Fig. 20
figure 20

Design of the 2D cantilever case with a sine shaped cantilever

The resulting support layout after optimization is presented in Fig. 22, the final volume fraction of the supporting volume is 13.07% and all vertical displacements are below the maximum allowable value. The convergence plot, presented in Fig. 21, shows that the optimizer converges in 250 iterations. The total computation time is 3h 4min 48sec Fig. 22.

Fig. 21
figure 21

Convergence plot of the 2D cantilever case with a sine shaped cantilever. The x-axis represents the number of iterations needed; The y-axis represents the volume fraction of the support structure expressed using the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \)

Fig. 22
figure 22

Optimized support structure layout of the 2D cantilever case with a sine shaped cantilever

The displacement plots, presented in Fig. 23, show the deformation of the part with optimized support layout during manufacturing. It can be noticed that a similar vertical strut as in the previous example is added to the far right corner of the cantilever. Its purpose is again to prevent a large vertical displacement of the first cantilevering layer in printing stage i = 17, and therefore reduce the displacement of the following layers. Starting from printing stage i = 13, a stiffer support is introduced in between the waves of the sine shape, which can be observed in Fig. 22. This support structure is required to reduce the vertical displacements of ’floating’ solid layers which exceed a critical length.

The examples presented in this section show that the proposed optimization framework is able to reduce the vertical displacements of individual layers by stiffening the support structure in specific areas. Each of the top nodes of the activated layers has a vertical displacement that is smaller than the layer thickness \( {u}_{\mathrm{max}} \) making sure that the risk of re-coater collisions is significantly reduced compared to the example with a uniformly distributed support structure, presented in Section 2.3.

Fig. 23
figure 23

Deformation of the 2D cantilever case with a sine shaped cantilever

5 3D example

This section considers the optimization of the support structure layout of a 3D cantilever beam problem, presented in Fig. 24. The design domain with a length L = 150 mm and a height h = 20 mm is discretized in n = 150 × 20 × 20 = 60000 cubic \( {\mathbb{Q}}_1 \) elements. A Young’s modulus ES = 110 GPa and Poisson’s ratio νS = 0.3, corresponding with the TiAl6V4 alloy, is used. For this case, the maximum vertical displacement is set to \( {u}_{\mathrm{max}}=0.03 \) mm which corresponds to a realistic layer thickness of an SLM printer. The set of constraints is limited to 50 vertical displacements per print stage resulting in 50 × 20 = 1000 displacement constraints. A cell size of 1 × 1 × 1 mm is chosen and the box constraints on the designs variables ρe are set to \( {\rho}_{\mathrm{min}}=0.094 \) and \( {\rho}_{\mathrm{min}}=1 \), corresponding to an axially-aligned rod diameter of \( {d}_{\mathrm{min}}=0.2 \) mm and \( {d}_{\mathrm{min}}=1.2 \) mm. In order to ensure smooth transitions of rod diameters between neighboring cells, a density filter with filter radius \( {R}_{\mathrm{min}}=3 \) mm is applied to the optimization.

Fig. 24
figure 24

3D cantilever beam problem: printed part (red) and support structure (blue)

Fig. 25
figure 25

Convergence plot of the 3D cantilever case. The x-axis represents the number of iterations needed; The y-axis represents the volume fraction of the support structure expressed using the filtered variables \( \overset{\sim }{\boldsymbol{\rho}} \)

The resulting support structure layout, presented in Fig. 26, satisfies all vertical displacement constraints. The convergence plot, presented in Fig. 25, shows that the optimizer converges to a volume fraction of 16.7% after 200 iterations. The computation time is 3h 58min 12sec. The optimized support layout shows a lot of similarities with the 2D cantilever example presented in Section 4. A stiff vertical feature is formed on the far right end of the cantilever. This is again to reduce the vertical displacement of the most critical point in the cantilever. Additionally, the diagonal structure reduces the upward displacement in a similar fashion as the 2D example Fig. 26.

Fig. 26
figure 26

Optimized support structure layout of the 3D cantilever beam

Next, a comparison is made with a uniform support structure where the density is determined by means of a bisection algorithm such that the displacement constraints are satisfied. This approach does not rely on topology optimization and can therefore be regarded representative for the current state of the art in practice. The resulting support structure layout is presented in Fig. 27. The volume of support structure needed in this approach is 64.3% of the total volume of material required to manufacture the component. In the design with an optimized support structure layout, the volume of support structure is reduced to 11.6% of the total volume needed. It can be concluded that topology optimization allows for considerable material savings as well as shorter production times.

Fig. 27
figure 27

3D cantilever beam with a uniformly distributed support structure designed by a bisection algorithm

6 Conclusion

This paper describes a topology optimization framework for automating the design of support structure in metal-based additive manufacturing considering thermal deformations. The SLM process used for metal-based additive manufacturing results in deformations of the part due to thermal stresses induced during the printing process. These deformations are restricted by adding support structure to the design. Manually adding this support structure proves to be time consuming and unreliable due to the complex thermal behaviour of the part. The inherent strain method is used to simulate the thermal behaviour by applying an experimentally determined initial strain to the part. This simulation strategy is then used in a topology optimization framework in order to determine an optimized layout for the support structure while taking into account a maximum vertical displacement constraint on each individual layer. Application to two 2D benchmark problems and a more realistic 3D example demonstrates that the achieved support structure layout successfully reduces the vertical deformation to satisfy the required maximum value. The 3D example demonstrates that the ratio of support structure volume to the total volume of material needed is significantly reduced compared to a simple uniformly distributed support structure.