Grégoire Allaire
email: gregoire.allaire@polytechnique.fr

François Jouve
email: jouve@math.jussieu.fr

Georgios Michailidis
email: michailidis@cmap.polytechnique.fr

Casting constraints in structural optimization via a level-set method

Keywords: Shape and topology optimization, level-set method, casting constraints

A novel strategy for handling the molding constraint for cast parts is presented. In a first step, a simple projection method for the velocity field is applied. If the optimized shape violates thickness constraints, this projection method is no longer sufficient and a general molding constraint is applied at the same time with thickness control. We apply an augmented Lagrangian method to impose the constraints and compute a shape derivative for the objective function. We show examples in 3-d. 2.

Introduction

Shape and topology optimization via a level-set method [START_REF] Allaire | Structural optimization using a sensitivity analysis and a level-set method[END_REF], [START_REF] Wang | A level-set method for structural topology optimization[END_REF] has started attracting the interest of an increasing number of researchers and industrial designers over the last years. Beyond its flexibility to perform changes in the topology of the shape, its independence on the objective function to be minimized expands significantly its range of applicability. Industrial applications frequently impose strong constraints on the geometry of the optimized structure. A significant category of such structures is cast parts, i.e. parts intended to be constructed by casting. In this case, liquid metal is pourred into a cavity formed by molds and the final structure is obtained after the cooling of the metal and removing the molds. Thus, the shape of the cast part should allow the removal of the molds (molding constraint) [START_REF] Qi | Simultaneous optimization of cast part and parting direction using level set method[END_REF]. In this work, we propose a general method for handling the molding constraint. Based on the signeddistance function, we formulate a constraint that guarantees the feasibility of the optimized structure. A simple projection method for the velocity field [START_REF] Qi | Simultaneous optimization of cast part and parting direction using level set method[END_REF] is applied in a first step. Once the optimized shape violates thickness constraints [START_REF] Allaire | Thickness constraints in structural optimization via a level-set method[END_REF] imposed on the cast part, this projection method is no longer sufficient and the molding constraint is applied at the same time with thickness control. We apply an augmented Lagrangian method to impose the constraints and compute a shape derivative [3], [START_REF] Sokolowski | Introduction to shape optimization[END_REF] for the objective function. We illustrate our method with examples in 3-d.

Setting of the problem

Our goal is to optimize a shape Ω ⊂ R d (d = 2 or 3), a bounded domain occupied by a linear isotropic elastic material with Hooke's law A (a positive definite fourth-order tensor). Typically, the boundary of Ω is comprised of two disjoint parts, such that ∂Ω = Γ N ∪ Γ D , with Dirichlet boundary conditions on Γ D , and Neumann boundary conditions on Γ N . We introduce a working domain D (a bounded domain of R d ) which contains all admissible shapes, that is Ω ⊂ D. The volume and surface loads are given as two vector-valued functions defined on D, f ∈ L 2 (D) d and g ∈ H 1 (D) d . The displacement field u is the unique solution in H 1 (Ω) d of the linearized elasticity system

   -div (A e(u)) = f in Ω, u = 0 on Γ D , A e(u) n = g on Γ N , (1)
where e(u) is the strain tensor, equal to the symmetrized gradient of u. A classical choice for the objective function J (Ω) to be minimized is the compliance (the work done by the loads). It reads

J(Ω) = Ω f • u dx + Γ N g • u dx = Ω A e(u) • e(u) dx. (2)
In order to find a descent direction for advecting the shape, we follow the approach of Murat and Simon for shape derivation [3]. Starting from a smooth reference open set Ω, we consider domains of the type

Ω θ = Id + θ (Ω), with θ ∈ W 1,∞ (R d , R d ).
It is well known that, for sufficiently small θ, (Id + θ) is a diffeomorphism in R d .

Definition 0.1 The shape derivative of J(Ω) at Ω is defined as the Fréchet derivative in W 1,∞ (R d , R d ) at 0 of the application θ → J (Id + θ)(Ω) , i.e.

J (Id + θ)(Ω) = J(Ω) + J (Ω)(θ) + o(θ) with lim θ→0 |o(θ)| θ = 0 , where J (Ω) is a continuous linear form on W 1,∞ (R d , R d ).
Hadamard's structure theorem asserts that the shape derivative of a functional can be written in the form

J (Ω)(θ) = ∂Ω V (x)θ(x) • n(x)dx, (3)
where V is the integrand of the shape derivative that depends on the specific objective function. Then, a descent direction can be found by advecting the shape in the direction θ(x) = -tV (x)n(x) for a small enough descent step t > 0. For the new shape Ω t = ( Id + tθ) Ω, we can formally write

