UNSTRUCTURED MESH SIZE CONTROL METHOD BASED ON ARTIFICIAL NEURAL NETWORK
-
摘要: 网格自动化生成和自适应是制约计算流体力学发展的瓶颈问题之一, 网格生成质量、效率、灵活性、自动化程度和鲁棒性是非结构网格生成的关键问题. 在非结构网格生成中, 网格空间尺度分布控制至关重要, 直接影响网格生成质量、效率和求解精度. 采用传统的背景网格法进行空间尺度分布控制需要在背景网格上求解微分方程得到背景网格上的尺度分布, 再将网格尺度从背景网格插值到真实空间点, 过程十分繁琐且耗时. 本文从效率和自动化角度提出两种网格尺度控制方法, 首先发展了基于径向基函数(RBF)插值的网格尺度控制方法, 通过贪婪算法实现边界参考点序列的精简, 提高了RBF插值的效率. 同时, 还采用人工神经网络进行网格尺度控制, 初步引入相对壁面距离和相对网格尺度作为神经网络输入输出参数, 建立人工神经网络训练模型, 采用商业软件生成二维圆柱和二维翼型非结构三角形网格作为训练样本, 通过训练和学习建立起相对壁面距离和相对网格尺度的神经网络关系. 进一步实现了二维圆柱、不同的二维翼型的尺度预测, RBF方法和神经网络方法的效率与传统背景网格法相比提高了5~10倍, 有助于提高网格生成的效率. 最后, 将方法推广应用于各向异性混合网格尺度预测, 得到的网格质量满足要求.Abstract: Automatic mesh generation and adaptation are bottleneck problems restricting computational fluid dynamics (CFD). Grid quality, efficiency, flexibility, automation level, and robustness are several key issues in grid generation. Mesh size control is significant in unstructured mesh generation which directly impacts the mesh quality, efficiency, and solution accuracy. Controlling mesh size by the background grid method requires mesh size defined on a background mesh by solving differential equations and interpolating from background mesh to specific location, which is very tedious and time-consuming in traditional unstructured grid generation. In this paper, two novel mesh size control methods are proposed in terms of efficiency and automation level. Firstly, radial basis function (RBF) interpolation was developed to control mesh size. In order to improve the efficiency of RBF interpolation, the greedy algorithm was applied to reduce the list of reference nodes. Meanwhile, an artificial neural network (ANN) is used to control the mesh size, relative wall distance, and relative mesh size are introduced as input and output parameters for the ANN. Training models are established and samples (2D cylinder and airfoil grids) are generated by commercial software. The relationship is established between wall distance and mesh size by machine learning. Several meshes are generated with the aforementioned three methods, the results demonstrate that the RBF method and the ANN method are 5-10 times more efficient than the background mesh method, which contributes to efficiency improvement of the grid generation process. Finally, the ANN method is extended to mesh size control of anisotropic hybrid grids, which also obtained meshes of good quality.
-
表 1 RBF方法参考点的数目及插值耗时
Table 1. Number of reference nodes and time consumption on interpolation
Case No. of Ref. nodes Time consumption/s original selected original selected cylinder 145 12 1.07 0.16 NACA0012 306 142 2.17 1.44 30P30N 340 162 2.39 1.81 表 2 ANN输入输出模型
Table 2. Parameter model for artificial neural network
Model input ${\left( {\dfrac{{wdist}}{{{L_{{\rm{r\_d}}}}}}} \right)^{1/6}}$ output $\left\{ {\begin{array}{*{20}{c} } { { {\left[ {\dfrac{ {S{ {p} } } }{ { { {\left( { {L_{ {\rm{r\_w} } } } } \right)}^{1/6} } } } + \dfrac{ {S{ {p} } } }{ { {L_{ {\rm{r\_f} } } } } } } \right]}^{1/6} }, \; wdist \leqslant 0.25{L_{ {\rm{r\_d} } } } } \\ { { {\left[{\dfrac{ {S{ {p} } } }{ { {L_{ {\rm{r\_f} } } } } } } \right]}^{1/6} }\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;{\rm{ } }, \; wdist > 0.25{L_{ {\rm{r\_d} } } } } \end{array} } \right.$ 表 3 3种方法控制网格尺度耗时对比
Table 3. Efficiency comparison of the three methods
Case Background mesh method (s/cell) RBF method (s/cell) ANN method (s/cell) cylinder 0.60/2889 0.16/2427 0.44/2875 NACA0012 5.31/4680 1.44/4840 0.82/4390 30P30N 14.77/6121 1.81/6050 1.03/4752 -
[1] 张来平, 常兴华, 赵钟等. 计算流体力学网格生成技术. 北京: 科学出版社, 2017(Zhang Laiping, Chang Xinghua, Zhao Zhong, et al. Mesh Generation Techniques in Computational Fluid Dynamics. Beijing: Science Press, 2017 (in Chinese)) [2] Slotnick J, Khodadoust A, Alonso J, et al. CFD vision 2030 study: a path to revolutionary computational aero-sciences. 2014, NASA/CR–2014-218178 [3] Chawner JR, Taylor NJ. Progress in geometry modeling and mesh generation toward the CFD vision 2030//AIAA Aviation Forum, June, 2019, Texas [4] Baker TJ. Mesh generation: art or science. Progress in Aerospace Science, 2005, 41(1): 29-63 doi: 10.1016/j.paerosci.2005.02.002 [5] Pirzadeh S. Advanced unstructured grid generation for complex aerodynamic applications. AIAA Journal, 2010, 48(5): 904-915 doi: 10.2514/1.41355 [6] Pirzadeh S. Structured background grids for generation of unstructured grids by advancing front method. AIAA Journal, 1993, 31(2): 257-265 doi: 10.2514/3.11662 [7] Chen JJ, Liu ZW, Zheng Y, et al. Automatic sizing functions for 3D unstructured mesh generation. Procedia Engineering, 2017, 203: 245-257 doi: 10.1016/j.proeng.2017.09.804 [8] Chen JJ, Xiao ZF, Zheng Y, et al. Automatic sizing function for unstructured mesh generation. International Journal for Numerical Methods in Engineering, 2017, 109: 577-608 doi: 10.1002/nme.5298 [9] Persson P. Mesh size functions for implicit geometries and PDE-based gradient limiting. Engineering with Computers, 2006, 22: 95-109 doi: 10.1007/s00366-006-0014-1 [10] Deister F, Tremel U, Hassan O, et al. Fully automatic and fast mesh size specification for unstructured mesh generation. Engineering with Computers, 2004, 20: 237-248 doi: 10.1007/s00366-004-0291-5 [11] Quadros WR, Shimada K, Owen SJ. Skeleton-based computational method for the generation of a 3D finite element mesh sizing function. Engineering with Computers, 2004, 20: 249-264 doi: 10.1007/s00366-004-0292-4 [12] Quadros WR, Vyas V, Brewer M, et al. A computational framework for automating generation of sizing function in assembly meshing via disconnected skeletons. Engineering with Computers, 2010, 26: 231-247 doi: 10.1007/s00366-009-0164-z [13] Ruiz-Girones E, Roca X, Sarrate J. Preserving isotropic element size functions in adaptivity, quadrilateral and hexahedral mesh generation. Advances in Engineering Software, 2013, 65: 168-181 doi: 10.1016/j.advengsoft.2013.06.012 [14] Rendall T, Allen CB. Efficient mesh motion using radial basis functions with data reduction algorithms. Journal of Computational Physics, 2009, 228(17): 6231-6249 doi: 10.1016/j.jcp.2009.05.013 [15] Rendall T, Allen CB. Reduced surface point selection options for efficient mesh deformation using radial basis functions. Journal of Computational Physics, 2010, 229(8): 2810-2820 doi: 10.1016/j.jcp.2009.12.006 [16] 张扬, 张来平, 赫新等. 基于自适应混合网格的脱体涡模拟. 航空学报, 2016, 37(12): 3605-3614 (Zhang Yang, Zhang Laiping, He Xin, et al. Detached eddy simulation based on adaptive hybrid grids. Acta Aeronautica et Astronautica Sinica, 2016, 37(12): 3605-3614 (in Chinese) [17] Mavriplis DJ. Unstructured grid techniques. Annual Review of Fluid Mechanics, 1997, 29: 473-514 doi: 10.1146/annurev.fluid.29.1.473 [18] Chawner JR, Michal TR, Slotnick JP, et al. Summary of the 1st AIAA geometry and mesh generation workshop (GMGW-1) and future plans//2018 AIAA Aerospace Sci-ences Meeting. 2018: 0128 [19] 张伟伟, 寇家庆, 刘溢浪. 智能赋能流体力学展望. 航空学报, 2021, 42(4): 26-71 (Zhang Weiwei, Kou Jiaqing, Liu Yilang. Prospect of artificial intelligence empowered fluid mechanics. Acta Aeronautica et Astronautica Sinica, 2021, 42(4): 26-71 (in Chinese) [20] 谢晨月, 袁泽龙, 王建春等. 基于人工神经网络的湍流大涡模拟方法. 力学学报, 2021, 53(1): 1-16 (Xie Chenyue, Yuan Zelong, Wang Jianchun, et al. Artificial neural network-based subgrid-scale models for large-eddy simulation of turbulence. Chinese Journal of Theoretical and Applied Mechanics, 2021, 53(1): 1-16 (in Chinese) [21] 张珍, 叶舒然, 岳杰顺等. 基于组合神经网络的雷诺平均湍流模型多次修正方法. 力学学报, 2021, 53(6): 1532-1542 (Zhang Zhen, Ye Shuran, Yue Jieshun, et al. A combined neural network and multiple modification strategy for Reynolds-averaged Navier-Stokes turbulence modeling. Chinese Journal of Theoretical and Applied Mechanics, 2021, 53(6): 1532-1542 (in Chinese) doi: 10.6052/0459-1879-21-073 [22] 王年华, 鲁鹏, 常兴华等. 基于机器学习的非结构网格阵面推进生成技术初探. 力学学报, 2021, 53(3): 740-751 (Wang Nianhua, Lu Peng, Chang Xinghua, et al. Preliminary investigation on unstructured mesh generation technique based on advancing front method and machine learning methods. Chinese Journal of Theoretical and Applied Mechanics, 2021, 53(3): 740-751 (in Chinese) doi: 10.6052/0459-1879-20-402 [23] Zhang LP, Chang XH, Duan XP, et al. Applications of dynamic hybrid grid method for three-dimensional moving/deforming boundary problems. Computers & Fluids, 2012, 62: 45-63 [24] Zhao Z, Chang XH, He L, et al. An efficient large-scale mesh deformation method based on MPI/OpenMP hybrid parallel radial basis function interpolation. Chinese Journal of Aeronautics, 2020, 33(5): 1392-1404 doi: 10.1016/j.cja.2019.12.025 [25] Sekar V, Jiang QH, Shu C, et al. Fast flow field prediction over airfoils using deep learning approach. Physics of Fluids, 2019, 31(5): 057103 doi: 10.1063/1.5094943 [26] Zhu LY, Zhang WW, Kou JQ, et al. Machine learning methods for turbulence modeling in subsonic flows around airfoils. Physics of Fluids, 2019, 31(1): 015105 doi: 10.1063/1.5061693 [27] Fidkowski KJ, Chen GD. Metric-based, goal-oriented mesh adaptation using machine learning. Journal of Computational Physics, 2021, 426: 109957 doi: 10.1016/j.jcp.2020.109957 [28] Chedid R, Najjar N. Automatic finite-element mesh generation using artificial neural networks—Part I: Prediction of mesh density. IEEE Transactions on Magnetics, 1996, 32(5): 5173-5178 doi: 10.1109/20.538619 [29] Hagan MT, Menhaj M. Training feed-forward networks with the Marquardt algorithm. IEEE Transactions on Neural Networks, 1994, 5(6): 989-993 doi: 10.1109/72.329697 [30] Lu P, Wang NH, Chang XH, et al. An automatic isotropic/anisotropic hybrid grid generation technique for viscous flow simulations based on an artificial neural network. Chinese Journal of Aeronautics, 2021.05, in press [31] Pirzadeh S. Unstructured viscous grid generation by the advancing layers method. AIAA Journal, 1994, 32(8): 1735-1737 doi: 10.2514/3.12167 [32] 甘洋科, 刘剑飞. 黏性边界层网格自动生成. 力学学报, 2017, 49(5): 1029-1041 (Gan Yangke, Liu Jianfei. Automatic viscous boundary layer mesh generation. Chinese Journal of Theoretical and Applied Mechanics, 2017, 49(5): 1029-1041 (in Chinese) doi: 10.6052/0459-1879-17-154 -