A Simplified Neural Network Model for Compressible Two-Gas Flows
-
摘要: 实用的虚拟流体方法(practical ghost fluid method, PGFM)利用Riemann问题速度解对可压缩多介质流场界面条件进行建模。基于构造的嵌入物理约束的神经网络模型预测Riemann问题速度解的方式, 给出一种两气体流动的神经网络模型简化方法。首先提出完全气体状态方程下神经网络模型输入特征采样范围从无界域到有界域的转换方法, 改善模型预测不同初始条件下Riemann解的泛化性能。根据该转化方法, 进一步提出一种结构更加简单的神经网络优化方法, 将输入维度从5个减少到3个, 有效提高神经网络的训练效果。将该神经网络代理模型应用于PGFM程序框架, 通过典型的一维与二维两气体流动问题进行数值验证与对比分析。结果表明, 简化的网络模型与已有研究的神经网络模型相比, 能取得精度相近的计算结果。而在神经网络训练效率上, 简化神经网络具有明显优势。同时因为简化神经网络采样维度少, 方便尝试加密采样提高拟合精度, 更具备发展潜力。
-
关键词:
- 可压缩多介质问题 /
- 虚拟流体方法 /
- 两气体Riemann问题 /
- 神经网络
Abstract: The practical ghost fluid method (PGFM) utilizes velocity solutions of Riemann problems to model the interface evolution of compressible multi-material flows. This paper presented a simplified neural network model for two-gas flows by predicting the velocity solution of Riemann problem based on the neural network model embedded with physical constraints. Firstly, a method for converting the sampling range of the neural network model from unbounded domain to bounded domain was proposed, which holds true for the perfect gas equation of state. It can improve the generalization performance of the model under different initial conditions. Based on this transformation method, a simpler neural network structure was further proposed. The training result of the neural network can be effectively improved by reducing the input dimensions from 5 to 3. The neural network model was applied to the PGFM. Numerical validation of the neural network model was carried out through typical one-dimensional and two-dimensional gas flow problems. The results show that the simplified network model can achieve similar computational accuracy compared with existing neural network models. In terms of training efficiency of neural networks, the simplified neural network has obvious advantages. Moreover, because the simplified neural network has fewer sampling dimensions, it is convenient to try denser sampling to improve fitting accuracy and such method has more development potential. -
表 1 各神经网络代理模型
Table 1. Various neural network models
No. relation of p relation of ρ neural network inputs 1 pL<pR ρL<ρR {pL, ρL, Δu} 2 pL<pR ρL≥ρR {pL, ρR, Δu} 3 pL≥pR ρL≥ρR {pR, ρR, Δu} 4 pL≥pR ρL<ρR {pR, ρL, Δu} 表 2 算例2相对误差定量统计表
Table 2. Quantitative results of relative errors in case 2
physical quantity solution 5-10-10-2 3-10-10-2 5-40-40-2 3-40-40-2 pI exact solution 2.612 65 predicted solution 2.696 19 2.630 79 2.602 56 2.613 61 relative error 3.198% 0.694% 0.386% 0.037% uI exact solution -1.883 04 predicted solution -1.822 54 -1.870 15 -1.890 35 -1.882 42 relative error 3.213% 0.685% 0.388% 0.033% ρIL exact solution 1.936 21 predicted solution 1.854 02 1.912 84 1.940 86 1.929 68 relative error 4.245% 1.207% 0.240% 0.337% ρIR exact solution 0.447 01 predicted
solution0.453 51 0.446 26 0.443 87 0.445 01 relative error 1.454% 0.168% 0.702% 0.447% -
[1] 刘铁钢, 许亮. 模拟多介质界面问题的虚拟流体方法综述[J]. 气体物理, 2019, 4(2): 1-16. doi: 10.19527/j.cnki.2096-1642.0746Liu T G, Xu L. A review of ghost fluid methods for multi-medium interface simulation[J]. Physics of Gases, 2019, 4(2): 1-16(in Chinese). doi: 10.19527/j.cnki.2096-1642.0746 [2] Kawakami K, Kita Y, Yamamoto Y. Front-tracking simulation of the wetting behavior of an impinging droplet using a relaxed impermeability condition and a generalized Navier boundary condition[J]. Computers & Fluids, 2023, 251: 105739. [3] Osher S, Sethian J A. Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations[J]. Journal of Computational Physics, 1988, 79(1): 12-49. doi: 10.1016/0021-9991(88)90002-2 [4] Liu T G, Khoo B C, Yeo K S. The simulation of compressible multi-medium flow. I. A new methodology with test applications to 1D gas-gas and gas-water cases[J]. Computers & Fluids, 2001, 30(3): 291-314. [5] Liu T G, Khoo B C, Yeo K S. Ghost fluid method for strong shock impacting on material interface[J]. Journal of Computational Physics, 2003, 190(2): 651-681. doi: 10.1016/S0021-9991(03)00301-2 [6] 许亮, 冯成亮, 刘铁钢. 虚拟流体方法的设计原则[J]. 计算物理, 2016, 33(6): 671-680. doi: 10.3969/j.issn.1001-246X.2016.06.007Xu L, Feng C L, Liu T G. Design principles of ghost fluid method[J]. Chinese Journal of Computational Phy-sics, 2016, 33(6): 671-680(in Chinese). doi: 10.3969/j.issn.1001-246X.2016.06.007 [7] Xu L, Feng C L, Liu T G. Practical techniques in ghost fluid method for compressible multi-medium flows[J]. Communications in Computational Physics, 2016, 20(3): 619-659. doi: 10.4208/cicp.190315.290316a [8] Xu L, Yang W B, Liu T G. An interface treatment for two-material multi-species flows involving thermally perfect gases with chemical reactions[J]. Journal of Computational Physics, 2022, 448: 110707. doi: 10.1016/j.jcp.2021.110707 [9] 刘子岩, 许亮. 嵌入物理约束的可压缩多介质流神经网络模型[J]. 计算物理, 2023, 40(6): 761-769. https://www.cnki.com.cn/Article/CJFDTOTAL-JSWL202306012.htmLiu Z Y, Xu L. Neural network models of compressible multi-medium flows embedded with physical constraints[J]. Chinese Journal of Computational Physics, 2023, 40(6): 761-769(in Chinese). https://www.cnki.com.cn/Article/CJFDTOTAL-JSWL202306012.htm [10] Xu L, Liu T G. Explicit interface treatments for compressible gas-liquid simulations[J]. Computers & Fluids, 2017, 153: 34-48. [11] Ray D, Hesthaven J S. An artificial neural network as a troubled-cell indicator[J]. Journal of Computational Physics, 2018, 367: 166-191. doi: 10.1016/j.jcp.2018.04.029 [12] Feng Y W, Liu T G, Wang K. A characteristic-featured shock wave indicator for conservation laws based on training an artificial neuron[J]. Journal of Scientific Computing, 2020, 83(1): 21. doi: 10.1007/s10915-020-01200-5 [13] Feng Y W, Liu T G. A characteristic-featured shock wave indicator on unstructured grids based on training an artificial neuron[J]. Journal of Computational Physics, 2021, 443: 110446. doi: 10.1016/j.jcp.2021.110446 [14] 丘润荻, 王静竹, 黄仁芳, 等. 改进的物理融合神经网络在瑞利-泰勒不稳定性问题中的应用[J]. 力学学报, 2022, 54(8): 2224-2234. https://www.cnki.com.cn/Article/CJFDTOTAL-LXXB202208013.htmQiu R D, Wang J Z, Huang R F, et al. The application of modified physics-informed neural networks in Rayleigh-Taylor instability[J]. Chinese Journal of Theoretical and Applied Mechanics, 2022, 54(8): 2224-2234(in Chinese). https://www.cnki.com.cn/Article/CJFDTOTAL-LXXB202208013.htm [15] Magiera J, Ray D, Hesthaven J S, et al. Constraint-aware neural networks for Riemann problems[J]. Journal of Computational Physics, 2020, 409: 109345. doi: 10.1016/j.jcp.2020.109345 [16] Wang J C, Hickey J P. FluxNet: a physics-informed learning-based Riemann solver for transcritical flows with non-ideal thermodynamics[J]. Computer Methods in Applied Mechanics and Engineering, 2023, 411: 116070. doi: 10.1016/j.cma.2023.116070 [17] Ruggeri M, Roy I, Mueterthies M J, et al. Neural-network-based Riemann solver for real fluids and high explosives; application to computational fluid dynamics[J]. Physics of Fluids, 2022, 34(11): 116121. doi: 10.1063/5.0123466 [18] Xu L, Liu Z Y, Feng Y W, et al. Physics-constrained neural networks as multi-material Riemann solvers for compressible two-gas simulations[J]. Journal of Computational Science, 2024, 78: 102261. doi: 10.1016/j.jocs.2024.102261 [19] Toro E F. Riemann solvers and numerical methods for fluid dynamics: a practical introduction[M]. 3rd ed. Berlin, Heidelberg: Springer, 2009: 151-162. [20] Coralic V, Colonius T. Finite-volume WENO scheme for viscous compressible multicomponent flows[J]. Journal of Computational Physics, 2014, 274: 95-121. doi: 10.1016/j.jcp.2014.06.003