Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ All notable changes to CableXSec are recorded in this file. The format follows

## [Unreleased]

### Changed
## [0.2.1] - 2026-11-23

- **Figures use a MATLAB-style look** (`cablexsec.plotting.style`):
- MATLAB's default line colours in MATLAB's order (`MATLAB_ORDER`; `COLORS` maps the names to those hues);
- a Helvetica or Arial face at 10 pt;
- a closed box with inward ticks on all sides and no grid;
- a square, opaque legend.
- **Labels carry true Greek letters and sub- and superscripts** in the same face (κ, EI_min, σ_A, m⁻¹), with numerals upright. The new `style.LABELS` holds the standard axis labels.
- **The tutorial and how-to scripts apply the style.** Their figures were plain matplotlib defaults before; they are regenerated. The examples follow the same labels.
The Python interfaces are versioned but may change before `1.0.0`. The evidence for
every item below is in
[VALIDATION.md](https://github.com/SMI-Lab-Inha/CableXSec/blob/main/VALIDATION.md); its
generated table is reproduced by `python validation/scripts/run_validation.py`. The
entries under Changed for the normal wire curvature and under Added for the Zeidan
(2025) input change results; the new options default to the 0.2.0 behaviour.

### Added

Expand All @@ -30,7 +29,9 @@ All notable changes to CableXSec are recorded in this file. The format follows
(`annulus_mode1_compliance_inner`) plus the strip concentration. It keeps
`xi_bond = K_b / (K_b + EA_w sin^2(a) / r_h^2)` of the layer's
plane-section stiffness in full slip (`bonded_face_terms`,
`bonded_face_ei`). The stuck layer is unchanged.
`bonded_face_ei`). The stuck layer is unchanged. At a zero lay angle the bond
carries the whole layer: the slider has no stick stiffness and is elastic-only
(no stress, slip or friction work; `elastic_only_history`).
- Used by the bending law (`compute_mkappa`, `SectionLaw`, the exported law)
and `compute_stiffness` (whose `ei_min_Nm2` then includes the bond). The
wire-stress, fatigue and capacity routes refuse such a cable, because they
Expand Down Expand Up @@ -108,8 +109,30 @@ All notable changes to CableXSec are recorded in this file. The format follows
doc/template_66kv.md Section 4 the largest wire damage rises 0.23–0.27 % (inner
armour) and 0.05–0.06 % (outer armour) in all four model combinations; tutorial 3
moves by −0.1 % (the governing inner face takes the term with the opposite sign) and
the tutorial and how-to outputs are regenerated. Riser armour at 35° in stick takes
nearly twice the earlier weak-axis bending stress.
the tutorial and how-to outputs are regenerated. The largest damage of the README quick
start (the Ménard cable at 100 kN) rises 2.0 % (inner) and 1.5 % (outer armour). Riser
armour at 35° in stick takes nearly twice the earlier weak-axis bending stress.

- **Figures use a MATLAB-style look** (`cablexsec.plotting.style`):
- MATLAB's default line colours in MATLAB's order (`MATLAB_ORDER`; `COLORS` maps the names to those hues);
- a Helvetica or Arial face at 10 pt;
- a closed box with inward ticks on all sides and no grid;
- a square, opaque legend.
- **Labels carry true Greek letters and sub- and superscripts** in the same face (κ, EI_min, σ_A, m⁻¹), with numerals upright. The new `style.LABELS` holds the standard axis labels.
- **The tutorial and how-to scripts apply the style.** Their figures were plain matplotlib defaults before; they are regenerated. The examples follow the same labels.

### Known limitations

- A bonded outer face (`bonded_face: outer`) is supported by the bending law and
`compute_stiffness` only. The wire-stress, fatigue and capacity routes refuse such a
cable, so `compute_mkappa` cannot check its curvature history against the wire-yield
curvature and warns that it does not.
- The bonded state of the Zeidan (2025) cable is identified from its measured loops, not
published. With it, Z-ID passes and Z-EI fails narrowly (`EI_min` 10.09 kN·m² against
a measured slip slope of 8.65–9.70 kN·m² in the plotted curvature). The predicted
cycle work differs from the measured by +9.9 / −4.7 / −9.0 % at 30 / 50 / 60 mm.
- The measured comparisons that failed in 0.2.0, other than Z-ID, still fail; their
tolerances are not relaxed.

## [0.2.0] - 2026-11-21

Expand Down Expand Up @@ -1285,5 +1308,6 @@ generated table is reproduced by `python validation/scripts/run_validation.py`.
- A passing test does not establish that the model predicts every physical cable
construction or a validated service life.

