# Smooth Design of 3D Self-Supporting Topologies Using Additive Manufacturing Filter and SEMDOT
## 2 Integrating [PERSON]'s AM Filter into SEMDOT  
### Problem Statement  
This study uses SEMDOT as an optimization platform to form smooth topologies and [PERSON]'s AM filter to obtain 3D self-supporting designs. SEMDOT is a new topology optimization platform that was developed by the authors [16], and its effectiveness has been thoroughly validated. For more details on the advantages of SEMDOT compared to some existing algorithms that are capable of generating smooth boundaries, see [15; 16]. [PERSON]'s AM filter is a well-established restriction method that can be used with gradient-based topology optimization algorithms, and it has become one of the most extensively used methods for generating self-supporting designs in this community. In SEMDOT, the elemental volume fraction used in the Finite Element Analysis (FEA) model is defined as  
\[X_{e}=\frac{1}{N}\sum_{g=1}^{N}\rho_{e,g} \tag{1}\]  
where \(N\) is the total number of grid points in each element and \(\rho_{e,g}\) is the density of the \(g\)th grid point in the \(e\)th element. The filtering scheme selected in this study is  
\[\tilde{X}_{e}=\frac{\sum\limits_{l=1}^{N_{e}}\omega_{el}X_{l}}{\sum\limits_{l=1} ^{N_{e}}\omega_{el}} \tag{2}\]  
where \(\tilde{X}_{e}\) is the filtered elemental volume fraction, \(N_{e}\) is the neighborhood set of elements within the filter domain for the \(e\)th element that is a circle centered at the centroid of this element with a predefined filter radius \(r_{\min}\), and \(\omega_{el}\) is a linear weight factor defined as  
\[\omega_{el}=\max(0,r_{\min}-\Delta(e,l)) \tag{3}\]  
where \(\Delta(e,l)\) is the center-to-center distance of the \(l\)th element within the filter domain to the \(e\)th element. Filtered elemental volume fractions are updated for the next round of FEA by summing up the grid points for each element:  
\[\tilde{X}_{e}^{new}=\frac{1}{N}\sum\limits_{g=1}^{N}\rho_{e,g}^{new} \tag{4}\]  
where \(\rho_{e,g}^{new}\) is the density of the grid point obtained by the Heaviside smooth function. The relationship between \(\tilde{X}_{e}\) and \(\tilde{X}_{e}^{new}\) can be established as  
\[\delta_{e}=\tilde{X}_{e}^{new}-\tilde{X}_{e} \tag{5}\]  
where \(\delta_{e}\) is the deviation of the \(e\)th element before and after the update. A detailed discussion of this relationship is presented in [16]. The basic idea of [PERSON]'s AM filter is that the value of the element to be supported should not be less than the maximum value of the elements in the supporting region. Figure 1 schematically demonstrates the method of generating self-supporting designs, where the blue element is the element to be supported and the five green elements (\(S_{(i,j,k)}\)) form the supporting region. Mathematical expressions of the 3D [PERSON]'s AM filter [25] are given by  
\[\tilde{\xi}_{(i,j,k)}=\min(\tilde{\mathbf{X}}_{(i,j,k)},\Xi_{(i,j,k)})\ \ \ \text{with} \tag{6}\]  
\[\Xi_{(i,j,k)}=\max(\tilde{\mathbf{\xi}}_{(i-1,j,k-1)},\tilde{\mathbf{\xi}}_{(i,j-1,k- 1)},\tilde{\mathbf{\xi}}_{(i,j,k-1)},\tilde{\mathbf{\xi}}_{(i,j+1,k-1)},\tilde{\mathbf{ \xi}}_{(i+1,j,k-1)}) \tag{7}\]  
where \(\tilde{\mathbf{\xi}}\) is the vector of printed elemental volume fractions, \(\tilde{\mathbf{X}}\) is the vector of filtered elemental volume fractions and \(\Xi\) is the vector of the maximum printed elemental volume fractions. According to [5; 25], the following approximation is made for gradient-based optimization:  
\[\tilde{\mathbf{\xi}}=\frac{1}{2}\bigg{(}\tilde{\mathbf{X}}+\Xi-\Big{(}\big{(}\tilde{ \mathbf{X}}-\Xi\big{)}^{2}+\varepsilon\Big{)}^{\frac{1}{2}}+\sqrt{\varepsilon} \bigg{)} \tag{8}\]  
where \(\varepsilon\) is the parameter that controls the accuracy of the approximation. The softmax function is used to calculate the maximum value of the elements in the supporting region instead of the P-Q max function in original [PERSON]'s AM filter [36]. This is because the P-Q max function will generally cause a higher absolute error (the difference between real maximum and maximum smooth approximation) than the softmax function.