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
buildings geothermal energyplus heatexchanger heatpump modelica modelica-library
Last synced: about 22 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 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-04T09:31:51.000Z (5 months ago)
- Last Synced: 2025-12-10T19:48:39.946Z (20 days ago)
- Language: Python
- Homepage:
- Size: 1.35 MB
- Stars: 58
- Watchers: 9
- Forks: 25
- Open Issues: 32
- Releases: 16
-
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.9. In addition, the
following packages are needed to run pygfunction and its examples:
- matplotlib (>= 3.9.2),
- numpy (>= 1.26.4)
- scipy (>= 1.13.1)
- SecondaryCoolantProps (>= 1.3)
- typing_extensions >= 4.11.0
The documentation is generated using Sphinx. The
following packages are needed to build the documentation:
- sphinx (>= 7.3.7)
- numpydoc (>= 1.7.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.3.0
date-released: 2025-04-29
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
- Create event: 10
- Release event: 1
- Issues event: 14
- Watch event: 7
- Delete event: 1
- Issue comment event: 33
- Push event: 32
- Pull request review event: 8
- Pull request review comment event: 15
- Pull request event: 20
- Fork event: 2
Last Year
- Create event: 8
- Release event: 1
- Issues event: 10
- Watch event: 3
- Issue comment event: 18
- Push event: 26
- Pull request review event: 8
- Pull request review comment event: 15
- Pull request event: 17
- Fork event: 1
Committers metadata
Last synced: 3 days ago
Total Commits: 734
Total Committers: 12
Avg Commits per committer: 61.167
Development Distribution Score (DDS): 0.27
Commits in past year: 42
Committers in past year: 5
Avg Commits per committer in past year: 8.4
Development Distribution Score (DDS) in past year: 0.429
| Name | Commits | |
|---|---|---|
| Massimo Cimmino | m****o@p****a | 536 |
| j-c-cook | j****k@o****u | 109 |
| Matt Mitchell | m****l@n****v | 28 |
| wouterpeere | w****e@h****m | 17 |
| allcontributors[bot] | 4****] | 13 |
| 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: 6 days ago
Total issues: 162
Total pull requests: 194
Average time to close issues: 3 months
Average time to close pull requests: about 1 month
Total issue authors: 18
Total pull request authors: 8
Average comments per issue: 1.8
Average comments per pull request: 1.37
Merged pull request: 161
Bot issues: 0
Bot pull requests: 10
Past year issues: 8
Past year pull requests: 21
Past year average time to close issues: 15 days
Past year average time to close pull requests: 15 days
Past year issue authors: 2
Past year pull request authors: 5
Past year average comments per issue: 0.13
Past year average comments per pull request: 0.86
Past year merged pull request: 11
Past year bot issues: 0
Past year bot pull requests: 2
Top Issue Authors
- MassimoCimmino (100)
- j-c-cook (34)
- wouterpeere (7)
- metab0t (3)
- jankoc (2)
- icupeiro (2)
- AlexLaferriere (2)
- OskarRaftegard (2)
- ikijano (1)
- fuma01 (1)
- RobSisson (1)
- sweco-bepedm (1)
- okolodaniel (1)
- Lamal177 (1)
- TobiasEnergyMachines (1)
Top Pull Request Authors
- MassimoCimmino (130)
- j-c-cook (31)
- mitchute (11)
- allcontributors[bot] (10)
- wouterpeere (7)
- icupeiro (2)
- axelstudios (2)
- tblanke (1)
Top Issue Labels
- feature (34)
- enhancement (30)
- bug (28)
- documentation (7)
- question (5)
- tests (3)
Top Pull Request Labels
Package metadata
- Total packages: 3
-
Total downloads:
- pypi: 8,653 last-month
- Total dependent packages: 3 (may contain duplicates)
- Total dependent repositories: 2 (may contain duplicates)
- Total versions: 49
- 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.3.1+incompatible (published 5 months ago)
- Last Synced: 2025-12-26T22:05:20.176Z (4 days ago)
- Versions: 16
- 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.3.1 (published 5 months ago)
- Last Synced: 2025-12-26T22:05:18.844Z (4 days ago)
- Versions: 17
- Dependent Packages: 3
- Dependent Repositories: 2
- Downloads: 8,653 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: bsd-3-clause
- Latest release: v2.3.1+incompatible (published 5 months ago)
- Last Synced: 2025-12-26T22:05:19.775Z (4 days ago)
- Versions: 16
- 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: 16.051070841566066