J (Ω t ) = J (Ω) -t ∂Ω V 2 dx + O(t 2 ), (4)
which guarantees a descent direction.

Remark 0.1 A weaker notion of differentiability is that of the directional derivative of a functional J(Ω) at Ω in the direction θ ∈ W 1,∞ (R d , R d ) which is defined as the limit in R (if it exists)

J (Ω)(θ) = lim δ→0 J((Id + δθ)(Ω)) -J(Ω) δ .

Level-set framework

Shape representation

We favor an Eulerian approach and use the level-set method [START_REF] Osher | Front propagating with curvature dependent speed: algorithms based on Hamilton-Jacobi formulations[END_REF] to capture the shape Ω on a fixed mesh. Then, the boundary of Ω is defined by means of a level set function ψ such that

   ψ(x) = 0 ⇔ x ∈ ∂Ω ∩ D, ψ(x) < 0 ⇔ x ∈ Ω, ψ(x) > 0 ⇔ x ∈ D \ Ω .
During the optimization process the shape is being advected with a velocity V (x) derived from shape differentiation, as we will see in the sequel. The advection is described in the level-set framework by introducing a pseudo-time t ∈ R + and solving the well-known Hamilton-Jacobi equation

∂ψ ∂t + V |∇ψ| = 0. ( 5
)
Figure 1: Level-set representation of a shape.

Signed distance function

We remind that if Ω ⊂ R d is a bounded domain, then the signed distance function to Ω is the function R d x → d Ω (x) defined by :

d Ω (x) =    -d(x, ∂Ω) if x ∈ Ω 0 if x ∈ ∂Ω d(x, ∂Ω) if x ∈ c Ω ,
where d(•, ∂Ω) is the usual Euclidean distance.

Ersatz material

Using the so-called "ersatz material" approach, we extend the state equations tot he whole domain D.

To do this, we fill the holes D \ Ω by a weak phase that mimicks the void, but at the same time avoids the singularity of the rigidity matrix. More precisely, we define an elasticity tensor A * (x) which is a mixture of A in Ω and of the weak material mimicking holes in D \ Ω

A * (x) = ρ(x)A with ρ = 1 in Ω, 10 -3 in D \ Ω. (6)

Casting process

A simplified sequence of steps for the construction of a cast part is the following:

1. Molds are used in order to create a cavity with the shape of the structure that we intend to construct.

2. The cavity is filled with molten liquid.

3. The liquid solidifies.

4. The molds are removed and the cast part is revealed.

In this work we are interested to assure the feasibility of the last step, i.e. that the shape of the cast part does not oppose to the removal of the molds. In Fig. 2 we see that, depending on the casting system considered, a shape can be moldable or not. In this work, we do not consider the optimization of the casting process, but the casting system is considered a priori defined. We call parting direction the direction along which the mold is removed and parting surface, the surface on which different molds come in contact. The parting surface between two molds can be predefined or it can be constructed after the optimization using suitable methods. In most of the industrial applications, planar parting surfaces are prefered because of reasons of cost and simplicity.

7. Formulation of the molding and the minimum thickness constraint

Molding condition on design velocity

A molding condition on the desgin velocity was proposed by Xia et al. in [START_REF] Qi | Simultaneous optimization of cast part and parting direction using level set method[END_REF]. According to the authors, if a shape is castable for its corresponding casting system, then the border of the structure ∂Ω can be divided into n disjoint parts Γ i such that Γ i ∩ Γ j = , ∪ n i=1 Γ i = ∂Ω and Γ i can be parted in the direction d i . Thus, a moldability condition for this shape is:

d i • n(x) ≥ 0, ∀x ∈ Γ i . ( 7
)
Based on the the molding condition of Eq.( 7), Xia et al. have proposed the following method : starting from a shape that satisfies the constraint (moldable), consider an advection velocity of the form

θ i (x) = λ(x)d i , ∀x ∈ Γ i . (8)
In this way, the shape remains always moldable [START_REF] Qi | Simultaneous optimization of cast part and parting direction using level set method[END_REF]. This method, despite its simplicity and its effectiveness, presents a major drawback. Since there is no component of the advection velocity normal to the parting directions, the shape can shrink by extinction of some part, but it cannot expand in this direction. Thus, in case that a minimum thickness constraint is applied in a second step [START_REF] Allaire | Thickness constraints in structural optimization via a level-set method[END_REF], the structure will be able to move only parallel to its parting directions and in all probability the constraint will not be respected. Therefore, it is neccessary to formulate a general molding constraint.

Generalized molding constraint

A generalised way to treat the molding constraint can be applied by using the signed-distance function to the boundary of the domain to derive all neccessary information. The constraint reads:

