GHEDesigner

A Flexible and Automatic Ground Heat Exchanger Design Tool.
https://github.com/betsrg/ghedesigner

Category: Renewable Energy
Sub Category: Geothermal Energy

Keywords from Contributors

buildings energyplus

Last synced: about 6 hours ago
JSON representation

Repository metadata

Flexible and Automatic Ground Heat Exchanger Design Tool

README.md

GHEDesigner – A Flexible and Automatic Ground Heat Exchanger Design Tool

PyPI
PyPI - Downloads
Python Versions
Tests

Documentation

Project documentation is available at https://betsrg.github.io/GHEDesigner/

Introduction

GHEDesigner is a Python package for designing ground heat exchangers (GHE) used with ground source heat pump (GSHP)
systems. Compared to currently available tools such
as GLHEPRO, GHEDesigner:

  • is flexible. It can synthesize borehole fields that are custom fit to the user's property description,
  • implements the RowWise algorithm (Spitler, et al. 2022a) for
    automatically placing and sizing boreholes in any land area with complex geometry,
  • is highly automated. It can select library configurations or custom configurations and determine the final number and
    depth requirement of boreholes,
  • can make automated conversion of hourly loads to an improved hybrid time step
    representation (Cullin and Spitler 2011), and
  • is under continuing development at Oklahoma State University (OSU), Oak Ridge National Laboratory (ORNL), and the
    National Laboratory of the Rockies (NLR). (GLHEPRO remains under development at OSU.)

Background

GHEDesigner was originally funded through US Department of Energy contract DE-AC05-00OR22725 via a subcontract from Oak
Ridge National Laboratory. The project led by Dr. Xiaobing Liu developed an
online screening tool (Liu, et al. 2022)
for techno-economic analysis and design of ground-source heat pump systems. The Oklahoma State University team led by
Prof. Jeffrey D. Spitler was contracted to investigate fast methods for computing g-functions. An outgrowth of this
research was a tool for automatically selecting and sizing borehole configurations. This tool, originally called GHEDT,
is described in an MS thesis (Cook 2021). Since that time, the tool has been
renamed GHEDesigner, and work has continued at Oklahoma State University, Oak Ridge National Laboratory, and the
National Laboratory of the Rockies.

Updates since Cook (2021) include:

  • Development and addition of RowWise algorithm to efficiently place boreholes in the available land area.
  • Extensive refactoring for creating a user-focused, stable API.
  • Simplification of library dependencies.
  • Development of automated testing and deployment procedures.

Borehole Field Design Algorithms

  • Long time-step g-functions are calculated using pygfunction (Cimmino 2018) using the equivalent borehole
    method (Prieto and Cimmino 2021). It's also possible to read
    g-functions from a library (Spitler, et al. 2021).
  • Borehole thermal resistance is computed for single and double U-tube configurations via the multipole
    method (Claesson and Hellström 2011). For coaxial ground heat
    exchangers, it is computed from fundamental heat transfer relationships.
  • Short time-step g-functions are computed using the
    Xu and Spitler (2006) method.
  • GHEDesigner contains a novel design methodology for automated selection of borehole fields. The advanced methodology
    performs optimization based on a target drilling depth. An integer bisection routine is utilized to quickly search
    over a uni-modal domain of boreholes. GHEDesigner can consider the available land area for drilling and no-drilling
    zones defined as polygons.
  • GHEDesigner can synthesize a range of regularly shaped borehole configurations, including previously available
    shapes (rectangles, open rectangles, L-shape, U-shape, line) and shapes not previously available (C-shapes and zoned
    rectangles). More information about these shapes can be found in the documentation for a publicly available g-function
    library. (Spitler, et al. 2021, 2022b)
  • GHEDesigner can synthesize on the fly irregularly shaped borehole configurations using the RowWise
    algorithm (Spitler, et al. 2022a) or the bi-uniform polygonal constrained
    rectangular search (BUPCRS) (Cook 2021). Both configurations are adapted to the
    user-specified property boundaries and no-drill zones, if any. Spitler, et al. 2022a
    gives an example where the RowWise algorithm saves 12-18% compared to the BUPCRS algorithm. The RowWise algorithm takes
    longer to run, though.
  • A set of search routines can be used to size different types of configurations:
    • The unconstrained square/near-square search will search a domain of square (n x n) and near-square
      (n-1 x n) boreholes fields, with uniform spacing between the boreholes.
    • Uniform and bi-uniform constrained rectangular searches will search domains of rectangular configurations that
      have either uniform spacing or "bi-uniform" spacing – that is, uniform in the x direction and uniform in the y
      direction, but the two spacings may be different.
    • The bi-uniform constrained zoned rectangular search allows for rectangular configurations with different interior
      and perimeter spacings.
    • The bi-uniform polygonal constrained rectangular search (BUPCRS) can search configurations with an outer perimeter
      and no-go zones described as irregular polygons. This is still referred to as a rectangular search because it is
      still based on a rectangular grid, from which boreholes that are outside the perimeter or inside a no-go zone are
      removed.
    • The RowWise method generates and searches custom borehole fields that make full use of the available property. The
      RowWise algorithms are described by Spitler et al. (2022a).

