impure functiontemperatureResponseMatrix

Evaluate the thermal response factors of a zoned thermal storage

Extends from Modelica.Icons.Function (Icon for functions).

Information

This function evaluates the array of segment-to-segment thermal response factors using the analytical finite line source method of and Prieto and Cimmino (2021). The finite line source solution gives the relation between heat extraction at a segment of an equivalent borehole representing a group of boreholes (or in this model, a borefield zone) and the temperature variation at the wall of another segment of another (or the same) equivalent borehole representing another group of boreholes. The total temperature varition at a borehole segment is given by the temporal and spatial superpositions of the thermal reponse factors:

image

where Tb,I,u is the borehole wall temperature of segment u of borehole I, Tg,I,u is the undisturbed ground temperature of segment u of borehole I, Q'J,v is the heat injection rate into the ground through the borehole wall per unit length of segment v of borehole J, ks is the soil thermal conductivity and hIJ,uv is the thermal response factor of segment v of borehole J onto segment u of borehole I.

The thermal response factor is constructed from the combination of the finite line source (FLS) solution (see Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_Equivalent), the cylindrical heat source (CHS) solution (see Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.cylindricalHeatSource), and the infinite line source (ILS) solution (see Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.infiniteLineSource). To obtain the thermal response factors of a bore field, the bore field is first divided into nZon zones of parallel-connected boreholes. Each sone is represented by a single equivalent borehole. Each equivalent borehole is then divided into a series of nSeg segments of equal length, each modeled as a line source of finite length. The finite line source solution is superimposed in space to obtain a system of equations that gives the relation between the heat injection rate at each of the segments and the borehole wall temperature at each of the segments.

Since the finite line source solution is based on line sources of heat, rather than cylinders, the thermal response factors are corrected to consider the cylindrical geometry. The correction factor is then the difference between the cylindrical heat source solution and the infinite line source solution, as proposed by Li et al. (2014) :

image

Implementation

The calculation of the g-function is separated into two regions: the short-time region and the long-time region. In the short-time region, corresponding to times t < 1 hour, heat interaction between boreholes and axial variations of heat injection rate are not considered. The g-function is calculated using only one borehole and one segment. In the long-time region, corresponding to times t > 1 hour, all boreholes are represented as series of nSeg line segments and the g-function is evaluated as described above.

References

Li, M., Li, P., Chan, V. and Lai, A.C.K. 2014. Full-scale temperature response function (G-function) for heat transfer by borehole heat exchangers (GHEs) from sub-hour to decades. Applied Energy 136: 197-205.

Prieto, C. and Cimmino, M. 2021. Thermal interactions in large irregular fields of geothermal boreholes: the method of equivalent boreholes. Journal of Building Performance Simulation 14(4): 446-460. doi:10.1080/19401493.2021.1968953.

Inputs

TypeNameDefaultDescription
IntegernBorNumber of boreholes
Modelica.Units.SI.Position[nBor,2]cooBorCoordinates of boreholes
Modelica.Units.SI.HeighthBorBorehole length
Modelica.Units.SI.HeightdBorBorehole buried depth
Modelica.Units.SI.RadiusrBorBorehole radius
Modelica.Units.SI.ThermalDiffusivityaSoiGround thermal diffusivity used in g-function evaluation
Modelica.Units.SI.ThermalConductivitykSoiThermal conductivity of soil
IntegernSegNumber of line source segments per borehole
IntegernZonTotal number of independent bore field zones
IntegeriZonIndex of the zone corresponding to each borehole
IntegernBorPerZonNumber of boreholes per borefield zone
Modelica.Units.SI.Time[nTim]nuTime vector for the calculation of thermal response factors
IntegernTimLength of the time vector
RealrelTol0.02Relative tolerance on distance between boreholes
StringshaSHA-1 encryption of the arguments of this function

Outputs

TypeNameDefaultDescription
Real[nZon*nSeg,nZon*nSeg,nTim]kappaThermal response factor matrix

Revisions

  • March 20, 2026, by Michael Wetter:
    Corrected type declaration of g-function.
    This is for Buildings, #4501.
  • February 2024, by Massimo Cimmino:
    First implementation.