Skip to main content

Calculations relative to temperature and ampacity in overhead conductors.

Project description

ThermOHL

MPL-2.0 License Quality Gate Status Lines of Code Coverage

pyodide

Temperature estimation of overhead line conductors is an important topic for TSOs for technical, economic, and safety-related reasons (DLR/ampacity, sag management ...). It depends on several factors, mainly transit, weather and the conductor properties. ThermOHL is a python package to compute temperature and/or ampacity in overhead line conductors.

Features

The temperature of a conductor is estimated by solving a heat equation which describes how temperature evolves over time, taking into account different power terms that either heat or cold the conductor (see next picture from CIGRE[1]).

image

Two heat equations (a more complete, third one is under development) are available:

  • one with a single temperature for the cable;
  • another with three temperatures (core, average and surface temperature) for more precise computations.

Each of these equations can be used with a set of pre-coded power terms from the literature :

  • one using CIGRE recommendations [1];
  • one using the IEEE standard [2];
  • two others from RTE departments.

Solvers derivated from heat equations can compute steady-state temperature or ampacity, and transient temperature. The set of parameter required depends on the power terms used, and default values are provided.

References

Users


Environment

ThermOHL is using pip for project and dependencies management. You need a compatible version of python (3.8 or higher). You may have to install it manually (e.g. with pyenv). Then you may create a virtualenv and activate it.

Set up thermohl

To install the package using uv, execute the following command:

    uv pip install "thermohl @ git+https://github.com/phlowers/thermohl"

Use it ! You can report to the user guide section.

    import thermohl
    print(thermohl.__version__)

Use it ! You can report to the user guide section.

    import thermohl
    print(thermohl.__version__)

Developers


Install the development dependencies and program scripts via

  uv pip install -e .
  uv sync --group dev

Build a new wheel via

  uv build --wheel

This build a wheel in newly-created dist/ directory

Building the documentation with mkdocs

First, make sure you have mkdocs and the Readthedocs theme installed.

If you use uv, open a terminal and enter the following commands:

  uv sync --group docs

Then, in the same terminal, build the doc with:

  • mkdocs serve - Start the live-reloading docs server.
  • mkdocs build - Build the documentation site.
  • mkdocs -h - Print help message and exit.

The documentation can then be accessed locally from http://127.0.0.1:8000.

Simple usage

Solvers in thermOHL take a dictionary as an argument, where all keys are strings and all values are either integers, floats or 1D numpy.ndarray of integers or floats. It is important to note that all arrays should have the same size. Missing or None values in the input dictionary are replaced with a default value, available using solver.default_values(), which are read from thermohl/default_values.yaml.

Example 1

This example uses the single-temperature heat equation (1t) with IEEE power terms and default values to compute the surface temperature (°C) of a conductor in steady-state regime along with the corresponding power terms (W.m-1).

from thermohl import solver

slvr = solver.ieee(dic=None, heateq='1t')
temp = slvr.steady_temperature() 

Results from the solver are returned in a pandas.DataFrame:

>>> print(temp)
           t   P_joule  P_solar  P_convection  P_radiation  P_precipitation
0  27.236417  0.273056  9.64051      6.587129     3.326436              0.0

Example 2

This example uses the same heat equation and power terms, but to compute the line ampacity (A), ie the maximum power intensity that can be used in a conductor without exceeding a specified maximal temperature (°C), along with the corresponding power terms (W.m-1). We can see that, for three different ambient temperature, we have three distinct ampacities (and the lower the ambient temperature, the higher the ampacity).

import numpy as np
from thermohl import solver

slvr = solver.ieee(dict(Ta=np.array([0., 15., 30.])), heateq='1t')
Tmax = 80.
imax = slvr.steady_intensity(Tmax)
>>> print(imax)
       transit    P_joule  P_solar  P_convection  P_radiation  P_precipitation
0  1606.398362  83.737734  9.64051     66.750785    26.627459              0.0
1  1408.025761  64.333311  9.64051     50.884473    23.089348              0.0
2  1184.741847  45.547250  9.64051     36.234737    18.953023              0.0

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

thermohl-1.4.0rc1.tar.gz (49.4 kB view details)

Uploaded Source

Built Distribution

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

thermohl-1.4.0rc1-py3-none-any.whl (68.9 kB view details)

Uploaded Python 3

File details

Details for the file thermohl-1.4.0rc1.tar.gz.

File metadata

  • Download URL: thermohl-1.4.0rc1.tar.gz
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thermohl-1.4.0rc1.tar.gz
Algorithm Hash digest
SHA256 468c5e9dd956d6d83bbd64abfd289d2e72a21f438b687eecdba8720a21f77a9a
MD5 a0a9d932062c61d5d4d1f85c888e502b
BLAKE2b-256 869789a3a5d55e01d344e3a0747aaad1802d047e18a21520e2102965d043eb86

See more details on using hashes here.

Provenance

The following attestation bundles were made for thermohl-1.4.0rc1.tar.gz:

Publisher: cd-pypi.yml on phlowers/thermohl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thermohl-1.4.0rc1-py3-none-any.whl.

File metadata

  • Download URL: thermohl-1.4.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 68.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thermohl-1.4.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 3687edd2c23ff36929e9b1c2aecc516f7684aaf9914c0fff2df2b6a205713f4c
MD5 93d87678abd61b57efd259933022a2e5
BLAKE2b-256 daa85d1a5a29ec7360b76a9ddec6c7d6f3a6bf43878e0976a3f0fa7b970e7e6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for thermohl-1.4.0rc1-py3-none-any.whl:

Publisher: cd-pypi.yml on phlowers/thermohl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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