Limitations

GHEDesigner does not have every feature that is found in a tool like GLHEPRO. Features that are currently missing
include:

  • Heat pumps are not modeled. Users input heat rejection/extraction rates.
  • An hourly simulation is available, but it doesn't make use of load aggregation, so is very slow.
  • GHEDesigner only covers vertical borehole ground heat exchangers. Horizontal ground heat exchangers are not treated.
  • GHEDesigner does not calculate the head loss in the ground heat exchanger or warn the user that head loss may be
    excessive.
  • GHEDesigner does not have a graphical user interface.
  • GHEDesigner is a Python package and requires some Python knowledge to use.

Requirements

GHEDesigner is supported for Python versions >= 3.10 and is tested with Python 3.10–3.14. GHEDesigner is dependent on
the following packages:

Quick Start

Users - Install GHEDesigner via the package installer for Python (pip):

pip install ghedesigner

Run a demo file using GHEDesigner:

ghedesigner demos/find_design_rectangle_single_u_tube.json ./tmp

Developers - Clone the repository via git:

git clone git@github.com:BETSRG/GHEDesigner.git
  • uv is used to manage the project & dependencies. After cloning, run
    uv sync.
  • Developers can then call pytest (which may take 10-30 minutes to run the full test suite) to confirm all dev
    dependencies have been installed and everything is working as expected.
  • Activate pre-commit (only required once, after cloning the repo) with:
    pre-commit install. On your first commit it will install the pre-commit environments, then run pre-commit hooks at
    every commit.
  • Before pushing to GitHub, run pre-commit on all files with pre-commit run -a to highlight any linting/formatting
    errors that will cause CI to fail.
  • PyCharm users may need to add Ruff as a 3rd-party plugin or install it as an
    external tool to their IDE to ensure linting & formatting is consistent.

Updating documentation

During development, we can serve docs locally and view updates with every save.

  1. Start a documentation update branch: git checkout -b <branch_name>
  2. Ensure that the environment variable LANGUAGE is set to en_US before running mkdocs serve to avoid babel errors
  3. uv run mkdocs serve
  4. Point browser to http://localhost:8000/

Questions

If there are any questions, comments or concerns please create an issue, comment on an open issue,
comment on a closed issue.

Acknowledgements

The initial release of this work was financially supported by the U.S. Department of Energy through research
subcontracts from Oak Ridge National Laboratory and the National Laboratory of the Rockies, and by OSU through the
Center for Integrated Building Systems, the OG&E Energy Technology Chair, and Oklahoma State University via return of
indirect costs to Dr. Jeffrey D. Spitler.

References


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 587
Total Committers: 10
Avg Commits per committer: 58.7
Development Distribution Score (DDS): 0.414

Commits in past year: 81
Committers in past year: 4
Avg Commits per committer in past year: 20.25
Development Distribution Score (DDS) in past year: 0.531

Name Email Commits
Matt Mitchell m****l@n****v 344
Edwin Lee l****1@g****m 98
Nathan Moore n****e@n****v 59
TNWest m****t@g****m 29
Alex Swindler A****r@n****v 25
Matt Mitchell m****l@o****u 24
TNWest u****t@g****m 3
jeffreyspitler s****r@o****u 2
Ishraque 5****8 2
MaHolb m****g@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 5 days ago

Total issues: 47
Total pull requests: 121
Average time to close issues: 4 months
Average time to close pull requests: 5 days
Total issue authors: 11
Total pull request authors: 7
Average comments per issue: 0.74
Average comments per pull request: 1.0
Merged pull request: 93
Bot issues: 0
Bot pull requests: 0

Past year issues: 2
Past year pull requests: 24
Past year average time to close issues: 1 day
Past year average time to close pull requests: 10 days
Past year issue authors: 2
Past year pull request authors: 6
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.5
Past year merged pull request: 10
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/betsrg/ghedesigner

Top Issue Authors

  • mitchute (30)
  • TNWest (8)
  • NicholasFry (1)
  • apreimann (1)
  • tanushree04 (1)
  • Vbraciszewski (1)
  • RobertNewton-Nomura (1)
  • p-klebo (1)
  • vtnate (1)
  • LoneMeertens (1)
  • Myoldmopar (1)

