## 2 Calculation Methods
### Ray Tracing  
Traditional ray-tracing methods are computationally intensive and complex for performance optimization. To simplify our research, we focused on the transverse direction of the trough solar collector system. We analyze how energy is distributed and how performance changes in this direction. We also divide the surfaces into a grid and perform ray-tracing calculations based solely on their transverse position.  
First, we establish the coordinate system; the origin is the vertex of the parabolic trough, and the \(x\)-axis is lateral to the parabolic trough. The \(y\)-axis is radial, the \(z\)-axis points toward the receiver, and the \(f\)-point is the focal point of the parabolic trough. Suppose the incident ray intersects the parabola at point \(p\), the coordinates are \((x_{o},y_{o},z_{o})\), \(r\) represents the direction vector of reflected rays, \(i\) represents the direction vector of the incident ray, \(n\) represents the normal vector, and then the vector of the reflected rays is calculated as [29]:  
\[r=i-2(i-n)n \tag{5}\]  
To determine whether each ray hits the receiver successfully, it is necessary to calculate the ray vector and determine whether the receiver can intercept it. For the tube receiver, the receiver and reflected ray equations are:  
\[x^{2}+(z-f)^{2}=R^{2} \tag{6}\]  
\[z-z_{0}=\frac{r_{z}}{r_{x}}(x-x_{0})=\frac{r_{z}}{r_{y}}(y-y_{0}) \tag{7}\]  
\(x_{0}\), \(y_{0}\) and \(z_{0}\) are the origin coordinates of the reflection point, and \(r_{x}\), \(r_{y}\) and \(r_{z}\) are the points where the light is reflected. \(x\), \(y\), and \(z\) are normal vectors in three directions. \(R\) and \(f\) are the radius and focal length of the tube receivers, respectively. When considering the x-direction and the \(z\)-direction, the two following equations are solved:  
\[[1+(\frac{r_{x}}{r_{z}})^{2}]z^{2}+[2\frac{r_{x}}{r_{z}}x_{0}-2(\frac{r_{x}}{r _{z}})^{2}z_{0}-2f]z+[z\hat{2}(\frac{r_{x}}{r_{z}})^{2}-2\frac{r_{x}}{r_{z}}x_ {0}z_{0}+x_{0}^{2}+f^{2}-R^{2}]=0 \tag{8}\]  
When there is a solution to this equation, it means that the reflected rays at this point are successfully intercepted by the tube receiver:  
\[\Delta=[\frac{r_{x}}{r_{z}}x_{0}-(\frac{r_{x}}{r_{z}})^{2}z_{0}-f]^{2}-[1+( \frac{r_{x}}{r_{z}})^{2}][\hat{2}_{0}^{2}(\frac{r_{x}}{r_{z}})^{2}-2\frac{r_{ x}}{r_{z}}x_{0}z_{0}+x_{0}^{2}+f^{2}-R^{2}]\geqslant 0 \tag{9}\]The coordinates of the intersection between the ray and the receiver are:  
\[z_{1}=\frac{((\frac{r_{x}}{r_{z}}z_{0}-x_{0})\frac{r_{x}}{r_{z}}-f)-\sqrt{\Delta} }{1+(\frac{r_{x}}{r_{z}})^{2}} \tag{10}\]  
\[x_{1}=x_{0}+\frac{r_{x}}{r_{z}}(z_{1}-z_{0}) \tag{11}\]  
For trough solar collectors with cavity receivers, it is only necessary to calculate whether the reflected rays' location is within the receiver's range when the receiver is in the \(z\) coordinate. The coordinates of the intersection of the ray and the receiver are:  
\[x_{1}=\frac{r_{x}}{r_{z}}(f-z_{0})+x_{0} \tag{12}\]  
\[z_{1}=f \tag{13}\]  
When the x-coordinate condition is satisfied that \(-R\leqslant x_{1}\leqslant R\), it can be considered that the light ray has been successfully intercepted.  
The \(y\) coordinate can be calculated using the angle of incidence and the \(z\) coordinate:  
\[y_{1}=(z_{1}-z_{0})tan(\lambda)+y_{0} \tag{14}\]  
With the focal point centered on the plane where the receiver is located, the receiver can be radially divided into N equal planes. Using the intersection coordinates calculated in the above formula, it is easy to estimate which part of the receiver these rays are intercepted at. For the tube receivers, the calculation is as follows:  
\[j=(arctan2(\frac{x_{1}}{f-z_{1}})+\pi)/N \tag{15}\]  
The calculation of the cavity receiver is much more straightforward and is:  
\[j=\frac{x_{1}}{N} \tag{16}\]  
By summing the total number of rays in the area, we can count the total number of rays in each plane.