Skip to content

Commit 6984235

Browse files
committed
Fix problem in pipe
1 parent 74e1d1e commit 6984235

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

GHEtool/VariableClasses/PipeData/PressureDrop.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ def calculate_pressure_drop_main(self, **kwargs) -> float:
111111
"""
112112
# Darcy fluid factor
113113
fd = gt.pipes.fluid_friction_factor_circular_pipe(
114-
self.flow_data.mfr(fluid_data=self.fluid_data, **kwargs) * self.nb_of_boreholes,
114+
self.flow_data.mfr(fluid_data=self.fluid_data, **kwargs) * self.nb_of_boreholes / self.series_factor,
115115
self.r_in_main,
116116
self.fluid_data.mu(**kwargs),
117117
self.fluid_data.rho(**kwargs),
118118
1e-6)
119119
A = pi * self.r_in_main ** 2
120-
V = (self.flow_data.vfr(fluid_data=self.fluid_data, **kwargs) / 1000) / A * self.nb_of_boreholes
120+
V = (self.flow_data.vfr(fluid_data=self.fluid_data,
121+
**kwargs) / 1000) / A * self.nb_of_boreholes / self.series_factor
121122

122123
# distance_later * 2 for back and forth
123124
return ((fd * self.distance_main * 2 / (

GHEtool/test/unit-tests/test_pressure_drop.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def test_main_header():
6767
15, 0, 8, 1, 1)
6868
pressure_drop_eight = PressureDrop(single_u, fluid_data, ConstantFlowRate(mfr=1.6), 0, 100, 0.02 - 0.0037 / 2, 15,
6969
0, 0.02 - 0.0037 / 2, 15, 0, 8, 1, 1)
70+
pressure_drop_four = PressureDrop(single_u, fluid_data, ConstantFlowRate(mfr=0.8), 0, 100, 0.02 - 0.0037 / 2, 15,
71+
0, 0.02 - 0.0037 / 2, 15, 0, 8, 1, 1)
7072

7173
pressure_drop_series = PressureDrop(single_u, fluid_data, flow_data,
7274
0, 100, 0.02 - 0.0037 / 2, 15, 0, 0.02 - 0.0037 / 2, 15, 0, 8, 2, 1)
@@ -78,11 +80,11 @@ def test_main_header():
7880
assert np.isclose(pressure_drop.calculate_pressure_drop_main(),
7981
pressure_drop_eight.calculate_pressure_drop_lateral())
8082
assert np.isclose(pressure_drop_series.calculate_pressure_drop_main(),
81-
pressure_drop_eight.calculate_pressure_drop_lateral())
83+
pressure_drop_four.calculate_pressure_drop_lateral())
8284
assert np.isclose(pressure_drop_tichelmann.calculate_pressure_drop_main(),
8385
pressure_drop_eight.calculate_pressure_drop_lateral())
8486
assert np.isclose(pressure_drop_both.calculate_pressure_drop_main(),
85-
pressure_drop_eight.calculate_pressure_drop_lateral())
87+
pressure_drop_four.calculate_pressure_drop_lateral())
8688

8789
pressure_drop.minor_losses_main = 2
8890
pressure_drop_eight.minor_losses_lateral = 2

0 commit comments

Comments
 (0)