The model is based on the Kusuda equations, which describes the temperature on the ground as a function of the depth z and time.
To determine the temperature it is necessary to have information about the weather: mean annual temperature (T_mean) and annual temperature amplitude (T_amp) as well as information about the ground thermal diffusivity alpha. Furthermore the equation is tunned with a time shift parameter t_min which correponds to the day at which the ambient temperature has its lower value and a time shift parameter t_0 which has to be set to the day at which the simulation starts.
In case the temperature of the soil goes below zero, care must be taken to make sure that the water in the supply and return lines will not freeze. This can be omitted by, e.g., implementing a bypass, increase insulation of pipe, redimensioning the pipe (to increase mass flows), etc.
Earth temperature and thermal diffusivity at selected stations in the United States; Kusuda, T. and Achenbach P. R., 1965