This study presents a Python-based automated numerical modeling framework for hydraulic analysis of high pressure gas pipelines at automotive natural gas refueling compressor stations. The framework converts a refined physico-mathematical pressure-loss model into an object-oriented computational engine that evaluates gas compressibility, compressor compression ratio, and local resistance caused by sudden pipeline expansion and contraction. The software accepts operating and geometric parameters, normalizes the input data, computes local resistance coefficients, and evaluates pressure loss and outlet-flow conditions. Experimental station data were used to assess the numerical model; the mean deviation between calculated and measured pressures was 3.83%. The computational workflow is organized as a modular service layer designed for integration with field telemetry, programmable logic controllers (PLCs), and SCADA-based cyber-physical station infrastructure. In addition, a gas-recovery configuration is considered to reduce venting during compressor shutdown. The proposed approach combines hydraulic modeling with automated software implementation and provides a computational basis for pressure-loss estimation, operating-regime analysis, and digital modernization of high-pressure gas refueling stations.
Keywords
Python Numerical SimulationAutomated Pipeline ControlSCADA IntegrationCyber-Physical SystemsHigh-Pressure Gas NetworksHydraulic Optimization
References
Q. Ren, J. Wang, and P. Fu, “Coupling prediction model and influencing factors analysis of injection and production gas flow rate and wellhead pressure for compressed air energy storage in salt cavern,” Journal of Energy Storage, vol. 100, p. 113587, 2024, [Online]. Available: https://doi.org/10.1016/j.est.2024.113587.
J. Gong, Q. Kang, H. Wu, X. Li, B. Shi, and S. Song, “Application and prospects of multi-phase pipeline simulation technology in empowering the intelligent oil and gas fields,” Journal of Pipeline Science and Engineering, vol. 3, no. 3, p. 100127, 2023, [Online]. Available: https://doi.org/10.1016/j.jpse.2023.100127.
E. Tsoutsanis and N. Meskin, “Dynamic performance simulation and control of gas turbines used for hybrid gas/wind energy applications,” Applied Thermal Engineering, vol. 147, pp. 122-142, 2019, [Online]. Available: https://doi.org/10.1016/j.applthermaleng.2018.09.031.
B. Zhang, B. Xu, N. Xu, R. Qiu, Q. Liao, H. Zhang, and Y. Liang, “Economic viability of liquefied pipeline construction: Influence of cascaded utilization of cold energy and distance-volume factors,” Journal of Pipeline Science and Engineering, p. 100336, 2025, [Online]. Available: https://doi.org/10.1016/j.jpse.2025.100336.
A. K. Soares, N. Martins, and D. I. C. Covas, “Investigation of transient vaporous cavitation: Experimental and numerical analyses,” in Computing and Control for the Water Industry (CCWI2015): Sharing the Best Practice in Water Management, vol. 119, pp. 235-242, 2015, [Online]. Available: https://doi.org/10.1016/j.proeng.2015.08.881.
M. Prieto, J. A. Aristizabal, D. Pradilla, and J. M. Gómez, “Simultaneous numerical simulation of the hydraulic fractures geometry in multi-stage fracturing for horizontal shale gas wells,” Journal of Natural Gas Science and Engineering, vol. 102, p. 104567, 2022, [Online]. Available: https://doi.org/10.1016/j.jngse.2022.104567.
Y. Gu, X. Chen, B. Jia, C. Zhang, L. Zhu, Y. Liu, Y. Xiang, and Q. Zhao, “Ultimate internal pressure and gas pipelines with three typical dents,” International Journal of Pressure Vessels and Piping, vol. 211, p. 105290, 2024, [Online]. Available: https://doi.org/10.1016/j.ijpvp.2024.105290.
T.-N. Yin, H.-Y. Yao, D.-M. Deng, J.-B. Zhang, and J. Gong, “Energy equation derivation of the multiphase flow pipeline,” Journal of Petrochemical Universities, vol. 24, no. 5, pp. 73-76, 2011, [Online]. Available: https://doi.org/10.3696/j.issn.1006-396X.2011.05.019.
R. R. Farukhshina, V. I. Muratova, and V. A. Savateeva, “Gas losses reduction in technological operations at gas distribution stations,” in Lecture Notes in Mechanical Engineering, pp. 378-387, 2026, [Online]. Available: https://doi.org/10.1007/978-3-032-04273-6_35.
A. A. Evstifeev, M. A. Zaeva, A. S. Kotelnikov, and M. S. Sergeev, “Mathematical model for production equipment volume estimation during refueling of vehicles on compressed natural gas CNGRS,” International Journal of Applied Engineering Research, vol. 11, no. 10, pp. 7007-7011, 2016.
Z. Kh. Fayziev, “Pressure losses in Venturi pipes, their rational forms and coefficients of local resistance,” in AIP Conference Proceedings, vol. 2762, p. 020012, 2022, [Online]. Available: https://doi.org/10.1063/5.0128505.