天然气工业2024,Vol.44Issue(2):156-165,10.DOI:10.3787/j.issn.1000-0976.2024.02.015
掺氢天然气管网数值仿真轻量化算法
Lightweight algorithm for numerical simulation of hydrogen blending natural gas pipeline network
摘要
Abstract
At present,optimization of the numerical simulation algorithm for pipeline networks mainly focuses on solving the algebraic equation set.The scheme to improve the calculation efficiency of numerical simulation algorithm for pipeline network flow lacks the optimization of loop relationship and equation of state(EOS).To this end,this paper analyzes the time consumption situations of each module in the optimization scheme.It shows that the time consuming module in the simulation program is used to solve loop relationship and EOS.Finally,based on the disadvantages of computer built-in function and the characteristics of SIMD(Single Instruction Multiple Data)model in CPU,a lightweight algorithm for loop relationship and EOS is developed,and its efficiency is verified.And the following research results are obtained.First,the time consumption of the loop relationship and EOS model is caused by the direction call of the power operation,exponentiation operation,logarithm operation and division operation of built-in function.Second,the efficiency of power operation is much lower than that of other operations,so nearly all power operations of the model are eliminated through transformation.Third,SIMD order is applied in exponentiation operation and logarithm operation,which realizes the simultaneous calculation of the exponentiations and logarithms of multiple data in the single-core CPU.Eventually,all divisions are transformed into multiplications through mathematical transformation.Fourth,the lightweight algorithm achieves a remarkable speed-up effect,and its overall speed-up ratio is 18 and even over 70 in the EOS solving module.In conclusion,this lightweight algorithm improves the calculation speed without influencing the calculation accuracy,which provides important theoretical value and technological support for the online simulation of hydrogen blending natural gas pipeline networks and the construction of intelligent pipeline networks.关键词
天然气管网/数值仿真/计算效率/状态方程/加速比/掺氢Key words
Natural gas pipeline network/Numerical simulation/Calculation efficiency/Equation of state(EOS)/Speed-up ratio/Hydrogen blending引用本文复制引用
石国赟,宇波..掺氢天然气管网数值仿真轻量化算法[J].天然气工业,2024,44(2):156-165,10.基金项目
国家重点研发计划项目"氢能技术"重点专项"中低压纯氢与掺氢燃气管输工艺与掺氢设备研发"(编号:2021YFB4001602). (编号:2021YFB4001602)