SummaryThe formulation of a black-oil or compositional fully coupled surface and subsurface simulator is described. It is based on replacing the well model in a conventional reservoir simulator with a generalized network model of the wells and facilities. This allows for representation of complex wellbore geometry and downhole equipment. The method avoids the inefficiencies and/or inaccuracies of other coupled models, in which wells and facilities are treated as separate domains or in which the global system is not solved simultaneously. Example cases demonstrate the performance of the model for cases with simple and segmented wellbores (with and without facilities).