Skip to main content

A g-function calculator for Python

Project description

# pygfunction: A g-function calculator for Python

[![Build Status](https://travis-ci.org/MassimoCimmino/pygfunction.svg?branch=master)](https://travis-ci.org/MassimoCimmino/pygfunction) [![DOI](https://zenodo.org/badge/100305705.svg)](https://zenodo.org/badge/latestdoi/100305705)

## 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 positionned 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 time = [(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.uniform_temperature(boreField, time, alpha=1.0e-6) `

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 2.7 and supports Python 3.6. In addition, the following packages are needed to run pygfunction and its examples: - matplotlib (>= 1.5.3), required for the examples - numpy (>= 1.11.3) - scipy (>= 1.0.0)

The documentation is generated using [Sphinx](http://www.sphinx-doc.org). The following packages are needed to build the documentation: - sphinx (>= 1.5.1) - numpydoc (>= 0.6.0)

## Quick start

Users - [Download pip](https://pip.pypa.io/en/latest/) and install the latest release:

` pip install pygfunction `

Alternatively, [download the latest release](https://github.com/MassimoCimmino/pygfunction/releases) and run the installation script:

` python setup.py install `

Developers - To get the latest version of the code, you can [download the repository from github](https://github.com/MassimoCimmino/pygfunction) or clone the project in a local directory using git:

` git clone https://github.com/MassimoCimmino/pygfunction.git `

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](https://pygfunction.readthedocs.io).

## Contributing to pygfunction

You can report bugs and propose enhancements on the [issue tracker](https://github.com/MassimoCimmino/pygfunction/issues).

To contribute code to pygfunction, follow the [contribution workflow](CONTRIBUTING.md).

## License

pygfunction is licensed under the terms of the 3-clause BSD-license. See [pygfunction license](LICENSE.md).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygfunction-1.1.2.tar.gz (61.9 kB view details)

Uploaded Source

Built Distribution

pygfunction-1.1.2-py3-none-any.whl (80.5 kB view details)

Uploaded Python 3

File details

Details for the file pygfunction-1.1.2.tar.gz.

File metadata

  • Download URL: pygfunction-1.1.2.tar.gz
  • Upload date:
  • Size: 61.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pygfunction-1.1.2.tar.gz
Algorithm Hash digest
SHA256 ea60083b87ef9d99566148be66df3120bead726ee804c75f133a421a9cd46115
MD5 56a323bb269c5422c7b8ff98b9e54348
BLAKE2b-256 bd70f855a74f395c91b0357f467d731655e50166f9b5a424f1a4c801305fb4d9

See more details on using hashes here.

Provenance

File details

Details for the file pygfunction-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: pygfunction-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 80.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pygfunction-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0608721bea74c7920380dddd89a533be957e5da9171afcbcbb62cacbbe4adac5
MD5 28228b2cbf3214ee95f351fccb57bec3
BLAKE2b-256 93841d682c556baf91985b7fbfcd8b99d1ec7364df32c989146711a0deebd702

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page