This paper introduces an analytical model analyzing the effect of groundwater flow on heat transfer in an infinite conductive-convective porous domain representing shallow geothermal systems with arbitrarily configured cylindrical heat sources. The model is formulated based on the moving source concept and solved based on the spectral analysis method and the superposition principle. Compared to models based on the Green’s function and the Laplace transform, the proposed spectral model has a simpler formulation, computationally efficient and easy to implement in computer codes. It can handle random time-dependent thermal loads and any arbitrarily configured grid distribution. The verification and numerical examples demonstrate the computational capabilities of the model, and show how the groundwater flow can play an important role in the thermal interaction between heat sources. They also feature how to make use of the direction of groundwater flow to avoid undesirable thermal interaction between neighboring installations, rapid depletion of energy sources and unfair mining of geothermal energy.