Skip to main content

Library for computing line ampacity ratings for overhead lines

Project description

Overview

A package containing functionality to compute ampacity line ratings for overhead lines. Currently, the package only contains equations from CIGRE TB 601.

Installation

pip install linerate

Documentation

This library is split into four main parts:

  1. The equations module, which contains one pure function for each equation in CIGRE TB 601,
  2. the types module, which contains datatypes for conductors, weather parameters and spans,
  3. the model module, which contains a wrapper class Cigre601 to easily compute the ampacity and conductor temperature based on a Span and Weather instance,
  4. and the solver module, 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

There is currently no transient solver or short time thermal rating solver, but that is on the roadmap.

Development

Dependencies for the project are managed with poetry. To install all dependencies run:

poetry install

Remember that when developing a library it is not recommended to commit the poetry.lock file.

Generate docs

To generate docs locally:

  • Install required dependencies with poetry install --with docs.
  • Generate docs with poetry run make html in the docs folder.

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.

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

linerate-2.0.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

linerate-2.0.0-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file linerate-2.0.0.tar.gz.

File metadata

  • Download URL: linerate-2.0.0.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for linerate-2.0.0.tar.gz
Algorithm Hash digest
SHA256 24e4f820338528eefa557f811a6b77c2d77aa9aaaed6339491d6b1cbe326fa0f
MD5 1cbc50b13351e4ee60cf71ba0a3a0d49
BLAKE2b-256 073e6726e78e3b550a2fe24928ee74fabae176c88e80d6839e9a3ef318f453c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for linerate-2.0.0.tar.gz:

Publisher: deploy.yml on statnett/linerate

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

File details

Details for the file linerate-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: linerate-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 41.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for linerate-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 578f9a494fe876f2a694850cdd6136ca95e9f756a69221331b50463730253a45
MD5 d0854c89f5024fdc4a66c716835f52d2
BLAKE2b-256 2bffbcb2d32fd462f4eb71c40b53a347448dd42570a0dff3196297d850bdaccf

See more details on using hashes here.

Provenance

The following attestation bundles were made for linerate-2.0.0-py3-none-any.whl:

Publisher: deploy.yml on statnett/linerate

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

Supported by

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