Skip to main content

pyTRT

PyPI version Tests codecov Downloads Downloads Read the Docs

pyTRT is a python package with different methods for the interpretation of thermal response tests. The goal of this package is to bundle all available methodologies for TRT analysis so the user can easily compare one to another.

Currently, the following methods are implemented:

  • Traditional ILS, based on the work of (Gehlin, S., 2002)

Read The Docs

pyTRT has an elaborate documentation where all the functionalities of the tool are explained, with examples, literature and validation. This can be found on https://pytrt.readthedocs.io/en/latest/.

Requirements

This code is tested with Python 3.10, 3.11, 3.12 and 3.13 and requires the following libraries (the versions mentioned are the ones with which the code is tested)

  • numpy >= 1.26.4
  • pandas >= 1.4.3

For the tests

  • pytest >= 7.1.2

Quick start

Installation

One can install pyTRT by running Pip and running the command

pip install pyTRT

or one can install a newer development version using

pip install --extra-index-url https://test.pypi.org/simple/ pyTRT

Developers can clone this repository.

It is a good practise to use virtual environments (venv) when working on a (new) Python project so different Python and package versions don't conflict with eachother. For pyTRT, Python 3.9 or higher is recommended. General information about Python virtual environments can be found here and in this article.

Check installation

To check whether everything is installed correctly, run the following command

pytest --pyargs pyTRT

This runs some predefined cases to see whether all the internal dependencies work correctly. All test should pass successfully.

Getting started

In order to use pyTrt, one should first import the TRT measurement data. After that, any method inside pyTRT can be used for the analysis.

from pyTRT import TRTData, ILS

# import load
linz = TRTData('examples/data/Linz.csv', 't [s]', 'Tf [degC]', col_power='P [W]',
               decimal=',', undisturbed_ground=11.7)

# analyse the measurement data
result = ILS(linz, 150, 0.133 / 2, 2.3e6)

print(f'Thermal conductivity {result.thermal_conductivity}')
print(f'Effective borehole thermal resistance {result.borehole_resistance}')

Citation

If you use this python package, please cite it using the citation below.

Next to that, please cite the work of the author from which you used the methodology.

Traditional ILS

Gehlin, S., 2002. Thermal Response Test. Method, Development and Evaluation (Ph. D. dissertation). Department of Environmental Engineering, University of Lulea, Sweden.

Collaborate

There are many different methods for the analysis of TRT measurement data. If you have developed a method of your own and you want to include it in this package, you are encouraged to share this. Please follow the contribution workflow.

BSD 3-Clause License

Copyright (c) 2025, Wouter Peere

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

pyTRT's Changelog and future developments

The format is based on Keep a Changelog.

[0.0.4] - 2026-08-03

Added

  • Incremental ILS analysis

[0.0.3] - 2025-08-18

Added

  • Option to use GHEtool ground object in ILS.
  • Save a and b from correlation in data

Changed

  • Update documentation with installation instructions.
  • You can also use a file of pandas.DataFram for the TRTData class instead of a file location.

[0.0.2] - 2025-07-22

Changed

  • Update documentation with installation instructions.

0.0.1 - 2025-07-21

Added

  • First release of pyTRT with ILS method.

Download files

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

Source Distribution

pytrt-0.0.4.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytrt-0.0.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file pytrt-0.0.4.tar.gz.

File metadata

  • Download URL: pytrt-0.0.4.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pytrt-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3d45f0ef1791f5995fb2ac5e556b17d0792cfa34234ebf5b63f0a3d0c77094e7
MD5 e6e300f6f66db28af6f3cb0c083afc9a
BLAKE2b-256 1ffe7a92c08ea655f6f029e0ed2ef7b2d6fee4c6b8bab6ba6b2d0fdac1806c03

See more details on using hashes here.

File details

Details for the file pytrt-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pytrt-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pytrt-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8cb046cbb865f009117b9b59825034cf0922e7e8400abd98f37845a8046004
MD5 a3b38421cf150d58b64187e9c5da8e04
BLAKE2b-256 282b074646ab205f3dd9f41b064d2cd3ac823bd4721d87c74548682253a5bd3b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page