Top Pull Request Authors

  • mitchute (82)
  • axelstudios (13)
  • vtnate (10)
  • Myoldmopar (7)
  • TNWest (7)
  • thaque25 (1)
  • DrewMcNair (1)

Top Issue Labels

  • enhancement (18)
  • bug (6)
  • refactoring (2)
  • documentation (2)
  • good first issue (1)

Top Pull Request Labels

  • enhancement (31)
  • refactoring (16)
  • bug (15)
  • documentation (8)
  • help wanted (1)

Dependencies

.github/workflows/tests.yml actions
  • abatilo/actions-poetry v3 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/release.yml actions
  • abatilo/actions-poetry v3 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/install.yml actions
  • abatilo/actions-poetry v3 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
pyproject.toml pypi
  • mkdocs-material ^9.5 develop
  • mkdocs-schema-reader ^0.11.1 develop
  • mkdocstrings ^0.27.0 develop
  • pre-commit ^4.0.0 develop
  • pytest ^8.0.0 develop
  • pytest-cov ^6.0.0 develop
  • pytest-xdist ^3.6 develop
  • recursive-diff ^1.1.0 develop
  • bhresist ^0.2.0
  • click ^8.1
  • jsonschema ^4.19
  • numpy ^2.0.0
  • pygfunction ^2.3.1
  • python >=3.10, <3.14
  • scipy ^1.14
  • secondarycoolantprops ^1.3
poetry.lock pypi
  • babel 2.17.0 develop
  • backrefs 5.9 develop
  • certifi 2025.7.14 develop
  • cfgv 3.4.0 develop
  • charset-normalizer 3.4.2 develop
  • click 8.2.1 develop
  • colorama 0.4.6 develop
  • coverage 7.9.2 develop
  • distlib 0.4.0 develop
  • exceptiongroup 1.3.0 develop
  • execnet 2.1.1 develop
  • filelock 3.18.0 develop
  • ghp-import 2.1.0 develop
  • griffe 1.7.3 develop
  • identify 2.6.12 develop
  • idna 3.10 develop
  • iniconfig 2.1.0 develop
  • jinja2 3.1.6 develop
  • jsonschema2md 1.6.1 develop
  • markdown 3.8.2 develop
  • markupsafe 3.0.2 develop
  • mergedeep 1.3.4 develop
  • mkdocs 1.6.1 develop
  • mkdocs-autorefs 1.4.2 develop
  • mkdocs-get-deps 0.2.0 develop
  • mkdocs-material 9.6.15 develop
  • mkdocs-material-extensions 1.3.1 develop
  • mkdocs-schema-reader 0.11.1 develop
  • mkdocstrings 0.27.0 develop
  • mkdocstrings-python 1.13.0 develop
  • nodeenv 1.9.1 develop
  • numpy 2.3.1 develop
  • numpy 2.2.6 develop
  • packaging 25.0 develop
  • paginate 0.5.7 develop
  • pandas 2.3.1 develop
  • pathspec 0.12.1 develop
  • platformdirs 4.3.8 develop
  • pluggy 1.6.0 develop
  • pre-commit 4.2.0 develop
  • pygments 2.19.2 develop
  • pymdown-extensions 10.16 develop
  • pytest 8.4.1 develop
  • pytest-cov 6.2.1 develop
  • pytest-xdist 3.8.0 develop
  • python-dateutil 2.9.0.post0 develop
  • pytz 2025.2 develop
  • pyyaml 6.0.2 develop
  • pyyaml-env-tag 1.1 develop
  • recursive-diff 1.2.0 develop
  • requests 2.32.4 develop
  • six 1.17.0 develop
  • tomli 2.2.1 develop
  • typing-extensions 4.14.1 develop
  • tzdata 2025.2 develop
  • urllib3 2.5.0 develop
  • virtualenv 20.31.2 develop
  • watchdog 6.0.0 develop
  • xarray 2025.6.1 develop
  • xarray 2025.7.1 develop
  • attrs 25.3.0
  • bhresist 0.2.0
  • click 8.2.1
  • colorama 0.4.6
  • jsonschema 4.25.0
  • jsonschema-specifications 2025.4.1
  • numpy 2.2.6
  • numpy 2.3.1
  • pygfunction 2.3.1
  • referencing 0.36.2
  • rpds-py 0.26.0
  • scipy 1.15.3
  • scipy 1.16.0
  • secondarycoolantprops 1.3
  • typing-extensions 4.14.1
.github/workflows/mkdocs.yml actions
  • abatilo/actions-poetry v3 composite
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite

Score: 6.063785208687609