TRS (Thermal Recycling Simulator) is a software tool for the simulation of thermal recycling in open-loop Ground Water Heat Pumps (GWHPs).

Thermal recycling is a phenomenon occurring in GWHPs as, after a certain time, thermally altered water from the injection well reaches the extraction well. This leads to a progressive impairment of the performances of the system, due to the increasing (if the plant operates in cooling mode) or decreasing (if in heating mode) trend of the extracted water temperature, which influences the COP/EER of the heat pump.

Thermal feedback depends on both aquifer hydraulic parameters (hydraulic conductivity, saturated thickness, effective porosity, hydraulic gradient, groundwater flow direction), on thermal parameters (thermal capacities of the solid matrix and of groundwater) and on the plant setup (well distance, flow rate).

The MATLAB function TRS provided on this page represents the implementation of Strack’s potential flow theory (1988), applied to a well doublet in presence of a uniform subsurface flow. Particle are tracked from the injection well in order to calculate their travel times, and the extracted/injected water temperature time series are derived.

Particle tracking from the reinjection well, performed with the code TRS

Further explanation of the mathematical theory, of the implementation of the code and of the use of the code in the design of a GWHP are reported in Casasso and Sethi (2014).

The files provided in the .zip archive is the TRS.p file (encrypted .m file) and the interface for entering the input parameters (TRS_input.m), which have to be saved into the working folder in order to be used. Short instructions are also included (TRS_instructions.txt). For any information, warning about bugs, for suggestions etc., please contact

Download last release


  • O.D.L. Strack, Groundwater Mechanics, Prentice-Hall, Englewood Cliffs, NJ (USA), 1988.
  • Casasso A., Sethi R., Analytical and numerical study of the thermal feedback in Groundwater Heat Pumps (GWHP), Renewable Energy 77 (2015) 86-93 pdf