d Ω (x + ξd i ) ≥ 0 ∀x ∈ Γ i , ∀ξ ∈ [0, diam(D)] , (9)
where we denote diam(D) = sup x,y {dist(x, y), x, y ∈ D} the diameter of the fixed domain D. Intuitively, this formulations says that, starting from a point of the boundary, which will be casted in the direction d i and travelling along this direction, we should not meet again some part of the body (see Fig. 3). In case that the parting surface is not defined a priori, for a system of two molds (see Fig. 2, right image) the constraint (9) reads:

d Ω (x + ξsign(n • d)d) ≥ 0 ∀x ∈ ∂Ω, ∀ξ ∈ [0, diam(D)] . (10)
Figure 3: Checking castability along the parting direction d at the point x ∈ Ω.

Minimum thickness constraint

For the sake of completeness, we also present here a proposed minimum thickness constraint. We adress the interested reader to [START_REF] Allaire | Thickness constraints in structural optimization via a level-set method[END_REF] and to the references therein for further details. Denoting with d of f a positive scalar, the set ∂Ω d of f = {x -d of f n (x) : x ∈ ∂Ω} is the offset set of ∂Ω in the direction -n (x) at a distance d of f (see Fig. 4). A formulation of the constraint which guarantees that any offset set in the direction -n (x) up to a distance d min stays in the shape Ω is the following:

d Ω (x -d of f n (x)) ≤ 0 ∀x ∈ ∂Ω, ∀d of f ∈ [0, d min ] . (11)
8. Shape derivative 8.1. Molding condition on design velocity Xia et al. have proposed in [START_REF] Qi | Simultaneous optimization of cast part and parting direction using level set method[END_REF] a modification of the advection velocity according to Eq.( 8), that guarantees a descent direction. Starting from the general form of the shape derivative for a functional J(Ω)

J (Ω)(θ) = ∂Ω θ(x) • n(x)V (x)dx = n i=1 Γi θ i (x) • n(x)V i (x)dx
and considering admissible advection fields of the type of Eq.( 8), we get

J (Ω)(θ) = n i=1 Γi λ i (x)d i (x) • n(x)V i (x)dx. Choosing λ i (x) = -V i (x)d i (x) • n(x)
for each part Γ i of the boundary ∂Ω, the shape derivative becomes

J (Ω)(θ) = - n i=1 Γi (d i (x) • n(x)) 2 (V i (x)) 2 dx ≤ 0,
which shows that the chosen advection velocity

θ i (x) = -V i (x)(d i (x) • n(x))d i (x), ∀x ∈ Γ i ,
is indeed a descent direction.

Generalised molding and minimum thickness constraint

The generalised molding and the minimum thickness constraints that we have proposed in the previous section are pointwise constraints of the same type. We will give here, for the sake of completeness, a short description of the steps we have followed in [START_REF] Allaire | Thickness constraints in structural optimization via a level-set method[END_REF] to calculate a shape derivative for this type of constraints. In a first step, a penalty functional is used to formulate a global equality constraint. Then, an augmented Lagrangian method is used to solve the constrained optimization problem.

For the generalised molding constraint of Eq.( 9) the global constraint takes the form

P 1 (Ω) = n i=1 Γi diam(D) 0 (d Ω (x + ξd i )) - 2 dξdx = 0,
and similarly for the constraint of Eq.( 10) it reads

P 1 (Ω) = ∂Ω diam(D) 0 (d Ω (x + ξsign(n(x) • d)d)) - 2 dξdx = 0,
where we have denoted (f ) -= min (f, 0). Similarly, for the minimum thickness constraint we take

P 2 (Ω) = ∂Ω dmin 0 (d Ω (x -ξn (x))) + 2 dξdx = 0,
where (f ) + = max (f, 0). The two functionals P 1 and P 2 are of the same type and the constraints above can be writen in compact notation (see Fig. 5)

P (Ω) = ∂Ω ξ f 0 (d (x m )) ± 2 dξdx = 0,
where ξ f is a scalar and x m denotes an offset point of the boundary. The derivation of the above integral has been done in [START_REF] Allaire | Thickness constraints in structural optimization via a level-set method[END_REF] and it reads

∂P (Ω) ∂Ω (θ) = ∂Ω ξ f 0 θ (x) • n (x)) H (d Ω (x m )) ± 2 + 2 (d Ω (x m )) ± ∇d Ω (x m ) ∇d Ω (x) ∇d Ω (x) dξdx - ∂Ω ξ f 0 θ x m|Ω • n x m|Ω 2 (d Ω (x m )) ± dξdx.
As we have mentioned in the same article, a descent direction can be found in a second step, after identifying the linear form (shape derivative) with another scalar product.

Numerical results

