In shallow BHE calculations, the g-function (response factor method) is a classical method to represent the temperature response of a system to heat input. However, based on literature review, there is currently no response factor method specifically for deep borehole heat exchanger systems. Therefore, this section focuses on medium-deep BHE systems under geothermal gradient conditions. By analyzing the differences between borehole wall temperature and fluid temperature in the SFLS model, the fluid temperature difference between heat transfer models with geothermal gradient and uniform temperature is calculated. Combined with the temperature response calculated by the g-function for uniform temperature heat transfer models, the temperature response of medium-deep BHE systems under geothermal gradient is rapidly obtained.
4.2.1. Calculation of Medium- and Deep-Borehole- Wall Temperature Response by g-Function
Section 3.1 showed that under the same heat extraction rate for a BHE system, although the axial distribution of borehole wall temperature differs between geothermal gradient and uniform temperature conditions, the average temperature response at the borehole wall is almost identical within the system’s service life. Therefore, the g-function under uniform temperature background can be introduced to calculate the corresponding average temperature response at the borehole wall under geothermal gradient.
For shallow BHEs, g-functions can be conveniently and rapidly retrieved from precomputed g-function databases according to the required system configuration. For heat transfer calculations in medium-deep BHE systems, although no ready-made database exists for direct use, the significant depth (typically above 1500 m) means that axial heat transfer effects manifest later, beyond the practical service life of the BHE. Therefore, the influence of pipe length on heat transfer calculation can be neglected, and the g-function for medium-deep BHEs can be readily calculated using the Infinite Line Source (ILS) model. For g-function calculation of multiple medium-deep BHEs, spatial superposition based on the ILS model can also be used to obtain the g-function for the bore field. The g-function for the ILS model is calculated by Equations (23) and (24) [
35].
Figure 8 compares the g-functions at the borehole wall calculated by the two models for multiple BHEs with different borehole counts and depths, spaced 15 m apart. The BHE parameters are the same as in
Table 3. When the number of boreholes is less than 25, the g-function derived by spatial superposition of the ILS model has a calculation error of less than 6% compared to the SFLS model results over a 30-year period. This calculation error tends to increase with more boreholes, shallower depths, and longer times.
In practical engineering, the spacing between multiple medium-deep BHEs is usually above 15 m, further reducing the influence of inter-borehole interaction on calculations. Additionally, in actual calculations, since the temperature response at the borehole wall is the convolution of the g-function and the corresponding heat exchange rate at each time point, the calculation results at short-to-medium time points mitigate the error at longer time points. Furthermore, the number of boreholes in actual medium-deep BHE installations is typically less than 25, and the operating time is less than 30 years. Therefore, calculating the g-function for multiple medium-deep BHEs using ILS model superposition is effective and meets the needs for the vast majority of multi-bore medium-deep BHE calculations.
4.2.2. Fluid Outlet Correction Temperature Difference
Under the condition of the same heat flux input, although the borehole wall temperature responses under the geothermal gradient and the uniform geothermal temperature are almost the same in the long-term, as can be seen from
Section 3, there are significant differences in the fluid outlet temperatures under the two geothermal backgrounds.
Figure 9 shows the fluid temperature distribution diagrams under the geothermal gradient and the uniform geothermal temperature under the same heat flux condition. It can be seen that under the geothermal gradient, due to the low temperature of the upper-layer soil and the high temperature of the lower-layer soil, the heat transfer of the fluid in the ground heat exchanger is non-uniform along the depth. The temperature distribution of the downward—flowing fluid in the annulus tube shows a non-linear distribution characteristic, which is related to the longitudinal heat exchange amount of the system. The smaller the heat exchange amount, the more obvious this non-linear distribution characteristic is [
36]. For the heat transfer of the ground heat exchanger under the uniform geothermal temperature, because the soil temperature is uniform along the depth, the fluid heat transfer is relatively uniform along the depth, and the fluid temperature distribution is approximately linear compared with that under the geothermal gradient. Under the two geothermal conditions, when the total heat exchange amount of the system is the same, although the average wall temperature at the borehole wall is the same, due to the differences in the fluid temperature distribution, there are significant differences in the final fluid inlet and outlet temperatures.
Figure 9a shows the case of a uniform geothermal temperature with a heat exchange rate per unit length of 80 W/m;
Figure 9b shows the case of a geothermal gradient with a heat exchange rate per unit length of 80 W/m.
For calculating shallow BHE fluid outlet temperature, a common method is to first obtain the average borehole wall temperature using the g-function, then estimate the average fluid temperature using borehole thermal resistance
and total heat exchange
Q. The inlet-outlet temperature difference is calculated using flow rate
M and fluid specific heat
. Finally, the inlet and outlet temperatures are derived from the average fluid temperature and the temperature difference, as shown in Equations (25) and (26), where
is the initial average soil temperature and
is the soil thermal conductivity.
This estimation method is considered relatively accurate in homogeneous media under uniform soil temperature. However, this approach relies on three conditions:
(1) The fluid heat transfer in the borehole reaches a steady state;
(2) There is no obvious heat short—circuit phenomenon between the upward—flowing and downward—flowing fluids in the ground heat exchanger;
(3) The temperature distribution of the fluid exchanging heat with the soil along the depth should be approximately linear.
Since this estimation method can accurately estimate the fluid outlet temperature under the uniform geothermal temperature, as long as the temperature difference between the fluid outlet temperatures under the geothermal gradient and the uniform geothermal temperature can be given on this basis, the fluid outlet temperature under the geothermal gradient can be calculated by adding this temperature difference to the fluid outlet temperature under the uniform geothermal temperature.
The mathematical expression of this temperature difference can be given by the segmented finite line source model:
where
is the fluid outlet temperature under the geothermal gradient,
is the fluid outlet temperature under the uniform geothermal temperature,
is the borehole wall temperature of the
-th segment of the ground heat exchanger under the geothermal gradient, and
is the borehole wall temperature of the
v-th segment of the ground heat exchanger under the uniform geothermal temperature.
In the above formula, the mathematical representation and solution of
are complex and need to be solved by solving the equations outside the borehole simultaneously. However,
represents the difference in the borehole wall temperature of each segment of the ground heat exchanger under the geothermal gradient and the uniform geothermal temperature. This difference is obviously caused by the difference in the initial geothermal temperatures at different depths under the two geothermal temperature backgrounds and decays continuously with the operation time. Therefore, the difference in the initial geothermal temperatures of each segment under the geothermal gradient and the uniform geothermal temperature, multiplied by an undetermined coefficient
, is used to replace this part in the formula, and a simplified correction temperature calculation formula is proposed:
The coefficient
essentially replaces the influencing factors other than the geothermal gradient and the physical parameters inside the borehole that affect the difference in the borehole wall temperature between the geothermal gradient and the uniform geothermal temperature, such as time, buried depth, flow rate, heat exchange amount, thermal conductivity of the backfill material, and thermal conductivity of the soil. Therefore, the influence of these five parameters on the magnitude of the coefficient
is approximately expressed by fitting, and then reflected in the calculation of the correction temperature. That is, the correction coefficient
should have the following expression:
To determine the expression of
, a large number of fluid outlet temperatures
under the geothermal gradient and
under the uniform geothermal temperature for different layout forms are calculated by the segmented finite line source model. Then, the accurate value of
is calculated by the following formula:
In our assumption, multiple ground heat exchanger parameters affect the determination of the fitted value of
. It can be seen from
Figure 10a–d that the
values obtained from different configuration types show a similar trend of change with logarithmic time, forming multiple similar decreasing curves. It can be seen from
Figure 10c that at each time point, there is approximately a linear relationship between different heat exchange amounts
and
.
Figure 10d also reflects the approximate linear relationship between
and
in each configuration. Therefore, the fitting formula of
with logarithmic time
and heat exchange amount
obtained by the fitting toolbox in MATLAB is as follows:
In the above formula,
,
,
, and
are undetermined coefficients, and each coefficient is related to the buried pipe depth
, mass flow rate
, soil thermal conductivity
, and backfill material thermal conductivity
. The specific values of the undetermined coefficients under different configurations are obtained through the fitting tool, as shown in
Table 7:
Based on the relationships between the undetermined coefficients
,
,
,
and the parameters of the ground—buried pipes, the method of multiple linear regression fitting was used to determine the correlations among the parameters in the equation, and the fitting expressions for the undetermined coefficients were obtained. Thus, the specific expression of
was determined. Finally, the expression for the corrected temperature
is as follows:
, , are the dimensionless thermal conductivities of the borehole, , , , is the thermal resistance between the water in the annulus tube and the borehole wall, is the short—circuit thermal resistance between the fluids in the central tube and the annulus tube, t is the time, , is the soil thermal diffusivity, is the mass flow rate, is the specific heat of the fluid, the number of segments , is the thermal conductivity of the backfill material, is the thermal conductivity of the soil, Q is the heat exchange rate per unit length.
4.2.3. Error Comparison of Fluid Temperature Correction Method
The physical parameter configuration for a single-borehole BHE is as in
Table 3, the geothermal gradient is 0.03 °C/m, and the surface temperature is 15 °C. We compare the relative error between the fluid outlet temperature calculated using the g-function (derived from ILS) before and after applying the fluid temperature correction method, and the fluid outlet temperature calculated using the SFLS model. The three calculation cases are shown in
Table 8. Case 1 is the analytical solution calculated by the SFLS model under geothermal gradient and serves as the standard reference for Cases 2 and 3. Case 2 is the g-function estimated fluid temperature result. Case 3 adds the fluid correction temperature difference to the calculation result of Case 2. Here,
is the average soil temperature,
is the borehole thermal resistance,
is the soil thermal conductivity,
Q is the heat exchange rate per meter, and
M is the BHE flow rate.
Using the heat exchange rate per meter
Q, borehole depth
H, BHE flow rate
M, and soil thermal conductivity
as key influencing parameters for the simplified algorithm, a single-variable control method is employed. Other parameters are fixed while observing the impact of the target parameter on the algorithm’s outlet temperature error.
Figure 11 and
Figure 12 respectively represent the relative error in fluid outlet temperature between Cases 2, 3 and Case 1, under heat extraction rates from 40 to 200 W/m, depths from 1000 to 3000 m, flow rates from 4 to 12 kg/s, and soil thermal conductivities from 1 to 5 W/m·K.
Figure 12 shows that the fluid temperature calculation errors for Cases 2 and 3 relate to Case 1 gradually decrease over time. The fitting error of the fluid correction temperature difference method (Case 3) is significantly affected by physical parameters almost exclusively during the initial operation of the BHE system. Specifically, the initial fitting error increases relatively under high heat extraction rates, deeper borehole depths, and higher soil thermal conductivity, but still maintains high accuracy. The average fluid error of the corrected temperature difference method (Case 3) compared to the SFLS analytical solution (Case 1) is less than 0.4 °C across all the fitted parameter ranges. Furthermore,
Figure 12 shows that the calculation error of the corrected fluid outlet temperature in Case 3 is significantly reduced compared to the uncorrected calculation error in Case 2, with an error reduction rate exceeding 80%.