Calculations relative to temperature and ampacity in overhead conductors.
Project description
ThermOHL
Thermohl is a python package allowing the computation of the temperature in overhead conductors for given transit intensity and environment parameters, or to compute the maximum possible transit intensity given a maximum temperature and environment parameters. A collection of models based on the Energy Balance Principle are available.
Main features
Three different solvers are available in the package:
- computation of the steady-state temperature;
- computation of the transient temperature;
- computation of the maximum possible steady-state transit intensity.
All solvers are based on the Energy Balance Principle, where the various power terms are calculated from one of four available models: a CIGRE and an IEEE model as well as two RTE-specific models, OLLA (R&D) and RTE.
Both steady-state solvers can be used for probabilistic simulations with random input parameters using the Monte Carlo method. Uncertainty quantification can be performed through statistics on the random simulation outputs, as well as through a sensitivity analysis using Sobol indices which allows ranking random input parameters according to their contribution to the total variance of the output.
Installation
Using pip
To install the package using pip, execute the following command:
python -m pip install thermohl@git+https://github.com/phlowers/thermohl
Development
Install the development dependencies and program scripts via
pip install -e .[dev]
Build a new wheel via
pip install build
python -m 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 pip, open a terminal and enter the following commands:
pip install -e .[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 IEEE model with default values to compute the surface temperature (°C) of a conductor in steady regime along with the corresponding power terms (W.m-1) in the Energy Balance Principle.
from thermohl import solver
slvr = solver.ieee({})
temp = slvr.steady_temperature()
Results from the solver are returned in a pandas.DataFrame:
>>> print(temp)
T_surf P_joule P_solar P_convection P_radiation P_precipitation
0 27.22858 0.273048 9.64051 6.5819 3.331658 0.0
Example 2
This example uses the IEEE model to compute the maximum current intensity (A) that can be used in a conductor without exceeding a specified maximal temperature (°C), along with the corresponding power terms (W.m-1) in the Energy Balance Principle. Three ambient temperatures are specified as inputs, meaning that three corresponding maximal intensities will be returned by the solver.
import numpy as np
from thermohl import solver
slvr = solver.ieee(dict(Ta=np.array([0., 15., 30.])))
Tmax = 80.
imax = slvr.steady_intensity(Tmax)
>>> print(imax)
I_max P_joule P_solar P_convection P_radiation P_precipitation
0 1606.946066 83.794845 9.64051 66.750785 26.684570 0.0
1 1408.560563 64.382191 9.64051 50.884473 23.138228 0.0
2 1185.256686 45.586844 9.64051 36.234737 18.992617 0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thermohl-1.3.2rc1.tar.gz.
File metadata
- Download URL: thermohl-1.3.2rc1.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe160a4eefaa69af46174dba7f86483fc96ad2b633bcdcea6a4a7758374b6536
|
|
| MD5 |
96c4099674c75d2308ed85ea55ba296d
|
|
| BLAKE2b-256 |
ab66bee64409b595b91372a3c30d0d912ff0db5b64679bafc6d8a64df4f48086
|
Provenance
The following attestation bundles were made for thermohl-1.3.2rc1.tar.gz:
Publisher:
cd-pypi.yml on phlowers/thermohl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermohl-1.3.2rc1.tar.gz -
Subject digest:
fe160a4eefaa69af46174dba7f86483fc96ad2b633bcdcea6a4a7758374b6536 - Sigstore transparency entry: 338817420
- Sigstore integration time:
-
Permalink:
phlowers/thermohl@fe323caa7220baf27354c763ee2434500d1f1b56 -
Branch / Tag:
refs/tags/v1.3.2-rc1 - Owner: https://github.com/phlowers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-pypi.yml@fe323caa7220baf27354c763ee2434500d1f1b56 -
Trigger Event:
release
-
Statement type:
File details
Details for the file thermohl-1.3.2rc1-py3-none-any.whl.
File metadata
- Download URL: thermohl-1.3.2rc1-py3-none-any.whl
- Upload date:
- Size: 67.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bf3dbe9aef88dda82c5f7b733da97678cb152d70d27a81eb6952e08e5f60043
|
|
| MD5 |
8f9384d85fa223752ddb9ca571ef4b0e
|
|
| BLAKE2b-256 |
a078ee1cc30e0c80eb9ccbd1ca203e0f5a453a81b8aad85726669c164c79addb
|
Provenance
The following attestation bundles were made for thermohl-1.3.2rc1-py3-none-any.whl:
Publisher:
cd-pypi.yml on phlowers/thermohl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermohl-1.3.2rc1-py3-none-any.whl -
Subject digest:
2bf3dbe9aef88dda82c5f7b733da97678cb152d70d27a81eb6952e08e5f60043 - Sigstore transparency entry: 338817432
- Sigstore integration time:
-
Permalink:
phlowers/thermohl@fe323caa7220baf27354c763ee2434500d1f1b56 -
Branch / Tag:
refs/tags/v1.3.2-rc1 - Owner: https://github.com/phlowers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-pypi.yml@fe323caa7220baf27354c763ee2434500d1f1b56 -
Trigger Event:
release
-
Statement type: