NEURAL NETWORK METHOD FOR CONSTRUCTIVE VARIATIONAL PROBLEMS BY GENERALIZED MULTIPLIER METHOD
-
摘要: 边界条件的施加是求解偏微分方程定解问题的重要步骤。神经网络方法求解偏微分方程定解问题时,将原问题转化为对应的构造变分问题后,损失函数是包含控制方程与边界条件的泛函。采用经典罚函数法及其改进方法施加边界条件时,罚因子的取值直接影响计算精度和求解效率;直接采用Lagrange乘子法施加边界条件,计算结果可能偏离原问题最优解。为破解此局限性,使用广义乘子法施加边界条件。基于神经网络获得原问题的预测解,再使用广义乘子法构建神经网络的损失函数并计算损失值,利用梯度下降法进行参数寻优,判断损失值是否满足要求;不满足则更新罚因子与乘子后再进行求解直至损失满足要求。数值算例的计算结果表明:与采用经典罚函数法、L1精确罚函数法和Lagrange乘子法施加边界条件构造的神经网络相比,该文提出的方法具有更好的数值精度和更高的求解效率,且求解过程更加稳定。Abstract: The imposition of boundary conditions is an essential step in solving the definite problem of partial differential equations. When the definite problem of partial differential equations is resolved by neural network, the original problem should be transformed to its corresponding constructive variational problem, and the loss function is a functional consisting of the governing equations and the boundary conditions. If the boundary conditions are imposed by the classical penalty function method and its improvements, the value of the penalty factor will affect the solution accuracy and the computational efficiency. If the boundary conditions are directly imposed by the Lagrange multiplier method, the computational results may deviate from the optimal solution of the original problem. To overcome these limitations, the generalized multiplier method is employed in the imposition of boundary conditions. The predicted solution of the original problem is obtained from the neural network. The generalized multiplier method is used to construct the loss function of the neural network and calculate the loss. The gradient descent method is utilized to perform parameter optimization. Afterwards, the loss function is calculated. The penalty factor and multiplier are updated, and the resolution is repeated till the loss is acceptable. The results of numerical examples verify that the proposed method has better solution accuracy, higher computational efficiency and more stable solution process than those neural networks in which the boundary conditions are applied by the classical penalty function method, L1 exact penalty function method, and Lagrange multiplier method.
-
表 1 Kirchhoff薄板算例罚因子、乘子更新值
Table 1. The updating of penalty factor and multipliers in Kirchhoff thin plate example
更新
次数罚因子M 乘子 k1 k2 k3 k4 k5 k6 k7 k8 0 1 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1 2 0.750 0.749 0.752 0.749 0.749 0.748 0.747 0.749 2 4 0.679 0.678 0.683 0.678 0.678 0.677 0.676 0.678 3 8 0.649 0.648 0.655 0.650 0.447 0.647 0.646 0.648 4 16 0.627 0.640 0.636 0.638 0.626 0.641 0.626 0.643 5 32 0.622 0.635 0.632 0.627 0.621 0.629 0.620 0.640 表 2 简支梁算例罚因子、乘子更新值
Table 2. The updating of penalty factor and multipliers in simple supported beam example
更新次数 罚因子M 乘子 k1 k2 k3 k4 0 5 1.00 1.00 1.00 1.00 1 5 0.36 0.64 0.97 1.35 2 5 0.14 0.35 0.98 1.47 3 25 0.06 0.16 0.95 1.58 4 125 0.01 0.05 0.96 1.62 -
[1] 姜礼尚, 陈亚浙, 刘西垣, 等. 数学物理方程讲义[M]. 3版. 北京: 高等教育出版社, 2007: 1 − 2.JIANG Lishang, CHEN Yazhe, LIU Xiyuan, et al. Equations of mathematical physics [M]. 3rd ed. Beijing: Higher Education Press, 2007: 1 − 2. (in Chinese) [2] 王昀卓. 求解偏微分方程的神经网络方法[D]. 合肥: 中国科学技术大学, 2021.WANG Yunzhuo. Neural network for solving partial differential equations [D]. Hefei: University of Science and Technology of China, 2021. (in Chinese) [3] 焦李成, 杨淑媛, 刘芳, 等. 神经网络七十年: 回顾与展望[J]. 计算机学报, 2016, 39(8): 1697 − 1717.JIAO Licheng, YANG Shuyuan, LIU Fang, et al. Seventy years beyond neural networks: Retrospect and prospect [J]. Chinese Journal of Computers, 2016, 39(8): 1697 − 1717. (in Chinese) [4] XIE Y L, HE M J, MA T S, et al. Optimal distributed parallel algorithms for deep learning framework TensorFlow [J]. Applied Intelligence, 2022, 52(4): 3880 − 3900. doi: 10.1007/s10489-021-02588-9 [5] DAI H L, PENG X, SHI X H, et al. Reveal training performance mystery between TensorFlow and Pytorch in the single GPU environment [J]. Science China Information Sciences, 2022, 65: 112103. doi: 10.1007/s11432-020-3182-1 [6] 叶继红, 杨振宇. 基于生成式对抗网络的风场生成研究[J]. 工程力学, 2021, 38(10): 1 − 11. doi: 10.6052/j.issn.1000-4750.2020.10.0721YE Jihong, YANG Zhenyu. Research on generation of wind fields based on GAN [J]. Engineering Mechanics, 2021, 38(10): 1 − 11. (in Chinese) doi: 10.6052/j.issn.1000-4750.2020.10.0721 [7] 许泽坤, 陈隽. 非线性结构地震响应的神经网络算法[J]. 工程力学, 2021, 38(9): 133 − 145. doi: 10.6052/j.issn.1000-4750.2020.09.0645XU Zekun, CHEN Jun. Neural network algorithm for nonlinear structural seismic response [J]. Engineering Mechanics, 2021, 38(9): 133 − 145. (in Chinese) doi: 10.6052/j.issn.1000-4750.2020.09.0645 [8] 程诗焱, 韩建平, 于晓辉, 等. 基于BP神经网络的RC框架结构地震易损性曲面分析: 考虑地震动强度和持时的影响[J]. 工程力学, 2021, 38(12): 107 − 117. doi: 10.6052/j.issn.1000-4750.2020.11.0837CHENG Shiyan, HAN Jianping, YU Xiaohui, et al. Seismic fragility surface analysis of RC frame structures based on BP neural networks: Accounting for the effects of ground motion intensity and duration [J]. Engineering Mechanics, 2021, 38(12): 107 − 117. (in Chinese) doi: 10.6052/j.issn.1000-4750.2020.11.0837 [9] 赵林鑫, 江守燕, 杜成斌. 基于SBFEM和机器学习的薄板结构缺陷反演[J]. 工程力学, 2021, 38(6): 36 − 46. doi: 10.6052/j.issn.1000-4750.2020.06.0416ZHAO Linxin, JIANG Shouyan, DU Chengbin. Flaws detection in thin plate structures based on SBFEM and machine learning [J]. Engineering Mechanics, 2021, 38(6): 36 − 46. (in Chinese) doi: 10.6052/j.issn.1000-4750.2020.06.0416 [10] 郑秋怡, 周广东, 刘定坤. 基于长短时记忆神经网络的大跨拱桥温度-位移相关模型建立方法[J]. 工程力学, 2021, 38(4): 68 − 79. doi: 10.6052/j.issn.1000-4750.2020.05.0323ZHENG Qiuyi, ZHOU Guangdong, LIU Dingkun. Method of modeling temperature-displacement correlation for long-span arch bridges based on long short-term memory neural networks [J]. Engineering Mechanics, 2021, 38(4): 68 − 79. (in Chinese) doi: 10.6052/j.issn.1000-4750.2020.05.0323 [11] E W N, YU B. The deep Ritz method: A deep learning-based numerical algorithm for solving variational problems [J]. Communications in Mathematics and Statistics, 2018, 6(1): 1 − 12. doi: 10.1007/s40304-018-0127-z [12] SIRIGNANO J, SPILIOPOULOS K. DGM: A deep learning algorithm for solving partial differential equations [J]. Journal of Computational Physics, 2018, 375: 1339 − 1364. doi: 10.1016/j.jcp.2018.08.029 [13] SAMANIEGO E, ANITESCU C, GOSWAMI S, et al. An energy approach to the solution of partial differential equations in computational mechanics via machine learning: Concepts, implementation and applications [J]. Computer Methods in Applied Mechanics and Engineering, 2020, 362: 112790. doi: 10.1016/j.cma.2019.112790 [14] RAISSI M, PERDIKARIS P, KARNIADAKIS G E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations [J]. Journal of Computational Physics, 2019, 378: 686 − 707. doi: 10.1016/j.jcp.2018.10.045 [15] RAISSI M, YAZDANI A, KARNIADAKIS G E. Hidden fluid mechanics: Learning velocity and pressure fields from flow visualizations [J]. Science, 2020, 367(6481): 1026 − 1030. doi: 10.1126/science.aaw4741 [16] LU L, MENG X H, MAO Z P, et al. DeepXDE: A deep learning library for solving differential equations [J]. SIAM Review, 2021, 63(1): 208 − 228. doi: 10.1137/19M1274067 [17] 郭宏伟, 庄晓莹. 采用两步优化器的深度配点法与深度能量法求解薄板弯曲问题[J]. 固体力学学报, 2021, 42(3): 249 − 266. doi: 10.19636/j.cnki.cjsm42-1250/o3.2021.029GUO Hongwei, ZHUANG Xiaoying. The application of deep collocation method and deep energy method with a two-step optimizer in the bending analysis of Kirchhoff thin plate [J]. Chinese Journal of Solid Mechanics, 2021, 42(3): 249 − 266. (in Chinese) doi: 10.19636/j.cnki.cjsm42-1250/o3.2021.029 [18] 黄钟民, 谢臻, 张易申, 等. 面内变刚度薄板弯曲问题的挠度-弯矩耦合神经网络方法[J]. 力学学报, 2021, 53(9): 2541 − 2553. doi: 10.6052/0459-1879-21-273HUANG Zhongmin, XIE Zhen, ZHANG Yishen, et al. Deflection-bending moment coupling neural network method for the bending problem of thin plates with in-plane stiffness gradient [J]. Chinese Journal of Theoretical and Applied Mechanics, 2021, 53(9): 2541 − 2553. (in Chinese) doi: 10.6052/0459-1879-21-273 [19] 唐明健, 唐和生. 基于物理信息的深度学习求解矩形薄板力学正反问题[J]. 计算力学学报, 2022, 39(1): 120 − 128. doi: 10.7511/jslx20201110003TANG Mingjian, TANG Hesheng. A physics-informed deep learning method for solving forward and inverse mechanics problems of thin rectangular plates [J]. Chinese Journal of Computational Mechanics, 2022, 39(1): 120 − 128. (in Chinese) doi: 10.7511/jslx20201110003 [20] HE J C, LI L, XU J C, et al. ReLU deep neural networks and linear finite elements [J]. Journal of Computational Mathematics, 2020, 38(3): 502 − 527. doi: 10.4208/jcm.1901-m2018-0160 [21] 黄钟民, 陈思亚, 陈卫, 等. 薄板弯曲问题的神经网络方法[J]. 固体力学学报, 2021, 42(6): 697 − 706.HUANG Zhongmin, CHEN Siya, CHEN Wei, et al. Neural network method for thin plate bending problem [J]. Chinese Journal of Solid Mechanics, 2021, 42(6): 697 − 706. (in Chinese) [22] 张光澄. 非线性最优化计算方法[M]. 北京: 高等教育出版社, 2005: 292 − 309.ZHANG Guangcheng. Computational methods for nonlinear optimization [M]. Beijing: Higher Education Press, 2005: 292 − 309. (in Chinese) [23] 徐慧福. 混合约束不可微非线性规划的L1-精确罚函数法[J]. 宁波大学学报, 1994, 7(2): 1 − 9.XU Huifu. L1 exact penalty methods for inequality and equality constrained programming [J]. Journal of Ningbo University, 1994, 7(2): 1 − 9. (in Chinese) [24] 李海滨, 段志信. 约束非线性规划问题的L1精确罚函数神经网络方法[J]. 电子学报, 2009, 37(1): 229 − 234. doi: 10.3321/j.issn:0372-2112.2009.01.043LI Haibin, DUAN Zhixin. An L1 exact penalty function neural network method for constraint nonlinear programming problems [J]. Acta Electronica Sinica, 2009, 37(1): 229 − 234. (in Chinese) doi: 10.3321/j.issn:0372-2112.2009.01.043 [25] 陈珊珊, 楼旭阳, 崔宝同. 参数非线性规划问题的L1精确罚函数神经网络方法分析[J]. 计算机应用与软件, 2014, 31(7): 277 − 279, 315. doi: 10.3969/j.issn.1000-386x.2014.07.071CHEN Shanshan, LOU Xuyang, CUI Baotong. Analysing L1 exact penalty function neural networks method of parametric nonlinear programming problems [J]. Computer Applications and Software, 2014, 31(7): 277 − 279, 315. (in Chinese) doi: 10.3969/j.issn.1000-386x.2014.07.071 [26] 王尚长, 杨格, 吴斌, 等. 基于内点法和拉格朗日乘子法的混合试验冗余作动器控制方法[J]. 振动与冲击, 2021, 40(12): 23 − 30, 37.WANG Shangzhang, YANG Ge, WU Bin, et al. A redundant actuator control method for hybrid simulation based on the interior point and the Lagrange multiplier [J]. Journal of Vibration and Shock, 2021, 40(12): 23 − 30, 37. (in Chinese) [27] 蒋昂波, 王维维. ReLU激活函数优化研究[J]. 传感器与微系统, 2018, 37(2): 50 − 52.JIANG Angbo, WANG Weiwei. Research on optimization of ReLU activation function [J]. Transducer and Microsystem Technologies, 2018, 37(2): 50 − 52. (in Chinese) [28] 徐芝纶. 弹性力学简明教程[M]. 5版. 北京: 高等教育出版社, 2018: 214 − 216.XU Zhilun. Concise course in elasticity [M]. 5th ed. Beijing: Higher Education Press, 2018: 214 − 216. (in Chinese) -