Abstract Proper evaluation of the dynamics of the transmission system is the key element in the design and operation of natural gas pipelines. Basic equations describing the transient flow of gas in pipes are derived from the Euler equations. The orthogonal collocation technique is employed as the mathematical method for the numerical solution of the governing equations. This method leads to a set of non-linear ordinary differential equations which can be solved by the Runge–Kutta–Fehlberg method. The performance of the proposed method is tested using two practical examples. The predicted results clearly demonstrate that the proposed method can successfully simulate the isothermal and non-isothermal unsteady flow in gas transmission systems.