Calculation of effective bore field thermal resistanceΒΆ
This example demonstrates the use of the
pipes.field_thermal_resistance() function to evaluate the bore field
thermal resistance. The concept effective bore field thermal is detailed by
Cimmino [1]
The following script evaluates the effective bore field thermal resistance for fields of 1 to 5 series-connected boreholes with fluid flow rates ranging from 0.01 kg/s ti 1.00 kg/s.
The script is located in: pygfunction/examples/bore_field_thermal_resistance.py
1# -*- coding: utf-8 -*-
2""" Example of calculation of effective bore field thermal resistance.
3
4 The effective bore field thermal resistance of fields of up to 5 boreholes
5 of equal lengths connected in series is calculated for various fluid flow
6 rates.
7
8"""
9import matplotlib.pyplot as plt
10import numpy as np
11
12import pygfunction as gt
13
14
15def main():
16 # -------------------------------------------------------------------------
17 # Simulation parameters
18 # -------------------------------------------------------------------------
19
20 # Number of boreholes
21 nBoreholes = 5
22 # Borehole dimensions
23 D = 4.0 # Borehole buried depth (m)
24 # Borehole length (m)
25 H = 150.
26 r_b = 0.075 # Borehole radius (m)
27 B = 7.5 # Borehole spacing (m)
28
29 # Pipe dimensions
30 r_out = 0.02 # Pipe outer radius (m)
31 r_in = 0.015 # Pipe inner radius (m)
32 D_s = 0.05 # Shank spacing (m)
33 epsilon = 1.0e-6 # Pipe roughness (m)
34
35 # Pipe positions
36 # Single U-tube [(x_in, y_in), (x_out, y_out)]
37 pos_pipes = [(-D_s, 0.), (D_s, 0.)]
38
39 # Ground properties
40 k_s = 2.0 # Ground thermal conductivity (W/m.K)
41
42 # Grout properties
43 k_g = 1.0 # Grout thermal conductivity (W/m.K)
44
45 # Pipe properties
46 k_p = 0.4 # Pipe thermal conductivity (W/m.K)
47
48 # Fluid properties
49 # Total fluid mass flow rate per borehole (kg/s), from 0.01 kg/s to 1 kg/s
50 m_flow_network = 10**np.arange(-2, 0.001, 0.05)
51 # The fluid is propylene-glycol (20 %) at 20 degC
52 fluid = gt.media.Fluid('MPG', 20.)
53 cp_f = fluid.cp # Fluid specific isobaric heat capacity (J/kg.K)
54 rho_f = fluid.rho # Fluid density (kg/m3)
55 mu_f = fluid.mu # Fluid dynamic viscosity (kg/m.s)
56 k_f = fluid.k # Fluid thermal conductivity (W/m.K)
57
58 # -------------------------------------------------------------------------
59 # Borehole field
60 # -------------------------------------------------------------------------
61
62 x = np.arange(nBoreholes) * B
63 borefield = gt.borefield.Borefield(H, D, r_b, x, 0.)
64 # Boreholes are connected in series: The index of the upstream
65 # borehole is that of the previous borehole
66 bore_connectivity = [i - 1 for i in range(nBoreholes)]
67
68 # -------------------------------------------------------------------------
69 # Evaluate the effective bore field thermal resistance
70 # -------------------------------------------------------------------------
71
72 # Initialize result array
73 R = np.zeros((nBoreholes, len(m_flow_network)))
74 for i in range(nBoreholes):
75 for j, m_flow_network_j in enumerate(m_flow_network):
76 nBoreholes = i + 1
77 # Boreholes are connected in series
78 m_flow_borehole = m_flow_network_j
79 # Boreholes are single U-tube
80 m_flow_pipe = m_flow_borehole
81
82 # Pipe thermal resistance
83 R_p = gt.pipes.conduction_thermal_resistance_circular_pipe(
84 r_in, r_out, k_p)
85 # Fluid to inner pipe wall thermal resistance (Single U-tube)
86 h_f = gt.pipes.convective_heat_transfer_coefficient_circular_pipe(
87 m_flow_pipe, r_in, mu_f, rho_f, k_f, cp_f, epsilon)
88 R_f = 1.0 / (h_f * 2 * np.pi * r_in)
89
90 # Single U-tube, same for all boreholes in the bore field
91 UTubes = []
92 for borehole in borefield:
93 SingleUTube = gt.pipes.SingleUTube(
94 pos_pipes, r_in, r_out, borehole, k_s, k_g, R_f + R_p)
95 UTubes.append(SingleUTube)
96 network = gt.networks.Network(
97 borefield[:nBoreholes],
98 UTubes[:nBoreholes],
99 bore_connectivity=bore_connectivity[:nBoreholes])
100
101 # Effective bore field thermal resistance
102 R_field = gt.networks.network_thermal_resistance(
103 network, m_flow_network_j, cp_f)
104 # Add to result array
105 R[i,j] = R_field
106
107 # -------------------------------------------------------------------------
108 # Plot bore field thermal resistances
109 # -------------------------------------------------------------------------
110
111 # Configure figure and axes
112 fig = gt.utilities._initialize_figure()
113
114 ax1 = fig.add_subplot(111)
115 # Axis labels
116 ax1.set_xlabel(r'$\dot{m}$ [kg/s]')
117 ax1.set_ylabel(r'$R^*_{field}$ [m.K/W]')
118 # Axis limits
119 ax1.set_xlim([0., 1.])
120 ax1.set_ylim([0., 1.])
121
122 gt.utilities._format_axes(ax1)
123
124 # Bore field thermal resistances
125 ax1.plot(m_flow_network, R[0,:], '-', label='1 borehole')
126 ax1.plot(m_flow_network, R[2,:], '--', label='3 boreholes')
127 ax1.plot(m_flow_network, R[4,:], '-.', label='5 boreholes')
128 ax1.legend()
129 # Adjust to plot window
130 plt.tight_layout()
131
132 return
133
134
135# Main function
136if __name__ == '__main__':
137 main()
References