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.2 (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 NotImplementedYet (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 MissingParameter 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.4
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.2.3

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.2.3
File Size Uploaded Provenance Actions
bolts-0.2.3.tar.gz 136.3 kB With provenance Details for bolts-0.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 298.0 kB

Release files / bolts-0.2.3.tar.gz

Download URL bolts-0.2.3.tar.gz
Size 136.3 kB
Tags Source
SHA-256 checksum
How to use checksums
de16bfb6786f955ee67e76e8cfca46abe20e323e0c7aa89de11b19c3a6cec0e6
BLAKE2b-256 checksum
How to use checksums
d9488c4973c428f523e9923a0b4ad1c9339ce8a295783738f028333ab9c0675e
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 13, 2026.

Transparency log

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

Download URL bolts-0.2.3-py3-none-any.whl
Size 161.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6764512a3fb7a1a5d1eea2c6075120e2bccc1a93e851848155951395810357f6
BLAKE2b-256 checksum
How to use checksums
a91d1cfba77a67dbb95bc90ea0f723e6a1476fa2e25ff2229d53dcf38b1bd14e
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 13, 2026.

Transparency log

Security for bolts 0.2.3

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.2.3.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 13, 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