pygfunction

An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.

https://github.com/massimocimmino/pygfunction

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    2 of 12 committers (16.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords from Contributors

degoogle
Last synced: 6 months ago · JSON representation ·

Repository

An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.

Basic Info
  • Host: GitHub
  • Owner: MassimoCimmino
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.35 MB
Statistics
  • Stars: 55
  • Watchers: 10
  • Forks: 22
  • Open Issues: 31
  • Releases: 16
Created over 8 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

pygfunction: A g-function calculator for Python

Tests DOI

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):

python 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

All Contributors <!-- ALL-CONTRIBUTORS-BADGE:END -->

Massimo Cimmino
Massimo Cimmino

💻 📖 💡 :rocket: 🤔 🚧 👀
Jack Cook
Jack Cook

💻 💡 🤔 📖
Matt Mitchell
Matt Mitchell

💻 🤔
Wouter Peere
Wouter Peere

💻 🤔 🐛
Tobias Blanke
Tobias Blanke

💻 🤔 🐛
Alex Swindler
Alex Swindler

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Owner

  • Name: Massimo Cimmino
  • Login: MassimoCimmino
  • Kind: user

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

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: 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

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 734
  • Total Committers: 12
  • Avg Commits per committer: 61.167
  • Development Distribution Score (DDS): 0.27
Past Year
  • Commits: 100
  • Committers: 7
  • Avg Commits per committer: 14.286
  • Development Distribution Score (DDS): 0.32
Top Committers
Name Email 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 (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 159
  • Total pull requests: 173
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 17
  • Total pull request authors: 8
  • Average comments per issue: 1.85
  • Average comments per pull request: 1.42
  • Merged pull requests: 145
  • Bot issues: 0
  • Bot pull requests: 9
Past Year
  • Issues: 9
  • Pull requests: 22
  • Average time to close issues: 23 days
  • Average time to close pull requests: 17 days
  • Issue authors: 3
  • Pull request authors: 5
  • Average comments per issue: 0.44
  • Average comments per pull request: 1.45
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • MassimoCimmino (100)
  • 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)
Pull Request Authors
  • MassimoCimmino (130)
  • j-c-cook (31)
  • mitchute (11)
  • allcontributors[bot] (10)
  • wouterpeere (7)
  • icupeiro (2)
  • axelstudios (2)
  • tblanke (1)
Top Labels
Issue Labels
feature (34) enhancement (30) bug (28) documentation (7) question (5) tests (3)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 3,627 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
  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 1.6%
Average: 4.1%
Dependent packages count: 6.5%
Last synced: 6 months ago
pypi.org: pygfunction

A g-function calculator for Python

  • Versions: 17
  • Dependent Packages: 3
  • Dependent Repositories: 2
  • Downloads: 3,627 Last month
  • Docker Downloads: 0
Rankings
Dependent packages count: 1.6%
Downloads: 6.3%
Average: 7.6%
Forks count: 8.3%
Stargazers count: 10.0%
Dependent repos count: 11.8%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/MassimoCimmino/pygfunction
  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 6 months ago

Dependencies

doc/requirements.txt pypi
  • 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
requirements.txt pypi
  • CoolProp *
  • matplotlib *
  • numpy *
  • scipy *
requirements_dev.txt pypi
  • 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
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi