1 Introduction

Recent advances in additive manufacturing (AM, also known as 3D printing) enable the fabrication of structures with unprecedented geometric complexity. The benefits of this manufacturing flexibility are probably best exploited in combination with the design of structures by topology optimization (TO). TO aims at finding the optimal distribution of material under a given set of constraints (Bendsøe and Sigmund 2004). The optimized structures are often very complex from a geometric perspective. Without applying additional constraints to reduce complexity, the optimized structures are difficult or impossible to produce by conventional manufacturing technologies. Such extra constraints nevertheless compromise the structural optimality. In the past years, impressive progress has been made on the integration of topology optimization for additive manufacturing. For an overview of research on this topic, we refer to a recent survey article by Liu et al. (2018a). In particular, the developments have been focusing on AM constraints and/or characteristics such as the overhang angle (e.g., Wu et al. 2016b; Gaynor and Guest 2016; Mirzendehdel and Suresh 2016; Qian2017; Langelaar 2017, 2018; van de Ven et al. 2018; Garaigordobil et al. 2018; Allaire et al. 2017a; Wang et al. 2019), infill structures (e.g., Wu et al. 2017, 2018; Groen et al. 2019; Fu et al. 2018; Liu et al. 2017; Clausen et al. 2016; Garner et al. 2019), thermal residual stresses (e.g., Allaire and Jakabčin 2018), and material anisotropy, i.e., due to the deposition path (e.g., Liu and To 2017; Liu et al. 2018b; Dapogny et al.2019).

In additive manufacturing, structures are fabricated progressively, i.e., by adding material in an incremental manner. The fabrication sequence is typically planned after the structure has been designed or optimized. In commonly used AM processes such as fused deposition modeling and selective laser sintering, given an optimized structure with a specific orientation, the structure is sliced into a set of planar layers. The planar layers are added to the structure one upon another, by extruding small flattened strings of molten material or by melting and fusing powder material. The AM platforms often have three degrees of freedom, allowing three dimensional translation of the printer head or the structure under construction. The introduction of rotational degrees of freedom into AM platforms has further increased the fabrication flexibility. For instance, using a robotic arm to continuously rotate the structure during construction, it allows to deposit material along curved layers (Dai et al. 2018). The increased flexibility in production further enlarges the design space with the planning of the fabrication sequence.

As mentioned, the optimization of structures and the planning of the fabrication sequence are typically performed separately. In topology optimization, it mostly concerns the mechanical performance of the final structure as a whole, and does not evaluate the mechanical properties of the unfinished structure during the fabrication process. Consider the fabrication of a large scale structure using wire and arc additive manufacturing (Williams et al. 2016). The mechanical properties of the structure at all intermediate stages shall also comply with certain criteria. In general, a number of aspects, including self-weight, material curing and solidification, thermal dissipation and distortion, are influenced by the fabrication sequence. These aspects in turn affect the (mechanical) performance of the structure at both the intermediate and final stages.

In this paper, we make the first step towards the concurrent optimization of structural layout and the corresponding fabrication sequence, which we shall call space-time topology optimization. The space-time topology optimization uses two sets of design variables. The first set represents the structural layout by a density field which is standard, as in traditional density-based approaches (Sigmund 2001). The second set encodes the fabrication sequence by a time field, with the ascending order indicating the incremental addition of structural material. We present a general formulation where the objective function could take into account the structural properties of both intermediate structures as well as the complete structure. To this end, a sequence of intermediate structures is defined by the density and the time field. We impose general constraints on intermediate structures, regarding fabrication continuity and process speed. This general formulation is demonstrated by integrating a few simplified yet meaningful aspects that are associated with the fabrication sequence, including self-weight of the intermediate structures, process-dependent loads, and time-dependent mechanical properties (e.g., in a curing process).

The present work is related to a few recent papers which dealt with prescribed fabrication sequence in topology optimization. Allaite et al. (2017a, 2017b) proposed a novel mechanical constraint functional, which mimics the layer by layer construction process featured by additive manufacturing technologies. This constraint aggregates the self-weights of all the intermediate structures. Amir and Mass (2018) proposed a formulation which integrates the loading and support conditions during construction. This formulation effectively reduces temporary supports or scaffolds for fabricating the optimized layouts. Bruggi et al. (2018) developed a formulation for optimizing support structures in problems involving a time-dependent construction process. Allaire and Jakabčin (2018) introduced a model for shape and topology optimization, taking into account the effects of the thermal stresses on intermediate structures during the additive construction process. In the approaches described above, the fabrication sequence is prescribed, and in particular, a sequence of planar layers. In contrast to these approaches, in the present work, the fabrication sequence is optimized together with the structure. The proposed method forms a perfect match with recent advances in additive manufacturing which enable flexible fabrication beyond consecutive planar layers.

We note that the term space-time topology optimization was used by Jensen (2009) in a different context, i.e., to optimize the point-wise, time-dependent material properties for transient problems. It was outlined for one-dimensional wave propagation in an elastic rod, taking time-dependent Young’s modulus as design variables. In this paper, the temporal domain is used to encode the fabrication sequence. The structural analysis in our examples concerns a series of static equilibria, evaluated at specific timepoints during the fabrication process.

The remainder of this paper is organized as follows. In Section 2, we present the formulation including the general objective function, and constraints on intermediate structures regarding fabrication continuity and speed. This general formulation is followed by an example to explain the consequences of the constraints (Section 3). We then demonstrate the space-time optimization concept on three scenarios, considering self-weight of the intermediate structures (Section 4), process-dependent loads (Section 5), and time-dependent material properties (Section 6). After a discussion on parameters and alternative formulations in Section 7, we present conclusions in Section 8.

2 Space-time topology optimization

The structural layout and the fabrication sequence are described by two fields. In addition to a density field (ρ) known from traditional topology optimization, a time field (t) is introduced to encode the order of material deposition. The objective function (J) is abstractly defined as a function of these two fields, by

$$ \quad J(\boldsymbol{\rho}, \boldsymbol{t}) = J_{complete}(\boldsymbol{\rho},\boldsymbol{t}) + J_{process}(\boldsymbol{\rho}, \boldsymbol{t}), $$
(1)

where the first term (Jcomplete) measures the structural property (e.g., compliance) of the entire structure, while the second term (Jprocess) measures properties of intermediate structures during the manufacturing process.

In this section, we first present the generation of intermediate structures from the density and the time field. We then present example constraints reflecting fabrication requirements, i.e., volume constraints and continuity constraints on intermediate structures.

2.1 Intermediate structures

Using a finite element discretization of the design space, each element is associated with a (pseudo) density value ρe ∈ [0,1] and a (pseudo) time value te ∈ [0,1]. The density value indicates whether the element is empty (ρe = 0) or solid (ρe = 1) in the final (complete) structure. The time value indicates the time at which the material associated with the element is added to the structure. Thus, a relatively larger time value indicates that this element is fabricated later. As in traditional density-based approaches, the density value eventually converges to either 0 or 1. However, it shall be noted that the time value shall be continuous.

In space-time topology optimization, structural properties may be evaluated not only for the final (complete) structure, but also for the incomplete structure, i.e., at intermediate stages of the manufacturing process. In the proposed space-time topology optimization, at a specific time T, the elements with a time value teT have been added to the structure. The intermediate structure at time T is thus determined by

