# Topology Optimization Considering Porosity Defects in Metal Additive Manufacturing
## 6 Numerical Examples
### L-Shaped Beam  
The design domain of this optimization problem is an L-shaped area with a ratio 1:1 of length \(L\) to height \(H\), meshed with 4800 elements, as shown in Figure 3a. Its upper  
Figure 2: Flowchart of the level set topology optimization considering porosity constraints.  
side is fixed, and a vertical load \(P=1\) is applied at the middle of its right-hand side. The upper bound of volume ratio is 0.4. The evolutionary volume ratio \(c_{cr}\) is set to 0.04, the filter radius \(R_{min}\) is taken as 3, and the interval \(j\) of hole nucleation is 5. The initial shape is displayed in Figure 3b. At first, the level set topology optimization of hole nucleation combining BESO and topological sensitivity is employed. The optimized shape is shown in Figure 4. The optimization converges after 65 iterations, and the evolution of the volume fraction and the compliance are shown in Figure 5.  
Secondly, the level set topology optimization considering porosity constraint is employed. The preliminary optimization results of the previous step are imported to perform topology optimization considering porosity constraint. The pores radius \(r\) is set to 0.625, and the tolerance \(\eta\) is taken as 0.3. The optimization converges after 14 iterations, and the evolution of the volume fraction, the compliance and porosity constraint are shown in Figure 6. The preliminary optimization results and the optimization results considering porosity constraint are shown in Figure 7a,b, respectively, and the corresponding porosity constraint distribution clouds are shown in Figure 7c,d.  
Figure 4: Preliminary optimized shape of L-shaped beam.  
Figure 3: Optimum design problem of L-shaped beam, (**a**) design domain and boundary conditions; (**b**) initial shape.  
As shown in Figure 6, the optimization problem with porosity constraints converges after 14 iterations, the porosity constraint value decreases 30% from 14.6, but the objective compliance increases from 87.8 to 93.5. Without considering the porosity constraint, the maximum porosity constraint value appears near the reentrant corner of the optimization result shown in Figure 7c, while the porosity constraint value in other areas is almost zero. According to practical experience, the reentrant corner is easy to produce stress concentration under the loads. If there are pores in this area during manufacturing, cracks will be generated under the action of concentrated force, which will reduce the fatigue performance of parts. Therefore, the reentrant corner is more sensitive to porosity. If the reentrant corner is smoothed into a rounded area, the stress concentration can be effectively reduced, and the sensitivity to the porosity is also reduced. Therefore, under the effect of porosity constraints, the reentrant corner will be key optimization region of the structure. According to the optimization result in Figure 7d, under the effect of porosity constraints, the reentrant corner becomes smooth and presents a characteristic of fillet, while the other regions almost have no change. By observing the corresponding porosity constraint value in this area, it can be found that the porosity constraint value has decreased significantly, and the maximum porosity constraint value in this area has decreased from 1.92 to 1.14. According to the numerical analysis, the topology optimization method considering porosity constraints is effective and conforms to the actual situation. Comparing the changes in compliance with or without considering porosity constraint, there is a deviation that is within the admissible range.  
Figure 5: Convergence history of L-shaped beam by hole nucleation method.  
Figure 6: Convergence history of L-shaped beam considering porosity constraint.