We present a new framework for modeling wells in reservoir simulators. The approach is based on an expanded well model in which the well region is expanded geometrically to include portions of the reservoir. The method proceeds by first defining an underlying fine-scale model, in which the well and any key near-well features such as hydraulic fractures are fully resolved using an unstructured grid. The geometry, grid structure and transmissibilities in the coarse-model well region, and the linkage between the well and reservoir regions, are determined from the solution of a single-phase steady-state pressure equation on the underlying fine grid. The method is compatible with any reservoir simulator that allows general (unstructured) cell-to-cell connections. The expanded well modeling procedure is applied to challenging three-dimensional problems involving production in a low-permeability reservoir, tight-gas production via a hydraulically-fractured well, and production in a gas-condensate reservoir. In the first two cases, where it is possible to simulate the fine-grid unstructured model, results using the expanded well model closely match the reference solutions, while standard approaches lead to significant error. In the gas-condensate example, which involves a nine-component compositional model, the reference solution is not computed, but the solution using the expanded well model is shown to be physically reasonable while standard coarse-grid solutions show large variation under grid refinement.