Abstract. In this paper we investigate the expected lifetime and information capacity, defined as the maximum amount of data (bits) transferred before the first sensor node death due to energy depletion, of a data-gathering wireless sensor network. We develop a fluid-flow based computational framework that extends the existing approach, which requires precise knowledge of the layout/deployment of the network, i.e., exact sensor positions. Our method, on the other hand, views a specific network deployment as a particular instance (sample path) from an underlying distribution of sensor node layouts and sensor data rates. To compute the expected information capacity under this distribution-based viewpoint, we model parameters such as the node density, the energy density and the sensed data rate as continuous spatial functions. This continuous-space flow model is then discretized into grids and solved using a linear programming approach. Numerical studies show that this model produces very accurate results, compared to averaging over results from random instances of deployment, with significantly less computation. Moreover, we develop a robust version of the linear program, which generates robust solutions that apply not just to a specific deployment, but also to topologies that are appropriately perturbed versions. This is especially important for a network designer studying the fundamental lifetime limit of a family of network layouts, since the lifetime of specific network deployment instances may differ appreciably. As an example of this model's use, we determine the optimal node distribution for a linear network and study the properties of optimal routing that maximizes the lifetime of the network.