$$ \rho^{[{T}]}_{e} = \left\{\begin{array}{llll} \rho_{e}, & \text{if } t_{e} \le {T}, \\ 0, & \text{otherwise.} \end{array}\right. $$
(2)

This is illustrated in Fig. 1. The discrete density field is illustrated in (a), and the continuous time field in (b), with a few iso-contours. Figure 1(c) and (d) depict the incomplete structure, i.e., intermediate stages of the fabrication process, at T = 0.2, and 0.4, respectively.

Fig. 1
figure 1

Illustration of a discrete density field (a), a continuous time field (b), and resulting intermediate structures at T = 0.2 (c) and T = 0.4 (d). In (c) and (d), for illustration purposes, in gray the full structure is shown. The outer contour of the design domain is indicated by the orange dashed lines

The intermediate structure at time T can be extracted by (2). To avoid the use of conditional equations which are not differentiable, we make use of a filtering technique to generate the intermediate structure from the density and the time field. This process is visualized in Fig. 2.

Fig. 2
figure 2

Illustration of the density field (bottom), the time field (top), and the corresponding filtering and projection operations for specifying an intermediate structure (right)

Two sets of design variables, ϕ for density and τ for time, are used in optimization. First, in order to avoid checkerboard patterns, convolution operators are applied to smooth both fields. This results in \(\tilde {\phi }\) and \(t = \tilde {\tau }\), with the tilde indicating smoothed continuous fields. It is worth noting that both fields need to be smoothed. A checkerboard pattern in one of the fields leads to a checkerboard pattern in intermediate structures, since intermediate structures are specified by the multiplication of the two fields, as will be introduced shortly. We use the convolution operator as in classical density-based approaches for smoothing. This yields

$$ \tilde{\phi}_{e}= \frac{{\sum}_{i \in \mathcal{S}_{e}} w(\mathbf{x}_{i},r_{d})v_{i} \phi_{i}}{{\sum}_{i \in \mathcal{S}_{e}} w(\mathbf{x}_{i},r_{d}) v_{i}}, $$
(3)

and

$$ t_{e} = \tilde{\tau}_{e} = \frac{{\sum}_{i \in \mathcal{S}_{e}} w(\mathbf{x}_{i},r_{t})v_{i} \tau_{i}}{{\sum}_{i \in \mathcal{S}_{e}} w(\mathbf{x}_{i},r_{t}) v_{i}}, $$
(4)

where vi is the area or volume of an element, and the weighting function is defined as

$$ w(\mathbf{x}_{i},r) = r - ||\mathbf{x}_{i} - \mathbf{x}_{e}||, $$
(5)

where r is the filter radius, xe and xi are the positions of the centroid of element e and its neighbor element \(i \in \mathcal {S}_{e} = \{i ~|~ w(\mathbf {x}_{i},r) > 0\}\), respectively. We also note that the filter radii, rt for time and rd for density, can take different values. Besides avoiding checkerboard patterns, rd also regulates the thickness of resulting structures.

Following the smoothing operator, a (smoothed) Heaviside projection is applied to obtain discrete values \(\rho = \bar {\tilde {\phi }}\) and \(\bar {t}\), with the bar indicating projected discrete fields. For the density field, the projection converts a density value smaller (or larger) than a given threshold to close to 0 (or 1), by

$$ \rho_{e} = \bar{\tilde{\phi}}_{e} = \frac{\tanh(\beta_{d} \eta)+\tanh(\beta_{d}(\tilde{\phi}_{e} - \eta))}{\tanh(\beta_{d} \eta)+\tanh(\beta_{d}(1 - \eta))}, $$
(6)

where βd is a positive number to control the sharpness of the step function, and η = 0.5 is the density threshold value. This projection has been discussed, for instance, by Wang et al. (2011).

For the time field, a projection is used to convert a time value smaller (or larger) than a given threshold, T in time, to close to 1 (or 0). This is achieved by

$$ \bar{t}^{[{T}]}_{e} = 1 - \frac{\tanh(\beta_{t} {T})+\tanh(\beta_{t}(t_{e} - {T}))}{\tanh(\beta_{t} {T})+\tanh(\beta_{t}(1 - {T}))}, $$
(7)

where βt, similar to βd, controls the projection sharpness, and T is the threshold time value.

The intermediate structure at time T is thus defined by

$$ \rho^{[{T}]}_{e} = \rho_{e} \bar{t}^{[{T}]}_{e}. $$
(8)

This function can be interpreted as a segmentation of the density field ρ by the iso-contour of t = T, as visualized in Fig. 1.

2.2 Volume constraints on intermediate structures

In additive manufacturing, the structure is fabricated incrementally. A parameter involved in this process is the fabrication speed, i.e., the amount of material which can be deposited per unit of time. To incorporate the fabrication speed in the space-time optimization, we divide the time range [0,1] by a finite number (N + 1) of uniformly distributed timepoints, denoted by

$$ {T}_{i}=\frac{i}{N},\quad i=0,...,N. $$
(9)

Consequently, there are N intervals (also called stages in the following), each with a duration of \(\frac {1}{N}\). The number of stages (N) is prescribed, and thus the specific time Ti when an intermediate structure is evaluated is determined. For simplicity, we assume a constant fabrication speed; the maximum volume of the complete structure (V0) is equally added during each of the uniform time intervals. In other words, the increment in volume during each time interval is bounded by \(\frac {V_{0}}{N}\), i.e.,

$$ {V^{[{T}_{i}]} - V^{[{T}_{i-1}]} \le \frac{V_{0}}{N}, \quad i=1,...,N,} $$
(10)

where \(V^{[{T}_{i}]}\) and \(V^{[{T}_{i-1}]}\) denote the total material volume processed up to timepoints Ti and Ti− 1, respectively. The initial volume, \(V^{[{T}_{0}]}\), is prescribed as 0. For compliance minimization as studied in this paper, since the optimization always uses the maximum amount of available material volume, this is equivalent to

$$ V^{[{T}_{i}]} \le \frac{i}{N} V_{0}, \quad i=1,...,N, $$
(11)

here \(V^{[{T}_{i}]}\) is given by

$$ V^{[{T}_{i}]} = \textstyle{\sum}_{e} \rho^{[{T}_{i}]}_{e} v_{e}, \quad i=1,...,N, $$
(12)

where ve is the area or volume of an element. Since in this paper a uniform finite element discretization is used, ve is constant for all elements (ve = v0).

2.3 Continuity constraints on intermediate structures

During the incremental additive fabrication process, it is for most manufacturing processes essential that the material is deposited on material which has been deposited previously. If the material is to be deposited in isolation, auxiliary structures are temporarily needed to hold such an isolated structural fragment in place. To avoid the processing costs associated with additional supports, we thus formulate a continuity constraint to prevent isolated material patches. An isolated material patch during the fabrication process can be associated with a local minimum in the time field; all its adjacent elements have a larger time value and thus will be fabricated later. Therefore, isolated material patches can be prevented by requiring

$$ g(t_{e}) = \min\limits_{i \in \mathcal{N}_{e}} (t_{i}) - t_{e} \le 0, \forall e\in \mathcal{M}, $$
(13)

where \(\mathcal {N}_{e}\) denotes the set of elements adjacent to element e. \({\mathscr{M}}\) is the set of active elements in the design domain, i.e., all elements except those which are prescribed as the starting point/region for the fabrication process (i.e., with te = 0).

2.3.1 Relaxation

The continuity constraint (13) is not differentiable, and it applies to a large number of elements. To facilitate numerical optimization, we present an aggregated formulation. This formulation involves two steps.

First, the non-differentiable function (13) is approximated by a continuous function. To this end, we make use of the fact that t ≤ 1 and, consequently, \(\min \limits _{i \in \mathcal {N}_{e}} (t_{i})\) can be rewritten as:

$$ \min\limits_{i \in \mathcal{N}_{e}} (t_{i}) = 1 - \max\limits_{i \in \mathcal{N}_{e}} (1 - t_{i}), $$
(14)

where \(\max \limits _{i \in \mathcal {N}_{e}} (1 - t_{i})\) can be approximated with a p-norm (Wu et al. 2018):

$$ \max\limits_{i \in \mathcal{N}_{e}} (1 - t_{i}) \approx (\sum\limits_{i \in \mathcal{N}_{e}}(1-t_{i})^{p})^{\frac{1}{p}}. $$
(15)

As a result, g(te) is approximated by

$$ g(t_{e}) \approx 1 - (\sum\limits_{i \in \mathcal{N}_{e}}(1-t_{i})^{p})^{\frac{1}{p}} - t_{e}. $$
(16)

Second, the per-element constraints (13) are aggregated. A straightforward way to aggregate (16) is by making use of the \(\max \limits \) function,

$$ \max\limits_{e\in \mathcal{M}} (g(t_{e})) \le 0, $$
(17)

which can be approximated with a p-norm. However, applying a p-norm on top of another p-norm (i.e (15)), both with p as large as 50, leads to a highly non-linear response function. Our initial numerical tests showed that the optimization convergence using this function is far from ideal.

Therefore, we rather aggregate (16) by computing the average of a function defined on g(te)

$$ {\mathcal{H}(\boldsymbol{t})=}\frac{1}{\#(\mathcal{M})} \sum\limits_{e\in \mathcal{M}} {H}(g(t_{e})) < \epsilon, $$
(18)

where # denotes the number of elements in a set, 𝜖 is a small constant, and the function H is defined by

$$ {H}(x)=\left\{ \begin{array}{llll} 1, & & x > 0, \\ 0, & & x \le 0 . \end{array} \right. $$
(19)

The left-hand side in (18) becomes \(\frac {1}{\#({\mathscr{M}})}\) if there exists a local minimum in the set of active elements (\({\mathscr{M}}\)), i.e x = g(te) > 0. Therefore, by assigning 𝜖 a value that is smaller than \(\frac {1}{\#({\mathscr{M}})}\) (𝜖 = 10− 9 in this work), (18) would effectively avoid local minima.

The step function H is approximated by

$$ {H}(x) \approx \frac{1}{2} \left( \tanh{(\beta_{m} x)} + 1\right), $$
(20)

where βm controls the sharpness of projection.

We note that a Heaviside projection-based aggregation has recently been used to control overhang angle (Qian 2017; Wang et al. 2019) and local stresses (Wang and Qian 2018). A detailed comparison between the Heaviside projection-based aggregation and the p-norm is provided in Wang and Qian (2018).

2.4 Sensitivity analysis

This subsection presents derivatives of the constraints which we proposed in the previous two subsections.

2.4.1 Sensitivity analysis of volume constraints

For the volume constraint defined in (11), its derivative regarding ϕe at time Ti is given as:

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial V^{[{T}_{i}]}} {\partial \phi_{e}} &=&~~ {\sum}_{k \in \mathcal{S}_{e}} \frac{\partial V^{[{T}_{i}]}}{\partial \rho_{k}^{[{T}_{i}]}} \frac{\partial \rho_{k}^{[{T}_{i}]}} {\partial \rho_{k}} \frac {\partial \rho_{k}} {\partial \tilde{\phi}_{k}} \frac {\partial \tilde{\phi}_{k}} {\partial \phi_{e}},\\ &=&~~{\sum}_{k \in \mathcal{S}_{e}} v_{k} \bar{t}_{k}^{[{T}_{i}]} \frac {\partial \rho_{k}} {\partial \tilde{\phi}_{k}} \frac {\partial \tilde{\phi}_{k}} {\partial \phi_{e}} , \end{array} \end{array} $$
(21)

where \(\frac {\partial \rho _{k}} {\partial \tilde {\phi }_{k}}\) follows as

$$ \frac {\partial \rho_{k}} {\partial \tilde{\phi}_{k}} = \beta_{d} \frac{1 - \tanh^{2}(\beta_{d} (\eta - \tilde{\phi}_{k}))}{\tanh(\beta_{d} \eta)) + \tanh(\beta_{d} (1 - \eta))}, $$
(22)

and \(\frac {\partial \tilde {\phi }_{k}} {\partial \phi _{e}}\) is calculated based on the definition of \(\tilde {\phi }_{e}\) in (3).

Similarly, the derivative of constraint (11) regarding τe at time Ti is given as:

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial V^{[{T}_{i}]}} {\partial \tau_{e}} &=&~~ {\sum}_{k \in \mathcal{S}_{e}}\frac{\partial V^{[{T}_{i}]}}{\partial \rho_{k}^{[{T}_{i}]}} \frac{\partial \rho_{k}^{[{T}_{i}]}} {\partial \bar{t}_{k}^{[{T}_{i}]}} \frac{\partial \bar{t}_{k}^{[{T}_{i}]}} {\partial t_{k}} \frac {\partial t_{k}} {\partial \tau_{e}},\\ &=&~~ {\sum}_{k \in \mathcal{S}_{e}} v_{k} \rho_{k} \frac{\partial \bar{t}_{k}^{[{T}_{i}]}} {\partial t_{k}} \frac {\partial t_{k}} {\partial \tau_{e}}, \end{array} \end{array} $$
(23)

where

$$ \frac{\partial \bar{t}_{k}^{[{T}_{i}]}}{t_{k}} = \beta_{t} \frac{ \tanh^{2}(\beta_{t} ({T}_{i} - t_{k})) - 1}{\tanh(\beta_{t} {T}_{i})) + \tanh(\beta_{t} (1 - {T}_{i}))}, $$
(24)

and \(\frac {\partial t_{k}} {\partial \tau _{e}}\) is calculated with the definition of te in (4).

2.4.2 Sensitivity analysis of continuity constraints

To simplify the derivation, the constant \(\frac {1}{\#({\mathscr{M}})}\) in (18) is temporally dropped out. Thus, the derivative of (18) regarding the time variable τe is

$$ \begin{array}{llll} \frac {\partial {\sum}_{e\in \mathcal{M}} H(g(t_{e}))} {\partial \tau_{e}} = {\sum}_{i \in \mathcal{S}_{e}}\frac { \partial H(g(t_{i}))}{\partial \tau_{e}}, \end{array} $$
(25)

where

$$ \begin{array}{llll} \frac {\partial H(g(t_{i}))}{\partial \tau_{e}} =&~~ \frac {\partial H(g(t_{i}))}{\partial g(t_{i})} (\frac {\partial g(t_{i})}{\partial t_{i}} \frac {\partial t_{i}}{\partial \tau_{e}} + {\sum}_{k \in \mathcal{N}_{i}} \frac {\partial g(t_{i})}{\partial t_{k}} \frac {\partial t_{k}}{\partial \tau_{e}}), \end{array} $$
(26)

with

$$ \begin{array}{llll} \frac {\partial Hg(t_{i})}{\partial g(t_{i})} = \beta_{m} \frac{1 - \tanh^{2}(\beta_{m} g(t_{i}))}{2} , \end{array} $$
(27)

and

$$ \frac {\partial g(t_{i})}{\partial t_{k}} = \left\{ \begin{array}{llll} -1, & & i = k, \\ ({\sum}_{u \in \mathcal{N}_{i}} (1 - t_{u})^{p})^{\frac{1}{p}-1}(1 - t_{k})^{p-1}, & & k \in \mathcal{N}_{i},\\ 0, & & otherwise . \end{array} \right. $$
(28)

3 Demonstration of manufacturing constraints

In this section, a simplified space-time optimization problem is used to demonstrate the consequences of the fabrication constraints. The test problem is compliance minimization under the assumption of linear elasticity. The design domain and boundary conditions are illustrated in Fig. 3. In contrast to a single constraint on the total material volume as in traditional compliance minimization, here a series of volume constraints is imposed. Each of them corresponds to the maximum material volume processed up to a specific time, as discussed in Section 2.2. Furthermore, the manufacturing continuity constraint as discussed in Section 2.3 is included. Let N denote the number of prescribed time intervals, the problem is described by

$$ \begin{array}{@{}rcl@{}} & \underset{{\boldsymbol{\phi}, \boldsymbol{\tau}}}{\min} & c=\boldsymbol{U}^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} \end{array} $$
(29)
$$ \begin{array}{@{}rcl@{}} & s.t. & \boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} = \boldsymbol{F}, \end{array} $$
(30)
$$ \begin{array}{@{}rcl@{}} & & \sum\limits_{e} \rho_{e} v_{e} \leq V_{0}, \end{array} $$
(31)
$$ \begin{array}{@{}rcl@{}} & & 0 \le \phi_{e} \le 1, \end{array} $$
(32)
$$ \begin{array}{@{}rcl@{}} & & 0 \le \tau_{e} \le 1, \end{array} $$
(33)
$$ \begin{array}{@{}rcl@{}} & & V^{[{T}_{i}]}= \textstyle{\sum}_{e} \rho^{[{T}_{i}]}_{e} v_{e} \le \frac{i}{N} V_{0}, i=1,2,...,N , \end{array} $$
(34)
$$ \begin{array}{@{}rcl@{}} & & \frac{1}{\#(\mathcal{M})} \sum\limits_{e\in \mathcal{M}} H(g(t_{e})) < \epsilon, \end{array} $$
(35)

where T denotes the transpose operator, U is the displacement vector, K the stiffness matrix, and F the force vector. The stiffness matrix K is assembled from element stiffness matrices defined by ke = Ee(ρe)k0, where k0 is the stiffness matrix of a solid element with unit Young’s modulus and Ee(ρe) is the Young’s modulus corresponding to element e, interpolated via the modified solid isotropic material with penalization (SIMP), given by

$$ E_{e}(\rho_{e}) = E_{min} + {\rho_{e}^{q}}(E_{0}-E_{min}), $$
(36)

where E0 is the Young’s modulus of a solid element, Emin a small term assigned to prevent the global stiffness matrix from becoming singular, and q a penalization factor (typically q = 3). In this test formulation, the objective is to reduce the compliance of the entire structure. Structural properties (e.g., compliance) of intermediate structures are not included here, and will be discussed in following sections where process-dependent loads and material properties are introduced.

Fig. 3
figure 3

The design domain and boundary conditions. The design domain is discretized into 120×40 square bilinear finite elements

The optimization problem is solved using the method of moving asymptotes (Svanberg 1987). The derivative of (29) and (31) regarding to the design variables τe and ϕe is standard. The derivatives of (34) and (35) have been given in Section 2.4.

Figure 4 compares optimized density and time fields for three configurations where the prescribed start of manufacturing (indicated by blue quads) is different. The first row shows the initial time fields. They are initialized by computing the distance of each element to the start region. The distance field is then normalized by the maximum distance value among all elements. While the time field is initialized by a monotonic field, the density field is initialized uniformly, using the target volume fraction. The second row shows the optimized continuous time fields, where the curves indicate the boundary of different manufacturing stages (a total of 8 in this example). The time fields are used to color the optimized structures, shown in the last row. Although the optimized structures are different, their compliance values are very close. In fact, the time field plays no role in the objective function. It affects only the segmentation of the structures into stages. Figure 5 shows a sequence of intermediate stages, illustrating stages of the additive manufacturing process. This demonstration verifies that the optimized fields satisfy continuity and volume constraints.

Fig. 4
figure 4

Time fields and structures generated with different manufacturing startpoints (blue regions). From top to bottom: the initial time fields (constructed from distance fields corresponding to the startpoints), optimized time fields, and optimized structures. The black curves indicate the boundaries between adjacent parts which have been manufactured during different manufacturing stages. The number of stages, 8 in this test, is not a design variable but is prescribed. Consequently, Ti, the values which are used to segment the time field are determined. The colorbar on the right indicates the time values. (This colorbar is used consistently in this paper for other figures as well)

Fig. 5
figure 5

A sequence of intermediate structures corresponding to the optimized structure in Fig. 4 (left)

Figure 6 compares the optimization using two different initial time fields, the top row with a uniform time field (a) and the bottom row with a monotonic time field initialized by a normalized distance field corresponding to the start of the fabrication process (d). The optimized time field in (e) is monotonic from left to right, while the optimized time field in (b) exhibits some variations. Two local maxima in the top and bottom middle of the time field in (b) can be observed. Local maxima do not violate the continuity constraint, but lead to a more complex manufacturing sequence. A monotonic initial time field is used in this paper, if not explicitly stated otherwise.

Fig. 6
figure 6

Optimization with different initial time fields. The initial time field in (a) is uniform, while the initial time field in (d) is the normalized distance field corresponding to the correct start (blue quad). The corresponding optimized time fields and structures are shown in the same row. The optimized time field (b) has several local maxima. In contrast, using a monotonic field as the initial time field, no extra local maxima are found in (e), even with a smaller number of iterations

Figure 7 shows optimized results with 10, 20, and 30 time intervals (i.e., manufacturing stages). The fabrication starts from the top left in the design domain. The initial time field has been shown in the last column of Fig. 4. The fabrication granularity increases as the number of time intervals is increased, allowing a finer planning of the fabrication process. It is also verified that the optimized fields satisfy the continuity and volume constraints on intermediate structures.

Fig. 7
figure 7

Optimized time fields and structures with different numbers of manufacturing stages: 10, 20, and 30 from left to right, respectively. The startpoint is the top left element and the initial time field is shown in Fig. 4 (top right subfigure). The compliances are listed at the bottom

4 Self-weight of intermediate structures

In additive manufacturing, the deformation of intermediate structures due to gravity may become significant, e.g., fabrication using flexible materials such as TPU (thermoplastic polyurethane). To prevent such deformation, self-weight of intermediate structures has been considered to design self-supporting structures and supporting scaffolds (Allaire et al. 2017a, 2017b; Bruggi et al. 2018; Amir and Mass 2018). In our formulation, we concurrently optimize the structural layout and its fabrication sequence to minimize the compliance due to self-weight of intermediate structures. The problem is described by

$$ \begin{array}{@{}rcl@{}} & \underset{{\boldsymbol{\phi}, \boldsymbol{\tau}}}{\min\limits} & c=\boldsymbol{U}^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} + \sum\limits_{i=1}^{N}{\alpha_{i} (\boldsymbol{U}^{[{T}_{i}]}})^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho}^{[{T}_{i}]}){\boldsymbol{U}^{[{T}_{i}]}} \end{array} $$
(37)
$$ \begin{array}{@{}rcl@{}} & s.t. & \boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} = \boldsymbol{F}, \end{array} $$
(38)
$$ \begin{array}{@{}rcl@{}} & & \boldsymbol{K}(\boldsymbol{\rho}^{[{T}_{i}]})\boldsymbol{U}^{[{T}_{i}]} = \boldsymbol{G}(\boldsymbol{\rho}^{[{T}_{i}]}), i=1,2,...,N, \end{array} $$
(39)
$$ \begin{array}{@{}rcl@{}} & & Eqs.~31-35, \end{array} $$
(40)

