Flownets are useful tools for the visualization of groundwater flow fields. Using orthogonal flownets as grids for transport modeling is an effective way to control numerical dispersion, especially transverse to the direction of flow. Therefore tools for automatic generation of flownets may be seen both as postprocessors for groundwater flow simulations and preprocessors for contaminant transport models. Existing methods to generate streamline-oriented grids suffer from drawbacks such as the inability to include sources in the interior of the grid. In this paper, we introduce a new method for the generation of streamline-oriented grids which handles wells in the grid interior, and which produces orthogonal grids for anisotropic systems. Streamlines are generated from an accurate velocity field obtained from the solution of the mixed-hybrid finite element method for flow, while pseudopotentials, which are orthogonal to the streamlines, are obtained by a standard finite element solution of the pseudopotential equation. A comprehensive methodology for the generation of orthogonal grids, including the location of stagnation points and dividing streamlines, is introduced. The effectiveness of the method is illustrated by means of examples. A related paper presents a compatible formulation of the solution for reactive transport, while a second related paper gives a detailed quantitative assessment of the various forms of modelled mixing and their effect on the accuracy of simulations of the biodegradation of groundwater contaminants.