Skip to content

Commit a968035

Browse files
authored
Merge pull request #366 from wouterpeere/conical-pipes
Conical pipes
2 parents f7cb2da + d3f1c02 commit a968035

File tree

17 files changed

+548
-149
lines changed

17 files changed

+548
-149
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010
###
1111

1212
- Added Turbocollector from Muovitech.
13+
- Add flag in pressure drop calculation to in or exclude the pressure drop in the bend.
14+
- Added conical borehole heat exchangers (like the GEROtherm VARIO and FLUX probe from HakaGerodur).
1315

1416
### Fixed
1517

GHEtool/Borefield.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,8 @@ def Re(self) -> float:
19501950
Reynolds number
19511951
"""
19521952
return self.borehole.Re(
1953-
temperature=self.results.min_temperature if self.results.min_temperature is not None else self.Tf_min)
1953+
temperature=self.results.min_temperature if self.results.min_temperature is not None else self.Tf_min,
1954+
borehole_length=self.H) # for conical pipes
19541955

19551956
def calculate_quadrant(self) -> int:
19561957
"""

GHEtool/Examples/Hydratech.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

GHEtool/Examples/Muovitech_new.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

GHEtool/Examples/Vario.py

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
from GHEtool import *
2+
import matplotlib.pyplot as plt
3+
import numpy as np
4+
5+
regular_pipe = SingleUTube(1.5, 0.013, 0.016, 0.4, 0.035)
6+
regular_pipe_PN12 = SingleUTube(1.5, 0.0135, 0.016, 0.4, 0.035)
7+
vario = ConicalPipe(1.5, 0.0135, 0.013, 80, 160, 0.016, 0.4, 0.035, 1)
8+
9+
fluid = TemperatureDependentFluidData('MEG', 25).create_constant(3)
10+
flow = ConstantFlowRate(vfr=0.9 / 3.6)
11+
12+
length = np.arange(100, 160, 1)
13+
14+
dp_regular = [regular_pipe.pressure_drop(fluid, flow, i) for i in length]
15+
dp_regular_pn12 = [regular_pipe_PN12.pressure_drop(fluid, flow, i) for i in length]
16+
dp_vario = [vario.pressure_drop(fluid, flow, i) for i in length]
17+
18+
reynolds_regular = [regular_pipe.Re(fluid, flow, borehole_length=i) for i in length]
19+
reynolds_vario = [vario.Re(fluid, flow, borehole_length=i) for i in length]
20+
21+
plt.figure()
22+
plt.plot(length, dp_vario, label="vario")
23+
plt.plot(length, dp_regular, label="regular PN16")
24+
plt.plot(length, dp_regular_pn12, label="regular PN12")
25+
plt.xlabel('Length [m]')
26+
plt.ylabel('Pressure drop [kPa]')
27+
plt.legend()
28+
29+
plt.figure()
30+
plt.plot(length, reynolds_vario, label="vario")
31+
plt.plot(length, reynolds_regular, label="regular")
32+
plt.xlabel('Length [m]')
33+
plt.ylabel('Reynolds [-]')
34+
plt.legend()
35+
36+
# borehole resistance
37+
vfr_range = np.arange(0.05, 0.8, 0.005)
38+
39+
rb_regular = []
40+
rb_regular_pn12 = []
41+
rb_vario = []
42+
r_f_regular = []
43+
r_p_regular = []
44+
r_f_regular_pn12 = []
45+
r_p_regular_pn12 = []
46+
r_f_vario = []
47+
r_p_vario = []
48+
dp_regular = []
49+
dp_vario = []
50+
dp_regular_pn12 = []
51+
52+
for vfr in vfr_range:
53+
flow = ConstantFlowRate(vfr=vfr)
54+
borehole_regular = Borehole(fluid, regular_pipe, flow)
55+
borehole_vario = Borehole(fluid, vario, flow)
56+
borehole_regular_pn12 = Borehole(fluid, regular_pipe_PN12, flow)
57+
rb_regular.append(borehole_regular.get_Rb(150, 1, 0.07, 2))
58+
rb_regular_pn12.append(borehole_regular_pn12.get_Rb(150, 1, 0.07, 2))
59+
60+
rb_vario.append(borehole_vario.get_Rb(150, 1, 0.07, 2))
61+
r_f_regular.append(borehole_regular.pipe_data.R_f)
62+
r_f_regular_pn12.append(borehole_regular_pn12.pipe_data.R_f)
63+
r_p_regular.append(borehole_regular.pipe_data.R_p)
64+
r_p_regular_pn12.append(borehole_regular_pn12.pipe_data.R_p)
65+
r_f_vario.append(borehole_vario.pipe_data.R_f)
66+
r_p_vario.append(borehole_vario.pipe_data.R_p)
67+
68+
dp_regular.append(regular_pipe.pressure_drop(fluid, flow, borehole_length=160))
69+
dp_regular_pn12.append(regular_pipe_PN12.pressure_drop(fluid, flow, borehole_length=160))
70+
dp_vario.append(vario.pressure_drop(fluid, flow, borehole_length=160))
71+
72+
plt.figure()
73+
plt.plot(vfr_range, rb_vario, label="vario")
74+
plt.plot(vfr_range, rb_regular, label="regular PN 16")
75+
76+
plt.xlabel('Volume flow rate [l/s]')
77+
plt.ylabel('Effective borehole thermal resistance [W/(mK)]')
78+
plt.legend()
79+
80+
plt.figure()
81+
plt.plot(vfr_range, r_p_vario, label="R_p vario")
82+
plt.plot(vfr_range, r_p_regular, label="R_p regular PN16")
83+
plt.plot(vfr_range, r_p_regular_pn12, label="R_p regular PN12")
84+
plt.plot(vfr_range, r_f_vario, label="R_f vario")
85+
plt.plot(vfr_range, r_f_regular, label="R_f regular PN16")
86+
plt.plot(vfr_range, r_f_regular_pn12, label="R_f regular PN12")
87+
plt.xlabel('Volume flow rate [l/s]')
88+
plt.ylabel('Effective borehole thermal resistance [W/(mK)]')
89+
plt.legend()
90+
91+
plt.figure()
92+
plt.plot(vfr_range, dp_vario, label="Vario")
93+
plt.plot(vfr_range, dp_regular, label="Regular PN16")
94+
plt.plot(vfr_range, dp_regular_pn12, label="Regular PN12")
95+
plt.xlabel('Volume flow rate [l/s]')
96+
plt.ylabel('Pressure drop [kPa]')
97+
plt.legend()
98+
plt.show()

