A new numerical model to generate transfer functions for borehole thermal energy storage system. The model includes the effect of groundwater temperature variations, ground surface temperature variations and groundwater flow. A spectral approach is proposed to generate the outlet fluid temperature of the system. The spectral approach is fast and efficient.