where \(\boldsymbol {K}(\boldsymbol {\rho }^{[{T}_{i}]})\), \(\boldsymbol {U}^{[{T}_{i}]}\), and \(\boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})\) are the stiffness matrix, displacement vector, and gravity load of the intermediate structure at time Ti. The parameter αi is introduced as a weighting factor. Finite element analysis is performed for each intermediate structure and the final structure.

4.1 Sensitivity analysis

The sensitivity of the objective function regarding the density design variable is given as follows:

$$ \begin{array}{llll} \frac{\partial c}{\partial \phi_{e}} =& - {\sum}_{j \in \mathcal{S}_{e}} U_{j}^{\mathsf{T}}\frac{\partial \mathbf{k}_{j}(\boldsymbol{\rho})}{\partial \phi_{e}}U_{j} + {\sum}_{i=1}^{N} \alpha_{i}(2 \frac{\partial G^{\mathsf{T}}(\boldsymbol{\rho}^{[{T}_{i}]})}{\partial \phi_{e}}U^{[{T}_{i}]}\\ &- {\sum}_{j\in \mathcal{S}_{e}} (U_{j}^{[{T}_{i}]})^{\mathsf{T}}\frac{\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})}{\partial \phi_{e}}U_{j}^{[{T}_{i}]}), \end{array} $$
(41)

where kj(ρ) and Uj are the element stiffness matrix and displacement vector of finite element j for the complete structure, \(\mathbf {k}_{j}(\boldsymbol {\rho }^{[{T}_{i}]})\) and \(U_{j}^{[{T}_{i}]}\) are the element stiffness matrix and displacement vector of finite element j at the ith manufacturing stage, i.e., considering the structure deposited until time Ti. According to the definition of kj(ρ) in Section 3 and by using the chain rule, \(\frac {\partial \mathbf {k}_{j}(\boldsymbol {\rho })} {\partial \phi _{e}}\) is defined as:

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho})} {\partial \phi_{e}}& =& \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho})} {\partial \rho_{j}} \frac {\partial \rho_{j}} {\partial \tilde{\phi}_{j}}\frac {\partial \tilde{\phi}_{j}} {\partial \phi_{e}}\\ &=& q\rho_{j}^{q-1}(E_{0}-E_{min})\mathbf{k}_{0} \frac {\partial \rho_{j}} {\partial \tilde{\phi}_{j}}\frac {\partial \tilde{\phi}_{j}} {\partial \phi_{e}}. \end{array} \end{array} $$
(42)

At time Ti, \(\frac {\partial \mathbf {k}_{j}(\boldsymbol {\rho }^{[{T}_{i}]})} {\partial \phi _{e}}\) is given according to the definition of \(\rho ^{[{T}_{i}]}\) in (8), thus

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})} {\partial \phi_{e}} &= & \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})} {\partial \rho_{j}^{[{T}_{i}]}} \frac {\partial \rho_{j}^{[{T}_{i}]}} {\partial \rho_{j}}\frac {\partial \rho_{j}} {\partial \tilde{\phi}_{j}}\frac {\partial \tilde{\phi}_{j}} {\partial \phi_{e}}\\ &=& q(\rho_{j}^{[{T}_{i}]})^{q-1}(E_{0}-E_{min})\mathbf{k}_{0} \bar{t}_{j}^{[{T}_{i}]}\frac {\partial \rho_{j}} {\partial \tilde{\phi}_{j}}\frac {\partial \tilde{\phi}_{j}} {\partial \phi_{e}}, \end{array} \end{array} $$
(43)

where the calculation of \(\frac {\partial \rho _{e}} {\partial \tilde {\phi }_{e}}\) and \(\frac {\partial \tilde {\phi }_{e}} {\partial \phi _{e}}\) are described in Section 2.4, (22).

For the time field, the sensitivity of the objective function c with respect to design variable τe is given by:

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac{\partial c}{\partial \tau_{e}} &= &{\sum}_{i=1}^{N} \alpha_{i}(2 \frac{\partial \boldsymbol{G}^{\mathsf{T}}(\boldsymbol{\rho}^{[{T}_{i}]})}{\partial \tau_{e}}U^{[{T}_{i}]} \\ &-&{\sum}_{j \in \mathcal{S}_{e}} (U_{j}^{[{T}_{i}]})^{\mathsf{T}}\frac{\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})}{\partial \tau_{e}}U_{j}^{[{T}_{i}]}). \end{array} \end{array} $$
(44)

At time Ti, \(\frac {\partial \mathbf {k}_{j}(\boldsymbol {\rho }^{[{T}_{i}]})} {\partial \tau _{e}}\) is given by:

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})} {\partial \tau_{e}} &= & \frac {\partial \mathbf{k}_{j}(\boldsymbol{\rho}^{[{T}_{i}]})} {\partial \rho_{j}^{[{T}_{i}]}} \frac {\partial \rho_{j}^{[{T}_{i}]}} {\partial \bar{t}_{j}^{[{T}_{i}]}}\frac {\partial \bar{t}_{j}^{[{T}_{i}]}} {\partial t_{j}}\frac {\partial t_{j}} {\partial \tau_{e}}\\ &=& q(\rho_{j}^{[{T}_{i}]})^{q-1}(E_{0}-E_{min})\mathbf{k}_{0} \rho_{j}\frac {\partial \bar{t}_{j}^{[{T}_{i}]}} {\partial t_{j}}\frac {\partial t_{j}} {\partial \tau_{e}}, \end{array} \end{array} $$
(45)

where the calculation of \(\frac {\partial \bar {t}_{e}^{[{T}_{i}]}} {\partial t_{e}}\) and \(\frac {\partial t_{e}} {\partial \tau _{e}}\) are described in Section 2.4, (24).

To calculate \(\frac {\partial \boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})} {\partial \phi _{e}}\) and \(\frac {\partial \boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})} {\partial \tau _{e}}\), we should first define \(\boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})\) which is directly related to \(\boldsymbol {\rho }^{[{T}_{i}]}\). Let L denote the connectivity matrix between finite elements and their nodes. L is a sparse matrix with dimension of 2nv × ne, where nv and ne are the number of nodes and finite elements, respectively. The non-zero entries of L are

$$ L(2v, e) = -{g_{v}^{e}}, v \in \mathcal{V}_{e}, $$
(46)

where v is a node in the finite element grid, \(\mathcal {V}_{e}\) is the set of the (four) nodes of element e, \({g_{v}^{e}}\) is the magnitude of gravity for node v assigned by element e and it is one quarter of the gravity of e. The index 2v indicates the y-component of gravity of node v. Since we assume the direction of gravity is downwards, the x-component of gravity is zero, i.e., L(2v − 1, e) = 0.

