refa
Reconductoring Economic and Financial Analysis (REFA) Tool.
The refa python module, based on the publicaly-available REFA tool, aims to unlock more flexible cases of project cost evaluation and enable advanced extensions by developers.
The REFA tool helps grid planners and policy makers understand the financial and economic costs of different capacity upgrade projects. The tool compares projects under the same economic basis by evaluating the net-present value of costs (NPC), while considering both conventional and advanced conductors.
Features
- Techno-economic Analysis — NPC analysis considering key economic parameters, e.g. cost of capital, inflation, and replacement of structures and conductors
- Ampacity — IEEE 738 steady-state thermal rating
- Temperature and Resistance — IEEE 738 steady-state temperature and resistance at specified current
- Sag-tension — CIGRÉ TB-324 with NESC 250B loading profiles
- Resistive Line Losses — Resistive line losses based on calculated condutor resistance and user-specified load factor
- Congestion — Modeling of congestion due to ampacity limits
- Conductor database — Example conductors
- Corona Discharge — Inception voltage and voltage gradient calculations
- AC and DC — Separate models for AC and HVDC lines
Installation
pip install refa
Quick Start
from refa import Line, LineDesign, Conductor, Environment
from refa.defaults import default_conductor, default_clear_environment, acsr_795_0_drake
from refa.standards import nesc_250b_heavy
# Build a line
env = default_clear_environment()
conductor = default_conductor()
print(conductor)
line_design = LineDesign(
nbr_circuits=1,
nbr_bundles=3,
nbr_conds_per_bundle=1,
length_km=25,
avg_span_m=300,
max_span_m=350,
environment=env,
)
line = Line(line_design=line_design, conductor=conductor)
# Check ampacity
print(line.ampacity_at_environment())
# Check feasibility
print(line.is_ampacity_feasible(current_a=1500))
print(line.is_sag_feasible(current_a=1500, max_sag_m=7, loading_conditions=nesc_250b_heavy()))
# Load a typical conductor
drake = acsr_795_0_drake()
Project Analysis
from refa import Reconductoring, Economics
from refa.defaults import default_economics, acsr_795_0_drake, acsr_556_5_dove
economics = default_economics()
project = Reconductoring(
conductor_list=[acsr_795_0_drake(), acsr_556_5_dove()],
line_design=line_design,
economics=economics,
power_mw=150,
voltage_kv=115,
structure_remaining_life=25
)
results = project.total_costs(time_horizon=65)
Standards Supported
- IEEE 738 — Standard for calculating the current-temperature relationship of bare overhead conductors
- CIGRÉ 324 — Sag-tension calculation methods for overhead lines
- NESC 250B — National Electrical Safety Code loading districts (heavy, medium, light, warm islands)
Project Structure
refamodule/
├── src/refa/ # Package source
│ ├── _version.py
│ ├── conductor.py
│ ├── economics.py
│ ├── environment.py
│ ├── line.py
│ ├── line_design.py
│ ├── loading.py
│ ├── project.py
│ ├── structure_config.py
│ ├── data/
│ │ └── conductors.csv # Bundled conductor database
│ ├── defaults/ # Default configurations
│ └── standards/ # NESC loading profiles
├── examples/
│ └── refa_module_workflow.ipynb
├── tests/
├── pyproject.toml
├── README.md
├── LICENSE
└── CHANGELOG.md
License
See LICENSE — REFA is licensed under the Lawrence Berkeley National Laboratory End User License Agreement (EULA). Use of this software constitutes acceptance of those terms.
Metadata
Release files for refa 0.2.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 |
|---|---|---|---|---|
| refa-0.2.0.tar.gz | 70.8 kB | With provenance | Details for refa-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| refa-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for refa-0.2.0-py3-none-any.whl |
Total release size: 135.3 kB
Release files / refa-0.2.0.tar.gz
| Download URL | refa-0.2.0.tar.gz |
|---|---|
| Size | 70.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a4b7ab64b8a8b24f53d8677d18df2d918e7d7442d15e4b740684a10cb14a2d5
|
|
BLAKE2b-256 checksum How to use checksums |
507ef64076679ebdc17f6c7ddeaa841b85874a1b45f121e8d478fda33f3520bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / refa-0.2.0-py3-none-any.whl
| Download URL | refa-0.2.0-py3-none-any.whl |
|---|---|
| Size | 64.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d30562ff79a22e3372a984c8066891c839dc51213ddb2b1434843e4c9519f828
|
|
BLAKE2b-256 checksum How to use checksums |
a5f3962efc3b4abbd37e0729a81bdbd70206e3a6cba1ac2864c00da80fbac5da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logSecurity for refa 0.2.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for refa-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logA 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.