Our model example is a 2 × 2 × 1 structure, clamped at its four lower corners and with a unitary force applied at the middle of the lower part (see Fig. 6). The domain is discretized by 40×40×20 Q1 elements. The Young modulus (E) of the material is set to 1 and the Poisson ratio (ν) to 0.3. We minimize the compliance of the structure under a volume constraint

min J(Ω) = Γ N g • u dx, Ω dx = 0.2|D|, ( 12
)
where |D| is the volume of the working domain.

An augmented Lagrangian method is applied here to handle the constraints. Following the approach in Figure 6: Boundary conditions.

[3], supposing that our problem contains n equality constraints of the type c i (Ω) = 0 (i = 1, ..., n), an augmented Lagragian function is constructed as

L(Ω, , µ) = J(Ω) - n i=1 i c i (Ω) + µ i 2 n i=1 c 2 i (Ω),
where = ( i ) i=1,...,n and µ = (µ i ) i=1,...,n are lagrange multipliers and penalty parameters for the constraints. The lagrange multipliers are updated at each iteration n according to the optimality condition

n+1 i = n i -µ i c i (Ω n ).
The penalty parameters are augmented every 5 iterations. First, we optimize the structure without considering a molding constraint. The final shape is shown in Fig. 7. As we have expected, the optimized shape has a quite complex topology and therefore it is hopeless that it is castable for an a priori defined casting system. We consider now the case of a casting system with a parting direction d = (0, 0, 1) and with a predefined parting surface described by the equation z = 0. A full-domain initialization has been chosen and the initial level-set function is taken as the signed-distance function to the upper part of the domain. The left figure in Fig. 8 shows an optimized shape for the problem of Eq.( 12) when the molding condition on the design velocity is applied and no constraint on the minimum thickness is imposed. In the convergence diagrams of Fig. 9 we see that the compliance is higher when the molding constraint is applied, as expected (see Table 1). In a second step, we impose a minimum thickness constraint with d min = 0.4. The previously optimized shape is taken as an initial guess to solve the problem

       min J(Ω) = Γ N g • u dx, Ω dx = 0.2|D|, P 1 = 0, P 2 = 0, (13)
without any condition on the advection velocity. An optimized shape for the problem of Eq.( 13) is shown on the right of Fig. 8. The convergence diagrams for the penalty functionals P 1 and P 2 are shown in Fig. 10.

In the final example, the same parting direction d = (0, 0, 1) has been considered, but no a priori imposed parting surface has been defined. Again, a full-domain initialization has been chosen, but the initial level-set function is taken now as the signed-distance function to the upper and lower part of the domain.

Applying the molding condition on the design velocity and no constraint on the minimum thickness, we get the optimized shape on the left of Fig. 11. In the convergence diagrams of Fig. 12 we see agian that the compliance is higher when the molding constraint is applied. When a minimum thickness constraint of d min = 0.3 is applied, we get the optimized shape on the right of Fig. 11. The convergence diagrams for the penalty functionals P 1 and P 2 are shown in Fig. 13.

Figure 2 :

 2 Figure 2: Left: moldable shape; right: non-moldable shape.

Figure 4 :

 4 Figure 4: Offset set of the lower part of the boundary (shape in grey).

Figure 5 :

 5 Figure 5: Offset point and projection onto the boundary.

Figure 7 :

 7 Figure 7: Initialization and optimized shape for the problem of Eq.(12) without a molding constraint.

Figure 8 :

 8 Figure 8: Optimized shapes under a molding constraint (left) and under a molding and minimum thickness constraint (right), with a predefined parting surface.

Figure 9 :

 9 Figure 9: Compliance and volume convergence diagrams for the results in Fig.7 and Fig.8 (left).

Figure 10 :

 10 Figure 10: Convergence diagrams for the penalty functionals P 1 (left) and P 2 (right).

Figure 11 :

 11 Figure 11: Optimized shapes under a molding constraint (left) and under a molding and minimum thickness constraint (right), without a predefined parting surface.

Figure 12 :

 12 Figure 12: Compliance and volume convergence diagrams for the results in Fig.7 and Fig.11 (left).

Figure 13 :

 13 Figure 13: Convergence diagrams for the penalty functionals P 1 (left) and P 2 (right).

Table 1 :

 1 Compliance of the optimized structures. The authors acknowledge fruitful discussions and helpful remarks from Marc Albertelli (Renault) and

		Compliance
	Without molding constraint	90.14
	With molding constraint	102.07
	and no parting surface
	With molding constraint,
	no parting surface
	and minimum thickness constraint	105.87
	With molding constraint	123.68
	and parting surface
	With molding, parting surface	134.68
	and minimum thickness constraint
	10. Acknowledgements