bolts 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bolts-0.2.1/CHANGELOG.md +46 -0
- bolts-0.2.1/CITATION.cff +13 -0
- bolts-0.2.1/COPYING +674 -0
- bolts-0.2.1/LICENSE +165 -0
- bolts-0.2.1/MANIFEST.in +3 -0
- bolts-0.2.1/PKG-INFO +154 -0
- bolts-0.2.1/README.md +110 -0
- bolts-0.2.1/pyproject.toml +69 -0
- bolts-0.2.1/setup.cfg +4 -0
- bolts-0.2.1/src/bolts/__init__.py +22 -0
- bolts-0.2.1/src/bolts/__main__.py +8 -0
- bolts-0.2.1/src/bolts/_version.py +5 -0
- bolts-0.2.1/src/bolts/api.py +76 -0
- bolts-0.2.1/src/bolts/cli.py +168 -0
- bolts-0.2.1/src/bolts/config/__init__.py +2 -0
- bolts-0.2.1/src/bolts/config/defaults/bu.toml +6 -0
- bolts-0.2.1/src/bolts/config/defaults/cable.toml +18 -0
- bolts-0.2.1/src/bolts/config/defaults/earthing.toml +10 -0
- bolts-0.2.1/src/bolts/config/defaults/forcing.toml +10 -0
- bolts-0.2.1/src/bolts/config/defaults/lightning.toml +5 -0
- bolts-0.2.1/src/bolts/config/defaults/optical.toml +19 -0
- bolts-0.2.1/src/bolts/config/defaults/pfe.toml +21 -0
- bolts-0.2.1/src/bolts/config/defaults/repeater.toml +14 -0
- bolts-0.2.1/src/bolts/config/defaults/solver.toml +3 -0
- bolts-0.2.1/src/bolts/config/loader.py +76 -0
- bolts-0.2.1/src/bolts/config/overrides.py +23 -0
- bolts-0.2.1/src/bolts/config/provenance.py +56 -0
- bolts-0.2.1/src/bolts/config/schema.py +78 -0
- bolts-0.2.1/src/bolts/config/validate.py +28 -0
- bolts-0.2.1/src/bolts/constants.py +6 -0
- bolts-0.2.1/src/bolts/damage/__init__.py +2 -0
- bolts-0.2.1/src/bolts/damage/arrester_energy.py +11 -0
- bolts-0.2.1/src/bolts/damage/criteria.py +11 -0
- bolts-0.2.1/src/bolts/damage/insulation_withstand.py +29 -0
- bolts-0.2.1/src/bolts/damage/thermal_i2t.py +11 -0
- bolts-0.2.1/src/bolts/earthing/__init__.py +2 -0
- bolts-0.2.1/src/bolts/earthing/electrode_resistance.py +38 -0
- bolts-0.2.1/src/bolts/earthing/gpr.py +31 -0
- bolts-0.2.1/src/bolts/earthing/impulse_impedance.py +11 -0
- bolts-0.2.1/src/bolts/earthing/soil.py +17 -0
- bolts-0.2.1/src/bolts/elements/__init__.py +42 -0
- bolts-0.2.1/src/bolts/elements/arrester.py +16 -0
- bolts-0.2.1/src/bolts/elements/base.py +24 -0
- bolts-0.2.1/src/bolts/elements/beach_joint.py +29 -0
- bolts-0.2.1/src/bolts/elements/branching_unit.py +19 -0
- bolts-0.2.1/src/bolts/elements/cable_segment.py +41 -0
- bolts-0.2.1/src/bolts/elements/coil.py +25 -0
- bolts-0.2.1/src/bolts/elements/diode_chain.py +79 -0
- bolts-0.2.1/src/bolts/elements/earth_electrode.py +25 -0
- bolts-0.2.1/src/bolts/elements/fit_zener.py +11 -0
- bolts-0.2.1/src/bolts/elements/land_cable.py +12 -0
- bolts-0.2.1/src/bolts/elements/lumped.py +72 -0
- bolts-0.2.1/src/bolts/elements/pfe.py +31 -0
- bolts-0.2.1/src/bolts/elements/pfe_converter_bank.py +34 -0
- bolts-0.2.1/src/bolts/elements/pfe_filter.py +37 -0
- bolts-0.2.1/src/bolts/elements/pfe_regulator.py +54 -0
- bolts-0.2.1/src/bolts/elements/pump_laser.py +45 -0
- bolts-0.2.1/src/bolts/elements/relay.py +19 -0
- bolts-0.2.1/src/bolts/elements/repeater.py +34 -0
- bolts-0.2.1/src/bolts/elements/shunt_fault.py +19 -0
- bolts-0.2.1/src/bolts/elements/zener.py +101 -0
- bolts-0.2.1/src/bolts/errors.py +32 -0
- bolts-0.2.1/src/bolts/impact/__init__.py +2 -0
- bolts-0.2.1/src/bolts/impact/optical.py +120 -0
- bolts-0.2.1/src/bolts/impact/terminal.py +114 -0
- bolts-0.2.1/src/bolts/io/__init__.py +2 -0
- bolts-0.2.1/src/bolts/io/manifest.py +24 -0
- bolts-0.2.1/src/bolts/io/readers.py +22 -0
- bolts-0.2.1/src/bolts/io/writers.py +42 -0
- bolts-0.2.1/src/bolts/lightning/__init__.py +2 -0
- bolts-0.2.1/src/bolts/lightning/coupling.py +11 -0
- bolts-0.2.1/src/bolts/lightning/monte_carlo.py +11 -0
- bolts-0.2.1/src/bolts/lightning/protection_stage.py +11 -0
- bolts-0.2.1/src/bolts/lightning/statistics.py +11 -0
- bolts-0.2.1/src/bolts/lightning/stroke_parameters.py +11 -0
- bolts-0.2.1/src/bolts/lines/__init__.py +2 -0
- bolts-0.2.1/src/bolts/lines/bergeron.py +13 -0
- bolts-0.2.1/src/bolts/lines/lumped_ladder.py +19 -0
- bolts-0.2.1/src/bolts/lines/sectioning.py +17 -0
- bolts-0.2.1/src/bolts/lines/telegrapher.py +29 -0
- bolts-0.2.1/src/bolts/metrics/__init__.py +2 -0
- bolts-0.2.1/src/bolts/metrics/current_dip.py +22 -0
- bolts-0.2.1/src/bolts/metrics/device_stress.py +22 -0
- bolts-0.2.1/src/bolts/metrics/energy.py +11 -0
- bolts-0.2.1/src/bolts/metrics/headroom.py +20 -0
- bolts-0.2.1/src/bolts/metrics/pfe_stress.py +48 -0
- bolts-0.2.1/src/bolts/metrics/voltage_extremes.py +20 -0
- bolts-0.2.1/src/bolts/mna/__init__.py +2 -0
- bolts-0.2.1/src/bolts/mna/assemble.py +107 -0
- bolts-0.2.1/src/bolts/mna/dc_op.py +19 -0
- bolts-0.2.1/src/bolts/mna/integrators.py +31 -0
- bolts-0.2.1/src/bolts/mna/linear_solve.py +18 -0
- bolts-0.2.1/src/bolts/mna/newton.py +110 -0
- bolts-0.2.1/src/bolts/mna/stamp.py +158 -0
- bolts-0.2.1/src/bolts/mna/timestep.py +21 -0
- bolts-0.2.1/src/bolts/mna/transient.py +193 -0
- bolts-0.2.1/src/bolts/mna/window_run.py +15 -0
- bolts-0.2.1/src/bolts/network/__init__.py +2 -0
- bolts-0.2.1/src/bolts/network/builder.py +20 -0
- bolts-0.2.1/src/bolts/network/graph.py +43 -0
- bolts-0.2.1/src/bolts/network/power_modes.py +30 -0
- bolts-0.2.1/src/bolts/network/segments.py +11 -0
- bolts-0.2.1/src/bolts/network/switch_states.py +12 -0
- bolts-0.2.1/src/bolts/network/topology_p2p.py +95 -0
- bolts-0.2.1/src/bolts/network/topology_trunk_branch.py +11 -0
- bolts-0.2.1/src/bolts/network/validate.py +36 -0
- bolts-0.2.1/src/bolts/plotting/__init__.py +2 -0
- bolts-0.2.1/src/bolts/plotting/network.py +52 -0
- bolts-0.2.1/src/bolts/plotting/style.py +79 -0
- bolts-0.2.1/src/bolts/plotting/timeseries.py +54 -0
- bolts-0.2.1/src/bolts/properties/__init__.py +19 -0
- bolts-0.2.1/src/bolts/properties/base.py +26 -0
- bolts-0.2.1/src/bolts/properties/catalog.py +18 -0
- bolts-0.2.1/src/bolts/properties/constant.py +29 -0
- bolts-0.2.1/src/bolts/properties/depth_profile.py +44 -0
- bolts-0.2.1/src/bolts/properties/factory.py +52 -0
- bolts-0.2.1/src/bolts/properties/freq_dependent.py +18 -0
- bolts-0.2.1/src/bolts/properties/section_table.py +73 -0
- bolts-0.2.1/src/bolts/properties/temperature_R.py +31 -0
- bolts-0.2.1/src/bolts/py.typed +0 -0
- bolts-0.2.1/src/bolts/registry.py +64 -0
- bolts-0.2.1/src/bolts/result.py +144 -0
- bolts-0.2.1/src/bolts/space_weather/__init__.py +2 -0
- bolts-0.2.1/src/bolts/space_weather/from_efield.py +13 -0
- bolts-0.2.1/src/bolts/space_weather/gmd_source.py +28 -0
- bolts-0.2.1/src/bolts/space_weather/synthetic.py +74 -0
- bolts-0.2.1/src/bolts/spice/__init__.py +2 -0
- bolts-0.2.1/src/bolts/spice/compare.py +14 -0
- bolts-0.2.1/src/bolts/spice/netlist.py +95 -0
- bolts-0.2.1/src/bolts/spice/run_ngspice.py +39 -0
- bolts-0.2.1/src/bolts/studies/__init__.py +2 -0
- bolts-0.2.1/src/bolts/studies/map2d.py +19 -0
- bolts-0.2.1/src/bolts/studies/sensitivity.py +22 -0
- bolts-0.2.1/src/bolts/studies/sweep.py +17 -0
- bolts-0.2.1/src/bolts/units.py +28 -0
- bolts-0.2.1/src/bolts/validation/__init__.py +11 -0
- bolts-0.2.1/src/bolts/validation/_case.py +20 -0
- bolts-0.2.1/src/bolts/validation/diode_clamp.py +38 -0
- bolts-0.2.1/src/bolts/validation/energy_balance.py +32 -0
- bolts-0.2.1/src/bolts/validation/line_step.py +31 -0
- bolts-0.2.1/src/bolts/validation/rc_step.py +41 -0
- bolts-0.2.1/src/bolts/validation/rlc_ring.py +30 -0
- bolts-0.2.1/src/bolts/validation/zener_dc.py +29 -0
- bolts-0.2.1/src/bolts/validation/zener_knee.py +39 -0
- bolts-0.2.1/src/bolts/waveforms/__init__.py +16 -0
- bolts-0.2.1/src/bolts/waveforms/base.py +64 -0
- bolts-0.2.1/src/bolts/waveforms/combine.py +25 -0
- bolts-0.2.1/src/bolts/waveforms/csv_record.py +57 -0
- bolts-0.2.1/src/bolts/waveforms/double_exp.py +24 -0
- bolts-0.2.1/src/bolts/waveforms/heidler.py +21 -0
- bolts-0.2.1/src/bolts/waveforms/iec62305.py +13 -0
- bolts-0.2.1/src/bolts/waveforms/step_ramp_sine.py +37 -0
- bolts-0.2.1/src/bolts/waveforms/window.py +23 -0
- bolts-0.2.1/src/bolts.egg-info/PKG-INFO +154 -0
- bolts-0.2.1/src/bolts.egg-info/SOURCES.txt +174 -0
- bolts-0.2.1/src/bolts.egg-info/dependency_links.txt +1 -0
- bolts-0.2.1/src/bolts.egg-info/entry_points.txt +2 -0
- bolts-0.2.1/src/bolts.egg-info/requires.txt +23 -0
- bolts-0.2.1/src/bolts.egg-info/top_level.txt +1 -0
- bolts-0.2.1/tests/test_api_cli.py +73 -0
- bolts-0.2.1/tests/test_audit_v01.py +78 -0
- bolts-0.2.1/tests/test_config.py +68 -0
- bolts-0.2.1/tests/test_examples.py +31 -0
- bolts-0.2.1/tests/test_lines_io_registry.py +74 -0
- bolts-0.2.1/tests/test_metrics_impact.py +72 -0
- bolts-0.2.1/tests/test_mna.py +56 -0
- bolts-0.2.1/tests/test_network_elements.py +100 -0
- bolts-0.2.1/tests/test_regulator.py +80 -0
- bolts-0.2.1/tests/test_round1_v02.py +268 -0
- bolts-0.2.1/tests/test_round2_v02.py +128 -0
- bolts-0.2.1/tests/test_round3_v02.py +220 -0
- bolts-0.2.1/tests/test_round4_v02.py +81 -0
- bolts-0.2.1/tests/test_space_weather_properties.py +38 -0
- bolts-0.2.1/tests/test_spice.py +47 -0
- bolts-0.2.1/tests/test_studies_plotting.py +63 -0
- bolts-0.2.1/tests/test_waveforms.py +76 -0
bolts-0.2.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are listed here. Format: [Keep a Changelog](https://keepachangelog.com/), versioning: [SemVer](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.2.1] - 2026-11-13
|
|
8
|
+
First version published to PyPI (0.2.0 was tagged but rejected by TestPyPI over an invalid classifier, so it was never released).
|
|
9
|
+
### Added
|
|
10
|
+
- Packaging: SPDX license expression and `license-files` in `pyproject.toml` (setuptools >= 77), removed the invalid Electrical Engineering classifier that TestPyPI rejected.
|
|
11
|
+
- `make publish-test` and `make publish` (twine upload fallback) and a Publishing section in `docs/dev/release.md`.
|
|
12
|
+
|
|
13
|
+
## [0.2.0] - 2026-11-12
|
|
14
|
+
### Changed
|
|
15
|
+
- Removed the stub modules `space_weather/from_scubas.py` and `from_gmd_synth.py`: a SCUBAS or synthetic record is a CSV read by `load_waveform`.
|
|
16
|
+
- `make lint` and the ruff check now also cover `scripts/` and `examples/`; the `stamp` docstrings of working elements no longer say "not implemented".
|
|
17
|
+
- The shipped example record is now a physically shaped synthetic 1 s series (`scripts/make_synthetic_vind.py`: storm backbone scaled to a peak of about -200 V, four bands of random Pc5 to Pc2 pulsations from 600 s down to 2.5 s, one onset impulse) instead of a clean sinusoidal burst; the old record is kept as `data/legacy_pfe_design_burst_1s.csv` for the regression test.
|
|
18
|
+
- Run figure: shorter panels for the optical and traffic traces.
|
|
19
|
+
- Docstrings for every public function and class, and step-by-step inline comments in the solver, builder, optics, terminal, CLI and examples.
|
|
20
|
+
### Added
|
|
21
|
+
- v0.2 round 4: landing earth resistance from the soil and a rod electrode (`landing_resistance_from_parameters`; parameters `earthing.rod_count`, `rod_length_m`, `rod_radius_m`, `rod_spacing_m`, all unknown, used with `earthing.soil_resistivity_ohm_m`); ground potential rise metrics (`bolts.earthing.gpr`: `gpr_metrics`, `required_resistance_ohm`) reported by `assess` (`earth_gpr_peak_V`, `earth_time_above_nominal_s`, `earth_time_above_exceptional_s`, `earth_resistance_ohm`); `meta["r_earth_ohm"]`; example 12 (`examples/gmd/12_earthing_gpr.py`).
|
|
22
|
+
- v0.2 round 3: Newton iteration for nonlinear circuits (`bolts.mna.newton`, `run_transient(..., newton=True)`, `ConvergenceError`; the regulator, clamp, slew limit and loop resistance work on the Newton path and agree with the linear path to 1e-8); `PiecewiseZener` (knee current and below-knee fraction, selected by `repeater.zener_knee_current_A` and `repeater.zener_below_knee_fraction`, both unknown); `DiodeChain` and `Arrester` nonlinear shunts; SPICE export of nonlinear branches (behavioural sources), nonlinear shunts and independent current sources; validation cases `diode_clamp` and `zener_knee`; example 11 (`examples/gmd/11_nonlinear_devices.py`).
|
|
23
|
+
- v0.2 round 2: PFE output slew limit and limit-state series in the regulator loop (`pfe.output_slew_limit_V_per_s`, off by default; `assess` reports `pfe_time_slew_limited_s`); `PfeConverterBank` (range with N:1 failover) used by the builder when `pfe.converter_modules` and `pfe.converter_module_rating_V` are given; `PumpLaser` (the optical chain now uses it, results unchanged); insulation life (`constant_from_reference`, `life_consumed`, `assess` key `insulation_life_consumed_max` when `cable.insulation_exponent_n` is set); parameters `converter_spare_modules`, `converter_failed_modules`, `insulation_exponent_n`, `design_life_years`; example 10 (`examples/gmd/10_pfe_overrange.py`); `plotting.style.pct()` for a percent sign that survives LaTeX.
|
|
24
|
+
- Provider selection from the parameters (`cable.section_table_csv`, `cable.temperature_model`, `cable.depth_profile_csv`, `cable.depth_temperature_csv`, `bolts.properties.provider_from_parameters`); the providers are re-exported from `bolts.properties`; illustration tables `data/example_cable_sections.csv`, `example_route_depth.csv`, `example_depth_temperature.csv`; example 09 (`examples/gmd/09_cable_properties.py`) with sweeps of the seabed temperature and the cable capacitance, a table and figure (`cable_properties_shift.png`, `shift_table.csv`) of how the cable properties shift PFE stress, Q margin and traffic, and the findings in the script docstring.
|
|
25
|
+
- v0.2 round 1: cable property providers `SectionTableRLCG`, `DepthProfileRLCG`, `TemperatureRLCG` (the network builder now asks the provider per span; `build_network(..., provider=...)`); elements `Coil`, `LandCable`, `BeachJoint`, `PfeFilter` (registered); `bolts.space_weather.synthetic.synthetic_vind` (the generator of the example record, which `scripts/make_synthetic_vind.py` now calls; the output is byte-identical); `bolts.metrics.pfe_stress` (shortfall, excess, dwell, over-current exposure) reported by `assess`; new parameters `cable.seabed_temperature_C`, `cable.conductor_tempco_per_K`, `cable.resistance_reference_temperature_C` and the unknown PFE protection parameters (`converter_module_rating_V`, `output_slew_limit_V_per_s`, `overcurrent_trip_fraction`, `overcurrent_trip_delay_s`, `trip_hold_s`, `restart_ramp_V_per_s`).
|
|
26
|
+
- Study 08 (`examples/gmd/08_pfe_beyond_range_study.py`): reduced loop model of a slow storm beyond the PFE range, with ride-through and over-current-trip policies (placeholders).
|
|
27
|
+
- Stub `bolts.mna.window_run` and `docs/dev/future_microsecond_windows.md`: the deferred microsecond-window work.
|
|
28
|
+
- `tests/test_audit_v01.py`: side-by-side agreement with `pfe_design` on sine records, and tests for the CLI `spice` command, `python -m bolts`, the earth electrode, user-TOML errors and the constants.
|
|
29
|
+
- Example 07 (`examples/gmd/07_swing_onset.py`): amplitude scan of 1 s voltage swings showing where the current, Q margin and terminal traffic start to be disturbed.
|
|
30
|
+
- Documentation restructured as chapters 00 to 16 (status line, story, equations, code locations, assumptions, next link), developer tooling page, generated parameter table (`make param-table`).
|
|
31
|
+
- Changelog guard, ruff and pylint duplicate-code configuration, pre-commit hooks; plot style aligned with the polar_connect papers; GMD experiments under `examples/gmd/`.
|
|
32
|
+
|
|
33
|
+
## [0.1.0] - 2026-11-11
|
|
34
|
+
### Added
|
|
35
|
+
- Package skeleton (`src/` layout, setuptools), LGPL-3.0-or-later license, Makefile, Read the Docs configuration, CI workflow.
|
|
36
|
+
- Parameter store with unit, status and source (`sourced`, `assumed`, `unknown`, `override`); shipped defaults in TOML.
|
|
37
|
+
- Waveforms: CSV records (seconds or ISO time, window, scale, step), step, ramp, sine, ramp-hold, double-exponential, Heidler.
|
|
38
|
+
- Modified nodal analysis with backward Euler, DC operating point, cached LU; elements: cable segment, repeater with a linear Zener, PFE,
|
|
39
|
+
earth electrode, lumped R, L, C and voltage source.
|
|
40
|
+
- PFE regulator as a first-order loop integrated exactly over each step (any dt / tau).
|
|
41
|
+
- Point-to-point network builder; GMD source; metrics (repeater current dip, PFE headroom, conductor-to-sea voltage, Zener heat).
|
|
42
|
+
- Optical chain (OSNR, Q, margin, Shannon-gap rate) and terminal state machine with ES / SES / UAS counters, ported from the `pfe_design` study.
|
|
43
|
+
- ngspice netlist export, batch run and comparison; analytic validation cases (RC, RLC, line modes, Zener DC, energy balance).
|
|
44
|
+
- Earthing formulas (Wenner resistivity, rod resistance, ground potential rise), insulation life law.
|
|
45
|
+
- CLI (`bolts run | params | validate | spice | doctor`) and public API (`bolts.api`).
|
|
46
|
+
- Documented slots for branching units, nonlinear protection devices, lightning, adaptive stepping (raise `NotImplementedYet`).
|
bolts-0.2.1/CITATION.cff
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use BOLTS, please cite it."
|
|
3
|
+
title: "BOLTS: Branching-unit and Optical-repeater power-feed Loop Transient Simulator"
|
|
4
|
+
abstract: "Stress and vulnerability of submarine power-feed systems under geomagnetic disturbances (GMD / space weather), lightning and switching surges, down to loss of signal, failures and traffic loss."
|
|
5
|
+
type: software
|
|
6
|
+
version: 0.2.1
|
|
7
|
+
date-released: 2026-11-11
|
|
8
|
+
license: LGPL-3.0-or-later
|
|
9
|
+
authors:
|
|
10
|
+
- family-names: Chakraborty
|
|
11
|
+
given-names: Shibaji
|
|
12
|
+
repository-code: "https://github.com/shibaji7/BOLTS"
|
|
13
|
+
keywords: [submarine cable, power feed, repeater, geomagnetic disturbance, space weather, lightning, surge]
|