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.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.2.tar.gz (10.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.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytrt-0.0.2.tar.gz
  • Upload date:
  • Size: 10.8 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.2.tar.gz
Algorithm Hash digest
SHA256 998fe6dc67b33e71e16ef56abeb7487440ca79be102bd93da0c86a94c8a83baa
MD5 f20c7d3fcb44b1f1887217305f099864
BLAKE2b-256 e45766f023d7a6b2ce49a404e52fe73faafbb00d343218053820f2133b299d39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytrt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59b035d62f1caaebdda5bcacbc3705f6478e0b96094d7f315d086db59839afc0
MD5 166b2d1a68d745777e38a850e4d8b628
BLAKE2b-256 fb23a0da6e028452eb8fac3f096ff8234c96e250a4a589ae537fc4e95329005e

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