Overview
A package containing functionality to compute ampacity line ratings for overhead lines. The package contains equations from CIGRE TB 601, CIGRE TB 207 and IEEE738.
Installation
pip install linerate
Documentation
This library is split into four main parts:
- The
equationsmodule, which contains one pure function for each equation in CIGRE TB 601, - the
typesmodule, which contains datatypes for conductors, weather parameters and spans, - the
modelmodule, which contains a wrapper classCigre601to easily compute the ampacity and conductor temperature based on aSpanandWeatherinstance, - and the
solvermodule, which contains a vectorized bisection solver for estimating the steady state ampacity and temperature of a conductor.
A typical user of this software package will only use the types and model module,
and the model module will then use functions from equations and solver to estimate the conductor temperature and ampacity. However, to understand the parameters, it may be useful to look at the functions
in the equations module, as we have taken care to ensure that the argument names stay consistent.
Below, we see an example of how to compute the conductor temperature based on Example B on page 79-81 in CIGRE TB 601.
import numpy as np
import linerate
conductor = linerate.Conductor(
core_diameter=10.4e-3,
conductor_diameter=28.1e-3,
outer_layer_strand_diameter=2.2e-3,
emissivity=0.9,
solar_absorptivity=0.9,
temperature1=25,
temperature2=75,
resistance_at_temperature1=7.283e-5,
resistance_at_temperature2=8.688e-5,
aluminium_cross_section_area=float("nan"), # No core magnetisation loss
constant_magnetic_effect=1,
current_density_proportional_magnetic_effect=0,
max_magnetic_core_relative_resistance_increase=1,
)
start_tower = linerate.Tower(latitude=50 - 0.0045, longitude=0, altitude=500 - 88)
end_tower = linerate.Tower(latitude=50 + 0.0045, longitude=0, altitude=500 + 88)
span = linerate.Span(
conductor=conductor,
start_tower=start_tower,
end_tower=end_tower,
num_conductors=1,
)
weather = linerate.Weather(
air_temperature=20,
wind_direction=np.radians(80), # Conductor azimuth is 0, so angle of attack is 80
wind_speed=1.66,
ground_albedo=0.15,
clearness_ratio=0.5,
)
time_of_measurement = np.datetime64("2016-10-03 14:00")
max_conductor_temperature = 100
current_load = 1000
model = linerate.Cigre601(span, weather, time_of_measurement)
conductor_rating = model.compute_steady_state_ampacity(max_conductor_temperature)
print(f"The span has a steady-state ampacity rating of {conductor_rating:.0f} A if the maximum temperature is {max_conductor_temperature} °C")
conductor_temperature = model.compute_conductor_temperature(current_load)
print(f"The conductor has a temperature of {conductor_temperature:.0f} °C when operated at {current_load} A")
Transient state solver
A basic solver for calculating short time thermal ratings is available through the method linerate.ThermalRatings.compute_transient_ampacity, which uses the extended conductor class linerate.ConductorWithHeatCapacity.
Development
Dependencies for the project are managed with uv. To install all dependencies run:
uv sync
Generate docs
To generate docs locally:
- Install required dependencies with
uv sync --group docs. - Generate docs with
uv run make htmlin thedocsfolder.
Release new version
Press the "Draft new release" button on the Releases page.
Choose or create an appropriate tag, e.g. 1.2.3.
Press "Generate release notes" to generate release notes.
Edit Release notes if necessary and press "Publish release".
This causes the publish workflow to run, which publishes the package to PyPI and generates docs on Github pages.
Metadata
Release files for linerate 5.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| linerate-5.0.0.tar.gz | 1.7 MB | Without provenance | Details for linerate-5.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linerate-5.0.0-py3-none-any.whl | Python 3 | none | any | Details for linerate-5.0.0-py3-none-any.whl |
Total release size: 1.7 MB
Release files / linerate-5.0.0.tar.gz
| Download URL | linerate-5.0.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c62f1150d6113c96fb46c4cda21a53a2fc6291ed0f7114968bcb766d7c9b01b1
|
|
BLAKE2b-256 checksum How to use checksums |
0b6cadf2853507ff7888e1221996353e63235ff5f9aee4dfd9ad8af96ff59777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / linerate-5.0.0-py3-none-any.whl
| Download URL | linerate-5.0.0-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c248990e6b5297d81e6c742bc963b4631e8729f42da6bba98d60fe6baf40bb6f
|
|
BLAKE2b-256 checksum How to use checksums |
c15400135bad038a5cbc2b7548e18fc98aeecd95a10d3fd293f134490301427e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for linerate 5.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.