Skip to content

Commit

Permalink
Merge pull request #301 from MassimoCimmino/issue282_negativeMassFlow
Browse files Browse the repository at this point in the history
Issue282 negative mass flow
  • Loading branch information
MassimoCimmino authored Aug 23, 2024
2 parents 9048d49 + f1faa50 commit 8af0a87
Show file tree
Hide file tree
Showing 7 changed files with 1,315 additions and 418 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Version 2.3 (in development)

### New features

* [Issue 282](https://github.com/MassimoCimmino/pygfunction/issues/282) - Enabled the use of negative mass flow rates in `Pipe` and `Network` classes to model reversed flow direction.

## Version 2.2.3 (2024-07-01)

### New features
Expand Down
6 changes: 4 additions & 2 deletions pygfunction/gfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1677,8 +1677,10 @@ def solve(self, time, alpha):
# The gFunction is equal to the effective borehole wall
# temperature
# Outlet fluid temperature
T_f_out = T_f_in - 2*pi*self.network.p[0].k_s*H_tot/(
np.sum(self.network.m_flow_network*self.network.cp_f))
T_f_out = T_f_in - 2*pi*self.network.p[0].k_s*H_tot / (
np.sum(
np.abs(self.network.m_flow_network)
* self.network.cp_f))
# Average fluid temperature
T_f = 0.5*(T_f_in + T_f_out)
# Borefield thermal resistance
Expand Down
Loading

0 comments on commit 8af0a87

Please sign in to comment.