The object of this study is the underground gas storage facilities of Ukraine, with the aim of developing a systematic mathematical model to describe the flow of gas in complex underground gas storage systems. This model will enable to development of effective methods and algorithms for calculating the modes of operation of such systems. The proposed systematic mathematical model connects the model of the structure of underground gas storage in terms of graph theory with variable topology and various mathematical models of gas flows in facilities with concentrated and distributed parameters. We set the models of gas flows in UGS facilities in the form of analytical relations, differential equations and algorithmically described systems. In order to automate the process of model construction (for given boundary conditions), we developed a system of formation, analysis and synthesis of graphs for underground gas storage facilities, as well as a set of information and mathematical models of facilities.