GHEtool/VariableClasses/Borehole.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def calculate_Rb(self, H: float, D: float, r_b: float, k_s: Union[float, callabl
296296
borehole = gt.boreholes.Borehole(H, D, r_b, 0, 0)
297297

298298
def calculate(**kwargs):
299-
self.pipe_data.calculate_resistances(self.fluid_data, self.flow_data, **kwargs)
299+
self.pipe_data.calculate_resistances(self.fluid_data, self.flow_data, borehole_length=H, **kwargs)
300300

301301
# initiate pipe
302302
pipe = self.pipe_data.pipe_model(k_s if isinstance(k_s, (float, int)) else k_s(depth, D), borehole)

GHEtool/VariableClasses/PipeData/CoaxialPipe.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def Re(self, fluid_data: _FluidData, flow_rate_data: _FlowData, **kwargs) -> flo
147147
return fluid_data.rho(**kwargs) * V * D_h / fluid_data.mu(**kwargs)
148148

149149
def pressure_drop(self, fluid_data: _FluidData, flow_rate_data: _FlowData, borehole_length: float,
150-
**kwargs) -> float:
150+
include_bend: bool = True, **kwargs) -> float:
151151
"""
152152
Calculates the pressure drop across the entire borehole.
153153
It assumed that the U-tubes are all connected in parallel.
@@ -160,6 +160,8 @@ def pressure_drop(self, fluid_data: _FluidData, flow_rate_data: _FlowData, boreh
160160
Flow rate data
161161
borehole_length : float
162162
Borehole length [m]
163+
include_bend : bool
164+
True if the losses in the bend should be included
163165
164166
Returns
165167
-------
@@ -178,9 +180,12 @@ def pressure_drop(self, fluid_data: _FluidData, flow_rate_data: _FlowData, boreh
178180
flow_rate_data.mfr(fluid_data=fluid_data, **kwargs), r_h, fluid_data.mu(**kwargs), fluid_data.rho(**kwargs),
179181
self.epsilon)
180182

181-
# add 0.2 for the local losses
182-
# (source: https://www.engineeringtoolbox.com/minor-loss-coefficients-pipes-d_626.html)
183-
return ((fd * (borehole_length * 2) / (2 * r_h) + 0.2) * fluid_data.rho(**kwargs) * V ** 2 / 2) / 1000
183+
bend = 0
184+
if include_bend:
185+
# add 0.2 for the local losses
186+
# (source: https://www.engineeringtoolbox.com/minor-loss-coefficients-pipes-d_626.html)
187+
bend = 0.2
188+
return ((fd * (borehole_length * 2) / (2 * r_h) + bend) * fluid_data.rho(**kwargs) * V ** 2 / 2) / 1000
184189

185190
def draw_borehole_internal(self, r_b: float) -> None:
186191
"""

0 commit comments

Comments
 (0)