The gravity of the intermediate structure at time Ti is given by

$$ \mathbf{G}(\boldsymbol{\rho}^{[{T}_{i}]}) = L\boldsymbol{\rho}^{[{T}_{i}]}. $$
(47)

Since \(\boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})\) is a 2nv × 1 matrix, the derivatives of the jth entry of \(\boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})\), denoted by \(\boldsymbol {G}(\boldsymbol {\rho }^{[{T}_{i}]})_{j}\), with respect to ϕe and τe are given by

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial \boldsymbol{G}(\boldsymbol{\rho}^{[{T}_{i}]})_{j}} {\partial \phi_{e}}& =& {\sum}_{k \in \mathcal{S}_{e}} \frac {\partial \boldsymbol{G}(\boldsymbol{\rho}^{[{T}_{i}]})_{j}} {\partial \rho_{k}^{[{T}_{i}]}} \frac {\partial \rho_{k}^{[{T}_{i}]}} {\partial \rho_{k}}\frac {\partial \rho_{k}} {\partial \tilde{\phi}_{k}}\frac {\partial \tilde{\phi}_{k}} {\partial \phi_{e}}\\ &=& {\sum}_{k \in \mathcal{S}_{e}} L(j, k)\bar{t}_{k}^{[{T}_{i}]}\frac {\partial \rho_{k}} {\partial \tilde{\phi}_{k}}\frac {\partial \tilde{\phi}_{k}} {\partial \phi_{e}}, \end{array} \end{array} $$
(48)

and

$$ \begin{array}{@{}rcl@{}} \begin{array}{llll} \frac {\partial \boldsymbol{G}(\boldsymbol{\rho}^{[{T}_{i}]})_{j}} {\partial \tau_{e}} &=& {\sum}_{k \in \mathcal{S}_{e}}\frac {\partial \boldsymbol{G}(\boldsymbol{\rho}^{[{T}_{i}]})_{j}} {\partial \rho_{k}^{[{T}_{i}]}} \frac {\partial \rho_{k}^{[{T}_{i}]}} {\partial \bar{t}_{k}^{[{T}_{i}]}}\frac {\partial \bar{t}_{k}^{[{T}_{i}]}} {\partial t_{k}}\frac {\partial t_{k}} {\partial \tau_{e}}\\ &=& {\sum}_{k \in \mathcal{S}_{e}}L(j, k)\rho_{k}\frac {\partial \bar{t}_{k}^{[{T}_{i}]}} {\partial t_{k}}\frac {\partial t_{k}} {\partial \tau_{e}}, \end{array} \end{array} $$
(49)

where L(j, k) is the entry of L in the jth row and kth column.

Table 1 Compliances of intermediate and final structures for different weighting factors αi

4.2 Numerical results

To demonstrate the space-time optimization considering self-weight of intermediate structures, we setup an experiment with the same design domain and boundary conditions as shown in Fig. 3. The gravity of intermediate structures is included. The gravity of a solid element is assigned a value such that the gravity of the final structure is 1. Note that the magnitude of the external force load (F) is also 1. Fabrication starts from the left boundary of the design domain. The number of manufacturing stages is N = 8.

In Fig. 8, we present the structures and time fields optimized with four different weighting factors, i.e., αi = 0.001, 0.1, 0.4, and 0.6. From the optimized structures (second row) it can be observed that as the influence of self-weight increases, the solutions are characterized by an increased number of solid elements in the vicinity of the fixing location (left edge). To better visualize the distribution of solid elements, we vertically divide the design domain into 12 equal subdomains, and calculate the number of the solid elements within each subdomain. The histogram shown in the last row clearly confirms that more solid elements accumulate to the left.

Fig. 8
figure 8

Time fields (first row) and structures (second row) generated by choosing four different parameters αi: 0.001, 0.1, 0.4, and 0.6. The startpoints for these results is the left boundary which is marked with blue quads. The last row shows the distribution of the solid finite elements in each subdomain which is generated by horizontally dividing the original design domain into 12 equal subdomains from left to right. The black arrow on the left indicates the direction of gravity

The compliance values from these tests are summarized in Table 1. The second row corresponds to αi = 0, i.e., the objective is independent of the gravity load. The compliance of intermediate structures due to gravity is reported for each stage. As the weighting factor αi increases, take stage 4 for example, the compliance due to gravity decreases from 3.17 to 1.09. The compliance of the final structure due to the external load is reported in the second last column. As αi increases, this compliance value also increases. This increase is mild; with αi = 0.6, the compliance is increased by 4.10% (last column), from 157.17 to 163.62. This is accompanied by a significant drop in compliance due to gravity, e.g., the compliance of stage 8 decreases from 28.39 to 16.75.

Further increasing the relative weighting factor leads to convergence issues which are typical for design-dependent loads (Bruyneel and Duysinx 2005). In the limit of an infinite weighting factor, the objective is only measured for compliance due to gravity. In this case, the least compliance is obtained by not depositing any material. We observed that in a related article (Amir and Mass 2018) small weighting factors are used. In our tests the same weighting factor applies to all intermediate stages. To design self-supporting structures, Allaire et al. (2017a) proposed the use of different weights to different intermediate structures to avoid the accumulation of material in the first (planar) layers.

5 Process-dependent critical loads

When manufacturing a structure with a robot platform moving along the structure (see Fig. 9), the weight of the robot platform can be substantial. The location of the robot platform, and thus the load, is coupled with the construction process. This is sketched in Fig. 10 (left). The robot starts from the top left corner (p0), and consecutively moves a fixed step rightwards. At each location, it can put material within the range it can reach, depicted by a circular sector for the initial location. It is assumed that the amount of material deposited by the robot from each location is the same, i.e., the fabrication speed is constant. Since each point in the design space can be reached by the robot from a few locations, its fabrication time is bounded by a lower and upper bound.

Fig. 9
figure 9

A bridge to be fabricated by a robotic platform. The bridge under construction shall support the movable robotic platform at all intermediate stages. Image courtesy of MX3D (www.mx3d.com)

Fig. 10
figure 10

Left: A robot printer platform moves along the structure from left to right on the top (left). Middle: The lower and upper bounds of the manufacturing time. Right: The optimized time field, and the optimized density field colored with the time field. The number of manufacturing stages is 8 and αi = 0.5. The compliance of the final structure is listed at the bottom

The bounds, visualized in Fig. 10 (middle), are computed based on the operation radius of the robotic arm (r). The time interval assigned to pi is [Ti, Ti+ 1], 0 ≤ iN − 1. Let Se = {Ti, Ti+ 1|||xepi||≤ r, i = 0,1,..., N − 1}, where xe is the centroid of a finite element. The lower and upper bounds are defined by \(l_{e} = \min \limits (S_{e})\) and \(u_{e} = \max \limits (S_{e})\), respectively. An example is illustrated with a green quad in Fig. 10 (left). The element xe is reachable by the robot arm from p5 to p7. Therefore the lower bound is the starting time at manufacturing location p5 which is T5, and its upper bound is the ending time at manufacturing location p7 which is T8.

When the robot is located at pi, the intermediate structure it fabricates shall be able to support the robot at its next location, pi+ 1. Thus the compliance due to the weight of the robot at pi+ 1 is included in the objective function. Located at the last fabrication location p7, the robot will finish the complete structure. For the complete structure, the compliance is measured for an external force (F) applied at the bottom right. This is formulated as

