## 2 Simulation Method
### Inflow Simulation Model  
Whenever there is a difference in the distribution of the inflow within the reservoir, it will directly affect the heat brought into each layer of water and ultimately impact the water temperature within the reservoir. Therefore, accurate simulation of the distribution  
Figure 1: Schematic diagram of the simulation model.  
of the inflow in the reservoir is conducive to better research on the water temperature. In view of the inability to measure the inflow of the reservoir in the phase of dam design, this paper compares and analyzes various vertical velocity distribution laws and establishes a reservoir inflow simulation model.  
The ratio of the flow at y to the total is:  
\[\frac{q(y)}{Q}=\frac{uA_{y}}{\sum_{i=0}^{H}u_{i}A_{vi}}, \tag{2}\]  
where \(q(y)\) is the flow rate at y, \(Q\) is the total flow rate, \(u\) is the flow velocity at \(y\), \(A_{y}\). is the vertical area per unit height, and \(H\) is the total depth. \(A_{y}\) is obtained from the vertical velocity distribution laws of the open-channel flows.  
At present, the research on the vertical velocity distribution of open-channel flows is generally carried out on the basis of two laws, logarithmic and exponential [28; 29]. The actual velocity basically conforms to these laws [30; 31]. The main vertical velocity distribution laws are shown in Equation (3):  
\[\left\{\begin{array}{ll}\frac{u_{max}-u}{u_{f}}=\frac{1}{k}\ln\frac{H}{y}&( 3-1)\\ \frac{u}{u_{f}}=c\left(\frac{yu_{f}}{v}\right)^{m}&(3-2)\\ u=u_{max}\left(\frac{H}{y}\right)^{a}&(3-3)\end{array}\right., \tag{3}\]  
where \(u_{f}\) is the friction velocity; \(k\) is von [PERSON]'s Constant, \(c\) is constant; \(v\) is Kinematic viscosity coefficient; \(m\) is exponential, generally 0.12-0.2; \(u_{max}\) is the vertical maximum velocity; and \(a\) is exponential, generally 0.07-0.012. The values of constants \(m\) and a increase with the measurement position closer to the downstream of the river [32; 33]. Insert Equation (3) into Equation (2):  
\[\left\{\begin{array}{ll}q(y)=Q\frac{\left(u_{max}-u_{f}\frac{1}{k}\ln\frac{H} {y}\right)A_{y}}{\sum_{j=0}^{H}\left[\left(u_{max}-u_{f}\frac{1}{k}\ln\frac{H} {y_{j}}\right)A_{y_{j}}\right]}&(4-1)\\ q(y)=Q\frac{u_{f}(yu_{f})^{m}A_{y}}{\sum_{j=0}^{H}\left(u_{f}(y_{i}y_{i})^{m} A_{y}\right)}&(4-2)\\ q(y)=Q\frac{y^{H}A_{y}}{\sum_{j=0}^{H}\left(y_{j}^{H}A_{y_{j}}\right)}&(4-3) \end{array}\right. \tag{4}\]  
where \(u_{f}\) is related to water depth, so \(u_{f}\) cannot be eliminated by extracting the common factor in Equation (4-1). Equations (4-1) and (4-2) contain \(u_{f}\) and \(u_{max}\). As these two parameters are not easy to measure, it means the equations are not suitable for the simulation of the vertical flow of the reservoir. Although Equation (3-3) contains \(u_{max}\), \(u_{max}\) is equal on a vertical line, so it can be eliminated by extracting the common factor in (4-3). Even though Equation (4-3) cannot calculate the flow velocity at \(y\), it can determine the inflow per unit of the height within the reservoir through the total flow, cross-sectional area, and \(y\).  
\(A_{y}\) is calculated from the river slope coefficient \(\theta\):\(A_{y}(y)=2\left(\sum_{j=0}^{y}\frac{1}{\tan\theta_{j}}-\frac{1}{2\tan\theta_{y}} \right)dy\). After inserting it into Equation (4-3), the inflow simulation model of each height is as follows:  
\[q(y)=\frac{{y_{i}}^{m}\left(\sum_{j=0}^{i}\frac{1}{\tan\theta_{j}}-\frac{1}{2 \tan\theta_{j}}\right)}{\sum_{l=0}^{H}y_{i}^{m}\left(\sum_{j=0}^{i}\frac{1}{ \tan\theta_{j}}-\frac{1}{2\tan\theta_{yi}}\right)}Q, \tag{5}\]  
Equation (5) makes up for the disadvantage that \(u_{f}\) and \(u_{max}\) are not easy to determine when using the traditional velocity distribution laws to calculate the flow rate. It reduces the amount of data input and is more conducive to simulate the inflow of the reservoir in design phase.