Skip to main content

A package for TRT analysis

Project description

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

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

pytrt-0.0.3.tar.gz (12.4 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.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytrt-0.0.3.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytrt-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d977cc59444db0eb40b8861a1b57cf979569fe2e98769b24475dc8812753675f
MD5 a56204d7e65566a5e786744ecf62603c
BLAKE2b-256 52effcb62b558e1f884a8d554dc08e9036e4ec196492952cb36fc9ed3dc436e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytrt-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytrt-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1479878ab084e8476f625668bce75f581d2e2b10b3149a5a3704616f8ed1d93d
MD5 d051e80abb456aa76c2c8d2a8d62d81b
BLAKE2b-256 a5a8eef5868659bbbc9e916c368e8dd806e618c250800c4edc72ad85d59e6734

See more details on using hashes here.

Supported by

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