$$ \begin{array}{@{}rcl@{}} & \underset{{\boldsymbol{\phi}, \boldsymbol{\tau}}}{\min} & c=\boldsymbol{U}^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} + \sum\limits_{i=1}^{N}{\alpha_{i} (\boldsymbol{U}^{[{T}_{i}]}})^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho}^{[{T}_{i}]}){\boldsymbol{U}^{[{T}_{i}]}} \end{array} $$
(50)
$$ \begin{array}{@{}rcl@{}} & s.t. & \boldsymbol{K}(\boldsymbol{\rho})\boldsymbol{U} = \boldsymbol{F} , \end{array} $$
(51)
$$ \begin{array}{@{}rcl@{}} & & \boldsymbol{K}(\boldsymbol{\rho}^{[{T}_{i}]})\boldsymbol{U}^{[{T}_{i}]} =W^{p_{i+1}}_{r}, i = 0,...,N-1, \end{array} $$
(52)
$$ \begin{array}{@{}rcl@{}} & & l_{e} \leq \tau_{e} \leq u_{e} , \end{array} $$
(53)
$$ \begin{array}{@{}rcl@{}} & & Eq.~31, Eq.~32, Eq.~34, Eq.~35. \end{array} $$
(54)

This formulation is largely similar to the formulation considering the self-weight presented in the previous section. The first difference lies in (52), as the robotic weight \(W_{r}^{p_{i+1}}\) is independent of the design variables. The superscript pi+ 1 indicates the location of the weight. The second difference is the lower and upper bounds (53). Since the load does not depend on the density, the sensitivity analysis is a simplified version from the previous section, and is omitted here.

The optimized time field and structure are shown in Fig. 10 (right) where the compliance of the final structure due to the external load is also reported. Figure 11 shows optimized results for two different robotic motions, i.e., the robot moves up and down, and two robots located at top and bottom move rightwards at the same pace. The intermediate manufacturing stages for the manufacturing situation at the top and bottom of Fig. 11 are shown in Figs. 12 and 13, respectively.

Fig. 11
figure 11

Optimization with different robot movement patterns. Top: A robot alternatively moves up and down. Bottom: Two robots, on top and bottom, move rightwards at the same pace

Fig. 12
figure 12

The intermediate stages for the manufacturing with an alternating (top/bottom) robot location, see Fig. 11 (top)

Fig. 13
figure 13

The intermediate stages for the manufacturing with two robots simultaneously, see Fig. 11 (bottom)

In the objective function, αi is used to balance between the compliance of the entire structure due to the external load (F = 1) and the compliances of the intermediate structures due to the robotic weight Wr = 0.5. In the above examples, αi is 0.5. A set of 8 different αi values is used to demonstrate its influence on the optimization results. The compliances are summarized in Table 2. As αi increases, i.e., the weight of the robot plays a more significant role in the objective function, the compliance values of intermediate structures associated with the robot weight naturally decrease. For instance, at Stage 7, the compliance drops from 109.00 (αi = 0.001) to 41.59 (αi = 0.01), and 28.85 (αi = 0.5). It is observed that beyond αi = 0.5 the change in compliance is relatively small. When αi increases from 0.001 to 0.5, in contrast to the rapid change in the compliance of intermediate structures due to the robot, the compliance of the entire structures due to the external load changes mildly, as can be seen from the compliance listed in the second last column, and the relative change in the last column.

Table 2 Compliances of structures optimized with different αi values, corresponding to the test with robot locations on the top, see Fig. 10

The above examples are generated with 8 manufacturing stages. To demonstrate the scalability of our framework for a larger number of manufacturing stages, it is tested with 10, 12, and 16 manufacturing stages, as shown in Fig. 14. The robot motion is depicted in Fig. 10 (left) and αi = 0.5. The compliances of the final structures are listed at the bottom. It is observed that the compliance of the final structure increases along with an increasing in the number of manufacturing stages. This is due to the fact that an increasingly larger number of process-dependent loads are included in the objective, and thus effectively reduce the significance of the external load.

Fig. 14
figure 14

Time fields and structures generated with different numbers of manufacturing stages: 10 (left), 12 (middle), and 16 (right) respectively. The robot locations are indicated in the figure on the top edge and αi = 0.5. The compliances of the final structures are shown at the bottom

In Fig. 15, we show convergence plots of the compliances for the entire structure and intermediate structures. This plot corresponds to the optimization with two simutaneous robots as shown at the bottom of Fig. 11. All the compliance values reduce rapidly in the first 100 iterations. The changes in the compliances become small after about 200 iterations. The bumps in these curves are caused by the increasing of the projection parameter βd in (6) for the density field. This figure demonstrates that the optimization process converges well.

Fig. 15
figure 15

The convergence plots of compliances of the entire structure and all intermediate structures. In the legend, ‘FinalStr’ refers to the final structure while ‘InterStr’ refers to an intermediate structure

6 Time-dependent material properties

Until this section, we have assumed that the Young’s modulus of a finite element depends solely on the density (36). If the fabrication process is taken into account, the material properties may also be influenced by the time at which the material is deposited. For instance, material curing or solidification (and thus the stiffness) may be time-dependent. Figure 16 illustrates a monotonic function of Young’s modulus regarding time. Assume the fabrication of the entire structure is finished at timepoint T = 1. At this timepoint, the Young’s modulus of an element that has been filled with material at te ∈ [0,1] is calculated by

$$ E({\rho_{e},t_{e}}) = E_{min} + {f(1-t_{e})}{\rho_{e}}^{q}(E_{0} - E_{min}). $$
(55)
Fig. 16
figure 16

Schematic of Young’s modulus over time during material curing or solidification

With the time-dependent material properties, the compliance minimization problem is updated,

$$ \begin{array}{@{}rcl@{}} & \underset{{\boldsymbol{\phi}, \boldsymbol{\tau}}}{\min} & c=\boldsymbol{U}^{\mathsf{T}}\boldsymbol{K}(\boldsymbol{\rho}, \boldsymbol{t})\boldsymbol{U} \end{array} $$
(56)
$$ \begin{array}{@{}rcl@{}} & s.t. & \boldsymbol{K}(\boldsymbol{\rho}, \boldsymbol{t})\boldsymbol{U} = \boldsymbol{F}, \end{array} $$
(57)
$$ \begin{array}{@{}rcl@{}} & & Eqs.~31-35 , \end{array} $$
(58)

where the stiffness matrix K(ρ, t) is constructed with the Young’s modulus interpolated using both the density and the time field (see (55)).

We test this formulation on four scenarios, including two monotonically increasing functions, and two quadratic functions which open downwards. These functions serve the purpose of demonstrating the influence of time-dependent material properties on structural design and performance. In Fig. 17 each row shows optimized results corresponding to a different time interpolation function (left). Next to the function, from left to right, the optimized time fields, optimized structures colored by the time field, and optimized structures colored by the time-dependent Young’s modulus. In these examples, the time range [0,1] is divided into five equal intervals. In each interval the same amount of material volume is allowed.

Fig. 17
figure 17

Space-time topology optimization with four different time-dependent material properties. From left to right: The assumed function of Young’s modulus regarding time, the optimized time field, the optimized structure colored by the time field, and the optimized structure colored by Young’s modulus

The optimization with time-dependent material properties is to some extent similar to the optimization of multiple materials (e.g., Hvejsel and Lund 2011; Zuo and Saitou 2017). The difference is that here the different materials are ordered by a time variable, i.e., the moment they are produced during the manufacturing.