[0.2.1]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.1
[0.2.0]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.0
[0.1.0]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.1.0
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ authors:
repository-code: "https://github.com/SMI-Lab-Inha/CableXSec"
url: "https://github.com/SMI-Lab-Inha/CableXSec"
license: Apache-2.0
version: 0.2.0
date-released: 2026-11-21
version: 0.2.1
date-released: 2026-11-23
keywords:
- dynamic power cable
- cross-section mechanics
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ with absolute `https://github.com/SMI-Lab-Inha/CableXSec/blob/main/...` URLs.
python -m build --outdir dist
python -m twine check dist/*
python -m venv wheel-test
wheel-test\Scripts\python -m pip install dist\cablexsec-0.2.0-py3-none-any.whl
wheel-test\Scripts\python -m pip install dist\cablexsec-0.2.1-py3-none-any.whl
wheel-test\Scripts\python release\smoke_test_wheel.py --version 0.2.0
```

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ damage of the armour, the conductor and the metallic sheaths.
It reads the results of global analyses (CableDyn, RIFLEX, and time-history CSV exports such as
those of OrcaFlex) and turns them into local stresses and damage, and it exports a hysteretic
bending law for use in global analysis. The
current release is `v0.2.0`; interfaces are versioned and may change before `1.0.0`.
current release is `v0.2.1`; interfaces are versioned and may change before `1.0.0`.

## What CableXSec does

Expand Down Expand Up @@ -74,7 +74,7 @@ Install the release wheel from the
3.12), or install straight from the repository:

```powershell
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.0"
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.1"
```

The `fast` extra adds `numba` for the compiled slip-stress and rainflow kernels; without it the
Expand Down Expand Up @@ -106,8 +106,8 @@ for layer, damage in fatigue.D_total_per_wire.items():
```text
EA = 280 MN, EI full slip = 3571 N m^2, EI no slip = 189.8 kN m^2
peak moment 541 N m, friction work 218.0 J/m over the history
inner_armour: largest Miner damage 1.774e-06 over the record
outer_armour: largest Miner damage 3.005e-07 over the record
inner_armour: largest Miner damage 1.809e-06 over the record
outer_armour: largest Miner damage 3.050e-07 over the record
```

For a set of CableDyn sea-state runs, `cablexsec-batch batch.json --output-directory results`
Expand Down Expand Up @@ -154,7 +154,7 @@ in [`validation/`](validation/README.md), including the data of the companion jo

## Citation

If you use CableXSec in academic work, please cite the software release (CableXSec 0.2.0);
If you use CableXSec in academic work, please cite the software release (CableXSec 0.2.1);
[CITATION.cff](CITATION.cff) contains the entry (GitHub **Cite this repository**) and the
manual's [How to cite](https://cablexsec.readthedocs.io/en/latest/citing.html) page gives
BibTeX. The journal article that describes the method is under review; its reference will be
Expand Down
4 changes: 2 additions & 2 deletions doc/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Software release
----------------

Seo, J. H. (2026). *CableXSec: Component-resolved local cross-section mechanics of dynamic
power cables* (version 0.2.0) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec
power cables* (version 0.2.1) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec

.. code-block:: bibtex

@software{CableXSec_0_2_0,
author = {Seo, Jae Hoon},
title = {{CableXSec}: Component-resolved local cross-section mechanics of
dynamic power cables},
version = {0.2.0},
version = {0.2.1},
year = {2026},
url = {https://github.com/SMI-Lab-Inha/CableXSec},
license = {Apache-2.0}
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ turns them into the fatigue damage of the armour, the conductor and the metallic
.. admonition:: Release status
:class: note

CableXSec ``v0.2.0`` is the current release. It is distributed as a source
CableXSec ``v0.2.1`` is the current release. It is distributed as a source
repository and a pure-Python wheel on the
`GitHub release page <https://github.com/SMI-Lab-Inha/CableXSec/releases>`_. Every
comparison with published data, including the comparisons that do not meet their
Expand Down
10 changes: 5 additions & 5 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ is distributed through its GitHub repository; it is not published on a package i
From a release
--------------

Download ``cablexsec-0.2.0-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the
`v0.2.0 release <https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.0>`_, compare
Download ``cablexsec-0.2.1-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the
`v0.2.1 release <https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.1>`_, compare
the checksum, and install the wheel with its optional extras:

.. code-block:: powershell

Get-FileHash cablexsec-0.2.0-py3-none-any.whl -Algorithm SHA256
python -m pip install "cablexsec-0.2.0-py3-none-any.whl[fast]"
Get-FileHash cablexsec-0.2.1-py3-none-any.whl -Algorithm SHA256
python -m pip install "cablexsec-0.2.1-py3-none-any.whl[fast]"

From the repository
-------------------

.. code-block:: powershell

python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.0"
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.1"

or, for development, clone the repository and install it in editable mode (see
:doc:`development`):
Expand Down
4 changes: 2 additions & 2 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ The output is::

EA = 280 MN, EI full slip = 3571 N m^2, EI no slip = 189.8 kN m^2
peak moment 541 N m, friction work 218.0 J/m over the history
inner_armour: largest Miner damage 1.774e-06 over the record
outer_armour: largest Miner damage 3.005e-07 over the record
inner_armour: largest Miner damage 1.809e-06 over the record
outer_armour: largest Miner damage 3.050e-07 over the record

Every result carries a ``provenance`` record that names the method, the cited sources, the
verification gates and the limitations of the calculation; print ``fatigue.provenance`` to see
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/04_contact_and_fretting.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fretting life.

Nor is it the {term}`Ruiz parameter` (Ruiz et al. 1984), which is formed from the
local surface shear traction and slip and, in its second form, the local
tangential stress. CableXSec 0.2.0 does not compute Ruiz parameters.
tangential stress. CableXSec 0.2.1 does not compute Ruiz parameters.

## 8. The SWT critical plane next to a crossing

Expand Down Expand Up @@ -298,7 +298,7 @@ Points nearer the surface at the edge itself need a higher quadrature order.
converge; it never returns an unconverged stress.

`compute_swt_cycle` also returns a formal life from a strain-life law
(`SWTLifeConstants`). The SWT constants registered in CableXSec 0.2.0
(`SWTLifeConstants`). The SWT constants registered in CableXSec 0.2.1
(`sn_curves.SWT_LIFE`) are those of copper, and none are for armour steel, so
the script passes a placeholder law and prints no life. With constants from a
source, `result.life_cycles` gives it.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cablexsec"
version = "0.2.0"
version = "0.2.1"
description = "Component-resolved local cross-section mechanics and fatigue of dynamic power cables"
readme = "README.md"
requires-python = ">=3.11,<3.13"
Expand Down
2 changes: 1 addition & 1 deletion src/cablexsec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
UnmodelledPolymerSofteningWarning,
)

__version__ = "0.2.0"
__version__ = "0.2.1"

from cablexsec.project import ( # noqa: E402
PROJECT_FORMAT_VERSION,
Expand Down
35 changes: 34 additions & 1 deletion src/cablexsec/mechanics/papailiou.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"compute_mkappa_wire_slip_front",
"coupled_slip_stress_bounds",
"direction_threshold_curvature",
"elastic_only_history",
"full_slip_curvature",
"slip_onset_curvature",
"wire_slip_stress_bounds",
Expand Down Expand Up @@ -823,6 +824,31 @@ class WireSlipHistory:
cap_Pa: FloatArray | None = None


def _partly_zero(stiffness: FloatArray) -> bool:
"""True if some but not all samples of a stick stiffness are zero."""
zero = stiffness == 0.0
return bool(np.any(zero) and not np.all(zero))


def elastic_only_history(n_wires: int, count: int) -> WireSlipHistory:
"""History of a wire population whose slider has zero stick stiffness.

Such a slider never carries stress, so it neither slips nor dissipates:
zero stress, moment and work, every wire stuck. It arises for a bonded
outer face (``bonded_face="outer"``, gap G8) at a zero lay angle, where
the bond carries the whole layer and ``xi_slider = 0``.
"""
zeros = np.zeros(count)
return WireSlipHistory(
np.zeros((n_wires, count)),
np.zeros((count, 2)),
np.zeros(count, dtype=np.int64),
np.zeros(n_wires),
zeros.copy(),
BendingWork(zeros.copy(), zeros.copy(), zeros.copy(), zeros.copy(), zeros),
)


def wire_slip_history(
layer: HelicalLayerSpec,
kappa_x: FloatArray,
Expand Down Expand Up @@ -986,10 +1012,17 @@ def wire_slip_history(
raise CableInputError(
f"{label} must be finite and match curvature histories"
)
if np.any(pressure < 0) or np.any(stiffness <= 0):
if np.any(pressure < 0) or np.any(stiffness < 0) or _partly_zero(stiffness):
raise CableInputError(
"nonnegative pressure and positive stiffness are required"
)
if not np.any(stiffness):
if coupling is not None or keep_cap:
raise CableInputError(
"a zero stick stiffness (an elastic-only layer) is implemented "
"for the bending law only"
)
return elastic_only_history(layer.n_wires, count)
if coupling is not None:
if law is not None:
raise CableInputError(
Expand Down
17 changes: 16 additions & 1 deletion src/cablexsec/mechanics/progressive_friction.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@
DIRECTION_HOLD_FRACTION,
BendingWork,
WireSlipHistory,
_partly_zero,
_threshold_coefficient,
elastic_only_history,
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -337,10 +339,23 @@ def progressive_wire_history(
raise CableInputError(
f"{label} must be finite and match curvature histories"
)
if np.any(pressure < 0) or np.any(stiffness <= 0):
if np.any(pressure < 0) or np.any(stiffness < 0) or _partly_zero(stiffness):
raise CableInputError(
"nonnegative pressure and positive stiffness are required"
)
if not np.any(stiffness):
# elastic-only layer (zero stick stiffness): no stress, slip or work
base = elastic_only_history(layer.n_wires, count)
return ProgressiveWireHistory(
base.stress_Pa,
base.moment_Nm,
base.slipping_count,
base.final_plastic_drive,
base.material_work_J_per_m,
base.work,
slipping_share=np.zeros(count),
settings=spec,
)
n_el = spec.n_elements
share = 1.0 / n_el
n_w = layer.n_wires
Expand Down
46 changes: 46 additions & 0 deletions tests/test_bonded_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,49 @@ def test_a_pressure_history_is_refused_for_a_bonded_face() -> None:
pressure = {lyr.name: np.full(kappa.shape, 1e6) for lyr in cable.helical_layers}
with pytest.raises(CableSchemaError, match="contact_tension_history_N"):
cx.compute_mkappa(cable, kappa, mu=0.2, contact_pressure_Pa=pressure)


def test_a_straight_bonded_layer_is_elastic_only() -> None:
"""At a zero lay angle the bond carries the whole layer (xi_slider = 0):
the slider is elastic-only, and the law is the small-angle limit."""

def straight(lay_deg: float) -> CableData:
cable = _zeidan()
layers = [
lyr.model_copy(update={"lay_angle_deg": lay_deg})
if lyr.name == "outer_armour"
else lyr
for lyr in cable.layers
]
return cable.model_copy(update={"layers": layers})

zero, small = straight(0.0), straight(1e-4)
with zero.material_scope():
terms = bonded_face_terms(zero, "outer_armour", 1.0)
assert terms.xi_bond == 1.0 and terms.xi_slider == 0.0
kappa = np.r_[np.linspace(0.0, 0.1, 21), np.linspace(0.1, -0.1, 41)[1:]]
for options in ({}, {"friction_model": "progressive"}):
r0 = cx.compute_mkappa(zero, kappa, mu=0.2, **options) # type: ignore[arg-type]
r1 = cx.compute_mkappa(small, kappa, mu=0.2, **options) # type: ignore[arg-type]
scale = float(np.max(np.abs(r1.moment_Nm)))
np.testing.assert_allclose(r0.moment_Nm, r1.moment_Nm, atol=1e-9 * scale)
assert r0.EI_min_Nm2 == pytest.approx(r1.EI_min_Nm2, rel=1e-8)


def test_a_zero_stick_stiffness_gives_an_elastic_only_history() -> None:
from cablexsec.mechanics.papailiou import wire_slip_history # noqa: PLC0415

with _zeidan().material_scope():
spec = cable_to_mkappa_specs(_bond(_zeidan(), face="none"), mu=0.2)[0]
kappa = np.linspace(0.0, 0.1, 11)
zero = np.zeros_like(kappa)
history = wire_slip_history(spec, kappa, zero, stick_modulus_Pa=zero)
assert not np.any(history.stress_Pa) and not np.any(history.moment_Nm)
assert not np.any(history.slipping_count)
assert not np.any(history.work.friction_J_per_m)
partly = np.full_like(kappa, spec.k_f)
partly[3] = 0.0
with pytest.raises(CableInputError, match="positive stiffness"):
wire_slip_history(spec, kappa, zero, stick_modulus_Pa=partly)
with pytest.raises(CableInputError, match="elastic-only"):
wire_slip_history(spec, kappa, zero, stick_modulus_Pa=zero, keep_cap=True)
3 changes: 2 additions & 1 deletion validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ global simulation files are not redistributed.
| Path | Contents |
| --- | --- |
| [`validation_report.md`](validation_report.md) | The generated table of every analytical gate and benchmark, with targets, values and status |
| [`RELEASE_0_2_0.md`](RELEASE_0_2_0.md) | Environment, test results, gate results and distribution hashes for v0.2.0 |
| [`RELEASE_0_2_1.md`](RELEASE_0_2_1.md) | Environment, test results, gate results and distribution hashes for v0.2.1 |
| [`RELEASE_0_2_0.md`](RELEASE_0_2_0.md) | The same record for the 0.2.0 release |
| [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same record for the 0.1.0 release |
| [`paper_data/`](paper_data/README.md) | Digitised published measurements and the results of the companion article's calculations |
| `scripts/` | The report generator, benchmark harnesses and reproduction scripts listed below |
Expand Down
Loading
Loading