This paper concerns the computation of near-well flow in numerical reservoir simulation with unstructured grids. In particular, it uses spherical trigonometry to derive analytical expressions for the flow towards a well modeled as either a number of point sources or a constant-flux line source. The expression for the point source representation is based on projections of the grid block boundaries on spheres with unit radius around the sources. The expression for the line source is based on projection on a prolate spheroid. The computation of the surface area is done through transformation to prolate spheroidal coordinates and subsequent projection on a sphere at infinity. The point source expression for a single source is exact for grid block boundaries with straight edges; the line source expression is an approximation. Both representations are fully volume conserving, such that the sum of the fluxes through the grid block boundaries surrounding a source adds up exactly to the total source flow rate. Both representations can be used to accurately model complicated wells in the form of segments. The point source representation is simpler to implement and not necessarily less accurate than the line source representation.