We present a two-dimensional Glacier Drainage System model (GlaDS) that couples distributed and channelized subglacial water flow. Distributed flow occurs through linked cavities that are represented as a continuous water sheet of variable thickness. Channelized flow occurs through Röthlisberger channels that can form on any of the edges of a prescribed, unstructured network of potential channels. Water storage is accounted for in an englacial aquifer and in moulins, which also act as point sources of water to the subglacial system. Solutions are presented for a synthetic topography designed to mimic an ice sheet margin. For low discharge, all the flow is accommodated in the sheet, whereas for sufficiently high discharge, the model exhibits a channelization instability which leads to the formation of a self-organized channel system. The random orientation of the network edges allows the channel system geometry to be relatively unbiased, in contrast to previous structured grid-based models. Under steady conditions, the model supports the classical view of the subglacial drainage system, with low pressure regions forming around the channels. Under diurnally varying input, water flows in and out of the channels, and a rather complex spatiotemporal pattern of water pressures is predicted. We explore the effects of parameter variations on the channel system topology and mean effective pressure. The model is then applied to a mountain glacier and forced with meltwater calculated by a temperature index model. The results are broadly consistent with our current understanding of the glacier drainage system and demonstrate the applicability of the model to real settings.