A unified model is presented for describing both single-phase and two-phase flow in complex gas pipeline networks. The form of the model is such that it can easily admit any energy-loss model that is expressible in a particular non-linear functional form of energy loss-flow rate relationship. Four popular single-phase gas pipeline design equations, namely, Darcy-Weishbach, Panhandle-A, Panhandle-B and Weymouth equations and a two-phase flow equation (Beggs-Brill) are used to test the development. All these tests are successful. A viable algorithm for solving the resulting equations is presented. Four field cases are analyzed using this model. Results show that Weymouth equation underpredicts pressure distribution for single-phase gas flow but predicts comparable pressure distribution to Beggs-Brill's two-phase model for two-phase flow in the network. The results further demonstrate significant effect of the presence of condensate on network performance.