Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ac88d2b
transition to use scp for fluid props
Oct 18, 2022
a73cb54
fix string comparisons
mitchute Oct 18, 2022
99ef6bf
add unit tests
mitchute Oct 18, 2022
06b3c24
fix setup.cfg
mitchute Oct 18, 2022
6b9a432
fix setup.cfg with correct version
mitchute Oct 18, 2022
9e6d0b5
Add py39 and py310 to tests
MassimoCimmino Oct 21, 2022
aaff161
Add secondarycoolantprops to requirements
MassimoCimmino Oct 21, 2022
83ec182
Update CHANGELOG.md
MassimoCimmino Oct 21, 2022
5f70c86
update scp version
mitchute Oct 24, 2022
8439fa8
Update requirements
MassimoCimmino Oct 24, 2022
18690b3
Add Python 3.11 to tests
MassimoCimmino Oct 24, 2022
5465044
Merge pull request #232 from mitchute/replace-coolprop
MassimoCimmino Oct 30, 2022
786b89c
papercut changes
mitchute Nov 3, 2022
1da1392
minor changes
mitchute Nov 4, 2022
3f94040
update README and install
mitchute Nov 4, 2022
87e5f0e
trailing whitespace
mitchute Nov 4, 2022
2cf5343
update media examples
mitchute Nov 4, 2022
c4076d8
docs: update README.md [skip ci]
allcontributors[bot] Nov 4, 2022
494f7e8
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 4, 2022
3799799
Merge pull request #235 from MassimoCimmino/all-contributors/add-mitc…
MassimoCimmino Nov 4, 2022
c581881
adding 'name' attribute to media
mitchute Nov 7, 2022
e942304
Merge pull request #234 from mitchute/minor-changes
MassimoCimmino Nov 11, 2022
a965f39
Linearize g-function at short times
MassimoCimmino Oct 30, 2022
e60174e
Update CHANGELOG.md
MassimoCimmino Oct 30, 2022
4f240a4
The minimum time is zero
MassimoCimmino Oct 30, 2022
d2a4909
Merge branch 'master' into fluid-name
mitchute Nov 11, 2022
38fc82c
correct Grundmann references
Nov 15, 2022
43979c5
Store time threshold in gFunction object
MassimoCimmino Nov 23, 2022
2703b9a
Document linearized behavior
MassimoCimmino Nov 23, 2022
2d774b5
Move linearization to _BaseSolver.solve
MassimoCimmino Nov 26, 2022
05ad820
Use side='right' in numpy.searchsorted
MassimoCimmino Nov 26, 2022
bb9506c
Test g-function linearization at low time values
MassimoCimmino Nov 26, 2022
8681246
Merge pull request #240 from MassimoCimmino/issue231_singularMatrix
MassimoCimmino Nov 26, 2022
5bd731d
Add upload to pypi step
j-c-cook Nov 27, 2022
d401557
Merge branch 'master' into fluid-name
mitchute Nov 27, 2022
fb50ab2
Merge branch 'fluid-name' of github.com:mitchute/pygfunction into flu…
mitchute Nov 27, 2022
2fd5fe9
Move publish job to release.yml
MassimoCimmino Dec 28, 2022
999f254
Merge pull request #243 from j-c-cook/issue230_publishOnRelease
MassimoCimmino Dec 29, 2022
0443983
Fix hyperreference for Grundmann 2016
MassimoCimmino Dec 29, 2022
a615f62
Merge remote-tracking branch 'origin/master' into fluid-name
MassimoCimmino Dec 29, 2022
8eaff5f
Merge pull request #244 from mitchute/fluid-name
MassimoCimmino Dec 29, 2022
53e439f
Add reference to v2.2 in documentation
MassimoCimmino Jan 4, 2023
d5215db
Add CITATION.cff
MassimoCimmino Jan 4, 2023
ad29d74
Update CHANGELOG.md
MassimoCimmino Jan 6, 2023
ba50aa9
Merge pull request #249 from MassimoCimmino/issue247_citation
MassimoCimmino Jan 6, 2023
9b1d38f
Update version and dates in root files
MassimoCimmino Jan 6, 2023
78fb638
Merge pull request #253 from MassimoCimmino/issue251_version-2-2-2
MassimoCimmino Jan 6, 2023
e348c8a
Merge branch 'master' of https://github.com/MassimoCimmino/pygfunctio…
tblanke May 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release on PyPI

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r requirements_dev.txt
python -m pip install build

