# Topology Optimization of Anisotropic Materials with Smooth Fiber Orientation
## 2 Model Derivation
### Solution Algorithm Considering Fiber Angle Constraint  
In updating the element density, we refer to the optimization criterion method (OC) proposed by [PERSON]. Taking the minimum structural compliance as the goal, the volume fraction is used as the constraint condition to solve the problem, which is convenient and efficient. In the fiber angle update, considering its nonlinear and multi-constrained objective function, this paper uses the moving asymptote method (MMA) to solve the problem. While using the MMA to solve the fiber angle, the fiber angle constraint function is introduced. The fiber angle constraint function \(f(\theta_{e})\) in Equation (1) is defined as follows:  
\[f(\theta_{e})=\left\{ \begin{array}{c}0\ \ \ \text{FCR}\geq\text{fcr}\\ \text{FCR}-\text{fcr}\ \ \text{FCR}<\text{fcr}\end{array} \right., \tag{8}\]  
where \(\theta_{e}\) represents the fiber angle of unit \(e\) and changes in [0, 1] and the FCR and fcr are the fiber continuity rate of the current iteration result and the predefined fiber continuity rate, respectively. When FCR \(\geq\) fcr, the fiber continuity rate of the current iteration results meets the requirements, without constraints, and the function value is 0. When FCR \(<\) fcr, the constraint is performed. Figure 1 shows the schematic diagram of the fiber continuity ratio (FCR) calculation, and the equation is as follows:  
\[\text{FCR}=\frac{\sum\limits_{e=1}^{nd\times nely}\left(\sum\limits_{q=1}^{N_{e }}\cos\varphi_{e,q}\right)}{\sum\limits_{e=1}^{nd\times nely}N_{e}}, \tag{9}\]  
where \(\varphi_{q}\) is the angle of the \(q\)th adjacent element around the central element \(e\) and \(\varphi_{e,q}\) is the difference between \(\theta_{e}\) and \(\alpha_{e,q}\). Then, use the cosine adjustment function to normalize \(\varphi_{e,q}\), where \(N_{e}\) is the number of neighborhood units, nelx is the number of unit columns, and nely is the number of unit rows, as shown in Figure 1.  
Since the design variable \(\theta_{e}\) changes freely in the range of \(\left[-\frac{\pi}{2},\frac{\pi}{2}\right]\), the value range of \(\varphi_{e,q}\) is \([0,\pi]\). Since we quantify the degree of continuity of the fiber by the accumulation and normalization of the cosine value of \(\varphi_{e,q}\), the cosine value of \(\varphi_{e,q}\) has a non-negative requirement, and it is necessary to adjust \(\varphi_{e,q}\) in segments, as shown in Figure 2.  
The angle adjustment method shown in Figure 2 is scientific because the degree of fiber continuity represented by \(\varphi_{e,q}\) and \(\pi-\varphi_{e,q}\) is the same, and we only make corresponding adjustments for the difference in the cosine values of the two. Subsequently, \(\varphi_{e,q}\) is calculated according to the segmentation method as follows:  
\[\varphi_{e,q}=\left\{ \begin{array}{c}\theta_{e}-\alpha_{e,q}\ \ \ \ \left|\theta_{e}-\alpha_{e,q}\right|\leq\frac{\pi}{2}\\ \pi-\left(\theta_{e}-\alpha_{e,q}\right)\ \left|\theta_{e}-\alpha_{e,q}\right|> \frac{\pi}{2}\end{array} \right., \tag{10}\]  
where \(\theta_{q}\) is the fiber angle of the \(q\)th unit in the neighborhood of \(\theta_{e}\). Figure 1: Schematic diagram of the calculation method for the fiber continuity ratio (FCR). On this basis, it is also necessary to calculate the gradient value of the constraint function to the design variable to meet the correct search direction of the constraint condition. The gradient value \(df(\theta_{e})\) of the constraint function \(f(\theta_{e})\) to all element fiber angles \(\theta_{e}\) is calculated in Equations (8)-(10) as follows:  
\[df(\theta_{e})=\left\{ \begin{array}{cc}0&\text{FCR}\geq\text{fcr}\\ \sum\limits_{q=1}^{N}\left[\sin(\theta_{e}-\alpha_{e,q})\cdot\varphi_{e,q} \right]&\text{FCR}<\text{fcr}\end{array} \right., \tag{11}\]  
where \(\varphi_{e,q}\) is the derivative of \(\varphi_{e,q}\) to \(\theta_{e}\), which is calculated as follows:  
\[{\varphi_{e,q}}^{\prime}=\left\{ \begin{array}{cc}1&\left|\theta_{e}-\alpha _{e,q}\right|\leq\frac{\pi}{2}\\ -1&\left|\theta_{e}-\alpha_{e,q}\right|>\frac{\pi}{2}\end{array}