# Topology Optimization Considering Porosity Defects in Metal Additive Manufacturing
## 3 Hole Nucleation Method  
### Beso  
BESO is developed from ESO which was originally proposed by [PERSON] et al. (2019) in 1992. ESO allows only to remove material from the structure, and those removed materials cannot be admitted in the later evolutions. Therefore, some elements with higher utilization are accidentally removed. Correspondingly, [PERSON] et al. (2019) proposed the BESO that can remove low-efficiency materials and add materials at key positions. This method is widely used in machinery, civil engineering, aerospace, and other fields because of its simple algorithm and easy programming.  
In BESO, the sensitivity number is used to remove low-efficiency materials or add high-efficiency materials. In other words, material is removed or added in the design domain by comparing the value of the sensitivity number. Therefore, BESO regards the structure itself as the design variable of the optimization problem. The optimization problem is expressed as:  
\[\begin{array}{c}\text{min}C=\mathbf{F}^{T}\mathbf{u}=\mathbf{u}^{T}\mathbf{Ku}\\ s.t.\hskip 14.226378 pt\sum\limits_{i=1}^{N}V_{i}x_{i}=fV^{*}=V_{max}\\ \hskip 14.226378 pt\mathbf{F}=\mathbf{Ku}\\ x_{i}=\left\{\begin{array}{l}0\\ 1\end{array}\right.\end{array} \tag{16}\]  
where compliance \(C\) is the objective of the optimization problem, \(\mathbf{F}\) is the load vectors, \(\mathbf{u}\) is the displacement vectors, \(\mathbf{K}\) is the global stiffness matrix, \(V_{i}\) is the elemental volume, \(V^{*}\) is the total volume of the design domain, \(f\) is the volume fraction, and \(N\) is the number of elements in the design domain. The design variable \(x_{i}\) is the elemental density with \(x_{i}=0\) for a void element and \(x_{i}=1\) for a solid element.  
In BESO, the sensitivity number is compared with the sensitivity threshold. For solid elements, the sensitivity number is greater than or equal to the threshold. For void elements, the sensitivity number is less than the threshold. The elemental sensitivity number is defined as the change of the mean compliance or elemental strain energy:  
\[\begin{array}{c}\alpha_{i}^{e}=\frac{\mathbf{u}_{i}^{T}\mathbf{K}_{i}\mathbf{u}_{i}}{V_ {i}}\end{array} \tag{17}\]  
To calculate the sensitivity of void elements, a sensitivity filter scheme is introduced. Furthermore, this filter method can solve the checkerboard and mesh dependency. The formula for sensitivity filter scheme is written as:\[\alpha_{i}=\frac{\sum_{j\in N_{i}}\omega\left(r_{ij}\right)\alpha_{j}^{n}}{\sum_{j \in N_{e}}\omega\left(r_{ij}\right)} \tag{18}\]  
where \(\alpha_{i}\) is the elemental sensitivity after filtering, and \(\alpha_{j}^{n}\) is the elemental sensitivity before filtering. The neighbor elements set \(N_{i}\) of the element \(i\) is defined as all elements whose spatial distance from the central cell \(i\) is less than or equal to the filtering radius \(R_{min}\). The weight factor \(\omega(r_{ij})\) of the spatial distance is:  
\[\omega\left(r_{ij}\right)=R_{min}-r_{ij} \tag{19}\]  
where \(r_{ij}\) is the spatial distance between element \(j\) and central element \(i\), defined as \(\mid\mid x_{j}\cdot x_{i}\mid\mid\).  
The sensitivity threshold \(a^{th}\) can be determined by the target volume \(V^{k+1}\). The target volume can be calculated by the current volume and the evolutionary volume ratio \(c_{\sigma}\):  
\[V^{k+1}=V^{k}(1\pm c_{\sigma}) \tag{20}\]  
If the current structure volume is equal to the volume constraint, the target volume \(V^{k+1}\) will remain \(V_{max}\).  
The finite element analysis, sensitivity filtering, and structure update are continuously looped until the volume constraint and the convergence criterion (21) are satisfied.  
\[e=\frac{\left|\sum_{i}^{N}C_{k-i+1}-\sum_{i}^{N}C_{k-N-i+1}\right|}{\sum_{i}^{ N}C_{k-i+1}}\leq\delta \tag{21}\]  
where \(e\) is the change of objective, \(\delta\) is the tolerance factor, and \(N\) is a positive integer.