# A Deep Learning-Based Mapping Model for Three-Dimensional Propeller RANS and LES Flow Fields
## 3 Method
### Data Processing for Propeller Flow Field Data  
Since the flow field data of RANS or LES includes the simulation data of the three-dimensional propeller flow field of RANS or LES under the same Reynolds number, each sample has multiple points (about 670,000) and is distributed on the re gion \(\{(x,y,z)|-9\leq x\leq 2.2,-1.5\leq y\leq 1.5,-1.7\leq z\leq 0\}\) with three velocity components \(\left(V\_axial_{p},V\_tangential_{p},V\_radial_{p}\right)\) at each point \(p\). The data should be processed before model construction. The core idea of data processing is to convert the discrete point data obtained by a single flow field RANS or LES simulation into image-formatted data that the deep learning model can handle. The pixel values in the image are essentially the normalized velocity values after voxelization at the corresponding position in the flow field. Firstly, it is necessary to determine the spatial size of the input data. The majority of the simulated sample data for ship propellers are concentrated around the propeller within the coordinate range \(\{(x,y,z)|-9\leq x\leq 2.2,-1.5\leq y\leq 1.5,-1.7\leq z\leq 0\}\), with over 90% of points observed within the coordinate range \(\{(x,y,z)|-0.4\leq x\leq 0.4,-0.4\leq y\leq 0.4,-0.4\leq z\leq 0\}\). Above Figure 1, we have plotted the velocity data images for the three velocity directions of the propeller within the \(\{(x,y,z)|-9\leq x\leq 2.2,-1.5\leq y\leq 1.5,-1.7\leq z\leq 0\}\) range, where the position (0,0,0) corresponds to the water surface above the center of the propeller. The image below Figure 1 shows the velocity data images for the three velocity directions within the \(\{(x,y,z)|-0.4\leq x\leq 0.4,-0.4\leq y\leq 0.4,-0.4\leq z\leq 0\}\) range after the upper image has been cropped. In Figure 2, we showcase a comparison between the original image and the two-dimensional data image obtained after cropping, using the velocity profile at the cross-section where \(x\) = 0.012. Therefore, in order to enhance the precision and accuracy of subsequent processing, we selected points located in the central region of the propeller for cropping and independent processing, as shown in Figures 1 and 2. In the pictures, the colors represent the magnitude of velocity, with darker colors indicating higher speeds. By cropping, a 0.8 \(\times\) 0.8 \(\times\) 0.4 (the unit is meter) sized central propeller image is obtained. This cropping processing can significantly improve the precision of image processing and data generation and facilitate better feature extraction and flow field mapping. Once the spatial size is confirmed, the next step is to perform voxelization on this space, as shown in Figure 3. In doing so, the entire space is divided along each dimension into 646,432 small voxels with a length of 0.0125. Calculations are then performed for the points within each voxel to obtain the velocity information in the central region of that voxel's position. This velocity information is then used for the velocity information at the voxel's position. By setting the value at the position (_x_0, y_0, z_0) in the three-dimensional array to this velocity information and filling the entire array accordingly, we can finally obtain a three-dimensional array representing the velocity information of the flow field. In this work, we utilize a weighted averaging method to compute the velocity at a specified position. The weighted averaging method aims to calculate weights based on the distance of each point to the center and then to use these weights to perform a weighted averaging on the velocity to obtain the velocity at the center point. The specific calculation steps are as follows. First, for each point \((x_{i},y_{i},z_{i})\), its distance \(d_{i}\) to the given center point \((x_{0},y_{0},z_{0})\) is calculated as follows:  
\[d_{i}=\ \sqrt{(-x_{0})^{2}+(y_{i}-y_{0})^{2}+(z_{i}-z_{0})^{2}} \tag{2}\]  
The distance is then converted into weights \(w_{i}\) as follows to ensure that the points closer to the center of the voxel have greater weights.