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 system performances, 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 heat pump COP/EER.

Thermal feedback depends on 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. Particles are tracked from the injection well in order to calculate their travel times, and the extracted/injected water temperature time series are derived.

Groundwater Flow Direction
Particle tracking from the reinjection well, performed with the code TRS

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

The files provided in the .zip archive are 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, bug reports, suggestions etc., please contact

Download the 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