Skip to content

Commit 3b6f8c9

Browse files
authored
Merge pull request #360 from wouterpeere/issue358-extension-on-pressure-drop
Small fix in pressure drop
2 parents 432df44 + 156bec0 commit 3b6f8c9

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ our [project board](https://github.com/users/wouterpeere/projects/2) on GitHub.
55

66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77

8+
## [2.3.4] - Unpublished
9+
10+
## Fixed
11+
12+
- Small bug in pressure drop lateral pipe.
13+
814
## [2.3.3] - 2025-05-28
915

1016
### Added

GHEtool/VariableClasses/PipeData/PressureDrop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ def calculate_pressure_drop_lateral(self, **kwargs) -> float:
8787

8888
# Darcy fluid factor
8989
fd = gt.pipes.fluid_friction_factor_circular_pipe(
90-
self.flow_data.mfr(fluid_data=self.fluid_data, **kwargs) * self.series_factor * self.tichelmann_factor,
90+
self.flow_data.mfr(fluid_data=self.fluid_data, **kwargs) * self.tichelmann_factor,
9191
self.r_in_lateral,
9292
self.fluid_data.mu(**kwargs),
9393
self.fluid_data.rho(**kwargs),
9494
1e-6)
9595
A = pi * self.r_in_lateral ** 2
9696
V = (self.flow_data.vfr(fluid_data=self.fluid_data,
97-
**kwargs) / 1000) / A * self.series_factor * self.tichelmann_factor
97+
**kwargs) / 1000) / A * self.tichelmann_factor
9898

9999
# distance_later * 2 for back and forth
100100
return ((fd * self.distance_lateral * 2 / (

GHEtool/test/unit-tests/test_pressure_drop.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ def test_lateral():
3434
pressure_drop = PressureDrop(single_u, fluid_data, flow_data, 0, 100, 0.02 - 0.0037 / 2, 15, 0, 0, 0, 0, 8, 1, 1)
3535
pressure_drop_double = PressureDrop(single_u, fluid_data, ConstantFlowRate(mfr=0.4), 0, 100, 0.02 - 0.0037 / 2, 15,
3636
0, 0, 0, 0, 8, 1, 1)
37-
pressure_drop_four = PressureDrop(single_u, fluid_data, ConstantFlowRate(mfr=0.8), 0, 100, 0.02 - 0.0037 / 2, 15, 0,
38-
0, 0, 0, 8, 1, 1)
3937

4038
pressure_drop_series = PressureDrop(single_u, fluid_data, flow_data,
4139
0, 100, 0.02 - 0.0037 / 2, 15, 0, 0, 0, 0, 8, 2, 1)
@@ -45,12 +43,11 @@ def test_lateral():
4543
0, 100, 0.02 - 0.0037 / 2, 15, 0, 0, 0, 0, 8, 2, 2)
4644

4745
assert np.isclose(pressure_drop.calculate_pressure_drop_lateral(), 0.26307939880441045 * 2)
48-
assert np.isclose(pressure_drop_series.calculate_pressure_drop_lateral(),
49-
pressure_drop_double.calculate_pressure_drop_lateral())
46+
assert np.isclose(pressure_drop_series.calculate_pressure_drop_lateral(), 0.26307939880441045 * 2)
5047
assert np.isclose(pressure_drop_tichelmann.calculate_pressure_drop_lateral(),
5148
pressure_drop_double.calculate_pressure_drop_lateral())
5249
assert np.isclose(pressure_drop_both.calculate_pressure_drop_lateral(),
53-
pressure_drop_four.calculate_pressure_drop_lateral())
50+
pressure_drop_double.calculate_pressure_drop_lateral())
5451

5552
pressure_drop.minor_losses_lateral = 2
5653
assert np.isclose(pressure_drop.calculate_pressure_drop_lateral(), 0.5635804695478487)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = GHEtool
3-
version = 2.3.3
3+
version = 2.3.4.dev0
44
author = Wouter Peere
55
author_email = wouter@ghetool.eu
66
description = Python package for borefield sizing

0 commit comments

Comments
 (0)