Skip to main content

BOLTS

Branching-unit and Optical-repeater power-feed Loop Transient Simulator.

BOLTS models the stress and vulnerability of submarine power-feed systems (the PFE, the cable, the repeaters and, next, branching units) under geomagnetic disturbances (GMD / space weather) first, then lightning and switching surges, and traces the consequences to loss of signal, failures and traffic loss.

tests build docs Docs PyPI Python versions codecov License: LGPL v3+ pre-commit Ruff Roadmap status Last commit Issues

📖 Documentation · 📦 PyPI · 🐙 GitHub · 🐛 Issues · 📜 Changelog · 🗺️ Roadmap

Status: v0.3 (alpha). Point-to-point GMD, PFE over-range stress, nonlinear protection devices (Newton solver) and earthing are implemented and validated; branching units and lightning are documented slots that raise NotImplementedYetError (see the roadmap).

What it does

A repeatered cable is a long series circuit fed with a constant current. A storm adds a voltage along the cable; the PFE changes its own voltage to keep the current constant, and the repeaters live on that current. BOLTS follows the chain

induced voltage -> PFE regulator and voltage range -> line current at every repeater -> pump power -> OSNR / Q margin -> terminal rate and traffic

with a modular, tested circuit solver (modified nodal analysis), parameters that carry their unit, status and source, and an independent ngspice cross-check.

Install

git clone <your repository URL> BOLTS && cd BOLTS
make env                  # conda env "bolts": python 3.12, numpy, scipy only
conda activate bolts
make dev                  # editable install with pytest, ruff, build, twine
make test

or pip install . in any Python >= 3.11 environment. Optional extras: plots (matplotlib), data (pandas), docs (Sphinx). ngspice (optional, system binary) enables the SPICE cross-check.

Quick start

import bolts

params = bolts.load_parameters(overrides={"pfe.max_voltage_kV_per_end": 0.75})   # a 1.5 kV total what-if
record = bolts.load_waveform("data/example_vind_1s.csv", params=params)           # your 1-second voltage record
net    = bolts.build_network(params, record)                                      # point-to-point: PFE, 13 spans, 12 repeaters
result = bolts.run_transient(net, params)
print(bolts.assess(result)["di_min_mA"])                                          # worst repeater current change, mA
bolts run --csv mydata.csv --start 3600 --end 4200 --scale 1.5 --set pfe.max_voltage_kV_per_end=2.5 --out outputs/run --plot
bolts params --status unknown        # what we still do not know
bolts validate                       # analytic validation cases
bolts spice --run                    # compare with ngspice
bolts doctor

Honest by design

Every parameter is value, unit, status, source with status sourced, assumed, unknown or override. An unknown value (TBD) raises MissingParameterError instead of being guessed. The shipped example record is synthetic. Vendor data (repeater circuit, PFE filter, branching-unit design) are mostly proprietary, so results are scenario ranges, not predictions.

Layout

Path What
src/bolts/config/ parameter store, provenance, defaults (TOML)
src/bolts/waveforms/, space_weather/ records (CSV, step, ramp, sine, double-exponential, Heidler) and the GMD source
src/bolts/properties/ cable R, L, G, C providers
src/bolts/elements/ cable segment, repeater, Zener, PFE, regulator, electrodes, lumped parts, and future device slots
src/bolts/network/, mna/, lines/ topology, modified nodal analysis, time integration
src/bolts/metrics/, impact/, damage/ current dip, headroom, device stress; optics and terminal; damage laws
src/bolts/earthing/, lightning/ earth formulas now; lightning slots for v0.2 to v0.5
src/bolts/spice/, validation/, studies/, plotting/, io/ ngspice export and compare, analytic cases, sweeps, figures, results
docs/ Read the Docs site (Sphinx, Markdown chapters)
tests/ one test file per module group

Develop

make help lists everything: test, cov, lint, fmt, docs, build, check, spice-check, tree, clean. See CONTRIBUTING.md and ROADMAP.md.

Making the repository private on GitHub (when you are ready)

gh repo create shibaji7/BOLTS --private --source . --remote origin
git push -u origin main

License and citation

Copyright (C) 2026 Shibaji Chakraborty. Licensed under the GNU Lesser General Public License v3.0 or later (LICENSE, with the GPL text in COPYING as the LGPL requires). Cite with CITATION.cff.

Metadata

Release files for bolts 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bolts 0.3.0
File Size Uploaded Provenance Actions
bolts-0.3.0.tar.gz 3.2 MB With provenance Details for bolts-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bolts 0.3.0
File Interpreter ABI Platform Actions
bolts-0.3.0-py3-none-any.whl Python 3 none any Details for bolts-0.3.0-py3-none-any.whl

Total release size: 3.4 MB

Release files / bolts-0.3.0.tar.gz

Download URL bolts-0.3.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4173a8b8daa85da7d0e1bf59a3f2bdd912cfe513acff62b0b092d7f78f34c9c2
BLAKE2b-256 checksum
How to use checksums
e04eb4f6a7f5af3c446e00880a319e362cbbdba99bc5a877f1fdce04de7f3622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Release files / bolts-0.3.0-py3-none-any.whl

Download URL bolts-0.3.0-py3-none-any.whl
Size 186.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3f7f95423797407f069e86e2d4a7c539c4da61f717704f4c2a59012b3dc131f
BLAKE2b-256 checksum
How to use checksums
2aed99bab672f832ed763cd6b5f37752ef2a3cf68710d076d11e6ec7cb4a8564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Security for bolts 0.3.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.

Select from 2 files

Attestation for bolts-0.3.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 Nov 16, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page