pygfunction
An open source toolbox for the evaluation of thermal response factors of geothermal borehole fields.
https://github.com/MassimoCimmino/pygfunction
Category: Renewable Energy
Sub Category: Geothermal Energy
Keywords from Contributors
geothermal modelica modelica-library heatexchanger heatpump energyplus simulator buildings
Last synced: about 19 hours ago
JSON representation
Repository metadata
An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.
- Host: GitHub
- URL: https://github.com/MassimoCimmino/pygfunction
- Owner: MassimoCimmino
- License: bsd-3-clause
- Created: 2017-08-14T20:13:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-25T07:57:44.000Z (3 days ago)
- Last Synced: 2025-04-26T13:42:26.302Z (2 days ago)
- Language: Python
- Homepage:
- Size: 1.13 MB
- Stars: 54
- Watchers: 10
- Forks: 22
- Open Issues: 33
- Releases: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Citation: CITATION.cff
README.md
pygfunction: A g-function calculator for Python
What is pygfunction?
pygfunction is a Python module for the calculation of thermal response
factors, or g-functions, for fields of geothermal boreholes. g-functions
form the basis of many simulation and sizing programs for geothermal heat pump
systems. g-Functions are superimposed in time to predict fluid and ground
temperatures in these systems.
At its core, pygfunction relies on the analytical finite line source solution
to evaluate the thermal interference between boreholes in the same bore field.
This allows for the very fast calculation of g-functions, even for very large
bore fields with hundreds of boreholes.
Using pygfunction, g-functions can be calculated for any bore field
configuration (i.e. arbitrarily positioned in space), including fields of
boreholes with individually different lengths and radiuses. For regular fields
of boreholes of equal size, setting-up the calculation of the g-function is
as simple as a few lines of code. For example, the code for the calculation of
the g-function of a 10 x 10 square array of boreholes (100 boreholes
total):
import pygfunction as gt
import numpy as np
time = np.array([(i+1)*3600. for i in range(24)]) # Calculate hourly for one day
boreField = gt.boreholes.rectangle_field(N_1=10, N_2=10, B_1=7.5, B_2=7.5, H=150., D=4., r_b=0.075)
gFunc = gt.gfunction.gFunction(boreField, alpha=1.0e-6, time=time)
gFunc.visualize_g_function()
Once the g-function is evaluated, pygfunction provides tools to predict
borehole temperature variations (using load aggregation methods) and to evaluate
fluid temperatures in the boreholes for several U-tube pipe configurations.
Requirements
pygfunction was developed and tested using Python 3.8. In addition, the
following packages are needed to run pygfunction and its examples:
- matplotlib (>= 3.8.4),
- numpy (>= 1.21.5)
- scipy (>= 1.7.3)
- SecondaryCoolantProps (>= 1.1)
- typing_extensions >= 4.0.1
The documentation is generated using Sphinx. The
following packages are needed to build the documentation:
- sphinx (>= 4.4.0)
- numpydoc (>= 1.2.0)
Quick start
Users - Download pip and install the latest release:
pip install pygfunction[plot]
Alternatively, download the latest release and run the installation script:
pip install .
Developers - To get the latest version of the code, you can download the
repository from github or clone
the project in a local directory using git:
git clone https://github.com/MassimoCimmino/pygfunction.git
Install pygfunction in development mode (this requires pip >= 21.1
):
pip install --editable .
Once pygfunction is copied to a local directory, you can verify that it is
working properly by running the examples in pygfunction/examples/
.
Documentation
pygfunction's documentation is hosted on
ReadTheDocs.
License
pygfunction is licensed under the terms of the 3-clause BSD-license.
See pygfunction license.
Contributing to pygfunction
You can report bugs and propose enhancements on the
issue tracker.
To contribute code to pygfunction, follow the
contribution workflow.
Contributors
This project follows the all-contributors specification. Contributions of any kind welcome!
Citation (CITATION.cff)
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.3 date-released: 2024-07-01 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
Owner metadata
- Name: Massimo Cimmino
- Login: MassimoCimmino
- Email:
- Kind: user
- Description:
- Website: https://www.polymtl.ca/expertises/en/cimmino-massimo
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/23085996?u=389b819cb55c6c6280881a4a89bda52f83b66a5f&v=4
- Repositories: 6
- Last ynced at: 2024-06-11T15:44:25.863Z
- Profile URL: https://github.com/MassimoCimmino
GitHub Events
Total
- Issues event: 9
- Watch event: 6
- Delete event: 1
- Issue comment event: 26
- Push event: 18
- Pull request review event: 4
- Pull request review comment event: 4
- Pull request event: 10
- Fork event: 2
- Create event: 5
Last Year
- Issues event: 9
- Watch event: 6
- Delete event: 1
- Issue comment event: 26
- Push event: 18
- Pull request review event: 4
- Pull request review comment event: 4
- Pull request event: 10
- Fork event: 2
- Create event: 5
Committers metadata
Last synced: 5 days ago
Total Commits: 698
Total Committers: 12
Avg Commits per committer: 58.167
Development Distribution Score (DDS): 0.264
Commits in past year: 97
Committers in past year: 7
Avg Commits per committer in past year: 13.857
Development Distribution Score (DDS) in past year: 0.216
Name | Commits | |
---|---|---|
Massimo Cimmino | m****o@p****a | 514 |
j-c-cook | j****k@o****u | 109 |
Matt Mitchell | m****l@n****v | 21 |
allcontributors[bot] | 4****] | 13 |
wouterpeere | w****e@h****m | 10 |
Massimo Cimmino | p****4@M****a | 10 |
j-c-cook | j****k@p****m | 6 |
Matt Mitchell | m****l@o****u | 6 |
Nathan Moore | n****e@n****v | 4 |
Alex Swindler | A****r@n****v | 2 |
u0112721 | u****1@s****e | 2 |
Edwin Lee | l****1@g****m | 1 |
Committer domains:
- nrel.gov: 3
- okstate.edu: 2
- set-l-me-l16007.luna.kuleuven.be: 1
- meca.polymtl.ca: 1
- polymtl.ca: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 160
Total pull requests: 166
Average time to close issues: 3 months
Average time to close pull requests: 29 days
Total issue authors: 17
Total pull request authors: 8
Average comments per issue: 1.86
Average comments per pull request: 1.4
Merged pull request: 145
Bot issues: 0
Bot pull requests: 8
Past year issues: 19
Past year pull requests: 27
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 6 days
Past year issue authors: 3
Past year pull request authors: 5
Past year average comments per issue: 0.79
Past year average comments per pull request: 0.81
Past year merged pull request: 23
Past year bot issues: 0
Past year bot pull requests: 1
Top Issue Authors
- MassimoCimmino (99)
- j-c-cook (34)
- wouterpeere (7)
- metab0t (3)
- jankoc (2)
- icupeiro (2)
- AlexLaferriere (2)
- OskarRaftegard (2)
- ikijano (1)
- fuma01 (1)
- sweco-bepedm (1)
- okolodaniel (1)
- Lamal177 (1)
- TobiasEnergyMachines (1)
- vitasoa (1)
Top Pull Request Authors
- MassimoCimmino (116)
- j-c-cook (28)
- allcontributors[bot] (8)
- mitchute (7)
- wouterpeere (3)
- icupeiro (2)
- axelstudios (1)
- tblanke (1)
Top Issue Labels
- feature (35)
- enhancement (30)
- bug (28)
- documentation (7)
- question (7)
- tests (3)
Top Pull Request Labels
Package metadata
- Total packages: 3
-
Total downloads:
- pypi: 3,575 last-month
- Total dependent packages: 3 (may contain duplicates)
- Total dependent repositories: 2 (may contain duplicates)
- Total versions: 43
- Total maintainers: 1
proxy.golang.org: github.com/massimocimmino/pygfunction
- Homepage:
- Documentation: https://pkg.go.dev/github.com/massimocimmino/pygfunction#section-documentation
- Licenses: bsd-3-clause
- Latest release: v2.2.3+incompatible (published 10 months ago)
- Last Synced: 2025-04-26T13:36:27.778Z (2 days ago)
- Versions: 14
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 1.622%
- Average: 4.057%
- Dependent packages count: 6.492%
pypi.org: pygfunction
A g-function calculator for Python
- Homepage: https://github.com/MassimoCimmino/pygfunction
- Documentation: https://pygfunction.readthedocs.io/
- Licenses: BSD 3-Clause License
- Latest release: 2.2.3 (published 10 months ago)
- Last Synced: 2025-04-26T13:36:27.389Z (2 days ago)
- Versions: 15
- Dependent Packages: 3
- Dependent Repositories: 2
- Downloads: 3,575 Last month
- Docker Downloads: 0
-
Rankings:
- Dependent packages count: 1.597%
- Downloads: 6.252%
- Average: 7.583%
- Forks count: 8.272%
- Stargazers count: 9.997%
- Dependent repos count: 11.798%
- Maintainers (1)
proxy.golang.org: github.com/MassimoCimmino/pygfunction
- Homepage:
- Documentation: https://pkg.go.dev/github.com/MassimoCimmino/pygfunction#section-documentation
- Licenses:
- Latest release: v2.2.3+incompatible (published 10 months ago)
- Last Synced: 2025-04-26T13:36:27.657Z (2 days ago)
- Versions: 14
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
Dependencies
- CoolProp >=6.4.1
- matplotlib >=3.5.1
- numpy >=1.21.5
- numpydoc >=1.2.0
- recommonmark >=0.6.0
- scipy >=1.7.3
- sphinx >=4.4.0
- CoolProp *
- matplotlib *
- numpy *
- scipy *
- numpydoc ==1.2.0
- pytest ==7.1.1
- pytest-cov ==3.0.0
- recommonmark ==0.6.0
- sphinx ==4.4.0
- tox ==3.24.5
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
Score: 15.134212138441017