- name: Build
run: python -m build

- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_PASS_TOKEN }}
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# History of changes

## Current version
## Version 2.3 (in development)

## Version 2.2.2 (2023-01-09)

### Enhancements

* [Issue 204](https://github.com/MassimoCimmino/pygfunction/issues/204) - Added support for Python 3.9 and 3.10. [CoolProp](https://www.coolprop.org/) is removed from the dependencies and replace with [SecondaryCoolantProps](https://github.com/mitchute/SecondaryCoolantProps).

### Bug fixes

* [Issue 231](https://github.com/MassimoCimmino/pygfunction/issues/231) - Fixed an issue where the evaluation of g-functions at very low times raises an error due a singular matrix. g-Functions below a threshold time value `t=max(r_b)**2/(25*alpha)` are now linearized.

### Other changes

* [Issue 229](https://github.com/MassimoCimmino/pygfunction/issues/229), [Issue 247](https://github.com/MassimoCimmino/pygfunction/issues/247) - Added citation to IGSHPA conference paper on *pygfunction* v2.2 in the documention. Added a `CITATION.cff` file to suggest a correct citation on github.
* [Issue 230](https://github.com/MassimoCimmino/pygfunction/issues/230) - Configured github actions to publish *pygfunction* on Pypi on creation of a release on github.

### Enhancements

Expand Down Expand Up @@ -79,7 +94,7 @@
* [Issue 99](https://github.com/MassimoCimmino/pygfunction/issues/99) - Fixed an issue where `MultipleUTube._continuity_condition()` and `MultipleUTube._general_solution()` returned complex valued coefficient matrices.
* [Issue 130](https://github.com/MassimoCimmino/pygfunction/issues/130) - Fix incorrect initialization of variables `_mix_out` and `_mixing_m_flow` in `Network`.
* [Issue 155](https://github.com/MassimoCimmino/pygfunction/issues/155) - Fix incorrect initialization of variables in `Network` and `_BasePipe`. Stored variables are now initialized as `numpy.nan` instead of `numpy.empty`.
* [Issue 159](https://github.com/MassimoCimmino/pygfunction/issues/159) - Fix `segment_ratios` function in the `utilities` module to always expect 0 < `end_length_ratio` < 0.5, and allows for `nSegments=1` or `nSegments=2`. If 1<=`nSegments`<3 then the user is warned that the `end_length_ratio` parameter is being over-ridden.
* [Issue 159](https://github.com/MassimoCimmino/pygfunction/issues/159) - Fix `segment_ratios` function in the `utilities` module to always expect 0 < `end_length_ratio` < 0.5, and allows for `nSegments=1` or `nSegments=2`. If 1<=`nSegments`<3 then the user is warned that the `end_length_ratio` parameter is being over-ridden.

## Version 2.0.0 (2021-05-22)

Expand Down
59 changes: 59 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Cimmino"
given-names: "Massimo"
orcid: "https://orcid.org/0000-0002-9981-9926"
title: "pygfunction"
version: 2.2.2
date-released: 2023-01-09
url: "https://github.com/MassimoCimmino/pygfunction"
preferred-citation:
type: conference-paper
title: "pygfunction 2.2 : New Features and Improvements in Accuracy and Computational Efficiency"
authors:
- family-names: "Cimmino"
given-names: "Massimo"
orcid: "https://orcid.org/0000-0002-9981-9926"
- family-names: "Cook"
given-names: "Jonathan C."
doi: "10.22488/okstate.22.000015"
start: 45 # First page number
end: 52 # Last page number
year: 2022
collection-type: proceedings
collection-title: "Research Conference Proceedings, IGSHPA Conference 2022"
publisher:
name: International Ground Source Heat Pump Association
institution:
name: International Ground Source Heat Pump Association
collection-doi: 10.22488/okstate.22.000010
location: Las Vegas NV, USA
editors:
- family-names: "Spitler"
given-names: "Jeff"
- family-names: "Acuña"
given-names: "José"
- family-names: "Bernier"
given-names: "Michel"
- family-names: "Cimmino"
given-names: "Massimo"
- family-names: "Fang"
given-names: "Zhaohong"
- family-names: "Gehlin"
given-names: "Signhild"
- family-names: "Javed"
given-names: "Saqib"
- family-names: "Liu"
given-names: "Xiaobing"
- family-names: "Rees"
given-names: "Simon"
- family-names: "Stumpf"
given-names: "Andrew"
conference:
- name: International Ground Source Heat Pump Association Annual Conference
city: Las Vegas
region: NV
country: USA
date-start: 2022-12-06
date-end: 2022-12-08
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Copyright (c) 2017-2022, Massimo Cimmino
Copyright (c) 2017-2023, Massimo Cimmino
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ fluid temperatures in the boreholes for several U-tube pipe configurations.

*pygfunction* was developed and tested using Python 3.7. In addition, the
following packages are needed to run *pygfunction* and its examples:
- Coolprop (>= 6.4.1)
- matplotlib (>= 3.5.1),
- numpy (>= 1.21.5)
- scipy (>= 1.7.3)
- SecondaryCoolantProps (>= 1.1)

The documentation is generated using [Sphinx](http://www.sphinx-doc.org). The
following packages are needed to build the documentation:
Expand Down
39 changes: 38 additions & 1 deletion doc/source/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,43 @@
Citing pygfunction in scientific publications
***********************************************

------------------
pygfunction v2.2
------------------

Improvements to *pygfunction* from v1.0 to v2.2 were presented at the IGSHPA
Annual Conference 2022:

Cimmino, M., & Cook, J.C. (2022). pygfunction 2.2: New features and improvements
in accuracy and computational efficiency. In
*Research Conference Proceedings, IGSHPA Annual Conference 2022*
(pp. 45-52). International Ground Source Heat Pump Association.
DOI: https://doi.org/10.22488/okstate.22.000015.

The conference paper is available `here
<https://shareok.org/handle/11244/336825>`__.

Here is an example of a BibTeX entry:

.. code-block:: none

@inproceedings{2022Pygfunction-V2-2,
author = {Cimmino, Massimo and Cook, Jonathan C.},
title = {{pygfunction} 2.2: New features and improvements in accuracy and computational efficiency},
crossref = {IGSHPA2022},
pages = {45--52},
}

@proceedings{IGSHPA2022,
title = "Research Conference Proceedings, IGSHPA Annual Conference 2022",
booktitle = "Research Conference Proceedings, IGSHPA Annual Conference 2022",
publisher = {International Ground Source Heat Pump Association}
venue = {Las Vegas NV, USA},
month = december,
year = {2022},
doi = {10.22488/okstate.22.000010},
}

------------------
pygfunction v1.0
------------------
Expand All @@ -16,7 +53,7 @@ of thermal response factors for geothermal borehole fields. In
(pp. 492-501). IBPSA. ISBN 978-2-921145-88-6.

The conference paper is available `here
<http://www.ibpsa.org/proceedings/eSimPapers/2018/2-3-A-4.pdf>`_.
<http://www.ibpsa.org/proceedings/eSimPapers/2018/2-3-A-4.pdf>`__.

Here is an example of a BibTeX entry:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/bore_field_thermal_resistance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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:
The script is located in:
`pygfunction/examples/bore_field_thermal_resistance.py`

.. literalinclude:: ../../../examples/bore_field_thermal_resistance.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/comparison_gfunction_solvers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ compared using the 'similarities' solver as a reference. This shows that
the 'equivalent' solver evaluates g-functions at a very high calculation
speed while maintaining reasonable accuracy.

The script is located in:
The script is located in:
`pygfunction/examples/comparison_gfunction_solvers.py`

.. literalinclude:: ../../../examples/comparison_gfunction_solvers.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/comparison_load_aggregation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Bernier et al. [1]_.
The following script validates the load aggregation schemes with the exact
solution obtained from convolution in the Fourier domain (see ref. [4]_).

The script is located in:
The script is located in:
`pygfunction/examples/comparison_load_aggregation.py`

.. literalinclude:: ../../../examples/comparison_load_aggregation.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/custom_bore_field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function.
The following script generates a bore field with 5 boreholes. The field is
then plotted on a figure.

The script is located in:
The script is located in:
`pygfunction/examples/custom_bore_field.py`

.. literalinclude:: ../../../examples/custom_bore_field.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/custom_bore_field_from_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ text file.
The following script generates a bore field with 32 boreholes. The field is
then plotted on a figure.

The script is located in:
The script is located in:
`./pygfunction/examples/custom_bore_field_from_file.py`

.. literalinclude:: ../../../examples/custom_bore_field_from_file.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/custom_borehole.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ top view of a borehole.
The following script generates boreholes with a single U-tube, a double U-tube (in series and
parallel configurations), and a coaxial borehole. The borehole cross-sections are then plotted.

The script is located in:
The script is located in:
`pygfunction/examples/custom_borehole.py`

.. literalinclude:: ../../../examples/custom_borehole.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/equal_inlet_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fluid temperature is compared to the *g*-functions obtained using boundary
conditions of uniform heat extraction rate and of uniform borehole wall
temperature.

The script is located in:
The script is located in:
`pygfunction/examples/equal_inlet_temperature.py`

.. literalinclude:: ../../../examples/equal_inlet_temperature.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/fluid_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The g-function of a single borehole is first calculated. Then, the borehole wall
temperature variations are calculated using the load aggregation scheme of
Claesson and Javed [1]_. The time-variation of heat extraction rates is given by
the synthetic load profile of Bernier et al. [2]_. Three pipe configurations are
compared: (1) a single U-tube, using the model of Eskilson and Claesson
compared: (1) a single U-tube, using the model of Eskilson and Claesson
[3]_, (2) a double U-tube in parallel, using the model of Cimmino [4]_, and (3)
a double U-tube in series, using the model of Cimmino [4]_.

The script is located in:
The script is located in:
`pygfunction/examples/fluid_temperature.py`

.. literalinclude:: ../../../examples/fluid_temperature.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/fluid_temperature_multiple_boreholes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ synthetic load profile of Bernier et al. [3]_. Predicted inlet and outlet fluid
temperatures of double U-tube boreholes are calculated using the model of
Cimmino [4]_.

The script is located in:
`pygfunction/examples/fluid_temperature.py`
The script is located in:
`pygfunction/examples/fluid_temperature_multiple_boreholes.py`

.. literalinclude:: ../../../examples/fluid_temperature_multiple_boreholes.py
:language: python
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/inclined_boreholes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ The script is located in:
.. rubric:: References
.. [1] Claesson J, and Eskilson, P. (1987). Conductive heat extraction by
thermally interacting deep boreholes, in "Thermal analysis of heat
extraction boreholes". Ph.D. Thesis, University of Lund, Lund, Sweden.
extraction boreholes". Ph.D. Thesis, University of Lund, Lund, Sweden.
2 changes: 1 addition & 1 deletion doc/source/examples/load_aggregation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the synthetic load profile of Bernier et al. [2]_.
The following script validates the load aggregation scheme with the exact
solution obtained from convolution in the Fourier domain (see ref. [3]_).

The script is located in:
The script is located in:
`pygfunction/examples/load_aggregation.py`

.. literalinclude:: ../../../examples/load_aggregation.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/mixed_inlet_conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ different lengths. The *g*-function considering piping conections is compared to
the *g*-function obtained using a boundary condition of uniform borehole wall
temperature.

The script is located in:
The script is located in:
`pygfunction/examples/mixed_inlet_conditions.py`

.. literalinclude:: ../../../examples/mixed_inlet_conditions.py
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/multiple_independent_Utubes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ independent U-tubes with different inlet fluid temperatures and different inlet
fluid mass flow rates. The resulting fluid temperature profiles are verified
against the fluid temeprature profiles presented by Cimmino [1]_.

The script is located in:
The script is located in:
`pygfunction/examples/multiple_independent_Utubes.py`

.. literalinclude:: ../../../examples/multiple_independent_Utubes.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/multipole_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ temperatures of 1 degC are evaluated. The temperatures in and around the
borehole with 2 pipes are then calculated. Results are verified against the
results of Claesson and Hellstrom [1]_.

The script is located in:
The script is located in:
`pygfunction/examples/multipole_temperature.py`

.. literalinclude:: ../../../examples/multipole_temperature.py
Expand All @@ -27,4 +27,4 @@ The script is located in:
.. rubric:: References
.. [1] Claesson, J., & Hellstrom, G. (2011). Multipole method to calculate
borehole thermal resistances in a borehole heat exchanger. HVAC&R Research,
17(6), 895-911.
17(6), 895-911.
2 changes: 1 addition & 1 deletion doc/source/examples/regular_bore_field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following script generates rectangular, box-shaped, U-shaped and L-shaped
bore fields in a 4 x 3 configuration as well as a circular field of 8
boreholes. Each field is then plotted on a separate figure.

The script is located in:
The script is located in:
`pygfunction/examples/regular_bore_field.py`

.. literalinclude:: ../../../examples/regular_bore_field.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/unequal_segments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Calculation of g-functions with unequal numbers of segments
***********************************************************

This example demonstrates the use of the :doc:`g-function <../modules/gfunction>` module
to calculate *g*-functions using a boundary condition of uniform and equal
to calculate *g*-functions using a boundary condition of uniform and equal
borehole wall temperature for all boreholes. The total rate of heat extraction
in the bore field is constant. The discretization along three of the boreholes is refined
for the calculation of the *g*-function and to draw the heat extraction rate profiles
Expand All @@ -14,7 +14,7 @@ along their lengths.
The following script generates the *g*-functions of a rectangular field of
6 x 4. *g*-Functions using equal and unequal numbers of segments are compared.

The script is located in:
The script is located in:
`pygfunction/examples/unequal_segments.py`

.. literalinclude:: ../../../examples/unequal_segments.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/uniform_heat_extraction_rate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Calculation of g-functions with uniform borehole heat extraction rates
**********************************************************************

This example demonstrates the use of the :doc:`g-function <../modules/gfunction>` module
to calculate *g*-functions using a boundary condition of uniform and equal
to calculate *g*-functions using a boundary condition of uniform and equal
heat extraction rate for all boreholes, constant in time.

The following script generates the *g*-functions of rectangular fields of
3 x 2, 6 x 4 and 10 x 10 boreholes. *g*-Functions are verified against the
*g*-functions presented by Cimmino and Bernier [1]_.

The script is located in:
The script is located in:
`pygfunction/examples/uniform_heat_extraction_rate.py`

.. literalinclude:: ../../../examples/uniform_heat_extraction_rate.py
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/uniform_temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Calculation of g-functions with uniform borehole wall temperature
*****************************************************************

This example demonstrates the use of the :doc:`g-function <../modules/gfunction>` module
to calculate *g*-functions using a boundary condition of uniform and equal
to calculate *g*-functions using a boundary condition of uniform and equal
borehole wall temperature for all boreholes. The total rate of heat extraction
in the bore field is constant.

The following script generates the *g*-functions of rectangular fields of
3 x 2, 6 x 4 and 10 x 10 boreholes. *g*-Functions are verified against the
*g*-functions presented by Cimmino and Bernier [1]_.

The script is located in:
The script is located in:
`pygfunction/examples/uniform_temperature.py`

.. literalinclude:: ../../../examples/uniform_temperature.py
Expand Down
Loading