7 Discussion

7.1 Parameters

The numerical optimization process involves some parameters. Table 3 summarizes the parameters which take constant values. A continuation approach is applied to projection parameters. The density projection parameter, βd, starts from 1 and is increased every 20 iterations, by an increment of 2 for the first 200 iterations, and after that by an increment of 4, until it reaches 50. The time projection parameter, βt, starts from 10 and is increased by 5 every 30 iterations, until it reaches 50.

Table 3 Fixed parameters in our numerical tests

7.2 Continuity constraints

In Section 2.3.1, the continuity constraint is relaxed by approximating the maximum function using a p-norm, followed by a smoothed Heaviside projection. Due to the approximation error, while this constraint is numerically satisfied, it may still lead to local minima in the resultant time field. We note that these local minima are not visible from the visualization, since the minimum value is very close to its neighbors, with a difference of 10− 3.

To completely eliminate local minima, we introduce an alternative formulation for the continuity constraint,

$$ \frac{1}{\#(\mathcal{M})}\sum\limits_{e\in \mathcal{M}}||t_{e} - \text{mean}_{i\in \mathcal{N}_{e}} (t_{i})||^{2} \leq \gamma, $$
(59)

with

$$ \text{mean}_{i\in \mathcal{N}_{e}} (t_{i}) = \frac{{\sum}_{i \in \mathcal{N}_{e}} t_{i}}{\# (\mathcal{N}_{e})}. $$
(60)

Here, # denotes the number of elements in a set. \({\mathscr{M}}\) is the set of active elements, i.e., all elements except those which are prescribed as the starting point/region for the fabrication process. \(\mathcal {N}_{e}\) is the set of neighboring elements. γ is a small constant which is set to 10− 9. As γ approaches 0, this constraint effectively restricts te towards the mean value of its neighbors (\(\frac {{\sum }_{i \in \mathcal {N}_{e}} t_{i}}{\# (\mathcal {N}_{e})}\)). This alternative constraint is sufficient but not necessary, while the constraint (18) is sufficient and necessary. Figure 18 compares the optimization results using (18) on the left and (59) on the right. The time field on the right is smoother. This difference is attributed to the fact that the alternative formulation is more restrictive. This new formulation involves a quadratic term, as opposed to highly nonlinear p-norm and Heaviside projection as in (18). This is a useful alternative if smoothness is desired.

Fig. 18
figure 18

Results generated with two different continuity constraints, i.e., using (18) (left) and (59) (right)

In Fig. 18 (left) we observe local maxima in the optimized time field. While these features comply with the continuity constraint, they pose some challenges for manufacturing, since it essentially requires later stages to fill some enclosed voids that have been created from previous stages. In 3D such enclosed voids are not accessible. The enclosed voids can be better detected in Figs. 12 and 13 where the full sequence is shown. As can be seen from Fig. 18 (right), the new continuity constraint effectively avoids both local minima and local maxima (i.e., enclosed voids) in optimized time fields, and thus improves manufacturability in this regard.

Both continuity constraints are defined exclusively on the time field, i.e., without considering the density field which defines the structural layout. A further investigation of Fig. 4 (left and right) reveals a potential manufacturing problem resulting from this. In Fig. 4 (second row, left), the optimized time field is monotonic, with its global minimum being located at the bottom left corner (indicated by a small blue quad) which is prescribed as the starting point of fabrication. Mapping this time field to the optimized structure, visualized in the bottom row, left, shows that the top left patch (dark red, fabricated in the first stage) is not connected to the starting point (the small blue quad) in the first construction stage. We envision a solution to this problem can be devised by defining the continuity constraint on a modified time field. Specifically, for elements which have a density value of (close to) zero, modifying their time value to 1. This modification could be realized by a (series of) differentiable projection.

Figure 19 shows the convergence plot of the continuity constraint (18) for the test in Fig. 4 (right). The red curve corresponds to the aggregated value, \({\mathscr{H}}(\boldsymbol {t})\) in (18), while the blue dash line indicates the threshold 𝜖, which is 10− 9 in this test. After a few oscillations at the beginning of the optimization process, the constraint is satisfied, i.e., \({\mathscr{H}}(\boldsymbol {t}) < \epsilon \).

Fig. 19
figure 19

A convergence plot of the continuity constraint (18)

7.3 Volume fraction and design domain

We have performed tests to demonstrate that the proposed method works well with different problem settings. These tests considered self-weight and external loads (see Section 4). A weighting factor αi = 0.5 has been used to balance the compliance due to the external load and due to gravity. The continuity constraint, (59), is used.

Figure 20 shows optimized designs with three different volume fractions: from left to right, V0 = 0.3, 0.4, and 0.5. The top row shows the optimized time fields, while the bottom row shows the optimized structural layouts, colored by the corresponding time fields.

Fig. 20
figure 20

Space-time topology optimization with different volume fractions

A staircase-shaped design domain is shown in Fig. 21. The design domain and boundary conditions are illustrated in Fig. 21 (left). The volume fraction is 0.6. The dimension of the design domain is 90 × 50. An external force F is applied at the top-right corner, and the gravity of intermediate structure is considered. The optimized time field and the structural layout colored by the time field are shown in the middle and right, respectively. The black polygon in the middle and right indicates the boundary of the design domain.

Fig. 21
figure 21

Space-time topology optimization on a staircase-shaped design domain

7.4 Extension to 3D

The proposed formulation is directly applicable to 3D. Figure 22 shows a 3D test domain, and the resulting sequence of intermediate structures. The problem formulation follows (29)–(35) in Section 3. The left face of the design domain is fixed, and fabrication is supposed to start from there. A distributed load is applied to the bottom on the right face. The domain is discretized into 96 × 48 × 48 cubic trilinear finite elements. The finite element analysis is performed using a geometric multigrid solver (Amir et al. 2014; Wu et al. 2016a). The time field is initialized by a distance field corresponding to the starting face. The new continuity constraint (59) is applied. βt starts from 10 and is increased by 10 every 10 iterations until it reaches 80. The volume fraction is 0.12. The filter radius, for both the time and density field, is \(\sqrt {3}\). The other parameters take the same value as listed in Table 3.

Fig. 22
figure 22

Space-time topology optimization on a 3D design domain. The isosurface (blue) of the optimized structure is extracted with a density threshold of 0.5. The surface that coincides with the domain boundary is indicated in red

8 Conclusions

In this paper, we have presented a general formulation for simultaneous design of the structural layout and the manufacturing sequence, referred to as space-time topology optimization. In addition to a density field for capturing the structural layout, a time field is introduced to encode the manufacturing process. The intermediate structures which correspond to stages of the manufacturing, are generated from these two fields. Constraints for fabrication continuity and process speed are imposed. The potential of the proposed space-time optimization is demonstrated with three fabrication considerations – self-weight of the intermediate structure, process-dependent loads due to a moving manufacturing platform, and process time dependent material properties. Clearly, these examples are by no means exhaustive with respect to the potential of the formulation. The convergence and influence of some key parameters are evaluated by an extensive parameter study.

The proposed formulation opens up a new direction in the integration of topology optimization and advanced manufacturing techniques. Extending this formulation from 2D to 3D is straightforward. As future work, we are particularly interested in considering manufacturing introduced distortion which highly depends on the manufacturing sequence.

9 Replication of results

Important details for replication of results have been described in the manuscript. The Matlab code is made open source, and available upon request.