A Convolutional Neural Network for Steady-State Flow Approximation Trained on a Small Sample Size
Abstract
:1. Introduction
1.1. Building the Wind Environment
1.2. Development Combined with Machine Learning
1.3. Objectives and Structure
2. Methodology
2.1. Data Collection
2.1.1. Set Generation Rules
2.1.2. Latin Hypercube Sampling
2.1.3. CFD Simulation
2.1.4. Spatial Representation Method
2.1.5. Dataset
2.2. Model Construction and Training
2.3. Post-Processing of Data
3. Result and Analysis
3.1. Performance on Training and Validation Set
3.2. Performance on the Testing Set
3.3. Program Packaging
4. Discussion and Limitation
4.1. Diversity of Scenarios, Accuracy, and Sample Size
- (1)
- Neural network models can be effectively trained with small-scale data. Each wind farm corresponds to tens of thousands of data points, resulting in a significant increase in the amount of data. Furthermore, non-uniform sampling was carried out according to the research area of interest, which skewed resources toward areas of high importance, allowing more complete use of data and computational resources. However, these practices also present risks as the data may be homogeneous, causing overfitting of the neural network models. In this study, the model exhibited some overfitting, but it was not severe overall. Taking the best-performing model on the testing set, which is the Vgg-CFD-19 model under the scalar distance function (SDF) representation, as an example, it had an R2 score of 0.9776 and an RMSE of 0.7966 m/s on the training dataset, and a slight decrease was observed on the validation set with an R2 score of 0.7717 and an RMSE of 2.7167 m/s. To mitigate these effects in future work, a possible solution is increasing the training set size.
- (2)
- The calculation of the proxy model can be unconstrained with the intrinsic size of the input and output of the neural network model. In previous studies, due to the relationship between fields established with the model, the neural network model determined the size and dimension of the fields through a predefined definition and the scene setting in the model calculation needed to follow this size, which could not be changed. For example, Mokhtar et al. [9] used the pix2pix model with an input size of 1024 × 1024; Guo et al. [2] used input and output sizes of 256 × 128. In this study, the neural network models relied only on the environments surrounding the measurement points, enabling the models to accept an arbitrary number from areas of any size or shape, providing more versatility in the applicability of the model.
4.2. Network Architecture and Geometric Representation
- (1)
- The SDF representation models were generally superior to the BNR representation models. For both representation methods, the performance of each training model on the corresponding training, testing, and validation datasets was clearly stratified, with SDF representation consistently outperforming BNR representation. The reason may be that compared with the BNR representation method, the SDF representation method has global information, which can reflect the distance and shape of the nearest obstacles in the entire space to a certain extent in any spatial slice. This method of increasing the density of model input information may become a direction for further research in the future.
- (2)
- The depth of convolutional neural networks is positively correlated with their prediction accuracy. In terms of the performance of the four models on the dataset, as the depth of the model increased, the predictive performance of the model gradually improved, consistent with the research on deep learning literature [37]. However, this trend was not stable. For example, in the BNR representation method, the performance of Vgg-CFD-16 was inferior to that of Vgg-CFD-13. This may be due to the randomness of the model training process, which may result in decreased accuracy of the deeper network. However, negative effects such as gradient explosion caused by the increase in the depth of the neural network cannot offset the positive effects it brings. Therefore, in future research, ResNet or hyperparameter optimization methods can be used for model optimization.
4.3. URBAN NEURAL Platform
4.4. Limitation and Future Work
- (1)
- The relative error in predicting weak-wind-speed regions is large. In urban wind environment issues, we are more concerned about the wind environment changes in the pedestrian layer near the ground, where wind speeds are usually low. In Figure 15, we can see that although the absolute error generated in this area is small, the error percentage is relatively large. This will make it difficult to guide the optimization of the design in the near-surface region with the help of the predicted data. This situation also appeared in other previous studies. For example, in the study by Tanaka, the area with relative errors greater than 50% was also concentrated in the building wake area [22]. This may be related to the loss function defined in the model. In this paper, the mean squared error is used as the loss function, because of which, the model tends to reduce the absolute value of the error. In future work, we can try to reduce the impact of this factor by increasing the weight of wind speed errors near the ground.
- (2)
- There is a lack of quantitative measurement relationships between scenario diversity, accuracy, and the required size of the training data. According to the no-free-lunch theorem, it is difficult to obtain a model that is optimal in all three aspects. As the amount of data increases, the accuracy and applicability of the obtained model will further increase. To achieve a balance between applicability, economy, and accuracy, we need to understand the quantitative relationship between these three factors to guide the construction of future neural-network-based models for assessing building environmental performance as a substitute.
5. Conclusions
- (1)
- We developed a deep convolutional neural network alternative model that achieves high prediction accuracy for steady-state flow fields using small-scale data. Compared with previous studies, this model achieved a better balance of applicability, affordability, and precision.
- (2)
- The signed distance function data representation outperformed the Boolean network representation.
- (3)
- Vgg-CFD-19 showed better performance, and the accuracy of the network was positively correlated with the number of convolutional neural network layers.
- (4)
- In the future, with further research, URBAN NEURAL will gradually become a more versatile urban performance analysis platform.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shao, X.; Liu, Z.; Zhang, S.; Zhao, Z.; Hu, C. PIGNN-CFD: A physics-informed graph neural network for rapid predicting urban wind field defined on unstructured mesh. Build. Environ. 2023, 232, 110056. [Google Scholar] [CrossRef]
- Guo, X.; Li, W.; Iorio, F. Convolutional Neural Networks for Steady Flow Approximation. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 481–490. [Google Scholar] [CrossRef]
- Zaghloul, M. Machine-Learning Aided Architectural Design-Synthesize Fast CFD by Machine-Learning. Ph.D. Thesis, ETH Zurich, Zurich, Switzerland, 2017. [Google Scholar] [CrossRef]
- Xu, X.; Gao, Z.; Zhang, M.; Hammond, D.S.; Chapman, L.; Thornes, J.E. A review of simplified numerical approaches for fast urban airflow simulation. Build. Environ. 2023, 234, 110200. [Google Scholar] [CrossRef]
- Stam, J. Real-Time Fluid Dynamics for Games. In Proceedings of the Game Developer Conference, San Jose, CA, USA, 4–8 March 2003. [Google Scholar]
- Zuo, W.; Chen, Q. Fast and informative flow simulations in a building by using fast fluid dynamics model on graphics processing unit. Build. Environ. 2010, 45, 747–757. [Google Scholar] [CrossRef]
- Hang, J.; Li, Y. Wind Conditions in Idealized Building Clusters: Macroscopic Simulations Using a Porous Turbulence Model. Bound. Layer Meteorol. 2010, 136, 129–159. [Google Scholar] [CrossRef]
- Mao, Y.-F.; Li, Z.; He, Y.-L.; Tao, W.-Q. Numerical investigation of dust sedimentation effects on wall adsorption of indoor SVOC by the immersed boundary-lattice Boltzmann method. Build. Environ. 2020, 180, 106974. [Google Scholar] [CrossRef]
- Mokhtar, S.; Sojka, A.; Davila, C.C. Conditional generative adversarial networks for pedestrian wind flow approximation. In Proceedings of the 11th Annual Symposium on Simulation for Architecture and Urban Design, Online, 25–27 May 2020; pp. 1–8. [Google Scholar]
- Calzolari, G.; Liu, W. Deep learning to replace, improve, or aid CFD analysis in built environment applications: A review. Build. Environ. 2021, 206, 108315. [Google Scholar] [CrossRef]
- Brunton, S.L.; Noack, B.R.; Koumoutsakos, P. Machine Learning for Fluid Mechanics. Annu. Rev. Fluid Mech. 2020, 52, 477–508. [Google Scholar] [CrossRef]
- Gan, V.J.L.; Wang, B.; Chan, C.M.; Weerasuriya, A.U.; Cheng, J.C.P. Physics-based, data-driven approach for predicting natural ventilation of residential high-rise buildings. Build. Simul. 2022, 15, 129–148. [Google Scholar] [CrossRef]
- Zhou, Q.; Ooka, R. Influence of data preprocessing on neural network performance for reproducing CFD simulations of non-isothermal indoor airflow distribution. Energy Build. 2021, 230, 110525. [Google Scholar] [CrossRef]
- Musil, J.; Knir, J.; Vitsas, A.; Gallou, I. Towards Sustainable Architecture: 3D Convolutional Neural Networks for Computational Fluid Dynamics Simulation and Reverse Designworkflow. arXiv 2019, arXiv:1912.02125. [Google Scholar] [CrossRef]
- Duering, S.; Chronis, A.; Koenig, R. Optimizing Urban Systems: Integrated Optimization of Spatial Configurations. In Proceedings of the 11th Annual Symposium on Simulation for Architecture and Urban Design, Vienna, Austria, 25–27 May 2020; p. 7. [Google Scholar]
- Raissi, M.; Yazdani, A.; Karniadakis, G.E. Hidden fluid mechanics: Learning velocity and pressure fields from flow visualizations. Science 2020, 367, 1026–1030. [Google Scholar] [CrossRef]
- Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations. arXiv 2017, arXiv:1711.10561. [Google Scholar]
- Cai, S.; Mao, Z.; Wang, Z.; Yin, M.; Karniadakis, G.E. Physics-informed neural networks (PINNs) for fluid mechanics: A review. Acta Mech. Sin. 2021, 37, 1727–1738. [Google Scholar] [CrossRef]
- Dai, X.; Liu, J.; Zhang, X.; Chen, W. An artificial neural network model using outdoor environmental parameters and residential building characteristics for predicting the nighttime natural ventilation effect. Build. Environ. 2019, 159, 106139. [Google Scholar] [CrossRef]
- Zhou, Q.; Ooka, R. Comparison of different deep neural network architectures for isothermal indoor airflow prediction. Build. Simul. 2020, 13, 1409–1423. [Google Scholar] [CrossRef]
- Tanaka, H.; Matsuoka, Y.; Kawakami, T.; Azegami, Y.; Yamamoto, M.; Ohtake, K.; Sone, T. Optimization calculations and machine learning aimedat reduction of wind forces acting on tall buildingsand mitigation of wind environment. Int. J. High Rise Build. 2019, 8, 291–302. [Google Scholar] [CrossRef]
- Huang, C.; Zhang, G.; Yao, J.; Wang, X.; Calautit, J.K.; Zhao, C.; An, N.; Peng, X. Accelerated environmental performance-driven urban design with generative adversarial network. Build. Environ. 2022, 224, 109575. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015; pp. 1–14. [Google Scholar]
- Wei, X. Visual Analysis of Fine-Grained Images Based on Deep Learning. Ph.D. Thesis, Nanjing University, Nanjing, China, 2018. [Google Scholar]
- Bhatnagar, S.; Afshar, Y.; Pan, S.; Duraisamy, K.; Kaushik, S. Prediction of aerodynamic flow fields using convolutional neural networks. Comput. Mech. 2019, 64, 525–545. [Google Scholar] [CrossRef]
- Zhong, G. Convolutional Neural Network Model to Predict Outdoor Comfort UTCI Microclimate Map. Atmosphere 2022, 13, 1860. [Google Scholar] [CrossRef]
- Singh, M.M.; Singaravel, S.; Geyer, P. Machine learning for early stage building energy prediction: Increment and enrichment. Appl. Energy 2021, 304, 117787. [Google Scholar] [CrossRef]
- Deutsch, J.L.; Deutsch, C.V. Latin hypercube sampling with multidimensional uniformity. J. Stat. Plan. Inference 2012, 142, 763–772. [Google Scholar] [CrossRef]
- Shen, L.; Han, Y. Comparative Analysis of Machine Learning Models Optimized by Bayesian Algorithm for Indoor Daylight Distribution Prediction. In Proceedings of the Planning Post Carbon Cities: 35th PLEA Conference on Passive and Low Energy Architecture, A Coruña, Spain, 1–3 September 2020; Universidade da Coruña: Coruña, Spain, 2020. [Google Scholar]
- Meroney, R.; Ohba, R.; Leitl, B.; Kondo, H.; Grawe, D.; Tominaga, Y. Review of CFD Guidelines for Dispersion Modeling. Fluids 2016, 1, 14. [Google Scholar] [CrossRef]
- Yoshie, R.; Mochida, A.; Tominaga, Y.; Kataoka, H.; Harimoto, K.; Nozu, T.; Shirasawa, T. Cooperative project for CFD prediction of pedestrian wind environment in the Architectural Institute of Japan. J. Wind Eng. Ind. Aerodyn. 2007, 95, 1551–1578. [Google Scholar] [CrossRef]
- Hammond, D.S.; Chapman, L.; Thornes, J.E. Roughness length estimation along road transects using airborne LIDAR data. Meteorol. Appl. 2012, 19, 420–426. [Google Scholar] [CrossRef]
- Wieringa, J. New revision of Davenport roughness classification. In Proceedings of the 3EACWE, Eindhoven, The Netherlands, 2–6 July 2001; pp. 285–292. [Google Scholar]
- Umetani, N.; Bickel, B. Learning three-dimensional flow for interactive aerodynamic design. ACM Trans. Graph. 2018, 37, 1–10. [Google Scholar] [CrossRef]
- Kingma, D.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar] [CrossRef]
- Ng, W.; Minasny, B.; Mendes, W.d.S.; Demattê, J.A.M. The influence of training sample size on the accuracy of deep learning models for the prediction of soil properties with near-infrared spectroscopy data. Soil 2020, 6, 565–578. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef]
Type of Method | Reference | Diversity of Applicable Scenarios | Accuracy of Prediction Problems (on Test Dataset) | Sample Size |
---|---|---|---|---|
Artificial neural network | [19] | investigating the relationship between CO2 concentration and environmental parameters | 79.3% | 2760 |
[12] | investigating the relationship between plan shapes, surface pressure distribution, and the air change per hour. | MAE = 21.3% MAPE = 43.1% | 600 | |
[13,20] | investigating the relationship between inlet vent speed and distribution of velocities within a specific room | R2 = 0.97 | Sampling from 5 cases | |
Convolutional neural network | [14] | investigating the distribution of wind speeds within a specific wind field | no quantitative expression | 3325 |
[21] | no quantitative expression | 8800 | ||
[2] | Relative error = 1.76% | 100,000 | ||
Conditional generative adversarial networks | [10] | MAE = 0.3 m/s (initial wind speed = 6 m/s) | 15,000 | |
[22] | R2 = 0.70 | 9290 (data augment from 1858 cases) | ||
Physics-informed neural networks | [17] | the multi-physics with initial and boundary conditions known | no quantitative expression | 6000 |
Building A | Building B | Street Valley | |||
---|---|---|---|---|---|
Height | Width | Height | Width | Width | |
Range (m) | [9,80] | [6,30] | [9,80] | [6,30] | [7,45] |
Building A (m) | Building B (m) | Street Valley (m) | |||
---|---|---|---|---|---|
No. | Height | Width | Height | Width | Width |
Range | [9,80] | [6,30] | [9,80] | [6,30] | [7,45] |
1 | 66 | 15 | 31 | 23 | 12 |
2 | 39 | 9 | 44 | 13 | 33 |
3 | 31 | 28 | 56 | 9 | 36 |
4 | 48 | 24 | 28 | 24 | 14 |
5 | 25 | 23 | 39 | 6 | 17 |
6 | 52 | 6 | 75 | 15 | 36 |
7 | 10 | 21 | 63 | 19 | 30 |
8 | 74 | 20 | 68 | 10 | 18 |
9 | 23 | 17 | 59 | 27 | 44 |
10 | 42 | 18 | 72 | 12 | 29 |
11 | 51 | 27 | 14 | 29 | 32 |
12 | 44 | 22 | 22 | 28 | 9 |
13 | 65 | 12 | 43 | 14 | 12 |
14 | 75 | 29 | 19 | 18 | 20 |
15 | 32 | 10 | 60 | 11 | 28 |
16 | 29 | 9 | 46 | 9 | 16 |
17 | 36 | 19 | 52 | 23 | 21 |
18 | 69 | 7 | 15 | 26 | 39 |
19 | 12 | 25 | 77 | 17 | 43 |
20 | 60 | 14 | 50 | 19 | 38 |
21 | 61 | 12 | 35 | 8 | 40 |
22 | 15 | 13 | 11 | 22 | 24 |
23 | 79 | 29 | 33 | 27 | 27 |
24 | 19 | 16 | 71 | 21 | 8 |
25 | 56 | 25 | 25 | 16 | 23 |
Vgg-CFD-11 | Vgg-CFD-13 | Vgg-CFD-16 | Vgg-CFD-19 |
---|---|---|---|
11 Weight Layers | 13 Weight Layers | 16 Weight Layers | 19 Weight Layers |
Input matrix = (241,241) | |||
Conv3-64 | Conv3-64 Conv3-64 | Conv3-64 Conv3-64 | Conv3-64 Conv3-64 |
Maxpool, kernel_size = 3, stride = 3 | |||
Conv3-128 | Conv3-128 Conv3-128 | Conv3-128 Conv3-128 | Conv3-128 Conv3-128 |
Maxpool, kernel_size = 3, stride = 3 | |||
Conv3-256 Conv3-256 | Conv3-256 Conv3-256 | Conv3-256 Conv3-256 Conv3-256 | Conv3-256 Conv3-256 Conv3-256 Conv3-256 |
Maxpool, kernel_size = 3, stride = 3 | |||
Conv3-512 Conv3-512 | Conv3-512 Conv3-512 | Conv3-512 Conv3-512 Conv3-512 | Conv3-512 Conv3-512 Conv3-512 Conv3-512 |
Maxpool, kernel_size = 3, stride = 3 | |||
Conv3-512 Conv3-512 | Conv3-512 Conv3-512 | Conv3-512 Conv3-512 Conv3-512 | Conv3-512 Conv3-512 Conv3-512 Conv3-512 |
Maxpool, kernel_size = 3, stride = 3 | |||
Fully connected layer = (512, 4096) | |||
Fully connected layer = (4096, 4096) | |||
Fully connected layer = (4096, 2) | |||
Output matrix = (2) |
Vgg-CFD-11 | Vgg-CFD-13 | Vgg-CFD-16 | Vgg-CFD-19 | |||
---|---|---|---|---|---|---|
BRN | Train | RMSE | 2.0138 | 1.2269 | 1.2066 | 1.2472 |
R2 | 0.8591 | 0.9473 | 0.9489 | 0.9460 | ||
Validation | RMSE | 1.9765 | 1.2349 | 1.2543 | 1.1765 | |
R2 | 0.8636 | 0.9469 | 0.9456 | 0.9508 | ||
SDF | Train | RMSE | 0.9037 | 0.8517 | 0.8300 | 0.8391 |
R2 | 0.9716 | 0.9747 | 0.9761 | 0.9755 | ||
Validation | RMSE | 0.8708 | 0.8579 | 0.8374 | 0.7966 | |
R2 | 0.9731 | 0.9742 | 0.9752 | 0.9776 |
Building A | Building B | Street Valley | |||
---|---|---|---|---|---|
Height | Width | Height | Width | Width | |
Parameters (m) | 20 | 20 | 9 | 12 | 15 |
Vgg-CFD-11 | Vgg-CFD-13 | Vgg-CFD-16 | Vgg-CFD-19 | ||
---|---|---|---|---|---|
BRN | RMSE | 3.1242 | 3.6620 | 3.3057 | 3.5397 |
R2 score | 0.6980 | 0.5851 | 0.6619 | 0.6123 | |
SDF | RMSE | 3.2054 | 3.4129 | 2.2345 | 2.7167 |
R2 score | 0.6821 | 0.6396 | 0.8455 | 0.7717 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhong, G.; Xu, X.; Feng, J.; Yuan, L. A Convolutional Neural Network for Steady-State Flow Approximation Trained on a Small Sample Size. Atmosphere 2023, 14, 1462. https://doi.org/10.3390/atmos14091462
Zhong G, Xu X, Feng J, Yuan L. A Convolutional Neural Network for Steady-State Flow Approximation Trained on a Small Sample Size. Atmosphere. 2023; 14(9):1462. https://doi.org/10.3390/atmos14091462
Chicago/Turabian StyleZhong, Guodong, Xuesong Xu, Jintao Feng, and Lei Yuan. 2023. "A Convolutional Neural Network for Steady-State Flow Approximation Trained on a Small Sample Size" Atmosphere 14, no. 9: 1462. https://doi.org/10.3390/atmos14091462
APA StyleZhong, G., Xu, X., Feng, J., & Yuan, L. (2023). A Convolutional Neural Network for Steady-State Flow Approximation Trained on a Small Sample Size. Atmosphere, 14(9), 1462. https://doi.org/10.3390/atmos14091462