基于强化学习的动态自适应网格智能加密方法
REINFORCEMENT LEARNING-BASED DYNAMIC ADAPTIVE MESH INTELLIGENT REFINEMENT METHOD
-
摘要: 自适应网格加密(Adaptive mesh refinement, AMR)是一种在计算过程中对空间网格进行动态调整, 从而在保证精度的同时, 加快计算流体力学(Computational fluid dynamics, CFD)仿真效率的关键技术. 然而, 传统AMR的关键参数(如加密强度、加密频率等)主要依赖人工经验设定, 在复杂流动条件下难以实现精度与效率的最佳平衡. 因此, 本文提出一种基于强化学习的动态自适应网格智能加密方法, 实现了在大规模CFD求解器上的高效并行仿真. 该方法以提高精度和降低计算开销为目标来设计奖励函数, 通过近端策略优化算法更新策略网络, 将传统启发式调参转化为数据驱动的智能决策过程. 为验证该方法的效果, 将该框架嵌入高性能求解器m-AIA, 在圆柱绕流、NACA0012翼型定常绕流(零度攻角)与非定常绕流(非零度攻角)模拟等标准算例中进行了测试. 结果表明: 相较于传统AMR, 在维持相近精度的前提下, 计算耗时平均降低37.21%, 网格数量平均减少29.82%; 在流场存在强梯度区域时, 该方法能够保持必要的局部细化, 并使网格层级随流场演化平滑过渡, 从而有助于降低不必要的网格重构开销并改善计算过程的稳定性. 模型泛化测试表明, 对于一定范围内的雷诺数与攻角, 该方法无需重新训练即可保持较好的自适应效果, 表现出较好的鲁棒性与工程应用潜力. 因此, 强化学习与AMR的结合能够进一步提高自适应网格方法的计算效率, 并为发展智能化CFD自适应模拟方法提供参考.Abstract: Adaptive mesh refinement (AMR) is a key technique that dynamically adjusts spatial grid resolution during computation, thereby improving the efficiency of computational fluid dynamics (CFD) simulations while maintaining numerical accuracy. However, the key parameters of traditional AMR methods, such as refinement intensity and refinement frequency, are mainly determined based on empirical knowledge, making it difficult to achieve an optimal balance between accuracy and efficiency under complex flow conditions. Therefore, this study proposes a reinforcement-learning-based intelligent dynamic AMR method to enable efficient parallel simulation in large-scale CFD solvers. The proposed method designs the reward function with the objectives of improving accuracy and reducing computational cost, and updates the policy network using the proximal policy optimization algorithm, thereby transforming traditional heuristic parameter tuning into a data-driven intelligent decision-making process. Specifically, the reinforcement learning agent dynamically adjusts the sensor weights that determine the refinement and coarsening thresholds according to the evolving flow field, replacing fixed empirical parameters with state-dependent decisions. To validate the effectiveness of the proposed method, the framework is embedded into the high-performance solver m-AIA and tested on standard benchmark cases, including flow past a circular cylinder and steady and unsteady flows around a NACA0012 airfoil. The results show that, compared with traditional AMR, the proposed method reduces the average computational time by 37.21% and the average number of grid cells by 29.82% while maintaining comparable accuracy. In regions with strong flow gradients, the method maintains necessary local refinement and enables smooth transitions of grid levels as the flow evolves, which helps reduce unnecessary grid reconstruction overhead and improve the stability of the computational process. Generalization tests further demonstrate that, within a certain range of Reynolds numbers and angles of attack, the proposed method can maintain good adaptive performance without retraining, showing favorable robustness and engineering application potential. Therefore, the integration of reinforcement learning and AMR can further improve the computational efficiency of adaptive mesh methods and provide a reference for the development of intelligent CFD adaptive simulation approaches.
下载: