In the present study, a confined aquifer was considered to meet the cooling and heating energy needs of a residential complex located in Tehran, Iran. Three different alternatives were analyzed in this aquifer thermal energy storage (ATES), including: using ATES for cooling alone, for cooling and heating, as a heat pump, and for heating alone, employing flat plate solar energy collectors. A numerical simulation, based on the finite difference method, was carried out for velocity and temperature distributions as well as the heat transfer in the aquifer. The thermal energy recovery factor and the annual coefficient of performance of the system were determined under various schemes of operation, revealing that the combination of the ATES with the heat pump, to meet both cooling and heating needs of the complex, is the best. The study was repeated for different aquifer properties.