The increasing interdependence between electric power and natural-gas systems requires integrated simulation tools applicable to the coupled system. Therefore, this study proposes steady-state and transient simulation tools for electricity-gas integrated energy systems (IESs) by using convex optimisation. Steady-state IES simulation is designed for long-term planning studies while transient IES simulation, which includes line-pack storage, is designed for real-time operational research. The proposed convex steady-state gas flow model introduces binary variables to represent gas flow directions, and employs the second-order cone (SOC) to relax non-convex pipeline gas flow equations. As a result, steady-state gas flow analysis is formulated as a mixed integer SOC programming problem. The proposed transient gas flow model employs the implicit finite difference method to transform partial differential equations into algebraic difference equations. Moreover, the short-term gas flow directions are specified and SOC relaxations are used. Simulation results on an integrated IEEE 24-node system and Belgian 20-node gas system verify the effectiveness of the proposed SOC models. The impacts of wind power forecast errors on multi-period gas network operations are also investigated.