Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 5, No. 2, 2023 225 A Method of Urban Wind Field Visualization Based on Deep Learning Yizhong Jin*, Ya Cheng Department of Computer Science, North China Electric Power University, Hebei, China Abstract: In order to solve the problems of incomplete feature extraction, visual results that disrupt the continuity of the flow field, and unstable clustering resulting in poor streamline representation during urban wind field visualization, a three- dimensional streamline visualization method based on deep learning was proposed. This method consists of two parts: one is streamline feature learning, and the other is clustering method. The Euclidean distance represented by the streamline is used as the similarity between the streamlines for clustering, and the clustering results obtained are weighted and combined before being divided. The method was tested on a real urban wind field dataset and qualitatively compared with existing methods. The results show that this method can better balance the relationship between feature extraction and streamline distribution compared to existing methods. Keywords: Urban Wind Field Visualization, Deep learning, Representation learning, Clustering. 1. Introduction The visualization technology[1] of three-dimensional flow field is of great significance for researchers to intuitively and deeply understand fluid phenomena. Through 3D flow visualization technology, it is possible to better understand and analyze complex 3D flow fields generated through numerical simulation, thereby improving computational fluid dynamics models, and has wide application value in many industries. In the field of aerospace, three-dimensional flow visualization technology is widely used in the design and improvement of aircraft. Using this technology, researchers can observe the aerodynamic distribution on the wing surface, the vortex structure of the wake, and optimize the design to improve the performance of the aircraft. In the field of marine engineering, three-dimensional flow visualization technology can help engineers monitor and predict the fluid movement of underwater oil and gas pipelines and deepwater platforms in real time, reducing environmental pollution and safety accidents in the development of marine resources. In the field of meteorology, three-dimensional flow visualization technology can observe phenomena such as vortices and atmospheric pressure systems at different scales in the atmosphere, so it is widely used in meteorological forecasting, climate research, and other aspects. In the field of biomedicine, three-dimensional flow visualization technology can help medical personnel observe physiological processes such as blood flow and lung ventilation, and provide reference for disease diagnosis and treatment. Therefore, three-dimensional flow field visualization technology has a broad application prospect and will provide more accurate and efficient support for scientific research and practical applications in various fields. 2. Related Work Streamline based methods are widely used to visually depict complex three-dimensional flow fields because streamline can visually display the flow characteristics of the flow field through its own geometric shape. The goal of streamline visualization technology is to display the overall flow pattern distribution of the flow field through a set of representative streamline lines, attracting attention to key areas. However, the flow behavior of three-dimensional flow fields is extremely complex. Selecting too many streamline lines can lead to dense and chaotic visualization of redundant information, and selecting too few streamline lines can miss important flow characteristics. Therefore, the task of selecting representative streamline sets is extremely challenging. Streamline visualization technology is mainly divided into two categories: seed point placement and streamline selection. The seed point placement method[2], which iteratively improves the seeding position in the flow field and generates streamlines through integration, is widely used in two- dimensional flow fields, such as the uniform placement method of streamlines based on Euclidean distance [3], and the method of establishing seed point templates based on information entropy [4, 5]. However, the seed point placement method is not ideal when faced with complex three-dimensional flow fields. With the enhancement of GPU computing capabilities, a large number of streamline can be quickly generated, and streamline selection methods have gradually become the focus of research on streamline visualization. 3. Methodology 3.1. Overall Description of the Method This paper constructs the feature representation of streamline learning in Pixel Networks, processes the feature representation using DBSCAN, and visualizes the streamlines corresponding to the centers of the DBSCAN clusters as the results of wind field visualization. 3.2. Pixel Networks As shown in Figure 1, the pixel AE network includes an encoder level and a decoder level for learning the fine grained features of the streamline and reconstructing the projected streamline using the learned features, respectively. The encoder consists of a 2D Conv layer, a BN layer, an FC layer, and a ReLU layer. The Conv layer has a step size of 3, and takes streamline pixels with a resolution of as input, mapping 226 them nonlinearly to a 256 dimensional vector that is used as a streamline feature descriptor. The decoder takes the S-shaped layer before the FC layer, 2D Conv layer, BN layer, ReLU layer, and output layer as input and reconstructs streamline pixels at resolution. Figure 1. Structure of pixel-network 3.3. DBSCAN clustering algorithm DBSCAN clustering algorithm is a density-based clustering algorithm that identifies and distinguishes different clusters by finding core points and assigning other points to the nearest core point. Compared to traditional methods, DBSCAN algorithm has advantages such as not requiring the specification of the number of clusters in advance, being able to effectively handle noise and outliers, and being applicable to clusters of various shapes and sizes. However, the DBSCAN clustering algorithm requires the pre-specification of parameters such as neighborhood radius and density threshold, and is sensitive to the density and dimensionality of the dataset. The input parameters for the DBSCAN clustering algorithm are the radius ε and the minimum number of points MinPts, and the main steps are as follows: (1) randomly select an unvisited data point p. (2) establish a neighborhood centered on p with a radius of ε, which is a core neighborhood with p as the center. (3) if the number of data points in the neighborhood is less than MinPts, mark p as a noise point. (4) if the number of data points in the neighborhood is not less than MinPts, mark p as the core of a new cluster and mark it as visited. (5) search for all unvisited data points in the neighborhood centered on p with a radius of ε, and add these points to the current cluster. (6) repeat step 5 until all points in the current cluster have been visited. (7) repeat steps 1-6 until all points have been visited. 4. Results and Discussion The wind field data used in this article are wind currents in the real urban area of Tsuen Wan, Hong Kong. The main approach is to obtain the topological structure of the Tsuen Wan city from GIS data, simulate the wind field data on unstructured grids using the PimpleFoam solver of OpenFoam, regularize and resample the simulation results, and convert them into a regular grid volume with 200, 180, and 40 grid points. In this scenario, an initial streamline is generated using a uniform seeding method combined with a fourth order Runge Kutta integral. This streamline is used as the initial dataset for clustering. A total of 1137 streamline lines are sown in the entire urban environmental wind field, and 120 representative streamline lines are selected. In urban environments, under the influence of different building configurations, changes in airflow patterns around buildings lead to changes in wind speeds before and after buildings. When the wind is blocked by a building, the venturi effect occurs on the leeward side of the building. The Venturi effect drives the return flow to generate a spiral updraft, which is also the most important flow region in the urban environmental wind field. The experimental results of different methods are shown in Figure 2. a. our method b. flownet c. Geometric similarity d. MCP Figure 2. Visualization results of urban wind field using different methods 227 Figure 2 depicts the visual results of various methods applied in urban wind farms. The black circular markings represent the airflow behind the building, which constitutes a key area of concern in the urban wind field. Our proposed method outperforms other techniques in presenting a more uniform streamline distribution, highlighting more unique areas, and providing a more detailed description of the airflow behind buildings. In contrast, Han's method failed to capture some of the airflow characteristics behind the building due to a large amount of information loss during the data down sampling process. Shi-1's method produces an uneven streamline distribution and ignores the overall description of the flow properties of urban wind farms. Although the Shi-2 method captures the overall flow of urban wind farms, it fails to focus on key areas of interest. Therefore, our approach can strike a balance between identifying key areas and depicting the overall flow characteristics of large-scale urban wind farms, which may be beneficial for future urban architectural planning. 5. Conclusion This paper proposes a three-dimensional streamline visualization method based on deep learning, which can select representative streamline lines from a large number of streamline lines, displaying the characteristics of the flow field while ensuring continuity. The qualitative and quantitative comparison between this method and other methods on data sets with different characteristics has been conducted, and the results show that the method in this paper has certain value in flow field exploration. In addition, applying this method to a real urban wind field environment has also achieved good visual effects, indicating that this method has certain practical significance and reference value in studying urban environmental visualization. References [1] Sane S, Bujack R, Garth C, et al. A survey of seed placement and streamline selection techniques; proceedings of the Computer Graphics Forum, F, 2020 [C]. Wiley Online Library. [2] Tao J, Ma J, Wang C, et al. A unified approach to streamline selection and viewpoint selection for 3D flow visualization [J]. IEEE Transactions on Visualization and Computer Graphics, 2013, 19(3): 393-406. [3] Yu H, Wang C, Shene C-K, et al. Hierarchical streamline bundles [J]. IEEE Transactions on Visualization and Computer Graphics, 2012, 18(8): 1353-67. [4] McLoughlin T, Jones M W, Laramee R S, et al. Similarity measures for enhancing interactive streamline seeding [J]. IEEE Transactions on Visualization and Computer Graphics, 2012, 19(8): 1342-53. [5] Han J, Tao J, Wang C. FlowNet: A deep learning framework for clustering and selection of streamlines and stream surfaces [J]. IEEE transactions on visualization and computer graphics, 2020, 26(4): 1732-44.