diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 0974976..c1d870e 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -40,7 +40,7 @@ src/cablexsec/ materials/ material property library, S-N/SWT curve registry mechanics/ section, contact, helix and thermal kernels analysis/ stress, fatigue, long-term, capacity, components, life - io/ load histories, CSV/RIFLEX/CableDyn readers, synthetic seas + io/ load histories, CSV/ASCII-column/CableDyn readers, synthetic seas plotting/ publication figures and an HTML result viewer ``` @@ -51,7 +51,7 @@ src/cablexsec/ cores), field validators that reject non-finite values, and `load_cable`. - `__init__.py`: paths to the packaged definitions `inter_array_single_core_33kv.yaml`, `inter_array_three_core_33kv.yaml`, - `export_three_core_220kv.yaml`, `cigre_tb880_220kv.yaml`, `menard2023.yaml` + `export_three_core_220kv.yaml`, `poradowski2025_220kv.yaml`, `menard2023.yaml` and `menard2023_filled.yaml`, `iea_task49_66kv.yaml` (public 66 kV wet-design template) and `iea_task49_66kv_300.yaml` (derived 300 mm² section), `chae2023_coiling.yaml` (Chae, Nam and Shim 2023 coiling case), @@ -193,7 +193,7 @@ Functional kernels operating on arrays; most are not called directly by users. deck ([doc/global_local_guide.md](doc/global_local_guide.md)). - `cabledyn_components.py`: station histories from the signed section-frame curvature components `CurvX`/`CurvY` that CableDyn writes since 0.4.0. -- `riflex_reader.py`: RIFLEX ASCII results. +- `ascii_columns_reader.py`: whitespace-column ASCII time histories. - `synthetic.py`: self-contained JONSWAP-style load-series generator. ### `plotting` @@ -277,7 +277,7 @@ Key invariants: bit. 4. Imported true-force histories drive both axial stress and contact by default, matching the direct API. -5. Every global reader (time-history CSV, CableDyn, RIFLEX rotation input) converts +5. Every global reader (time-history CSV, CableDyn, ASCII-column rotation input) converts rotation curvature through the one function `section_conventions.rotation_to_strain_curvature`, so a fibre angle `φ` (from local x towards y) names the same physical fibre whichever code diff --git a/CHANGELOG.md b/CHANGELOG.md index 35f0e81..e7cb4f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,195 @@ All notable changes to CableXSec are recorded in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.2] - 2026-12-01 + +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 +thermal entries under Changed and Fixed change results (the loss terms are now computed +from the cable by default), and the rename of `read_riflex_ascii` breaks code that +imports it. The mechanical, fatigue and contact results through `cablexsec` and +`cablexsec.api` are unchanged; submodule functions called directly now read the cable's +own materials (Fixed). + +### Added + +- `ThermalResult.resistances`: the `T1`, `T2`, `T3` and `T4` of IEC 60287-1-1 Formula (1) that + `compute_thermal` used (`T2` counts a per-core jacket `1/n`, as CIGRE TB 880 Guidance Point 45 + does). An annulus outside `k` of `m` armour layers goes `(1 - k/m)` to `T2` and `k/m` to `T3`, + its share of the armour loss, so Formula (1) reproduces the solver for any number of armour + layers (with one layer, the split at the armour). +- Rows TB880-C2 and TB880-C8 (registered before the first run): CIGRE TB 880 (2022) Case studies + 2 (3x630 mm2 18/30 kV, lead sheaths, steel wire armour) and 8 (3x1000 mm2 220 kV, lead sheaths, + stainless armour) against `compute_thermal`, from cables built on the brochure's datasheets + (`tests/data/tb880/`). `T1`, `T3`, `y_s`, `y_p` and `lambda1'` agree to the printed digits and + `W_d` by +0.136 % (TB 880's `eps0 = 1e-9/(36 pi)` against IEC's 8.854e-12); `T2` (-5.1 %, +0.43 + %) and the ratings at 90 degC with TB 880's loss factors (841.50 A against 838.34 A, 1134.95 A + against 1134.82 A) are stated. +- `BlockProgramme` and `FatigueTestBlock`: the block programme of a full-scale fatigue test (CIGRE + TB 862 6.3.4): block and accumulated damage, damage shares, the Table 6-4 checks of test damage + and mean tension against the service values, the test sequence with switching of 6.3.4.3 + (Table D.3) and conversion to `RigBlock`s. TB 862 Tables D.1 to D.3 are regression cases; Table + D.3's damage of blocks 3A and 3B is 6.05e-5, not the printed 6.05e-4. +- Reported rows SV11-LK, SV11-SIDE, SV11-SUB and SV11-NORM (registered before the runs): what + the SV11 measurements are. Lukassen's (2019) thesis plots both narrow sides of the tendon at + stations 3.1-3.5 for LC 14 (digitised from the native PDF paths, + `validation/scripts/digitise_lukassen2019.py`). Gjøsteen et al.'s loops are side b, and + Sævik's normalised values are the larger side range (one implied static stress, CV 0.08, near + the model's 271 MPa), not the axial range the rows compare with. Against the measured axial + range the SV11-GJ chain over-predicts at the bending-plane stations by 1.72 (sectional) and + 1.97 (corrected). The SV11 metrics without the one-sided stations, with coincident pairs by + geometric mean and with one common normaliser (a hypothesis) are reported. The coincident + pairs differ by a fixed per-sensor bias (×1.40 and ×0.52 with the same sign in all 14 load + cases). The Zeidan section adds what the paper's EPR layer holds, that the source compares + monotonic curves in plotted curvature (not loops), and the record zero and centre. No + target, band, gated input or default changes; SV11-PLANE and SV11-GJ stay FAIL. +- Thermal functions of IEC 60287-1-1:2023: `lay_length_factor` (Annex A), + `conductor_resistance_20C` (IEC 60228:2023 Table 4), `sheath_reactance`, + `sheath_eddy_loss_factor` (5.3.7.1, with the solid-bonding factor of 5.3.6 that CIGRE TB + 880 Guidance Point 31 applies), `sl_filler_geometric_factor` (IEC 60287-2-1:2023 5.6) and + `DIELECTRIC_LOSS_U0_KV` (5.2). `ThermalResult.losses` holds the loss terms used. New + inputs: `d_conductor_m` of a conductor (the IEC `d_c` of a stranded conductor), + `insulation_type` of an `electrical` block, the material property + `relative_permeability`, and the `compute_thermal` / `thermal_network` options + `conductor_resistance_20C_ohm_m`, `k_s`, `k_p` and `include_dielectric_loss` + (`thermal_network` also `rating_temperature_C` and `rating_current_A`). +- Rig test: `RigProtocol.cyclic(tension_phase_lag_deg=...)` lets the tension lag the + bending (it could cycle only in phase); `RigProtocol.blocks` with `RigBlock` builds a + programme of constant-tension blocks with linear transitions, as in the block programme of + CIGRE TB 862 (2022) 6.3.4.1, and records each block's interval in + `RigProtocol.block_times_s`; `tb862_specimen_checks` and `component_pitches` check the + specimen lengths of TB 862 6.3.2 (fatigue, template and bend-stiffener set-ups), 6.4.2.2 + (bending stiffness) and 6.6.1.2 (compression) against the cable's lay pitches, tape + windings and single-angle strand lays included; a withheld pitch makes the check an + error. + +### Changed + +- `read_riflex_ascii` is renamed `read_ascii_columns` (module `cablexsec.io.ascii_columns_reader`, + breaking). It reads whitespace-separated columns by position and was never checked against + output of the program it was named after, so the docs, the how-to and the provenance no longer + name one. Its arguments and results are unchanged. + +- The thermal ladder follows IEC 60287-1-1:2023 and IEC 60287-2-1:2023, and the loss terms + are computed from the cable unless given (they defaulted to zero, which put the conductor + loss of a 630 mm² three-core cable about 9 % low, and more with its sheath loss): + - `R0` from IEC 60228 Table 4 (per km of the complete cable, as its Annex A states), else + `ρ/A` times the lay-up factor `C_LL`; `ρ` of copper 1.7241e-8 Ω m (IEC 60287-1-1 Table 1); + - the skin factor over the three ranges of `x_s` (5.1.3) and the proximity factor of a two- + or three-core cable (5.1.4, 5.1.5.1); + - the sheath loss of the per-core screens of an SL-type cable: 5.3.11 (factor 1.5, `X` + times `C_LL`) under magnetic armour, 5.3.2 otherwise (CIGRE TB 880 Guidance Point 38); + `λ1″` = 0 as in IEC (TB 880 Guidance Point 6 keeps it; see `sheath_eddy_loss_factor`); + single-core cables and common sheaths keep `λ1` = 0 with a note; the screen resistance + is that of the wires of a wire screen over their lay (TB 880 Guidance Point 27), with a + laminated foil over them in parallel and a metal tape left out (Guidance Point 29); + - the dielectric loss from the `U0` of the insulation type (127 kV for XLPE), not from a + 100 kV line voltage, with the capacitance times `C_LL`; an insulation layer that + declares its type without the loss data is an error from that type's `U0`; + - per-core thermal resistances divided by `C_LL`; `T1` from the conductor diameter `d_c`, + not from an area-equivalent radius (+7 % on the 66 kV template); the fillers and bedding + of an armoured three-core SL-type cable carry `T2 = ρ/(6π) Ḡ` (IEC 60287-2-1 4.1.4.2, + 5.6; TB 880 Guidance Point 45) instead of the equal-area annulus. + On the 66 kV template at 1093 A the conductor is at 118.3 °C under the assumed burial + (95.3 °C before), and the AC resistance at 90 °C, 0.0395 Ω/km, rounds to the 0.04 Ω/km of + IEA Wind Task 49 Table 13. The project `thermal` settings default to the computed values. +- Thermal resistivities: polyethylene 3.5 K m/W (IEC 60287-2-1 Table 1, was 2.5), + polypropylene fillers and yarns 6.0 K m/W (IEC 60287-2-1 4.1.2.2.4 and CIGRE TB 880 Table + 2-3, was 4.5 without a source). Lead and aluminium sheaths have their IEC 60287-1-1 Table 1 + resistivities. +- The 220 kV cable of Poradowski and Anders (2025) is `poradowski2025_220kv.yaml` + (`cx.poradowski2025_220kv_yaml_path()`), not `cigre_tb880_220kv.yaml`: its data are the + paper's Table 1, not CIGRE TB 880. It has every layer of that table with its published + resistivity: the semiconducting conductor and insulation screens, the swelling tape, the + assembly (5.5 K m/W) and the air layers below and above the corrugated sheath (6.0 K m/W); + its `T1` is 0.6578 K m/W against the paper's 0.6579. The export 220 kV template has its + semiconducting screens; both left zero-resistance gaps there. +- BM5: with `R0` from IEC 60228 the tabulated network gives 85.8 °C (84.4 °C with `ρ/A`), and + 90.9 °C with the eddy loss that CIGRE TB 880 keeps (FEM 89.62, IEC 90 °C). The earlier + diagnosis named only the eddy loss. The factor 1.5 of IEC 5.3.11 is for magnetic armour; with + the stainless armour of this cable it would give 100 °C. + +### Fixed + +- The sheath reactance of the IEC 60287-1-1 5.3.2 route (SL-type cores, unarmoured or under + non-magnetic armour) now carries the lay-up factor `C_LL`, as Annex A gives it to any per-metre + property of laid-up cores and as 5.3.11 and CIGRE TB 880 Case study 8 apply it; `R_s` already + did. TB 880 Case 8 read `lambda1'` 2.2 % low without it. +- Every public function of the submodules that takes a cable now reads the cable's own + materials when it is called directly, as the functions of `cablexsec` and + `cablexsec.api` already did. Before, `xi_for_layer`, `yun_shear_stack`, `ei_min_slip` + and 87 other functions of 36 modules (mechanics, analysis, adapters, plotting) used the + library values outside a material scope: Zeidan's inner armour gave ξ 1.000 instead of + 0.832. Results through `cablexsec` and `cablexsec.api` do not change. A nested call + with the same cable object does not re-enter the scope (no measurable cost); a test + now checks every module. + +### Documentation + +- The thermal docs state the accuracy limit of the IEC single-core-equivalent ladder for + three-core cables: against 2-D finite-element models, Chatzipetros and Pilgrim (2018) found + it reads the conductor temperature up to 8 °C low for SL-type lead sheaths and 4.9 to 5.9 °C + low for foil screens. + +- The thermal modules and guides cite the 2023 editions of IEC 60287-1-1, IEC 60287-2-1 and + IEC 60228 by clause and drop the notes that the standards were not held. They state that a + three-core cable with spaced-wire core screens is treated as belted by IEC 60287-2-1 + 4.1.2.2.4, which this ladder does not implement (it takes the screen as an isotherm, a + lower `T1`); a copper tape screen follows the SL-type route (4.1.2.3.1) that it does. +- Credit: the coupled intralayer slip of laid cores (`core_core_coupling="relative"`, 0.2.1) + follows Skeie, Sødahl, Pettersen and Verde (2023, OMAE2023-104817, + doi:10.1115/OMAE2023-104817), who formulated the relative slip of three cores, its onset + and the coalescence of the slip zones; cited in `core_friction`, `station_coupling`, the + local analysis guide and doc/template_66kv.md. The largest friction stress saturates at + `π/3` times the onset, before the coalescence at `2π/(3√3) = 1.209`: the "full slip" of + their Table 1. New reported row SK23-T1: with the contact load per metre of helix the + onset is their Eq. 16 (2.2518e-5 1/mm against 2.25e-5), the saturation 1.0472 times the + onset against 1.049 (their model) and 1.053 (their FE). +- The bonded outer face (0.2.1): stuck, the inner support and the bond act in parallel, + `xi_tot = (K_s + K_b) / (K_s + K_b + k2)`. The 0.2.1 entry's "the stuck layer is + unchanged" holds for a rigid support only (Zeidan's outer armour, ξ = 1); with ξ 0.5 + the bond raises it to 0.510. The friction cap stays the inner face's: the bond is a + separate elastic shear flow, and scaling the cap by `1 - xi_bond` would count it twice + (doc/benchmarks.md). +- The stuck-wire normal curvature `cos^4(a)` cites Sævik (2011) Eq. 50, the prescribed + normal curvature of the stuck helix. +- Validation report cells escape a literal `|` (as in `|cos|`). +- Version references of 0.2.1 in doc/template_66kv.md, doc/citing.rst (BibTeX key) and + DEVELOPMENT.md. +- The ULS guide cites the compression tests where they are given: CIGRE TB 862, Section + 6.6.1 (compression with cyclic bending at a safety factor of at least 1.3 on the force and + at least 100 bending cycles; pure axial compression). MecLim II, Section 5.7, only refers + to them. +- Material sources: the copper tensile strength is a standard annealed-copper value (IEC + 60228 sets no tensile limit for copper); the thermal conductivities of lead and aluminium + are standard values (IEC 60287-2-1 lists no metal); the relative permittivity of + `xlpe_qiao2025` is 2.5, the XLPE row of IEC 60287-1-1 Table 3 it cites (2.3 is the PE + row). No analysis reads that permittivity: the dielectric loss takes the insulation + layer's `electrical` block. +- The changelog of 0.2.0 and the benchmark register drop a model-to-model comparison + without a measurement (the torsional stiffness of the Chae, Nam and Shim 2023 cable); the + core-lay sensitivity stays. + +### Tests + +- The CableDyn curvature-component test compares the strain gradient with a relative + tolerance of 1e-15 instead of exact equality. +- The per-worker numba cache folders of the tests have short names, below the 260-character + path limit of Windows. + +### Known limitations + +- The thermal ladder is the IEC single-core-equivalent network. For three-core cables it can + read the conductor temperature several degrees low against 2-D finite-element models + (see Documentation), and a three-core cable with spaced-wire core screens, which IEC + 60287-2-1 4.1.2.2.4 treats as belted, follows the SL-type route instead. +- The measured comparisons that failed in 0.2.1 (BM1-loop, BM1-ID, Z-EI, HU-3PB, WITZ-ID, + SV11-PLANE, SV11-GJ) still fail; their targets and tolerances are not relaxed. The + validation table has 73 rows: 50 pass, 7 fail, 13 are stated without a target, 1 is + partial (BM5), 1 not comparable and 1 not validated. + ## [0.2.1] - 2026-11-23 The Python interfaces are versioned but may change before `1.0.0`. The evidence for @@ -305,16 +494,6 @@ VALIDATION.md holds the values of the release. dependence (11.3 % here, 10.1 % in the source's model, 4.0 % FE, 4.1 % test), whose FE split and test conditions are not published. No input is changed and the 13 % band stays. -- Validation row CH-GJ (stated, model-to-model, registered before the run): free torsional - stiffness of the Chae, Nam and Shim (2023) coiling cable at the source's twist of 0.125 rad/m - (unwinding, zero tension), against the range of the source's three cross-section tools - (Table 5; no measurement). Armour pitch 1.8 / 3.0 m: packaged straight cores 81.9 / 50.5 kN m²; - cores laid S as in the source at an assumed pitch of 2.5 m 61.1 / 35.0 and of 3.0 m - 64.4 / 37.3 kN m² (tools 59.6–83.2 / 34.3–44.7). The packaged file and the benchmark page state - that its straight cores raise the free torsional stiffness by 1.3–1.4 times, and why the - source's closed form (Eq. 14 as printed) is not a reference. The row was removed again - before this release (see Changed). - - Validation row BM1-ID (gap R1b), targets registered before the run: on the Ménard and Cartraud (2023) cable with the laid cores, the trefoil wedge and the filler profiles (μ 0.2 on every contact), the initial pressure identified on the cycle work of range (b) is 220 kPa @@ -628,11 +807,10 @@ VALIDATION.md holds the values of the release. the measurements to be unreliable as well. The register keeps the limits of the test: one specimen, end effects not investigated, table and figure disagreeing on equal-span ranges, and an independent FE reconstruction (Kwon et al. 2026) that does not match. -- CH-GJ is removed from the validation report. Its only reference values were the outputs of - the source's three cross-section tools (Chae, Nam and Shim 2023, Table 5); nothing is - measured. The benchmark register keeps the finding as a stated sensitivity: the free - torsional stiffness of that cable depends on the core lay. S-lay cores give 21–31 % less than - straight cores, so the core lay must be stated with any torsional or coiling result. +- The benchmark register states the free torsional stiffness of the Chae, Nam and Shim + (2023) coiling cable as a sensitivity, not a validation row: nothing is measured, and the + stiffness depends on the core lay. S-lay cores give 21–31 % less than straight cores, so + the core lay must be stated with any torsional or coiling result. - `read_cabledyn_sections` places the `Dec`/`Azi` tangents of a finite-EI line (any section with `EI > 0`) at their nodes, as CableDyn 0.4.2 and later write them: the node's own diff --git a/CITATION.cff b/CITATION.cff index 36964f9..4448ce2 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -12,7 +12,7 @@ abstract: >- hysteretic moment-curvature response of helical armour with frictional slip, wire and component stresses, contact pressures and slip, temperatures, and fatigue damage at fixed material points of every wire. It reads global - results of CableDyn, RIFLEX and CSV exports and turns them into fatigue damage + results of CableDyn and CSV exports and turns them into fatigue damage of the armour, the conductor and the sheaths. authors: - family-names: Seo @@ -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.1 -date-released: 2026-11-23 +version: 0.2.2 +date-released: 2026-12-01 keywords: - dynamic power cable - cross-section mechanics diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 1e44776..ec17da5 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -100,8 +100,8 @@ 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.1-py3-none-any.whl -wheel-test\Scripts\python release\smoke_test_wheel.py --version 0.2.0 +wheel-test\Scripts\python -m pip install dist\cablexsec-0.2.2-py3-none-any.whl +wheel-test\Scripts\python release\smoke_test_wheel.py --version 0.2.2 ``` The wheel contains only the `cablexsec` package (with its bundled cable definitions) diff --git a/README.md b/README.md index dd1e668..a9599a4 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ moment–curvature response that follows, the stress of every wire and component material points, the contact pressures that set the friction, the temperatures, and the fatigue 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 +It reads the results of global analyses (CableDyn runs 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.1`; interfaces are versioned and may change before `1.0.0`. +current release is `v0.2.2`; interfaces are versioned and may change before `1.0.0`. ## What CableXSec does @@ -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.1" +python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.2" ``` The `fast` extra adds `numba` for the compiled slip-stress and rainflow kernels; without it the @@ -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.1); +If you use CableXSec in academic work, please cite the software release (CableXSec 0.2.2); [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 diff --git a/RELEASE.md b/RELEASE.md index 21ae08b..12e52e5 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -124,7 +124,7 @@ Suggested description: > Component-resolved local cross-section mechanics of dynamic power cables: > stiffness, hysteretic bending with armour slip, wire and component stresses, > contact, thermal response and fatigue at fixed material points, with readers for -> CableDyn, RIFLEX and CSV time-history results. +> CableDyn and CSV time-history results. Suggested topics: `dynamic-power-cable`, `submarine-cable`, `cross-section-analysis`, `helical-armour`, `fatigue`, `fretting`, `floating-offshore-wind`, `offshore-wind`, diff --git a/VALIDATION.md b/VALIDATION.md index 45ab27c..b0b6f28 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -76,6 +76,11 @@ afterwards: a comparison that misses its target is reported as failed. | **SV11-SPLIT** | Origin of the termination increment: end-fitting anchor alone (uniform curvature from the face); end fitting removed (anchor 20 m upstream) | Sævik (2011); Gjøsteen et al. (2027) | end fitting alone 1.23 / 1.36 (sectional 1.19 / 1.27); without end fitting unchanged (2.09, 2.07) | stated, not gated | Info | | **SV11-REACH** | Small-angle slip demand and the cases outside the band whatever the correction does | Sævik (2011) | a_max below 1 at 0.5° and 1°; sectional outside: LC 4, 6 | stated, not gated | Info | | **SV11-EQ88** | Bellmouth curvature law at the two published bellmouth ends (1.72 m; 1.79 m): radius and slope | Sævik (2011), Eq. 88 and text (3.9 m, 16°) | 3.90 m, 15.9°; 3.79 m, 17.0° | stated, not gated | Info | +| **SV11-LK** | Axial against axial: Lukassen's two-sided LC 14 records at stations 3.1–3.5 | Lukassen (2019), thesis Figs 2.7–2.11 | over 3.1 and 3.5: sectional 1.72, corrected 1.97 (all five 1.51, 2.84) | stated, not gated | Info | +| **SV11-SIDE** | Which quantity Sævik normalised: static stress implied by each reading of the two sides | Sævik (2011) Fig. 21(a); Lukassen (2019) | larger side 272–334 MPa (CV 0.08), axial CV 0.45; model 271 MPa | stated, not gated | Info | +| **SV11-SUB** | SV11 metrics without the one-sided stations 2.1/2.5, with coincident pairs by geometric mean, SV11-GJ at 3.1/3.5 | Sævik (2011); Gjøsteen et al. (2027) | 1.89 / 1.12; 2.22 / 1.21; GJ 1.51 / 1.33 (corrected / sectional) | stated, not gated | Info | +| **SV11-NORM** | Hypothesis: one normalising static stress for all load cases | Sævik (2011) | median 2.06 (3 of 14), sectional 1.07 (13 of 14) | stated, not gated | Info | +| **SK23-T1** | Three tubes in core–core contact only: onset, the curvature where the largest friction stress stops growing, and coalescence of the slip zones (`core_core_coupling="relative"`), code-to-code | Skeie, Sødahl, Pettersen and Verde (2023, OMAE2023-104817), Table 1, model and FE | onset 2.2518e-5 1/mm with the load per metre of helix, as their Eq. 16 (2.2320e-5 per metre of cable) vs 2.25e-5; saturation 1.0472 × onset (π/3) vs 1.049 (model) and 1.053 (FE); coalescence 1.209 × onset | stated, not gated | Info | | **AW-DONG25** | Armour wire anchored at both ends of one pitch at uniform curvature: stress at the anchor and peak, code-to-code | Dong et al. (2025), FE, Figs 14 and 25 | anchor 156.4 vs 156.9 MPa (source theory 147.8); peak 207.8 vs 204.5 MPa | stated, not gated | Info | | **AW-ZT14** | Same at a = 4.92: normalised anchor and peak stress, code-to-code | Zhu and Tan (2014), FE, Figs 4–8 | 1.19 / 1.70 vs 2.22 (the FE far field is not in slip) | stated, not gated | Info | | **DAI20-KAPPA** | Curvature at two stations inside a bellmouth against the rocking angle, steel-tube umbilical at 200 kN: contact angles predicted after identifying the bending stiffness on one curvature value | Dai, Sævik and Ye (2020), Fig. 9 | −0.87° (S2), −0.89° (S3); 59.1 kN m² identified | both within ±1.0° | Pass | @@ -84,7 +89,7 @@ afterwards: a comparison that misses its target is reported as failed. | **DAI18-RS** | Re-stick peak at every reversal, seven loops; spring-slider with `stick_time_s = 0` against the default `inf` | Dai, Sævik and Ye (2018), Figs 4a, 4c | measured 14 of 14 strokes; `0`: 14 of 14; `inf`: 0 of 14 | all; all; none | Pass | | **DAI18-T1** | Test 1 loops (8, 4, 1 MPa) against the spring-slider with the printed coefficients | Dai, Sævik and Ye (2018), Fig. 4a | peak −1.8 to +1.0 %; level −3.3 to +12.3 %; work −1.9 to −2.6 %; no gradual decay after the peak | stated, not gated | Info | | **DAI18-T3** | Test 3 loops (0.01–0.2 Hz) against the rate-independent spring-slider | Dai, Sævik and Ye (2018), Fig. 4c | dynamic level −3.5 to +0.3 %; static peak +10.6 % at 0.2 Hz not represented | stated, not gated | Info | -| **BM5** | Conductor temperature of the CIGRE TB 880 export cable, from the source's tabulated network inputs (`compute_thermal` on the cable itself is not yet comparable) | Poradowski tabulated thermal network; FEM 89.62 °C | 84.4 °C | ≤90 °C, about 5 K low | Partial | +| **BM5** | Conductor temperature of the Poradowski and Anders (2025) 220 kV export cable, from the source's tabulated network inputs (the packaged single-core-equivalent stack is not comparable with `compute_thermal`) | Poradowski tabulated thermal network; FEM 89.62 °C, IEC 90 °C | 85.8 °C (`R0` from IEC 60228, `λ1″` = 0); 90.9 °C with the CIGRE TB 880 eddy loss | ≤90 °C | Partial | | **BM4** | Axial stiffness of a population of umbilicals | Sævik and Bruaseth (2005) | mean ratio about 1.45 | <1.25 | Not validated | **Pass** meets the registered target. **Fail** does not; the target is unchanged and the row @@ -138,7 +143,11 @@ quantities are those of the passing rows. In particular: result is the one closest to them (median 1.19, 12 of 14 in band, against the 1.18 bound). At this rig the end fitting alone moves the ratios by 3–7 %; the excess comes from the curvature gradients at the bellmouth contact on a one-way curvature field (SV11-SPLIT). At - 0.5° and 1° the pipe sticks and the correction is zero (SV11-REACH). + 0.5° and 1° the pipe sticks and the correction is zero (SV11-REACH). The measured values + are one side (Gjøsteen et al.) or the larger side range (Sævik) of the tendon, which holds + strong-axis bending that the model does not compute in the bending plane (SV11-SIDE); where + the axial range is measured, the predicted axial range is 1.72 times it (sectional) at the + bending-plane stations (SV11-LK). - The rig-beam curvature that drives a bellmouth calculation is checked against the one published curvature history inside a bellmouth (DAI20-KAPPA: contact angles within 1° with one identified stiffness, under declared rig assumptions); the sectional Coulomb range of diff --git a/doc/api_python.rst b/doc/api_python.rst index 3edb6f6..796237d 100644 --- a/doc/api_python.rst +++ b/doc/api_python.rst @@ -60,7 +60,7 @@ Global results .. autofunction:: cablexsec.read_series_csv .. autofunction:: cablexsec.read_time_history_csv -.. autofunction:: cablexsec.read_riflex_ascii +.. autofunction:: cablexsec.read_ascii_columns .. autofunction:: cablexsec.read_cabledyn_sections .. autofunction:: cablexsec.read_cabledyn_range_graph .. autofunction:: cablexsec.read_cabledyn_lift diff --git a/doc/benchmarks.md b/doc/benchmarks.md index fe9d2d8..8f88693 100644 --- a/doc/benchmarks.md +++ b/doc/benchmarks.md @@ -71,7 +71,7 @@ The Yun shear coefficient of the finite-support no-slip EI counted an interstitial filler as a concentric shear layer in series with the armour, although it lies beside the cores. It is now left out. This raises the no-slip EI of every cable with an interstitial filler (IEA Task 49 66 kV, the bundled -33 kV and 220 kV three-core cables, Chae 2023, CIGRE TB 880 and Thies 2016 by +33 kV and 220 kV three-core cables, Chae 2023, Poradowski 2025 and Thies 2016 by 14 to 58%) and moves the loops that use the coefficient slightly. Full-slip EI, the plane-section full-stick EI and the cables without a filler (Ménard BM1, Witz, Sævik) are unchanged. The benchmark input `menard2023.yaml` is @@ -95,7 +95,8 @@ model) is the full construction. | Armour longitudinal displacement, Ménard and Cartraud FE | MM | Phase and scale reproduced; peaks over-predicted | | Tjahjanto et al. (2017), Leroy et al. (2017) FE armour slip | MM | Qualitative agreement only | | Sævik and Bruaseth (2005) umbilical axial stiffness | M | NOT VALIDATED | -| CIGRE TB880 conductor temperature | MM | PARTIAL | +| Poradowski (2025) conductor temperature | MM | PARTIAL | +| CIGRE TB 880 Case studies 2 and 8, ladder and losses of `compute_thermal` (TB880-C2, TB880-C8) | MM | PASS: `T1`, `T3`, `y_s`, `y_p`, `λ1′` to the printed digits, `W_d` +0.136 % (ε0); `T2` −5.1 % and +0.43 % and ratings +0.38 % and +0.011 % with TB 880's loss factors (stated) | | Global–local consistency, floating-wind application | I | Full-slip results are upper estimates | | Laid-core friction (gap R1b), Ménard and Cartraud (2023) six ranges | M | FAIL (BM1-ID, gated). With the transferred 0.3 MPa the cores raise the work (range (b) +30.2 %); identified on (b) with the full accounting, predictions (a) and (c) outside the registered target (+28.5, +26.2 %), (d)–(f) within 16 % | | Laid-core law, distributed form and contact loads that follow the tension (CF-D, CF-T) | A, I | PASS except CF-D-slip (1.02e-4 against 1e-4 at the default stations: station quadrature, documented) | @@ -569,7 +570,15 @@ provenance in `validation/paper_data/zeidan2025_*` and 55 + 63 wires of 4 mm): a different specimen, laboratory and campaign. The two tables disagree on the core build-up (thesis: EPR to 25 mm, screens to 27 mm and a metallic screen of unstated size; paper: one EPR layer from 14 - to 31.5 mm); the paper's layers are used. + to 31.5 mm); the paper's layers are used. The paper's 8.75 mm "EPR" layer + therefore holds the thesis's 5.5 mm of EPR (Table 5.2: OD 25 mm, t 5.5 mm), + its 1 mm insulation screen (to OD 27 mm) and the 2.25 mm radial space + between 27 mm and the core sheath bore (31.5 mm) in which the metallic + screen and any tapes lie; the paper gives the whole layer E = 6 MPa + (Table 4), and the thesis gives no modulus for EPR, the screens or the + metallic screen (Table 5.3). No source gives the metallic screen's + material, cross-section or lay. In the packaged section the layer enters + only the laid-core law (the armour ξ stops at the core bundle). - **Arrangement.** Supports 2.000 m apart (pin and roller), loading points 1.050 m apart through articulated saddles, shear span `a` = 0.475 m; specimens about 2.2 m long; displacement control, period 50 s; zero axial @@ -586,7 +595,18 @@ provenance in `validation/paper_data/zeidan2025_*` and 0.098, 0.120 and 0.143 1/m, 0.77–0.79 of the plotted amplitudes: the plotted curvature is the loading-point formula applied to the mid-span deflection. Reading R2 (primary): `y` is the mid-span deflection. Reading R1 - (reported): `y` is the loading-point deflection, as Eq. 5.1 states. + (reported): `y` is the loading-point deflection, as Eq. 5.1 states. The + texts point both ways: for R1, the thesis centres the imposed displacements + "around the actuator mid-stroke" (Sec. 5.3, pp. 89–90; one actuator drives + a spreader beam that carries both loading arms, Fig. 5.3) and the paper + says that the displacements "are imposed at these loading points" + (Sec. 5.1); for R2, both speak of "imposed mid-span" displacements or + deflections (thesis Sec. 5.4, p. 94; paper Sec. 5.1) and Fig. 18 / thesis + Fig. 5.7 put 30–60 mm at mid-span. The camera covers only the central zone + (19 markers at 50 mm, 900 mm in all, thesis p. 91; "between the loading + points", paper Sec. 5.1), so the measured part of Fig. 18 is the central + zone, whose curvature the simulated R2 test reproduces and R1 does not + (results below). R2 stays primary. - **Records.** Thesis Fig. 5.5 (first series) and Fig. 5.6 (the same specimen after more than 1000 cycles at ±60 mm; paper Fig. 17 shows the same record: its outlines lie within 0.23–0.32 pt median, 0.57 pt at the 95th @@ -605,6 +625,29 @@ provenance in `validation/paper_data/zeidan2025_*` and The first series (Fig. 5.5) dissipates 20–37 % more (400.7–414.5, 564.4–581.7, 731.7–754.1 and 885.4–917.8 J/m) with centres +0.82 to +0.90 kN·m. Reading resolution of the polylines: 1.2e-5 1/m and 0.29 N·m. +- **Zero and centre of the records.** The thesis says acquisition began with + the cable already bent in the rig (p. 93). In Fig. 5.6 the 30, 50 and + 60 mm records start at κ = 0 with M = 1.28, 1.23 and 1.27 kN·m, but the + 40 mm record starts at (0, −0.02 kN·m): that test began force-free at + y = 0, and its stabilised loop is still centred at +0.66 kN·m. The offset + is therefore not only a record-start artefact; it is a property of the + test that the papers do not explain (residual reel curvature, a tare or a + dead load are candidates). The stick secants after the two reversals also + differ (101/169, 134/153, 106/141 and 99/128 kN·m², plotted). The + comparison removes the measured centre, which is right for a constant + moment offset; the work does not depend on it. +- **What the source compared.** The source's FE cell is driven to the + plotted curvature as if it were the true curvature ("a curvature of + κ = 0.185 m⁻¹, corresponding to the displacement amplitude of 60 mm", + thesis p. 98), and paper Figs 20–21 (thesis Figs 5.9–5.10) compare + monotonic FE curves that start at M = 0 with the loading branch of each + record, which starts at M ≈ 1.2–1.3 kN·m at κ = 0 (30, 50 and 60 mm; the + 40 mm record from zero). No loop is compared, and the 3.5 MPa outer + pressure is chosen on such a branch (paper Fig. 20 and thesis Fig. 5.9 show + the 60 mm record; the paper's text names 40 mm, Sec. 5.3). + The agreement of the FE and measured bilinear parameters (K1 104 against + 106 kN·m², K2 10.6 against 9) is therefore a monotonic comparison in + plotted curvature, not a validation of the loops used here. ### Registered targets (registered before any run of this cable) @@ -659,8 +702,6 @@ independent. `python validation/scripts/check_zeidan2025.py` (one thread, about 30 min; the two registered rows run in the validation report). -| ID | Result | Status | -| --- | --- | --- | Since 2026-11-19 (support-cut shear stack, armour ξ 0.832 / 1.000): | ID | Result | Status | @@ -793,7 +834,7 @@ no loop or beam solver run): | `inter_array_single_core_33kv.yaml` | inner 0.0248 → 0.0248 (concentric core layers); outer 0.0333 → 1.0000 | 2.20 → 33.0 | | `inter_array_single_core_33kv_legacy_r2.yaml` | inner 0.0305 → 0.0305; outer 0.0409 → 1.0000 | 2.88 → 38.0 | | `export_three_core_220kv.yaml` | inner 0.2613 → 0.9363; outer 0.2809 → 1.0000 | 3422 → 9394 | -| `cigre_tb880_220kv.yaml` | inner 0.4692 → 0.4692 (single core: all concentric); outer 0.4957 → 0.9848 | 11425 → 17640 | +| `poradowski2025_220kv.yaml` | inner 0.4692 → 0.4692 (single core: all concentric); outer 0.4957 → 0.9848 | 11425 → 17640 | | `thies2016_30kv.yaml` | armour 0.2083 → 0.8428 (bedding) | 105 → 322 | | `chae2023_coiling.yaml` | armour 0.5427 → 0.9633 (inner yarn) | 860 → 1314 | @@ -955,16 +996,90 @@ elements and behaves as the source's no-radial-interaction analytical bound; the source FE with radial interaction gives a mean ratio of 0.946. Retained as a negative finding. -## CIGRE TB880 thermal benchmark (BM5) +## Poradowski (2025) thermal benchmark (BM5) + +Source: Poradowski and Anders (2025), Ocean Eng. 328, 121027, Table 1 and +NOTE 1: a 220 kV three-core export cable, 1200 mm² copper, corrugated copper +sheath, non-magnetic stainless armour, buried at 1.5 m (T4 = 0.3211 K·m/W, +15 °C), 908.45 A. The source cites CIGRE TB 880 for the construction; no TB +880 data are used here. | Class | Quantity | Reference | Result | Status | | --- | --- | --- | --- | --- | -| MM | Conductor temperature, three-core 220 kV cable, tabulated thermal network of Poradowski (2025) with circulating-current sheath loss only | FEM 89.62 °C; IEC 90 °C | 84.4 °C, about 5 K low | PARTIAL | +| MM | Conductor temperature from the tabulated network (T1 0.6579, T2 0.1121, T3 0.0357 K·m/W); `R0` 0.0151 Ω/km (IEC 60228 Table 4); `λ1′` 1.027 (IEC 60287-1-1 5.3.2); `λ1″` = 0 (IEC) | FEM 89.62 °C; IEC 90 °C | 85.8 °C | PARTIAL | +| MM | Same with the sheath eddy loss of IEC 60287-1-1 5.3.7.1 times the solid-bonding factor F (5.3.6), as CIGRE TB 880 Guidance Points 6 and 31 keep it (`λ1″` 0.186) | FEM 89.62 °C; IEC 90 °C | 90.9 °C | stated | + +The earlier result, 84.4 °C, took `R0 = ρ/A` (5 % below the IEC 60228 +value), which gives 1.4 K of the 5.6 K difference; the eddy loss gives the +rest. Its earlier diagnosis named only the eddy loss. The sheath formula is +that of IEC 60287-1-1 5.3.2: CIGRE TB 880 Guidance Point 38 gives the factor +1.5 of 5.3.11 to SL-type cables under magnetic armour, and with the +stainless armour of this cable that factor would give 100.0 °C. + +The packaged `poradowski2025_220kv.yaml` is a single-core-equivalent stack of +the three-core cable, as in the source's axisymmetric thermal model, with +every layer of Table 1 (the semiconducting screens, the swelling tape and the +air layers of footnote d) and its published resistivity; its `T1` is +0.6578 K·m/W against the source's 0.6579. The SL-type losses and the filler +geometric factor need the three cores, so `compute_thermal` on the stack is +not comparable, and the comparison uses the tabulated network +(`tests/test_thermal.py`, `validation/scripts/run_validation.py`). + +## CIGRE TB 880 Case studies 2 and 8 (TB880-C2, TB880-C8) + +Source: CIGRE TB 880 (2022), *Power cable rating examples for calculation tool +verification*, Section 6 (Case study 2: 3×630 mm² Cu/XLPE/PB/SCPE/PPY/SWA/PPY +18/30 kV array cable, lead sheaths, galvanised steel wire armour) and Section +12 (Case study 8: 3×1000 mm² 220 kV export cable, lead sheaths, stainless steel +wire armour). Both are buried 1 m deep in 0.7 K·m/W soil at 15 °C with solidly +bonded sheaths. The cables are `tests/data/tb880/case2_30kv.yaml` and +`case8_220kv.yaml`, built from the datasheets (Figs 29 and 40) and the +diameters and resistivities of the input tables; the references are the +brochure's printed results. + +### Registered targets (registered 2026-11-30, before the first run) + +| Quantity | Geometry | Band | +| --- | --- | --- | +| `T1`, `T3`, `y_s`, `W_d` | datasheet (core offset from the diameter over the assembled cores) | 0.5 % | +| `y_p` | cores touching, `s` = core diameter (as TB 880) | 0.5 % | +| `λ1′` | cores touching, with the factor 1.5 of TB 880 Guidance Point 25 on `y_s + y_p` under magnetic armour (Case 2) and the datasheet resistance per metre of core times `C_LL` (Case 8, Guidance Point 23) | 1 % | +| `T2` | datasheet | stated | +| Rating at 90 °C, with TB 880's `λ1` (eddy loss times `F`), `λ2` and the same choices; and with the IEC defaults | datasheet | stated | -The eddy-current loss term is not included, and the IEC 60287-2-1 three-core -geometric factor is not yet applied, so `compute_thermal` on the TB880 cable -input reads 136.1 °C with the BM5 inputs (908.45 A, three cores, λ1′, T4 = 0.3211 K·m/W, 15 °C; after the filler is represented as an equal-area annulus, which overestimates the filler resistance: 0.166 against 0.112 K·m/W). The comparison uses the cited tabulated network, not -the cable definition. +TB 880 takes the cores touching for `s` (proximity effect, sheath reactance) +but the datasheet diameter over the assembled cores for `x` of the filler +factor and for `c` of the armour loss. One core offset cannot give both, so +each gated quantity is compared in the geometry TB 880 uses for it, and `T2` +is stated. + +### Results + +| Case | `T1`, `T3`, `y_s`, `y_p` | `W_d` | `λ1′` | `T2` (stated) | Rating, TB 880 choices (stated) | Rating, IEC defaults (stated) | +| --- | --- | --- | --- | --- | --- | --- | +| 2 | to the printed digits | +0.136 % | to the printed digits | −5.11 % | 841.50 A (TB 880 838.34 A) | 864.29 A | +| 8 | to the printed digits | +0.136 % | +0.0001 % | +0.43 % | 1134.95 A (TB 880 1134.82 A) | 1168.86 A | + +Both rows PASS. The differences are explained: + +- `W_d`: TB 880 writes the capacitance as `ε/(18 ln(D/d)) 10⁻⁹`, that is + `ε0 = 10⁻⁹/(36π)`; IEC 60287-1-1:2023 5.2 gives `ε0 = 8.854×10⁻¹²` F/m. The + ratio is 1.001364. +- `T2`, Case 2: the touching test of the code selects the curve for equal + thicknesses (at the 134.9 mm assembled diameter the core axes are 63.05 mm + apart, 1.5 % more than the core diameter), TB 880 the curve for sheaths + touching; `x` = 0.0193 in both. +- `T2`, Case 8: the lead sheath keeps its own small conduction resistance in + the ladder (0.00011 K·m/W in `T2`); IEC takes it as an isotherm. +- The IEC-default ratings are 3.1 % and 3.0 % higher: without the eddy loss + (`λ1″` = 0 in IEC) and, in Case 2, without the factor 1.5 on `y_s + y_p` + that IEC 60287-1-1 5.1.6 gives only to pipe-type cables. + +The first run found that the sheath reactance of the 5.3.2 route (SL-type +cores under non-magnetic armour, TB 880 Guidance Point 38) did not carry the +lay-up factor that IEC 60287-1-1 Annex A gives to any per-metre property of +laid-up cores, and that 5.3.11 writes into `X`; Case 8 then read `λ1′` 2.2 % +low. It now does (`tests/test_thermal_tb880.py`). ## Temperature history coupled into clamping and fatigue (gap 4.1) @@ -973,8 +1088,8 @@ Gates of `tests/test_thermal_history.py` for the slow-time driver | Class | Quantity | Reference | Result | Status | | --- | --- | --- | --- | --- | -| A | Steady state of the transient RC ladder at the BM5 inputs (908.45 A, three cores, λ1′, `T4` 0.3211 K·m/W, 15 °C, `R_ac` at 90 °C) | `compute_thermal` 136.06 °C (IEC-consistent profile) | Equal to 1e-12 at 1, 3 and 8 sub-annuli per layer; every annulus edge to 1e-11; heat through `T4` equals the heat generated to 1e-10 | PASS | -| A | Same, 66 kV three-core template at 1093 A | `compute_thermal` 95.35 °C | Equal to 1e-8 (conditioning of the 0.10 mm copper tape screens) | PASS | +| A | Steady state of the transient RC ladder at the BM5 inputs (908.45 A, three cores, λ1′, `T4` 0.3211 K·m/W, 15 °C, `R_ac` at 90 °C) on the single-core-equivalent stack | `compute_thermal` (IEC-consistent profile) | Equal to 1e-12 at 1, 3 and 8 sub-annuli per layer; every annulus edge to 1e-11; heat through `T4` equals the heat generated to 1e-10 | PASS | +| A | Same, 66 kV three-core template at 1093 A, computed losses (`rating_current_A` 1093 A) | `compute_thermal` 118.3 °C | Equal to 1e-8 (conditioning of the 0.10 mm copper tape screens) | PASS | | A | Crank–Nicolson energy balance of the transient network | Discrete identity `ΣC ΔT = h/2 (Q_n + Q_n+1)` | Round-off (1e-9) | PASS | | A | TR-BDF2 order; steady hold; step response | Second order; steady state | Error ratio 3–5 on halving the step; drift < 1e-8 K; step reaches the steady state to 1e-3 K | PASS | | A | Coupled `R_ac(T_c)` | Fixed point | Re-evaluating `R_ac` at `T_c` changes no node by more than 1e-10 | PASS | @@ -1572,9 +1687,18 @@ into friction and dissipates about twice the measured work. - the bond is an elastic spring through the polymer outside the wires, an inner-loaded layered annulus free at the cable surface plus the strip concentration (`annulus_mode1_compliance_inner`, `bonded_face_terms`); -- the stuck layer is unchanged; +- stuck, the inner support `K_s` and the bond `K_b` act in parallel: + `xi_tot = (K_s + K_b) / (K_s + K_b + k2)`, `k2 = EA_w sin^2(a) / r_h^2`. + It equals the support's `xi` for a rigid support (`xi = 1`, Zeidan's outer + armour) and is higher otherwise (`xi` 0.50 becomes 0.510 and 0.90 becomes + 0.9004 on the Zeidan layer); - in full slip the bond keeps `xi_bond` of the layer's plane-section - stiffness, added in parallel to the law (`bonded_face_ei`). + stiffness, added in parallel to the law (`bonded_face_ei`); +- the friction cap is not reduced by the bond. The slider is the shear flow + of the inner face, bounded by mu times the inner-face pressure; the bond is + a separate elastic shear flow through the polymer outside, which adds wire + stress without sharing that bound. Scaling the cap by `1 - xi_bond` would + count the bond twice. **Zeidan.** The sheath sits on the outer armour with no tape (Table 5.2, Fig. 5.2). With the outer face bonded: @@ -1687,7 +1811,12 @@ a pitch, 20 stations from 573 mm before to about 2.9 m after the start of the curved bellmouth. Sævik plots, for 14 load cases (250-750 kN, 17-34 MPa, end-angle ranges 0.5-32°), the measured stress range at every station normalised by the static stress (Figs 17-23); Gjøsteen et al. (2027, Figs -27-35) plot the absolute LC 14 loops (±8°) at nine stations. Both are +27-35) plot the absolute LC 14 loops (±8°) at nine stations. Lukassen +(2019, PhD thesis, DTU, Figs 2.7–2.11) plots both narrow sides of the +tendon at 3.1–3.5 for the same load case (40 mm gauges, p. 11): Gjøsteen +et al.'s loops are side b, mean-centred, and Sævik's normalised values are +the larger of the two side ranges, not the axial range (SV11-SIDE and +"Measured quantity and normaliser" below). Both are digitised from 300 dpi renders (`validation/paper_data/saevik2011_figs17_23.csv`, `gjosteen2027_lc14_ranges.csv`; reading resolution 0.009-0.073 normalised and ±2 MPa; source SHA-256 in the headers). The digitised model curves @@ -1920,6 +2049,108 @@ brackets: stresses of 238–341 MPa (above), a ±18 % inconsistency between the two plots of one test. +### Measured quantity and normaliser (registered 2026-11-19, before the runs) + +Registered in a commit that changes no code, before the Lukassen records +below were digitised and before any of the rows was computed in this +register. Every row is reported, not gated; no target, band or gated input +of SV11-PLANE or SV11-GJ changes. + +**Why.** A third source of the same test is held: T. V. Lukassen, PhD thesis, +Technical University of Denmark (2019), Ch. 2, pp. 10–14, Figs 2.5–2.11. It +models LC 14 (500 kN, 34 MPa, ±8°) and plots, measured (OMS, blue) and +computed (FE, red; caption colours), the stresses σa and σb on **both narrow +sides** of the instrumented tendon at stations 3.1–3.5; the sensors have a +40 mm gauge length (p. 11), and the computed stress varies so strongly along +the wire that the comparison is "very sensitive to the precision of the OMS +strain sensor positions" (p. 12). SV11-PLANE and SV11-GJ compare the +predicted **axial** range with measured values whose quantity neither paper +states (Sævik: "normalized longitudinal stress range", normalised "with +respect to the static stress level", Sec. 7.4, one side lost at 2.1–2.5, +p. 2289; Gjøsteen et al.: "dynamic stress variation", elastic bending visible +at 3.1, Sec. 4.6.3). + +**Already seen (stated so that nothing below is a prediction).** An audit on +2026-11-19 (before this registration, with an emulation of the support-cut +stack that reproduces its registered values) read Lukassen's figures by eye +from a render (±10 MPa) and computed SV11-SUB and SV11-NORM: + +- Lukassen, measured, by eye: station 3.1 σa about 95, σb about 185 MPa + (range); 3.3 σa about 95, σb about 65; 3.4 σa about 107, σb about 35; 3.5 + σa about 55, σb about 75; Gjøsteen et al.'s ranges (186.6, 76.7, 41.4, + 77.5 MPa at 3.1, 3.3, 3.4, 3.5) follow σb. +- SV11-SUB: without 2.1/2.5 median R 1.89 corrected (3 of 14), 1.12 + sectional (12 of 14); pairs by geometric mean 2.22 (3) and 1.22 (12); + SV11-GJ at 3.1 and 3.5 only 1.51 corrected, 1.33 sectional. +- SV11-NORM: median R 2.06 corrected (3 of 14), 1.07 sectional (13 of 14). + +**Rows.** + +| ID | Quantity | Reduction | Target | Gated | +| --- | --- | --- | --- | --- | +| SV11-LK | Lukassen Figs 2.7–2.11, LC 14 ±8°, stations 3.1–3.5: measured axial range against the predicted axial range (sectional and termination-corrected, the SV11-GJ chain at ±8°, station azimuths 0, 45, 90, 135, 180°); measured larger-side range against the predicted larger single-side range | measured series = the blue (OMS) polylines of the native PDF paths, read in their stored order; axial = (σa + σb)/2 with σa and σb paired at equal θ on the same direction of rotation (linear interpolation along each monotonic leg); range = max − min over the record from its first reversal on; reported per station and as the mean ratio over the bending-plane stations 3.1 and 3.5 and over all five | none | no | +| SV11-SIDE | Which quantity Sævik normalised: at LC 14, the static stress implied at 3.1–3.5 by Lukassen's measured range (axial, σa, σb, larger side) divided by Sævik's normalised value (Fig. 21a) | five implied values per reading, their coefficient of variation, against the model static stress at 500 kN and 34 MPa; Sævik's LC 14 is a 15° range, Lukassen's ±8° | none | no | +| SV11-SUB | SV11-PLANE metric (a) without the one-sided stations 2.1 and 2.5; (b) with each coincident pair (1.5/2.1, 2.5/3.1, 3.5/4.1) replaced by the geometric mean of its two measured values; SV11-GJ metric (c) at 3.1 and 3.5 only | registered chain unchanged; only the measured set or values of the metric change | none | no | +| SV11-NORM | **Hypothesis**: Sævik normalised every load case by one static stress level, taken as that of 500 kN and 34 MPa (10 of the 14 load cases), instead of each case's own | SV11-PLANE metric with the predicted ranges divided by that one static stress | none | no | + +SV11-LK is the only comparison of this test in which the measured and the +predicted quantity are the same (axial against axial); it can test the +axial prediction at five stations of one load case, not the friction law +over the programme. SV11-NORM is labelled a hypothesis in every place it is +reported: neither paper prints the normaliser. + +**Results** (`check_saevik2011.lukassen_values`, `audit_values`; the +validation report; support-cut shear stack). Lukassen's records are +digitised from the native PDF paths (`validation/paper_data/lukassen2019_lc14_two_sides.csv`, +`validation/scripts/digitise_lukassen2019.py`; calibration residual +5e-5 deg and 7e-13 MPa). + +| Station | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | +| --- | --- | --- | --- | --- | --- | +| Measured σa / σb range [MPa] | 105 / 183 | 86 / 195 | 99 / 68 | 108 / 41 | 54 / 76 | +| Measured axial range [MPa] | 139 | 77 | 19 | 69 | 64 | +| Predicted axial, sectional / corrected [MPa] | 207 / 356 | 103 / 318 | 0 / 219 | 103 / 108 | 144 / 44 | +| Gjøsteen et al., measured [MPa] | 187 | 205 | 77 | 41 | 78 | + +| ID | Result | Status | +| --- | --- | --- | +| SV11-LK | Axial against axial, mean over 3.1 and 3.5: sectional 1.72, corrected 1.97; over all five: 1.51 and 2.84. Larger side against the predicted larger single side: sectional 1.35 (3.1, 3.5) and 0.94 (all five), corrected 1.54 and 1.61 | INFO | +| SV11-SIDE | Static stress implied by Sævik's LC 14 values: larger side 272–334 MPa (coefficient of variation 0.08); side a 0.30; side b 0.33; axial 51–254 MPa (0.45); model 271 MPa | INFO | +| SV11-SUB | (a) without 2.1/2.5: median R 1.89 (3 of 14), sectional 1.12 (12); (b) pairs by geometric mean: 2.22 (3), sectional 1.21 (12); (c) SV11-GJ at 3.1 and 3.5: 1.51, sectional 1.33 | INFO | +| SV11-NORM | Hypothesis: median R 2.06 (3 of 14), sectional 1.07 (13 of 14); reference static 271 MPa | INFO | + +What this settles: + +- *Gjøsteen et al. plot side b.* Their ranges follow σb within 2–13 % + (186.6/205.2/76.7/41.4/77.5 against 183/195/68/41/76 MPa); at 3.4 σa is + 2.7 times σb. SV11-GJ compares a predicted axial range with one side. +- *Sævik's normalised values are the larger side.* Of the four readings, only that one gives + one static stress at the five stations (coefficient of variation 0.08, + 272–334 MPa, near the model's 271 MPa); the axial reading would need 51 MPa + at 3.3, where the two sides are out of phase. This matches Table 3 + ("maximum ... stress ranges") and the MM's differential-geometry bending + term. SV11-PLANE therefore compares a predicted axial range with a measured + larger-side range, which contains strong-axis bending of the tendon: at the + bending-plane station 3.1 the sides differ by 78 MPa, a bending that the + curvature gradient of the bellmouth produces (Gjøsteen et al., Sec. 4.6.3) + and that the loxodromic lateral term, zero in the bending plane, does not. +- *Like with like, the prediction is further off, not closer.* Against the + measured axial range the SV11-GJ chain over-predicts at the bending-plane + stations by 1.72 (sectional) and 1.97 (corrected), against 1.27 and 2.07 in + the registered SV11-GJ; the sectional range at 3.5 is 2.2 times the + measured axial one. The registered rows are unchanged and stay FAIL. +- *The coincident pairs differ systematically.* ln(1.5/2.1) averages +0.34 + (×1.40) and ln(3.5/4.1) −0.65 (×0.52), with the same sign in all 14 load + cases, the stick cases at 0.5–2° included; the MM gives each pair equal + (RMS 0.03–0.08). The station scatter on which the band of the gate was + sized (above) is therefore a fixed per-sensor bias, not a random error that + averages out over load cases; Lukassen (p. 12) finds the comparison "very + sensitive to the precision of the OMS strain sensor positions" with 40 mm + gauges in a steep along-wire stress field. The band is not changed. +- *The normaliser* stays unknown (SV11-NORM is a hypothesis). The + larger-side static of SV11-SIDE (272–334 MPa at LC 14) is consistent with + the model's 271 MPa, which does not distinguish one level from one per case. + ## Measured wire-on-tape friction loops (DAI18-DIG, DAI18-RS, DAI18-T1, DAI18-T3) Source: Dai, Sævik and Ye, "An anisotropic friction model in non-bonded @@ -2601,7 +2832,7 @@ arrangement from the far end fitting to the tensioner pin (Fig. 1 sketch); no inlet tube between the end fitting and the entrance; no gravity (the source applies self-weight, value not printed); small slopes (the largest angle is 17°); tube steel 207 GPa. The umbilical bending stiffness and weight -are not printed ("obtained from one of the source's cross-section tools"). +are not printed. **DAI20-KAPPA (registered).** The SV11 rig beam (`check_saevik2011.Beam` with this rig: clamp at the end fitting, free inlet, entrance gap 3 mm, curved @@ -2968,7 +3199,7 @@ straight cores. gives no core pitch; the packaged file keeps straight cores. Under an unwinding twist the armour shortens; straight cores resist that shortening at the free end, whereas S-lay cores shorten with it, so straight cores give - the larger stiffness. The core pitch is not identified on the tools. + the larger stiffness. No core pitch is published, so none is identified. - **Terms.** With straight cores at 1.8 m: the fixed-radius armour term `K_tt − K_et²/K_ee` is 81.9 kN m², the Saint-Venant terms of the cores about their centres 21.0 kN m² and of the filler lobes 0.3 kN m² (the yarns are @@ -2981,10 +3212,6 @@ straight cores. then takes `k22 − k12²/k11` with the cylinders in `k11`. The published column (69.6–25.1 kN m²) is proportional to `1/P²` within 0.2 % and therefore holds no pitch-independent `G_c J_c` term; it is not used as a reference here. -- **Removed row.** CH-GJ compared these values with the range of the - source's three cross-section tools (Table 5), the only reference values - there. It was a model-to-model comparison with no measurement and is - removed from the validation report. ### Torsional stiffness of the Su et al. (2026) 35 kV cable @@ -3109,7 +3336,7 @@ Electro-thermo-mechanical benchmarks for the energised-cable chain. | Benchmark | Class | Quantity | Prerequisite | | --- | --- | --- | --- | -| CIGRE TB880 (BM5) completion | MM | Conductor temperature of the three-core 220 kV cable from the cable definition, not only the tabulated network | λ1″ eddy-current loss and the IEC 60287-2-1 three-core factor; full IEC 60287-1-1 and 2-1 texts (previews only in the library) | +| Poradowski (2025) (BM5) completion | MM | Conductor temperature of the three-core 220 kV cable from the cable definition, not only the tabulated network | a three-core definition of the cable (cores, fillers, armour) in place of the single-core-equivalent stack | | Transient conductor temperature under a current step and a daily cycle | A | Crank–Nicolson solution against the closed-form exponential response of a lumped ladder | The current-history driver is in place (`ThermalHistory.from_current`, gap 4.1); remaining: registered targets | | Fixed temperature against temperature history | I | Armour damage at the governing and hang-off sections of the floating-wind reference case with a synthetic power-correlated current history | Clamping history into `fast_slip`; joint current–sea-state binning | | Komperød (2017), bending at two temperatures | M | Bending-stiffness change between +5 and +20 °C | Published construction and heating condition | diff --git a/doc/citing.rst b/doc/citing.rst index e4e7ca5..6314efc 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -12,15 +12,15 @@ Software release ---------------- Seo, J. H. (2026). *CableXSec: Component-resolved local cross-section mechanics of dynamic -power cables* (version 0.2.1) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec +power cables* (version 0.2.2) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec .. code-block:: bibtex - @software{CableXSec_0_2_0, + @software{CableXSec_0_2_2, author = {Seo, Jae Hoon}, title = {{CableXSec}: Component-resolved local cross-section mechanics of dynamic power cables}, - version = {0.2.1}, + version = {0.2.2}, year = {2026}, url = {https://github.com/SMI-Lab-Inha/CableXSec}, license = {Apache-2.0} diff --git a/doc/concepts.md b/doc/concepts.md index a7b88bd..8005bfe 100644 --- a/doc/concepts.md +++ b/doc/concepts.md @@ -384,7 +384,7 @@ The usual workflow runs in one direction: 1. Run the global analysis and write the history at the sections of interest. 2. Read each section into a `LoadCaseSeries` with `cx.read_time_history_csv`, - `cx.read_riflex_ascii`, or `cx.read_cabledyn_sections` followed by + `cx.read_ascii_columns`, or `cx.read_cabledyn_sections` followed by `.histories[name].to_load_case_series(area)`. 3. Compute the stress and damage at the fixed material points with `cx.fatigue_from_series` or `cx.compute_fatigue`. diff --git a/doc/file_formats.md b/doc/file_formats.md index 8b00438..fe48c00 100644 --- a/doc/file_formats.md +++ b/doc/file_formats.md @@ -13,7 +13,7 @@ and the rules it is checked against. | Geometry override | `load_cable(..., geometry_override=)` | (by hand) | YAML | | Time-history CSV export of a global analysis | `read_time_history_csv` | global analysis program | CSV, named columns | | CableXSec exchange CSV | `read_series_csv` | `write_series_csv` | CSV, fixed columns | -| RIFLEX ASCII time history | `read_riflex_ascii` | RIFLEX | whitespace-separated columns | +| Whitespace-column ASCII time history | `read_ascii_columns` | any program | whitespace-separated columns | | CableDyn run (driver or OpenFAST module) | `read_cabledyn_sections` | CableDyn | CableDyn output files and deck | | CableDyn range graph (`.Line.range.out`) | `read_cabledyn_range_graph` | CableDyn | TAB-separated, units row | | CableDyn VIV lift (`.Line.V.out`) | `read_cabledyn_lift` | CableDyn | TAB-separated | @@ -28,7 +28,7 @@ and the rules it is checked against. `_Pa`, `_N`, `_s`, `_1_m` (1/m), `_deg`. Angles in a cable file are in degrees; the loaded layers also give them in radians. -**Text is UTF-8.** YAML, JSON and project files are UTF-8. The CSV and RIFLEX +**Text is UTF-8.** YAML, JSON and project files are UTF-8. The CSV and ASCII-column readers accept UTF-8, with or without a byte-order mark, and Windows-1252. **A bad file stops with a named error.** A file that cannot be read as @@ -96,7 +96,7 @@ them filled. | `helical` (armour wires) | `n_wires`, `d_wire_m`, `r_helix_m`, `lay_angle_deg` | `lay_direction` (`right_hand` default, `left_hand`), `manufacturing_clamping`, `bulk_sn`, `fretting_sn`, `transverse_slip_fraction`; flat or profiled wires: `wire_shape` (`round` default, `rectangular`, `profiled`), `wire_width_m`, `wire_thickness_m`, `wire_corner_radius_m`, `wire_area_m2`, `wire_I_normal_m4`, `wire_I_lateral_m4`, `wire_J_m4` | | `helical_stranded` (strand within conductor within cable) | `n_conductors`, `r_cable_m`, `lay_angle_cable_deg`, `n_strands`, `r_strand_m`, `d_strand_m`, `lay_angle_strand_deg` | `bulk_sn`, `fretting_sn` | | `cylindrical` (polymer annulus, bedding, filler, sheath, serving) | `r_inner_m`, `r_outer_m` | `tape` (helical tape winding), `strain_life`, `extrusion_shrinkage`, `construction` (`serving`), `stiffness` (instead of `material`) | -| `cylindrical_offset` (core component: conductor, insulation, screen) | `r_offset_m`, `r_inner_m`, `r_outer_m` | `n_cores` (default 3), `conductor_area_mm2`, `strand_layers`, `n_strands`, `strand_diameter_mm`, `strand_lay_angle_deg`, `construction`, `electrical`, `bulk_sn`, `fretting_sn`, `strain_life`, `outer_face_pressure`, `tape` | +| `cylindrical_offset` (core component: conductor, insulation, screen) | `r_offset_m`, `r_inner_m`, `r_outer_m` | `n_cores` (default 3), `conductor_area_mm2`, `d_conductor_m` (conductor diameter over the wires, the IEC 60287 `d_c`), `strand_layers`, `n_strands`, `strand_diameter_mm`, `strand_lay_angle_deg`, `construction`, `electrical`, `bulk_sn`, `fretting_sn`, `strain_life`, `outer_face_pressure`, `tape` | | `cylindrical_shell` (lead or corrugated aluminium sheath) | `r_mid_m`, `t_m` | `f_corrugation` (default 1), `scf` (default 1), `construction` (`bonded_laminate`), `bulk_sn`, `fretting_sn`, `strain_life` | `construction: serving` on a `cylindrical` layer declares a served yarn or a @@ -235,6 +235,7 @@ temperature, scaled to `E_Pa`. | `creep_coeff`, `creep_exponent` | – | `rho_ohm_m` | Ω m | | `sigma_y_Pa`, `sigma_UTS_Pa` | Pa | `alpha_R_per_K` | 1/K | | `epsilon_allow` | – (a ratio) | `epsilon_r` | – | +| | | `relative_permeability` | – | Values outside the admissible range of a property are rejected. Materials and S–N curves can also be registered for a session with `cx.register_material` @@ -511,9 +512,9 @@ are written with full precision, so a series survives the round trip unchanged. The bundled demonstration history `validation/paper_data/global_demo/global_history_si.csv` is in this format. -### RIFLEX ASCII time history +### Whitespace-column ASCII time history -`cx.read_riflex_ascii(path, ...)` reads whitespace-separated columns, one row +`cx.read_ascii_columns(path, ...)` reads whitespace-separated columns, one row per sample. Lines starting with `#`, `%` or `!` and blank lines are skipped. Columns are selected by their 1-based position, not by name: diff --git a/doc/global_local_guide.md b/doc/global_local_guide.md index c05f6d1..cea66ff 100644 --- a/doc/global_local_guide.md +++ b/doc/global_local_guide.md @@ -244,7 +244,7 @@ bend moments are `M = (Σf·y, −Σf·x)`, mapped to the gradient frame as sag (`(0, −0.136)`) at `θ = 0°`, as the concavity of each line requires. Earlier versions of `rotation_to_strain_curvature` returned `(k_y, −k_x)`, the negative, which put the tensile fibre half a turn from its physical place in the -time-history CSV, CableDyn and RIFLEX-rotation paths. The probe numbers are in +time-history CSV, CableDyn and ASCII-column rotation paths. The probe numbers are in `tests/data/curvature_sign_probe.json` (`tests/test_curvature_sign_probe.py`; no global solver is needed to run it), and the CableDyn gates in `tests/test_cabledyn_reader.py` check that the diff --git a/doc/glossary.rst b/doc/glossary.rst index 9f9ca9e..24a77b7 100644 --- a/doc/glossary.rst +++ b/doc/glossary.rst @@ -221,8 +221,8 @@ Terms and abbreviations CIGRE TB A Technical Brochure of CIGRE, the international council on large electric systems. TB - 610 defines the wet and dry cable designs; TB 862 gives mechanical tests; TB 880 is the source of a bundled 220 kV export cable - (:func:`~cablexsec.cigre_tb880_yaml_path`). + 610 defines the wet and dry cable designs; TB 862 gives mechanical tests; TB 880 gives guidance on IEC 60287 rating calculations + (:func:`~cablexsec.poradowski2025_220kv_yaml_path`). clamp boundary layer The length from an anchor over which the friction-fed wire force decays to the sectional @@ -942,11 +942,6 @@ Terms and abbreviations A clamping basis or cable label for a value chosen to be typical, not taken from a particular cable, for example the 2.0 MPa ``P0`` of the 33 kV templates. - RIFLEX - A global analysis program for slender marine structures. :func:`~cablexsec.read_riflex_ascii` - reads its ASCII time histories, with positional columns and a declared tension kind and - curvature convention. - rig test A combined tension and cyclic bending test of a specimen clamped at both ends. :func:`~cablexsec.simulate_rig_test` predicts the armour strain-gauge readings, including diff --git a/doc/howto.md b/doc/howto.md index 921f204..94aa4ed 100644 --- a/doc/howto.md +++ b/doc/howto.md @@ -268,10 +268,10 @@ without the heat of armour friction. ```text coupling none friction heat 0.00 W/m at start, 0.00 W/m at 6 h - after 6 h: conductor 31.9 C, outer armour 24.7 C + after 6 h: conductor 34.8 C, outer armour 25.8 C coupling two_way - friction heat 9.90 W/m at start, 18.24 W/m at 6 h - after 6 h: conductor 34.7 C, outer armour 27.8 C + friction heat 9.90 W/m at start, 22.27 W/m at 6 h + after 6 h: conductor 38.0 C, outer armour 29.5 C ``` This cable declares no manufacturing clamping, so the friction rests on the @@ -303,10 +303,10 @@ exceeds one even at the reference temperature. ## Global analysis results -### Reading CableDyn and RIFLEX results +### Reading CableDyn results and ASCII column files -**Goal:** load series at named sections of a CableDyn run and from a RIFLEX -ASCII time history. +**Goal:** load series at named sections of a CableDyn run and from a +whitespace-column ASCII time history. ```{literalinclude} howto/scripts/howto_10_read_global_results.py :language: python @@ -318,12 +318,12 @@ ASCII time history. curvature from tangent channels hangoff 201 samples, dt 0.1 s, Te mean 9.28 kN, true mean 6.40 kN, |kappa| max 0.0084 1/m sag 201 samples, dt 0.1 s, Te mean 1.33 kN, true mean -11.61 kN, |kappa| max 0.0990 1/m -riflex 240 samples, 59.8 s, effective tension 65.25 kN mean, kappa_x -0.0155 to 0.0156 1/m +columns 240 samples, 59.8 s, effective tension 65.25 kN mean, kappa_x -0.0155 to 0.0156 1/m ``` The true wall force is the {term}`effective tension` less the hydrostatic pressure times the outer area. At the sag bend it is compressive while the effective -tension is positive. RIFLEX columns are positional, so declare the tension +tension is positive. ASCII columns are positional, so declare the tension kind and the curvature convention, and convert effective tension with `with_true_tension` before fatigue. The [global–local guide](global_local_guide.md) covers both readers. diff --git a/doc/howto/scripts/howto_10_read_global_results.py b/doc/howto/scripts/howto_10_read_global_results.py index 123c62a..8b55746 100644 --- a/doc/howto/scripts/howto_10_read_global_results.py +++ b/doc/howto/scripts/howto_10_read_global_results.py @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University -"""How-to 10: read CableDyn and RIFLEX ASCII results into load series. +"""How-to 10: read CableDyn results and an ASCII column file into load series. Uses the files under ``tests/data`` of a source checkout: @@ -36,9 +36,9 @@ f"|kappa| max {np.hypot(kx, ky).max():.4f} 1/m" ) -# RIFLEX ASCII: positional columns; declare the tension and curvature basis. -series = cx.read_riflex_ascii( - DATA / "histories" / "synthetic_riflex.asc", +# Whitespace-column ASCII: positional columns; declare the tension and curvature basis. +series = cx.read_ascii_columns( + DATA / "histories" / "synthetic_columns.asc", time_col=1, curvature_x_col=2, tension_col=3, @@ -47,7 +47,7 @@ curvature_convention="strain_gradient", ) print( - f"riflex {series.time_s.size} samples, {series.time_s[-1]:.1f} s, " + f"columns {series.time_s.size} samples, {series.time_s[-1]:.1f} s, " f"{series.tension_kind} tension {series.tension_N.mean() / 1e3:.2f} kN mean, " f"kappa_x {series.curvature_x_1_m.min():.4f} to " f"{series.curvature_x_1_m.max():.4f} 1/m" diff --git a/doc/index.rst b/doc/index.rst index 68f88a2..b3409d8 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,13 +8,13 @@ Python library for the local (cross-section) mechanics of dynamic power cables. definition and a section load history it computes the axial, torsional and bending stiffness, the hysteretic moment–curvature response of helical armour with frictional slip, the stresses of every wire and component at fixed material points, contact pressures and slip, temperatures, -and fatigue damage. It reads the results of global analyses (CableDyn, RIFLEX, CSV exports) and +and fatigue damage. It reads the results of global analyses (CableDyn, CSV and whitespace-column exports) and turns them into the fatigue damage of the armour, the conductor and the metallic sheaths. .. admonition:: Release status :class: note - CableXSec ``v0.2.1`` is the current release. It is distributed as a source + CableXSec ``v0.2.2`` is the current release. It is distributed as a source repository and a pure-Python wheel on the `GitHub release page `_. Every comparison with published data, including the comparisons that do not meet their @@ -47,9 +47,10 @@ What CableXSec computes - Hertz contact and subsurface stress, Mindlin partial slip, fretting regimes, wear, SWT critical-plane recovery * - Thermal - - IEC 60287 thermal ladder for the conductor temperature (three-core geometric factor and - sheath eddy loss not applied, so conservative for three-core cables), a transient thermal - network, frictional heating and the thermal change of the clamping + - IEC 60287-1-1/2-1:2023 thermal ladder for the conductor temperature (IEC 60228 + resistance, skin, proximity and SL-type sheath losses, lay-up factor, SL filler geometric + factor), a transient thermal network, frictional heating and the thermal change of the + clamping * - Limit states - armour yield and sheath strain envelopes, armour compression, coiling, sheaves, capacity checks of time series @@ -59,7 +60,7 @@ What CableXSec computes through SWT, steel with a user-registered slip-amplitude curve); long-term damage over a scatter of sea states; termination-adjusted fatigue * - Global to local - - readers for CableDyn, RIFLEX and CSV time-history results; the ``cablexsec-batch`` command; + - readers for CableDyn, CSV and whitespace-column time-history results; the ``cablexsec-batch`` command; hysteretic bending-law export for global analysis Learning path diff --git a/doc/installation.rst b/doc/installation.rst index 4b567f7..6462adf 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -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.1-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the -`v0.2.1 release `_, compare +Download ``cablexsec-0.2.2-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the +`v0.2.2 release `_, compare the checksum, and install the wheel with its optional extras: .. code-block:: powershell - 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]" + Get-FileHash cablexsec-0.2.2-py3-none-any.whl -Algorithm SHA256 + python -m pip install "cablexsec-0.2.2-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.1" + python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.2" or, for development, clone the repository and install it in editable mode (see :doc:`development`): diff --git a/doc/local_analysis_guide.md b/doc/local_analysis_guide.md index 146bbb2..69e43b7 100644 --- a/doc/local_analysis_guide.md +++ b/doc/local_analysis_guide.md @@ -95,8 +95,19 @@ verification gates and active limitations. Read it. 2.4, tension–tension location not reproduced). The trellis term is off by default; the legacy surface rule (`trellis_model="surface_swt"`) is not validated. -- The IEC three-core mutual-heating factor. (Transient heat transfer through - the IEC 60287 ladder is available, Section 7.3.) +- The IEC 60287-2-1 thermal resistance of belted and screened three-core + cables (4.1.2.2, 4.1.2.3), and of a three-core cable with spaced-wire core + screens, which 4.1.2.2.4 treats as belted. (The SL-type route, with the + filler geometric factor, and transient heat transfer through the IEC 60287 + ladder are available, Section 7.3.) +- Accuracy of the single-core-equivalent ladder for three-core cables. IEC + 60287 treats a three-core cable as one radial (1-D) ladder with isothermal + sheaths. Against 2-D finite-element models at constant losses, + Chatzipetros and Pilgrim (2018, IEEE Trans. Power Delivery 33(4), + doi:10.1109/TPWRD.2017.2770321) found that it underestimates the conductor temperature by up to 8 °C for + SL-type lead-sheathed cables (Table I) and by 4.9 to 5.9 °C for cables with + aluminium or copper foil screens (Table II). The ladder here follows IEC and + inherits this error; their modified geometric factors are not implemented. - The slip-branch bending stiffness of a compact, solid-filler three-core cable (known limitation, gap G8; [benchmarks.md](benchmarks.md), "Known limitation: slip-branch stiffness of compact sections"). @@ -133,7 +144,7 @@ A cable is a YAML file validated by the Pydantic schema in | `inter_array_three_core_yaml_path()` | `inter_array_three_core_33kv.yaml` | Public representative 33 kV three core (61 + 67 wires); cores laid at 10° (pitch 0.926 m, the IEA 66 kV bundle lay angle at this core-centre radius; direction assumed) | | `cablexsec.cables.inter_array_single_core_legacy_r2_yaml_path()`, `..._three_core_legacy_r2_yaml_path()` | `*_33kv_legacy_r2.yaml` | Pinned pre-correction copies (armour fill 1.13–1.24, undeclared screens): reproduction of the figures of an earlier revision of the companion article and of the validation report only | | `export_three_core_yaml_path()` | `export_three_core_220kv.yaml` | Public 220 kV topology example with corrugated Al sheath; cores laid at 10° (pitch 2.138 m, as the 33 kV template); not a qualified design | -| `cigre_tb880_yaml_path()` | `cigre_tb880_220kv.yaml` | Public CIGRE TB 880 / Poradowski 220 kV export cable | +| `poradowski2025_220kv_yaml_path()` | `poradowski2025_220kv.yaml` | Public Poradowski and Anders (2025) 220 kV export cable (single-core-equivalent stack) | | `menard2023_yaml_path()` | `menard2023.yaml` | Public Ménard and Cartraud (2023) three-core cable | | `witz1996_yaml_path()` | `witz1996.yaml` | Public Witz (1996) ISSC 2.5-inch flexible pipe (benchmarks WITZ-EI, WITZ-ID); area-equivalent round wires, initial pressure identified on the 0-bar loop | | `witz1996_yaml_path(wires="rectangular")` | `witz1996_rect.yaml` | The same pipe with its 6 × 3 mm strips, profiled carcass and Zeta (gap G1) | @@ -366,7 +377,7 @@ read-only snapshots; edit with `dataclasses.replace`. curvature (k_x, k_y), fibre strain `k_x*y - k_y*x` (checked against a global line model: a hogging cantilever root, (0, +k), is in tension at φ = 180°, a sag bend, (0, −k), at φ = 0). The readers (`read_time_history_csv`, - CableDyn `strain_gradient()`, RIFLEX + CableDyn `strain_gradient()`, `read_ascii_columns` `curvature_convention="rotation"`) convert it to the gradient `(-y curvature, x curvature)`; bend moments map to `(-M_y, M_x)` (`cablexsec.mechanics.section_conventions`). `curvature_map="paper_r2"` @@ -396,7 +407,7 @@ Readers: | Function | Source | Notes | | --- | --- | --- | | `read_time_history_csv(path, ...)` | Time-history CSV export | Whole words of the heading, case-insensitive, exact heading first; must match one column; magnitude headings refused for curvature; row length checked. Defaults: `x curvature`, `y curvature`, `Wall tension` (kN, scale 1e3), strain in percent (scale 0.01) | -| `read_riflex_ascii(path, ...)` | RIFLEX ASCII | Positional columns; declare `tension_kind` and `curvature_convention` | +| `read_ascii_columns(path, ...)` | Whitespace-column ASCII | Positional columns; declare `tension_kind` and `curvature_convention` | | `read_cabledyn_sections(out_root, deck, sections, ...)` | CableDyn driver or OpenFAST module files | Returns `CableDynSectionHistory` per section; curvature vector reconstructed from tangent channels or positions; `.to_load_case_series(A_o)` gives the true-force series | | `read_series_csv` / `write_series_csv` | Canonical CSV | Round trip preserves kinds | | `jonswap_series(...)` | Synthetic | For demonstrations and tests only | @@ -499,7 +510,7 @@ Packaged cables: | Ménard and Cartraud (2023) | `initial_state` 0.3 MPa | published calibration, all contacts | | Witz (1996) 2.5-inch pipe | `initial_state` 1.037 MPa | identified (0-bar loop width, μ = 0.10), armour only | | 66 kV IEA Task 49 template | zero | not published (warns) | -| CIGRE TB 880 export | none declared | missing (warns) | +| Poradowski (2025) export | none declared | missing (warns) | ## 5. Worked workflow: global history to fatigue and contact indices @@ -1000,10 +1011,13 @@ print(core.loads, core.xi, core.mu_effective, core.stick_EI_Nm2) (`"absolute"`) every contact of a core, its neighbours included, resists the slip of that core against the plane section, as for a helix on a fixed cylinder: full slip at `π/2` times the onset curvature. `"relative"` is a - coupled intralayer slip model of laid cores: neighbouring cores touch at - the same axial position, so the friction between them resists their - relative slip `u_i − u_j`, while the filler and ring contacts keep the - absolute slip. The stations of the cores at one axial position form a + coupled intralayer slip model of laid cores after Skeie, Sødahl, Pettersen + and Verde (2023, OMAE2023-104817), who formulated the relative slip of + three cores, its onset and the coalescence of the slip zones at `π/3`: + neighbouring cores touch at the same axial position, so the friction + between them resists their relative slip `u_i − u_j`, while the filler and + ring contacts keep the absolute slip (the interlayer share and the + direction-tied cap are this library's). The stations of the cores at one axial position form a group whose intralayer friction shares sum to zero; the intralayer share of a station is bounded by `σ0 μ_cc (q_cc/q) |sin β| min(ψ, π/n)` (`ψ` from the neutral axis), the interlayer share by the Papailiou cap with @@ -1012,6 +1026,11 @@ print(core.loads, core.xi, core.mu_effective, core.stick_EI_Nm2) contact only (three cores) slip starts at the same onset, the largest frozen friction stress is 2/3 and the full-slip moment `√3/2` of the absolute values, and full slip comes at `2π/(3√3) = 1.209` times the onset. + The largest friction stress stops growing earlier, at `π/3 = 1.047` times + the onset, when the slip front passes `π/3` from the neutral axis; beyond + it only the moment still grows. Skeie et al.'s Table 1 "full slip" + curvature (1.049 times the onset in their model, 1.053 in their FE) is this + saturation, not the coalescence at 1.209 (validation row SK23-T1). An independent field solver of the coupled axial equilibrium of the three cores (`validation/scripts/coupled_core_slip_reference.py`) gives the same onset, full-slip curvature, moment–curvature, friction-force distribution @@ -1079,7 +1098,7 @@ print(core.loads, core.xi, core.mu_effective, core.stick_EI_Nm2) (Skeie and Sødahl 2012, Eq. 2.31) and all slip from `q expm1(μ sin β π/2) / (ξ EA_core sin² β cos β)` (Papailiou 1997, Eq. 15; with `core_core_coupling="relative"` the full-slip curvature of the coupled - stations, `core_full_slip_curvature`); + stations, `core_full_slip_curvature`, Skeie et al. 2023); both curvatures are reported per case and are nodes of the backbone grid. With `CoreFrictionSpec(core_shear=False, strand_slip=False)` the backbone starts on `compute_stiffness(cable).ei_max_Nm2`; with the core insulation @@ -1277,8 +1296,26 @@ components = cx.compute_component_response(cable, 0.02, section_state=state) ``` `compute_thermal` takes `ambient_C` and `T4_external_Km_W` from the -`environment` block unless passed. The section state applies each layer's free -thermal strain and the registered polymer E(T) laws within their source +`environment` block unless passed. It follows IEC 60287-1-1:2023 and IEC +60287-2-1:2023 and computes each loss term not passed: `R0` from IEC 60228 +Table 4 (`conductor_resistance_20C_ohm_m=` for a datasheet value), the skin and +proximity factors (`d_conductor_m` of the conductor gives the IEC `d_c` of a +stranded conductor), the sheath loss of the per-core screens of a two- or +three-core cable (5.3.11 under magnetic armour, 5.3.2 otherwise; `λ1″` = 0 as +in IEC), and the dielectric loss from the `U0` of the insulation's +`insulation_type`. The screen resistance takes the wires of a wire screen +(`strand_layers`) over their lay and a laminated foil over them in parallel, +as CIGRE TB 880 does; a metal tape over the wires is left out (TB 880 +Guidance Point 29). A single-core cable gets no proximity or sheath loss (they +depend on the circuit): pass `y_p` and `lambda1`. `result.losses` holds the +values used, `result.resistances` the `T1` to `T4` of IEC 60287-1-1 Formula (1) +(each annulus outside the sheath split between `T2` and `T3` by its share of the +armour loss; with one armour layer, the split at the armour), and the provenance +their basis. The ladder is the +IEC single-core-equivalent model, which can read a three-core cable's conductor +temperature up to 8 °C low (Chatzipetros and Pilgrim 2018; Section 2). The +section state applies each layer's free thermal strain and the registered +polymer E(T) laws within their source ranges, with one temperature per annulus; `temperature_C=` (a value or a mapping covering every layer) replaces the profile. On this path `sigma_A_Pa` already contains the thermal stress and `sigma_T_Pa` is zero. Do not combine it @@ -1457,9 +1494,14 @@ Rules and limits: - All layers at `T_ref` (`ThermalHistory.isothermal`) reproduce the unenergised solved results bit for bit (without relaxation). -- The thermal network has no armour loss `λ2`, no sheath eddy loss `λ1″` and - no IEC 60287-2-1 three-core factor (the full IEC texts are not held); a - three-core filler is the equal-filler-area annulus; `T4` has no heat +- The thermal network takes the losses of `compute_thermal` (IEC + 60287-1-1:2023: `R_0` from IEC 60228, skin and proximity factors, the + sheath loss of an SL-type cable, the dielectric loss above its `U_0` + threshold) and holds them at their rated values; it has no armour loss + `λ2` unless given and no sheath eddy loss `λ1″` (zero in IEC; CIGRE TB 880 + keeps it). A three-core filler keeps the heat capacity of the + equal-filler-area annulus and, in an armoured SL-type cable, the thermal + resistance of the IEC 60287-2-1 geometric factor; `T4` has no heat capacity, so a buried cable responds faster than in reality. - Cooling below `T_ref` contracts the outer sheath onto the armour while the inner polymers shrink away from it; heating does the opposite. Both can @@ -1515,7 +1557,7 @@ strain-life route (`method="strain_life"`, Section 13.3) accepts it. ### 8.1 Capacity check of global time series -A global history (time-history CSV, RIFLEX or CableDyn) is placed sample by sample on +A global history (time-history CSV, ASCII columns or CableDyn) is placed sample by sample on the tension–curvature envelope: a utilisation time series against the capacity curve and its statistical extreme (utilisation levels as in Skeie et al. 2012, Fig. 11). diff --git a/doc/radial_model.md b/doc/radial_model.md index 79cc050..a53fd31 100644 --- a/doc/radial_model.md +++ b/doc/radial_model.md @@ -207,7 +207,7 @@ The section state minimises the small-strain elastic energy per axial metre with - `"void"`: flooded or loose yarn. - `"auto"`: as declared. The central interstice is void. - Saint-Venant twist rigidity: the bonded ring layers twist about the cable axis and each core about its own centre (both exact for annuli). The filler lobes touch cores and ring through frictionless contacts that carry no axial shear, so they twist as separate bodies with their own warping (`saint_venant_rigidity`, validation row TQ-SV), not with their polar moment about the cable axis. The filler then adds 0.32 kN m² to the Chae, Nam and Shim (2023) cable instead of 7.9 kN m², and 0.14 kN m² instead of 3.6 kN m² to the Su et al. (2026) 35 kV cable. -- Stranded conductors whose metal area differs from the envelope, nested strands and corrugated shells are rejected, as in A3. The 220 kV template and CIGRE TB 880 are therefore unsupported. +- Stranded conductors whose metal area differs from the envelope, nested strands and corrugated shells are rejected, as in A3. The 220 kV template and the Poradowski (2025) cable are therefore unsupported. ### 3.5 Limits @@ -305,7 +305,7 @@ count. **Single-core 33 kV template.** +11 % inner `P1+P2` at 0 kN (line-force transmission), −3 % outer at 100 kN. Damage is unchanged. -**220 kV three-core template and CIGRE TB 880.** Rejected: the stranded conductor area differs from its envelope, and the sheath is corrugated. +**220 kV three-core template and Poradowski (2025).** Rejected: the stranded conductor area differs from its envelope, and the sheath is corrugated. **Loads only the solved model represents** (33 kV three-core, T = 50 kN, inner / outer `P1+P2` in MPa): diff --git a/doc/rig_test_guide.md b/doc/rig_test_guide.md index f2340cd..3c7a5fc 100644 --- a/doc/rig_test_guide.md +++ b/doc/rig_test_guide.md @@ -48,8 +48,29 @@ signed curvature at the reference station or the rotation of the clamp at `x = 0`; optionally a uniform specimen temperature. `retain_from_s` selects the samples over which ranges are taken. `RigProtocol.cyclic(...)` builds the usual test: a tension ramp from zero over one period with the specimen -straight, then `n_cycles` sinusoidal bending cycles (optionally with tension -cycling in phase), ranges over the last cycle. +straight, then `n_cycles` sinusoidal bending cycles, ranges over the last +cycle. The tension may cycle with the bending period (`tension_amplitude_N`), +lagging it by `tension_phase_lag_deg` (0 in phase, 90 in quadrature, 180 in +antiphase); the ramp ends at the tension of the first cycle. + +`RigProtocol.blocks([...])` builds a programme of constant-tension blocks, as +in the block programme of a full-scale fatigue test (CIGRE TB 862, 2022, +6.3.4.1): each `RigBlock(tension_N, amplitude, n_cycles, mean)` holds its +tension while the bending cycles about its mean, and the tension and mean +move linearly between blocks (`transition_s`, default one period). +`n_cycles` is the number of cycles simulated for gauge planning, not the +count of the test. Ranges are taken over the last cycle of the last block; +`protocol.block_times_s` gives each block's interval, so the ranges of one +block follow from `dataclasses.replace(protocol, retain_from_s=start)` on the +protocol cut at the block's end. + +```python +programme = cx.RigProtocol.blocks( + [cx.RigBlock(80e3, 0.029, 2), cx.RigBlock(80e3, 0.085, 2), + cx.RigBlock(110e3, 0.207, 2)], + samples_per_cycle=40, +) +``` **Setup** (`RigSetup`): @@ -267,6 +288,80 @@ Practical consequences for a test plan: fittings (set-back and epoxy length). `setback_variants_m` shows how strongly the near-clamp readings depend on it. +### Specimen length (CIGRE TB 862) + +`cx.tb862_specimen_checks(cable, test, ...)` compares the lengths of a test +specimen with the requirements of CIGRE TB 862 (2022), using the pitches of +the cable's helical components (`cx.component_pitches(cable)`: armour +layers, the core lay, resolved strand rings, stranded sub-conductors and tape +windings). A conductor given by one `strand_lay_angle_deg`, without resolved +`strand_layers`, is listed at its outer radius, an upper bound of its strand +pitch at that angle. `P_a` is the pitch of the outer armour wires and `P_max` +the longest pitch of any component. A check is refused, not passed, when the +pitch it needs is unknown: a withheld `core_lay` pitch, a helical layer without +its radius or lay angle, or a stranded conductor without its outer radius +blocks the `P_max` checks, and a withheld armour blocks the `P_a` checks. + +| `test` | Requirement | Clause | Kind | +|---|---|---|---| +| `"fatigue_template"` | fatigue-loaded section `>= P_max`; `>= P_a` from it to each end fitting (with a uniform-profile `setup`: its free length and clamp set-back) | 6.3.2 | recommended | +| `"fatigue_bend_stiffener"` | top end fitting to stiffener flange `>= P_a` | 6.3.2 | shall | +| | stiffener tip to bottom end fitting `>= P_a` | 6.3.2 | recommended | +| `"bending_stiffness"` | sample `>= P_a` | 6.4.2.2 | recommended | +| `"compression_bending"` | sample `>= 2 P_max` | 6.6.1.2 | recommended | +| `"compression"` | sample between end fittings `>= P_max` | 6.6.1.2 | must | + +Each `SpecimenCheck` holds the requirement, the clause, the required and the +actual length, `mandatory` and `passed`. + +### Block programme of the test (CIGRE TB 862) + +`cx.BlockProgramme` holds the blocks of a full-scale fatigue test (TB 862 +6.3.4): each `cx.FatigueTestBlock(n_cycles, tension_N, curvature_range_1_m, +damage_per_cycle, label)` gives its test cycles, constant tension, curvature +range and the damage of one cycle from the same fatigue calculation as the +service analysis (TB 862 6.3.4.1). + +```python +blocks = [ + cx.FatigueTestBlock(973_459, 80e3, 0.029, 4.58e-12, label="1"), + cx.FatigueTestBlock(122_231, 80e3, 0.085, 9.90e-10, label="3"), + cx.FatigueTestBlock(61, 110e3, 0.341, 1.11e-6, label="8"), +] +programme = cx.BlockProgramme(tuple(blocks)) +programme.total_damage, programme.damage_shares +programme.check(2.85e-4, service_mean_tension_N=10e3) # Table 6-4 +sequence = programme.test_sequence() # 6.3.4.3: 1A, 3A, 8A, 1B, 3B, 8B +rig = cx.RigProtocol.blocks(programme.to_rig_blocks(simulated_cycles=2)) +``` + +- `check(service_damage, service_mean_tension_N=...)` returns the + requirements of TB 862 Table 6-4 that the programme can check by itself: + accumulated test damage at least the service damage (a safety factor is a + matter of agreement; include it in `service_damage`), and every block's + tension at least the service mean tension. Compare `damage_shares` with + the service damage distribution for the third requirement. +- `test_sequence()` applies the switching of TB 862 6.3.4.3: a block with more + than 1 % of all cycles is not run in one row, and at most half of a block's + cycles is applied before switching. Each block is cut into + `ceil(1/max_fraction)` parts, ordered so that no two parts of one block + follow each other (with equal part counts: the rounds of TB 862 Table D.3). + A programme whose largest block cannot be separated by the others (one + block alone, or three parts against one other part) raises an error, since + no sequence meets 6.3.4.3. + `rounding="exact"` (default) keeps the cycles of every block, so a part of + an odd block can be one cycle over half; `rounding="up"` gives every part + `ceil(n/parts)` cycles, as Table D.3 does. +- `to_rig_blocks()` gives `RigBlock`s of amplitude `range/2` for the rig + simulation above. + +TB 862 Tables D.1 to D.3 are the regression cases +(`tests/test_block_programme.py`). Table D.3 prints 6.05e-4 for the damage of +blocks 3A and 3B; 61 116 cycles at 9.90e-10 give 6.05e-5, which its total +4.68e-4 uses. Its Appendix D.3 states a service mean tension of 82 kN at the +bend stiffener but runs the blocks of Table D.2 at 80 kN, so the strict +tension check does not pass on its own example. + ## 6. Limits - Clamp model: diff --git a/doc/template_66kv.md b/doc/template_66kv.md index ad21863..94b646d 100644 --- a/doc/template_66kv.md +++ b/doc/template_66kv.md @@ -60,12 +60,12 @@ Status: **P** published value; **D** derived from published values; | XLPE, MDPE, HDPE | E 1000 MPa, ν 0.40; ρ 925 / 956 / 980 kg/m³ | Table 2 | P | | PPY | E 150 MPa, ν 0.40, ρ 895 kg/m³ | Table 2 (footnote says polypyrrole; the values are those of polypropylene yarn) | P | | Steel UTS | 470 MPa (1.25 σ_y) | Enters only the thermal scaling of the yield check | A | -| Copper UTS | 220 MPa | [IEC60228] annealed Cu, as `copper_stranded` | P (other source) | +| Copper UTS | 220 MPa | Standard annealed Cu, as `copper_stranded` (IEC 60228 sets no copper tensile limit) | P (other source) | | Copper 0.2 % proof stress | 120 MPa | Section 2.1, p. 5: plastic limit of ETP copper (0.2 % plastic strain), after Robinson; the 250 MPa yield strength of the same sentence is not used | P | | PE allowable strain | 7.7 % (MDPE, HDPE) | API 17J Table 6, p. 19 (PE sheaths of unbonded flexible pipe), transferred; no power-cable value is published (DNVGL-ST-0119 16.2.2, p. 149) | P (other source) | | XLPE, PPY, copper tape screen limits | none | No public value; the results say "no limit given" | — | | Copper bending modulus | 5 GPa effective | Same model assumption as `copper_stranded` | A | -| Thermal properties | λ, ρc_p, α of the generic library grades | [IEC60287], [Qiao2025] as cited in the library | P (other source) | +| Thermal properties | λ, ρc_p, α of the generic library grades | λ: IEC 60287-2-1:2023 Table 1 (XLPE and PE 3.5 K·m/W), CIGRE TB 880 Table 2-3 (PP yarn 6.0 K·m/W); ρc_p, α as cited in the library | P (other source) | | Manufacturing clamping | `manufacturing_clamping` of both armour layers: zero, basis `not_published`; friction-dependent analyses warn (`MissingClampingStateWarning`) | Not stated by the source (no winding stress or extrusion pressure) | A | | Wet design, flooded annulus | `water_ingress: {design: wet, armour_annulus: flooded}` | No barrier in Table 1; CIGRE TB 610 5.4.3; ORE Catapult 2022 | D | | Armour S–N | `saevik_2011_flat_steel` (seawater, CP) | Flooded annulus; the source uses a DNV-RP-C203 curve (Fig. 27) of unstated class | A | @@ -159,7 +159,8 @@ th = cx.compute_thermal(cable, current_A=1093.0, conductor_area_m2=630e-6, | Armour yield, pure tension | about 1.1 MN | about 1000 kN, Section 3.3 | | | Copper 120 MPa plastic limit, pure tension | 704 kN (characteristic envelope, factors 1.0) | about 600 kN (Fig. 21); MBL 659 kN (IEA Table 13) | +6.9 % against the MBL; governs the envelope (Section 4.6) | | Copper 120 MPa plastic limit, pure bending | 0.362 1/m, bend radius 2.76 m, bent towards a core; 0.353 1/m, 2.84 m in the worst bending direction, 30° from a core (strand basis of the 5 GPa bending modulus) | 0.5 1/m (Section 3.3); MBR 2.76 m (IEA Table 13) | Set by the assumed bending modulus (Section 4.6) | -| Conductor temperature at 1093 A (125 MW) | 95.3 °C (armour 61.0 °C) | 125 MW rating, IEA Table 13 (90 °C XLPE basis) | Assumed T4; no three-core factor or λ2; the semiconducting screens count with the insulation (88.9 °C with the earlier full copper screens), and the stranding voids of the area-equivalent conductor, counted with the conductor screen, add about 1 K | +| AC resistance at 90 °C | 0.0395 Ω/km (`R0` 0.0283 Ω/km, IEC 60228 Table 4; `y_s` 0.060, `y_p` 0.039) | 0.04 Ω/km, IEA Table 13 | IEC 60287-1-1:2023 5.1 | +| Conductor temperature at 1093 A (125 MW) | 118.3 °C (armour 73.6 °C); 90 °C at about 932 A | 125 MW, IEA Table 13 (installation not stated) | Under the assumed burial (`T4` 0.343 K·m/W, 15 °C); IEC 60287:2023 losses (`λ1` 0.093 of the copper tape screens, IEC 60287-1-1 5.3.11) and thermal resistances (lay-up factor 1.019, `T1` from the 29.90 mm conductor, PE 3.5 and PP yarn 6.0 K·m/W, filler geometric factor `T2` 0.109 K·m/W); no `λ2`. Before these, 95.3 °C | | Mass | 55.4 kg/m (54.9 kg/m without the assumed copper tape) | 55.76 kg/m, IEA Table 13; 547 N/m in air, Janocha Table 5 | −0.6 %; screens after the source's section model (Section 2.1); 76.3 kg/m with Table 1 read as copper | The friction-dependent values from here to the end of the page were computed @@ -190,7 +191,7 @@ armour governs): | `distributed` | 1.30e-9 | 7.77e-10 | Since the normal local bending of the wires follows their slip state -(CHANGELOG, Unreleased), the largest wire damage of this record (0.1 s +(CHANGELOG, 0.2.1), the largest wire damage of this record (0.1 s sampling, noise 4e-4 1/m) is 0.23–0.27 % higher for the inner armour and 0.05–0.06 % higher for the outer armour in all four columns, at the same wire and fibre; the table keeps its earlier values, like the other @@ -267,8 +268,8 @@ What the comparison shows: raises the half-height by a further 0.03 kN·m. - **Core–core coupling.** With `CoreFrictionSpec(core_core_coupling="relative")` (the coupled intralayer slip model of the local analysis guide, - Section 6.1) the friction between neighbouring cores acts on their relative - slip. At 50 kN with the default coefficients (0.2) the bounded trefoil puts + Section 6.1, after Skeie et al. 2023, OMAE2023-104817) the friction between + neighbouring cores acts on their relative slip. At 50 kN with the default coefficients (0.2) the bounded trefoil puts 67 % of the core contact load on the core–core contacts; the solved radial state has no core–core contact force at that tension (98 % of the load is on the filler), so the two options agree on it. On the bounded state the cores reach full slip at 1.22 instead of @@ -282,6 +283,15 @@ What the comparison shows: ### 4.2 Energised cable: temperature history into clamping and fatigue +**Status (28 November 2026).** The thermal ladder now follows IEC +60287-1-1/2-1:2023 (Section 2 table, conductor temperature row). Under the +assumed burial the conductor is at 131.6 °C at 1093 A with the coupled +`R_ac` (`T_ref` 20 °C, 50 kN), above the 90 °C of XLPE, with an inner-armour +clamping of 681 kPa against 44.4 kPa unenergised and a thermal wire stress of ++143.1 MPa; the cold state has 45.4 kPa and the relaxed variant (`T_ref` +15 °C, f = 0.2) 348 kPa against 46.9 kPa. The tables below are kept as the +record of 18 November and are not regenerated. + **Status (18 November 2026).** The tables and factors of Sections 4.2 and 4.2.1 were computed with the earlier full copper screens of Table 1 and are kept as that record; they are not regenerated. With the screens of @@ -506,8 +516,7 @@ solid, which the radial solution needs. thickness `t = 29.90/9 = 3.322` mm, helix radii `i t`, and `630/61 = 10.33` mm² of copper per wire (`wire_area_m2`, the compacted area; fill 0.90 of the envelope). The envelope lies within the 28.7–32.5 mm of a compacted 630 mm² - Class 2 conductor (IEC 60228:2004, Annex C, as reproduced by a manufacturer's - catalogue; the standard itself is not held). + Class 2 conductor (IEC 60228:2023, Annex C, Table C.2). - **Lay ratios** (pitch over the ring's outer diameter) of the public copper conductors: diff --git a/doc/tutorials/04_contact_and_fretting.md b/doc/tutorials/04_contact_and_fretting.md index abdf250..e92beb7 100644 --- a/doc/tutorials/04_contact_and_fretting.md +++ b/doc/tutorials/04_contact_and_fretting.md @@ -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.1 does not compute Ruiz parameters. +tangential stress. CableXSec 0.2.2 does not compute Ruiz parameters. ## 8. The SWT critical plane next to a crossing @@ -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.1 +(`SWTLifeConstants`). The SWT constants registered in CableXSec 0.2.2 (`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. diff --git a/doc/uls_guide.md b/doc/uls_guide.md index 8193a23..699074b 100644 --- a/doc/uls_guide.md +++ b/doc/uls_guide.md @@ -30,9 +30,11 @@ supported from below or the cable meets the seabed: Vaz 2021b, introduction; Reda 2020, Section 2.1, for installation); - the sag bend and the ends of the buoyancy section of a lazy wave, at low mean tension and the largest dynamic curvature; -- installation and storage: lay-vessel heave at the touchdown point and the - constant-compression and compression-with-bending tests of CIGRE TB 862 - (MecLim II, Section 5.7). +- installation and storage: lay-vessel heave at the touchdown point. CIGRE + TB 862 (2022), Section 6.6.1, gives the compression tests: compression + with cyclic bending at a safety factor of at least 1.3 on the compressive + force and at least 100 bending cycles (6.6.1.3), and pure axial + compression (6.6.1.4). MecLim II, Section 5.7, refers to these tests. The hang-off and the bend-stiffener region carry the top tension and do not normally go into compression. Lateral buckling also needs cyclic bending @@ -319,5 +321,7 @@ curvature of the record. Pairing the two extremes is conservative. Section 4.5 and Table 6 (de Sousa test data). - Reda, A. (2020). Numerical modelling of subsea cables and pipelines. PhD thesis, Curtin University, Section 2.1. +- CIGRE TB 862 (2022). Recommendations for mechanical testing of submarine + cables for dynamic application, Section 6.6.1. - DNV-RP-F401 (2019), Table 3-1; DNV-ST-0359 (2016, amended 2021); DNV-RP-0360; MecLim II guidelines (Offshore Wind Accelerator). diff --git a/doc/user_guide.md b/doc/user_guide.md index ade19c4..c8eec72 100644 --- a/doc/user_guide.md +++ b/doc/user_guide.md @@ -32,7 +32,7 @@ Start with one of these: - **A {term}`bundled cable`**: published constructions such as the IEA Wind Task 49 66 kV three-core cable (`cx.iea_task49_66kv_yaml_path()`), {term}`CIGRE TB` 880 - 220 kV (`cx.cigre_tb880_yaml_path()`), the Ménard and Cartraud (2023) cable + 220 kV (`cx.poradowski2025_220kv_yaml_path()`), the Ménard and Cartraud (2023) cable (`cx.menard2023_yaml_path()`) or the Sævik (2011) riser (`cx.saevik2011_yaml_path()`). Each states its source. Load one with `cx.load_cable(path, geometry_override=None)`. @@ -90,7 +90,8 @@ section. The readers are: - `cx.read_time_history_csv` for a {term}`time-history CSV` export, columns selected by header; -- `cx.read_riflex_ascii` for a {term}`RIFLEX` ASCII time history; +- `cx.read_ascii_columns` for a whitespace-column ASCII time history, columns + selected by position; - `cx.read_cabledyn_sections` for a CableDyn run ([global–local guide](global_local_guide.md)); - `cx.read_series_csv` for a CableXSec series CSV. @@ -126,7 +127,8 @@ for screening. of the conductor, the armour and the surface at an entered current, with the environment of the cable (or the ambient and external resistance entered as arguments). It gives the temperatures of that current; it does not search - for the rating. + for the rating. The losses (IEC 60228 conductor resistance, skin, proximity, + sheath and dielectric losses) are computed from the cable unless entered. - **Frictional heating in bending** (`cablexsec.analysis.frictional_heating.simulate_frictional_heating`): an energised cable bent cyclically, as in a heated bending test or at a bend diff --git a/examples/torque_balance_templates.py b/examples/torque_balance_templates.py index cf74e6d..28418d9 100644 --- a/examples/torque_balance_templates.py +++ b/examples/torque_balance_templates.py @@ -36,7 +36,7 @@ ("33 kV single-core", cx.inter_array_single_core_yaml_path), ("33 kV three-core", cx.inter_array_three_core_yaml_path), ("220 kV export", cx.export_three_core_yaml_path), - ("CIGRE TB 880", cx.cigre_tb880_yaml_path), + ("CIGRE TB 880", cx.poradowski2025_220kv_yaml_path), ("Menard 2023", cx.menard2023_yaml_path), ) diff --git a/pyproject.toml b/pyproject.toml index eab228c..b8612bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta" [project] name = "cablexsec" -version = "0.2.1" +version = "0.2.2" description = "Component-resolved local cross-section mechanics and fatigue of dynamic power cables" readme = "README.md" requires-python = ">=3.11,<3.13" diff --git a/src/cablexsec/__init__.py b/src/cablexsec/__init__.py index 9253f34..b9aaf10 100644 --- a/src/cablexsec/__init__.py +++ b/src/cablexsec/__init__.py @@ -56,6 +56,11 @@ SlipScaleTable, export_bending_law, ) +from cablexsec.analysis.block_programme import ( + BlockProgramme, + FatigueTestBlock, + ProgrammeCheck, +) from cablexsec.analysis.capacity_check import ( ISO_13628_5_UTILISATION_FACTORS, CapacityCheckResult, @@ -107,10 +112,14 @@ ) from cablexsec.analysis.rig_test import ( GaugeLocation, + RigBlock, RigProtocol, RigSetup, RigTestResult, + SpecimenCheck, + component_pitches, simulate_rig_test, + tb862_specimen_checks, ) from cablexsec.analysis.sea_state_batch import ( CapacityBatchCheck, @@ -208,7 +217,6 @@ birdcage_buckling_detail, cable_to_fatigue_layers, cable_to_mkappa_specs, - cigre_tb880_yaml_path, compression_screen, compute_capacity, compute_component_response, @@ -232,6 +240,7 @@ inter_array_three_core_yaml_path, load_cable, menard2023_yaml_path, + poradowski2025_220kv_yaml_path, saevik2011_yaml_path, solve_cable_radial_state, solve_concentric_section, @@ -259,10 +268,10 @@ LoadCaseSeries, fatigue_from_series, jonswap_series, + read_ascii_columns, read_cabledyn_lift, read_cabledyn_range_graph, read_cabledyn_sections, - read_riflex_ascii, read_series_csv, read_time_history_csv, write_series_csv, @@ -320,7 +329,7 @@ UnmodelledPolymerSofteningWarning, ) -__version__ = "0.2.1" +__version__ = "0.2.2" from cablexsec.project import ( # noqa: E402 PROJECT_FORMAT_VERSION, @@ -388,7 +397,7 @@ "ClampingState", "LayerClamping", "clamping_state", - "cigre_tb880_yaml_path", + "poradowski2025_220kv_yaml_path", "menard2023_yaml_path", "inter_array_single_core_yaml_path", "inter_array_three_core_yaml_path", @@ -479,9 +488,16 @@ # rig-test simulation and gauge planning "simulate_rig_test", "RigProtocol", + "RigBlock", "RigSetup", "GaugeLocation", "RigTestResult", + "SpecimenCheck", + "component_pitches", + "tb862_specimen_checks", + "BlockProgramme", + "FatigueTestBlock", + "ProgrammeCheck", # bending-test arrangements (gap T1) "simulate_bending_test", "BendingProtocol", @@ -549,7 +565,7 @@ "LoadCaseSeries", "jonswap_series", "read_time_history_csv", - "read_riflex_ascii", + "read_ascii_columns", "read_series_csv", "write_series_csv", "fatigue_from_series", diff --git a/src/cablexsec/analysis/beam_test.py b/src/cablexsec/analysis/beam_test.py index 471ca53..42d28fc 100644 --- a/src/cablexsec/analysis/beam_test.py +++ b/src/cablexsec/analysis/beam_test.py @@ -81,6 +81,7 @@ from cablexsec.api import _prepare_mkappa_law from cablexsec.cable_adapters import require_fully_specified from cablexsec.cables.schema import CableData, uses_cable_materials +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSolverError from cablexsec.mechanics.bend_restrictor import ArticulatedRestrictor from cablexsec.mechanics.core_friction import ( @@ -1742,3 +1743,7 @@ def _simulate_along_wire( notes=tuple(notes), along_wire=aw_out, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/bending_law.py b/src/cablexsec/analysis/bending_law.py index 6b55a0f..1a849e3 100644 --- a/src/cablexsec/analysis/bending_law.py +++ b/src/cablexsec/analysis/bending_law.py @@ -100,6 +100,7 @@ import numpy as np from numpy.typing import ArrayLike, NDArray +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.mechanics.friction_law import FrictionLaw from cablexsec.mechanics.papailiou import ( @@ -1821,3 +1822,7 @@ def caps(tension: float, pressure: float | None) -> FloatArray: group_cap_dT_Nm_per_N=d_t, group_cap_dpe_Nm_per_Pa=d_p, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/block_programme.py b/src/cablexsec/analysis/block_programme.py new file mode 100644 index 0000000..a2fa7a7 --- /dev/null +++ b/src/cablexsec/analysis/block_programme.py @@ -0,0 +1,310 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +r"""Block programmes of full-scale fatigue tests (CIGRE TB 862 (2022) 6.3.4). + +A full-scale fatigue test of a dynamic cable runs a few blocks of constant +tension and constant curvature range, with far fewer cycles than in service but +an accumulated damage at least the service damage and a similar distribution of +damage between small and large cycles (TB 862 6.3.4.1). This module holds the +bookkeeping of such a programme: + +* :class:`FatigueTestBlock`: cycles, tension, curvature range and the damage + per cycle of one block. The damage per cycle comes from the same fatigue + calculation as the service analysis (TB 862 6.3.4.1), for instance a + CableXSec stress and S-N chain at the block's tension and curvature range. +* :class:`BlockProgramme`: totals, the damage share of each block, the + requirements of TB 862 Table 6-4 that a programme can check by itself + (accumulated damage and mean tension against the service values), and the + test sequence of TB 862 6.3.4.3: a block holding more than 1 % of all cycles + is not run in one row and at most half of a block's cycles are applied before + switching to another block (TB 862 Appendix D.4). + +TB 862 Appendix D Tables D.1 to D.3 are reproduced in the tests; Table D.3 +prints 6.05e-4 for the damage of blocks 3A and 3B, where 61 116 cycles at +9.90e-10 give 6.05e-5 (its total, 4.68e-4, uses 6.05e-5). +""" + +from __future__ import annotations + +import math +from dataclasses import dataclass +from typing import Literal + +from cablexsec.analysis.rig_test import RigBlock +from cablexsec.exceptions import CableInputError +from cablexsec.provenance import require_finite + +__all__ = ["BlockProgramme", "FatigueTestBlock", "ProgrammeCheck"] + + +@dataclass(frozen=True) +class FatigueTestBlock: + """One block of a full-scale fatigue test (TB 862 Tables 6-1, 6-2, D.1). + + Attributes + ---------- + n_cycles : int + Test cycles of the block (at least 1). + tension_N : float + Constant tension of the block [N] (TB 862 6.3.4.1). + curvature_range_1_m : float + Curvature range of the cycles [1/m] (maximum minus minimum). + damage_per_cycle : float + Fatigue damage of one cycle at this tension and curvature range, from + the fatigue calculation of the service analysis. + label : str + Name of the block in tables and sequences (``"1"``, ``"3A"``). + """ + + n_cycles: int + tension_N: float + curvature_range_1_m: float + damage_per_cycle: float + label: str = "" + + def __post_init__(self) -> None: + if isinstance(self.n_cycles, bool) or int(self.n_cycles) != self.n_cycles: + raise CableInputError("FatigueTestBlock n_cycles must be an integer") + if self.n_cycles < 1: + raise CableInputError("FatigueTestBlock n_cycles must be at least 1") + object.__setattr__(self, "n_cycles", int(self.n_cycles)) + for name in ("tension_N", "curvature_range_1_m", "damage_per_cycle"): + require_finite(getattr(self, name), name) + if getattr(self, name) < 0.0: + raise CableInputError(f"FatigueTestBlock {name} must be non-negative") + + @property + def damage(self) -> float: + """Damage of the block, ``n_cycles * damage_per_cycle``.""" + return self.n_cycles * self.damage_per_cycle + + +@dataclass(frozen=True) +class ProgrammeCheck: + """One requirement of TB 862 Table 6-4 checked on a block programme. + + ``required`` and ``given`` are in the unit of the requirement (damage or + N); ``passed`` is ``given >= required``. + """ + + requirement: str + clause: str + required: float + given: float + + @property + def passed(self) -> bool: + return self.given >= self.required + + +@dataclass(frozen=True) +class BlockProgramme: + """The blocks of a full-scale fatigue test, in programme order. + + Attributes + ---------- + blocks : tuple of FatigueTestBlock + The blocks (at least one). + """ + + blocks: tuple[FatigueTestBlock, ...] + + def __post_init__(self) -> None: + if not self.blocks: + raise CableInputError("a block programme needs at least one block") + if not all(isinstance(b, FatigueTestBlock) for b in self.blocks): + raise CableInputError("BlockProgramme blocks must be FatigueTestBlock") + object.__setattr__(self, "blocks", tuple(self.blocks)) + + @property + def total_cycles(self) -> int: + """Cycles of all blocks.""" + return sum(b.n_cycles for b in self.blocks) + + @property + def total_damage(self) -> float: + """Accumulated damage of all blocks (Miner sum).""" + return math.fsum(b.damage for b in self.blocks) + + @property + def damage_shares(self) -> tuple[float, ...]: + """Share of each block in the total damage (TB 862 Fig. D.12).""" + total = self.total_damage + if total == 0.0: + raise CableInputError("the programme has no damage") + return tuple(b.damage / total for b in self.blocks) + + @property + def accumulated_damage(self) -> tuple[float, ...]: + """Damage accumulated after each block (TB 862 Tables 6-1 and 6-2).""" + out: list[float] = [] + running = 0.0 + for b in self.blocks: + running += b.damage + out.append(running) + return tuple(out) + + def check( + self, + service_damage: float, + *, + service_mean_tension_N: float | None = None, + ) -> tuple[ProgrammeCheck, ...]: + """Requirements of TB 862 Table 6-4 that the programme can check. + + The accumulated test damage must be at least the damage expected in + service at the location (TB 862 6.3.4.1: equal or greater; a safety + factor is a matter of agreement, so pass it in ``service_damage``). + With ``service_mean_tension_N`` every block must have at least that + tension, so that the radial contact of the armour onto the core in the + test is at least that in service (TB 862 Appendix D.3, Table 6-4). The + similarity of the damage distribution with the service distribution + is not checked here: compare :attr:`damage_shares` with it. + """ + require_finite(service_damage, "service_damage") + if service_damage < 0.0: + raise CableInputError("service_damage must be non-negative") + checks = [ + ProgrammeCheck( + "accumulated test damage >= service damage", + "TB 862 6.3.4.1, Table 6-4", + service_damage, + self.total_damage, + ) + ] + if service_mean_tension_N is not None: + require_finite(service_mean_tension_N, "service_mean_tension_N") + checks.append( + ProgrammeCheck( + "block tension >= service mean tension (lowest block)", + "TB 862 Table 6-4, Appendix D.3", + service_mean_tension_N, + min(b.tension_N for b in self.blocks), + ) + ) + return tuple(checks) + + def test_sequence( + self, + *, + max_fraction: float = 0.5, + row_fraction: float = 0.01, + rounding: Literal["exact", "up"] = "exact", + ) -> tuple[FatigueTestBlock, ...]: + """The order of running the blocks, with switching (TB 862 6.3.4.3). + + A block holding more than ``row_fraction`` of all cycles is not run in + one row, and at most ``max_fraction`` of a block's cycles is applied + before switching to another block. Each block is cut into + ``ceil(1 / max_fraction)`` parts (two at the default 50 %). A block at + or below ``row_fraction`` of all cycles is cut the same way when it has + as many cycles as parts, as in Table D.3; one with fewer cycles runs + whole. Labels get ``A``, ``B``, ... + + The parts are ordered so that no two parts of one block follow each + other: each step runs the next part of the block with the most parts + left, other than the block just run, ties going to programme order. + With equal part counts this is the rounds of TB 862 Table D.3 (1A to + 8A, then 1B to 8B). If a block that must be split has too many parts + to be separated by the others (one block alone, or three parts against + a single other part), no sequence meets 6.3.4.3 and + :class:`~cablexsec.exceptions.CableInputError` is raised. + + ``rounding="exact"`` keeps every block's cycles: the parts differ by at + most one cycle, the larger ones first, so a part of an odd block can be + one cycle over the fraction. ``rounding="up"`` gives every part + ``ceil(n / parts)`` cycles, as Table D.3 does (it adds up to + ``parts - 1`` cycles to a block and never applies fewer cycles than the + programme). + """ + require_finite(max_fraction, "max_fraction") + require_finite(row_fraction, "row_fraction") + if not 0.0 < max_fraction <= 1.0: + raise CableInputError("max_fraction must lie in (0, 1]") + if not 0.0 <= row_fraction < 1.0: + raise CableInputError("row_fraction must lie in [0, 1)") + if rounding not in ("exact", "up"): + raise CableInputError("rounding must be 'exact' or 'up'") + parts = math.ceil(1.0 / max_fraction - 1e-12) + total = self.total_cycles + split: list[list[FatigueTestBlock]] = [] + names: list[str] = [] + must: list[bool] = [] + for index, block in enumerate(self.blocks): + name = block.label or str(index + 1) + must_split = block.n_cycles > row_fraction * total + k = parts if (must_split or block.n_cycles >= parts) else 1 + if must_split and block.n_cycles < parts: + raise CableInputError( + f"block {name!r} holds more than {row_fraction:.0%} of the cycles " + f"but fewer than the {parts} parts its switching needs" + ) + names.append(name) + must.append(must_split and k > 1) + if k == 1: + split.append([_relabel(block, block.n_cycles, name)]) + continue + if rounding == "up": + counts = [math.ceil(block.n_cycles / k)] * k + else: + base, extra = divmod(block.n_cycles, k) + counts = [base + (1 if i < extra else 0) for i in range(k)] + split.append( + [ + _relabel(block, n, f"{name}{chr(ord('A') + i)}") + for i, n in enumerate(counts) + ] + ) + nxt = [0] * len(split) + order: list[int] = [] + previous = -1 + for _ in range(sum(len(s) for s in split)): + left = [ + (len(s) - nxt[i], -i) + for i, s in enumerate(split) + if nxt[i] < len(s) and i != previous + ] + # Only the block just run can have parts left when ``left`` is empty. + i = previous if not left else -max(left)[1] + if i == previous and must[i]: + raise CableInputError( + f"block {names[i]!r} cannot be split into {parts} parts with " + "another block between every two of them (TB 862 6.3.4.3): " + "the programme has too few other blocks" + ) + order.append(i) + nxt[i] += 1 + previous = i + seen = [0] * len(split) + out: list[FatigueTestBlock] = [] + for i in order: + out.append(split[i][seen[i]]) + seen[i] += 1 + return tuple(out) + + def to_rig_blocks(self, *, simulated_cycles: int = 1) -> list[RigBlock]: + """The blocks as :class:`~cablexsec.analysis.rig_test.RigBlock` of curvature. + + Each block becomes a rig block of its tension and of the curvature + amplitude ``range / 2`` about zero mean, with ``simulated_cycles`` + cycles for :meth:`RigProtocol.blocks` (``quantity="curvature"``); the + rig simulation runs a few representative cycles, not the test count. + """ + return [ + RigBlock( + tension_N=b.tension_N, + amplitude=0.5 * b.curvature_range_1_m, + n_cycles=simulated_cycles, + ) + for b in self.blocks + ] + + +def _relabel(block: FatigueTestBlock, n_cycles: int, label: str) -> FatigueTestBlock: + return FatigueTestBlock( + n_cycles=n_cycles, + tension_N=block.tension_N, + curvature_range_1_m=block.curvature_range_1_m, + damage_per_cycle=block.damage_per_cycle, + label=label, + ) diff --git a/src/cablexsec/analysis/capacity.py b/src/cablexsec/analysis/capacity.py index 07f77bf..c275db9 100644 --- a/src/cablexsec/analysis/capacity.py +++ b/src/cablexsec/analysis/capacity.py @@ -128,6 +128,7 @@ CylindricalShellLayer, HelicalLayer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.axisymmetric import ( @@ -946,3 +947,7 @@ def compute_capacity( ), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/capacity_check.py b/src/cablexsec/analysis/capacity_check.py index aaf09dd..4c704a6 100644 --- a/src/cablexsec/analysis/capacity_check.py +++ b/src/cablexsec/analysis/capacity_check.py @@ -2,7 +2,7 @@ # Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University r"""Capacity check of global tension-curvature time series. -A global analysis (CableDyn, RIFLEX or another program) gives the tension and the +A global analysis (CableDyn or another program) gives the tension and the curvature at a cable section. Each sample is placed on the cross-section capacity envelope and given a design utilisation; the history of that utilisation, its maximum and the time it occurs, the exceedance counts and @@ -87,6 +87,7 @@ from numpy.typing import ArrayLike, NDArray from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.provenance import Provenance @@ -1338,7 +1339,7 @@ def check_capacity_series( """:func:`check_capacity` of a reader output. Accepts a :class:`~cablexsec.io.series.LoadCaseSeries` (time-history CSV, - RIFLEX, canonical CSV; its ``tension_kind`` must be declared) + whitespace columns, canonical CSV; its ``tension_kind`` must be declared) or a :class:`~cablexsec.io.cabledyn.CableDynSectionHistory` (effective tension, or the true tension with ``external_area_m2``; its torque is reported). @@ -1390,3 +1391,7 @@ def capacity_extremes( if len(results) < 2: raise CableInputError("an extreme-value fit needs at least two seeds") return gumbel_fit([r.max_utilisation for r in results], fractile=fractile) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/components.py b/src/cablexsec/analysis/components.py index 67efc98..88a049a 100644 --- a/src/cablexsec/analysis/components.py +++ b/src/cablexsec/analysis/components.py @@ -95,6 +95,7 @@ Layer, is_serving, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.core_friction import ( @@ -1910,3 +1911,7 @@ def core_component_utilisation( usage = np.maximum(usage, peak / modulus / limit.value) best = usage if best is None else np.maximum(best, usage) return best + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/compression.py b/src/cablexsec/analysis/compression.py index 5476379..7c47415 100644 --- a/src/cablexsec/analysis/compression.py +++ b/src/cablexsec/analysis/compression.py @@ -97,6 +97,7 @@ HelicalLayer, HelicalStrandedLayer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.materials import library from cablexsec.mechanics.stiffness import axial_stiffness_by_layer @@ -1466,3 +1467,7 @@ def compute_compression_capacity( kappa_component_1_m=k_comp if component_limits else np.zeros(0), governing_component=tuple(comp_governing), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/core_screen.py b/src/cablexsec/analysis/core_screen.py index 2c416c6..ecc27a3 100644 --- a/src/cablexsec/analysis/core_screen.py +++ b/src/cablexsec/analysis/core_screen.py @@ -80,6 +80,7 @@ helical_layer_fretting, ) from cablexsec.cables.schema import CableData, CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableLookupError, CableSchemaError from cablexsec.materials import library from cablexsec.materials.sn_curves import BlockedSNCurveError, get_sn_curve @@ -707,3 +708,7 @@ def face_mu(partner: CylindricalOffsetLayer | None, given: float | None) -> floa D_strain_life=d_life, strain_life_constants="" if life_constants is None else life_constants.name, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/electrical_life.py b/src/cablexsec/analysis/electrical_life.py index affa083..8bf6df3 100644 --- a/src/cablexsec/analysis/electrical_life.py +++ b/src/cablexsec/analysis/electrical_life.py @@ -52,6 +52,7 @@ from numpy.typing import NDArray from cablexsec.cables.schema import CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.provenance import Provenance, ValidatedRange, check_range @@ -261,3 +262,7 @@ def compute_electrical_life( limitations=tuple(limitations), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/frictional_heating.py b/src/cablexsec/analysis/frictional_heating.py index 3744c5b..54138ef 100644 --- a/src/cablexsec/analysis/frictional_heating.py +++ b/src/cablexsec/analysis/frictional_heating.py @@ -66,6 +66,7 @@ from cablexsec.api import compute_mkappa from cablexsec.cable_adapters import structural_armour_layers from cablexsec.cables.schema import CableData, CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.mechanics.clamp_layer import anchored_wire_node_dissipation from cablexsec.mechanics.papailiou import compute_mkappa_wire_slip_front @@ -678,3 +679,7 @@ def heater_power( updates=updates, network=network, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/kinematics.py b/src/cablexsec/analysis/kinematics.py index baa5516..63a77cf 100644 --- a/src/cablexsec/analysis/kinematics.py +++ b/src/cablexsec/analysis/kinematics.py @@ -107,6 +107,7 @@ from cablexsec._numba import HAVE_NUMBA from cablexsec.cables.schema import CableData, HelicalLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.core_friction import ( @@ -1053,3 +1054,7 @@ def kinematic_history( limitations=tuple(limitations), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/neutral_axis.py b/src/cablexsec/analysis/neutral_axis.py index c056b88..ef54b9a 100644 --- a/src/cablexsec/analysis/neutral_axis.py +++ b/src/cablexsec/analysis/neutral_axis.py @@ -8,7 +8,7 @@ (:mod:`cablexsec.mechanics.section_conventions`): the curvature is the axial-strain gradient ``b = (kx, ky)`` [1/m], so that a section point ``p = (x, y)`` has the axial strain ``eps0 + kx x + ky y``; angles are -measured from the section x axis towards y. Global-model, CableDyn and RIFLEX +measured from the section x axis towards y. Global-model and CableDyn rotation curvatures are converted to ``b`` by the readers. 1. **Bending direction** ``theta = atan2(ky, kx)``: the direction of the @@ -81,6 +81,7 @@ import numpy as np from numpy.typing import NDArray +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.provenance import Provenance @@ -695,3 +696,7 @@ def compute_neutral_axes( core_stick_EI_Nm2=core_stick, core_description=core_description, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/rig_test.py b/src/cablexsec/analysis/rig_test.py index 5868c87..ee741cf 100644 --- a/src/cablexsec/analysis/rig_test.py +++ b/src/cablexsec/analysis/rig_test.py @@ -68,6 +68,7 @@ structural_armour_layers, ) from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableXSecError from cablexsec.materials import library from cablexsec.mechanics.bend_restrictor import CurvatureField @@ -102,13 +103,17 @@ "GaugeRecommendation", "GaugeResult", "LayerScales", + "RigBlock", "RigProtocol", "RigSetup", "RigTestResult", + "SpecimenCheck", "StationLoop", + "component_pitches", "default_gauge_grid", "end_rotation_profile", "simulate_rig_test", + "tb862_specimen_checks", ] FloatArray = NDArray[np.float64] @@ -149,6 +154,11 @@ class RigProtocol: temperature (20 deg C). retain_from_s : float Ranges are taken over samples with ``time_s >= retain_from_s``. + block_times_s : tuple of (float, float) + Start and end of the bending cycles of each block of a + :meth:`blocks` programme (empty otherwise); a block's ranges follow + from ``dataclasses.replace(protocol, retain_from_s=start)`` on the + protocol cut at its end. """ time_s: FloatArray @@ -157,6 +167,7 @@ class RigProtocol: end_rotation_rad: FloatArray | None = None temperature_C: FloatArray | None = None retain_from_s: float = 0.0 + block_times_s: tuple[tuple[float, float], ...] = () def __post_init__(self) -> None: t = real_array(self.time_s, "time_s") @@ -186,6 +197,16 @@ def __post_init__(self) -> None: require_finite(self.retain_from_s, "retain_from_s") if self.retain_from_s > t[-1]: raise CableInputError("retain_from_s lies after the last sample") + blocks = tuple((float(a), float(b)) for a, b in self.block_times_s) + previous = float(t[0]) + for start, end in blocks: + if not (previous <= start < end <= t[-1]): + raise CableInputError( + "block_times_s must be ordered, non-overlapping intervals " + "within time_s" + ) + previous = end + object.__setattr__(self, "block_times_s", blocks) @classmethod def cyclic( @@ -200,12 +221,17 @@ def cyclic( n_cycles: int = 3, samples_per_cycle: int = 80, period_s: float = 10.0, + tension_phase_lag_deg: float = 0.0, ) -> RigProtocol: """Tension ramp from zero (one period), then sinusoidal bending. - Tension may cycle in phase with bending (``tension_amplitude_N``). - Ranges are retained over the last cycle. + Tension may cycle with the bending period (``tension_amplitude_N``), + lagging the bending by ``tension_phase_lag_deg`` (0: in phase, 90: in + quadrature, 180: in antiphase): ``T(t) = T + T_a sin(phi - lag)`` with + the bending ``mean + amplitude sin(phi)``. The ramp ends at the + tension of the first cycle. Ranges are retained over the last cycle. """ + require_finite(tension_phase_lag_deg, "tension_phase_lag_deg") if (curvature_amplitude_1_m is None) == (end_rotation_amplitude_rad is None): raise CableInputError( "give one of curvature_amplitude_1_m or end_rotation_amplitude_rad" @@ -232,10 +258,12 @@ def cyclic( bend_ramp = np.zeros(ramp_t.size) bend_ramp[:] = mean * ramp_t / period_s bend = np.concatenate([bend_ramp, mean + amp * np.sin(phase[ramp_t.size :])]) + lag = math.radians(tension_phase_lag_deg) + start_tension = tension_N + tension_amplitude_N * math.sin(-lag) tension = np.concatenate( [ - tension_N * ramp_t / period_s, - tension_N + tension_amplitude_N * np.sin(phase[ramp_t.size :]), + start_tension * ramp_t / period_s, + tension_N + tension_amplitude_N * np.sin(phase[ramp_t.size :] - lag), ] ) temperature = ( @@ -251,6 +279,76 @@ def cyclic( retain_from_s=retain, ) + @classmethod + def blocks( + cls, + blocks: Sequence[RigBlock], + *, + quantity: str = "curvature", + temperature_C: float | None = None, + samples_per_cycle: int = 40, + period_s: float = 10.0, + transition_s: float | None = None, + ) -> RigProtocol: + """Programme of constant-tension blocks of sinusoidal bending. + + Each block holds its tension while the bending cycles about its mean, + as in the blocks of a full-scale fatigue programme (CIGRE TB 862 + (2022), 6.3.4.1). Between blocks, and from zero before the first, the + tension and the mean bending move linearly over ``transition_s`` + (default one period) without cycling. ``RigBlock.n_cycles`` is the + number of cycles simulated for gauge planning, not the count of the + test. ``quantity`` is ``"curvature"`` (amplitudes in 1/m) or + ``"end_rotation"`` (rad). Ranges are retained over the last cycle of + the last block; ``block_times_s`` gives the cycling interval of each + block. + """ + if quantity not in ("curvature", "end_rotation"): + raise CableInputError("quantity must be 'curvature' or 'end_rotation'") + if not blocks: + raise CableInputError("give at least one RigBlock") + if samples_per_cycle < 8 or not (math.isfinite(period_s) and period_s > 0): + raise CableInputError("need samples_per_cycle >= 8 and period_s > 0") + ramp = period_s if transition_s is None else float(transition_s) + if not (math.isfinite(ramp) and ramp > 0): + raise CableInputError("transition_s must be positive") + n_ramp = max(2, samples_per_cycle // 2) + times, tensions, bends = [np.array([0.0])], [np.array([0.0])], [np.array([0.0])] + t_now, tension_now, mean_now = 0.0, 0.0, 0.0 + intervals: list[tuple[float, float]] = [] + for block in blocks: + if not isinstance(block, RigBlock): + raise CableInputError("blocks must be RigBlock instances") + tau = np.linspace(0.0, ramp, n_ramp + 1)[1:] + times.append(t_now + tau) + tensions.append(tension_now + (block.tension_N - tension_now) * tau / ramp) + bends.append(mean_now + (block.mean - mean_now) * tau / ramp) + t_now += ramp + start = t_now + n = block.n_cycles * samples_per_cycle + tau = np.linspace(0.0, block.n_cycles * period_s, n + 1)[1:] + times.append(t_now + tau) + tensions.append(np.full(n, block.tension_N)) + bends.append( + block.mean + block.amplitude * np.sin(2 * math.pi * tau / period_s) + ) + t_now += block.n_cycles * period_s + intervals.append((start, t_now)) + tension_now, mean_now = block.tension_N, block.mean + time = np.concatenate(times) + bend = np.concatenate(bends) + return cls( + time_s=time, + tension_N=np.concatenate(tensions), + curvature_1_m=bend if quantity == "curvature" else None, + end_rotation_rad=bend if quantity == "end_rotation" else None, + temperature_C=( + None if temperature_C is None else np.full(time.size, temperature_C) + ), + retain_from_s=t_now - period_s, + block_times_s=tuple(intervals), + ) + @classmethod def from_curvature_field( cls, @@ -278,6 +376,38 @@ def from_curvature_field( ) +@dataclass(frozen=True) +class RigBlock: + """One block of a rig programme (:meth:`RigProtocol.blocks`). + + Attributes + ---------- + tension_N : float + Constant tension of the block [N] (non-negative). + amplitude : float + Bending amplitude: curvature [1/m] or end rotation [rad]. + n_cycles : int + Cycles simulated (a representative few; not the test count). + mean : float + Mean curvature or end rotation of the block. + """ + + tension_N: float + amplitude: float + n_cycles: int = 1 + mean: float = 0.0 + + def __post_init__(self) -> None: + for name in ("tension_N", "amplitude", "mean"): + require_finite(getattr(self, name), name) + if self.tension_N < 0: + raise CableInputError("RigBlock tension_N must be non-negative") + if isinstance(self.n_cycles, bool) or int(self.n_cycles) != self.n_cycles: + raise CableInputError("RigBlock n_cycles must be an integer") + if self.n_cycles < 1: + raise CableInputError("RigBlock n_cycles must be at least 1") + + @dataclass(frozen=True) class RigSetup: """Specimen and clamp description. @@ -1713,3 +1843,294 @@ def extreme(g: GaugeResult) -> bool: "where the sectional law alone applies.", ) return tuple(out) + + +# --------------------------------------------------------------------------- # +# Specimen length (CIGRE TB 862) # +# --------------------------------------------------------------------------- # +@dataclass(frozen=True) +class SpecimenCheck: + """One specimen-length requirement of CIGRE TB 862 (2022) and its check. + + ``mandatory`` is ``True`` where the brochure writes "shall" or "must" + and ``False`` where it recommends ("should", "recommended"). + """ + + requirement: str + clause: str + required_m: float + actual_m: float + mandatory: bool + + @property + def passed(self) -> bool: + return self.actual_m >= self.required_m * (1.0 - 1e-12) + + +def component_pitches(cable: CableData) -> dict[str, float]: + """Lay pitch of every helical component of a cable [m], by name. + + Helical layers ``2 pi r / tan(alpha)``, the common core lay + (``core_lay``), resolved conductor strand rings, the strands and + sub-conductors of ``helical_stranded`` layers, and tape windings + (``tape`` of a cylindrical layer, at its mid radius as in + :func:`cablexsec.analysis.tape.tape_geometry`). A conductor given by a + single ``strand_lay_angle_deg`` (no resolved ``strand_layers``) is listed + at its outer radius ``r_outer_m``: its strands lie inside it, so this is + an upper bound of their pitch at the declared angle. Straight components + (lay angle zero, centre wires) have no pitch and are not listed, nor + are components whose radius, angle or pitch is withheld + (:func:`tb862_specimen_checks` refuses those). + """ + pitches: dict[str, float] = {} + + def add(name: str, radius: float | None, angle_deg: float | None) -> None: + if radius and angle_deg: + angle = math.radians(float(angle_deg)) + if 0.0 < angle < math.pi / 2: + pitches[name] = 2.0 * math.pi * float(radius) / math.tan(angle) + + for layer in cable.layers: + if layer.layer_type == "helical": + add(layer.name, getattr(layer, "r_helix_m", None), layer.lay_angle_deg) + elif layer.layer_type == "helical_stranded": + add( + f"{layer.name} (conductors)", + getattr(layer, "r_cable_m", None), + getattr(layer, "lay_angle_cable_deg", None), + ) + add( + f"{layer.name} (strands)", + getattr(layer, "r_strand_m", None), + getattr(layer, "lay_angle_strand_deg", None), + ) + rings = getattr(layer, "strand_layers", ()) or () + for i, ring in enumerate(rings): + if ring.pitch_m: + pitches[f"{layer.name} ring {i}"] = float(ring.pitch_m) + strand_angle = getattr(layer, "strand_lay_angle_deg", None) + if not rings and strand_angle: + add( + f"{layer.name} (strands, at r_outer)", + getattr(layer, "r_outer_m", None), + abs(strand_angle), + ) + tape = getattr(layer, "tape", None) + r_in, r_out = ( + getattr(layer, "r_inner_m", None), + getattr(layer, "r_outer_m", None), + ) + if tape is not None and r_in is not None and r_out is not None: + add(f"{layer.name} (tape)", 0.5 * (r_in + r_out), tape.lay_angle_deg) + if cable.core_lay is not None and cable.core_lay.pitch_m: + pitches["core lay"] = float(cable.core_lay.pitch_m) + return pitches + + +def _withheld_pitches(cable: CableData) -> list[str]: + """Helical components whose pitch is unknown (a withheld radius, angle or pitch).""" + out: list[str] = [] + for layer in cable.layers: + if layer.layer_type == "helical": + if getattr(layer, "r_helix_m", None) is None or layer.lay_angle_deg is None: + out.append(layer.name) + elif layer.layer_type == "helical_stranded": + for part, r_key, a_key in ( + ("conductors", "r_cable_m", "lay_angle_cable_deg"), + ("strands", "r_strand_m", "lay_angle_strand_deg"), + ): + if ( + getattr(layer, r_key, None) is None + or getattr(layer, a_key, None) is None + ): + out.append(f"{layer.name} ({part})") + if getattr(layer, "tape", None) is not None and ( + getattr(layer, "r_inner_m", None) is None + or getattr(layer, "r_outer_m", None) is None + ): + out.append(f"{layer.name} (tape)") + if ( + not getattr(layer, "strand_layers", ()) + and getattr(layer, "strand_lay_angle_deg", None) + and getattr(layer, "r_outer_m", None) is None + ): + out.append(f"{layer.name} (strands)") + if cable.core_lay is not None and cable.core_lay.pitch_m is None: + out.append("core lay") + return out + + +_TB862_TESTS = ( + "fatigue_template", + "fatigue_bend_stiffener", + "bending_stiffness", + "compression_bending", + "compression", +) + + +def tb862_specimen_checks( + cable: CableData, + test: str, + *, + setup: RigSetup | None = None, + loaded_length_m: float | None = None, + end_distance_m: float | None = None, + top_distance_m: float | None = None, + bottom_distance_m: float | None = None, + sample_length_m: float | None = None, +) -> tuple[SpecimenCheck, ...]: + """Specimen lengths of CIGRE TB 862 (2022) against the cable's pitches. + + ``P_a`` is the pitch of the outer armour wires (the outermost + structural helical layer) and ``P_max`` the longest pitch of any + component (:func:`component_pitches`). + + * ``"fatigue_template"`` (6.3.2, tension and template method): the + fatigue-loaded section (``loaded_length_m``) not shorter than + ``P_max``; at least ``P_a`` between it and each end fitting + (``end_distance_m``, recommended). With a ``setup`` of the uniform + profile they default to its free length and clamp set-back. + * ``"fatigue_bend_stiffener"`` (6.3.2): at least ``P_a`` from the top + end fitting to the bend-stiffener flange (``top_distance_m``, "shall") + and from the stiffener tip to the bottom fitting + (``bottom_distance_m``, recommended). + * ``"bending_stiffness"`` (6.4.2.2): a sample of at least ``P_a``. + * ``"compression_bending"`` (6.6.1.2): a sample of at least ``2 P_max``. + * ``"compression"`` (6.6.1.2, pure compression): at least ``P_max`` + between the end fittings ("must"). + """ + if test not in _TB862_TESTS: + raise CableInputError(f"test must be one of {_TB862_TESTS}") + pitches = component_pitches(cable) + withheld = _withheld_pitches(cable) + armour = [layer for layer in cable.helical_layers if layer.structural] + + def longest_pitch() -> tuple[str, float]: + # An unknown pitch may be the longest: no length can be certified. + if withheld: + raise CableInputError( + f"test {test!r} needs the longest pitch of the cable, but the " + f"pitch of {', '.join(withheld)} is withheld (give its radius " + "and lay angle, or the core_lay pitch)" + ) + if not pitches: + raise CableInputError("the cable has no helical component with a pitch") + name = max(pitches, key=lambda k: pitches[k]) + return name, pitches[name] + + def outer_armour_pitch() -> tuple[str, float]: + unknown = [layer.name for layer in armour if layer.name in withheld] + if unknown: + raise CableInputError( + f"test {test!r} needs the pitch of the outer armour wires, but " + f"the radius or lay angle of {', '.join(unknown)} is withheld" + ) + if not armour: + raise CableInputError( + "this TB 862 check needs the pitch of the outer armour wires; " + "the cable has no structural helical layer" + ) + outer = max(armour, key=lambda layer: float(layer.r_helix_m or 0.0)) + if outer.name not in pitches: + raise CableInputError( + f"the outer armour {outer.name!r} has no lay angle, so no pitch " + "for this TB 862 check" + ) + return outer.name, pitches[outer.name] + + def need(value: float | None, name: str) -> float: + if value is None: + raise CableInputError(f"test {test!r} needs {name}") + require_finite(value, name) + if value < 0: + raise CableInputError(f"{name} must be non-negative") + return float(value) + + checks: list[SpecimenCheck] = [] + if test == "fatigue_template": + if setup is not None and setup.profile == "uniform": + loaded_length_m = ( + setup.free_length_m if loaded_length_m is None else loaded_length_m + ) + end_distance_m = ( + setup.clamp_setback_m if end_distance_m is None else end_distance_m + ) + p_max_name, p_max = longest_pitch() + name_a, p_a = outer_armour_pitch() + checks.append( + SpecimenCheck( + f"fatigue-loaded section >= longest pitch ({p_max_name})", + "6.3.2", + p_max, + need(loaded_length_m, "loaded_length_m"), + False, + ) + ) + checks.append( + SpecimenCheck( + f"loaded section to each end fitting >= outer armour pitch ({name_a})", + "6.3.2", + p_a, + need(end_distance_m, "end_distance_m"), + False, + ) + ) + elif test == "fatigue_bend_stiffener": + name_a, p_a = outer_armour_pitch() + checks.append( + SpecimenCheck( + f"top end fitting to stiffener flange >= outer armour pitch ({name_a})", + "6.3.2", + p_a, + need(top_distance_m, "top_distance_m"), + True, + ) + ) + checks.append( + SpecimenCheck( + f"stiffener tip to bottom end fitting >= outer armour pitch ({name_a})", + "6.3.2", + p_a, + need(bottom_distance_m, "bottom_distance_m"), + False, + ) + ) + elif test == "bending_stiffness": + name_a, p_a = outer_armour_pitch() + checks.append( + SpecimenCheck( + f"sample >= outer armour pitch ({name_a})", + "6.4.2.2", + p_a, + need(sample_length_m, "sample_length_m"), + False, + ) + ) + elif test == "compression_bending": + p_max_name, p_max = longest_pitch() + checks.append( + SpecimenCheck( + f"sample >= twice the longest pitch ({p_max_name})", + "6.6.1.2", + 2.0 * p_max, + need(sample_length_m, "sample_length_m"), + False, + ) + ) + else: + p_max_name, p_max = longest_pitch() + checks.append( + SpecimenCheck( + f"sample between end fittings >= longest pitch ({p_max_name})", + "6.6.1.2", + p_max, + need(sample_length_m, "sample_length_m"), + True, + ) + ) + return tuple(checks) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/sea_state_batch.py b/src/cablexsec/analysis/sea_state_batch.py index 07a4016..0e419e3 100644 --- a/src/cablexsec/analysis/sea_state_batch.py +++ b/src/cablexsec/analysis/sea_state_batch.py @@ -95,6 +95,7 @@ from cablexsec.analysis.termination import TerminationSpec from cablexsec.analysis.thermal_coupling import ThermalHistory, ThermalState from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.io.cabledyn import ( CableDynLineType, @@ -1583,3 +1584,7 @@ def _json_default(value: Any) -> Any: if isinstance(value, Path): return str(value) raise TypeError(f"not JSON serialisable: {type(value).__name__}") + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/section_properties.py b/src/cablexsec/analysis/section_properties.py index 1bc9255..02ab96e 100644 --- a/src/cablexsec/analysis/section_properties.py +++ b/src/cablexsec/analysis/section_properties.py @@ -82,6 +82,7 @@ structural_armour_layers, ) from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.core_friction import ( @@ -1691,3 +1692,7 @@ def compute_load_sharing( ), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/section_stress.py b/src/cablexsec/analysis/section_stress.py index beeab2f..c337e90 100644 --- a/src/cablexsec/analysis/section_stress.py +++ b/src/cablexsec/analysis/section_stress.py @@ -92,6 +92,7 @@ HelicalStrandedLayer, is_serving, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.mechanics.core_friction import CoreFrictionSpec from cablexsec.mechanics.core_kinematics import CoreSlipState @@ -728,3 +729,7 @@ def _radial_field( basis="coupled normal section stress with superposed elastic bending " "about the cable axis", ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/sheath_strain.py b/src/cablexsec/analysis/sheath_strain.py index 75c9cfc..43c07c3 100644 --- a/src/cablexsec/analysis/sheath_strain.py +++ b/src/cablexsec/analysis/sheath_strain.py @@ -47,6 +47,7 @@ CylindricalOffsetLayer, CylindricalShellLayer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.materials.strain_life import ( @@ -385,3 +386,7 @@ def strain_life_sheath_fatigue( correction=correction, core_state=state, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/sheave.py b/src/cablexsec/analysis/sheave.py index 6a5fbd6..0132e60 100644 --- a/src/cablexsec/analysis/sheave.py +++ b/src/cablexsec/analysis/sheave.py @@ -56,6 +56,7 @@ import numpy as np +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.provenance import Provenance, relayed_warnings @@ -441,3 +442,7 @@ def compute_sheave( ), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/slip_curvatures.py b/src/cablexsec/analysis/slip_curvatures.py index 011e146..973aeed 100644 --- a/src/cablexsec/analysis/slip_curvatures.py +++ b/src/cablexsec/analysis/slip_curvatures.py @@ -30,6 +30,7 @@ from cablexsec.cable_adapters import cable_to_mkappa_specs, structural_armour_layers from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.mechanics.papailiou import full_slip_curvature, slip_onset_curvature @@ -88,3 +89,7 @@ def armour_slip_curvatures( return tuple( LayerSlipCurvatures(name, onset[i], full[i]) for i, name in enumerate(names) ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/stress.py b/src/cablexsec/analysis/stress.py index 79028da..5a6003e 100644 --- a/src/cablexsec/analysis/stress.py +++ b/src/cablexsec/analysis/stress.py @@ -73,6 +73,7 @@ structural_armour_layers, ) from cablexsec.cables.schema import CableData +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.papailiou import wire_slip_stress_bounds @@ -569,3 +570,7 @@ def compute_stress( ), ), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/tape.py b/src/cablexsec/analysis/tape.py index 2238235..cc17f7a 100644 --- a/src/cablexsec/analysis/tape.py +++ b/src/cablexsec/analysis/tape.py @@ -119,6 +119,7 @@ CylindricalOffsetLayer, TapeWinding, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.materials.mean_stress import MeanStressSpec @@ -722,3 +723,7 @@ def compute_tape_fatigue( D_sn=None if d_sn_map is None else float(np.max(d_sn_map)), sn_curve=None if curve is None else curve.name, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/thermal_coupling.py b/src/cablexsec/analysis/thermal_coupling.py index cf0f314..b383504 100644 --- a/src/cablexsec/analysis/thermal_coupling.py +++ b/src/cablexsec/analysis/thermal_coupling.py @@ -125,6 +125,7 @@ structural_armour_layers, ) from cablexsec.cables.schema import CableData, CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.clamping import clamping_state from cablexsec.exceptions import CableInputError from cablexsec.materials import library @@ -414,9 +415,9 @@ def from_current( conductor_area_m2: float | None = None, conductor_material: str | None = None, n_cores: int | None = None, - y_s: float = 0.0, - y_p: float = 0.0, - lambda1: float = 0.0, + y_s: float | None = None, + y_p: float | None = None, + lambda1: float | None = None, ambient_C: Sequence[float] | FloatArray | float | None = None, T4_external_Km_W: float | None = None, resistance_temperature_C: float | None = None, @@ -453,6 +454,7 @@ def from_current( lambda1=lambda1, T4_external_Km_W=T4_external_Km_W, n_per_layer=n_per_layer, + rating_current_A=_peak_current(current_A), ) t = np.asarray(time_s, dtype=np.float64) cur = np.broadcast_to(np.asarray(current_A, dtype=np.float64), t.shape).copy() @@ -511,9 +513,9 @@ def steady( conductor_area_m2: float | None = None, conductor_material: str | None = None, n_cores: int | None = None, - y_s: float = 0.0, - y_p: float = 0.0, - lambda1: float = 0.0, + y_s: float | None = None, + y_p: float | None = None, + lambda1: float | None = None, ambient_C: float | None = None, T4_external_Km_W: float | None = None, resistance_temperature_C: float | None = None, @@ -543,6 +545,7 @@ def steady( T4_external_Km_W=T4_external_Km_W, ambient_C=ambient_C, n_per_layer=n_per_layer, + rating_current_A=_peak_current(current_A), ) nodes = net.steady_state( current_A, resistance_temperature_C=resistance_temperature_C @@ -744,6 +747,19 @@ def _interval_mean(t: FloatArray, y: FloatArray, a: float, b: float) -> float: return float(np.sum(0.5 * (values[1:] + values[:-1]) * np.diff(grid)) / (b - a)) +def _peak_current(current_A: Sequence[float] | FloatArray | float) -> float | None: + """Largest current of a history: the rating current of a computed ``lambda1``. + + ``None`` when it is not a finite positive number (the network then + refuses or records the inputs as usual). + """ + try: + peak = float(np.max(np.abs(np.asarray(current_A, dtype=np.float64)))) + except (TypeError, ValueError): + return None + return peak if math.isfinite(peak) and peak > 0.0 else None + + def _conductor_defaults( cable: CableData, area_m2: float | None, material: str | None ) -> tuple[float, str]: @@ -1701,8 +1717,8 @@ def run(state: ThermalState) -> FatigueResult: "block-mean state frozen within a block; record repeated per block", "friction coefficient independent of temperature", "E(T) only for registered laws (10-90 degC) or explicit transfers", - "lambda2, lambda1'' and the IEC 60287-2-1 three-core factor are not " - "included in the thermal network (IEC full texts not held)", + "the armour loss lambda2 (unless given) and the sheath eddy loss " + "lambda1'' (zero in IEC 60287-1-1) are not in the thermal network", f"stress-free reference T_ref {thermal.T_ref_C:g} deg C" + (f" ({thermal.T_ref_basis})" if thermal.T_ref_basis else ""), f"damage ratios scale with a power of the friction stress range: " @@ -1734,3 +1750,7 @@ def run(state: ThermalState) -> FatigueResult: relaxation_damage_ratio=MappingProxyType(relaxation_ratio), clamping=clamping, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/analysis/torque_balance.py b/src/cablexsec/analysis/torque_balance.py index 5cb96cb..d999381 100644 --- a/src/cablexsec/analysis/torque_balance.py +++ b/src/cablexsec/analysis/torque_balance.py @@ -80,6 +80,7 @@ Layer, uses_cable_materials, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.clamping import ClampingState, clamping_state from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library @@ -1093,3 +1094,7 @@ def _integer_candidates(f: Callable[[float], float], lo: int, hi: int) -> list[i else: a = m1 return list(range(a, b + 1)) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/api.py b/src/cablexsec/api.py index bc3111c..41397fe 100644 --- a/src/cablexsec/api.py +++ b/src/cablexsec/api.py @@ -126,7 +126,6 @@ structural_armour_layers, ) from cablexsec.cables import ( - cigre_tb880_yaml_path, export_three_core_yaml_path, iea_task49_66kv_300_yaml_path, iea_task49_66kv_stranded, @@ -135,6 +134,7 @@ inter_array_three_core_yaml_path, load_cable, menard2023_yaml_path, + poradowski2025_220kv_yaml_path, saevik2011_yaml_path, witz1996_yaml_path, ) @@ -244,7 +244,7 @@ __all__ = [ # loading "load_cable", - "cigre_tb880_yaml_path", + "poradowski2025_220kv_yaml_path", "menard2023_yaml_path", "inter_array_single_core_yaml_path", "inter_array_three_core_yaml_path", @@ -1398,8 +1398,9 @@ def compute_shell_stress( Examples -------- - >>> from cablexsec import load_cable, compute_shell_stress, cigre_tb880_yaml_path - >>> cab = load_cable(cigre_tb880_yaml_path(), geometry_override=None) + >>> from cablexsec import load_cable, compute_shell_stress + >>> from cablexsec import poradowski2025_220kv_yaml_path + >>> cab = load_cable(poradowski2025_220kv_yaml_path(), geometry_override=None) >>> s = compute_shell_stress(cab, "cu_metallic_sheath", 0.03, 1e-3, ... p_ext_Pa=2e6, delta_T_K=40.0) >>> s.sigma_total_Pa > 0.0 diff --git a/src/cablexsec/cable_adapters.py b/src/cablexsec/cable_adapters.py index a70e6af..ea5dc14 100644 --- a/src/cablexsec/cable_adapters.py +++ b/src/cablexsec/cable_adapters.py @@ -32,6 +32,7 @@ HelicalLayer, Layer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.clamping import require_radial_shrinkage_route, warn_if_unclamped from cablexsec.exceptions import CableSchemaError from cablexsec.materials import library @@ -1174,3 +1175,7 @@ def cable_to_fatigue_layers( ) ) return fatigue_layers + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/cables/__init__.py b/src/cablexsec/cables/__init__.py index dd2e872..93cc2ea 100644 --- a/src/cablexsec/cables/__init__.py +++ b/src/cablexsec/cables/__init__.py @@ -14,7 +14,7 @@ __all__ = [ "CableData", "chae2023_yaml_path", - "cigre_tb880_yaml_path", + "poradowski2025_220kv_yaml_path", "export_three_core_yaml_path", "iea_task49_66kv_300_yaml_path", "iea_task49_66kv_stranded", @@ -204,13 +204,14 @@ def iea_task49_66kv_stranded( ) -def cigre_tb880_yaml_path() -> Path: - """Return the path to the packaged CIGRE TB 880 / Poradowski 220 kV cable. +def poradowski2025_220kv_yaml_path() -> Path: + """Return the path to the packaged Poradowski & Anders (2025) 220 kV cable. - A fully public export-cable definition (published geometry) used for - the export demonstration and benchmark BM5. + A fully public export-cable definition (Ocean Eng. 328, 121027, Table 1) + as a single-core-equivalent stack, used for the export demonstration and + benchmark BM5. """ - return Path(str(resources.files("cablexsec.cables") / "cigre_tb880_220kv.yaml")) + return Path(str(resources.files("cablexsec.cables") / "poradowski2025_220kv.yaml")) def menard2023_yaml_path() -> Path: diff --git a/src/cablexsec/cables/cigre_tb880_220kv.yaml b/src/cablexsec/cables/cigre_tb880_220kv.yaml deleted file mode 100644 index a452006..0000000 --- a/src/cablexsec/cables/cigre_tb880_220kv.yaml +++ /dev/null @@ -1,140 +0,0 @@ ---- -# CIGRE TB 880 / Poradowski-Anders (2025) 220 kV export cable — PUBLIC. -# -# Geometry and materials are from the public benchmark cable of -# Poradowski & Anders, Ocean Engineering 328 (2025) 121027, Table 1 -# (construction detailed in CIGRE TB 880, 2022). Public data only: this is -# the section-0.9-safe export demonstration cable. It is modelled here as a -# single-core-equivalent concentric stack (as Poradowski uses for the thermal -# axisymmetric model); radii are cumulative outer radii from the published -# nominal diameters. -# -# Values flagged "representative" are NOT in Poradowski Table 1 (armour lay -# angles; corrugation stiffness factor; armour material). They are typical -# submarine-cable values used only for the mechanical demonstration and are -# clearly marked; the published thermal/electrical reproduction (BM5) does not -# depend on them. -cable: - name: "CIGRE TB 880 reference export cable" - description: "220 kV export submarine cable (public benchmark, Poradowski 2025)" - manufacturer: "Public (CIGRE TB 880, 2022)" - source_document: "Poradowski & Anders, Ocean Engineering 328 (2025) 121027, Table 1" - voltage_kV: 220 - design_life_years: 25 - -environment: - ambient_C: 15.0 # [Poradowski2025] Table 1 NOTE 1 (buried 15 degC) - T4_external_Km_W: 0.3211 # [Poradowski2025] Table 1 NOTE 1 (external/soil) - frequency_Hz: 50.0 - source: "[Poradowski2025] Table 1 NOTE 1 (directly buried reference case)" - -layers: - - - name: cu_conductor - layer_type: cylindrical_offset - material: copper_stranded - n_cores: 1 - r_offset_m: 0.0 - r_inner_m: 0.0 - r_outer_m: 0.0210 # dia 42.0 mm [Poradowski2025] Table 1 - conductor_area_mm2: 1200.0 # [Poradowski2025] Table 1 (stranded Cu) - construction: stranded - notes: "Internal lay not tabulated; axial reduction uses actual Cu area, not the envelope. No solid-annulus radial substitution." - source: "[Poradowski2025] Table 1" - - - name: xlpe_insulation - layer_type: cylindrical_offset - material: xlpe_qiao2025 - n_cores: 1 - r_offset_m: 0.0 - r_inner_m: 0.0227 # over conductor screen, dia 45.4 mm - r_outer_m: 0.0466 # under insulation screen, dia 93.2 mm - electrical: - permittivity_relative: 2.5 # [IEC60287-1-1] Table 3, XLPE > 30 kV - loss_factor_tan_delta: 0.001 # [IEC60287-1-1] Table 3, XLPE > 30 kV - vec_exponent_n: 15.0 # n0 [Mazzanti2007] Table I (XLPE) - thermal_b_k: 12430 # B [K] [Mazzanti2007] Table I (XLPE) - vec_synergism_b: 4420 # b [Mazzanti2007] Table I (XLPE) - field_threshold_kV_mm: 5.0 # E0 [Mazzanti2007] Table I - mechanical_beta: 100.0 # CableXSec screening extension (NOT Mazzanti) - source: "[Poradowski2025] Table 1 (XLPE 23.9 mm); electrical [IEC60287]/[Mazzanti2007] Table I" - - - name: water_barrier - layer_type: cylindrical - material: hdpe - r_inner_m: 0.0481 # over insulation screen, dia 96.2 mm - r_outer_m: 0.0517 # dia 103.4 mm (swelling tape) - structural: false - source: "[Poradowski2025] Table 1" - - - name: cu_metallic_sheath - layer_type: cylindrical_shell - material: copper_tape_screen - r_mid_m: 0.05650 # corrugated Cu ring (modelled 111.95/113.95 mm) - t_m: 0.001 # 1.0 mm [Poradowski2025] Table 1 footnote d - f_corrugation: 0.5 # representative corrugation stiffness factor (NOT TB 880) - scf: 2.0 # representative corrugation-root SCF (NOT TB 880) - source: "[Poradowski2025] Table 1 footnote d (dims); f_corr/SCF representative" - - - name: anti_corrosion_sheath - layer_type: cylindrical - material: hdpe - r_inner_m: 0.0613 # dia 122.5 mm - r_outer_m: 0.0659 # dia 131.75 mm (semi-conductive PE) - source: "[Poradowski2025] Table 1" - - - name: assembly_filler - layer_type: cylindrical - material: pp_filler - r_inner_m: 0.0659 - r_outer_m: 0.14195 # dia 283.9 mm (assembling / fillers) - structural: false - source: "[Poradowski2025] Table 1" - - - name: inner_armour_bedding - layer_type: cylindrical - material: hdpe - r_inner_m: 0.14195 - r_outer_m: 0.14495 # dia 289.9 mm - structural: false - source: "[Poradowski2025] Table 1" - - - name: inner_armour - layer_type: helical - material: galvanised_steel_armour # representative (Poradowski: stainless, non-magnetic) - n_wires: 128 # [Poradowski2025] Table 1 - d_wire_m: 0.007 # 7.0 mm [Poradowski2025] Table 1 - r_helix_m: 0.14845 # bedding OD + d_wire/2 - lay_angle_deg: 12.0 # representative submarine armour lay angle (NOT TB 880) - lay_direction: right_hand - bulk_sn: saevik_2011_flat_steel - source: "[Poradowski2025] Table 1 (count/dia); lay angle representative; material representative" - - - name: outer_armour_bedding - layer_type: cylindrical - material: hdpe - r_inner_m: 0.15195 - r_outer_m: 0.15425 # dia 308.5 mm - structural: false - source: "[Poradowski2025] Table 1" - - - name: outer_armour - layer_type: helical - material: galvanised_steel_armour # representative (Poradowski: stainless, non-magnetic) - n_wires: 135 # [Poradowski2025] Table 1 - d_wire_m: 0.007 # 7.0 mm [Poradowski2025] Table 1 - r_helix_m: 0.15775 # bedding OD + d_wire/2 - lay_angle_deg: 12.0 # representative submarine armour lay angle (NOT TB 880) - lay_direction: left_hand - bulk_sn: saevik_2011_flat_steel - source: "[Poradowski2025] Table 1 (count/dia); lay angle representative; material representative" - - - name: outer_cover - layer_type: cylindrical - material: hdpe - r_inner_m: 0.16125 # dia 322.5 mm - r_outer_m: 0.16755 # dia 335.1 mm - source: "[Poradowski2025] Table 1" - -aggregate_properties: - OD_mm: 335.1 # [Poradowski2025] Table 1 diff --git a/src/cablexsec/cables/export_three_core_220kv.yaml b/src/cablexsec/cables/export_three_core_220kv.yaml index 8c7120a..60cbbba 100644 --- a/src/cablexsec/cables/export_three_core_220kv.yaml +++ b/src/cablexsec/cables/export_three_core_220kv.yaml @@ -3,7 +3,8 @@ # # Generic, public geometry for a 220 kV three-core export cable: three # offset cores (Cu + XLPE + lead sheath per core, modelled as offset annuli), -# PP filler, HDPE bedding, an overall corrugated-aluminium metallic sheath +# semiconducting screens with the XLPE properties, PP filler, HDPE bedding, +# an overall corrugated-aluminium metallic sheath # (cylindrical_shell), double steel armour, HDPE outer sheath. Round # representative numbers for a topology integration test. The corrugated-Al # sheath exercises the metallic-sheath wall-stress path with f_corr/SCF. @@ -41,6 +42,17 @@ layers: notes: "Internal lay unspecified; axial calculation uses stated Cu area in an aligned-axis reduction" source: "Representative" + - name: conductor_screen + layer_type: cylindrical_offset + material: xlpe_qiao2025 + n_cores: 3 + r_offset_m: 0.060 + r_inner_m: 0.0190 + r_outer_m: 0.0210 + structural: false + notes: "Semiconducting screen with the XLPE properties ([IEC60287-2-1] Table 1, note a)" + source: "Representative" + - name: xlpe_insulation layer_type: cylindrical_offset material: xlpe_qiao2025 @@ -57,6 +69,17 @@ layers: field_threshold_kV_mm: 5.0 source: "Representative; electrical [IEC60287]/[Mazzanti2007] Table I" + - name: insulation_screen + layer_type: cylindrical_offset + material: xlpe_qiao2025 + n_cores: 3 + r_offset_m: 0.060 + r_inner_m: 0.0420 + r_outer_m: 0.0430 + structural: false + notes: "Semiconducting screen with the XLPE properties ([IEC60287-2-1] Table 1, note a)" + source: "Representative" + - name: lead_core_sheath layer_type: cylindrical_offset material: lead_sheath diff --git a/src/cablexsec/cables/iea_task49_66kv.yaml b/src/cablexsec/cables/iea_task49_66kv.yaml index e3e9581..74989e8 100644 --- a/src/cablexsec/cables/iea_task49_66kv.yaml +++ b/src/cablexsec/cables/iea_task49_66kv.yaml @@ -90,6 +90,7 @@ layers: r_inner_m: 0.0 r_outer_m: 0.014161046158239446 # exactly 630 mm2 in the aligned equivalent conductor_area_mm2: 630.0 # [Janocha2024] Section 2.1; [IEATask49] Table 13 + d_conductor_m: 0.02990 # [Janocha2024] Table 1 (Conductor 29.90 mm): IEC 60287 d_c construction: aligned_solid_equivalent notes: >- Stranded copper of 29.90 mm envelope (Table 1, Fig. 4a); wire count and diff --git a/src/cablexsec/cables/iea_task49_66kv_300.yaml b/src/cablexsec/cables/iea_task49_66kv_300.yaml index 22eb111..6e88fd0 100644 --- a/src/cablexsec/cables/iea_task49_66kv_300.yaml +++ b/src/cablexsec/cables/iea_task49_66kv_300.yaml @@ -69,6 +69,7 @@ layers: r_inner_m: 0.0 r_outer_m: 0.009772050238058398 # exactly 300 mm2 in the aligned equivalent conductor_area_mm2: 300.0 # [IEATask49] Table 13, 300 mm2 row + d_conductor_m: 0.02063 # envelope with the 630 mm2 fill ratio (header): IEC 60287 d_c construction: aligned_solid_equivalent notes: >- Stranded copper of 29.90 mm envelope (Table 1, Fig. 4a); wire count and diff --git a/src/cablexsec/cables/poradowski2025_220kv.yaml b/src/cablexsec/cables/poradowski2025_220kv.yaml new file mode 100644 index 0000000..5a37fa3 --- /dev/null +++ b/src/cablexsec/cables/poradowski2025_220kv.yaml @@ -0,0 +1,225 @@ +--- +# Poradowski & Anders (2025) 220 kV export cable — PUBLIC. +# +# Geometry and thermal resistivities are from Poradowski & Anders, Ocean +# Engineering 328 (2025) 121027, Table 1 and its footnotes (the source cites +# CIGRE TB 880 for the construction; nothing here is taken from TB 880). +# Public data only: this is the section-0.9-safe export demonstration cable. +# It is modelled as a single-core-equivalent concentric stack, as in the +# source's axisymmetric thermal model; radii are cumulative outer radii from +# the published nominal diameters. Every layer of Table 1 is present with its +# published thermal resistivity: the semiconducting conductor and insulation +# screens (2.5 K m/W), the swelling tape (12), the assembly (5.5, footnote b) +# and the polymeric tapes (6.0), and the air layers of 6.0 K m/W that the +# source puts below and above the corrugated sheath, modelled as a ring of +# 111.95/113.95 mm (footnote d). +# +# Values flagged "representative" are NOT in Poradowski Table 1 (armour lay +# angles; corrugation stiffness factor; armour material; the elastic +# properties of the screens, tapes, fillers and air layers, materials block). +# They are typical values used only for the mechanical demonstration and are +# clearly marked. +cable: + name: "Poradowski & Anders (2025) 220 kV export cable" + description: "220 kV three-core export cable as a single-core-equivalent stack (Poradowski & Anders 2025, Table 1)" + manufacturer: "Public (Poradowski & Anders 2025)" + source_document: "Poradowski & Anders, Ocean Engineering 328 (2025) 121027, Table 1" + voltage_kV: 220 + design_life_years: 25 + +environment: + ambient_C: 15.0 # [Poradowski2025] Table 1 NOTE 1 (buried 15 degC) + T4_external_Km_W: 0.3211 # [Poradowski2025] Table 1 NOTE 1 (external/soil) + frequency_Hz: 50.0 + source: "[Poradowski2025] Table 1 NOTE 1 (directly buried reference case)" + +materials: + semicon_poradowski2025: + description: Semiconducting tape of the conductor and insulation screens + polymer: true + E_Pa: {value: 150.0e6, source: "representative: as xlpe_qiao2025 at 20 degC"} + nu: {value: 0.45, source: "representative: as xlpe_qiao2025"} + rho_kg_m3: {value: 920.0, source: "representative: as xlpe_qiao2025"} + alpha_T_K: {value: 1.0e-4, source: "representative: as xlpe_qiao2025"} + rho_cp_J_m3K: {value: 2.4e6, source: "representative: as xlpe_qiao2025"} + lambda_W_mK: {value: 0.4, source: "[Poradowski2025] Table 1, Nos. 2 and 4: 2.5 K m/W"} + swelling_tape_poradowski2025: + description: Swelling tape of the water barrier + E_Pa: {value: 3.0e9, source: "representative: as polyester_tape"} + nu: {value: 0.38, source: "representative: as polyester_tape"} + rho_kg_m3: {value: 1380.0, source: "representative: as polyester_tape"} + alpha_T_K: {value: 7.0e-5, source: "representative: as polyester_tape"} + rho_cp_J_m3K: {value: 1.7e6, source: "representative: as polyester_tape"} + lambda_W_mK: {value: 0.08333333333333333, source: "[Poradowski2025] Table 1, No. 5: 12 K m/W"} + sheath_air_poradowski2025: + description: Air below and above the corrugated sheath (source's thermal model) + E_Pa: {value: 1.0e5, source: "representative: an air layer carries no load; small modulus"} + nu: {value: 0.0, source: "representative"} + rho_kg_m3: {value: 1.2, source: "representative: air"} + alpha_T_K: {value: 0.0, source: "representative"} + rho_cp_J_m3K: {value: 1.2e3, source: "representative: air"} + lambda_W_mK: {value: 0.16666666666666666, source: "[Poradowski2025] Table 1, footnote d: 6.0 K m/W"} + filler_poradowski2025: + description: Semiconducting polymeric fillers with voids (assembly) + polymer: true + E_Pa: {value: 1.5e9, source: "representative: as pp_filler"} + nu: {value: 0.40, source: "representative: as pp_filler"} + rho_kg_m3: {value: 905.0, source: "representative: as pp_filler"} + alpha_T_K: {value: 1.5e-4, source: "representative: as pp_filler"} + rho_cp_J_m3K: {value: 1.8e6, source: "representative: as pp_filler"} + lambda_W_mK: {value: 0.18181818181818182, source: "[Poradowski2025] Table 1, No. 8 and footnote b: 5.5 K m/W for the assembly"} + polymeric_tape_poradowski2025: + description: Polymeric tapes of the outer armour bedding + E_Pa: {value: 3.0e9, source: "representative: as polyester_tape"} + nu: {value: 0.38, source: "representative: as polyester_tape"} + rho_kg_m3: {value: 1380.0, source: "representative: as polyester_tape"} + alpha_T_K: {value: 7.0e-5, source: "representative: as polyester_tape"} + rho_cp_J_m3K: {value: 1.7e6, source: "representative: as polyester_tape"} + lambda_W_mK: {value: 0.16666666666666666, source: "[Poradowski2025] Table 1, No. 11: 6.0 K m/W"} + +layers: + + - name: cu_conductor + layer_type: cylindrical_offset + material: copper_stranded + n_cores: 1 + r_offset_m: 0.0 + r_inner_m: 0.0 + r_outer_m: 0.0210 # dia 42.0 mm [Poradowski2025] Table 1 + conductor_area_mm2: 1200.0 # [Poradowski2025] Table 1 (stranded Cu) + construction: stranded + notes: "Internal lay not tabulated; axial reduction uses actual Cu area, not the envelope. No solid-annulus radial substitution." + source: "[Poradowski2025] Table 1" + + - name: conductor_screen + layer_type: cylindrical_offset + material: semicon_poradowski2025 + n_cores: 1 + r_offset_m: 0.0 + r_inner_m: 0.0210 + r_outer_m: 0.0227 # dia 45.4 mm (1.7 mm) + structural: false + source: "[Poradowski2025] Table 1, No. 2 (semi-conductive tape)" + + - name: xlpe_insulation + layer_type: cylindrical_offset + material: xlpe_qiao2025 + n_cores: 1 + r_offset_m: 0.0 + r_inner_m: 0.0227 # over conductor screen, dia 45.4 mm + r_outer_m: 0.0466 # under insulation screen, dia 93.2 mm + electrical: + permittivity_relative: 2.5 # [IEC60287-1-1] Table 3, XLPE > 30 kV + loss_factor_tan_delta: 0.001 # [IEC60287-1-1] Table 3, XLPE > 30 kV + vec_exponent_n: 15.0 # n0 [Mazzanti2007] Table I (XLPE) + thermal_b_k: 12430 # B [K] [Mazzanti2007] Table I (XLPE) + vec_synergism_b: 4420 # b [Mazzanti2007] Table I (XLPE) + field_threshold_kV_mm: 5.0 # E0 [Mazzanti2007] Table I + mechanical_beta: 100.0 # CableXSec screening extension (NOT Mazzanti) + source: "[Poradowski2025] Table 1 (XLPE 23.9 mm); electrical [IEC60287]/[Mazzanti2007] Table I" + + - name: insulation_screen + layer_type: cylindrical_offset + material: semicon_poradowski2025 + n_cores: 1 + r_offset_m: 0.0 + r_inner_m: 0.0466 + r_outer_m: 0.0481 # dia 96.2 mm (1.5 mm) + structural: false + source: "[Poradowski2025] Table 1, No. 4 (semi-conductive tape)" + + - name: water_barrier + layer_type: cylindrical + material: swelling_tape_poradowski2025 + r_inner_m: 0.0481 # over insulation screen, dia 96.2 mm + r_outer_m: 0.0517 # dia 103.4 mm (swelling tape) + structural: false + source: "[Poradowski2025] Table 1, No. 5" + + - name: sheath_air_inner + layer_type: cylindrical + material: sheath_air_poradowski2025 + r_inner_m: 0.0517 + r_outer_m: 0.055975 # inside of the modelled ring, dia 111.95 mm + structural: false + source: "[Poradowski2025] Table 1, footnote d (air layer below the sheath)" + + - name: cu_metallic_sheath + layer_type: cylindrical_shell + material: copper_tape_screen + r_mid_m: 0.056475 # corrugated Cu ring, modelled 111.95/113.95 mm + t_m: 0.001 # 1.0 mm [Poradowski2025] Table 1 footnote d + f_corrugation: 0.5 # representative corrugation stiffness factor (NOT TB 880) + scf: 2.0 # representative corrugation-root SCF (NOT TB 880) + source: "[Poradowski2025] Table 1 footnote d (dims); f_corr/SCF representative" + + - name: sheath_air_outer + layer_type: cylindrical + material: sheath_air_poradowski2025 + r_inner_m: 0.056975 # outside of the modelled ring, dia 113.95 mm + r_outer_m: 0.06125 # dia 122.5 mm + structural: false + source: "[Poradowski2025] Table 1, footnote d (air layer above the sheath)" + + - name: anti_corrosion_sheath + layer_type: cylindrical + material: hdpe + r_inner_m: 0.06125 # dia 122.5 mm + r_outer_m: 0.065875 # dia 131.75 mm (semi-conductive PE) + source: "[Poradowski2025] Table 1" + + - name: assembly_filler + layer_type: cylindrical + material: filler_poradowski2025 + r_inner_m: 0.065875 + r_outer_m: 0.14195 # dia 283.9 mm (assembling / fillers) + structural: false + source: "[Poradowski2025] Table 1" + + - name: inner_armour_bedding + layer_type: cylindrical + material: hdpe + r_inner_m: 0.14195 + r_outer_m: 0.14495 # dia 289.9 mm + structural: false + source: "[Poradowski2025] Table 1" + + - name: inner_armour + layer_type: helical + material: galvanised_steel_armour # representative (Poradowski: stainless, non-magnetic) + n_wires: 128 # [Poradowski2025] Table 1 + d_wire_m: 0.007 # 7.0 mm [Poradowski2025] Table 1 + r_helix_m: 0.14845 # bedding OD + d_wire/2 + lay_angle_deg: 12.0 # representative submarine armour lay angle (NOT TB 880) + lay_direction: right_hand + bulk_sn: saevik_2011_flat_steel + source: "[Poradowski2025] Table 1 (count/dia); lay angle representative; material representative" + + - name: outer_armour_bedding + layer_type: cylindrical + material: polymeric_tape_poradowski2025 + r_inner_m: 0.15195 + r_outer_m: 0.15425 # dia 308.5 mm + structural: false + source: "[Poradowski2025] Table 1" + + - name: outer_armour + layer_type: helical + material: galvanised_steel_armour # representative (Poradowski: stainless, non-magnetic) + n_wires: 135 # [Poradowski2025] Table 1 + d_wire_m: 0.007 # 7.0 mm [Poradowski2025] Table 1 + r_helix_m: 0.15775 # bedding OD + d_wire/2 + lay_angle_deg: 12.0 # representative submarine armour lay angle (NOT TB 880) + lay_direction: left_hand + bulk_sn: saevik_2011_flat_steel + source: "[Poradowski2025] Table 1 (count/dia); lay angle representative; material representative" + + - name: outer_cover + layer_type: cylindrical + material: hdpe + r_inner_m: 0.16125 # dia 322.5 mm + r_outer_m: 0.16755 # dia 335.1 mm + source: "[Poradowski2025] Table 1" + +aggregate_properties: + OD_mm: 335.1 # [Poradowski2025] Table 1 diff --git a/src/cablexsec/cables/schema.py b/src/cablexsec/cables/schema.py index 1442ab9..8054bb6 100644 --- a/src/cablexsec/cables/schema.py +++ b/src/cablexsec/cables/schema.py @@ -55,8 +55,9 @@ import inspect import math import warnings -from collections.abc import Callable, Mapping, Sequence -from contextlib import AbstractContextManager +from collections.abc import Callable, Iterator, Mapping, Sequence +from contextlib import AbstractContextManager, contextmanager +from contextvars import ContextVar from functools import lru_cache from pathlib import Path from typing import Annotated, Any, Literal, ParamSpec, Self, TypeVar @@ -134,6 +135,22 @@ class ElectricalProperties(_Frozen): permittivity_relative: float | None = None loss_factor_tan_delta: float | None = None + # [IEC60287-1-1] 5.2 insulation class for the U0 from which the dielectric + # loss counts; None is unfilled XLPE. + insulation_type: ( + Literal[ + "xlpe", + "xlpe_filled", + "pe", + "epr", + "pvc", + "butyl_rubber", + "paper_solid", + "paper_fluid", + "ppl", + ] + | None + ) = None vec_exponent_n: float | None = None # n0 — VEC at T0 [Mazzanti2007] Table I thermal_b_k: float | None = None # B [K] [Mazzanti2007] Table I vec_synergism_b: float | None = None # b — electrical-thermal synergism @@ -1182,6 +1199,9 @@ class CylindricalOffsetLayer(_LayerBase): r_outer_m: float | None = None # Conductor-specific (concentric-stranded) descriptors. conductor_area_mm2: float | None = None + # External diameter of a stranded conductor over its wires, the d_c of + # IEC 60287 (r_outer_m of an area-equivalent conductor is smaller). + d_conductor_m: float | None = None strand_diameter_mm: float | None = None n_strands: _Count | None = None strand_lay_angle_deg: float | None = None @@ -1214,6 +1234,7 @@ def _offset_physical_values(self) -> CylindricalOffsetLayer: for name in ( "r_outer_m", "conductor_area_mm2", + "d_conductor_m", "strand_diameter_mm", ): value = getattr(self, name) @@ -1227,6 +1248,18 @@ def _offset_physical_values(self) -> CylindricalOffsetLayer: and self.r_outer_m <= self.r_inner_m ): raise ValueError("r_outer_m must be greater than r_inner_m") + if self.d_conductor_m is not None: + if self.r_inner_m is None or self.r_inner_m > 0.0: + raise ValueError( + "d_conductor_m belongs to the conductor (r_inner_m = 0)" + ) + if ( + self.r_outer_m is not None + and self.d_conductor_m < 2.0 * self.r_outer_m * (1.0 - 1e-9) + ): + raise ValueError( + "d_conductor_m is smaller than the conductor (2 r_outer_m)" + ) if self.n_strands is not None and self.n_strands <= 0: raise ValueError("n_strands must be > 0") if ( @@ -1370,6 +1403,7 @@ class CableMaterial(_Frozen): rho_ohm_m: MaterialValue | None = None alpha_R_per_K: MaterialValue | None = None epsilon_r: MaterialValue | None = None + relative_permeability: MaterialValue | None = None @model_validator(mode="before") @classmethod @@ -1874,9 +1908,7 @@ def material_scope(self) -> AbstractContextManager[None]: the library alone answer, also inside the scope of another cable. The scope is local to the current thread (and task). """ - return library.material_scope( - material_overlay(self.materials + self.stiffness_materials) - ) + return _cable_scope(self) def get_material(self, name: str) -> CableMaterial: """Return the cable material ``name`` (or a stiffness-defined stand-in).""" @@ -2240,6 +2272,34 @@ def _cable_argument(args: tuple[Any, ...], kwargs: Mapping[str, Any]) -> Any: return None +#: The cable whose material scope this context entered last, with the overlay +#: it set (``None``: none). A nested entry point that receives the same cable +#: object, while that overlay is still the active one, skips re-entering. +_SCOPE_OWNER: ContextVar[tuple[CableData, library.MaterialOverlay | None] | None] = ( + ContextVar("cablexsec_material_scope_owner", default=None) +) + + +@contextmanager +def _cable_scope(cable: CableData) -> Iterator[None]: + """The library scope of ``cable``'s materials, recording ``cable`` as owner.""" + overlay = material_overlay(cable.materials + cable.stiffness_materials) + token = _SCOPE_OWNER.set((cable, overlay)) + try: + with library.material_scope(overlay): + yield + finally: + _SCOPE_OWNER.reset(token) + + +def _in_scope_of(cable: CableData) -> bool: + """True if ``cable``'s own scope is the active material scope.""" + owner = _SCOPE_OWNER.get() + return ( + owner is not None and owner[0] is cable and library.active_overlay() is owner[1] + ) + + def uses_cable_materials(func: Callable[P, R]) -> Callable[P, R]: """Run ``func`` in the material scope of its first cable argument. @@ -2253,7 +2313,8 @@ def uses_cable_materials(func: Callable[P, R]) -> Callable[P, R]: @functools.wraps(func) def run(*args: P.args, **kwargs: P.kwargs) -> R: cable = _cable_argument(args, kwargs) - if cable is None: + if cable is None or _in_scope_of(cable): + # no cable, or already inside this cable's scope (a nested call) return func(*args, **kwargs) with cable.material_scope(): return func(*args, **kwargs) diff --git a/src/cablexsec/clamping.py b/src/cablexsec/clamping.py index 3a19715..392b525 100644 --- a/src/cablexsec/clamping.py +++ b/src/cablexsec/clamping.py @@ -44,6 +44,7 @@ from dataclasses import dataclass, field from cablexsec.cables.schema import CableData, CylindricalLayer, HelicalLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.provenance import ( ClampingCalibrationWarning, @@ -340,3 +341,7 @@ def warn_if_unclamped(cable: CableData, *, stacklevel: int = 2) -> ClampingState if message is not None: warnings.warn(message, MissingClampingStateWarning, stacklevel=stacklevel + 1) return state + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/coupling.py b/src/cablexsec/coupling.py index e02d44b..ff840b5 100644 --- a/src/cablexsec/coupling.py +++ b/src/cablexsec/coupling.py @@ -2,8 +2,8 @@ # Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University r"""CableDyn coupling surface: the cross-section tangent stiffness. -The interface a **global Cosserat-rod / dynamic solver** (CableDyn, RIFLEX, -…) calls to get the cross-section's *curvature-dependent* tangent +The interface a **global Cosserat-rod / dynamic solver** (CableDyn or +another) calls to get the cross-section's *curvature-dependent* tangent bending stiffness at an operating point. This is the surface that makes CableXSec infrastructure other solvers build on, so it is **versioned** (:data:`COUPLING_API_VERSION`) and **contract-tested** — a downstream solver can diff --git a/src/cablexsec/io/__init__.py b/src/cablexsec/io/__init__.py index 82e3f4a..dd6bc22 100644 --- a/src/cablexsec/io/__init__.py +++ b/src/cablexsec/io/__init__.py @@ -12,7 +12,8 @@ generator so the demos/tests need no proprietary files. - :func:`~cablexsec.io.time_history_csv.read_time_history_csv` — time-history CSV export of a global analysis, columns selected by header. -- :func:`~cablexsec.io.riflex_reader.read_riflex_ascii` — RIFLEX ASCII results. +- :func:`~cablexsec.io.ascii_columns_reader.read_ascii_columns` — whitespace-column + ASCII time histories, columns selected by position. - :func:`~cablexsec.io.cabledyn.read_cabledyn_sections` — CableDyn driver and OpenFAST module outputs: section histories with reconstructed signed curvature components (doc/global_local_guide.md). @@ -28,6 +29,7 @@ from __future__ import annotations +from cablexsec.io.ascii_columns_reader import read_ascii_columns from cablexsec.io.cabledyn import ( CableDynLift, CableDynRangeGraph, @@ -42,7 +44,6 @@ read_cabledyn_station_table, series_from_curvature_components, ) -from cablexsec.io.riflex_reader import read_riflex_ascii from cablexsec.io.series import ( LoadCaseSeries, fatigue_from_series, @@ -64,7 +65,7 @@ "read_cabledyn_range_graph", "read_cabledyn_sections", "read_cabledyn_station_table", - "read_riflex_ascii", + "read_ascii_columns", "read_series_csv", "read_time_history_csv", "section_channels", diff --git a/src/cablexsec/io/riflex_reader.py b/src/cablexsec/io/ascii_columns_reader.py similarity index 85% rename from src/cablexsec/io/riflex_reader.py rename to src/cablexsec/io/ascii_columns_reader.py index 27aa548..970c5bb 100644 --- a/src/cablexsec/io/riflex_reader.py +++ b/src/cablexsec/io/ascii_columns_reader.py @@ -1,13 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University -r"""RIFLEX ASCII results reader. +r"""Whitespace-column ASCII time-history reader. -Reads a **RIFLEX whitespace-delimited ASCII time-history** (the column dump from -a RIFLEX dynamic run: optional ``#``/``%`` comment lines, then one whitespace- -separated row per time sample) into a +Reads a **whitespace-delimited ASCII time history** (optional ``#``, ``%`` or +``!`` comment lines, then one whitespace-separated row per time sample) into a :class:`~cablexsec.io.series.LoadCaseSeries`. Columns are selected by -**1-based index** (RIFLEX ASCII dumps are positional and rarely carry a usable -header), with unit scales to convert to ``1/m`` and ``N``. +**1-based index** (column dumps are positional and rarely carry a usable +header), with unit scales to convert to ``1/m`` and ``N``. The reader assumes +no particular program's layout: the caller declares the columns, units, +tension kind and curvature convention. Like the time-history CSV reader this is gated by the L6 known-answer test against a synthetic fixture; it carries its data-origin and unit caveats in provenance. @@ -28,10 +29,10 @@ FloatArray = NDArray[np.float64] -__all__ = ["read_riflex_ascii"] +__all__ = ["read_ascii_columns"] -def read_riflex_ascii( +def read_ascii_columns( path: str | Path, *, time_col: int = 1, @@ -45,12 +46,12 @@ def read_riflex_ascii( tension_kind: Literal["true", "effective", "unspecified"] = "unspecified", curvature_convention: Literal["strain_gradient", "rotation"] = "strain_gradient", ) -> LoadCaseSeries: - r"""Read a RIFLEX ASCII time-history into a :class:`LoadCaseSeries`. + r"""Read a whitespace-column ASCII time history into a :class:`LoadCaseSeries`. Parameters ---------- path : str or pathlib.Path - RIFLEX ASCII results file. + Whitespace-column ASCII file. time_col, curvature_x_col, tension_col : int **1-based** column indices of the required quantities. curvature_y_col, temperature_col : int or None, optional @@ -75,7 +76,7 @@ def read_riflex_ascii( """ p = Path(path) if not p.is_file(): - raise FileNotFoundError(f"RIFLEX ASCII not found: {p}") + raise FileNotFoundError(f"ASCII column file not found: {p}") if curvature_convention not in ("strain_gradient", "rotation"): raise CableSchemaError("declare rotation or strain_gradient curvature") @@ -140,7 +141,7 @@ def read_riflex_ascii( tension_kind=tension_kind, source=p.name, provenance=Provenance( - method="RIFLEX ASCII time-history reader (positional columns)", + method="whitespace-column ASCII time-history reader (positional columns)", citations=(), gates=( "known-answer rainflow gate vs a synthetic fixture (L6.1)", @@ -148,9 +149,9 @@ def read_riflex_ascii( ), limitations=( "positional 1-based columns — verify the *_col indices match the " - "RIFLEX dump layout", + "file layout", "column units are taken from the scale arguments (->1/m, ->N)", - "data origin is the upstream RIFLEX model", + "data origin is the upstream global model", ), ), ) diff --git a/src/cablexsec/io/synthetic.py b/src/cablexsec/io/synthetic.py index 99f4cdd..92958a5 100644 --- a/src/cablexsec/io/synthetic.py +++ b/src/cablexsec/io/synthetic.py @@ -190,7 +190,7 @@ def jonswap_series( ----- Screening generator: a representative curvature spectrum from a sea state, **not** a calibrated vessel/cable hydrodynamic response. Use a real global - analysis (time-history CSV, RIFLEX or CableDyn reader) for design fatigue. + analysis (time-history CSV, ASCII-column or CableDyn reader) for design fatigue. Dynamic tension. Every wave component that bends the cable also changes its tension (vessel heave and surge at a hang-off), with one transfer diff --git a/src/cablexsec/materials/library.py b/src/cablexsec/materials/library.py index dec02da..cba5fa2 100644 --- a/src/cablexsec/materials/library.py +++ b/src/cablexsec/materials/library.py @@ -251,12 +251,16 @@ def active_overlay() -> MaterialOverlay | None: "stress) of the ETP copper conductor, 120 MPa, after Robinson; a " "published value for ETP copper", ), - "sigma_UTS_Pa": (220.0e6, "[IEC60228] annealed Cu"), + "sigma_UTS_Pa": ( + 220.0e6, + "Standard annealed Cu (IEC 60228 sets no tensile limit for copper; " + "its Tables 1-2 cover aluminium only)", + ), "alpha_T_K": (17.0e-6, "Standard Cu"), "lambda_W_mK": (400.0, "Standard Cu"), "rho_cp_J_m3K": (3.45e6, "Standard Cu"), - "rho_ohm_m": (1.724e-8, "[IEC60228] at 20 degC"), - "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Cu resistivity temp. coeff."), + "rho_ohm_m": (1.7241e-8, "[IEC60287-1-1] Table 1, copper at 20 degC"), + "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Table 1, copper"), # F6 citation fix (18 Oct 2026): [Poon2022] contains no 0.25 (it uses # 0.8, range 0.08-1.4). No library source gives 0.25 for Cu-Cu # stranded wire, so the value is kept (results unchanged) as an @@ -277,7 +281,8 @@ def active_overlay() -> MaterialOverlay | None: "alpha_T_K": (17.0e-6, "Standard Cu"), "lambda_W_mK": (400.0, "Standard Cu"), "rho_cp_J_m3K": (3.45e6, "Standard Cu"), - "rho_ohm_m": (1.724e-8, "[IEC60228] at 20 degC"), + "rho_ohm_m": (1.7241e-8, "[IEC60287-1-1] Table 1, copper at 20 degC"), + "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Table 1, copper"), # Gap P1/P4. Cold-drawn and annealed ETP Cu wire, lowest strain rate # (1e-4 1/s) of [Wan2022] Table 2 (range 145-155 / 235-262 MPa). "sigma_y_Pa": (145.0e6, "[Wan2022] Table 2, annealed ETP Cu wire, 1e-4 1/s"), @@ -301,7 +306,8 @@ def active_overlay() -> MaterialOverlay | None: "alpha_T_K": (17.0e-6, "Standard Cu"), "lambda_W_mK": (400.0, "Standard Cu"), "rho_cp_J_m3K": (3.45e6, "Standard Cu"), - "rho_ohm_m": (1.724e-8, "[IEC60228] at 20 degC"), + "rho_ohm_m": (1.7241e-8, "[IEC60287-1-1] Table 1, copper at 20 degC"), + "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Table 1, copper"), }, "xlpe_qiao2025": { "E_Pa": (150.0e6, "[Qiao2025] Eq. 9 evaluated at 20 degC"), @@ -310,14 +316,18 @@ def active_overlay() -> MaterialOverlay | None: "alpha_T_K": (100.0e-6, "[Qiao2025] Table 2"), "lambda_W_mK": (0.286, "[IEC60287]"), "rho_cp_J_m3K": (2.4e6, "Standard XLPE"), - "epsilon_r": (2.3, "[IEC60287-1-1] Table 3"), + "epsilon_r": (2.5, "[IEC60287-1-1] Table 3, XLPE (2.3 is the PE row)"), }, "hdpe": { "E_Pa": (885.6e6, "[Qiao2025] Eq. 9 evaluated at 20 degC"), "nu": (0.48, "[Qiao2025] Table 2"), "rho_kg_m3": (955.0, "Standard HDPE"), "alpha_T_K": (100.0e-6, "[Qiao2025] Table 2"), - "lambda_W_mK": (0.4, "[Qiao2025] Table 2"), + "lambda_W_mK": ( + 1.0 / 3.5, + "[IEC60287-2-1] Table 1: polyethylene 3.5 K m/W (insulation, " + "protective covering)", + ), "rho_cp_J_m3K": (1.9e6, "Standard HDPE"), "epsilon_allow": ( 0.077, @@ -332,7 +342,12 @@ def active_overlay() -> MaterialOverlay | None: "nu": (0.40, "Standard PP"), "rho_kg_m3": (905.0, "Standard PP"), "alpha_T_K": (1.5e-4, "Standard PP"), - "lambda_W_mK": (0.22, "[IEC60287]"), + "lambda_W_mK": ( + 1.0 / 6.0, + "[IEC60287-2-1] 4.1.2.2.4: fillers of extruded-insulation cables " + "6 to 13 K m/W, the lower value; 6.0 for polypropylene yarn in " + "CIGRE TB 880 (2022) Table 2-3", + ), "rho_cp_J_m3K": (1.8e6, "Standard PP"), }, "polyester_tape": { @@ -407,12 +422,12 @@ def active_overlay() -> MaterialOverlay | None: "[Janocha2024] Sec. 2.1, p. 5: 0.2 % plastic-strain limit (proof " "stress) of the ETP copper conductor, 120 MPa, after Robinson", ), - "sigma_UTS_Pa": (220.0e6, "[IEC60228] annealed Cu, as copper_stranded"), + "sigma_UTS_Pa": (220.0e6, "Standard annealed Cu, as copper_stranded"), "alpha_T_K": (17.0e-6, "Standard Cu, as copper_stranded"), "lambda_W_mK": (400.0, "Standard Cu, as copper_stranded"), "rho_cp_J_m3K": (3.45e6, "Standard Cu, as copper_stranded"), - "rho_ohm_m": (1.724e-8, "[IEC60228] at 20 degC"), - "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Cu resistivity temp. coeff."), + "rho_ohm_m": (1.7241e-8, "[IEC60287-1-1] Table 1, copper at 20 degC"), + "alpha_R_per_K": (3.93e-3, "[IEC60287-1-1] Table 1, copper"), "mu_on_cu": (0.30, "[Janocha2024] Table 2 friction coefficient (copper)"), }, "steel_janocha2024": { @@ -446,7 +461,11 @@ def active_overlay() -> MaterialOverlay | None: "nu": (0.40, "[Janocha2024] Table 2 (MDPE)"), "rho_kg_m3": (956.0, "[Janocha2024] Table 2 (MDPE)"), "alpha_T_K": (100.0e-6, "[Qiao2025] Table 2 (HDPE), as hdpe"), - "lambda_W_mK": (0.4, "[Qiao2025] Table 2 (HDPE), as hdpe"), + "lambda_W_mK": ( + 1.0 / 3.5, + "[IEC60287-2-1] Table 1: polyethylene 3.5 K m/W (insulation, " + "protective covering), as hdpe", + ), "rho_cp_J_m3K": (1.9e6, "Standard HDPE, as hdpe"), "epsilon_allow": ( 0.077, @@ -461,7 +480,11 @@ def active_overlay() -> MaterialOverlay | None: "nu": (0.40, "[Janocha2024] Table 2 (HDPE)"), "rho_kg_m3": (980.0, "[Janocha2024] Table 2 (HDPE)"), "alpha_T_K": (100.0e-6, "[Qiao2025] Table 2, as hdpe"), - "lambda_W_mK": (0.4, "[Qiao2025] Table 2, as hdpe"), + "lambda_W_mK": ( + 1.0 / 3.5, + "[IEC60287-2-1] Table 1: polyethylene 3.5 K m/W (insulation, " + "protective covering), as hdpe", + ), "rho_cp_J_m3K": (1.9e6, "Standard HDPE, as hdpe"), "epsilon_allow": ( 0.077, @@ -478,7 +501,11 @@ def active_overlay() -> MaterialOverlay | None: "nu": (0.40, "[Janocha2024] Table 2 (PPY)"), "rho_kg_m3": (895.0, "[Janocha2024] Table 2 (PPY)"), "alpha_T_K": (1.5e-4, "Standard PP, as pp_filler"), - "lambda_W_mK": (0.22, "[IEC60287], as pp_filler"), + "lambda_W_mK": ( + 1.0 / 6.0, + "CIGRE TB 880 (2022) Table 2-3: polypropylene yarn 6.0 K m/W, the " + "fibrous materials of [IEC60287-2-1] Table 1", + ), "rho_cp_J_m3K": (1.8e6, "Standard PP, as pp_filler"), }, # ----- Public flexible-pipe benchmark: Witz (1996) ISSC 2.5-inch pipe ----- @@ -606,8 +633,10 @@ def active_overlay() -> MaterialOverlay | None: "rho_kg_m3": (11340.0, "Standard Pb"), "sigma_y_Pa": (12.0e6, "Standard Pb, very low yield"), "alpha_T_K": (29.0e-6, "Standard Pb, high expansion"), - "lambda_W_mK": (35.0, "[IEC60287]"), + "lambda_W_mK": (35.0, "Standard Pb (IEC 60287-2-1 lists no metal resistivity)"), "rho_cp_J_m3K": (1.47e6, "Standard Pb"), + "rho_ohm_m": (21.4e-8, "[IEC60287-1-1] Table 1, lead or lead alloy"), + "alpha_R_per_K": (4.0e-3, "[IEC60287-1-1] Table 1, lead or lead alloy"), "creep_exponent": (4.5, "[CIGRE TB 623] Norton creep"), "creep_coeff": (1.2e-14, "[CIGRE TB 623] at 50 degC"), }, @@ -631,8 +660,13 @@ def active_overlay() -> MaterialOverlay | None: "in the reference library", ), "alpha_T_K": (23.0e-6, "Standard Al"), - "lambda_W_mK": (230.0, "[IEC60287]"), + "lambda_W_mK": ( + 230.0, + "Standard Al (IEC 60287-2-1 lists no metal resistivity)", + ), "rho_cp_J_m3K": (2.43e6, "Standard Al"), + "rho_ohm_m": (2.84e-8, "[IEC60287-1-1] Table 1, aluminium sheath"), + "alpha_R_per_K": (4.03e-3, "[IEC60287-1-1] Table 1, aluminium sheath"), }, "aluminium_corrugated": { "E_Pa": (70.0e9, "Standard Al 1050"), @@ -644,8 +678,13 @@ def active_overlay() -> MaterialOverlay | None: "rho_kg_m3": (2700.0, "Standard Al"), "sigma_y_Pa": (95.0e6, "1050-H14 temper"), "alpha_T_K": (23.0e-6, "Standard Al"), - "lambda_W_mK": (230.0, "[IEC60287]"), + "lambda_W_mK": ( + 230.0, + "Standard Al (IEC 60287-2-1 lists no metal resistivity)", + ), "rho_cp_J_m3K": (2.43e6, "Standard Al"), + "rho_ohm_m": (2.84e-8, "[IEC60287-1-1] Table 1, aluminium sheath"), + "alpha_R_per_K": (4.03e-3, "[IEC60287-1-1] Table 1, aluminium sheath"), }, } diff --git a/src/cablexsec/materials/properties.py b/src/cablexsec/materials/properties.py index 855f6ee..2a0108d 100644 --- a/src/cablexsec/materials/properties.py +++ b/src/cablexsec/materials/properties.py @@ -242,6 +242,18 @@ def _p( (1.0, 100.0), open_="none", ), + _p( + "relative_permeability", + "Relative magnetic permeability", + ELECTRICAL, + "", + (1.0, 1.0e5), + open_="none", + help="Longitudinal relative permeability of an armour material (1 for " + "stainless steel, copper or aluminium). An armour material without it " + "counts as magnetic steel in the sheath-loss factor of an SL-type " + "cable (IEC 60287-1-1 5.3.11).", + ), ) MATERIAL_PROPERTIES: Mapping[str, PropertyDefinition] = MappingProxyType( diff --git a/src/cablexsec/mechanics/axisymmetric.py b/src/cablexsec/mechanics/axisymmetric.py index 5d5fcaa..7d02df7 100644 --- a/src/cablexsec/mechanics/axisymmetric.py +++ b/src/cablexsec/mechanics/axisymmetric.py @@ -44,6 +44,7 @@ from numpy.typing import NDArray from cablexsec.cables.schema import CableData, CylindricalLayer, HelicalLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.materials import library from cablexsec.mechanics.stiffness import load_sharing @@ -407,3 +408,7 @@ def compute_winding_contact_pressure( p_above = float(p_iface[k + 1]) if k + 1 < n else p_ext_Pa out[lyr.name] = p_below + p_above # P1 + P2 (both clamping faces) return out + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/contact_qp.py b/src/cablexsec/mechanics/contact_qp.py index 400cc7e..4dd4a8d 100644 --- a/src/cablexsec/mechanics/contact_qp.py +++ b/src/cablexsec/mechanics/contact_qp.py @@ -33,6 +33,7 @@ is_serving, layer_stiffness, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.axisymmetric import lame_thick_wall @@ -336,3 +337,7 @@ def solve_contact_qp( int(np.count_nonzero(reactions > 0)), section, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/core_friction.py b/src/cablexsec/mechanics/core_friction.py index f506a49..4245cf8 100644 --- a/src/cablexsec/mechanics/core_friction.py +++ b/src/cablexsec/mechanics/core_friction.py @@ -154,7 +154,10 @@ field, like a helix on a fixed cylinder, with the load-weighted coefficient ``mu_eff``. Under planar bending full slip comes at ``pi / 2`` times the onset curvature. -* ``"relative"``: a coupled intralayer slip model of laid cores. The +* ``"relative"``: a coupled intralayer slip model of laid cores, after + Skeie, Sødahl, Pettersen and Verde (2023, OMAE2023-104817, + doi:10.1115/OMAE2023-104817), who formulated the relative slip of three + cores, its onset and the coalescence of the slip zones. The neighbouring cores of the layer touch at the same axial position, and the friction between two of them resists their relative slip ``u_i - u_j``; the filler and ring contacts (interlayer) keep the absolute slip. The stations @@ -170,7 +173,10 @@ stress at full slip is ``2/3`` of the absolute value (the stress plateaus beyond ``pi / 3`` from the neutral axis), the full-slip moment is ``sqrt(3)/2`` of the absolute one and full slip comes at - ``2 pi / (3 sqrt 3) = 1.209`` times the onset curvature. These match an + ``2 pi / (3 sqrt 3) = 1.209`` times the onset curvature. The largest + friction stress saturates earlier, at ``pi / 3 = 1.047`` times the onset + (the slip front at ``pi / 3``): the "full slip" curvature of Skeie et al.'s + Table 1 (validation row SK23-T1). These match an independent field solver of the coupled axial equilibrium of the cores (``validation/scripts/coupled_core_slip_reference.py``) on monotonic and reversed planar paths, with and without interlayer friction. Two cores @@ -248,6 +254,7 @@ CylindricalLayer, CylindricalOffsetLayer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.axisymmetric import AxisymmetricResult, compute_contact_forces @@ -1622,3 +1629,7 @@ def core_friction_history( friction_model=resolved, loads=loads, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/core_kinematics.py b/src/cablexsec/mechanics/core_kinematics.py index 2b56eb7..f00ddda 100644 --- a/src/cablexsec/mechanics/core_kinematics.py +++ b/src/cablexsec/mechanics/core_kinematics.py @@ -76,6 +76,7 @@ from numpy.typing import ArrayLike, NDArray from cablexsec.cables.schema import CableData, CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.mechanics.core_friction import ( CoreFrictionModel, @@ -333,3 +334,7 @@ def core_kinematics( slipping=slipping, model=model, ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/radial_cable.py b/src/cablexsec/mechanics/radial_cable.py index 3badc4c..e47ab55 100644 --- a/src/cablexsec/mechanics/radial_cable.py +++ b/src/cablexsec/mechanics/radial_cable.py @@ -62,6 +62,7 @@ is_serving, layer_stiffness, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableSchemaError from cablexsec.materials import library from cablexsec.mechanics.concentric_section import ElasticAnnulus, ElasticHelicalRing @@ -819,3 +820,7 @@ def solve_cable_radial_states( ) ) return states + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/section_conventions.py b/src/cablexsec/mechanics/section_conventions.py index 86d4e7d..4293c90 100644 --- a/src/cablexsec/mechanics/section_conventions.py +++ b/src/cablexsec/mechanics/section_conventions.py @@ -5,7 +5,7 @@ Convention (right-handed; checked against a global line model, 17 October 2026). The material frame (x, y, s) is right-handed, with s along the tangent t from End A to End B. Global codes (``x/y curvature`` and ``x/y bend -moment`` exports, CableDyn, a RIFLEX rotation export) report the +moment`` exports, CableDyn, a rotation column export) report the rotation-curvature vector ``kappa = t x dt/ds`` on (x, y). A fibre at (x, y) = r (cos phi, sin phi) then has axial strain:: diff --git a/src/cablexsec/mechanics/station_coupling.py b/src/cablexsec/mechanics/station_coupling.py index 3248a15..aadaba4 100644 --- a/src/cablexsec/mechanics/station_coupling.py +++ b/src/cablexsec/mechanics/station_coupling.py @@ -2,6 +2,12 @@ # Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University r"""Coupled spring--slider stations of laid cores (relative intralayer slip). +The relative slip of neighbouring cores, its onset and the coalescence of the +slip zones at ``pi / 3`` follow Skeie, Sødahl, Pettersen and Verde (2023, +OMAE2023-104817, doi:10.1115/OMAE2023-104817); the interlayer share, the +direction-tied cap and the closest-point return map of a group are this +module's. + Used by :func:`cablexsec.mechanics.papailiou.wire_slip_history` when the laid-core law takes ``CoreFrictionSpec(core_core_coupling="relative")`` (:mod:`cablexsec.mechanics.core_friction`). Neighbouring cores of one layer diff --git a/src/cablexsec/mechanics/stiffness.py b/src/cablexsec/mechanics/stiffness.py index 99c80d7..9c51498 100644 --- a/src/cablexsec/mechanics/stiffness.py +++ b/src/cablexsec/mechanics/stiffness.py @@ -57,6 +57,7 @@ layer_stiffness, uses_cable_materials, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError from cablexsec.materials import library from cablexsec.mechanics.core_lay import bending_factor, core_angle @@ -982,3 +983,7 @@ def load_sharing(cable: CableData, T_N: float) -> dict[str, float]: return dict.fromkeys(ea, 0.0) eps = T_N / total return {name: eps * v for name, v in ea.items()} + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/thermal.py b/src/cablexsec/mechanics/thermal.py index 011afa5..83acba6 100644 --- a/src/cablexsec/mechanics/thermal.py +++ b/src/cablexsec/mechanics/thermal.py @@ -5,7 +5,8 @@ The cable temperature field sets the thermal stress ``sigma_T`` and the temperature-dependent polymer modulus. This module computes the steady-state and transient radial temperature profile of a concentric layer stack from the -conductor Joule loss (and, above 100 kV, the dielectric loss). +conductor Joule loss, the dielectric loss and the sheath loss, following IEC +60287-1-1:2023 and IEC 60287-2-1:2023. Two routines, disciplined in the A11/A12/A13 order — the analytical invariant first, the numerical solver gated against it: @@ -14,7 +15,7 @@ steady state. With the loss ``W_c`` generated at the conductor, the radial heat flux through every outer annulus equals ``W_c``, so the temperature rise across annulus *i* is ``W_c R_i`` with the IEC conduction - thermal resistance ([IEC60287-2-1] Eq. for ``T1``) + thermal resistance of a concentric layer ([IEC60287-2-1] 4.1.3) .. math:: R_i = \frac{1}{2\pi\lambda_i}\ln\frac{r_{o,i}}{r_{i,i}}, @@ -28,35 +29,49 @@ For current-rating problems where the surroundings are represented by a lumped external resistance rather than a fixed surface temperature, :func:`iec_conductor_temperature` evaluates the IEC ladder -([IEC60287-1-1] Eq. 1; [Poradowski2025] Eq. 2) with ``T4`` as an external +([IEC60287-1-1] 4.2.1, Formula (1); [Poradowski2025] Eq. 2) with ``T4`` as an external **Robin-type series resistance** (soil for a buried cable; bend-stiffener + water gap for a dynamic cable section). It reduces to the pure conduction ladder above when ``W_d = λ1 = 0`` and ``n = 1`` (used as the three-core reduction gate). :func:`compute_thermal` builds that ladder from a cable definition and returns a radial profile in which the heat flow through each annulus carries the -losses generated inside it ([IEC60287-1-1] 1.4.1.1 Eq. 1; [NeherMcGrath1957] -Eqs. 1-2), so the profile ends equal ``θ_c`` and ``θ_a + W_tot T4``. - -Heat sources ([IEC60287-1-1]): - -* Conductor Joule ``W_c = I^2 R_ac`` per conductor with - ``R_ac = R_dc(T)(1 + y_s + y_p)``, - ``R_dc(T) = R_dc,20 (1 + α_20 (T - 20))`` (:func:`ac_resistance`, - :func:`skin_effect_factor`, :func:`proximity_effect_factor`). -* Dielectric ``W_d = U_0^2 ω C tanδ`` — active only above 100 kV - (:func:`dielectric_loss`). -* Sheath ``λ1`` circulating-current loss for bonded metallic sheaths - (:func:`sheath_circulating_loss_factor`). -* Armour ``λ2`` ([IEC60287-1-1] 2.4): supplied by the caller, not computed - (the full standard is not held; finite element values for three-core - armoured cables lie well below the IEC estimate, e.g. Goddard et al. 2015, - Table V), released at the armour radii in equal shares. -* **Not implemented:** the sheath eddy-current loss ``λ1''``. +losses generated inside it ([IEC60287-1-1] 4.2.1, Formula (1); +[NeherMcGrath1957] Eqs. 1-2), so the profile ends equal ``θ_c`` and +``θ_a + W_tot T4``. + +Heat sources ([IEC60287-1-1] Clause 5), computed from the cable unless given: + +* Conductor Joule ``W_c = I^2 R_C`` per conductor with + ``R_C = R'(1 + y_s + y_p)``, ``R' = R_0 (1 + α_20 (θ - 20))`` (5.1, + Formula (7)); ``R_0`` from [IEC60228] Table 4, per length of the complete + cable (:func:`conductor_resistance_20C`); ``y_s`` over the three ranges of + 5.1.3 and ``y_p`` of 5.1.4/5.1.5 (:func:`skin_effect_factor`, + :func:`proximity_effect_factor`). +* Dielectric ``W_d = ω C U_0^2 tanδ`` with ``C`` times the lay-up factor + ``C_LL`` (5.2, Annex A), counted from the ``U_0`` of the insulation type + (127 kV for XLPE; :func:`dielectric_loss`). +* Sheath ``λ1'`` of the per-core screens of an SL-type cable (5.3.2, or + 5.3.11 under magnetic armour; :func:`sheath_circulating_loss_factor`). + ``λ1'' = 0`` as in those clauses; :func:`sheath_eddy_loss_factor` gives + the eddy loss of 5.3.7.1 that CIGRE TB 880 (2022) Guidance Points 6 and 31 + keep, for a caller who adds it. +* Armour ``λ2`` (5.4): supplied by the caller, not computed (finite element + values for three-core armoured cables lie well below the IEC estimate, + e.g. Goddard et al. 2015, Table V), released at the armour radii in equal + shares. + +Thermal resistances ([IEC60287-2-1] 4.1): per-core annuli divided by +``C_LL`` (4.1.2.1, 4.1.3), ``T1`` from the conductor diameter ``d_c``, the +semiconducting screens with the insulation (4.1.1), and the fillers and +bedding of an armoured three-core SL-type cable by the geometric factor +``G-bar`` (4.1.4.2, 5.6; CIGRE TB 880 Guidance Point 45). References ---------- -[IEC60287-1-1] (losses, ``R_ac``, dielectric, sheath ``λ1``, ladder Eq. 1); -[IEC60287-2-1] (thermal resistances ``T1..T3``); [Poradowski2025] (external +[IEC60287-1-1] IEC 60287-1-1:2023 (losses, ``R_C``, dielectric, sheath +``λ1``, ladder Formula (1), lay-up factor Annex A); [IEC60287-2-1] IEC +60287-2-1:2023 (thermal resistances ``T1..T3``, Table 1 resistivities); +[IEC60228] IEC 60228:2023 (conductor resistance); [Poradowski2025] (external ``T4`` for dynamic/buried submarine cables, Eq. 2, which, like the ladder implemented here, carries no armour loss factor ``λ2``); [NeherMcGrath1957] J. H. Neher and M. H. McGrath, "The calculation of the @@ -79,6 +94,7 @@ import numpy as np from numpy.typing import NDArray +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.cables.schema import uses_cable_materials from cablexsec.exceptions import CableInputError from cablexsec.materials.library import get_property @@ -88,17 +104,23 @@ from cablexsec.cables.schema import CableData, Layer __all__ = [ + "DIELECTRIC_LOSS_U0_KV", "ConductionLayer", "ThermalResult", "ac_resistance", "compute_thermal", "conductor_layers", "conductor_material_of", + "conductor_resistance_20C", "dielectric_loss", "iec_conductor_temperature", + "lay_length_factor", "proximity_effect_factor", "sheath_circulating_loss_factor", + "sheath_eddy_loss_factor", + "sheath_reactance", "skin_effect_factor", + "sl_filler_geometric_factor", "solve_crank_nicolson", "steady_state_profile", "thermal_resistance", @@ -106,6 +128,69 @@ FloatArray = NDArray[np.float64] +#: [IEC60228] (2023) Table 4, class 2 stranded conductors: maximum DC +#: resistance at 20 degC [ohm/km] of plain annealed copper and of aluminium, +#: by nominal cross-section [mm^2] (aluminium from 10 mm^2). Per km of the +#: complete cable ([IEC60228] Annex A), so no lay-up factor is applied to it. +_IEC60228_CLASS2_OHM_KM: dict[float, tuple[float, float | None]] = { + 0.75: (24.5, None), + 1.0: (18.1, None), + 1.5: (12.1, None), + 2.5: (7.41, None), + 4.0: (4.61, None), + 6.0: (3.08, None), + 10.0: (1.83, 3.08), + 16.0: (1.15, 1.91), + 25.0: (0.727, 1.20), + 35.0: (0.524, 0.868), + 50.0: (0.387, 0.641), + 70.0: (0.268, 0.443), + 95.0: (0.193, 0.320), + 120.0: (0.153, 0.253), + 150.0: (0.124, 0.206), + 185.0: (0.0991, 0.164), + 240.0: (0.0754, 0.125), + 300.0: (0.0601, 0.100), + 400.0: (0.0470, 0.0778), + 500.0: (0.0366, 0.0605), + 630.0: (0.0283, 0.0469), + 800.0: (0.0221, 0.0367), + 1000.0: (0.0176, 0.0291), + 1200.0: (0.0151, 0.0247), + 1400.0: (0.0129, 0.0212), + 1600.0: (0.0113, 0.0186), + 1800.0: (0.0101, 0.0165), + 2000.0: (0.0090, 0.0149), + 2500.0: (0.0072, 0.0119), + 3000.0: (0.0060, 0.0099), + 3200.0: (0.0056, 0.0093), + 3500.0: (0.0051, 0.0085), +} +#: [IEC60287-1-1] (2023) Table 1 conductor resistivities at 20 degC [ohm m], +#: used to recognise a copper or an aluminium conductor material. +_RHO_COPPER, _RHO_ALUMINIUM = 1.7241e-8, 2.8264e-8 +#: [IEC60287-1-1] (2023) Annex A, Table A.1: neutral-axis factor C_fL of +#: laid-up round cores, by number of cores. +_CFL_BY_CORES: dict[int, float] = {2: 1.16, 3: 1.29, 4: 1.53, 5: 1.80, 6: 2.08} +#: [IEC60287-1-1] (2023) 5.2: U0 [kV] from which the dielectric loss is +#: taken into account, by insulation type. +DIELECTRIC_LOSS_U0_KV: dict[str, float] = { + "paper_solid": 38.0, + "paper_fluid": 63.5, + "ppl": 63.5, + "butyl_rubber": 18.0, + "epr": 63.5, + "pvc": 6.0, + "pe": 127.0, + "xlpe": 127.0, + "xlpe_filled": 63.5, +} +#: An armour material with ``relative_permeability`` at or below this value +#: is non-magnetic (stainless steel, copper, aluminium); one without the +#: property is taken as magnetic steel ([IEC60287-1-1] (2023) 5.4.3.1 d) +#: gives 400 for steel wires). +_MAGNETIC_PERMEABILITY_MIN = 1.5 + # Classification threshold (not a material property) separating metallic # sheaths/screens from polymer and filler layers in the thermal ladder: the # library's metals have λ ≥ 35 W/(m·K), its polymers and fillers λ ≤ 0.5. @@ -150,6 +235,21 @@ class ThermalResult: Total heat generation per metre [W/m]. provenance : Provenance or None Backing citations/gates and active limitations. + losses : dict or None + Loss terms of one core used by :func:`compute_thermal`: ``R0_ohm_m``, + ``R_ac_ohm_m``, ``y_s``, ``y_p``, ``lay_length_factor``, ``W_c_W_m``, + ``W_d_W_m``, ``lambda1``, ``lambda2``. + resistances : dict or None + The thermal resistances of [IEC60287-1-1] 4.2.1, Formula (1), from + :func:`compute_thermal` [K m/W]: ``T1_Km_W`` (conductor to sheath, per + core), ``T2_Km_W`` and ``T3_Km_W`` (outside the sheath, per core of the + ``n`` loaded cores: a per-core jacket counts ``1/n``, as in CIGRE TB + 880 Guidance Point 45) and ``T4_Km_W``. A cable-level annulus outside + ``k`` of ``m`` structural armour layers goes ``(1 - k/m)`` to ``T2`` + and ``k/m`` to ``T3``, its share of the armour loss, so Formula (1) + reproduces the solver; with one armour layer this is the split at the + armour. Without a structural armour ``T3`` is zero and ``T2`` holds + everything outside the sheath. """ r_m: FloatArray @@ -158,6 +258,8 @@ class ThermalResult: T_armour_C: float P_total_W_m: float provenance: Provenance | None = None + losses: dict[str, float] | None = None + resistances: dict[str, float] | None = None def thermal_resistance(r_inner_m: float, r_outer_m: float, lambda_W_mK: float) -> float: @@ -266,36 +368,75 @@ def dielectric_loss( *, frequency_Hz: float = 50.0, n_phases: int = 1, + insulation_type: str = "xlpe", + lay_length_factor: float = 1.0, + include: bool | None = None, ) -> float: - """Dielectric loss per unit length [W/m] ([IEC60287-1-1] Eq. 18). - - ``W_d = n U_0^2 ω C tanδ`` with phase voltage ``U_0 = V/√3`` and coaxial - capacitance ``C = 2π ε_0 ε_r / ln(r_o/r_i)``. Returns 0 below 100 kV (the - IEC threshold for including dielectric loss in ratings). + r"""Dielectric loss per unit length [W/m] ([IEC60287-1-1] 5.2). + + ``W_d = n ω C U_0^2 tanδ`` with the voltage to earth ``U_0 = U/√3`` + (``voltage_kV`` is the rated phase-to-phase voltage ``U``) and the + capacitance ``C = 2π ε_0 ε_r C_LL / ln(D_i/d_c)`` per core, ``C_LL`` the + lay-up factor of laid-up cores ([IEC60287-1-1] Annex A); ``r_inner_m`` is + the radius over the conductor screen and ``r_outer_m`` the radius over the + insulation without its screen. + + ``include=None`` follows [IEC60287-1-1] 5.2: the loss is taken into + account from the ``U_0`` of :data:`DIELECTRIC_LOSS_U0_KV` for the + ``insulation_type`` (127 kV for unfilled XLPE) and is zero below it. + ``include=True`` always evaluates it, as CIGRE TB 880 (2022) Guidance + Point 7 recommends; ``False`` returns zero. """ - if voltage_kV < 100.0: + u0_kV = voltage_kV / math.sqrt(3.0) + if include is None: + try: + threshold = DIELECTRIC_LOSS_U0_KV[insulation_type] + except KeyError: + raise CableInputError( + f"unknown insulation_type {insulation_type!r}; one of " + f"{sorted(DIELECTRIC_LOSS_U0_KV)}" + ) from None + include = u0_kV >= threshold + if not include: return 0.0 - eps0 = 8.854e-12 - u0 = voltage_kV * 1.0e3 / math.sqrt(3.0) - cap = 2.0 * math.pi * eps0 * epsilon_r / math.log(r_outer_m / r_inner_m) + eps0 = 8.854e-12 # [IEC60287-1-1] 5.2 + cap = ( + 2.0 + * math.pi + * eps0 + * epsilon_r + * lay_length_factor + / math.log(r_outer_m / r_inner_m) + ) omega = 2.0 * math.pi * frequency_Hz - return n_phases * u0**2 * omega * cap * tan_delta + return n_phases * (u0_kV * 1.0e3) ** 2 * omega * cap * tan_delta + + +def _bessel_argument_squared(r_dc_ohm_m: float, frequency_Hz: float, k: float) -> float: + """``x^2 = (8 π f / R') 10^-7 k`` ([IEC60287-1-1] 5.1.3 to 5.1.5).""" + return (8.0 * math.pi * frequency_Hz / r_dc_ohm_m) * 1.0e-7 * k def skin_effect_factor( r_dc_ohm_m: float, frequency_Hz: float, *, k_s: float = 1.0 ) -> float: - r"""Skin-effect factor ``y_s`` ([IEC60287-1-1] Eq. 5). + r"""Skin-effect factor ``y_s`` ([IEC60287-1-1] 5.1.3). - ``x_s^2 = (8πf/R')·10^{-7}·k_s`` and - ``y_s = x_s^4 / (192 + 0.8 x_s^4)``, with ``R'`` the DC resistance per - unit length [Ω/m] at operating temperature and ``k_s`` the conductor - construction coefficient (``1`` for round/compact stranded; - [IEC60287-1-1] Table 2 lists segmental values). + With ``x_s^2 = (8πf/R')·10^{-7}·k_s``, ``R'`` the DC resistance per unit + length [Ω/m] at the operating temperature and ``k_s`` the coefficient of + [IEC60287-1-1] Table 2 (1 for round stranded conductors): + + * ``0 < x_s ≤ 2.8``: ``y_s = x_s^4 / (192 + 0.8 x_s^4)``; + * ``2.8 < x_s ≤ 3.8``: ``y_s = -0.136 - 0.0177 x_s + 0.0563 x_s^2``; + * ``x_s > 3.8``: ``y_s = 0.354 x_s - 0.733``. """ - xs2 = (8.0 * math.pi * frequency_Hz / r_dc_ohm_m) * 1.0e-7 * k_s - xs4 = xs2 * xs2 - return xs4 / (192.0 + 0.8 * xs4) # [IEC60287-1-1] Eq. 5 + xs2 = _bessel_argument_squared(r_dc_ohm_m, frequency_Hz, k_s) + xs = math.sqrt(xs2) + if xs <= 2.8: + return xs2 * xs2 / (192.0 + 0.8 * xs2 * xs2) + if xs <= 3.8: + return -0.136 - 0.0177 * xs + 0.0563 * xs2 + return 0.354 * xs - 0.733 def proximity_effect_factor( @@ -305,44 +446,493 @@ def proximity_effect_factor( spacing_m: float, *, k_p: float = 1.0, + n_conductors: int = 3, ) -> float: - r"""Proximity-effect factor ``y_p`` for three-core cables ([IEC60287-1-1] Eq. 7). + r"""Proximity-effect factor ``y_p`` ([IEC60287-1-1] 5.1.4 and 5.1.5.1). - With ``x_p^4`` formed as in :func:`skin_effect_factor` (using ``k_p``) and - ``F = x_p^4/(192 + 0.8 x_p^4)``, + With ``x_p^2 = (8πf/R')·10^{-7}·k_p`` and ``F = x_p^4/(192 + 0.8 x_p^4)``, + three conductors (5.1.5.1, a three-core cable or three single-core + cables): .. math:: y_p = F\,(d_c/s)^2\left[0.312\,(d_c/s)^2 + \frac{1.18}{F + 0.27}\right], - where ``d_c`` is the conductor diameter and ``s`` the axial spacing of - adjacent conductors (touching trefoil: ``s`` = core overall diameter). + and two conductors (5.1.4): ``y_p = 2.9 F (d_c/s)^2``. ``d_c`` is the + conductor diameter and ``s`` the distance between conductor axes. The + formulae hold for ``x_p ≤ 2.8``. """ - xp2 = (8.0 * math.pi * frequency_Hz / r_dc_ohm_m) * 1.0e-7 * k_p + if n_conductors not in (2, 3): + raise CableInputError( + "the IEC proximity-effect factor is given for two or three " + f"conductors, not {n_conductors}; pass y_p" + ) + xp2 = _bessel_argument_squared(r_dc_ohm_m, frequency_Hz, k_p) xp4 = xp2 * xp2 f_p = xp4 / (192.0 + 0.8 * xp4) ratio = d_conductor_m / spacing_m - # [IEC60287-1-1] Eq. 7 (three conductors). + if n_conductors == 2: + return 2.9 * f_p * ratio**2 # [IEC60287-1-1] 5.1.4 return f_p * ratio**2 * (0.312 * ratio**2 + 1.18 / (f_p + 0.27)) def sheath_circulating_loss_factor( - r_sheath_ohm_m: float, r_ac_ohm_m: float, reactance_ohm_m: float + r_sheath_ohm_m: float, + r_ac_ohm_m: float, + reactance_ohm_m: float, + *, + sl_armoured: bool = False, ) -> float: - r"""Sheath circulating-current loss factor ``λ1'`` ([IEC60287-1-1] Eq. 24). + r"""Sheath circulating-current loss factor ``λ1'``. - For metallic sheaths bonded at both ends (trefoil), + Two or three single-core cables in trefoil, sheaths bonded at both ends, + and the cores of an unarmoured SL-type cable ([IEC60287-1-1] 5.3.2): .. math:: \lambda_1' = \frac{R_s}{R}\,\frac{1}{1 + (R_s/X)^2}, - with ``R_s`` the sheath AC resistance per unit length, ``R`` the conductor - AC resistance, and ``X = 2ω·10^{-7}\ln(2s/d_s)`` the sheath reactance - ([IEC60287-1-1] Eq. 25). The eddy-current term ``λ1''`` is additive and not - computed here; for solidly-bonded sheaths the circulating term dominates. + with ``R_s`` the sheath resistance and ``R`` the conductor AC resistance + per unit length at their operating temperatures, and ``X = 2ω·10^{-7} + \ln(2s/d)`` the sheath reactance (``s`` the distance between conductor + axes, ``d`` the mean sheath diameter). An SL-type cable under magnetic + armour (``sl_armoured=True``, [IEC60287-1-1] 5.3.11) has the factor 1.5 + on this expression and ``X`` multiplied by the lay-up factor ``C_LL``, + which the caller includes in ``reactance_ohm_m``. The eddy-current term + ``λ1''`` is zero in both clauses. """ - return (r_sheath_ohm_m / r_ac_ohm_m) / ( - 1.0 + (r_sheath_ohm_m / reactance_ohm_m) ** 2 + factor = 1.5 if sl_armoured else 1.0 + return ( + factor + * (r_sheath_ohm_m / r_ac_ohm_m) + / (1.0 + (r_sheath_ohm_m / reactance_ohm_m) ** 2) + ) + + +def sheath_eddy_loss_factor( + r_sheath_ohm_m: float, + r_ac_ohm_m: float, + *, + sheath_mean_diameter_m: float, + sheath_outer_diameter_m: float, + sheath_thickness_m: float, + sheath_resistivity_ohm_m: float, + spacing_m: float, + frequency_Hz: float = 50.0, + solid_bonding_reactance_ohm_m: float | None = None, +) -> float: + r"""Sheath eddy-current loss factor ``λ1''`` of three cables in trefoil. + + [IEC60287-1-1] 5.3.7.1 (sheaths single-point bonded or cross-bonded): + + .. math:: + \lambda_1'' = \frac{R_s}{R}\left[g_s \lambda_0 (1 + \Delta_1 + \Delta_2) + + \frac{(\beta_1 t_s)^4}{12\cdot10^{12}}\right], + + with ``m = ω 10^-7 / R_s``, ``λ0 = 3 m²/(1+m²) (d/2s)²``, ``Δ1 = (1.14 + m^2.45 + 0.33)(d/2s)^(0.92 m + 1.66)``, ``Δ2 = 0``, ``β1 = sqrt(4 π ω / + (10^7 ρ_s))`` and ``g_s = 1 + (t_s/D_s)^1.74 (β1 D_s 10^-3 - 1.6)`` + (lengths in mm inside the brackets, as in the standard). + + IEC 60287-1-1 sets ``λ1'' = 0`` for sheaths bonded at both ends and for SL + cables (5.3.2, 5.3.11); :func:`compute_thermal` follows it. CIGRE TB 880 + (2022) Guidance Point 6 keeps the eddy loss in every case and Guidance + Point 31 multiplies it, under solid bonding, by the factor ``F`` of + [IEC60287-1-1] 5.3.6 with ``M = N = R_s/X``: pass the sheath reactance + ``X`` as ``solid_bonding_reactance_ohm_m`` for that product. The value + can then be added to a computed ``λ1'`` and passed as ``lambda1``. + """ + omega = 2.0 * math.pi * frequency_Hz + m = omega * 1.0e-7 / r_sheath_ohm_m + q = sheath_mean_diameter_m / (2.0 * spacing_m) + lam0 = 3.0 * (m**2 / (1.0 + m**2)) * q**2 + delta1 = (1.14 * m**2.45 + 0.33) * q ** (0.92 * m + 1.66) + beta1 = math.sqrt(4.0 * math.pi * omega / (1.0e7 * sheath_resistivity_ohm_m)) + ts_mm, ds_mm = sheath_thickness_m * 1e3, sheath_outer_diameter_m * 1e3 + g_s = 1.0 + (ts_mm / ds_mm) ** 1.74 * (beta1 * ds_mm * 1.0e-3 - 1.6) + lam = (r_sheath_ohm_m / r_ac_ohm_m) * ( + g_s * lam0 * (1.0 + delta1) + (beta1 * ts_mm) ** 4 / 12.0e12 ) + if solid_bonding_reactance_ohm_m is not None: + mm = r_sheath_ohm_m / solid_bonding_reactance_ohm_m + lam *= (4.0 * mm**4 + (2.0 * mm) ** 2) / (4.0 * (mm**2 + 1.0) ** 2) + return float(lam) + + +def sheath_reactance( + spacing_m: float, + sheath_mean_diameter_m: float, + *, + frequency_Hz: float = 50.0, + lay_length_factor: float = 1.0, +) -> float: + """Sheath reactance ``X = 2 ω 10^-7 ln(2s/d) C_LL`` [Ω/m] ([IEC60287-1-1] 5.3).""" + omega = 2.0 * math.pi * frequency_Hz + return ( + 2.0 + * omega + * 1.0e-7 + * math.log(2.0 * spacing_m / sheath_mean_diameter_m) + * lay_length_factor + ) + + +def lay_length_factor(cable: CableData) -> tuple[float, str]: + r"""Lay-up factor ``C_LL`` of laid-up cores and a provenance note. + + [IEC60287-1-1] (2023) Annex A, Formula (A.1) (also [IEC60287-2-1] (2023) + Annex A): + + .. math:: C_{LL} = \sqrt{1 + \left(\frac{\pi C_{fL} D_p}{L_L}\right)^2}, + + with ``D_p`` the diameter of a core (over its outermost per-core layer), + ``L_L`` the core lay pitch (``core_lay.pitch_m``) and ``C_fL`` from Table + A.1 by the number of cores. One for a single-core cable and for cores laid + straight (no ``core_lay`` block). It multiplies a resistance, capacitance + or reactance computed for a straight core and divides a per-core thermal + resistance. + """ + n_cores = max((getattr(layer, "n_cores", 0) for layer in cable.layers), default=0) + if n_cores <= 1: + return 1.0, "" + lay = cable.core_lay + if lay is None: + return 1.0, "cores laid straight (no core_lay): lay-up factor C_LL = 1" + if lay.pitch_m is None: + return 1.0, ( + "core_lay.pitch_m withheld: lay-up factor C_LL ([IEC60287-1-1] " + "Annex A) not applied (C_LL = 1)" + ) + try: + cfl = _CFL_BY_CORES[n_cores] + except KeyError: + raise CableInputError( + f"[IEC60287-1-1] Table A.1 gives C_fL for 2 to 6 cores, not {n_cores}" + ) from None + d_core = 2.0 * max( + ( + float(getattr(layer, "r_outer_m", None) or 0.0) + for layer in cable.layers + if layer.layer_type == "cylindrical_offset" + ), + default=0.0, + ) + if d_core <= 0.0: + raise CableInputError("the lay-up factor needs the outer radius of the cores") + c_ll = math.sqrt(1.0 + (math.pi * cfl * d_core / lay.pitch_m) ** 2) + return c_ll, ( + f"lay-up factor C_LL = {c_ll:.4f} ([IEC60287-1-1] Annex A: C_fL {cfl}, " + f"core diameter {d_core * 1e3:.2f} mm, lay pitch {lay.pitch_m:g} m)" + ) + + +def conductor_resistance_20C( + cable: CableData, + conductor_area_m2: float, + material: str, + *, + lay_factor: float = 1.0, +) -> tuple[float, str]: + """DC resistance of one conductor at 20 degC per metre of cable [Ω/m] and its basis. + + [IEC60287-1-1] (2023) 5.1.2: ``R_0`` is taken from [IEC60228]: a copper + or aluminium conductor (recognised by its resistivity, within 3 % of the + [IEC60287-1-1] Table 1 value) of a nominal class 2 cross-section takes the + maximum resistance of [IEC60228] (2023) Table 4, which holds per length of + the complete cable ([IEC60228] Annex A); a cross-section between two + nominal sizes is interpolated linearly (CIGRE TB 880 (2022), Section 2.5). + Otherwise the resistance is ``ρ/A`` with the material resistivity, times + the lay-up factor ``lay_factor`` for the length of a laid-up core + ([IEC60287-1-1] 5.1.2 and Annex A). + """ + rho = get_property(material, "rho_ohm_m") + area_mm2 = conductor_area_m2 * 1.0e6 + column = None + if abs(rho / _RHO_COPPER - 1.0) <= 0.03: + column, metal = 0, "copper" + elif abs(rho / _RHO_ALUMINIUM - 1.0) <= 0.03: + column, metal = 1, "aluminium" + solid = any( + getattr(layer, "construction", "") == "solid" + for layer in conductor_layers(cable) + ) + if column is not None and not solid: + sizes = sorted( + a for a, row in _IEC60228_CLASS2_OHM_KM.items() if row[column] is not None + ) + values = [_IEC60228_CLASS2_OHM_KM[a][column] for a in sizes] + if sizes[0] <= area_mm2 <= sizes[-1]: + r_km = float(np.interp(area_mm2, sizes, values)) # type: ignore[arg-type] + nominal = any(math.isclose(area_mm2, a, rel_tol=1e-6) for a in sizes) + how = ( + "nominal size" + if nominal + else "interpolated between nominal sizes (CIGRE TB 880, 2.5)" + ) + return r_km * 1.0e-3, ( + f"R_0 = {r_km:.4g} ohm/km of the complete cable from [IEC60228] " + f"Table 4, class 2 {metal}, {area_mm2:g} mm2 ({how})" + ) + r20 = rho / conductor_area_m2 * lay_factor + reason = ( + "solid conductor" + if solid + else "material is not the copper or aluminium of [IEC60287-1-1] Table 1" + if column is None + else "cross-section outside [IEC60228] Table 4" + ) + return r20, ( + f"R_0 = rho/A x C_LL = {r20 * 1e3:.4g} ohm/km ({reason}; [IEC60287-1-1] " + "5.1.2 and Annex A)" + ) + + +@dataclass(frozen=True) +class _ConductorLosses: + """Conductor resistance and loss factors of one core (private).""" + + r20_ohm_m: float + alpha_R_per_K: float + y_s: float + y_p: float + lay_factor: float + notes: tuple[str, ...] + + +def _conductor_offset_layer(cable: CableData) -> Layer | None: + for layer in conductor_layers(cable): + if layer.layer_type == "cylindrical_offset": + return layer + return None + + +def _conductor_losses( + cable: CableData, + conductor_area_m2: float, + material: str, + temperature_C: float, + *, + y_s: float | None, + y_p: float | None, + r20_ohm_m: float | None, + k_s: float | None, + k_p: float | None, +) -> _ConductorLosses: + """``R_0`` and the skin and proximity factors at ``temperature_C`` (IEC 5.1).""" + notes: list[str] = [] + c_ll, c_note = lay_length_factor(cable) + if c_note: + notes.append(c_note) + alpha = get_property(material, "alpha_R_per_K") + if r20_ohm_m is None: + r20, r_note = conductor_resistance_20C( + cable, conductor_area_m2, material, lay_factor=c_ll + ) + notes.append(r_note) + else: + r20 = float(r20_ohm_m) + notes.append(f"R_0 = {r20 * 1e3:.4g} ohm/km given explicitly") + freq = cable.environment.frequency_Hz + r_dc = r20 * (1.0 + alpha * (temperature_C - 20.0)) + aluminium = abs(get_property(material, "rho_ohm_m") / _RHO_ALUMINIUM - 1.0) <= 0.03 + solid = any( + getattr(layer, "construction", "") == "solid" + for layer in conductor_layers(cable) + ) + # [IEC60287-1-1] Table 2, round conductor, extruded insulation: k_s = 1; + # k_p = 1, except 0.8 for stranded aluminium. + ks = 1.0 if k_s is None else float(k_s) + kp = (0.8 if aluminium and not solid else 1.0) if k_p is None else float(k_p) + if (y_s is None and k_s is None) or (y_p is None and k_p is None): + notes.append( + f"k_s = {ks:g}, k_p = {kp:g} from [IEC60287-1-1] Table 2 (round " + "conductor, extruded insulation; pass k_s/k_p for Milliken or " + "hollow conductors)" + ) + if y_s is None: + y_s = skin_effect_factor(r_dc, freq, k_s=ks) + if y_p is None: + n_geo = max((getattr(layer, "n_cores", 0) for layer in cable.layers), default=0) + core = _conductor_offset_layer(cable) + if n_geo <= 1 or core is None: + y_p = 0.0 + notes.append( + "single-core cable: the proximity effect depends on the spacing " + "of the other cables of the circuit and is not computed (y_p = 0; " + "pass y_p, [IEC60287-1-1] 5.1.4/5.1.5)" + ) + else: + r_offset = float(getattr(core, "r_offset_m", None) or 0.0) + spacing = 2.0 * r_offset * math.sin(math.pi / n_geo) + d_c = float( + getattr(core, "d_conductor_m", None) + or 2.0 * float(getattr(core, "r_outer_m", 0.0) or 0.0) + ) + if spacing <= 0.0 or d_c <= 0.0: + raise CableInputError( + "the proximity effect needs the core offset and the conductor " + "diameter; pass y_p" + ) + y_p = proximity_effect_factor( + r_dc, freq, d_c, spacing, k_p=kp, n_conductors=n_geo + ) + notes.append( + f"y_p from [IEC60287-1-1] 5.1.{4 if n_geo == 2 else 5} with d_c = " + f"{d_c * 1e3:.2f} mm and s = {spacing * 1e3:.2f} mm" + ) + return _ConductorLosses(r20, alpha, float(y_s), float(y_p), c_ll, tuple(notes)) + + +def _sheath_loss_factor( + cable: CableData, + geo: _LadderGeometry, + *, + r_ac_ohm_m: float, + sheath_temperature_C: float, + lay_factor: float, +) -> tuple[float, str]: + """Sheath loss factor ``λ1`` of the cable from its geometry, and a note. + + Computed for the per-core metallic screens of a two- or three-core + (SL-type) cable: [IEC60287-1-1] 5.3.11 under magnetic armour (factor 1.5) + and 5.3.2 otherwise, following CIGRE TB 880 (2022) Guidance Point 38 for + non-magnetic armour; ``λ1'' = 0`` in both clauses. ``X`` and ``R_s`` are + per metre of cable in both: the values of a straight core times ``C_LL`` + ([IEC60287-1-1] Annex A; 5.3.11 writes it into ``X``; TB 880 Case 8 applies + it to ``X`` under non-magnetic armour). ``R_s`` is that of one core's + screen at the sheath temperature: the wires of a wire screen + (``strand_layers``) over their own lay (CIGRE TB 880 Guidance Point 27), + a solid sheath or foil by its + annulus, and further per-core metallic layers over the screen (a laminated + foil) in parallel with it, as in TB 880 Case 2; metal tapes are left out + (Guidance Point 29, counter helix tapes). A single-core cable (bonding and + spacing of the circuit) and a common sheath over the cores are not + computed: ``λ1 = 0`` with a note, and the caller passes ``lambda1``. + """ + if not geo.sheath_found: + return 0.0, "" + if not geo.multi_core: + return 0.0, ( + "single-core cable: the sheath loss depends on the bonding and the " + "spacing of the circuit and is not computed (lambda1 = 0; pass " + "lambda1, [IEC60287-1-1] 5.3.2 to 5.3.7)" + ) + if not geo.sheath_per_core or geo.n_geo not in (2, 3): + return 0.0, ( + "metallic sheath common to the cores: the sheath loss " + "([IEC60287-1-1] 5.3.8 to 5.3.10) is not computed (lambda1 = 0; " + "pass lambda1)" + ) + layer = next(x for x in cable.layers if x.name == geo.sheath_name) + by_name = {x.name: x for x in cable.layers} + r_screen_in = float(getattr(layer, "r_inner_m", 0.0) or 0.0) + counted = [layer] + tapes: list[str] = [] + for a in geo.path: + other = by_name.get(a.layer_name) + if ( + other is None + or other is layer + or not (a.metallic and a.per_core) + or a.layer.r_inner_m < r_screen_in - _RADIUS_TOL_M + ): + continue + if getattr(other, "tape", None) is not None: + tapes.append(other.name) + else: + counted.append(other) + conductance = 0.0 # 1 / R_s per unit length of the core + diameters: list[float] = [] + parts: list[str] = [] + for item in counted: + r_in = float(getattr(item, "r_inner_m", 0.0) or 0.0) + r_out = float(getattr(item, "r_outer_m", 0.0) or 0.0) + try: + rho_s = get_property(item.material, "rho_ohm_m") + alpha_s = get_property(item.material, "alpha_R_per_K") + except KeyError: + raise CableInputError( + f"the sheath loss needs rho_ohm_m and alpha_R_per_K of the screen " + f"material {item.material!r} ({item.name!r}); give them or pass " + "lambda1" + ) from None + rings = tuple(getattr(item, "strand_layers", ()) or ()) + if rings: + # Wires in parallel, each ring over its own helix length per unit + # core length (1 / cos of its lay angle; TB 880 GP 27). + area = sum(ring.area_m2 * math.cos(ring.lay_angle_rad) for ring in rings) + what = ( + f"{sum(ring.n_wires for ring in rings)} wires of " + f"{sum(ring.area_m2 for ring in rings) * 1e6:.4g} mm2 over their lay" + ) + else: + area = math.pi * (r_out**2 - r_in**2) + what = f"annulus of {area * 1e6:.4g} mm2" + if getattr(item, "construction", "") == "resolved_wire_screen": + what += " (a wire screen without strand_layers)" + r_item = rho_s / area * (1.0 + alpha_s * (sheath_temperature_C - 20.0)) + conductance += 1.0 / r_item + diameters.append(r_in + r_out) + parts.append(f"{item.name!r}: {what}") + r_s = lay_factor / conductance + # Mean diameter of the screens in parallel: the mean of their own mean + # diameters (TB 880 Case 2, wires and laminated foil). + d_mean = sum(diameters) / len(diameters) + metal = ( + f" ({'; '.join(parts)}" + + ("; in parallel" if len(counted) > 1 else "") + + ( + f"; metal tape(s) {', '.join(tapes)} not counted, TB 880 GP 29" + if tapes + else "" + ) + + ")" + ) + core = _conductor_offset_layer(cable) + r_offset = float(getattr(core, "r_offset_m", None) or 0.0) if core else 0.0 + spacing = 2.0 * r_offset * math.sin(math.pi / geo.n_geo) + armour = [layer for layer in cable.helical_layers if layer.structural] + magnetic = [ + a + for a in armour + if _relative_permeability(a.material) > _MAGNETIC_PERMEABILITY_MIN + ] + sl_armoured = geo.n_geo == 3 and bool(magnetic) + x = sheath_reactance( + spacing, + d_mean, + frequency_Hz=cable.environment.frequency_Hz, + lay_length_factor=lay_factor, + ) + lam1 = sheath_circulating_loss_factor(r_s, r_ac_ohm_m, x, sl_armoured=sl_armoured) + clause = ( + "5.3.11 (SL type under magnetic armour: factor 1.5, X times C_LL)" + if sl_armoured + else "5.3.2 (SL type, unarmoured or non-magnetic armour; CIGRE TB 880 GP " + "38; X times C_LL, Annex A)" + ) + screen = metal + common = [a.layer_name for a in geo.path if a.metallic and not a.per_core] + [ + x.name for x in cable.layers if x.layer_type == "cylindrical_shell" + ] + common_note = ( + f"; the losses of the metallic layer(s) over the cores ({', '.join(common)}) " + "are not computed (pass lambda1 to include them)" + if common + else "" + ) + return lam1, ( + f"lambda1' = {lam1:.4f} from [IEC60287-1-1] {clause}: R_s = " + f"{r_s * 1e3:.4g} ohm/km of {layer.name!r} at {sheath_temperature_C:.1f} " + f"degC{screen}, s = {spacing * 1e3:.2f} mm, d = {d_mean * 1e3:.2f} mm; " + "lambda1'' = 0 (IEC; CIGRE TB 880 GP 6 would add the eddy loss)" + common_note + ) + + +def _relative_permeability(material: str) -> float: + """``relative_permeability`` of an armour material; magnetic steel if absent.""" + try: + return get_property(material, "relative_permeability") + except KeyError: + return 400.0 # [IEC60287-1-1] 5.4.3.1 d), steel wires def iec_conductor_temperature( @@ -373,7 +963,7 @@ def iec_conductor_temperature( dynamic cable section ([Poradowski2025]). The conductor loss ``W_c`` and dielectric loss ``W_d`` ([IEC60287-1-1]) inject at the conductor and the insulation mid-point respectively; ``λ1`` is the sheath loss factor, ``λ2`` the - armour loss factor ([IEC60287-1-1] 2.4; ``T3`` lies outside the armour) + armour loss factor ([IEC60287-1-1] 5.4; ``T3`` lies outside the armour) and ``n`` the number of loaded conductors. With ``λ2 = 0`` the three outer resistances carry the same heat flow. @@ -514,6 +1104,9 @@ class _LadderGeometry: r_core: float geometry_notes: list[str] sheath_found: bool = True + sheath_name: str = "" + sheath_per_core: bool = False + lay_factor: float = 1.0 def _layer_heat_flows( @@ -530,7 +1123,7 @@ def _layer_heat_flows( ) -> tuple[list[float], float, float]: r"""Per-annulus heat flow of the IEC ladder and the matching ``T1``, ``T2``. - The allocation follows the structure of [IEC60287-1-1] 1.4.1.1 Eq. 1, + The allocation follows the structure of [IEC60287-1-1] 4.2.1, Formula (1), .. math:: \Delta\theta = (W_c + \tfrac12 W_d)\,T_1 @@ -599,12 +1192,16 @@ def compute_thermal( n_cores: int | None = None, conductor_material: str | None = None, conductor_temp_C: float = 90.0, - y_s: float = 0.0, - y_p: float = 0.0, - lambda1: float = 0.0, + y_s: float | None = None, + y_p: float | None = None, + lambda1: float | None = None, T4_external_Km_W: float | None = None, ambient_C: float | None = None, lambda2: float = 0.0, + conductor_resistance_20C_ohm_m: float | None = None, + k_s: float | None = None, + k_p: float | None = None, + include_dielectric_loss: bool | None = None, ) -> ThermalResult: r"""Steady-state IEC 60287 conductor temperature for a cable definition. @@ -612,16 +1209,41 @@ def compute_thermal( (each with ``r_inner_m``/``r_outer_m`` and a material conductivity) and closes it with the external Robin resistance ``T4`` from the cable's ``environment`` block (or the override argument). The ladder is split as in - [IEC60287-1-1] 1.4.1.1 Eq. 1: ``T1`` is the resistance between the + [IEC60287-1-1] 4.2.1, Formula (1): ``T1`` is the resistance between the conductor and the metallic sheath/screen, ``T2``/``T3`` the resistance - outside it ([IEC60287-2-1] for the annulus resistances). The conductor - temperature follows :func:`iec_conductor_temperature` ([Poradowski2025] - Eq. 2). - - The conductor Joule loss is ``W_c = I^2 R_ac`` per conductor with ``R_ac`` - from :func:`ac_resistance` at ``conductor_temp_C`` (skin/proximity ``y_s``, - ``y_p`` supplied by the caller via :func:`skin_effect_factor` / - :func:`proximity_effect_factor`); dielectric loss is added above 100 kV. + outside it ([IEC60287-2-1] 4.1 for the annulus resistances). The + conductor temperature follows :func:`iec_conductor_temperature` + ([Poradowski2025] Eq. 2). + + Losses + ------ + The conductor Joule loss is ``W_c = I^2 R_C`` per conductor with + ``R_C = R_0 (1 + α_20 (θ - 20)) (1 + y_s + y_p)`` at ``conductor_temp_C`` + ([IEC60287-1-1] 5.1, Formula (7)). Each loss term not given is computed + from the cable: + + * ``R_0`` from [IEC60228] Table 4 for a copper or aluminium class 2 + conductor (per length of the complete cable), else ``ρ/A`` times the + lay-up factor ``C_LL`` (:func:`conductor_resistance_20C`, + :func:`lay_length_factor`); + * ``y_s`` from [IEC60287-1-1] 5.1.3, all three ranges of ``x_s``; + * ``y_p`` of a two- or three-core cable from 5.1.4/5.1.5.1 with the + conductor diameter ``d_conductor_m`` (else ``2 r_outer_m``) and the + distance between conductor axes; a single-core cable gets ``y_p = 0`` + (the spacing of the circuit is not part of the cable), recorded; + * ``λ1`` of the per-core screens of a two- or three-core (SL-type) + cable: [IEC60287-1-1] 5.3.11 under magnetic armour (factor 1.5), + 5.3.2 otherwise, ``λ1'' = 0`` (IEC; CIGRE TB 880 Guidance Point 6 would + add the eddy loss), the screen resistance at the sheath temperature + ``θ - (W_c + ½W_d) T1`` (5.3.1). A single-core cable or a common sheath + gets ``λ1 = 0``, recorded; pass ``lambda1``; + * the dielectric loss ``W_d`` per core ([IEC60287-1-1] 5.2) from the + first insulation layer with ``electrical`` data, with ``C`` times + ``C_LL``, counted from the ``U_0`` of its ``insulation_type`` (127 kV for + unfilled XLPE) unless ``include_dielectric_loss`` says otherwise. + + The values used are in ``ThermalResult.losses`` and their basis in the + provenance limitations. Radial profile -------------- @@ -670,13 +1292,7 @@ def compute_thermal( implemented, it is represented by the annulus of equal filler area, ``√n_geo · r_core ≤ r ≤ r_outer``, with ``r_core`` the largest per-core outer radius and ``n_geo`` the number of cores. This explicit approximation - is recorded in the provenance limitations. As an order-of-magnitude check - only (filler conductivity of [Poradowski2025] not stated), the CIGRE TB 880 - geometry (touching cores of 65.9 mm radius in a 141.95 mm filler, library - ``pp_filler`` and ``hdpe``) gives 0.166 K·m/W for filler plus armour - bedding, about 1.5 times the tabulated ``T2 = 0.1121`` K·m/W of - [Poradowski2025] Table 1, i.e. on the high (conservative) side; the - previous behaviour (filler omitted) gave about 0.008. A per-core layer with + is recorded in the provenance limitations. A per-core layer with ``r_inner_m = 0`` (and any such layer of a single-core cable) is the conductor, the heat source, and is excluded from the ladder. @@ -685,18 +1301,21 @@ def compute_thermal( With ``n_cores = 1``, no dielectric loss and ``lambda1 = 0`` the ladder collapses to ``θ_a + W_c (ΣR_internal + T4)`` — i.e. exactly the 1-D primitive :func:`steady_state_profile` evaluated on the - same annuli with the cable surface raised by ``W_c T4``. The three-core - mutual-heating geometric factor of [IEC60287-2-1] is **not** applied; for - ``n_cores > 1`` the result follows the lumped IEC ladder, and the - geometric correction is left as a documented refinement. + same annuli with the cable surface raised by ``W_c T4``. For + ``n_cores > 1`` the result follows the lumped IEC ladder: per-core + annuli for each core and, in an armoured three-core SL-type cable, the + filler resistance of the [IEC60287-2-1] geometric factor; the belted and + screened-cable factors of [IEC60287-2-1] 4.1.2.2 and 4.1.2.3 are not + implemented. Limitations ----------- - The armour loss factor ``λ2`` ([IEC60287-1-1] 2.4) is not computed: it is + The armour loss factor ``λ2`` ([IEC60287-1-1] 5.4) is not computed: it is the caller's ``lambda2`` (default 0, armour losses then absent from the heat flow through ``T3`` and ``T4`` and from ``P_total_W_m``), released at - the armour radii in equal shares. The sheath eddy-current loss ``λ1''`` is - not computed (``lambda1`` is whatever the caller supplies). + the armour radii in equal shares. The skin and proximity factors are not + raised by 1.5 for magnetic armour (CIGRE TB 880 Guidance Point 25 does; + [IEC60287-1-1] 5.1.6 does it for pipe-type cables only). Parameters ---------- @@ -705,7 +1324,7 @@ def compute_thermal( current_A : float Conductor current [A]. conductor_area_m2 : float - Conductor cross-sectional area [m²] for ``R_dc``. + Conductor cross-section [m²]: the [IEC60228] nominal size of ``R_0``. n_cores : int, optional Number of loaded conductors ``n``. Defaults to the count of ``cylindrical_offset`` cores, else 1. @@ -713,16 +1332,26 @@ def compute_thermal( Material key for ``rho_ohm_m`` and ``alpha_R_per_K``; defaults to the material of the cable's conductor layer (see above). conductor_temp_C : float, optional - Temperature at which ``R_ac`` is evaluated [°C] (default 90 = XLPE max). + Temperature at which ``R_C`` is evaluated [°C] (default 90 = XLPE max). y_s, y_p : float, optional - Skin and proximity factors (default 0 = DC limit). + Skin and proximity factors; computed when not given (see Losses). lambda1 : float, optional - Sheath loss factor (default 0). + Sheath loss factor; computed when not given (see Losses). T4_external_Km_W, ambient_C : float, optional Override the cable ``environment`` block. lambda2 : float, optional - Armour loss factor ([IEC60287-1-1] 2.4; default 0), released at the + Armour loss factor ([IEC60287-1-1] 5.4; default 0), released at the radii of the structural armour layers in equal shares. + conductor_resistance_20C_ohm_m : float, optional + ``R_0`` per metre of cable [Ω/m] (a datasheet or measured value), + instead of [IEC60228]. + k_s, k_p : float, optional + Skin and proximity coefficients ([IEC60287-1-1] Table 2); default 1 + and 1 (0.8 for stranded aluminium), round conductor, extruded + insulation. + include_dielectric_loss : bool, optional + ``None`` (default): the [IEC60287-1-1] 5.2 voltage threshold; + ``True``: always (CIGRE TB 880 Guidance Point 7); ``False``: never. """ env = cable.environment t4 = T4_external_Km_W if T4_external_Km_W is not None else env.T4_external_Km_W @@ -742,8 +1371,13 @@ def compute_thermal( "lambda1": (lambda1, None), "lambda2": (lambda2, None), "T4_external_Km_W": (t4, None), + "conductor_resistance_20C_ohm_m": (conductor_resistance_20C_ohm_m, True), + "k_s": (k_s, True), + "k_p": (k_p, True), } for name, (value, positive) in checks.items(): + if value is None: + continue if not math.isfinite(value): raise CableInputError(f"compute_thermal: {name} must be finite") if positive is True and value <= 0.0: @@ -763,25 +1397,63 @@ def compute_thermal( # Losses. material, material_basis = conductor_material_of(cable, conductor_material) try: - rho = get_property(material, "rho_ohm_m") - alpha = get_property(material, "alpha_R_per_K") + get_property(material, "rho_ohm_m") + get_property(material, "alpha_R_per_K") except KeyError as error: raise CableInputError( f"compute_thermal: conductor material {material!r} needs rho_ohm_m " "and alpha_R_per_K (give them in the cable 'materials' block or " f"pass conductor_material): {error}" ) from None - r_ac = ac_resistance( - rho, conductor_area_m2, conductor_temp_C, alpha, y_s=y_s, y_p=y_p + cond = _conductor_losses( + cable, + conductor_area_m2, + material, + conductor_temp_C, + y_s=y_s, + y_p=y_p, + r20_ohm_m=conductor_resistance_20C_ohm_m, + k_s=k_s, + k_p=k_p, + ) + r_ac = ( + cond.r20_ohm_m + * (1.0 + cond.alpha_R_per_K * (conductor_temp_C - 20.0)) + * (1.0 + cond.y_s + cond.y_p) ) w_c = current_A**2 * r_ac - w_d = _cable_dielectric_loss(cable) - if not geo.sheath_found and (w_d > 0.0 or lambda1 > 0.0): + w_d, w_d_note = _cable_dielectric_loss( + cable, lay_factor=cond.lay_factor, include=include_dielectric_loss + ) + lambda1_note = "" + if lambda1 is None: + t1_core = sum( + thermal_resistance( + a.layer.r_inner_m, a.layer.r_outer_m, a.layer.lambda_W_mK + ) + for a, inner in zip(path, in_t1, strict=True) + if inner + ) + lambda1, lambda1_note = _sheath_loss_factor( + cable, + geo, + r_ac_ohm_m=r_ac, + sheath_temperature_C=conductor_temp_C - (w_c + 0.5 * w_d) * t1_core, + lay_factor=cond.lay_factor, + ) + elif not geo.sheath_found and lambda1 > 0.0: + raise CableInputError( + "compute_thermal: no metallic sheath or screen lies outside the " + "insulation, so the T1/T2 split that lambda1 needs is undefined; " + "declare the metallic sheath/screen layer (cylindrical_shell or a " + "metallic annulus)" + ) + if not geo.sheath_found and w_d > 0.0: raise CableInputError( "compute_thermal: no metallic sheath or screen lies outside the " - "insulation, so the T1/T2 split that the dielectric loss and " - "lambda1 need is undefined; declare the metallic sheath/screen " - "layer (cylindrical_shell or a metallic annulus)" + "insulation, so the T1/T2 split that the dielectric loss needs is " + "undefined; declare the metallic sheath/screen layer " + "(cylindrical_shell or a metallic annulus)" ) armour_radii = _armour_radii(cable) if lambda2 > 0.0 else () @@ -838,90 +1510,205 @@ def compute_thermal( float(np.interp(armour_r, r_m, t_profile)) if armour_r is not None else math.nan ) - # Soft validated-range guard: the conduction ladder + Robin T4 was validated - # (BM5, Poradowski 2025) at the XLPE continuous-operation limit of 90 degC. + # Soft validated-range guard: the IEC ladder applies up to the XLPE + # continuous-operation limit of 90 degC. check_range( float(theta_c), ValidatedRange( "conductor temperature [degC]", t_amb, 90.0, - "[IEC60287] XLPE 90 degC continuous limit; BM5 [Poradowski2025] " - "validated at 90 degC", + "[IEC60287-1-1] 5.1.2: XLPE maximum operating temperature 90 degC", ), ) limitations = [ material_basis, + *cond.notes, "external resistance T4 taken verbatim as input (not derived from " "installation geometry)", ] + if w_d_note: + limitations.append(w_d_note) + if lambda1_note: + limitations.append(lambda1_note) if armour_note: limitations.append(armour_note) - if n > 1: + g_bar_applied = any("G-bar =" in note for note in geometry_notes) + if n > 1 and not g_bar_applied: limitations.append( - "three-core mutual-heating geometric factor [IEC60287-2-1] NOT " - "applied; lumped IEC ladder used (n>1)" + "three-core geometric factors of [IEC60287-2-1] (belted, screened " + "or SL-type fillers) NOT applied; lumped IEC ladder used (n>1)" ) limitations.extend(geometry_notes) limitations.append( - "sheath eddy-loss lambda1'' ([IEC60287-1-1] 2.3.6) not included " - "(circulating lambda1' only); BM5 residual ~5 K when lambda1''=0" - ) - limitations.append( - "armour loss factor lambda2 ([IEC60287-1-1] 2.4) supplied by the " + "armour loss factor lambda2 ([IEC60287-1-1] 5.4) supplied by the " "caller, not computed; released at the armour radii in equal shares" if lambda2 > 0.0 - else "armour loss factor lambda2 ([IEC60287-1-1] 2.4) zero: armour " + else "armour loss factor lambda2 ([IEC60287-1-1] 5.4) zero: armour " "losses absent from the T3/T4 heat flow and P_total_W_m" ) prov = Provenance( method="IEC 60287 conduction ladder with external Robin resistance T4", citations=( - "[IEC60287-1-1] 1.4.1.1 Eq.1", - "[IEC60287-2-1]", + "[IEC60287-1-1] 4.2.1 Formula (1), 5.1 to 5.3, Annex A", + "[IEC60228] Table 4", + "[IEC60287-2-1] 4.1", "[Poradowski2025] Eq.2", "[NeherMcGrath1957] Eqs.1-2", ), gates=( "A9 reduction (n=1) <1e-12", - "BM5 90 degC", "profile ends T(r_c)=theta_c, T(r_s)=theta_a+P_total*T4 <1e-12", ), limitations=tuple(limitations), ) + losses = { + "R0_ohm_m": cond.r20_ohm_m, + "R_ac_ohm_m": r_ac, + "y_s": cond.y_s, + "y_p": cond.y_p, + "lay_length_factor": cond.lay_factor, + "W_c_W_m": w_c, + "W_d_W_m": w_d, + "lambda1": float(lambda1), + "lambda2": float(lambda2), + } + t1_out, t2_out, t3_out = _iec_resistances(cable, geo) + resistances = { + "T1_Km_W": t1_out, + "T2_Km_W": t2_out, + "T3_Km_W": t3_out, + "T4_Km_W": float(t4), + } return ThermalResult( - r_m, t_profile, float(theta_c), t_armour, float(p_total), provenance=prov + r_m, + t_profile, + float(theta_c), + t_armour, + float(p_total), + provenance=prov, + losses=losses, + resistances=resistances, ) -def _cable_dielectric_loss(cable: CableData) -> float: - """Per-core dielectric loss of the first insulation with electrical data.""" +def _iec_resistances( + cable: CableData, geo: _LadderGeometry +) -> tuple[float, float, float]: + """``T1``, ``T2``, ``T3`` of [IEC60287-1-1] Formula (1) from the ladder. + + The per-core equivalents of :func:`_layer_heat_flows` (a cable-level + annulus counts once per cable, a per-core annulus ``1/n`` outside ``T1``). + Outside ``T1`` a cable-level annulus outside ``k`` of ``m`` structural + armour layers carries the share ``s = k/m`` of the armour loss in the + solver; its resistance goes ``(1 - s)`` to ``T2`` and ``s`` to ``T3``, so + that Formula (1) with these values reproduces the ladder for any + ``lambda2`` (the split depends on the geometry only). Per-core annuli and + those inside every armour (``s = 0``) are ``T2``; those outside every + armour (``s = 1``) are ``T3``. Without a structural armour ``T3`` is zero. + """ + radii = _armour_radii(cable) + n = float(geo.n) + t1 = t2 = t3 = 0.0 + for annulus, inner in zip(geo.path, geo.in_t1, strict=True): + r_i = thermal_resistance( + annulus.layer.r_inner_m, annulus.layer.r_outer_m, annulus.layer.lambda_W_mK + ) + if geo.multi_core: + mult = 1.0 if annulus.per_core else n + else: + mult = 1.0 if inner else n + if inner: + t1 += mult * r_i + continue + share = 0.0 + if radii and not annulus.per_core: + share = sum( + 1.0 for r_a in radii if r_a <= annulus.layer.r_inner_m + 1e-12 + ) / len(radii) + t2 += (1.0 - share) * mult * r_i / n + t3 += share * mult * r_i / n + return t1, t2, t3 + + +def _cable_dielectric_loss( + cable: CableData, *, lay_factor: float = 1.0, include: bool | None = None +) -> tuple[float, str]: + """Per-core dielectric loss of the first insulation with electrical data, a note. + + [IEC60287-1-1] 5.2: counted from the ``U_0`` of the insulation type + (``include=None``), always (``True``) or never (``False``). + """ voltage = cable.cable.voltage_kV - if voltage is None or voltage < 100.0: - return 0.0 + if voltage is None or include is False: + return 0.0, "" + incomplete: list[tuple[str, str]] = [] # (layer, insulation type) lacking data for layer in cable.layers: elec = getattr(layer, "electrical", None) r_in = getattr(layer, "r_inner_m", None) r_out = getattr(layer, "r_outer_m", None) - if elec is None or r_in is None or r_out is None: + if elec is None: continue tan_d = elec.loss_factor_tan_delta eps_r = elec.permittivity_relative - if tan_d and eps_r: - return dielectric_loss( - voltage, - eps_r, - tan_d, - r_in, - r_out, - frequency_Hz=cable.environment.frequency_Hz, + if not (tan_d and eps_r) or r_in is None or r_out is None: + if elec.insulation_type: + incomplete.append((layer.name, elec.insulation_type)) + continue + kind = elec.insulation_type or "xlpe" + w_d = dielectric_loss( + voltage, + eps_r, + tan_d, + r_in, + r_out, + frequency_Hz=cable.environment.frequency_Hz, + insulation_type=kind, + lay_length_factor=lay_factor, + include=include, + ) + u0 = voltage / math.sqrt(3.0) + if include is True: + basis = "always included (CIGRE TB 880 Guidance Point 7)" + else: + threshold = DIELECTRIC_LOSS_U0_KV[kind] + side = "at or above" if w_d > 0.0 else "below" + basis = ( + f"U0 = {u0:.1f} kV {side} the {threshold:g} kV of " + f"{kind}{'' if elec.insulation_type else ' (assumed)'} " + "([IEC60287-1-1] 5.2)" ) - # At this voltage the dielectric loss is part of the ladder; a silent zero - # would understate the conductor temperature. + return w_d, f"dielectric loss W_d = {w_d:.4g} W/m per core: {basis}" + # The threshold of the declared insulation type of a layer without the + # data, else that of XLPE (the default type). + kinds = [kind for _, kind in incomplete] or ["xlpe"] + kind = min(kinds, key=lambda k: DIELECTRIC_LOSS_U0_KV[k]) + threshold = DIELECTRIC_LOSS_U0_KV[kind] + needed = include is True or voltage / math.sqrt(3.0) >= threshold + if not needed: + return 0.0, "" + # Where the dielectric loss may count, a silent zero would understate the + # conductor temperature. + declared = ( + "; " + + ", ".join( + f"{name!r} declares {k} without both values" for name, k in incomplete + ) + if incomplete + else "" + ) + reason = ( + "the dielectric loss is requested (include_dielectric_loss=True)" + if include is True + else ( + f"U0 = {voltage / math.sqrt(3.0):.1f} kV reaches the {threshold:g} kV " + f"of {kind} from which the dielectric loss counts ([IEC60287-1-1] 5.2)" + ) + ) raise CableInputError( - f"the cable is rated {voltage:g} kV (100 kV or more), so the ladder " - "includes the dielectric loss, but no insulation layer gives " - "'electrical: {permittivity_relative, loss_factor_tan_delta}'" + f"the cable is rated {voltage:g} kV and {reason}, but no insulation " + "layer gives 'electrical: {permittivity_relative, loss_factor_tan_delta}' " + "with its radii" + declared ) @@ -1023,12 +1810,25 @@ def _ladder_geometry(cable: CableData, n_cores: int | None) -> _LadderGeometry: ), default=0.0, ) + # Laid-up cores: a per-core thermal resistance per metre of cable is the + # straight-core value divided by C_LL ([IEC60287-2-1] 4.1.2.1, 4.1.3). + c_ll, _ = lay_length_factor(cable) + # T1 starts at the conductor diameter d_c ([IEC60287-2-1] 4.1.2.1), not + # at the radius of an area-equivalent conductor. + core = _conductor_offset_layer(cable) + d_c = getattr(core, "d_conductor_m", None) if core is not None else None + r_env = 0.5 * float(d_c) if d_c else 0.0 # Concentric conduction annuli (layers exposing r_inner_m/r_outer_m) and # metallic sheath candidates (r_inner, per_core). annuli: list[_LadderAnnulus] = [] sheath_candidates: list[tuple[float, bool, str]] = [] geometry_notes: list[str] = [] + if c_ll != 1.0: + geometry_notes.append( + f"per-core thermal resistances divided by the lay-up factor C_LL = " + f"{c_ll:.4f} ([IEC60287-2-1] 4.1.2.1, 4.1.3)" + ) for layer in cable.layers: name = layer.name.lower() per_core = multi_core and layer.layer_type == "cylindrical_offset" @@ -1036,7 +1836,7 @@ def _ladder_geometry(cable: CableData, n_cores: int | None) -> _LadderGeometry: r_mid = getattr(layer, "r_mid_m", None) t_shell = getattr(layer, "t_m", None) if r_mid is not None and t_shell is not None: - sheath_candidates.append((r_mid - 0.5 * t_shell, False, name)) + sheath_candidates.append((r_mid - 0.5 * t_shell, False, layer.name)) continue r_in = getattr(layer, "r_inner_m", None) r_out = getattr(layer, "r_outer_m", None) @@ -1060,14 +1860,30 @@ def _ladder_geometry(cable: CableData, n_cores: int | None) -> _LadderGeometry: geometry_notes.append( f"interstitial filler {layer.name!r} (r_inner_m = 0) represented " f"by the equal-filler-area annulus sqrt(n)*r_core = " - f"{r_eq * 1e3:.2f} mm to {r_out * 1e3:.2f} mm (n = {n_geo}); " - "[IEC60287-2-1] filler/bedding geometric factor NOT applied" + f"{r_eq * 1e3:.2f} mm to {r_out * 1e3:.2f} mm (n = {n_geo}) " + "for its heat capacity; the SL-type geometric factor sets its " + "resistance where it applies" ) r_in = r_eq + core_stack = per_core or not multi_core + if core_stack and r_env > 0.0 and r_in < r_env - _RADIUS_TOL_M: + if r_out <= r_env + _RADIUS_TOL_M: + geometry_notes.append( + f"{layer.name!r} lies inside the conductor diameter d_c = " + f"{2e3 * r_env:.2f} mm (stranding voids): no thermal " + "resistance ([IEC60287-2-1] 4.1.2.1)" + ) + continue + geometry_notes.append( + f"{layer.name!r} starts at the conductor diameter d_c = " + f"{2e3 * r_env:.2f} mm, not at {2e3 * r_in:.2f} mm " + "([IEC60287-2-1] 4.1.2.1)" + ) + r_in = r_env metallic = lam >= _METALLIC_LAMBDA_MIN_W_mK annuli.append( _LadderAnnulus( - ConductionLayer(r_in, r_out, lam), + ConductionLayer(r_in, r_out, lam * c_ll if per_core else lam), name, per_core, metallic, @@ -1076,7 +1892,7 @@ def _ladder_geometry(cable: CableData, n_cores: int | None) -> _LadderGeometry: ) ) if metallic: - sheath_candidates.append((r_in, per_core, name)) + sheath_candidates.append((r_in, per_core, layer.name)) if not annuli: raise CableInputError( "Cable has no concentric annular layers for a thermal ladder." @@ -1111,6 +1927,7 @@ def _ladder_geometry(cable: CableData, n_cores: int | None) -> _LadderGeometry: elif r_ins_out is not None: break sheath_found = False + sheath_name, sheath_per_core = "", False if r_ins_out is not None: ins_out = r_ins_out @@ -1122,7 +1939,7 @@ def _outside_insulation(r_inner: float, per_core: bool) -> bool: candidates = [c for c in sheath_candidates if _outside_insulation(c[0], c[1])] preferred = [c for c in candidates if c[1]] or candidates if preferred: - r_sheath, sheath_per_core, _sheath_name = min(preferred) + r_sheath, sheath_per_core, sheath_name = min(preferred) sheath_found = True else: r_sheath, sheath_per_core = ins_out, ins_per_core @@ -1145,6 +1962,145 @@ def _in_t1(a: _LadderAnnulus) -> bool: "(no dielectric loss or lambda1 accepted)" ) + sl_type = sheath_found and multi_core and bool(sheath_per_core) + if sl_type: + path = _sl_filler_path(cable, path, n_geo, r_core, geometry_notes) + screen = next((x for x in cable.layers if x.name == sheath_name), None) + if getattr(screen, "construction", "") == "resolved_wire_screen": + geometry_notes.append( + f"core screen {sheath_name!r} is a wire screen: [IEC60287-2-1] " + "4.1.2.2.4 treats a three-core cable with screens of spaced " + "wires as belted (T1 from the belted geometric factor); this " + "ladder takes the screen as an isotherm, which gives a lower T1" + ) return _LadderGeometry( - path, in_t1, n, n_geo, multi_core, r_core, geometry_notes, sheath_found + path, + in_t1, + n, + n_geo, + multi_core, + r_core, + geometry_notes, + sheath_found, + sheath_name if sheath_found else "", + bool(sheath_per_core) if sheath_found else False, + c_ll, + ) + + +def sl_filler_geometric_factor(x: float, *, sheaths_touching: bool = True) -> float: + """Geometric factor ``G-bar`` of SL-type fillers ([IEC60287-2-1] 5.6). + + ``x`` is the thickness of material between the sheaths (or core jackets) + and the armour as a fraction of their outer diameter, ``0 < x <= 0.15``. + The upper curve of Figure 6 is for sheaths touching, the lower one for + equal thicknesses between the sheaths and between sheath and armour; + CIGRE TB 880 (2022) Guidance Point 45 uses the upper curve. Each is + ``2 pi`` times the polynomial of [IEC60287-2-1] 5.6 (error below 1 %). + """ + if not 0.0 < x <= 0.15: + raise CableInputError( + f"the filler geometric factor is given for 0 < x <= 0.15, not {x:g}" + ) + if sheaths_touching: + poly = ( + 0.00022619 + 2.11429 * x - 20.4762 * x**2 + if x <= 0.03 + else 0.0142108 + 1.17533 * x - 4.49737 * x**2 + 10.6352 * x**3 + ) + else: + poly = ( + 0.000202380 + 2.03214 * x - 21.6667 * x**2 + if x <= 0.03 + else 0.0126529 + 1.101 * x - 4.56104 * x**2 + 11.5093 * x**3 + ) + return 2.0 * math.pi * poly + + +def _sl_filler_path( + cable: CableData, + path: list[_LadderAnnulus], + n_geo: int, + r_core: float, + notes: list[str], +) -> list[_LadderAnnulus]: + """Scale the filler and bedding under the armour to ``rho/(6 pi) G-bar``. + + [IEC60287-2-1] 4.1.4.2 and 5.6 with CIGRE TB 880 (2022) Guidance Point + 45: in a three-core SL-type cable the material between the core jackets + and the armour (fillers, binders, an inner sheath) has the thermal + resistance ``T2 = rho/(6 pi) G-bar`` per cable, ``rho`` the highest + resistivity of these materials and ``x`` the smallest distance between a + core jacket and the armour over the core diameter. The annuli keep their + geometry (and heat capacity); their resistances are scaled in proportion + so that they sum to ``T2``. Without armour, with other than three cores or + outside ``0 < x <= 0.15`` the annuli stay as they are, recorded. + """ + armour = [a for a in cable.helical_layers if a.structural and a.r_helix_m] + if n_geo != 3 or not armour: + notes.append( + "SL-type filler geometric factor ([IEC60287-2-1] 4.1.4.2) not " + "applied: it is given for an armoured three-core cable" + ) + return path + r_arm = min( + float(a.r_helix_m or 0.0) + - 0.5 * float(getattr(a, "wire_thickness_m", None) or a.d_wire_m or 0.0) + for a in armour ) + core = _conductor_offset_layer(cable) + r_offset = float(getattr(core, "r_offset_m", None) or 0.0) if core else 0.0 + region = [ + i + for i, a in enumerate(path) + if not a.per_core and not a.metallic and a.layer.r_outer_m <= r_arm + 1e-9 + ] + x = (r_arm - r_offset - r_core) / (2.0 * r_core) if r_core > 0.0 else 0.0 + if not region or not 0.0 < x <= 0.15: + notes.append( + f"SL-type filler geometric factor ([IEC60287-2-1] 5.6) not applied: " + f"x = {x:.4f} is outside 0 < x <= 0.15 or no filler lies under the " + "armour; the annuli are kept" + ) + return path + touching = 2.0 * r_offset * math.sin(math.pi / 3.0) <= 2.0 * r_core * 1.01 + g_bar = sl_filler_geometric_factor(x, sheaths_touching=touching) + rho = max(1.0 / path[i].layer.lambda_W_mK for i in region) + t2 = rho / (6.0 * math.pi) * g_bar + current = sum( + thermal_resistance( + path[i].layer.r_inner_m, path[i].layer.r_outer_m, path[i].layer.lambda_W_mK + ) + for i in region + ) + scale = t2 / current + new_path = list(path) + for i in region: + a = path[i] + new_path[i] = _LadderAnnulus( + ConductionLayer( + a.layer.r_inner_m, + a.layer.r_outer_m, + a.layer.lambda_W_mK / scale, + a.layer.rho_cp_J_m3K, + ), + a.name, + a.per_core, + a.metallic, + layer_name=a.layer_name, + material=a.material, + ) + names = ", ".join(repr(path[i].layer_name) for i in region) + curve = "sheaths touching" if touching else "equal thicknesses" + notes.append( + f"fillers and bedding under the armour ({names}) carry T2 = rho/(6 pi) " + f"G-bar = {t2:.4f} K m/W ([IEC60287-2-1] 4.1.4.2, 5.6, {curve}; " + f"CIGRE TB 880 GP 45): x = {x:.4f}, G-bar = {g_bar:.4f}, rho = " + f"{rho:.2f} K m/W (highest of these materials); the equal-area annuli " + f"gave {current:.4f} K m/W" + ) + return new_path + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/thermal_network.py b/src/cablexsec/mechanics/thermal_network.py index 1b32ba3..1e96fd2 100644 --- a/src/cablexsec/mechanics/thermal_network.py +++ b/src/cablexsec/mechanics/thermal_network.py @@ -20,7 +20,7 @@ whose IEC heat flow is that of one core and ``1`` for an annulus that carries the losses of all ``n`` cores, so that the chain carries the total heat and its temperature drops are exactly the IEC drops - ([IEC60287-1-1] 1.4.1.1 Eq. 1; [NeherMcGrath1957] Eqs. 1--2). + ([IEC60287-1-1] 4.2.1, Formula (1); [NeherMcGrath1957] Eqs. 1--2). * The conductor node holds the conductor heat capacity (``n A_c rho c``); metallic shells and armour wires, which carry no conduction resistance in the ladder, add their heat capacity to the nearest @@ -31,8 +31,10 @@ ``n (W_c (1 + lambda1) + W_d)``, as in Eq. 1. The surface node is joined to the ambient temperature by the external resistance ``T4`` (a series resistance without heat capacity). -* ``W_c = I^2 R_ac(T_c)`` with ``R_ac = R_20 (1 + alpha_20 (T_c - 20))(1 + y_s - + y_p)`` ([IEC60287-1-1] 2.1). The loss is affine in ``T_c``, so the +* ``W_c = I^2 R_ac(T_c)`` with ``R_ac = R_0 (1 + alpha_20 (T_c - 20))(1 + y_s + + y_p)`` ([IEC60287-1-1] 5.1, Formula (7)); ``R_0``, ``y_s``, ``y_p``, + ``lambda1`` and the dielectric loss as in ``compute_thermal``, held at their + rated values. The loss is affine in ``T_c``, so the temperature-dependent resistance is solved together with the temperatures (implicitly, without iteration) unless a fixed evaluation temperature is given, which is the convention of ``compute_thermal``. @@ -53,9 +55,8 @@ armour layers in equal shares, as in the steady ladder; ``lambda1`` and ``lambda2`` are whatever the caller supplies. -Not represented (stated, not hidden): the sheath eddy-current factor -``lambda1''`` (the IEC 60287-1-1 texts are not held), the IEC 60287-2-1 -three-core geometric factor, the heat capacity of the surroundings (``T4`` is +Not represented (stated, not hidden): the belted and screened-cable factors +of IEC 60287-2-1 (4.1.2.2, 4.1.2.3), the heat capacity of the surroundings (``T4`` is quasi-steady, which shortens the response of a buried cable) and axial heat flow. Frictional heating enters through :mod:`cablexsec.analysis.frictional_heating`, which adds its sources to @@ -73,13 +74,16 @@ import numpy as np from numpy.typing import NDArray +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.exceptions import CableInputError, CableLookupError from cablexsec.materials.library import get_property from cablexsec.mechanics.thermal import ( _cable_dielectric_loss, + _conductor_losses, _ladder_geometry, - ac_resistance, + _sheath_loss_factor, conductor_material_of, + thermal_resistance, ) from cablexsec.provenance import Provenance @@ -116,17 +120,18 @@ class ThermalNetwork: n_conductors : int Number of loaded conductors ``n``. r_dc20_ohm_m, alpha_R_per_K : float - ``R_20 = rho_20 / A`` and ``alpha_20``. + ``R_0`` per metre of cable ([IEC60228] Table 4, else ``rho_20 C_LL / A``) + and ``alpha_20``. y_s, y_p : float - Skin and proximity factors as supplied ([IEC60287-1-1] 2.1). + Skin and proximity factors ([IEC60287-1-1] 5.1.3 to 5.1.5). conductor_material : str Library key of the conductor (for ``rho_20`` and ``alpha_20``). conductor_area_m2 : float Conductor cross-section of one core [m^2]. dielectric_loss_W_m : float - Dielectric loss of one core [W/m] (zero below 100 kV). + Dielectric loss of one core [W/m] ([IEC60287-1-1] 5.2). lambda1 : float - Sheath loss factor supplied by the caller. + Sheath loss factor (given, or computed as in ``compute_thermal``). ambient_C : float Default ambient temperature [deg C] (cable environment block). layer_weights : numpy.ndarray @@ -172,7 +177,7 @@ def conductor_loss_W_m( *, resistance_temperature_C: float | None = None, ) -> float: - """Joule loss of one conductor ``I^2 R_ac`` [W/m] ([IEC60287-1-1] 2.1).""" + """Joule loss of one conductor ``I^2 R_ac`` [W/m] ([IEC60287-1-1] 5.1).""" t_r = ( conductor_temperature_C if resistance_temperature_C is None @@ -181,13 +186,10 @@ def conductor_loss_W_m( return float(current_A) ** 2 * self._r_ac(t_r) def _r_ac(self, temperature_C: float) -> float: - return ac_resistance( - get_property(self.conductor_material, "rho_ohm_m"), - self.conductor_area_m2, - temperature_C, - self.alpha_R_per_K, - y_s=self.y_s, - y_p=self.y_p, + return ( + self.r_dc20_ohm_m + * (1.0 + self.alpha_R_per_K * (temperature_C - 20.0)) + * (1.0 + self.y_s + self.y_p) ) def total_heat_W_m( @@ -570,13 +572,19 @@ def thermal_network( *, n_cores: int | None = None, conductor_material: str | None = None, - y_s: float = 0.0, - y_p: float = 0.0, - lambda1: float = 0.0, + y_s: float | None = None, + y_p: float | None = None, + lambda1: float | None = None, T4_external_Km_W: float | None = None, ambient_C: float | None = None, n_per_layer: int = 4, lambda2: float = 0.0, + conductor_resistance_20C_ohm_m: float | None = None, + k_s: float | None = None, + k_p: float | None = None, + include_dielectric_loss: bool | None = None, + rating_temperature_C: float = 90.0, + rating_current_A: float | None = None, ) -> ThermalNetwork: """Build the transient thermal network of a cable definition. @@ -584,6 +592,14 @@ def thermal_network( ``n_per_layer`` sub-annuli per conduction annulus (the steady state does not depend on it). See the module notes for the construction. Without ``conductor_material`` the material of the cable's conductor layer is used. + + The loss terms not given are computed as in ``compute_thermal`` and held + constant: ``y_s`` and ``y_p`` at ``rating_temperature_C`` (the conductor + temperature of ``compute_thermal``, default 90 degC), and ``lambda1`` with + the screen at the IEC sheath temperature for ``rating_current_A`` + ([IEC60287-1-1] 5.3.1), or at ``rating_temperature_C`` without a current + (recorded). With the same values the steady state equals + ``compute_thermal``. """ conductor_material, conductor_note = conductor_material_of( cable, conductor_material @@ -607,15 +623,29 @@ def thermal_network( raise CableInputError("n_per_layer must be a positive integer") if not (math.isfinite(conductor_area_m2) and conductor_area_m2 > 0): raise CableInputError("conductor_area_m2 must be positive") - for name, value in ( + for name, opt in ( ("y_s", y_s), ("y_p", y_p), ("lambda1", lambda1), ("lambda2", lambda2), + ("conductor_resistance_20C_ohm_m", conductor_resistance_20C_ohm_m), + ("k_s", k_s), + ("k_p", k_p), + ("rating_current_A", rating_current_A), ): - _check_finite(value, name) - if value < 0: + if opt is None: + continue + _check_finite(opt, name) + if opt < 0: raise CableInputError(f"{name} must be non-negative") + for name, opt in ( + ("conductor_resistance_20C_ohm_m", conductor_resistance_20C_ohm_m), + ("k_s", k_s), + ("k_p", k_p), + ): + if opt is not None and opt <= 0: + raise CableInputError(f"{name} must be positive") + _check_temperature(rating_temperature_C, "rating_temperature_C") geo = _ladder_geometry(cable, n_cores) n = geo.n if n < 1: @@ -631,8 +661,11 @@ def thermal_network( gap_end: dict[int, float] = {} per_core: list[bool] = [geo.path[0].per_core] conductance: list[float] = [] + # Per-core material per metre of cable is C_LL times the straight-core + # amount ([IEC60287-1-1] Annex A). + core_lay = geo.lay_factor if geo.multi_core else 1.0 capacitance: list[float] = [ - _rho_cp(conductor_material, "conductor") * conductor_area_m2 * n + _rho_cp(conductor_material, "conductor") * conductor_area_m2 * n * core_lay ] # Heat capacity of the loaded cores (conductors and per-core annuli). core_capacity = capacitance[0] @@ -659,7 +692,7 @@ def thermal_network( conductance.append( mult * 2.0 * math.pi * lyr.lambda_W_mK / math.log(r_b / r_a) ) - half = 0.5 * mult * rho_cp * area + half = 0.5 * mult * rho_cp * area * (core_lay if annulus.per_core else 1.0) capacitance[start] += half capacitance.append(half) if annulus.per_core: @@ -753,8 +786,63 @@ def interpolation(r: float) -> list[tuple[int, float]]: names.append(layer.name) columns.append(column) - rho = get_property(conductor_material, "rho_ohm_m") - alpha_r = get_property(conductor_material, "alpha_R_per_K") + try: + get_property(conductor_material, "rho_ohm_m") + get_property(conductor_material, "alpha_R_per_K") + except CableLookupError as exc: + raise CableInputError( + f"conductor material {conductor_material!r} needs rho_ohm_m and " + f"alpha_R_per_K: {exc}" + ) from None + cond = _conductor_losses( + cable, + conductor_area_m2, + conductor_material, + rating_temperature_C, + y_s=y_s, + y_p=y_p, + r20_ohm_m=conductor_resistance_20C_ohm_m, + k_s=k_s, + k_p=k_p, + ) + r_ac_rated = ( + cond.r20_ohm_m + * (1.0 + cond.alpha_R_per_K * (rating_temperature_C - 20.0)) + * (1.0 + cond.y_s + cond.y_p) + ) + w_d, w_d_note = _cable_dielectric_loss( + cable, lay_factor=cond.lay_factor, include=include_dielectric_loss + ) + loss_notes = [*cond.notes, *([w_d_note] if w_d_note else [])] + if lambda1 is None: + if rating_current_A is None: + t_sheath = rating_temperature_C + sheath_basis = ( + f"screen at {rating_temperature_C:g} degC (no rating current " + "given; pass rating_current_A for the IEC sheath temperature)" + ) + else: + t1_core = sum( + thermal_resistance( + a.layer.r_inner_m, a.layer.r_outer_m, a.layer.lambda_W_mK + ) + for a, inner in zip(geo.path, geo.in_t1, strict=True) + if inner + ) + w_c_rated = float(rating_current_A) ** 2 * r_ac_rated + t_sheath = rating_temperature_C - (w_c_rated + 0.5 * w_d) * t1_core + sheath_basis = "" + lambda1, lambda1_note = _sheath_loss_factor( + cable, + geo, + r_ac_ohm_m=r_ac_rated, + sheath_temperature_C=t_sheath, + lay_factor=cond.lay_factor, + ) + if lambda1_note: + loss_notes.append( + lambda1_note + (f"; {sheath_basis}" if sheath_basis else "") + ) armour_columns = [ columns[names.index(layer.name)] for layer in cable.helical_layers @@ -767,10 +855,9 @@ def interpolation(r: float) -> list[tuple[int, float]]: armour_source += column / float(column.sum()) / len(armour_columns) limitations = [ "IEC 60287 ladder as a lumped RC chain; external T4 has no heat capacity", - "sheath eddy loss lambda1'' not included ([IEC60287-1-1] full text not " - "held); lambda1 and the armour loss factor lambda2 as supplied", - "three-core geometric factor [IEC60287-2-1] not applied " - "(filler as equal-filler-area annulus)", + "armour loss factor lambda2 as supplied ([IEC60287-1-1] 5.4 not " + "computed); loss terms held at their rated values", + *loss_notes, *geo.geometry_notes, *notes, conductor_note, @@ -783,7 +870,8 @@ def interpolation(r: float) -> list[tuple[int, float]]: prov = Provenance( method="transient IEC 60287 ladder (lumped radial RC network, TR-BDF2)", citations=( - "[IEC60287-1-1] 1.4.1.1 Eq.1, 2.1", + "[IEC60287-1-1] 4.2.1 Formula (1), 5.1 to 5.3, Annex A", + "[IEC60228] Table 4", "[IEC60287-2-1]", "[NeherMcGrath1957] Eqs.1-2", "[Poradowski2025] Eq.2", @@ -802,13 +890,13 @@ def interpolation(r: float) -> list[tuple[int, float]]: external_resistance_Km_W=float(t4), sheath_node=sheath_node, n_conductors=n, - r_dc20_ohm_m=rho / conductor_area_m2, - alpha_R_per_K=alpha_r, - y_s=float(y_s), - y_p=float(y_p), + r_dc20_ohm_m=cond.r20_ohm_m, + alpha_R_per_K=cond.alpha_R_per_K, + y_s=cond.y_s, + y_p=cond.y_p, conductor_material=conductor_material, conductor_area_m2=float(conductor_area_m2), - dielectric_loss_W_m=_cable_dielectric_loss(cable), + dielectric_loss_W_m=w_d, lambda1=float(lambda1), ambient_C=float(t_amb), layer_weights=np.column_stack(columns), @@ -818,3 +906,7 @@ def interpolation(r: float) -> list[tuple[int, float]]: armour_source=armour_source, passive_cores=max(passive, 0), ) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/mechanics/wire_stress.py b/src/cablexsec/mechanics/wire_stress.py index dec9f74..080092d 100644 --- a/src/cablexsec/mechanics/wire_stress.py +++ b/src/cablexsec/mechanics/wire_stress.py @@ -38,7 +38,8 @@ with ``eps_w = sigma_f / E_w`` the bending-induced axial strain the wire carries (:func:`slip_state_normal_curvature`). A stuck wire with the full -plane-section strain ``eps_w = r_h cos^2(a) p_n`` takes ``cos^4(a) p_n``; +plane-section strain ``eps_w = r_h cos^2(a) p_n`` takes ``cos^4(a) p_n`` +(the prescribed normal curvature of the stuck helix, [Saevik2011] Eq. 50); with the shear-lag stick coefficient ``xi`` (``k_f = xi E_w cos^2 a``) it takes ``cos^2(a) cos(2a) + xi sin^2(a) cos^2(a)``; a wire sliding freely along its helix (``sigma_f = 0``) takes ``cos^2(a) cos(2a)``; a wire in diff --git a/src/cablexsec/plotting/cross_section.py b/src/cablexsec/plotting/cross_section.py index 20f84ae..5350665 100644 --- a/src/cablexsec/plotting/cross_section.py +++ b/src/cablexsec/plotting/cross_section.py @@ -15,6 +15,7 @@ CylindricalShellLayer, HelicalLayer, ) +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.plotting.style import ( COLORS, FIGSIZE, @@ -231,3 +232,7 @@ def _component_label(component: str) -> str: "sigma_vm_Pa": "Axial/contact indicator [MPa]", } return names.get(component, component) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/plotting/dashboard.py b/src/cablexsec/plotting/dashboard.py index 7ee5e55..4743817 100644 --- a/src/cablexsec/plotting/dashboard.py +++ b/src/cablexsec/plotting/dashboard.py @@ -25,6 +25,7 @@ from pathlib import Path from typing import TYPE_CHECKING, Any +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.plotting.style import COLORS if TYPE_CHECKING: @@ -306,3 +307,6 @@ def build_dashboard( """ + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/plotting/thermal.py b/src/cablexsec/plotting/thermal.py index 4d14838..57fe830 100644 --- a/src/cablexsec/plotting/thermal.py +++ b/src/cablexsec/plotting/thermal.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.plotting.style import ( COLORS, FIGSIZE, @@ -100,3 +101,7 @@ def plot_temperature_gradient( ) annotate_provenance(ax, result.provenance, loc="upper left", max_items=2) return ax + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/preflight.py b/src/cablexsec/preflight.py index a79e5b2..94b598b 100644 --- a/src/cablexsec/preflight.py +++ b/src/cablexsec/preflight.py @@ -20,6 +20,7 @@ import numpy as np from cablexsec.cables.schema import CableData, CylindricalOffsetLayer +from cablexsec.cables.schema import scope_entry_points as _scope_entry_points from cablexsec.clamping import clamping_state from cablexsec.exceptions import CableSchemaError from cablexsec.io.series import LoadCaseSeries @@ -333,3 +334,7 @@ def preflight(project: Project) -> PreflightReport: ) issues.extend(preflight_request(model.definition, request, series)) return PreflightReport(tuple(issues)) + + +# Public entry points read the cable's own materials when called directly. +_scope_entry_points(globals(), __all__) diff --git a/src/cablexsec/project.py b/src/cablexsec/project.py index 6cc83e3..b311bcb 100644 --- a/src/cablexsec/project.py +++ b/src/cablexsec/project.py @@ -123,11 +123,15 @@ class ThermalSettings(_Settings): #: ``None``: the material of the cable's conductor layer. conductor_material: str | None = None conductor_temp_C: float = 90.0 - y_s: float = Field(default=0.0, ge=0) - y_p: float = Field(default=0.0, ge=0) - lambda1: float = Field(default=0.0, ge=0) + #: ``None``: computed from the cable (IEC 60287-1-1, see ``compute_thermal``). + y_s: float | None = Field(default=None, ge=0) + y_p: float | None = Field(default=None, ge=0) + lambda1: float | None = Field(default=None, ge=0) T4_external_Km_W: float | None = Field(default=None, ge=0) ambient_C: float | None = None + lambda2: float = Field(default=0.0, ge=0) + conductor_resistance_20C_ohm_m: float | None = Field(default=None, gt=0) + include_dielectric_loss: bool | None = None class CapacitySettings(_Settings): diff --git a/tests/conftest.py b/tests/conftest.py index de9dbbf..7dba4a5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,14 +23,16 @@ if _WORKER: _RUN = os.environ.get("PYTEST_XDIST_TESTRUNUID", "run") _ROOT = os.environ.get("NUMBA_CACHE_DIR") or tempfile.gettempdir() - _NUMBA_CACHE = Path(_ROOT) / f"cablexsec-numba-{_RUN}-{_WORKER}" + # Short: numba's cache file names repeat the source path, and a long folder + # name overflows the 260-character path limit of Windows. + _NUMBA_CACHE = Path(_ROOT) / f"cxnb-{_RUN[:8]}-{_WORKER}" os.environ["NUMBA_CACHE_DIR"] = str(_NUMBA_CACHE) # The sea-state batch workers keep persistent numba caches in the user cache # directory; the tests give them a folder of this process, removed at the end. _BATCH_CACHE: Path | None = None if "CABLEXSEC_BATCH_CACHE_DIR" not in os.environ: - _BATCH_CACHE = Path(tempfile.gettempdir()) / f"cablexsec-batch-{os.getpid()}" + _BATCH_CACHE = Path(tempfile.gettempdir()) / f"cxbt-{os.getpid()}" os.environ["CABLEXSEC_BATCH_CACHE_DIR"] = str(_BATCH_CACHE) _SCRIPTS = Path(__file__).resolve().parents[1] / "validation" / "scripts" diff --git a/tests/data/histories/synthetic_riflex.asc b/tests/data/histories/synthetic_columns.asc similarity index 99% rename from tests/data/histories/synthetic_riflex.asc rename to tests/data/histories/synthetic_columns.asc index cd59a3d..ec92b69 100644 --- a/tests/data/histories/synthetic_riflex.asc +++ b/tests/data/histories/synthetic_columns.asc @@ -1,4 +1,4 @@ -# Synthetic RIFLEX-style ASCII record for the CableXSec tests; not from a RIFLEX run. +# Synthetic whitespace-column ASCII record for the CableXSec tests. # columns: time [s], curvature x [1/m], tension [N], curvature y [1/m] 0 0 68115.3467 0.008 0.25 0.00519460298 69676.8813 0.00787846202 diff --git a/tests/data/tb880/case2_30kv.yaml b/tests/data/tb880/case2_30kv.yaml new file mode 100644 index 0000000..81e00fd --- /dev/null +++ b/tests/data/tb880/case2_30kv.yaml @@ -0,0 +1,163 @@ +# SPDX-License-Identifier: Apache-2.0 +# CIGRE TB 880 (2022) Case study 2: 3x630 mm2 Cu/XLPE/PB/SCPE/PPY/SWA/PPY +# 18/30 (36) kV submarine array cable, for the thermal rating check only +# (validation rows TB880-C2-*). Dimensions from the datasheet of Fig. 29 and +# Tables 6-1 to 6-17; thermal resistivities as TB 880 uses them (Tables 6-11, +# 6-13, 6-15). No mechanical properties: not for stress or fatigue analysis. +--- +cable: + name: "CIGRE TB 880 Case study 2, 3x630 mm2 18/30 kV submarine array cable" + description: "Thermal-rating verification case; layer stack of TB 880 Fig. 29" + source_document: "CIGRE TB 880 (2022) Section 6, Fig. 29, Tables 6-1 to 6-17" + voltage_kV: 30 +materials: + tb880_sc_tape: + description: Semiconducting tape over the conductor (TB 880 Table 6-11, 6 K m/W) + polymer: true + lambda_W_mK: {value: 0.16666666666666666, source: "CIGRE TB 880 Table 6-11 (rho 6 K m/W)"} + tb880_semicon: + description: Extruded semiconducting screens and the SC PE sheath (2.5 K m/W) + polymer: true + lambda_W_mK: {value: 0.4, source: "CIGRE TB 880 Tables 6-11 and 6-13 (rho 2.5 K m/W)"} + tb880_xlpe: + description: XLPE insulation (3.5 K m/W) + polymer: true + lambda_W_mK: {value: 0.2857142857142857, source: "IEC 60287-2-1:2023 Table 1; CIGRE TB 880 Table 6-11"} + tb880_water_blocking_tape: + description: Semiconducting water-blocking tape (12 K m/W) + polymer: true + lambda_W_mK: {value: 0.08333333333333333, source: "CIGRE TB 880 Table 6-11 (rho 12 K m/W)"} + tb880_pp_yarn: + description: Profile fillers, binder, PP yarn bedding and serving (6 K m/W) + polymer: true + lambda_W_mK: {value: 0.16666666666666666, source: "CIGRE TB 880 Tables 6-13 and 6-15 (rho 6 K m/W)"} + tb880_swa: + description: Galvanised steel armour wires (magnetic) + lambda_W_mK: {value: 50.0, source: "standard steel"} + rho_ohm_m: {value: 13.8e-8, source: "CIGRE TB 880 Table 6-9; IEC 60287-1-1:2023 Table 1"} + alpha_R_per_K: {value: 4.5e-3, source: "CIGRE TB 880 Table 6-9; IEC 60287-1-1:2023 Table 1"} + relative_permeability: {value: 400.0, source: "IEC 60287-1-1:2023 5.4.3.1 d), steel wires"} +core_lay: + pitch_m: 2.152 + lay_direction: right_hand + source: "CIGRE TB 880 Table 6-1 (lay length of core stranding 2152 mm); hand not given" +layers: + - name: cu_conductor + layer_type: cylindrical_offset + material: copper_stranded + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.0 + r_outer_m: 0.014161046158239446 # area-equivalent 630 mm2 + conductor_area_mm2: 630.0 + d_conductor_m: 0.030 + construction: aligned_solid_equivalent + notes: >- + Round compacted class 2, 630 mm2, diameter 30 mm (IEC d_c). R0 0.0283 + ohm/km per cable (datasheet; IEC 60228:2023 Table 4). Core offset from + the diameter over the assembled cores, 134.9 mm: (134.9 - 62.1)/2, the + value c = 36.4 mm of TB 880 step 6.6 (Guidance Point 33). + source: "CIGRE TB 880 Fig. 29 items 1 and 9, Tables 6-3, 6-9, 6-11" + - name: conductor_sc_tape + layer_type: cylindrical_offset + material: tb880_sc_tape + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.014161046158239446 + r_outer_m: 0.01525 + structural: false + notes: "Over the conductor diameter 30 mm to 30.5 mm; the ladder starts it at d_c" + source: "CIGRE TB 880 Fig. 29 item 2, Table 6-11" + - name: conductor_screen + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.01525 + r_outer_m: 0.01625 + structural: false + source: "CIGRE TB 880 Fig. 29 item 3, Table 6-11 (32.5 mm)" + - name: xlpe_insulation + layer_type: cylindrical_offset + material: tb880_xlpe + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.01625 + r_outer_m: 0.02425 + electrical: + permittivity_relative: 2.5 + loss_factor_tan_delta: 0.004 + insulation_type: xlpe + notes: "tan delta 40e-4 as TB 880 Table 6-5 uses it" + source: "CIGRE TB 880 Fig. 29 item 4, Tables 6-5 and 6-11 (48.5 mm)" + - name: insulation_screen + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.02425 + r_outer_m: 0.02515 + structural: false + source: "CIGRE TB 880 Fig. 29 item 5, Table 6-11 (50.3 mm)" + - name: water_blocking_tape + layer_type: cylindrical_offset + material: tb880_water_blocking_tape + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.02515 + r_outer_m: 0.02625 + structural: false + source: "CIGRE TB 880 Fig. 29 item 6, Table 6-11 (52.5 mm)" + - name: lead_sheath + layer_type: cylindrical_offset + material: lead_sheath + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.02625 + r_outer_m: 0.02855 + notes: "Lead alloy, 2.3 mm, mean diameter 54.8 mm" + source: "CIGRE TB 880 Fig. 29 item 7, Tables 6-7 and 6-13 (57.1 mm)" + - name: scpe_sheath + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0364 + r_inner_m: 0.02855 + r_outer_m: 0.03105 + structural: false + source: "CIGRE TB 880 Fig. 29 item 8, Table 6-13 (62.1 mm)" + - name: profile_fillers + layer_type: cylindrical + material: tb880_pp_yarn + r_inner_m: 0.0 + r_outer_m: 0.06745 + structural: false + source: "CIGRE TB 880 Fig. 29 item 9 (134.9 mm after cabling), Table 6-13" + - name: binder_and_bedding + layer_type: cylindrical + material: tb880_pp_yarn + r_inner_m: 0.06745 + r_outer_m: 0.06865 + structural: false + notes: "Binding tape (135.3 mm) and PP yarn bedding (137.3 mm), one resistivity" + source: "CIGRE TB 880 Fig. 29 items 10 and 11, Table 6-13" + - name: armour + layer_type: helical + material: tb880_swa + n_wires: 71 + d_wire_m: 0.006 + r_helix_m: 0.07165 + lay_angle_deg: 14.1559 + lay_direction: left_hand + notes: "71 x 6.0 mm galvanised steel wires, mean diameter 143.3 mm, lay 1785 mm (atan(pi 143.3 / 1785)); hand not given" + source: "CIGRE TB 880 Fig. 29 item 12, Table 6-9" + - name: serving + layer_type: cylindrical + material: tb880_pp_yarn + construction: serving + r_inner_m: 0.07465 + r_outer_m: 0.07765 + structural: false + source: "CIGRE TB 880 Fig. 29 item 13, Table 6-15 (3 mm over 149.3 mm; OD 155.3 mm)" +aggregate_properties: + OD_mm: 155.3 diff --git a/tests/data/tb880/case8_220kv.yaml b/tests/data/tb880/case8_220kv.yaml new file mode 100644 index 0000000..d424b69 --- /dev/null +++ b/tests/data/tb880/case8_220kv.yaml @@ -0,0 +1,161 @@ +# SPDX-License-Identifier: Apache-2.0 +# CIGRE TB 880 (2022) Case study 8: 3x1000 mm2 220 kV three-core submarine +# export cable with a lead sheath and stainless steel wire armour, for the +# thermal rating check only (validation rows TB880-C8-*). Dimensions from the +# datasheet of Fig. 40 and Tables 12-1 to 12-15; thermal resistivities as TB +# 880 uses them (Tables 12-9, 12-11, 12-13). No mechanical properties: not +# for stress or fatigue analysis. +--- +cable: + name: "CIGRE TB 880 Case study 8, 3x1000 mm2 220 kV submarine export cable" + description: "Thermal-rating verification case; layer stack of TB 880 Fig. 40" + source_document: "CIGRE TB 880 (2022) Section 12, Fig. 40, Tables 12-1 to 12-15" + voltage_kV: 220 +materials: + tb880_sc_tape: + description: Semiconducting conductor tape (6 K m/W) + polymer: true + lambda_W_mK: {value: 0.16666666666666666, source: "CIGRE TB 880 Table 12-9 (rho 6 K m/W)"} + tb880_semicon: + description: Extruded semiconducting screens and the SC PE sheath (2.5 K m/W) + polymer: true + lambda_W_mK: {value: 0.4, source: "CIGRE TB 880 Tables 12-9 and 12-11 (rho 2.5 K m/W)"} + tb880_xlpe: + description: XLPE insulation (3.5 K m/W) + polymer: true + lambda_W_mK: {value: 0.2857142857142857, source: "IEC 60287-2-1:2023 Table 1; CIGRE TB 880 Table 12-9"} + tb880_water_blocking_tape: + description: Swelling tape under the lead sheath (12 K m/W) + polymer: true + lambda_W_mK: {value: 0.08333333333333333, source: "CIGRE TB 880 Table 12-9 (rho 12 K m/W)"} + tb880_filler: + description: PE fillers with voids, binder and bedding tapes, PP yarn serving (6 K m/W) + polymer: true + lambda_W_mK: {value: 0.16666666666666666, source: "CIGRE TB 880 Table 12-11 note 2 and Table 12-13 (rho 6 K m/W)"} + tb880_stainless_armour: + description: Stainless steel armour wires (non-magnetic) + lambda_W_mK: {value: 16.0, source: "standard austenitic stainless steel"} + relative_permeability: {value: 1.0, source: "non-magnetic armour, CIGRE TB 880 Guidance Point 26"} +core_lay: + pitch_m: 2.75 + lay_direction: left_hand + source: "CIGRE TB 880 Fig. 40 (assembling, length of lay 2750 mm, left) and Table 12-1" +layers: + - name: cu_conductor + layer_type: cylindrical_offset + material: copper_stranded + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.0 + r_outer_m: 0.01784124116152771 # area-equivalent 1000 mm2 + conductor_area_mm2: 1000.0 + d_conductor_m: 0.0386 + construction: aligned_solid_equivalent + notes: >- + Round compacted, 1000 mm2, diameter 38.6 mm (IEC d_c). TB 880 takes the + datasheet R0 0.0176 ohm/km per metre of core and multiplies the AC + resistance by the lay-up factor (Guidance Point 23). Core offset from the + diameter over the assembled cores, 226 mm: (226 - 104.6)/2. + source: "CIGRE TB 880 Fig. 40, Tables 12-1, 12-3, 12-9, 12-11" + - name: conductor_sc_tape + layer_type: cylindrical_offset + material: tb880_sc_tape + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.01784124116152771 + r_outer_m: 0.0195 + structural: false + notes: "Over the conductor diameter 38.6 mm to 39.0 mm; the ladder starts it at d_c" + source: "CIGRE TB 880 Fig. 40 (conductor tape 0.2 mm), Table 12-9" + - name: conductor_screen + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.0195 + r_outer_m: 0.021 + structural: false + source: "CIGRE TB 880 Fig. 40, Table 12-9 (42.0 mm)" + - name: xlpe_insulation + layer_type: cylindrical_offset + material: tb880_xlpe + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.021 + r_outer_m: 0.044 + electrical: + permittivity_relative: 2.5 + loss_factor_tan_delta: 0.001 + insulation_type: xlpe + source: "CIGRE TB 880 Fig. 40, Tables 12-5 and 12-9 (88.0 mm)" + - name: insulation_screen + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.044 + r_outer_m: 0.0454 + structural: false + source: "CIGRE TB 880 Fig. 40, Table 12-9 (90.8 mm)" + - name: water_blocking_tape + layer_type: cylindrical_offset + material: tb880_water_blocking_tape + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.0454 + r_outer_m: 0.0461 + structural: false + source: "CIGRE TB 880 Fig. 40 (swelling tape 0.7 mm), Table 12-9 (92.2 mm)" + - name: lead_sheath + layer_type: cylindrical_offset + material: lead_sheath + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.0461 + r_outer_m: 0.0497 + notes: "Lead alloy, 3.6 mm, mean diameter 95.8 mm" + source: "CIGRE TB 880 Fig. 40, Tables 12-7 and 12-11 (99.4 mm)" + - name: scpe_sheath + layer_type: cylindrical_offset + material: tb880_semicon + n_cores: 3 + r_offset_m: 0.0607 + r_inner_m: 0.0497 + r_outer_m: 0.0523 + structural: false + source: "CIGRE TB 880 Fig. 40, Table 12-11 (104.6 mm)" + - name: fillers + layer_type: cylindrical + material: tb880_filler + r_inner_m: 0.0 + r_outer_m: 0.113 + structural: false + source: "CIGRE TB 880 Fig. 40 (assembling diameter 226 mm), Table 12-11" + - name: binder_and_bedding + layer_type: cylindrical + material: tb880_filler + r_inner_m: 0.113 + r_outer_m: 0.1135 + structural: false + notes: "Core binder 0.3 mm and armour bedding 0.2 mm (inner diameter of the armour 227 mm)" + source: "CIGRE TB 880 Fig. 40, Table 12-11" + - name: armour + layer_type: helical + material: tb880_stainless_armour + n_wires: 133 + d_wire_m: 0.005 + r_helix_m: 0.116 + lay_angle_deg: 14.1083 + lay_direction: right_hand + notes: "133 x 5.0 mm stainless steel wires over 227 mm to 237 mm, lay 2900 mm right (atan(pi 232 / 2900))" + source: "CIGRE TB 880 Fig. 40, Table 12-13" + - name: serving + layer_type: cylindrical + material: tb880_filler + construction: serving + r_inner_m: 0.1185 + r_outer_m: 0.1225 + structural: false + source: "CIGRE TB 880 Fig. 40 (outer cover 2 x 2 mm), Table 12-13 (245 mm)" +aggregate_properties: + OD_mm: 245.0 diff --git a/tests/test_api.py b/tests/test_api.py index 9a2c9de..53f4285 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -29,7 +29,7 @@ def _menard() -> cx.CableData: def _tb880() -> cx.CableData: - return cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + return cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) # --------------------------------------------------------------------------- # diff --git a/tests/test_armour_loss.py b/tests/test_armour_loss.py index fdc8e7d..4b84238 100644 --- a/tests/test_armour_loss.py +++ b/tests/test_armour_loss.py @@ -75,7 +75,13 @@ def test_network_with_armour_loss_matches_the_ladder(t66: CableData) -> None: ref = compute_thermal( t66, RATED_A, 630e-6, conductor_material=MATERIAL, lambda2=lambda2 ) - net = thermal_network(t66, 630e-6, conductor_material=MATERIAL, lambda2=lambda2) + net = thermal_network( + t66, + 630e-6, + conductor_material=MATERIAL, + lambda2=lambda2, + rating_current_A=RATED_A, + ) temps = net.steady_state(RATED_A, resistance_temperature_C=90.0) # The 0.10 mm copper tape screens make the chain stiff: agreement to # its conditioning. @@ -86,7 +92,9 @@ def test_network_with_armour_loss_matches_the_ladder(t66: CableData) -> None: assert heat_out == pytest.approx(heat_in, rel=1e-8) assert heat_in == pytest.approx(ref.P_total_W_m, rel=1e-12) w_c = net.conductor_loss_W_m(RATED_A, 90.0) - assert heat_in == pytest.approx(net.n_conductors * w_c * (1.0 + lambda2)) + assert heat_in == pytest.approx( + net.n_conductors * w_c * (1.0 + net.lambda1 + lambda2) + ) # The armour heat raises the armour against the lossless case. plain = thermal_network(t66, 630e-6, conductor_material=MATERIAL) cold = plain.layer_temperatures( diff --git a/tests/test_block_programme.py b/tests/test_block_programme.py new file mode 100644 index 0000000..50c89a6 --- /dev/null +++ b/tests/test_block_programme.py @@ -0,0 +1,189 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Block programmes of full-scale fatigue tests against CIGRE TB 862 Appendix D. + +Tables D.1 to D.3 of TB 862 (2022) as regression cases. The damage per cycle +is printed to three significant figures, so the block damages are compared +within 0.5 % (2.57e-9 +- 0.005e-9 alone is +-0.19 %). Table D.3 prints 6.05e-4 +for blocks 3A and 3B; 61 116 cycles at 9.90e-10 give 6.05e-5, which its total +4.68e-4 uses. +""" + +from __future__ import annotations + +import pytest + +import cablexsec as cx +from cablexsec.exceptions import CableInputError + +pytestmark = pytest.mark.analytical_sanity + +_PRINTED = 5e-3 # printed to three significant figures + +_D1_CYCLES = (973_459, 370_043, 122_231, 25_979, 6_623, 1_815, 253) +_D1_CURVATURE = (0.029, 0.057, 0.085, 0.11, 0.135, 0.16, 0.207) +_D1_DPC = (3.27e-12, 9.59e-11, 7.08e-10, 2.57e-9, 7.16e-9, 1.67e-8, 6.05e-8) +_D1_DAMAGE = (3.18e-6, 3.55e-5, 8.65e-5, 6.67e-5, 4.74e-5, 3.03e-5, 1.53e-5) + +_D2_CYCLES = (*_D1_CYCLES, 61) +_D2_TENSION_KN = (80,) * 7 + (110,) +_D2_CURVATURE = (*_D1_CURVATURE, 0.341) +_D2_DPC = (4.58e-12, 1.34e-10, 9.90e-10, 3.60e-9, 1.00e-8, 2.34e-8, 8.49e-8, 1.11e-6) +_D2_DAMAGE = (4.46e-6, 4.97e-5, 1.21e-4, 9.34e-5, 6.63e-5, 4.25e-5, 2.15e-5, 6.76e-5) + +# Table D.3, with 6.05e-5 for blocks 3A and 3B (printed 6.05e-4). +_D3_HALF = (486_730, 185_022, 61_116, 12_990, 3_312, 908, 127, 31) +_D3_DAMAGE = (2.23e-6, 2.48e-5, 6.05e-5, 4.68e-5, 3.31e-5, 2.12e-5, 1.08e-5, 3.44e-5) + + +def _d1() -> cx.BlockProgramme: + return cx.BlockProgramme( + tuple( + cx.FatigueTestBlock(n, 10e3, k, d, label=str(i + 1)) + for i, (n, k, d) in enumerate( + zip(_D1_CYCLES, _D1_CURVATURE, _D1_DPC, strict=True) + ) + ) + ) + + +def _d2() -> cx.BlockProgramme: + return cx.BlockProgramme( + tuple( + cx.FatigueTestBlock(n, t * 1e3, k, d, label=str(i + 1)) + for i, (n, t, k, d) in enumerate( + zip(_D2_CYCLES, _D2_TENSION_KN, _D2_CURVATURE, _D2_DPC, strict=True) + ) + ) + ) + + +def test_table_d1() -> None: + prog = _d1() + assert prog.total_cycles == 1_500_403 + for block, printed in zip(prog.blocks, _D1_DAMAGE, strict=True): + assert block.damage == pytest.approx(printed, rel=_PRINTED) + assert prog.total_damage == pytest.approx(2.85e-4, rel=_PRINTED) + assert sum(prog.damage_shares) == pytest.approx(1.0, rel=1e-14) + assert prog.accumulated_damage[-1] == pytest.approx(prog.total_damage, rel=1e-14) + # The test damage equals the 25-year damage at the sag bend (TB 862 D.2). + (damage,) = prog.check(25 * 1.14e-5) + assert damage.given == pytest.approx(damage.required, rel=_PRINTED) + + +def test_table_d2() -> None: + prog = _d2() + assert prog.total_cycles == 1_500_464 + for block, printed in zip(prog.blocks, _D2_DAMAGE, strict=True): + assert block.damage == pytest.approx(printed, rel=_PRINTED) + assert prog.total_damage == pytest.approx(4.67e-4, rel=_PRINTED) + # Larger than the damage at both hot spots: 2.85e-4 at 62.5 m (and about + # half of it at 1.75 m), TB 862 D.3. + damage, tension = prog.check(2.85e-4, service_mean_tension_N=10e3) + assert damage.passed and tension.passed + # TB 862 D.3 gives the mean tension at 1.75 m as 82 kN but runs the blocks + # at 80 kN: the strict Table 6-4 check does not pass on its own example. + _, tension_175 = prog.check(2.85e-4, service_mean_tension_N=82e3) + assert not tension_175.passed and tension_175.given == 80e3 + + +def test_table_d3_sequence() -> None: + prog = _d2() + seq = prog.test_sequence(rounding="up") + labels = [b.label for b in seq] + assert labels == [f"{i}A" for i in range(1, 9)] + [f"{i}B" for i in range(1, 9)] + assert [b.n_cycles for b in seq] == list(_D3_HALF) * 2 + for block, printed in zip(seq, _D3_DAMAGE * 2, strict=True): + assert block.damage == pytest.approx(printed, rel=_PRINTED) + assert seq[2].damage == pytest.approx(6.05e-5, rel=_PRINTED) # not 6.05e-4 + assert cx.BlockProgramme(seq).total_cycles == 1_500_472 + assert cx.BlockProgramme(seq).total_damage == pytest.approx(4.68e-4, rel=_PRINTED) + + +def test_exact_split_keeps_the_cycles() -> None: + prog = _d2() + seq = prog.test_sequence() + assert cx.BlockProgramme(seq).total_cycles == prog.total_cycles + assert [b.n_cycles for b in seq[:8]] == [ + 486_730, + 185_022, + 61_116, + 12_990, + 3_312, + 908, + 127, + 31, + ] + assert [b.n_cycles for b in seq[8:]] == [ + 486_729, + 185_021, + 61_115, + 12_989, + 3_311, + 907, + 126, + 30, + ] + # No part above half its block, except one cycle of an odd block. + for part in seq: + whole = prog.blocks[int(part.label[:-1]) - 1].n_cycles + assert part.n_cycles <= whole // 2 + whole % 2 + + +def test_three_parts_and_small_blocks() -> None: + prog = cx.BlockProgramme( + ( + cx.FatigueTestBlock(1000, 1e3, 0.1, 1e-9, label="big"), + cx.FatigueTestBlock(2, 1e3, 0.3, 1e-6, label="tiny"), + cx.FatigueTestBlock(2, 1e3, 0.4, 2e-6, label="tiny2"), + ) + ) + seq = prog.test_sequence(max_fraction=0.34) + # Every two parts of the big block have another block between them, + # which a plain round order (bigA, tiny, tiny2, bigB, bigC) misses. + assert [b.label for b in seq] == ["bigA", "tiny", "bigB", "tiny2", "bigC"] + assert [b.n_cycles for b in seq] == [334, 2, 333, 2, 333] + + +def test_switching_impossible_raises() -> None: + # Three parts of the big block need two other parts between them. + prog = cx.BlockProgramme( + ( + cx.FatigueTestBlock(1000, 1e3, 0.1, 1e-9, label="big"), + cx.FatigueTestBlock(2, 1e3, 0.3, 1e-6, label="tiny"), + ) + ) + with pytest.raises(CableInputError, match="6.3.4.3"): + prog.test_sequence(max_fraction=0.34) + single = cx.BlockProgramme((cx.FatigueTestBlock(1000, 1e3, 0.1, 1e-9),)) + with pytest.raises(CableInputError, match="6.3.4.3"): + single.test_sequence() + + +def test_float_cycle_count_is_stored_as_int() -> None: + block = cx.FatigueTestBlock(10.0, 1e3, 0.1, 1e-9) # type: ignore[arg-type] + assert isinstance(block.n_cycles, int) and block.n_cycles == 10 + + +def test_to_rig_blocks() -> None: + rig = _d2().to_rig_blocks(simulated_cycles=3) + assert rig[0].amplitude == pytest.approx(0.0145) + assert rig[-1].tension_N == 110e3 and rig[-1].n_cycles == 3 + protocol = cx.RigProtocol.blocks(rig, quantity="curvature", temperature_C=20.0) + assert len(protocol.block_times_s) == 8 + + +def test_input_errors() -> None: + with pytest.raises(CableInputError): + cx.BlockProgramme(()) + with pytest.raises(CableInputError): + cx.FatigueTestBlock(0, 1e3, 0.1, 1e-9) + with pytest.raises(CableInputError): + cx.FatigueTestBlock(10, 1e3, -0.1, 1e-9) + with pytest.raises(CableInputError): + _d1().test_sequence(max_fraction=0.0) + with pytest.raises(CableInputError): + _d1().test_sequence(rounding="down") # type: ignore[arg-type] + big_one = cx.BlockProgramme((cx.FatigueTestBlock(1, 1e3, 0.1, 1e-9),)) + with pytest.raises(CableInputError, match="fewer than the 2 parts"): + big_one.test_sequence() diff --git a/tests/test_bonded_face.py b/tests/test_bonded_face.py index 793b9f0..e588514 100644 --- a/tests/test_bonded_face.py +++ b/tests/test_bonded_face.py @@ -3,8 +3,8 @@ """Bonded outer armour face (``bonded_face="outer"``, gap G8). Closed form of the inner-loaded annulus compliance; the default unchanged bit -for bit; the stuck section unchanged and the full-slip tangent raised by the -bond's share; the friction cap from the inner face only; energy balance; and +for bit; the stuck section unchanged on a rigid support (raised by the bond in +parallel otherwise) and the full-slip tangent raised by the bond's share; the friction cap from the inner face only; energy balance; and refusal on the routes that would miss the bond's share of the wire force. """ @@ -127,6 +127,8 @@ def test_bond_terms_keep_the_stuck_layer_and_add_the_bond_share() -> None: def test_law_stuck_stiffness_unchanged_and_full_slip_tangent_raised() -> None: + """Zeidan's outer armour has a rigid support (xi = 1), so the stuck + stiffness is unchanged; the bond adds only the full-slip share.""" base, bonded = _bond(_zeidan(), face="none"), _zeidan() law0, law1 = _law(base), _law(bonded) with bonded.material_scope(): diff --git a/tests/test_cable_materials.py b/tests/test_cable_materials.py index 0b1ad22..f9f6322 100644 --- a/tests/test_cable_materials.py +++ b/tests/test_cable_materials.py @@ -14,6 +14,7 @@ import threading from collections.abc import Callable from concurrent.futures import ThreadPoolExecutor +from importlib.resources import files from pathlib import Path from typing import Any @@ -339,6 +340,47 @@ def test_every_public_function_that_takes_a_cable_uses_its_materials() -> None: assert cx.compute_stiffness is api.compute_stiffness +def test_every_public_function_of_every_module_uses_the_cable_materials() -> None: + """Direct calls of submodule functions read the cable's materials too + (xi_for_layer gave the library's 1.000 for Zeidan's inner armour).""" + import importlib + import inspect + import pkgutil + + import cablexsec + + missing = [] + for info in pkgutil.walk_packages(cablexsec.__path__, "cablexsec."): + if info.name.startswith("cablexsec.app"): + continue # the desktop application is not part of the package + module = importlib.import_module(info.name) + for name in getattr(module, "__all__", ()): + value = getattr(module, name, None) + if ( + inspect.isfunction(value) + and takes_cable(value) + and not getattr(value, "__uses_cable_materials__", False) + ): + missing.append(f"{info.name}.{name}") + assert not missing, missing + + +def test_a_direct_call_reads_the_cable_materials_and_nests_cheaply() -> None: + from cablexsec.mechanics.stiffness import xi_for_layer + + cable = cx.load_cable( + files("cablexsec.cables") / "zeidan2025.yaml", geometry_override=None + ) + direct = xi_for_layer(cable, "inner_armour") + with cable.material_scope(): + scoped = xi_for_layer(cable, "inner_armour") + # another scope inside: the nested call must not reuse the outer one + with library.material_scope(None): + library_only = xi_for_layer(cable, "inner_armour") + assert direct == scoped == pytest.approx(0.8321, abs=1e-4) + assert library_only == direct + + def test_cable_scope_decorator() -> None: seen: list[object] = [] diff --git a/tests/test_cabledyn_outputs.py b/tests/test_cabledyn_outputs.py index 66876f4..02cbc1d 100644 --- a/tests/test_cabledyn_outputs.py +++ b/tests/test_cabledyn_outputs.py @@ -713,7 +713,7 @@ def test_components_route_takes_cabledyns_curvature_components(): np.testing.assert_array_equal(history.rotation_curvature_x_1_m, -curv_y) np.testing.assert_array_equal(history.rotation_curvature_y_1_m, curv_x) gx, gy = history.strain_gradient() - np.testing.assert_array_equal(gx, -curv_x) + np.testing.assert_allclose(gx, -curv_x, rtol=1e-15, atol=0.0) assert history.twist_rad is not None with pytest.raises(CableSchemaError, match="already carry the hang-off"): read_cabledyn_sections( diff --git a/tests/test_capacity_envelope.py b/tests/test_capacity_envelope.py index 5f9c2e2..00386d9 100644 --- a/tests/test_capacity_envelope.py +++ b/tests/test_capacity_envelope.py @@ -56,7 +56,7 @@ def menard() -> CableData: @pytest.fixture(scope="module") def cigre() -> CableData: - return bundled("cigre_tb880_220kv") + return bundled("poradowski2025_220kv") # -- capacity envelopes ------------------------------------------------------------ diff --git a/tests/test_clamping_state.py b/tests/test_clamping_state.py index cceca98..0209ba8 100644 --- a/tests/test_clamping_state.py +++ b/tests/test_clamping_state.py @@ -425,5 +425,7 @@ def test_packaged_cables_carry_their_documented_clamping(): assert t66.is_zero and t66.is_declared assert {x.basis for x in t66.layers} == {"not_published"} assert "not published" in t66.warning_message() - tb = clamping_state(load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None)) + tb = clamping_state( + load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) + ) assert not tb.is_declared and "declares no" in tb.warning_message() diff --git a/tests/test_component_limits.py b/tests/test_component_limits.py index f25a5ac..cbe58b9 100644 --- a/tests/test_component_limits.py +++ b/tests/test_component_limits.py @@ -294,7 +294,7 @@ def test_iea_envelope_against_the_published_mbl_and_mbr(iea) -> None: def test_governing_switches_on_the_bundled_cables() -> None: grid = np.array([0.0, 50e3]) - tb880 = bundled("cigre_tb880_220kv") + tb880 = bundled("poradowski2025_220kv") cover = cx.build_capacity_envelope(tb880, grid, utilisation_factor=1.0, mu=0.2) # The generic stranded copper takes its published 0.2 % proof stress: the # conductor now limits the cable before the outer cover reaches 7.7 % at diff --git a/tests/test_core_coupled_slip.py b/tests/test_core_coupled_slip.py index 59e1c25..a623cbf 100644 --- a/tests/test_core_coupled_slip.py +++ b/tests/test_core_coupled_slip.py @@ -704,3 +704,24 @@ def test_coupled_full_slip_curvature_inputs(cable): reference = wire_slip_stress_bounds(absolute.population, 0.2) np.testing.assert_array_equal(upper, reference[0]) np.testing.assert_array_equal(lower, reference[1]) + + +@pytest.mark.independent_method +def test_skeie2023_table1_is_the_saturation_of_the_peak_friction_stress() -> None: + """Skeie, Sødahl, Pettersen and Verde (2023) Table 1 (row SK23-T1): with + the contact load per metre of helix the onset is their Eq. 16; the largest + friction stress stops growing at pi/3 times the onset (their "full slip", + 1.049 in their model, 1.053 in their FE), the slip zones coalesce at + 2 pi / (3 sqrt 3).""" + from check_core_friction import SKEIE2023, skeie2023_table1 + + sk = skeie2023_table1() + assert sk["onset_helix_1_mm"] == pytest.approx(sk["eq16_1_mm"], rel=1e-12) + assert sk["onset_helix_1_mm"] == pytest.approx( + SKEIE2023["table1_onset_1_mm"], rel=0.01 + ) + assert sk["first_slip_ratio"] == pytest.approx(1.0, abs=2e-4) + assert sk["saturation_ratio"] == pytest.approx(math.pi / 3, abs=2e-4) + assert sk["coalescence_ratio"] == pytest.approx(FULL_SLIP_RATIO, abs=2e-4) + table = SKEIE2023["table1_full_model_1_mm"] / SKEIE2023["table1_onset_1_mm"] + assert sk["saturation_ratio"] == pytest.approx(table, rel=0.005) diff --git a/tests/test_exported_load_conventions.py b/tests/test_exported_load_conventions.py index 212faaa..a827511 100644 --- a/tests/test_exported_load_conventions.py +++ b/tests/test_exported_load_conventions.py @@ -161,9 +161,9 @@ def test_invalid_unit_multiplier_is_rejected(tmp_path, name, value): def test_positional_reader_preserves_declared_force_and_curvature_convention(tmp_path): - path = tmp_path / "riflex.asc" + path = tmp_path / "columns.asc" path.write_text("0 0.01 -0.02 20000\n1 -0.03 0.04 60000\n") - result = cx.read_riflex_ascii( + result = cx.read_ascii_columns( path, curvature_y_col=3, tension_col=4, diff --git a/tests/test_fix_dielectric_loss.py b/tests/test_fix_dielectric_loss.py index 6a2ad35..9468fdd 100644 --- a/tests/test_fix_dielectric_loss.py +++ b/tests/test_fix_dielectric_loss.py @@ -13,7 +13,7 @@ import cablexsec as cx from cablexsec.exceptions import CableInputError -SOURCE = Path(cx.__file__).parent / "cables" / "cigre_tb880_220kv.yaml" +SOURCE = Path(cx.__file__).parent / "cables" / "poradowski2025_220kv.yaml" CURRENT_A, AREA_M2 = 908.45, 1200e-6 @@ -49,3 +49,28 @@ def test_dielectric_loss_raises_the_conductor_temperature(tmp_path: Path) -> Non without_loss = cx.compute_thermal(below, CURRENT_A, AREA_M2) assert math.isfinite(with_loss.T_conductor_C) assert with_loss.T_conductor_C > without_loss.T_conductor_C + + +def test_missing_data_is_judged_by_the_declared_insulation_type( + tmp_path: Path, +) -> None: + # 2026-11-28 (PR #66 review): an EPR insulation without its loss tangent + # at 132 kV (U0 76.2 kV) is above the 63.5 kV of EPR, below the 127 kV + # of XLPE: an error, not a silent zero. + data = yaml.safe_load(SOURCE.read_text(encoding="utf-8")) + data["cable"]["voltage_kV"] = 132.0 + for layer in data["layers"]: + elec = layer.get("electrical") + if elec is not None: + elec.pop("loss_factor_tan_delta", None) + elec["insulation_type"] = "epr" + target = tmp_path / "epr.yaml" + target.write_text(yaml.safe_dump(data, sort_keys=False), encoding="utf-8") + cable = cx.load_cable(target, geometry_override=None) + with pytest.raises(CableInputError, match="63.5 kV of epr"): + cx.compute_thermal(cable, CURRENT_A, AREA_M2) + # Below the EPR threshold the loss does not count and none is needed. + data["cable"]["voltage_kV"] = 66.0 + target.write_text(yaml.safe_dump(data, sort_keys=False), encoding="utf-8") + low = cx.load_cable(target, geometry_override=None) + assert math.isfinite(cx.compute_thermal(low, CURRENT_A, AREA_M2).T_conductor_C) diff --git a/tests/test_fix_thermal_roles.py b/tests/test_fix_thermal_roles.py index daf7714..a81e5fa 100644 --- a/tests/test_fix_thermal_roles.py +++ b/tests/test_fix_thermal_roles.py @@ -245,7 +245,7 @@ def _raise_dielectric_without_sheath() -> None: [ "inter_array_single_core_yaml_path", "inter_array_three_core_yaml_path", - "cigre_tb880_yaml_path", + "poradowski2025_220kv_yaml_path", "iea_task49_66kv_yaml_path", ], ) diff --git a/tests/test_fretting_slip_cycles.py b/tests/test_fretting_slip_cycles.py index c99ca79..b626438 100644 --- a/tests/test_fretting_slip_cycles.py +++ b/tests/test_fretting_slip_cycles.py @@ -233,7 +233,7 @@ def test_packaged_cables_declare_only_registered_curve_names(): """Every S-N or contact-life name declared by a bundled cable is registered.""" known = set(SN_CURVES) | set(BLOCKED_SN_CURVES) | set(SWT_LIFE) paths = [ - cx.cigre_tb880_yaml_path(), + cx.poradowski2025_220kv_yaml_path(), cx.menard2023_yaml_path(), cx.inter_array_single_core_yaml_path(), cx.inter_array_three_core_yaml_path(), diff --git a/tests/test_io.py b/tests/test_io.py index ecc908f..f9a7548 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -7,7 +7,7 @@ * a zero-curvature, constant-amplitude tension history makes σ_total = σ_A only (σ_B = σ_f = 0), so the per-wire Miner damage is closed-form; the CSV/ - RIFLEX reader path must recover it to < 1e-10; + ASCII-column reader path must recover it to < 1e-10; * write → read round-trips the canonical exchange CSV bit-for-bit, and the fatigue result through the reader equals the in-memory result exactly; * the JONSWAP generator is deterministic and hits its target RMS. @@ -151,14 +151,14 @@ def test_temperature_history_maps_into_fatigue_sigma_T() -> None: assert any("temperature_C mapped" in x for x in hot_res.provenance.limitations) -def test_riflex_reader_positional_columns(tmp_path) -> None: - """RIFLEX positional ASCII reads back the exact arrays (with comments).""" - asc = tmp_path / "riflex.asc" - rows = ["# RIFLEX dynamic results", "# time curv_x tension"] +def test_ascii_columns_reader_positional_columns(tmp_path) -> None: + """Positional whitespace-column ASCII reads back the exact arrays (with comments).""" + asc = tmp_path / "columns.asc" + rows = ["# dynamic results", "# time curv_x tension"] rows += [f"{i * 0.5} {0.01 * math.sin(i * 0.2)} {1.2e5}" for i in range(40)] asc.write_text("\n".join(rows), encoding="utf-8") - ser = cx.read_riflex_ascii(asc, time_col=1, curvature_x_col=2, tension_col=3) + ser = cx.read_ascii_columns(asc, time_col=1, curvature_x_col=2, tension_col=3) assert ser.n_steps == 40 assert ser.tension_N[0] == pytest.approx(1.2e5) assert ser.curvature_x_1_m[10] == pytest.approx(0.01 * math.sin(10 * 0.2)) diff --git a/tests/test_load_sharing.py b/tests/test_load_sharing.py index b4e4e09..bf6ebc6 100644 --- a/tests/test_load_sharing.py +++ b/tests/test_load_sharing.py @@ -288,12 +288,14 @@ def test_sweep_with_flooded_pressure_and_temperature( def test_sweep_falls_back_to_fixed_radius() -> None: - cable = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + cable = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) with warnings.catch_warnings(): warnings.simplefilter("ignore") held = compute_load_sharing(cable, 40e3, 3) free = compute_load_sharing(cable, 40e3, 3, twist="free") - assert held.route == "fixed_radius" and "radial bundle law" in held.route_reason + # The solved route refuses the corrugated sheath (and the stranded + # conductor, which it would meet next). + assert held.route == "fixed_radius" and "corrugated shells" in held.route_reason expected = load_sharing(cable, 40e3) assert set(held.force_N) == {n for n, v in expected.items() if v} for name, force in held.force_N.items(): diff --git a/tests/test_plotting_cross_section.py b/tests/test_plotting_cross_section.py index 91b65fe..0a19a08 100644 --- a/tests/test_plotting_cross_section.py +++ b/tests/test_plotting_cross_section.py @@ -34,7 +34,7 @@ def _outer_radius(layer: object) -> float: @pytest.mark.parametrize( - "path", [cx.cigre_tb880_yaml_path(), cx.export_three_core_yaml_path()] + "path", [cx.poradowski2025_220kv_yaml_path(), cx.export_three_core_yaml_path()] ) def test_axes_span_the_outermost_layer_with_shells_and_offsets(path): cable = cx.load_cable(path, geometry_override=None) diff --git a/tests/test_plotting_figures.py b/tests/test_plotting_figures.py index 4e94ab7..60f1667 100644 --- a/tests/test_plotting_figures.py +++ b/tests/test_plotting_figures.py @@ -44,7 +44,7 @@ def results(): k = 0.02 * np.sin(np.linspace(0, 40 * np.pi, 300)) fat = cx.compute_fatigue(cab, k, np.zeros_like(k)) ser = cx.jonswap_series(duration_s=120, dt_s=0.5, rms_curvature_1_m=0.01, seed=3) - tb = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + tb = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) th = cx.compute_thermal(tb, 908.45, 1200e-6, n_cores=1) return { "cab": cab, diff --git a/tests/test_property_edge.py b/tests/test_property_edge.py index c283a02..e6a01f9 100644 --- a/tests/test_property_edge.py +++ b/tests/test_property_edge.py @@ -32,7 +32,7 @@ _TOPOLOGIES = { "single_core_inter_array": (cx.inter_array_single_core_yaml_path, 1), "three_core_inter_array": (cx.inter_array_three_core_yaml_path, 3), - "single_core_export": (cx.cigre_tb880_yaml_path, 1), + "single_core_export": (cx.poradowski2025_220kv_yaml_path, 1), "three_core_export": (cx.export_three_core_yaml_path, 3), } diff --git a/tests/test_reader_release_boundaries.py b/tests/test_reader_release_boundaries.py index e2ace50..ab729eb 100644 --- a/tests/test_reader_release_boundaries.py +++ b/tests/test_reader_release_boundaries.py @@ -9,7 +9,7 @@ @pytest.mark.parametrize( - "reader", [cx.read_time_history_csv, cx.read_riflex_ascii, cx.read_series_csv] + "reader", [cx.read_time_history_csv, cx.read_ascii_columns, cx.read_series_csv] ) def test_missing_exchange_file(reader, tmp_path): with pytest.raises(FileNotFoundError): @@ -57,11 +57,11 @@ def test_bad_time_history_csv(tmp_path, body, kwargs, match): ("0 0 1\n", {"curvature_convention": "bad"}, "declare"), ], ) -def test_bad_riflex_ascii(tmp_path, body, kwargs, match): +def test_bad_ascii_columns(tmp_path, body, kwargs, match): path = tmp_path / "export.txt" path.write_text(body) with pytest.raises(cx.CableSchemaError, match=match): - cx.read_riflex_ascii(path, **kwargs) + cx.read_ascii_columns(path, **kwargs) _HEADER = "Time,x curvature,y curvature,Wall tension" @@ -119,14 +119,14 @@ def test_series_csv_accepts_byte_order_mark_and_refuses_repeated_columns(tmp_pat ({"tension_col": 2.0}, "1-based integers"), ], ) -def test_riflex_column_indices_checked_before_reading(tmp_path, kwargs, match): - path = tmp_path / "riflex.asc" +def test_ascii_column_indices_checked_before_reading(tmp_path, kwargs, match): + path = tmp_path / "columns.asc" path.write_text("0.0 0.01 5e4\n0.1 0.02 5e4\n") with pytest.raises(cx.CableSchemaError, match=match): - cx.read_riflex_ascii(path, **kwargs) + cx.read_ascii_columns(path, **kwargs) -def test_riflex_reads_windows_1252_comment(tmp_path): - path = tmp_path / "riflex.asc" +def test_ascii_columns_reads_windows_1252_comment(tmp_path): + path = tmp_path / "columns.asc" path.write_bytes("# angle (\xb0)\n0.0 0.01 5e4\n0.1 0.02 5e4\n".encode("cp1252")) - np.testing.assert_allclose(cx.read_riflex_ascii(path).time_s, [0.0, 0.1]) + np.testing.assert_allclose(cx.read_ascii_columns(path).time_s, [0.0, 0.1]) diff --git a/tests/test_release_physical_errors.py b/tests/test_release_physical_errors.py index f7a3f40..afd6c0f 100644 --- a/tests/test_release_physical_errors.py +++ b/tests/test_release_physical_errors.py @@ -169,7 +169,7 @@ def test_shell_fatigue_requires_a_shell(cable): def test_shell_fatigue_requires_a_curve(): - cable = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + cable = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) with pytest.raises(cx.CableSchemaError, match="no bulk_sn"): cx.compute_shell_fatigue(cable, "cu_metallic_sheath", np.zeros(2)) diff --git a/tests/test_rig_tb862.py b/tests/test_rig_tb862.py new file mode 100644 index 0000000..d4c640c --- /dev/null +++ b/tests/test_rig_tb862.py @@ -0,0 +1,283 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Rig protocols with a tension phase lag and constant-tension blocks; TB 862 lengths.""" + +from __future__ import annotations + +import dataclasses +import math +import warnings + +import numpy as np +import pytest +import yaml + +import cablexsec as cx +from cablexsec.analysis.rig_test import ( + GaugeLocation, + RigBlock, + RigProtocol, + RigSetup, + component_pitches, + simulate_rig_test, + tb862_specimen_checks, +) +from cablexsec.exceptions import CableInputError + +pytestmark = pytest.mark.analytical_sanity + + +@pytest.fixture(scope="module") +def menard(): + return cx.load_cable(cx.menard2023_yaml_path(), geometry_override=None) + + +@pytest.fixture(scope="module") +def t66(): + return cx.load_cable(cx.iea_task49_66kv_yaml_path(), geometry_override=None) + + +def test_tension_lags_the_bending_by_the_given_phase() -> None: + base = dict( # noqa: C408 + tension_N=5e4, + curvature_amplitude_1_m=0.05, + tension_amplitude_N=1e4, + n_cycles=2, + samples_per_cycle=40, + ) + in_phase = RigProtocol.cyclic(**base) + default = RigProtocol.cyclic(**base, tension_phase_lag_deg=0.0) + assert np.array_equal(in_phase.tension_N, default.tension_N) + lagged = RigProtocol.cyclic(**base, tension_phase_lag_deg=90.0) + assert np.array_equal(lagged.time_s, in_phase.time_s) + assert np.array_equal(lagged.curvature_1_m, in_phase.curvature_1_m) + cyc = lagged.time_s > 10.0 + phase = 2.0 * math.pi * (lagged.time_s[cyc] - 10.0) / 10.0 + assert lagged.tension_N[cyc] == pytest.approx(5e4 - 1e4 * np.cos(phase), abs=1e-6) + # At the bending peak the tension is at its mean (quadrature). + peak = int(np.argmax(lagged.curvature_1_m)) + assert lagged.tension_N[peak] == pytest.approx(5e4, abs=1e-6) + # The ramp ends at the tension of the first cycle (no jump). + n_ramp = int(np.sum(lagged.time_s <= 10.0)) + assert lagged.tension_N[n_ramp - 1] == pytest.approx(5e4 - 1e4, abs=1e-6) + antiphase = RigProtocol.cyclic(**base, tension_phase_lag_deg=180.0) + assert antiphase.tension_N[cyc] == pytest.approx( + 5e4 - 1e4 * np.sin(phase), abs=1e-6 + ) + with pytest.raises(ValueError): + RigProtocol.cyclic(**base, tension_phase_lag_deg=math.nan) + + +def test_constant_tension_blocks_hold_their_tension() -> None: + blocks = [RigBlock(80e3, 0.029, 2), RigBlock(110e3, 0.085, 1, mean=0.01)] + p = RigProtocol.blocks(blocks, samples_per_cycle=20, period_s=10.0) + assert len(p.block_times_s) == 2 + (s1, e1), (s2, e2) = p.block_times_s + assert (s1, e1) == pytest.approx((10.0, 30.0)) + assert (s2, e2) == pytest.approx((40.0, 50.0)) + for (start, end), block in zip(p.block_times_s, blocks, strict=True): + inside = (p.time_s > start) & (p.time_s <= end) + assert np.all(p.tension_N[inside] == block.tension_N) + bend = p.curvature_1_m[inside] + assert bend.max() == pytest.approx(block.mean + block.amplitude, rel=1e-12) + assert bend.min() == pytest.approx(block.mean - block.amplitude, rel=1e-12) + # Linear transitions between the blocks, from zero before the first. + between = (p.time_s > e1) & (p.time_s < s2) + tau = (p.time_s[between] - e1) / 10.0 + assert p.tension_N[between] == pytest.approx(80e3 + 30e3 * tau, rel=1e-12) + assert p.curvature_1_m[between] == pytest.approx(0.01 * tau, abs=1e-15) + assert p.tension_N[0] == 0.0 and p.curvature_1_m[0] == 0.0 + # Ranges over the last cycle of the last block. + assert p.retain_from_s == pytest.approx(e2 - 10.0) + rotation = RigProtocol.blocks(blocks, quantity="end_rotation") + assert rotation.curvature_1_m is None and rotation.end_rotation_rad is not None + + +@pytest.mark.parametrize( + ("kwargs", "match"), + [ + ({"blocks": []}, "at least one"), + ({"blocks": [RigBlock(1e4, 0.01)], "quantity": "strain"}, "quantity"), + ({"blocks": [RigBlock(1e4, 0.01)], "transition_s": 0.0}, "transition"), + ({"blocks": [(1e4, 0.01, 1)]}, "RigBlock instances"), + ], +) +def test_block_programme_inputs_are_checked(kwargs, match) -> None: + with pytest.raises(CableInputError, match=match): + RigProtocol.blocks(**kwargs) + + +@pytest.mark.parametrize( + ("kwargs", "match"), + [ + ({"tension_N": -1.0, "amplitude": 0.01}, "non-negative"), + ({"tension_N": 1.0, "amplitude": 0.01, "n_cycles": 0}, "at least 1"), + ({"tension_N": 1.0, "amplitude": 0.01, "n_cycles": 1.5}, "integer"), + ({"tension_N": 1.0, "amplitude": math.inf}, "finite"), + ], +) +def test_rig_block_inputs_are_checked(kwargs, match) -> None: + with pytest.raises(ValueError, match=match): + RigBlock(**kwargs) + + +def test_block_times_must_lie_in_the_record() -> None: + p = RigProtocol.blocks([RigBlock(1e4, 0.01)]) + with pytest.raises(CableInputError, match="block_times_s"): + dataclasses.replace(p, block_times_s=((0.0, 1.0e6),)) + + +def test_block_programme_runs_through_the_rig_simulation(menard) -> None: + p = RigProtocol.blocks( + [RigBlock(4e4, 0.02), RigBlock(6e4, 0.03)], samples_per_cycle=16 + ) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + result = simulate_rig_test( + menard, + p, + RigSetup(free_length_m=1.5, clamp="none"), + gauges=[GaugeLocation("outer_armour", 90.0, 0.02)], + mu_factors=(), + ) + assert result.gauges[0].ranges["total"] > 0.0 + + +def test_component_pitches_of_the_66kv_template(t66) -> None: + pitches = component_pitches(t66) + outer = t66.get_layer("outer_armour") + expected = 2.0 * math.pi * outer.r_helix_m / math.tan(math.radians(10.0)) + assert pitches["outer_armour"] == pytest.approx(expected, rel=1e-12) + assert pitches["core lay"] == pytest.approx(1.4542, rel=1e-12) + assert set(pitches) >= {"inner_armour", "outer_armour", "core lay"} + + +def test_tb862_specimen_lengths(t66) -> None: + pitches = component_pitches(t66) + p_a = pitches["outer_armour"] + p_max = max(pitches.values()) + setup = RigSetup(free_length_m=p_max + 0.1, clamp_setback_m=p_a - 0.01) + loaded, ends = tb862_specimen_checks(t66, "fatigue_template", setup=setup) + assert loaded.clause == ends.clause == "6.3.2" + assert loaded.required_m == pytest.approx(p_max) and loaded.passed + assert ends.required_m == pytest.approx(p_a) and not ends.passed + assert not loaded.mandatory and not ends.mandatory + top, bottom = tb862_specimen_checks( + t66, "fatigue_bend_stiffener", top_distance_m=p_a, bottom_distance_m=0.5 * p_a + ) + assert top.mandatory and top.passed and not bottom.passed + (stiff,) = tb862_specimen_checks(t66, "bending_stiffness", sample_length_m=p_a) + assert stiff.clause == "6.4.2.2" and stiff.passed + (comp_bend,) = tb862_specimen_checks( + t66, "compression_bending", sample_length_m=1.9 * p_max + ) + assert comp_bend.required_m == pytest.approx(2.0 * p_max) and not comp_bend.passed + (comp,) = tb862_specimen_checks(t66, "compression", sample_length_m=p_max) + assert comp.clause == "6.6.1.2" and comp.mandatory and comp.passed + + +@pytest.mark.parametrize( + ("test", "kwargs", "match"), + [ + ("fatigue", {}, "test must be one of"), + ("fatigue_template", {}, "loaded_length_m"), + ("fatigue_bend_stiffener", {"top_distance_m": 1.0}, "bottom_distance_m"), + ("compression", {"sample_length_m": -1.0}, "non-negative"), + ], +) +def test_tb862_inputs_are_checked(t66, test, kwargs, match) -> None: + with pytest.raises(CableInputError, match=match): + tb862_specimen_checks(t66, test, **kwargs) + + +def _variant(tmp_path, source, edit): + data = yaml.safe_load(source.read_text(encoding="utf-8")) + edit(data) + target = tmp_path / "variant.yaml" + target.write_text(yaml.safe_dump(data, sort_keys=False), encoding="utf-8") + return cx.load_cable(target, geometry_override=None) + + +def _layer(data, name): + return next(x for x in data["layers"] if x["name"] == name) + + +def test_tape_windings_have_a_pitch(tmp_path) -> None: + # 2026-11-28 (PR #67 review): tape windings were left out of P_max. + source = cx.thies2016_yaml_path() + thies = cx.load_cable(source, geometry_override=None) + tape = thies.get_layer("cu_tape") + radius = 0.5 * (tape.r_inner_m + tape.r_outer_m) + expected = 2.0 * math.pi * radius / math.tan(math.radians(tape.tape.lay_angle_deg)) + assert component_pitches(thies)["cu_tape (tape)"] == pytest.approx(expected) + + # A tape laid at 1 deg has the longest pitch and governs the compression length. + def flat_tape(data): + _layer(data, "cu_tape")["tape"]["lay_angle_deg"] = 1.0 + + long_tape = _variant(tmp_path, source, flat_tape) + p_tape = component_pitches(long_tape)["cu_tape (tape)"] + assert p_tape > max( + v for k, v in component_pitches(long_tape).items() if k != "cu_tape (tape)" + ) + (comp,) = tb862_specimen_checks( + long_tape, "compression", sample_length_m=0.9 * p_tape + ) + assert "cu_tape (tape)" in comp.requirement + assert comp.required_m == pytest.approx(p_tape) + assert not comp.passed + + +def test_aggregate_strand_lay_has_a_pitch() -> None: + # 2026-11-28 (PR #67 review): a conductor given by one strand lay angle, + # without resolved strand_layers, was left out of P_max. + cable = cx.load_cable(cx.iea_task49_66kv_yaml_path(), geometry_override=None) + conductor = cable.get_layer("cu_conductor") + name = "cu_conductor (strands, at r_outer)" + assert not any(k.startswith("cu_conductor") for k in component_pitches(cable)) + + for angle in (1.0, -1.0): # the sign of the aggregate angle is no handedness + lay = conductor.model_copy(update={"strand_lay_angle_deg": angle}) + layers = tuple(lay if x.name == "cu_conductor" else x for x in cable.layers) + stranded = cable.model_copy(update={"layers": layers}) + pitches = component_pitches(stranded) + expected = 2.0 * math.pi * conductor.r_outer_m / math.tan(math.radians(1.0)) + assert pitches[name] == pytest.approx(expected) + assert pitches[name] == max(pitches.values()) + (comp,) = tb862_specimen_checks( + stranded, "compression", sample_length_m=0.9 * expected + ) + assert name in comp.requirement + assert not comp.passed + + # Without its outer radius the strand pitch is unknown: refused. + lay = conductor.model_copy(update={"strand_lay_angle_deg": 12.0, "r_outer_m": None}) + layers = tuple(lay if x.name == "cu_conductor" else x for x in cable.layers) + withheld = cable.model_copy(update={"layers": layers}) + with pytest.raises(CableInputError, match=r"cu_conductor \(strands\) is withheld"): + tb862_specimen_checks(withheld, "compression", sample_length_m=100.0) + + +def test_withheld_pitches_are_refused(tmp_path) -> None: + # 2026-11-28 (PR #67 review): a withheld core lay or armour pitch was + # skipped, so P_max or P_a could be too short and a check pass. + source = cx.iea_task49_66kv_yaml_path() + + def no_core_pitch(data): + data["core_lay"].pop("pitch_m") + + cable = _variant(tmp_path, source, no_core_pitch) + assert "core lay" not in component_pitches(cable) + for test in ("compression", "compression_bending"): + with pytest.raises(CableInputError, match="core lay is withheld"): + tb862_specimen_checks(cable, test, sample_length_m=100.0) + # The outer armour pitch is still known: the P_a checks run. + (stiff,) = tb862_specimen_checks(cable, "bending_stiffness", sample_length_m=100.0) + assert stiff.passed + + def no_armour_angle(data): + _layer(data, "outer_armour").pop("lay_angle_deg") + + cable = _variant(tmp_path, source, no_armour_angle) + with pytest.raises(CableInputError, match="outer_armour is withheld"): + tb862_specimen_checks(cable, "bending_stiffness", sample_length_m=100.0) diff --git a/tests/test_saevik2011_benchmark.py b/tests/test_saevik2011_benchmark.py index 335c3a8..4cdf8fc 100644 --- a/tests/test_saevik2011_benchmark.py +++ b/tests/test_saevik2011_benchmark.py @@ -140,6 +140,56 @@ def test_registered_targets_and_results_are_pinned(rows): assert gj.status == "FAIL" +def test_lukassen_records_are_complete_and_two_sided(): + # Lukassen (2019) Figs 2.7-2.11: both narrow sides at 3.1-3.5, LC 14 at + # +-8 deg, five legs after the first reversal on every panel. + rec = sv.measured_lukassen() + assert set(rec) == set(sv.LK_STATIONS) + for sides in rec.values(): + assert set(sides) == {"a", "b"} + for theta, _stress in sides.values(): + assert theta.min() == pytest.approx(-8.0, abs=0.1) + assert theta.max() == pytest.approx(8.0, abs=0.25) + assert len(sv._legs(theta, _stress)) == 5 + meas = sv.lukassen_measured_ranges() + # Gjosteen et al. (2027) plot side b: their ranges at 3.1 and 3.5. + assert meas["3.1"]["b"] == pytest.approx(186.6, rel=0.03) + assert meas["3.5"]["b"] == pytest.approx(77.5, rel=0.03) + for v in meas.values(): + assert v["axial"] <= v["larger"] + 1e-9 + + +def test_legs_split_a_record_at_its_reversals(): + theta = np.array([0.0, 4.0, 8.0, 4.0, -8.0, 0.0, 8.0]) + legs = sv._legs(theta, 2.0 * theta) + assert [list(t) for t, _s in legs] == [[8.0, 4.0, -8.0], [-8.0, 0.0, 8.0]] + + +@needs_numba +def test_quantity_rows_are_pinned(rows): + # Registered before the runs (doc/benchmarks.md, "Measured quantity and + # normaliser"); reported, not gated. + assert rows["SV11-LK"].value == ( + "axial measured 139/77/19/69/64 MPa; sectional 207/103/0/103/144 " + "(1.72; 1.51); corrected 356/318/219/108/44 (1.97; 2.84); larger side: " + "sectional 1.35; 0.94, corrected 1.54; 1.61" + ) + assert rows["SV11-SIDE"].value == ( + "larger side 272-334 MPa (0.08); side a 0.30; side b 0.33; axial " + "51-254 MPa (0.45); model static 271 MPa" + ) + assert rows["SV11-SUB"].value == ( + "(a) median R 1.89 (3 of 14), sectional 1.12 (12); (b) 2.22 (3), " + "sectional 1.21 (12); (c) 1.51, sectional 1.33" + ) + assert rows["SV11-NORM"].value == ( + "median R 2.06 (3 of 14), sectional 1.07 (13 of 14); reference static 271 MPa" + ) + for ident in ("SV11-LK", "SV11-SIDE", "SV11-SUB", "SV11-NORM"): + assert rows[ident].target == "stated, not gated" + assert rows[ident].status == "INFO" + + def test_rig_defaults_are_the_registered_rig(): rig = sv.sv11_rig() assert (rig.x_anchor_m, rig.free_length_m, rig.rigid_right_m) == ( diff --git a/tests/test_section_properties.py b/tests/test_section_properties.py index d10ca9d..314d90c 100644 --- a/tests/test_section_properties.py +++ b/tests/test_section_properties.py @@ -44,7 +44,7 @@ def single() -> cx.CableData: @pytest.fixture(scope="module") def cigre() -> cx.CableData: - return cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + return cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) def _spec(n: int = 36, mu: float = 0.2, pressure: float = 2.0e6) -> HelicalLayerSpec: @@ -376,7 +376,9 @@ def test_fixed_radius_route_when_the_solved_section_refuses( result = compute_section_properties(cigre, [SectionLoadCase("A", 40e3)]) case = result.cases[0] stiffness = cx.compute_stiffness(cigre) - assert case.route == "fixed_radius" and "radial bundle law" in case.route_reason + # The solved route refuses the corrugated sheath (and the stranded + # conductor, which it would meet next). + assert case.route == "fixed_radius" and "corrugated shells" in case.route_reason assert case.axial_stiffness_N == stiffness.ea_fixed_N assert ( case.torsional_stiffness_positive_Nm2 diff --git a/tests/test_section_stress.py b/tests/test_section_stress.py index ab1fda0..4d81be9 100644 --- a/tests/test_section_stress.py +++ b/tests/test_section_stress.py @@ -21,7 +21,7 @@ "inter_array_three_core_33kv", "iea_task49_66kv", "thies2016_30kv", - "cigre_tb880_220kv", + "poradowski2025_220kv", "saevik2011", ) diff --git a/tests/test_sectional_mechanics_inputs.py b/tests/test_sectional_mechanics_inputs.py index f9446da..c461cf2 100644 --- a/tests/test_sectional_mechanics_inputs.py +++ b/tests/test_sectional_mechanics_inputs.py @@ -198,7 +198,7 @@ def test_section_state_input_rules(pipe): # Axial rigidity # # --------------------------------------------------------------------------- # def test_metallic_rigidity_leaves_out_a_polymer_shell(): - cable = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + cable = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) shell = cable.get_layer("cu_metallic_sheath") plastic = cable.model_copy( update={ @@ -221,7 +221,7 @@ def test_metallic_rigidity_leaves_out_a_polymer_shell(): def test_a_layer_without_modulus_carries_no_axial_or_bending_load(): - cable = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + cable = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) target = next( layer for layer in cable.layers diff --git a/tests/test_template_66kv.py b/tests/test_template_66kv.py index 426768c..82e2da5 100644 --- a/tests/test_template_66kv.py +++ b/tests/test_template_66kv.py @@ -322,10 +322,14 @@ def test_thermal_rating_is_consistent_with_published_power(cable) -> None: conductor_area_m2=630e-6, conductor_material="copper_janocha2024", ) - # 125 MW (Table 13) is a 90 degC XLPE rating; the lumped ladder with the - # equal-filler-area annulus and the assumed seabed T4 lands close to it - # (95.4 degC: the semiconducting screens count with the insulation, and - # the stranding voids of the area-equivalent conductor add about 1 K). - assert 85.0 < th.T_conductor_C < 100.0 + # The IEC 60287-1-1 (2023) AC resistance at 90 degC rounds to the 0.04 + # ohm/km of [IEATask49] Table 13 for the 630 mm2 cable. + assert th.losses is not None + assert round(th.losses["R_ac_ohm_m"] * 1e3, 2) == 0.04 + # Table 13 states no installation for its 125 MW: under this template's + # assumed burial (T4 0.343 K m/W, 15 degC) the IEC ladder puts the + # conductor at 118.4 degC at 1093.5 A; its 90 degC rating is about 932 A. + assert th.T_conductor_C == pytest.approx(118.43, abs=0.05) limitations = " ".join(th.provenance.limitations) assert "equal-filler-area annulus" in limitations + assert "G-bar" in limitations diff --git a/tests/test_thermal.py b/tests/test_thermal.py index 374012e..e4f04d0 100644 --- a/tests/test_thermal.py +++ b/tests/test_thermal.py @@ -16,10 +16,14 @@ ConductionLayer, ac_resistance, compute_thermal, + conductor_resistance_20C, dielectric_loss, iec_conductor_temperature, + lay_length_factor, proximity_effect_factor, sheath_circulating_loss_factor, + sheath_eddy_loss_factor, + sheath_reactance, skin_effect_factor, solve_crank_nicolson, steady_state_profile, @@ -98,11 +102,129 @@ def test_ac_resistance_temperature_dependence() -> None: assert r90_skin == pytest.approx(r90 * 1.15, rel=1e-12) -def test_dielectric_loss_threshold_100kV() -> None: - """Dielectric loss is off below 100 kV (a 66 kV cable) and on above.""" - assert dielectric_loss(66.0, 2.5, 0.001, 0.015, 0.025) == 0.0 # 66 kV: off - w_d = dielectric_loss(220.0, 2.5, 0.001, 0.025, 0.045) # export: on +def test_dielectric_loss_threshold_follows_iec_5_2() -> None: + """[IEC60287-1-1] 5.2: counted from U0 = 127 kV for XLPE, 63.5 kV for EPR.""" + assert dielectric_loss(66.0, 2.5, 0.001, 0.015, 0.025) == 0.0 # U0 38 kV + assert dielectric_loss(132.0, 2.5, 0.001, 0.015, 0.025) == 0.0 # U0 76 kV + w_d = dielectric_loss(220.0, 2.5, 0.001, 0.025, 0.045) # U0 127.0 kV assert w_d > 0.0 + epr = dielectric_loss(132.0, 3.0, 0.005, 0.015, 0.025, insulation_type="epr") + assert epr > 0.0 + # Always (CIGRE TB 880 Guidance Point 7) and never. + on = dielectric_loss(66.0, 2.5, 0.001, 0.015, 0.025, include=True) + u0 = 66.0e3 / math.sqrt(3.0) + cap = 2.0 * math.pi * 8.854e-12 * 2.5 / math.log(0.025 / 0.015) + assert on == pytest.approx(2.0 * math.pi * 50.0 * cap * u0**2 * 0.001, rel=1e-14) + assert dielectric_loss(220.0, 2.5, 0.001, 0.025, 0.045, include=False) == 0.0 + # The capacitance of a laid-up core is C_LL times that of a straight one. + laid = dielectric_loss( + 66.0, 2.5, 0.001, 0.015, 0.025, include=True, lay_length_factor=1.02 + ) + assert laid == pytest.approx(1.02 * on, rel=1e-14) + with pytest.raises(ValueError, match="insulation_type"): + dielectric_loss(220.0, 2.5, 0.001, 0.025, 0.045, insulation_type="oil") + + +def test_skin_effect_factor_has_the_three_iec_ranges() -> None: + """[IEC60287-1-1] 5.1.3: the formula changes at x_s = 2.8 and 3.8.""" + f = 50.0 + + def r_for(xs: float) -> float: # R' giving x_s at k_s = 1 + return 8.0 * math.pi * f * 1.0e-7 / xs**2 + + for xs, expected in ( + (2.0, 2.0**4 / (192.0 + 0.8 * 2.0**4)), + (3.0, -0.136 - 0.0177 * 3.0 + 0.0563 * 9.0), + (4.5, 0.354 * 4.5 - 0.733), + ): + assert skin_effect_factor(r_for(xs), f) == pytest.approx(expected, rel=1e-12) + # The ranges join within the rounding of the published coefficients. + lo, hi = skin_effect_factor(r_for(2.8), f), skin_effect_factor(r_for(2.8001), f) + assert hi == pytest.approx(lo, abs=3e-3) + lo, hi = skin_effect_factor(r_for(3.8), f), skin_effect_factor(r_for(3.8001), f) + assert hi == pytest.approx(lo, abs=3e-3) + + +def test_iec60228_resistance_and_lay_up_factor() -> None: + """R0 from [IEC60228] Table 4; C_LL of [IEC60287-1-1] Annex A.""" + import cablexsec as cx # noqa: PLC0415 + + t66 = cx.load_cable(cx.iea_task49_66kv_yaml_path(), geometry_override=None) + c_ll, note = lay_length_factor(t66) + # Core diameter 70.40 mm, pitch 1.4542 m, C_fL 1.29 (three cores). + assert c_ll == pytest.approx( + math.sqrt(1.0 + (math.pi * 1.29 * 0.0704 / 1.4542) ** 2), rel=1e-12 + ) + assert c_ll == pytest.approx(1.0191, abs=1e-4) + assert "Annex A" in note + r20, basis = conductor_resistance_20C(t66, 630e-6, "copper_janocha2024") + assert r20 == pytest.approx(0.0283e-3, rel=1e-12) # per km of the cable + assert "Table 4" in basis + # Between two nominal sizes: linear interpolation (CIGRE TB 880, 2.5). + r_mid, basis = conductor_resistance_20C(t66, 700e-6, "copper_janocha2024") + expected = 0.0283 + (0.0221 - 0.0283) * (700.0 - 630.0) / (800.0 - 630.0) + assert r_mid == pytest.approx(expected * 1e-3, rel=1e-12) + assert "interpolated" in basis + # Not a standard material: rho/A times C_LL. + r_other, basis = conductor_resistance_20C( + t66, 630e-6, "lead_sheath", lay_factor=c_ll + ) + assert r_other == pytest.approx(21.4e-8 / 630e-6 * c_ll, rel=1e-12) + assert "rho/A" in basis + # A single-core cable has no lay-up. + single = cx.load_cable( + cx.inter_array_single_core_yaml_path(), geometry_override=None + ) + assert lay_length_factor(single) == (1.0, "") + + +def test_three_core_losses_are_computed_from_the_cable() -> None: + """y_s, y_p, lambda1 and R0 of the 66 kV template (IEC 60287-1-1 5.1, 5.3.11).""" + import cablexsec as cx # noqa: PLC0415 + + t66 = cx.load_cable(cx.iea_task49_66kv_yaml_path(), geometry_override=None) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res = compute_thermal(t66, 1093.0, 630e-6) + assert res.losses is not None + r_dc = 0.0283e-3 * (1.0 + 3.93e-3 * 70.0) + ys = skin_effect_factor(r_dc, 50.0) + s = math.sqrt(3.0) * 0.04081 # distance between conductor axes + yp = proximity_effect_factor(r_dc, 50.0, 0.02990, s) + assert res.losses["y_s"] == pytest.approx(ys, rel=1e-12) + assert res.losses["y_p"] == pytest.approx(yp, rel=1e-12) + r_ac = r_dc * (1.0 + ys + yp) + assert res.losses["R_ac_ohm_m"] == pytest.approx(r_ac, rel=1e-12) + # [IEATask49] Table 13 gives 0.04 ohm/km for the 630 mm2 cable. + assert round(r_ac * 1e3, 2) == 0.04 + assert res.losses["W_d_W_m"] == 0.0 # U0 = 38 kV < 127 kV + lam1 = res.losses["lambda1"] + assert 0.05 < lam1 < 0.15 + notes = " ".join(res.provenance.limitations) + assert "5.3.11" in notes and "factor 1.5" in notes + # A given value replaces the computed one. + given = compute_thermal(t66, 1093.0, 630e-6, y_s=0.0, y_p=0.0, lambda1=0.0) + assert given.losses["y_s"] == given.losses["y_p"] == given.losses["lambda1"] == 0.0 + # Non-magnetic armour: the trefoil formula (5.3.2), no factor 1.5. + import yaml # noqa: PLC0415 + + data = yaml.safe_load(cx.iea_task49_66kv_yaml_path().read_text(encoding="utf-8")) + data["materials"] = { + "stainless_armour": { + "E_Pa": {"value": 2.0e11, "source": "test"}, + "nu": {"value": 0.3, "source": "test"}, + "relative_permeability": {"value": 1.0, "source": "test"}, + } + } + for layer in data["layers"]: + if layer["layer_type"] == "helical": + layer["material"] = "stainless_armour" + stainless = cx.CableData.model_validate(data) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res_ss = compute_thermal(stainless, 1093.0, 630e-6) + assert "5.3.2" in " ".join(res_ss.provenance.limitations) + assert res_ss.losses["lambda1"] < lam1 def test_skin_and_proximity_factors_iec_hand_values() -> None: @@ -135,83 +257,90 @@ def test_iec_ladder_reduces_to_conduction_primitive() -> None: def _bm5_loss_chain() -> dict[str, float]: - """IEC 60287-1-1 loss chain for the Poradowski-Anders (2025) NOTE-1 cable. - - 220 kV 3-core (CIGRE TB 880), stranded Cu 1200 mm², copper corrugated - sheath. Geometry is from the public benchmark cable. + """IEC 60287-1-1 (2023) loss chain of the Poradowski-Anders (2025) NOTE-1 cable. + + 220 kV three-core cable, stranded Cu 1200 mm2, corrugated copper sheath + (Table 1 and footnote d), non-magnetic stainless armour (footnote c). + ``R0`` from [IEC60228] Table 4; ``lambda1'`` of the sheath from 5.3.2, + which CIGRE TB 880 Guidance Point 38 assigns to an SL cable under + non-magnetic armour (5.3.11, factor 1.5, is for magnetic armour); + ``lambda1''`` from 5.3.7.1 with the solid-bonding factor ``F`` of + 5.3.6, as TB 880 Guidance Points 6 and 31 keep it. """ f = 50.0 - rho20, alpha = 1.7241e-8, 3.93e-3 - r_dc = (rho20 / 1200e-6) * (1.0 + alpha * (90.0 - 20.0)) + r20, alpha = 0.0151e-3, 3.93e-3 # [IEC60228] Table 4, 1200 mm2 Cu + r_dc = r20 * (1.0 + alpha * (90.0 - 20.0)) ys = skin_effect_factor(r_dc, f) - yp = proximity_effect_factor(r_dc, f, 0.042, 0.13175) # d_c, trefoil spacing + yp = proximity_effect_factor(r_dc, f, 0.042, 0.13175) # d_c, touching cores r_ac = r_dc * (1.0 + ys + yp) w_c = 908.45**2 * r_ac - # Dielectric: U0 = 220/sqrt(3) kV, XLPE eps_r=2.5 tanδ=0.001 (IEC Table 3). + # Dielectric: U0 = 127.0 kV >= 127 kV, XLPE eps_r 2.5, tan 0.001 (Table 3). w_d = dielectric_loss(220.0, 2.5, 0.001, 0.0227, 0.0466, frequency_Hz=f) - # Sheath λ1' (circulating): Cu ring 111.95/113.95 mm, Fcor=1.3406, ~80 C. + # Sheath: Cu ring 111.95/113.95 mm, Fcor = 1.3406 (footnote d), ~80 degC. a_s = math.pi / 4 * (0.11395**2 - 0.11195**2) - r_s = rho20 * 1.3406 / a_s * (1.0 + alpha * (80.0 - 20.0)) + rho_s = 1.7241e-8 * (1.0 + alpha * (80.0 - 20.0)) + r_s = rho_s * 1.3406 / a_s d_s = 0.5 * (0.11195 + 0.11395) - x = 2.0 * (2.0 * math.pi * f) * 1e-7 * math.log(2.0 * 0.13175 / d_s) - lam1 = sheath_circulating_loss_factor(r_s, r_ac, x) - return {"W_c": w_c, "W_d": w_d, "lambda1": lam1} + x = sheath_reactance(0.13175, d_s, frequency_Hz=f) + lam1_c = sheath_circulating_loss_factor(r_s, r_ac, x) + lam1_e = sheath_eddy_loss_factor( + r_s, + r_ac, + sheath_mean_diameter_m=d_s, + sheath_outer_diameter_m=0.11395, + sheath_thickness_m=0.001, + sheath_resistivity_ohm_m=rho_s, + spacing_m=0.13175, + frequency_Hz=f, + solid_bonding_reactance_ohm_m=x, + ) + return {"W_c": w_c, "W_d": w_d, "lambda1": lam1_c, "lambda1_eddy": lam1_e} @pytest.mark.full_scale def test_BM5_poradowski_buried_reference_case() -> None: - """BM5: reproduce Poradowski-Anders (2025) Table 1 NOTE-1 buried 220 kV cable. + """BM5: Poradowski-Anders (2025) Table 1 NOTE-1 buried 220 kV cable. Stated network: T1=0.6579, T2=0.1121, T3=0.0357, T4=0.3211 K.m/W (T4 the - external soil/Robin resistance, taken verbatim); θ_amb=15 °C, n=3. - Reference: I=908.45 A → θc=89.62 °C (FEM) / 90 °C (IEC analytical ampacity). - - Active heat sources: conductor Joule (W_c, skin+proximity) and dielectric - (W_d, 220 kV > 100 kV) per conductor, plus the copper-sheath circulating - loss factor λ1. The eddy-current term λ1'' ([IEC60287-1-1] §2.3.6, not in - our reference set) is the one untabulated input; it is the documented - residual between the circulating-only result and 89.62 °C. + external soil/Robin resistance, taken verbatim); theta_amb = 15 degC, + n = 3. Reference: I = 908.45 A gives 89.62 degC (FEM) and 90 degC (the + source's IEC analytical ampacity). + + With ``R0`` from IEC 60228 and the circulating sheath loss of IEC 5.3.2 + (``lambda1'' = 0``, IEC) the ladder gives 85.8 degC; the earlier 84.4 degC + took ``R0 = rho/A``, 5 % low. Adding the eddy loss that CIGRE TB 880 + Guidance Points 6 and 31 keep (lambda1'' = 0.19) gives 90.9 degC. The + 1.5 factor of IEC 5.3.11 belongs to magnetic armour (TB 880 Guidance + Point 38) and would give 100 degC. """ t1, t2, t3, t4 = 0.6579, 0.1121, 0.0357, 0.3211 - t_amb, n, target = 15.0, 3, 89.62 + t_amb, n = 15.0, 3 losses = _bm5_loss_chain() w_c, w_d, lam1 = losses["W_c"], losses["W_d"], losses["lambda1"] - - # IEC circulating-current sheath factor is the dominant non-Joule term. - assert 1.0 < lam1 < 1.15 - - theta_circ = iec_conductor_temperature( - t1, - t2, - t3, - t4, - W_c=w_c, - W_d=w_d, - lambda1=lam1, - n_conductors=n, - T_ambient_C=t_amb, - ) - # Circulating-only is a lower bound; residual to 89.62 is the eddy term. - assert 83.0 < theta_circ < target - assert (target - theta_circ) < 6.0 - - # Network correctness: with the λ1 the paper's analytical ampacity implies, - # the ladder reproduces 89.62 °C exactly (closes the residual via λ1''). - rhs = target - t_amb - (w_c + 0.5 * w_d) * t1 - lam1_implied = (rhs / (n * (t2 + t3 + t4)) - w_d) / w_c - 1.0 - assert 1.2 < lam1_implied < 1.35 - theta_implied = iec_conductor_temperature( - t1, - t2, - t3, - t4, - W_c=w_c, - W_d=w_d, - lambda1=lam1_implied, - n_conductors=n, - T_ambient_C=t_amb, - ) - assert theta_implied == pytest.approx(target, abs=0.05) + lam1_e = losses["lambda1_eddy"] + + def theta(lambda1: float) -> float: + return iec_conductor_temperature( + t1, + t2, + t3, + t4, + W_c=w_c, + W_d=w_d, + lambda1=lambda1, + n_conductors=n, + T_ambient_C=t_amb, + ) + + assert lam1 == pytest.approx(1.027, abs=1e-3) + assert lam1_e == pytest.approx(0.186, abs=1e-3) + # IEC (lambda1'' = 0): below both references. + assert theta(lam1) == pytest.approx(85.75, abs=0.01) + # With the TB 880 eddy loss: within 1.3 K of the FEM and 0.9 K of the IEC + # reference temperature. + assert theta(lam1 + lam1_e) == pytest.approx(90.89, abs=0.01) + # The magnetic-armour factor of 5.3.11 does not apply to stainless armour. + assert theta(1.5 * lam1) > 99.0 # --------------------------------------------------------------------------- # @@ -248,12 +377,16 @@ def test_compute_thermal_reduces_to_primitive_single_core() -> None: """At n_cores=1 (no dielectric, λ1=0) the wrapper == 1-D primitive + W_c·T4.""" cable = _concentric_cable(voltage_kV=70.0) # < 100 kV: W_d = 0 # The cable has no conductor layer: the conductor material is given. + # The losses of the primitive: rho/A, no skin or proximity effect. res = compute_thermal( cable, current_A=600.0, conductor_area_m2=300e-6, n_cores=1, conductor_material="copper_stranded", + y_s=0.0, + y_p=0.0, + conductor_resistance_20C_ohm_m=1.7241e-8 / 300e-6, ) # Rebuild the primitive on the same annuli with the surface raised by W_c·T4. @@ -265,7 +398,7 @@ def test_compute_thermal_reduces_to_primitive_single_core() -> None: ), ConductionLayer(0.020, 0.024, get_property("hdpe", "lambda_W_mK")), ] - rho, alpha = 1.724e-8, 3.93e-3 + rho, alpha = 1.7241e-8, 3.93e-3 r_ac = (rho / 300e-6) * (1.0 + alpha * 70.0) w_c = 600.0**2 * r_ac r_int = sum( @@ -316,7 +449,7 @@ def test_compute_thermal_refuses_inadmissible_inputs(kwargs, match) -> None: _PROFILE_CASES: dict[str, tuple[str, int | None]] = { "export_three_core": ("export_three_core_yaml_path", None), "inter_array_three_core": ("inter_array_three_core_yaml_path", None), - "cigre_tb880_single_path": ("cigre_tb880_yaml_path", 1), + "poradowski2025_single_path": ("poradowski2025_220kv_yaml_path", 1), "inter_array_single_core": ("inter_array_single_core_yaml_path", None), } @@ -425,7 +558,16 @@ def test_compute_thermal_heat_flow_steps_at_sheath_hand_calculation() -> None: lam1, current, area = 0.25, 1000.0, 1000e-6 with warnings.catch_warnings(): warnings.simplefilter("ignore") - res = compute_thermal(cable, current, area, n_cores=1, lambda1=lam1) + res = compute_thermal( + cable, + current, + area, + n_cores=1, + lambda1=lam1, + y_s=0.0, + y_p=0.0, + conductor_resistance_20C_ohm_m=1.7241e-8 / area, + ) lam_x = get_property("xlpe_qiao2025", "lambda_W_mK") lam_h = get_property("hdpe", "lambda_W_mK") @@ -451,37 +593,58 @@ def test_compute_thermal_heat_flow_steps_at_sheath_hand_calculation() -> None: def test_three_core_filler_is_included_and_reported() -> None: - """The r_inner=0 cable-level filler enters T2 as the equal-filler-area annulus.""" + """Hand ladder of the SL-type export template ([IEC60287-2-1] 4.1, 5.6). + + Per-core resistances divided by C_LL; the filler and bedding under the + armour carry T2 = rho/(6 pi) G-bar, lower curve (cores not touching). + """ cable = _load_shipped("export_three_core_yaml_path") + rho_cu = 1.7241e-8 with warnings.catch_warnings(): warnings.simplefilter("ignore") - res = compute_thermal(cable, 908.45, 1000e-6) + res = compute_thermal( + cable, + 908.45, + 1000e-6, + y_s=0.0, + y_p=0.0, + lambda1=0.0, + conductor_resistance_20C_ohm_m=rho_cu / 1000e-6, + ) assert res.provenance is not None notes = [lim for lim in res.provenance.limitations if "pp_filler" in lim] - assert len(notes) == 1 + assert len(notes) == 2 assert "equal-filler-area" in notes[0] - assert "geometric factor NOT applied" in notes[0] + assert "G-bar" in notes[1] and "equal thicknesses" in notes[1] - # Hand ladder: per-core XLPE (T1) and lead sheath (one core's heat), then - # filler (sqrt(3) r_core .. 107.5 mm), bedding, oversheath (three cores). - w_c = _conductor_loss(908.45, 1000e-6) - w_d = dielectric_loss(220.0, 2.5, 0.001, 0.0210, 0.0420) + c_ll = math.sqrt(1.0 + (math.pi * 1.29 * 0.0910 / 2.138) ** 2) + w_c = 908.45**2 * rho_cu / 1000e-6 * (1.0 + 3.93e-3 * 70.0) + w_d = dielectric_loss(220.0, 2.5, 0.001, 0.0210, 0.0420, lay_length_factor=c_ll) q_t1, q_out, n = w_c + 0.5 * w_d, w_c + w_d, 3 - r_eq = math.sqrt(3.0) * 0.0455 lam = { m: get_property(m, "lambda_W_mK") for m in ("xlpe_qiao2025", "lead_sheath", "pp_filler", "hdpe") } + # Filler and bedding: x = (r_armour_in - r_offset - r_core) / D_core. + inner = cable.get_layer("inner_armour") + r_arm = float(inner.r_helix_m) - 0.5 * float(inner.d_wire_m) + x = (r_arm - 0.060 - 0.0455) / 0.091 + poly = 0.0126529 + 1.101 * x - 4.56104 * x**2 + 11.5093 * x**3 + t2 = ( + max(1.0 / lam["pp_filler"], 1.0 / lam["hdpe"]) + / (6.0 * math.pi) + * (2.0 * math.pi * poly) + ) rise = ( - q_t1 * thermal_resistance(0.0210, 0.0420, lam["xlpe_qiao2025"]) - + q_out * thermal_resistance(0.0430, 0.0455, lam["lead_sheath"]) - + n * q_out * thermal_resistance(r_eq, 0.1075, lam["pp_filler"]) - + n * q_out * thermal_resistance(0.1075, 0.1105, lam["hdpe"]) + q_t1 * thermal_resistance(0.0190, 0.0430, lam["xlpe_qiao2025"]) / c_ll + + q_out * thermal_resistance(0.0430, 0.0455, lam["lead_sheath"]) / c_ll + + n * q_out * t2 + n * q_out * thermal_resistance(0.1270, 0.1330, lam["hdpe"]) + n * q_out * 0.35 ) assert res.T_conductor_C == pytest.approx(15.0 + rise, rel=1e-12) # The filler is part of the profile (no silent drop). + r_eq = math.sqrt(3.0) * 0.0455 assert np.any(np.isclose(res.r_m, r_eq, rtol=0.0, atol=1e-12)) diff --git a/tests/test_thermal_history.py b/tests/test_thermal_history.py index 143cabb..81b4eba 100644 --- a/tests/test_thermal_history.py +++ b/tests/test_thermal_history.py @@ -4,8 +4,8 @@ Gates: -* thermal network: steady state equals ``compute_thermal`` (BM5 inputs, - 136.06 deg C) and the 66 kV template; discrete energy balance; TR-BDF2 +* thermal network: steady state equals ``compute_thermal`` (BM5 inputs + and the 66 kV template); discrete energy balance; TR-BDF2 order of accuracy; coupled ``R_ac(T)`` fixed point; * radial thermal mismatch: two-layer Lame closed forms (plane strain and generalised plane strain), unilateral opening on cooling; @@ -65,7 +65,7 @@ @pytest.fixture(scope="module") def tb880() -> CableData: - return cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + return cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) @pytest.fixture(scope="module") @@ -92,14 +92,16 @@ def _bm5_inputs() -> dict[str, float | int]: @pytest.mark.analytical_sanity @pytest.mark.parametrize("n_per_layer", [1, 3, 8]) def test_network_steady_state_equals_compute_thermal_bm5(tb880, n_per_layer): - """BM5 inputs: the RC ladder's steady state is the IEC profile (136.06 C).""" + """BM5 inputs: the RC ladder's steady state is the IEC profile.""" kw = _bm5_inputs() with warnings.catch_warnings(): warnings.simplefilter("ignore") ref = compute_thermal(tb880, 908.45, 1200e-6, **kw) net = thermal_network(tb880, 1200e-6, n_per_layer=n_per_layer, **kw) temps = net.steady_state(908.45, resistance_temperature_C=90.0) - assert ref.T_conductor_C == pytest.approx(136.06, abs=0.01) + # The packaged cable is a single-core-equivalent stack: with three loaded + # cores the ladder is a consistency case, not a benchmark (BM5 uses the + # source's tabulated network). assert temps[0] == pytest.approx(ref.T_conductor_C, rel=1e-12) # Annulus edges are nodes of both profiles: identical temperatures there. for r, t_ref in zip(ref.r_m, ref.T_C, strict=True): @@ -121,7 +123,9 @@ def test_network_steady_state_equals_compute_thermal_66kv(t66): ref = compute_thermal( t66, RATED_A, 630e-6, conductor_material="copper_janocha2024" ) - net = thermal_network(t66, 630e-6, conductor_material="copper_janocha2024") + net = thermal_network( + t66, 630e-6, conductor_material="copper_janocha2024", rating_current_A=RATED_A + ) temps = net.steady_state(RATED_A, resistance_temperature_C=90.0) # The 0.10 mm copper tape screens make the chain stiff: agreement to its # conditioning. @@ -507,9 +511,11 @@ def test_steady_currents_order_the_temperatures(t66): ] tc = [s.conductor_temperature_C for s in temps] assert tc[0] == pytest.approx(15.0, abs=1e-6) # no current: ambient - # Rated current: 97 deg C with T_ref at the ambient; the semiconducting - # screens count with the insulation (doc/template_66kv.md Section 4). - assert tc[0] < tc[1] < tc[2] < 100.0 + # Rated current 1093 A with R_ac(T) solved: 131.6 deg C, above the 90 deg C + # of XLPE under the template's assumed burial (doc/template_66kv.md + # Section 4.2 status note). + assert tc[0] < tc[1] < tc[2] + assert tc[2] == pytest.approx(131.6, abs=0.1) arm = [s.layer_temperature_C["inner_armour"] for s in temps] assert arm[0] < arm[1] < arm[2] < tc[2] @@ -616,7 +622,7 @@ def test_input_validation(t66): with pytest.raises(CableInputError, match="increasing"): ThermalHistory.uniform(t66, [0.0, 0.0], 20.0) # Registered E(T) laws refuse to extrapolate beyond their source range. - tb = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + tb = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) hot = ThermalHistory.uniform(tb, [0.0], 120.0).blocks()[0].state with pytest.raises(CableInputError, match="outside the sourced"): thermal_material_state(tb, hot) diff --git a/tests/test_thermal_network.py b/tests/test_thermal_network.py index 0988a2c..87c6a28 100644 --- a/tests/test_thermal_network.py +++ b/tests/test_thermal_network.py @@ -85,11 +85,10 @@ def test_armour_loss_needs_a_structural_armour(t66): ) with pytest.raises(CableInputError, match="lambda2 > 0 needs a structural"): thermal_network(loose, 630e-6, conductor_material=MATERIAL, lambda2=0.1) - # Without armour loss the network does not depend on the flag. - np.testing.assert_allclose( - thermal_network(loose, 630e-6, conductor_material=MATERIAL).steady_state( - RATED_A - ), - thermal_network(t66, 630e-6, conductor_material=MATERIAL).steady_state(RATED_A), - rtol=1e-12, - ) + # Without structural armour the SL-type filler factor and the magnetic + # armour of the sheath loss ([IEC60287-1-1] 5.3.11) do not apply, and the + # network says so. + net = thermal_network(loose, 630e-6, conductor_material=MATERIAL) + notes = " ".join(net.provenance.limitations) + assert "given for an armoured three-core cable" in notes + assert "5.3.2" in notes diff --git a/tests/test_thermal_reference_relaxation.py b/tests/test_thermal_reference_relaxation.py index f8e963d..10bd41b 100644 --- a/tests/test_thermal_reference_relaxation.py +++ b/tests/test_thermal_reference_relaxation.py @@ -105,13 +105,15 @@ def test_zero_current_at_ambient_is_the_unenergised_result_bitwise(t66): def test_explicit_reference_reproduces_the_reported_state(t66): hot20 = ThermalHistory.steady(t66, RATED_A, T_ref_C=20.0).blocks()[0].state a = armour_thermal_state(t66, hot20, tension_N=50e3)["inner_armour"] - # Armour temperature at its gap node (24 Oct 2026; before, it was - # interpolated into the next annulus: 294.006 kPa, 84.18 MPa). Screens of - # the source's section model (18 Nov 2026; with full copper screen annuli - # the state was 292.957 kPa, reference 31.104 kPa, 84.30 MPa). - assert a.contact_pressure_Pa == pytest.approx(439.480e3, rel=1e-5) + # IEC 60287 (2023) losses and thermal resistances (28 Nov 2026; before + # 439.480 kPa and 96.85 MPa at a 97.1 degC conductor). Armour temperature + # at its gap node (24 Oct 2026; before, it was interpolated into the next + # annulus: 294.006 kPa, 84.18 MPa). Screens of the source's section model + # (18 Nov 2026; with full copper screen annuli the state was 292.957 kPa, + # reference 31.104 kPa, 84.30 MPa). + assert a.contact_pressure_Pa == pytest.approx(680.777e3, rel=1e-5) assert a.contact_pressure_reference_Pa == pytest.approx(44.371e3, rel=1e-4) - assert a.thermal_wire_stress_Pa == pytest.approx(96.85e6, rel=1e-4) + assert a.thermal_wire_stress_Pa == pytest.approx(143.06e6, rel=1e-4) cold20 = ThermalHistory.steady(t66, 0.0, T_ref_C=20.0).blocks()[0].state c = armour_thermal_state(t66, cold20, tension_N=50e3)["inner_armour"] # 5 K below the stress-free state: the sheath shrink lifts cold clamping. @@ -152,7 +154,7 @@ def caught(state: ThermalState) -> list[warnings.WarningMessage]: def test_registered_laws_are_continuous_at_a_non_library_reference(): - cable = cx.load_cable(cx.cigre_tb880_yaml_path(), geometry_override=None) + cable = cx.load_cable(cx.poradowski2025_220kv_yaml_path(), geometry_override=None) laws = [x for x in cable.layers if x.material in library.TEMPERATURE_MODULUS_MODELS] assert laws near = ThermalState({x.name: 15.0 + 1e-3 for x in cable.layers}, T_ref_C=15.0) @@ -185,7 +187,7 @@ def test_relaxation_scales_the_sustained_state_not_the_stick_stiffness(t66): ] assert a == b # The independent check's relaxed variant (T_ref 15 deg C, f = 0.2). - assert c.contact_pressure_Pa == pytest.approx(243.88e3, rel=1e-3) + assert c.contact_pressure_Pa == pytest.approx(347.92e3, rel=1e-3) assert c.contact_pressure_reference_Pa == pytest.approx(46.86e3, rel=1e-3) assert 0.0 < c.thermal_wire_stress_Pa < a.thermal_wire_stress_Pa assert c.stick_modulus_Pa == a.stick_modulus_Pa diff --git a/tests/test_thermal_screen_resistance.py b/tests/test_thermal_screen_resistance.py new file mode 100644 index 0000000..17735a9 --- /dev/null +++ b/tests/test_thermal_screen_resistance.py @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Screen resistance of the sheath loss: wires over their lay, foil in parallel.""" + +from __future__ import annotations + +import math +from pathlib import Path + +import pytest +import yaml + +import cablexsec as cx +from cablexsec.materials.library import get_property +from cablexsec.mechanics.thermal import sheath_circulating_loss_factor, sheath_reactance + +SOURCE = Path(cx.__file__).parent / "cables" / "thies2016_30kv.yaml" +CURRENT_A, AREA_M2 = 400.0, 240e-6 +ENV = {"T4_external_Km_W": 0.5, "ambient_C": 15.0} + +pytestmark = pytest.mark.analytical_sanity + + +def _layer(data: dict, name: str) -> dict: + return next(x for x in data["layers"] if x["name"] == name) + + +def _load(tmp_path: Path, data: dict) -> cx.CableData: + target = tmp_path / "thies.yaml" + target.write_text(yaml.safe_dump(data, sort_keys=False), encoding="utf-8") + return cx.load_cable(target, geometry_override=None) + + +def _lambda1_by_hand(res, data: dict, names: list[str]) -> float: + """lambda1' of [IEC60287-1-1] 5.3.11 with R_s of the named screens in parallel.""" + losses = res.losses + t_s = _sheath_temperature(res) + conductance, diameters = 0.0, [] + for name in names: + layer = _layer(data, name) + rho = get_property(layer["material"], "rho_ohm_m") + alpha = get_property(layer["material"], "alpha_R_per_K") + if "strand_layers" in layer: + area = 0.0 + for ring in layer["strand_layers"]: + lay = math.atan2(2 * math.pi * ring["r_helix_m"], ring["pitch_m"]) + area += ( + ring["n_wires"] + * math.pi + * ring["d_wire_m"] ** 2 + / 4 + * math.cos(lay) + ) + else: + area = math.pi * (layer["r_outer_m"] ** 2 - layer["r_inner_m"] ** 2) + conductance += area / (rho * (1 + alpha * (t_s - 20.0))) + diameters.append(layer["r_inner_m"] + layer["r_outer_m"]) + c_ll = losses["lay_length_factor"] + r_s = c_ll / conductance + spacing = 2 * _layer(data, "cu_screen_wires")["r_offset_m"] * math.sin(math.pi / 3) + x = sheath_reactance( + spacing, sum(diameters) / len(diameters), lay_length_factor=c_ll + ) + return sheath_circulating_loss_factor( + r_s, losses["R_ac_ohm_m"], x, sl_armoured=True + ) + + +def _sheath_temperature(res) -> float: + """Sheath temperature the ladder reports in its lambda1 note [degC].""" + note = next(n for n in res.provenance.limitations if n.startswith("lambda1'")) + return float(note.split(" at ")[1].split(" degC")[0]) + + +def test_wire_screen_and_laminate_in_parallel_tape_left_out(tmp_path: Path) -> None: + # 2026-11-28 (PR #66 review): R_s was the envelope annulus of the wires, + # 72.8 mm2 instead of their 15.0 mm2. Now the 53 wires over their lay and + # the bonded Al laminate in parallel (CIGRE TB 880 Case 2), the counter + # helix Cu tape left out (TB 880 Guidance Point 29). + data = yaml.safe_load(SOURCE.read_text(encoding="utf-8")) + res = cx.compute_thermal(_load(tmp_path, data), CURRENT_A, AREA_M2, **ENV) + note = next(n for n in res.provenance.limitations if n.startswith("lambda1'")) + assert "53 wires of 14.99 mm2" in note + assert "in parallel" in note and "cu_tape not counted" in note + expected = _lambda1_by_hand(res, data, ["cu_screen_wires", "al_laminate"]) + assert res.losses["lambda1"] == pytest.approx(expected, rel=1e-3) + + +def test_wire_screen_alone_uses_its_wires(tmp_path: Path) -> None: + data = yaml.safe_load(SOURCE.read_text(encoding="utf-8")) + _layer(data, "al_laminate")["material"] = "hdpe" # a polymer, not a screen + res = cx.compute_thermal(_load(tmp_path, data), CURRENT_A, AREA_M2, **ENV) + expected = _lambda1_by_hand(res, data, ["cu_screen_wires"]) + assert res.losses["lambda1"] == pytest.approx(expected, rel=1e-3) + # The envelope annulus would give a resistance about five times lower. + wires = _layer(data, "cu_screen_wires") + envelope = math.pi * (wires["r_outer_m"] ** 2 - wires["r_inner_m"] ** 2) + assert envelope / 14.99e-6 > 4.5 diff --git a/tests/test_thermal_tb880.py b/tests/test_thermal_tb880.py new file mode 100644 index 0000000..8a8e969 --- /dev/null +++ b/tests/test_thermal_tb880.py @@ -0,0 +1,167 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""CIGRE TB 880 (2022) Case studies 2 and 8 against ``compute_thermal``. + +Rows TB880-C2 and TB880-C8 (doc/benchmarks.md, "CIGRE TB 880 Case studies 2 +and 8"; validation/scripts/check_tb880.py). The ladder terms are compared with +the brochure's printed results; the registered bands are 0.5 % (T1, T3, y_s, +y_p, W_d) and 1 % (lambda1'). Same formulas and diameters agree to the printed +digits; W_d differs by TB 880's eps0 = 1e-9/(36 pi), +0.137 %. +""" + +from __future__ import annotations + +import math +import warnings + +import check_tb880 as tb +import pytest + +import cablexsec as cx +from cablexsec.mechanics.thermal import compute_thermal, iec_conductor_temperature + +pytestmark = pytest.mark.independent_method + +_CASES = {case.key: case for case in tb.CASES} + + +@pytest.fixture(scope="module", params=sorted(_CASES)) +def evaluated(request): + case = _CASES[request.param] + return case, tb.evaluate(case) + + +def test_registered_bands(evaluated) -> None: + _case, out = evaluated + assert out["pass"] + + +def test_ladder_terms_to_the_printed_digits(evaluated) -> None: + # Same formulas, diameters and resistivities: round-off of TB 880's 10 digits. + _case, out = evaluated + for key in ("T1", "T3", "y_s", "y_p"): + assert abs(float(out[key])) < 1e-8, key + assert abs(float(out["lambda1_circ"])) < 1e-5 + + +def test_dielectric_loss_differs_by_the_eps0_of_tb880(evaluated) -> None: + # TB 880 writes C = eps/(18 ln(D/d)) 1e-9, i.e. eps0 = 1e-9/(36 pi); + # IEC 60287-1-1:2023 5.2 gives eps0 = 8.854e-12 F/m, as compute_thermal. + _case, out = evaluated + ratio = 8.854e-12 / (1e-9 / (36.0 * math.pi)) + assert 1.0 + float(out["W_d"]) == pytest.approx(ratio, rel=1e-9) + + +def test_stated_ratings_stay_where_recorded(evaluated) -> None: + # Stated, not gated: regression bounds on the recorded ratings. + case, out = evaluated + tb_rating = float(out["rating_tb_A"]) / case.current_amps - 1.0 + iec_rating = float(out["rating_iec_A"]) / case.current_amps - 1.0 + if case.key == "C2": + # T2 -5.1 %: the cores are touching for s but 134.9 mm for x. + assert 0.0 < tb_rating < 0.005 + else: + assert abs(tb_rating) < 0.0005 + assert 0.02 < iec_rating < 0.04 # no eddy loss, no GP 25 factor (IEC defaults) + + +def _case8(): + return cx.load_cable(tb.DATA / "case8_220kv.yaml", geometry_override=None) + + +def test_resistances_split_at_the_armour() -> None: + case = _CASES["C8"] + cable = _case8() + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res = compute_thermal( + cable, + case.current_amps, + case.area_m2, + T4_external_Km_W=case.T4, + ambient_C=15.0, + ) + r = res.resistances + assert r is not None and res.losses is not None + # T3: the serving over the armour, 237 mm to 245 mm at 6 K m/W. + assert r["T3_Km_W"] == pytest.approx( + 6.0 / (2 * math.pi) * math.log(245 / 237), rel=1e-12 + ) + assert r["T4_Km_W"] == case.T4 + # Formula (1) with these resistances reproduces the ladder (lambda2 = 0). + theta = iec_conductor_temperature( + r["T1_Km_W"], + r["T2_Km_W"], + r["T3_Km_W"], + r["T4_Km_W"], + W_c=res.losses["W_c_W_m"], + W_d=res.losses["W_d_W_m"], + lambda1=res.losses["lambda1"], + n_conductors=3, + T_ambient_C=15.0, + ) + assert theta == pytest.approx(res.T_conductor_C, rel=1e-12) + + +def test_unarmoured_cable_has_no_t3() -> None: + cable = _case8() + layers = tuple(x for x in cable.layers if x.name != "armour") + bare = cable.model_copy(update={"layers": layers}) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res = compute_thermal( + bare, 800.0, 1000e-6, T4_external_Km_W=0.31, ambient_C=15.0 + ) + assert res.resistances is not None + assert res.resistances["T3_Km_W"] == 0.0 + assert res.resistances["T2_Km_W"] > 0.0 + + +def test_sheath_reactance_carries_the_lay_factor_without_magnetic_armour() -> None: + # 2026-11-30 (TB880-C8): IEC 60287-1-1 Annex A gives X per metre of cable + # as the straight-core value times C_LL also on the 5.3.2 route + # (non-magnetic armour, TB 880 GP 38), as TB 880 Case 8 step 12.4 does. + case = _CASES["C8"] + cable = tb._touching(_case8(), case.spacing_m) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res = compute_thermal( + cable, + case.current_amps, + case.area_m2, + T4_external_Km_W=case.T4, + ambient_C=15.0, + conductor_resistance_20C_ohm_m=case.r20_ohm_m, + y_s=case.y_s, + y_p=case.y_p, + ) + note = next(x for x in res.provenance.limitations if "lambda1'" in x) + assert "X times C_LL" in note + assert res.losses["lambda1"] == pytest.approx(case.lambda1_circ, rel=2e-5) + + +def test_resistances_reproduce_two_armour_cable_with_armour_loss() -> None: + # 2026-11-30 (PR #69 review): with two armour layers the bedding between + # them carries half the armour loss; Formula (1) with the returned T1-T4 + # must still reproduce the ladder for a nonzero lambda2. + cable = cx.load_cable(cx.iea_task49_66kv_yaml_path(), geometry_override=None) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + res = compute_thermal( + cable, 800.0, 630e-6, T4_external_Km_W=0.5, ambient_C=15.0, lambda2=0.3 + ) + r = res.resistances + assert r is not None and res.losses is not None + theta = iec_conductor_temperature( + r["T1_Km_W"], + r["T2_Km_W"], + r["T3_Km_W"], + r["T4_Km_W"], + W_c=res.losses["W_c_W_m"], + W_d=res.losses["W_d_W_m"], + lambda1=res.losses["lambda1"], + lambda2=res.losses["lambda2"], + n_conductors=3, + T_ambient_C=15.0, + ) + assert theta == pytest.approx(res.T_conductor_C, rel=1e-12) diff --git a/tests/test_topologies.py b/tests/test_topologies.py index fcfc10e..0727b25 100644 --- a/tests/test_topologies.py +++ b/tests/test_topologies.py @@ -39,7 +39,7 @@ _TOPOLOGIES = { "single_core_inter_array": (inter_array_single_core_yaml_path, False, 1), "three_core_inter_array": (inter_array_three_core_yaml_path, False, 3), - "single_core_export": (cx.cigre_tb880_yaml_path, True, 1), + "single_core_export": (cx.poradowski2025_220kv_yaml_path, True, 1), "three_core_export": (export_three_core_yaml_path, True, 3), "three_core_wet_66kv": (cx.iea_task49_66kv_yaml_path, False, 3), } diff --git a/validation/README.md b/validation/README.md index a607994..6a1bbf7 100644 --- a/validation/README.md +++ b/validation/README.md @@ -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_1.md`](RELEASE_0_2_1.md) | Environment, test results, gate results and distribution hashes for v0.2.1 | +| [`RELEASE_0_2_2.md`](RELEASE_0_2_2.md) | Environment, test results and gate results for v0.2.2 | +| [`RELEASE_0_2_1.md`](RELEASE_0_2_1.md) | The same record for the 0.2.1 release | | [`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 | diff --git a/validation/RELEASE_0_2_2.md b/validation/RELEASE_0_2_2.md new file mode 100644 index 0000000..abcc2c0 --- /dev/null +++ b/validation/RELEASE_0_2_2.md @@ -0,0 +1,53 @@ + + +# CableXSec v0.2.2 release record + +This record lists what was built and tested for the v0.2.2 release: the environments, the test +results and the release checks. Case definitions and pass criteria are in +[`VALIDATION.md`](../VALIDATION.md). The SHA-256 hashes of the published assets are those of +the `SHA256SUMS.txt` that the release workflow attaches to the GitHub release. + +## Source + +| Item | Value | +| --- | --- | +| CableXSec | `0.2.2` | +| Scope | the solver kernel (`cablexsec`) and its post-processing tools, the `cablexsec-batch` command, the tests, examples, validation data and scripts; no desktop application | +| Changes since 0.2.1 | the thermal rating to IEC 60287-1-1:2023 and IEC 60287-2-1:2023 with IEC 60228:2023 resistances (a change that moves thermal results), CIGRE TB 880 Case studies 2 and 8, the CIGRE TB 862 block programme and specimen checks, the SV11 measurement rows and the coupled core slip row SK23-T1, the rename of `read_riflex_ascii` to `read_ascii_columns`; see [`CHANGELOG.md`](../CHANGELOG.md) | + +## Environments of the local gates + +Each environment is a new conda environment (conda-forge Python) into which the package and its +`dev`, `fast` and `contact` extras were installed with pip from the package index, as in CI. + +| Item | Python 3.11 | Python 3.12 | +| --- | --- | --- | +| Operating system | Windows 11 (x86-64), one thread per process (`OMP_NUM_THREADS`, `MKL_NUM_THREADS`, `OPENBLAS_NUM_THREADS`, `NUMBA_NUM_THREADS` = 1) | same | +| Python | 3.11.18 | 3.12.16 | +| Runtime | NumPy 2.4.6, SciPy 1.17.1, pandas 3.1.1, Pydantic 2.14.4, Matplotlib 3.11.2, PyYAML 6.0.4, rainflow 3.3.0 | NumPy 2.5.5, SciPy 1.18.1, pandas 3.1.1, Pydantic 2.14.4, Matplotlib 3.11.2, PyYAML 6.0.4, rainflow 3.3.0 | +| Optional | numba 0.68.1, Clarabel 0.11.1 | numba 0.68.1, Clarabel 0.11.1 | +| Tools | pytest 9.2.0, pytest-cov 7.1.0, pytest-xdist 3.8.0, Ruff 0.15.22, mypy 2.4.1, build 1.6.1, Twine 7.0.0, setuptools 84.2.1 | the same, and Sphinx 9.0.4, MyST-Parser 5.1.0 | + +## Test results + +The gates ran one process at a time on a machine that was also running other solver jobs. + +| Gate | Result | +| --- | --- | +| Test suite, Python 3.12 (`python -m pytest`, serial) | 5083 tests collected; exit status 0 (no failure or error) | +| Line and branch coverage of `cablexsec`, Python 3.11 (`release/check_coverage.py`: whole suite, then the kernel tests with `NUMBA_DISABLE_JIT=1`) | 96.50 %; gate 95 % | +| Ruff lint and format check (`src`, `tests`, `examples`, `validation`, `release`, `doc`) | clean | +| mypy, strict, package `cablexsec` (the CI configuration, Python 3.11 with NumPy 2.4.6) | no issues in 123 source files | +| Validation report (`validation/scripts/run_validation.py --check`, Python 3.11 and 3.12) | the committed report is current in both environments; 73 rows: 50 pass, 7 fail (BM1-loop, BM1-ID, Z-EI, HU-3PB, WITZ-ID, SV11-PLANE, SV11-GJ; registered targets unchanged), 13 stated without a target (info), 1 partial (BM5), 1 not comparable (HU-uniform), 1 not validated (BM4); taxonomy 1356 `analytical_sanity`, 105 `independent_method`, 62 `full_scale` tests. The script exits with status 1 while registered FAIL rows exist, as in CI | +| Sphinx documentation (`-W --keep-going`), Python 3.12 | built with no warnings | +| Release-tree audit (`release/audit_release_tree.py --tree .` and `--archive-ref HEAD`) | passed | +| Release metadata (`release/check_release_metadata.py`) | passed | +| Python distributions (`python -m build` with `SOURCE_DATE_EPOCH` set, `twine check`) | sdist and wheel pass; both carry LICENSE and NOTICE; the wheel holds only `cablexsec` and its metadata | +| Wheel in a new conda environment (Python 3.12), sdist in another (Python 3.11), each with the `fast` extra | in both: `cablexsec` imported from the environment, not the source tree; `release/smoke_test_wheel.py`; `cablexsec-batch --help`; the README quick start, with output identical to the README (apart from Windows line ends); all twelve examples, the four tutorial and the ten how-to scripts of the manual from a separate folder that holds their data but no source | + +Against 0.2.1, the new rows are TB880-C2 and TB880-C8 (pass), and SV11-LK, SV11-SIDE, SV11-SUB, +SV11-NORM and SK23-T1 (info). No existing row changes status. + +The CI matrix (`.github/workflows/python.yml`: Ubuntu, Windows and macOS with Python 3.11 and +3.12, a run without numba, coverage, the validation report, distributions and documentation) +runs on the release pull request. diff --git a/validation/paper_data/gjosteen2027_lc14_ranges.csv b/validation/paper_data/gjosteen2027_lc14_ranges.csv index 0bdab69..103b489 100644 --- a/validation/paper_data/gjosteen2027_lc14_ranges.csv +++ b/validation/paper_data/gjosteen2027_lc14_ranges.csv @@ -7,7 +7,7 @@ # Extremes are pixel centres; reading resolution +-2 MPa on max, min and range (line width # and grid calibration). NOT experimental uncertainty. # The plotted quantity is one side of the tendon (Gjosteen et al.: elastic bending is -# visible at station 3.1); which side is not stated. +# visible at station 3.1); it is side b of Lukassen (2019, PhD thesis, DTU) Figs 2.7-2.11, mean-centred. figure,station,series,min_MPa,max_MPa,range_MPa 27,2.1,measured,-93.1,93.1,186.2 28,2.2,measured,-63.9,64.1,128.1 diff --git a/validation/paper_data/lukassen2019_lc14_two_sides.csv b/validation/paper_data/lukassen2019_lc14_two_sides.csv new file mode 100644 index 0000000..fe2e5ae --- /dev/null +++ b/validation/paper_data/lukassen2019_lc14_two_sides.csv @@ -0,0 +1,1497 @@ +# Lukassen (2019) PhD thesis, DTU, Ch. 2, Figs 2.7-2.11 (PDF pages 30-31): +# measured (experimental OMS, blue) inner tensile armour stress on the two +# narrow sides of one tendon, sigma_a (side a) and sigma_b (side b), at +# stations 3.1-3.5 of the Saevik (2011) FBG riser, load case 14 (500 kN, +# 34 MPa, rocker +-8 deg); 40 mm gauge length (p. 11). Stresses are the +# bending stress variations from the state under gravity, tension and +# pressure (p. 12). +# thesis PDF sha256 c4ef71a59ef564142f24de48ece4d869edb09a8b44b7baa8705e4748ee7af1e0 +# method: native PDF polyline in stored order (validation/scripts/digitise_lukassen2019.py) +# calibration: per panel on the grid lines; largest residual 4.71e-05 deg, 6.82e-13 MPa +# reading half-width: 1.11e-03 deg, 2.44e-02 MPa (NOT experimental uncertainty) +station,side,sample,theta_deg,stress_MPa +3.1,a,0,-0.0485,-37.656 +3.1,a,1,-0.0366,-36.963 +3.1,a,2,0.0172,-35.766 +3.1,a,3,0.1485,-30.264 +3.1,a,4,0.3574,-27.051 +3.1,a,5,1.0141,-25.245 +3.1,a,6,1.4500,-27.156 +3.1,a,7,1.9395,-28.563 +3.1,a,8,2.4828,-29.466 +3.1,a,9,3.0738,-29.466 +3.1,a,10,4.3872,-32.658 +3.1,a,11,5.1036,-34.170 +3.1,a,12,5.8618,-35.073 +3.1,a,13,6.6200,-35.661 +3.1,a,14,7.3543,-35.262 +3.1,a,15,7.8916,-34.569 +3.1,a,16,8.1304,-33.561 +3.1,a,17,8.1960,-32.154 +3.1,a,18,8.1722,-29.949 +3.1,a,19,8.0886,-26.463 +3.1,a,20,7.8199,-12.036 +3.1,a,21,7.4199,12.282 +3.1,a,22,6.8588,28.998 +3.1,a,23,6.5185,36.894 +3.1,a,24,6.1304,43.593 +3.1,a,25,5.7006,48.507 +3.1,a,26,5.2409,51.111 +3.1,a,27,4.7514,51.615 +3.1,a,28,4.2320,50.397 +3.1,a,29,3.1156,48.612 +3.1,a,30,2.5246,47.898 +3.1,a,31,1.3067,44.496 +3.1,a,32,0.6918,41.199 +3.1,a,33,-0.5619,33.597 +3.1,a,34,-1.1828,29.586 +3.1,a,35,-1.7977,25.995 +3.1,a,36,-2.4007,24.777 +3.1,a,37,-2.9917,25.281 +3.1,a,38,-3.5648,27.087 +3.1,a,39,-5.1349,38.994 +3.1,a,40,-5.6006,42.207 +3.1,a,41,-6.0245,46.911 +3.1,a,42,-6.4185,53.715 +3.1,a,43,-6.7767,58.503 +3.1,a,44,-7.0931,61.023 +3.1,a,45,-7.3677,62.010 +3.1,a,46,-7.7916,62.325 +3.1,a,47,-7.9289,62.010 +3.1,a,48,-8.0125,61.107 +3.1,a,49,-8.0364,59.322 +3.1,a,50,-8.0185,55.416 +3.1,a,51,-7.8274,39.708 +3.1,a,52,-7.6603,27.087 +3.1,a,53,-7.4573,9.174 +3.1,a,54,-7.2125,-2.838 +3.1,a,55,-6.9200,-12.351 +3.1,a,56,-6.5797,-21.150 +3.1,a,57,-6.2095,-29.655 +3.1,a,58,-5.7976,-35.766 +3.1,a,59,-5.3499,-37.467 +3.1,a,60,-4.8663,-36.669 +3.1,a,61,-3.8096,-38.370 +3.1,a,62,-2.6335,-41.667 +3.1,a,63,-2.0067,-42.171 +3.1,a,64,-1.3798,-40.260 +3.1,a,65,-0.7589,-38.664 +3.1,a,66,0.4709,-36.669 +3.1,a,67,1.0977,-35.955 +3.1,a,68,1.7126,-30.558 +3.1,a,69,2.3275,-26.967 +3.1,a,70,2.9186,-26.148 +3.1,a,71,3.4857,-23.859 +3.1,a,72,4.5663,-28.752 +3.1,a,73,5.0618,-28.668 +3.1,a,74,5.5215,-29.256 +3.1,a,75,5.9513,-30.159 +3.1,a,76,6.7035,-33.372 +3.1,a,77,7.0200,-35.955 +3.1,a,78,7.5155,-35.367 +3.1,a,79,7.6946,-34.653 +3.1,a,80,7.8259,-33.561 +3.1,a,81,7.9095,-32.259 +3.1,a,82,7.9453,-30.054 +3.1,a,83,7.9214,-26.463 +3.1,a,84,7.8498,-20.562 +3.1,a,85,7.3782,12.282 +3.1,a,86,7.1334,20.283 +3.1,a,87,6.8468,29.082 +3.1,a,88,6.5125,36.894 +3.1,a,89,6.1304,43.593 +3.1,a,90,5.7066,48.402 +3.1,a,91,5.2469,51.006 +3.1,a,92,4.7573,51.510 +3.1,a,93,3.6827,49.410 +3.1,a,94,2.5305,47.814 +3.1,a,95,1.3126,44.307 +3.1,a,96,0.6918,41.703 +3.1,a,97,-0.5560,32.799 +3.1,a,98,-1.7977,27.192 +3.1,a,99,-2.3947,25.176 +3.1,a,100,-2.9858,25.995 +3.1,a,101,-3.5589,27.990 +3.1,a,102,-4.1081,32.190 +3.1,a,103,-4.6394,35.802 +3.1,a,104,-5.1349,38.406 +3.1,a,105,-5.5946,43.299 +3.1,a,106,-6.0245,45.798 +3.1,a,107,-6.4185,54.408 +3.1,a,108,-6.7767,58.923 +3.1,a,109,-7.0931,61.611 +3.1,a,110,-7.3677,62.514 +3.1,a,111,-7.6006,62.913 +3.1,a,112,-7.9289,62.724 +3.1,a,113,-8.0125,61.611 +3.1,a,114,-8.0364,59.910 +3.1,a,115,-8.0185,55.920 +3.1,a,116,-7.8274,40.401 +3.1,a,117,-7.6603,27.696 +3.1,a,118,-7.4573,9.867 +3.1,a,119,-7.2125,-2.439 +3.1,a,120,-6.9200,-12.036 +3.1,a,121,-6.5797,-20.856 +3.1,a,122,-6.2095,-29.361 +3.1,a,123,-5.7976,-35.556 +3.1,a,124,-5.3558,-37.068 +3.1,a,125,-4.8782,-36.459 +3.1,a,126,-3.8275,-38.160 +3.1,a,127,-2.6574,-41.373 +3.1,a,128,-2.0306,-41.667 +3.1,a,129,-1.3858,-40.260 +3.1,a,130,-0.7351,-38.265 +3.1,a,131,0.4888,-36.270 +3.1,a,132,1.1037,-35.766 +3.1,a,133,1.7246,-30.558 +3.1,a,134,2.3335,-26.967 +3.1,a,135,2.9245,-25.245 +3.1,a,136,3.4917,-24.153 +3.1,a,137,4.0409,-26.652 +3.1,a,138,4.5663,-28.164 +3.1,a,139,5.0618,-28.962 +3.1,a,140,5.5215,-28.857 +3.1,a,141,5.9513,-31.062 +3.1,a,142,6.3453,-31.860 +3.1,a,143,7.0200,-34.863 +3.1,a,144,7.2946,-35.472 +3.1,a,145,7.5214,-35.262 +3.1,a,146,7.6946,-34.569 +3.1,a,147,7.8259,-33.561 +3.1,a,148,7.9155,-32.070 +3.1,a,149,7.9453,-29.760 +3.1,a,150,7.9214,-26.148 +3.1,a,151,7.8558,-20.457 +3.1,a,152,7.3841,12.576 +3.1,a,153,6.8468,29.292 +3.1,a,154,6.5125,37.188 +3.1,a,155,6.1304,43.698 +3.1,a,156,5.7066,48.612 +3.1,a,157,5.2528,51.111 +3.1,a,158,4.7633,51.699 +3.1,a,159,3.6887,49.515 +3.1,a,160,2.5365,48.108 +3.1,a,161,1.9276,46.302 +3.1,a,162,1.3186,44.811 +3.1,a,163,0.6977,41.703 +3.1,a,164,0.0709,37.797 +3.1,b,0,-0.0485,-44.043 +3.1,b,1,-0.0366,-47.172 +3.1,b,2,0.0172,-49.356 +3.1,b,3,0.1485,-49.734 +3.1,b,4,0.3575,-50.889 +3.1,b,5,0.6500,-53.157 +3.1,b,6,1.0142,-54.879 +3.1,b,7,1.4500,-51.834 +3.1,b,8,1.9395,-51.729 +3.1,b,9,2.4828,-54.585 +3.1,b,10,3.0738,-55.719 +3.1,b,11,3.7126,-57.903 +3.1,b,12,4.3872,-60.864 +3.1,b,13,5.1036,-62.481 +3.1,b,14,5.8618,-64.749 +3.1,b,15,7.3543,-70.923 +3.1,b,16,7.8916,-73.401 +3.1,b,17,8.1304,-74.829 +3.1,b,18,8.1961,-74.913 +3.1,b,19,8.1722,-73.485 +3.1,b,20,8.0886,-70.545 +3.1,b,21,7.6349,-50.301 +3.1,b,22,7.4200,-42.720 +3.1,b,23,7.1573,-35.769 +3.1,b,24,6.8588,-28.734 +3.1,b,25,6.5185,-21.615 +3.1,b,26,5.7006,-6.705 +3.1,b,27,4.7514,10.305 +3.1,b,28,4.2320,18.957 +3.1,b,29,3.6828,25.215 +3.1,b,30,3.1156,29.415 +3.1,b,31,2.5246,32.439 +3.1,b,32,1.3067,37.395 +3.1,b,33,0.6918,39.390 +3.1,b,34,0.0590,42.414 +3.1,b,35,-0.5619,45.837 +3.1,b,36,-1.1828,48.588 +3.1,b,37,-1.7977,51.927 +3.1,b,38,-2.4007,53.628 +3.1,b,39,-2.9917,56.589 +3.1,b,40,-3.5648,59.151 +3.1,b,41,-4.1141,62.658 +3.1,b,42,-4.6335,66.375 +3.1,b,43,-5.1349,70.365 +3.1,b,44,-5.6006,75.573 +3.1,b,45,-6.0245,82.608 +3.1,b,46,-7.0931,97.539 +3.1,b,47,-7.3677,101.907 +3.1,b,48,-7.7916,107.409 +3.1,b,49,-7.9289,108.354 +3.1,b,50,-8.0125,107.976 +3.1,b,51,-8.0364,106.548 +3.1,b,52,-8.0185,102.936 +3.1,b,53,-7.8274,89.832 +3.1,b,54,-7.6603,80.046 +3.1,b,55,-7.4573,69.588 +3.1,b,56,-7.2125,61.713 +3.1,b,57,-6.9200,53.922 +3.1,b,58,-5.7976,29.121 +3.1,b,59,-4.8663,2.241 +3.1,b,60,-4.3588,-9.162 +3.1,b,61,-3.8096,-18.381 +3.1,b,62,-3.2365,-25.794 +3.1,b,63,-2.6335,-31.590 +3.1,b,64,-2.0067,-35.874 +3.1,b,65,-0.7589,-40.998 +3.1,b,66,-0.1440,-43.182 +3.1,b,67,0.4709,-46.227 +3.1,b,68,1.0977,-48.600 +3.1,b,69,1.7126,-48.978 +3.1,b,70,2.3276,-50.301 +3.1,b,71,3.4857,-54.207 +3.1,b,72,4.0350,-51.540 +3.1,b,73,4.5663,-52.695 +3.1,b,74,5.0618,-53.346 +3.1,b,75,5.5215,-55.068 +3.1,b,76,5.9514,-57.819 +3.1,b,77,6.3454,-59.436 +3.1,b,78,6.7036,-61.242 +3.1,b,79,7.0200,-63.804 +3.1,b,80,7.2886,-67.416 +3.1,b,81,7.5155,-69.894 +3.1,b,82,7.6946,-72.267 +3.1,b,83,7.8259,-73.590 +3.1,b,84,7.9095,-73.779 +3.1,b,85,7.9453,-72.267 +3.1,b,86,7.9215,-69.411 +3.1,b,87,7.8498,-64.476 +3.1,b,88,7.5752,-49.272 +3.1,b,89,7.3782,-41.565 +3.1,b,90,7.1334,-34.719 +3.1,b,91,6.8469,-27.705 +3.1,b,92,6.5125,-20.565 +3.1,b,93,5.7066,-5.760 +3.1,b,94,4.7574,11.166 +3.1,b,95,4.2320,19.713 +3.1,b,96,3.6828,25.992 +3.1,b,97,3.1156,30.066 +3.1,b,98,2.5305,33.111 +3.1,b,99,1.9216,35.673 +3.1,b,100,1.3127,37.773 +3.1,b,101,0.6918,40.230 +3.1,b,102,-0.5560,46.404 +3.1,b,103,-1.1828,50.016 +3.1,b,104,-1.7977,51.633 +3.1,b,105,-2.9857,56.484 +3.1,b,106,-3.5589,59.718 +3.1,b,107,-4.1081,62.385 +3.1,b,108,-4.6394,66.081 +3.1,b,109,-5.1349,70.554 +3.1,b,110,-6.0245,83.091 +3.1,b,111,-6.4185,87.753 +3.1,b,112,-6.7767,92.310 +3.1,b,113,-7.3677,102.096 +3.1,b,114,-7.6006,105.330 +3.1,b,115,-7.7916,107.325 +3.1,b,116,-7.9289,108.165 +3.1,b,117,-8.0125,107.787 +3.1,b,118,-8.0364,106.464 +3.1,b,119,-8.0185,102.852 +3.1,b,120,-7.8274,89.832 +3.1,b,121,-7.6603,79.962 +3.1,b,122,-7.4573,69.504 +3.1,b,123,-7.2125,61.608 +3.1,b,124,-6.9200,53.922 +3.1,b,125,-5.7976,29.205 +3.1,b,126,-4.8782,2.808 +3.1,b,127,-4.3708,-8.595 +3.1,b,128,-3.8275,-17.625 +3.1,b,129,-3.2544,-25.122 +3.1,b,130,-2.6574,-31.023 +3.1,b,131,-2.0305,-35.874 +3.1,b,132,-1.3858,-38.331 +3.1,b,133,-0.7351,-40.515 +3.1,b,134,-0.1201,-41.943 +3.1,b,135,0.4888,-45.366 +3.1,b,136,1.1037,-47.550 +3.1,b,137,2.3335,-49.650 +3.1,b,138,2.9246,-51.267 +3.1,b,139,3.4917,-53.829 +3.1,b,140,4.0410,-50.511 +3.1,b,141,4.5663,-51.456 +3.1,b,142,5.0618,-52.968 +3.1,b,143,5.5215,-53.073 +3.1,b,144,6.3454,-58.869 +3.1,b,145,6.7036,-60.675 +3.1,b,146,7.0200,-62.670 +3.1,b,147,7.6946,-71.406 +3.1,b,148,7.8259,-72.834 +3.1,b,149,7.9155,-72.918 +3.1,b,150,7.9453,-71.595 +3.1,b,151,7.9215,-68.655 +3.1,b,152,7.8558,-63.804 +3.1,b,153,7.5812,-48.600 +3.1,b,154,7.3842,-40.914 +3.1,b,155,7.1334,-34.068 +3.1,b,156,6.8469,-26.928 +3.1,b,157,6.5125,-19.914 +3.1,b,158,5.7066,-5.088 +3.1,b,159,4.7633,11.733 +3.1,b,160,4.2380,20.007 +3.1,b,161,3.6887,26.265 +3.1,b,162,3.1216,30.360 +3.1,b,163,2.5365,33.489 +3.1,b,164,1.9276,36.051 +3.1,b,165,0.6977,40.524 +3.1,b,166,0.0709,43.380 +3.2,a,0,-0.0485,-22.025 +3.2,a,1,-0.0366,-20.534 +3.2,a,2,0.0172,-19.652 +3.2,a,3,0.3574,-12.134 +3.2,a,4,0.6500,-7.892 +3.2,a,5,1.4500,-0.479 +3.2,a,6,1.9395,2.797 +3.2,a,7,3.0738,9.412 +3.2,a,8,4.3872,14.557 +3.2,a,9,5.1036,16.132 +3.2,a,10,6.6200,18.505 +3.2,a,11,7.8916,20.080 +3.2,a,12,8.1304,21.067 +3.2,a,13,8.1960,22.369 +3.2,a,14,8.1722,24.133 +3.2,a,15,7.9752,29.761 +3.2,a,16,7.6349,39.862 +3.2,a,17,7.4199,42.424 +3.2,a,18,7.1573,43.810 +3.2,a,19,6.8588,43.999 +3.2,a,20,6.5185,43.516 +3.2,a,21,5.2409,39.463 +3.2,a,22,4.7514,38.077 +3.2,a,23,4.2320,36.292 +3.2,a,24,3.6827,34.717 +3.2,a,25,2.5246,32.134 +3.2,a,26,1.3067,27.409 +3.2,a,27,0.0589,21.466 +3.2,a,28,-0.5619,18.799 +3.2,a,29,-1.7977,11.197 +3.2,a,30,-2.4007,5.863 +3.2,a,31,-2.9917,1.999 +3.2,a,32,-3.5648,-2.243 +3.2,a,33,-4.1141,-4.721 +3.2,a,34,-4.6335,-7.682 +3.2,a,35,-5.1349,-9.950 +3.2,a,36,-5.6006,-12.533 +3.2,a,37,-6.0245,-13.520 +3.2,a,38,-6.4185,-15.389 +3.2,a,39,-7.0931,-15.788 +3.2,a,40,-7.6006,-16.985 +3.2,a,41,-7.9289,-18.665 +3.2,a,42,-8.0125,-19.736 +3.2,a,43,-8.0364,-21.038 +3.2,a,44,-8.0185,-23.495 +3.2,a,45,-7.8274,-32.294 +3.2,a,46,-7.6603,-38.531 +3.2,a,47,-7.4573,-40.904 +3.2,a,48,-6.9200,-41.282 +3.2,a,49,-6.5797,-40.694 +3.2,a,50,-6.2095,-39.602 +3.2,a,51,-5.7976,-39.413 +3.2,a,52,-4.8663,-38.132 +3.2,a,53,-4.3588,-36.851 +3.2,a,54,-3.8096,-35.864 +3.2,a,55,-2.6335,-32.588 +3.2,a,56,-2.0067,-30.509 +3.2,a,57,-1.3798,-27.548 +3.2,a,58,-0.7589,-24.188 +3.2,a,59,-0.1440,-21.731 +3.2,a,60,0.4709,-19.946 +3.2,a,61,1.0977,-19.148 +3.2,a,62,1.7126,-16.376 +3.2,a,63,2.9186,-7.787 +3.2,a,64,3.4857,-4.133 +3.2,a,65,4.0350,0.025 +3.2,a,66,4.5663,2.797 +3.2,a,67,5.0618,6.157 +3.2,a,68,5.5215,9.601 +3.2,a,69,6.3453,14.557 +3.2,a,70,6.7035,16.720 +3.2,a,71,7.0200,17.413 +3.2,a,72,7.6946,20.689 +3.2,a,73,7.8259,21.760 +3.2,a,74,7.9095,23.041 +3.2,a,75,7.9453,24.637 +3.2,a,76,7.9214,27.010 +3.2,a,77,7.7304,35.011 +3.2,a,78,7.5752,40.450 +3.2,a,79,7.3782,42.907 +3.2,a,80,7.1334,44.293 +3.2,a,81,6.8468,44.587 +3.2,a,82,6.5125,43.999 +3.2,a,83,5.7066,40.933 +3.2,a,84,5.2469,39.862 +3.2,a,85,3.6827,35.011 +3.2,a,86,2.5305,32.449 +3.2,a,87,1.9216,30.076 +3.2,a,88,1.3126,27.304 +3.2,a,89,0.6918,24.931 +3.2,a,90,-0.5560,19.093 +3.2,a,91,-1.1828,15.439 +3.2,a,92,-1.7977,10.987 +3.2,a,93,-2.3947,6.346 +3.2,a,94,-2.9858,2.503 +3.2,a,95,-3.5589,-1.760 +3.2,a,96,-4.1081,-4.532 +3.2,a,97,-5.1349,-10.454 +3.2,a,98,-6.0245,-14.003 +3.2,a,99,-6.4185,-14.906 +3.2,a,100,-7.3677,-15.998 +3.2,a,101,-7.7916,-17.468 +3.2,a,102,-7.9289,-18.161 +3.2,a,103,-8.0125,-19.253 +3.2,a,104,-8.0364,-20.639 +3.2,a,105,-8.0185,-23.012 +3.2,a,106,-7.8274,-31.811 +3.2,a,107,-7.6603,-38.027 +3.2,a,108,-7.4573,-40.400 +3.2,a,109,-6.9200,-40.904 +3.2,a,110,-6.2095,-39.224 +3.2,a,111,-5.3558,-38.426 +3.2,a,112,-4.8782,-37.733 +3.2,a,113,-3.8275,-35.465 +3.2,a,114,-3.2544,-34.184 +3.2,a,115,-2.6574,-32.504 +3.2,a,116,-2.0306,-30.425 +3.2,a,117,-0.1202,-21.626 +3.2,a,118,0.4888,-19.736 +3.2,a,119,1.1037,-18.455 +3.2,a,120,1.7246,-16.292 +3.2,a,121,2.9245,-7.892 +3.2,a,122,3.4917,-4.427 +3.2,a,123,4.0409,0.319 +3.2,a,124,5.0618,5.863 +3.2,a,125,5.5215,10.210 +3.2,a,126,5.9513,12.373 +3.2,a,127,6.3453,15.250 +3.2,a,128,7.0200,17.917 +3.2,a,129,7.5214,19.597 +3.2,a,130,7.8259,21.571 +3.2,a,131,7.9155,22.852 +3.2,a,132,7.9453,24.637 +3.2,a,133,7.9214,26.905 +3.2,a,134,7.8558,30.160 +3.2,a,135,7.5811,40.240 +3.2,a,136,7.3841,42.907 +3.2,a,137,7.1334,44.104 +3.2,a,138,6.8468,44.398 +3.2,a,139,6.5125,43.915 +3.2,a,140,5.7066,40.744 +3.2,a,141,5.2528,39.757 +3.2,a,142,3.6887,35.011 +3.2,a,143,2.5365,32.449 +3.2,a,144,0.6977,24.721 +3.2,a,145,0.0709,21.865 +3.2,b,0,-0.0485,-16.862 +3.2,b,1,-0.0366,-19.130 +3.2,b,2,0.0172,-21.587 +3.2,b,3,0.3575,-30.260 +3.2,b,4,1.0142,-41.117 +3.2,b,5,1.4500,-46.430 +3.2,b,6,1.9395,-51.260 +3.2,b,7,2.4828,-55.985 +3.2,b,8,3.0738,-60.815 +3.2,b,9,3.7126,-65.351 +3.2,b,10,5.8618,-73.625 +3.2,b,11,6.6200,-75.305 +3.2,b,12,8.1304,-78.161 +3.2,b,13,8.1961,-78.350 +3.2,b,14,8.1722,-77.657 +3.2,b,15,8.0886,-76.292 +3.2,b,16,7.8200,-70.076 +3.2,b,17,7.4200,-58.946 +3.2,b,18,7.1573,-52.142 +3.2,b,19,6.8588,-45.443 +3.2,b,20,6.5185,-38.744 +3.2,b,21,6.1305,-32.150 +3.2,b,22,5.7006,-26.228 +3.2,b,23,4.7514,-16.085 +3.2,b,24,4.2320,-10.667 +3.2,b,25,3.6828,-5.543 +3.2,b,26,3.1156,-1.994 +3.2,b,27,1.9216,3.928 +3.2,b,28,0.6918,12.202 +3.2,b,29,0.0590,16.045 +3.2,b,30,-1.1828,26.986 +3.2,b,31,-1.7977,32.698 +3.2,b,32,-2.4007,40.384 +3.2,b,33,-2.9917,48.574 +3.2,b,34,-3.5648,56.050 +3.2,b,35,-4.6335,73.795 +3.2,b,36,-5.1349,81.670 +3.2,b,37,-5.6006,89.755 +3.2,b,38,-6.0245,96.160 +3.2,b,39,-6.4185,101.473 +3.2,b,40,-7.0931,107.878 +3.2,b,41,-8.0125,116.173 +3.2,b,42,-8.0364,115.858 +3.2,b,43,-8.0185,114.199 +3.2,b,44,-7.4573,94.480 +3.2,b,45,-7.2125,86.395 +3.2,b,46,-6.9200,77.932 +3.2,b,47,-6.5797,69.553 +3.2,b,48,-6.2096,61.762 +3.2,b,49,-4.3588,31.522 +3.2,b,50,-2.6335,7.582 +3.2,b,51,-2.0067,0.085 +3.2,b,52,-0.7589,-11.444 +3.2,b,53,-0.1440,-16.568 +3.2,b,54,0.4709,-18.647 +3.2,b,55,1.7126,-24.548 +3.2,b,56,2.3276,-29.378 +3.2,b,57,3.4857,-39.836 +3.2,b,58,4.0350,-45.548 +3.2,b,59,4.5663,-50.756 +3.2,b,60,5.0618,-55.103 +3.2,b,61,5.5215,-58.442 +3.2,b,62,5.9514,-63.860 +3.2,b,63,6.3454,-68.018 +3.2,b,64,6.7036,-70.475 +3.2,b,65,7.0200,-73.625 +3.2,b,66,7.6946,-77.363 +3.2,b,67,7.9095,-78.056 +3.2,b,68,7.9453,-77.363 +3.2,b,69,7.9215,-75.998 +3.2,b,70,7.8498,-73.520 +3.2,b,71,7.7304,-69.887 +3.2,b,72,7.5752,-64.658 +3.2,b,73,7.3782,-58.736 +3.2,b,74,7.1334,-51.848 +3.2,b,75,6.8469,-45.254 +3.2,b,76,6.5125,-38.450 +3.2,b,77,6.1305,-31.940 +3.2,b,78,5.7066,-25.934 +3.2,b,79,4.7574,-15.791 +3.2,b,80,4.2320,-10.457 +3.2,b,81,3.6828,-5.333 +3.2,b,82,3.1156,-1.889 +3.2,b,83,1.9216,4.033 +3.2,b,84,-0.5560,21.064 +3.2,b,85,-1.1828,26.986 +3.2,b,86,-1.7977,33.496 +3.2,b,87,-2.3947,40.888 +3.2,b,88,-2.9857,48.574 +3.2,b,89,-3.5589,56.848 +3.2,b,90,-4.6394,74.383 +3.2,b,91,-5.5946,89.944 +3.2,b,92,-6.4185,101.284 +3.2,b,93,-7.0931,108.172 +3.2,b,94,-7.9289,115.858 +3.2,b,95,-8.0125,116.068 +3.2,b,96,-8.0364,115.774 +3.2,b,97,-8.0185,114.283 +3.2,b,98,-7.4573,94.480 +3.2,b,99,-7.2125,86.395 +3.2,b,100,-6.9200,78.037 +3.2,b,101,-6.5797,69.553 +3.2,b,102,-6.2096,61.762 +3.2,b,103,-4.3708,32.215 +3.2,b,104,-3.8275,24.235 +3.2,b,105,-2.6574,8.548 +3.2,b,106,-2.0305,1.177 +3.2,b,107,-1.3858,-4.934 +3.2,b,108,-0.7351,-10.457 +3.2,b,109,-0.1201,-16.085 +3.2,b,110,0.4888,-18.437 +3.2,b,111,1.1037,-20.411 +3.2,b,112,1.7246,-24.149 +3.2,b,113,2.3335,-28.790 +3.2,b,114,2.9246,-33.725 +3.2,b,115,4.0410,-45.149 +3.2,b,116,4.5663,-49.181 +3.2,b,117,5.0618,-54.893 +3.2,b,118,5.9514,-63.566 +3.2,b,119,6.3454,-66.338 +3.2,b,120,7.0200,-72.533 +3.2,b,121,7.9155,-77.174 +3.2,b,122,7.9453,-76.481 +3.2,b,123,7.9215,-75.095 +3.2,b,124,7.8558,-72.638 +3.2,b,125,7.3842,-57.854 +3.2,b,126,7.1334,-51.050 +3.2,b,127,6.8469,-44.351 +3.2,b,128,6.5125,-37.652 +3.2,b,129,6.1305,-31.058 +3.2,b,130,5.7066,-25.136 +3.2,b,131,4.7633,-14.993 +3.2,b,132,4.2380,-9.680 +3.2,b,133,3.6887,-4.745 +3.2,b,134,3.1216,-1.196 +3.2,b,135,1.9276,4.516 +3.2,b,136,1.3186,8.947 +3.2,b,137,0.0709,16.843 +3.3,a,0,-0.0485,7.498 +3.3,a,1,-0.0366,9.010 +3.3,a,2,0.0172,9.955 +3.3,a,3,0.1485,11.656 +3.3,a,4,0.3574,11.845 +3.3,a,5,1.9395,18.565 +3.3,a,6,3.0738,24.151 +3.3,a,7,3.7126,27.091 +3.3,a,8,4.3872,31.249 +3.3,a,9,5.1036,34.000 +3.3,a,10,5.8618,36.373 +3.3,a,11,8.1304,42.232 +3.3,a,12,8.1960,42.904 +3.3,a,13,8.1722,43.093 +3.3,a,14,8.0886,42.799 +3.3,a,15,7.8199,39.691 +3.3,a,16,7.6349,36.940 +3.3,a,17,7.4199,35.134 +3.3,a,18,7.1573,32.593 +3.3,a,19,6.5185,24.067 +3.3,a,20,6.1304,19.699 +3.3,a,21,5.7006,16.108 +3.3,a,22,4.7514,9.472 +3.3,a,23,4.2320,6.742 +3.3,a,24,3.6827,4.180 +3.3,a,25,2.5246,0.778 +3.3,a,26,1.9216,-1.595 +3.3,a,27,0.6918,-5.375 +3.3,a,28,0.0589,-7.181 +3.3,a,29,-2.4007,-11.906 +3.3,a,30,-2.9917,-13.334 +3.3,a,31,-4.1141,-18.059 +3.3,a,32,-4.6335,-21.755 +3.3,a,33,-5.1349,-26.207 +3.3,a,34,-5.6006,-30.659 +3.3,a,35,-6.0245,-35.195 +3.3,a,36,-6.4185,-39.752 +3.3,a,37,-8.0364,-56.321 +3.3,a,38,-8.0185,-55.376 +3.3,a,39,-7.8274,-51.575 +3.3,a,40,-7.6603,-48.845 +3.3,a,41,-7.4573,-47.228 +3.3,a,42,-7.2125,-44.960 +3.3,a,43,-6.5797,-37.484 +3.3,a,44,-6.2095,-33.305 +3.3,a,45,-5.7976,-29.609 +3.3,a,46,-5.3499,-26.018 +3.3,a,47,-4.3588,-18.815 +3.3,a,48,-2.6335,-6.236 +3.3,a,49,-1.3798,1.618 +3.3,a,50,-0.1440,7.309 +3.3,a,51,0.4709,9.094 +3.3,a,52,1.0977,9.955 +3.3,a,53,1.7126,11.383 +3.3,a,54,2.3275,11.950 +3.3,a,55,2.9186,13.084 +3.3,a,56,3.4857,14.869 +3.3,a,57,4.0350,16.213 +3.3,a,58,4.5663,18.292 +3.3,a,59,5.0618,21.421 +3.3,a,60,5.9513,27.385 +3.3,a,61,6.3453,30.682 +3.3,a,62,6.7035,34.000 +3.3,a,63,7.0200,35.701 +3.3,a,64,7.9453,43.177 +3.3,a,65,7.9214,42.799 +3.3,a,66,7.8498,41.476 +3.3,a,67,7.7304,39.691 +3.3,a,68,7.5752,36.940 +3.3,a,69,7.3782,35.239 +3.3,a,70,7.1334,32.677 +3.3,a,71,6.5125,23.962 +3.3,a,72,6.1304,19.699 +3.3,a,73,5.7066,15.919 +3.3,a,74,5.2469,12.706 +3.3,a,75,4.7573,9.577 +3.3,a,76,4.2320,6.637 +3.3,a,77,3.6827,4.180 +3.3,a,78,2.5305,0.862 +3.3,a,79,1.9216,-1.490 +3.3,a,80,1.3126,-3.485 +3.3,a,81,0.6918,-5.186 +3.3,a,82,0.0649,-7.454 +3.3,a,83,-1.7977,-10.688 +3.3,a,84,-2.9858,-13.439 +3.3,a,85,-3.5589,-15.707 +3.3,a,86,-4.1081,-18.248 +3.3,a,87,-4.6394,-21.755 +3.3,a,88,-5.1349,-26.018 +3.3,a,89,-5.5946,-31.037 +3.3,a,90,-6.0245,-35.111 +3.3,a,91,-8.0364,-56.027 +3.3,a,92,-8.0185,-55.187 +3.3,a,93,-7.9408,-53.486 +3.3,a,94,-7.6603,-48.656 +3.3,a,95,-7.2125,-44.771 +3.3,a,96,-6.2095,-33.221 +3.3,a,97,-5.7976,-29.525 +3.3,a,98,-5.3558,-25.934 +3.3,a,99,-3.8275,-14.846 +3.3,a,100,-3.2544,-10.499 +3.3,a,101,-2.6574,-6.320 +3.3,a,102,-1.3858,1.156 +3.3,a,103,-0.7351,4.369 +3.3,a,104,-0.1202,7.015 +3.3,a,105,0.4888,8.716 +3.3,a,106,1.1037,9.682 +3.3,a,107,1.7246,11.467 +3.3,a,108,2.3335,12.328 +3.3,a,109,2.9245,13.546 +3.3,a,110,4.0409,16.402 +3.3,a,111,4.5663,18.376 +3.3,a,112,5.5215,24.067 +3.3,a,113,5.9513,27.007 +3.3,a,114,6.3453,31.165 +3.3,a,115,6.7035,34.000 +3.3,a,116,7.2946,38.074 +3.3,a,117,7.6946,41.014 +3.3,a,118,7.9453,43.093 +3.3,a,119,7.9214,42.715 +3.3,a,120,7.8558,41.476 +3.3,a,121,7.5811,36.940 +3.3,a,122,7.1334,32.677 +3.3,a,123,6.8468,28.519 +3.3,a,124,6.5125,24.067 +3.3,a,125,6.1304,19.699 +3.3,a,126,5.7066,16.024 +3.3,a,127,4.7633,9.577 +3.3,a,128,4.2379,6.742 +3.3,a,129,3.6887,4.369 +3.3,a,130,1.9276,-1.406 +3.3,a,131,1.3186,-3.485 +3.3,a,132,0.0709,-7.181 +3.3,b,0,-0.0485,1.240 +3.3,b,1,-0.0366,-0.188 +3.3,b,2,0.0172,-1.196 +3.3,b,3,0.1485,-1.406 +3.3,b,4,0.3575,-2.309 +3.3,b,5,1.0142,-4.115 +3.3,b,6,1.9395,-6.845 +3.3,b,7,3.7126,-12.515 +3.3,b,8,5.8618,-17.870 +3.3,b,9,6.6200,-18.983 +3.3,b,10,7.8916,-20.285 +3.3,b,11,8.1961,-20.789 +3.3,b,12,8.1722,-20.999 +3.3,b,13,7.9752,-21.797 +3.3,b,14,7.8200,-22.616 +3.3,b,15,7.6349,-23.225 +3.3,b,16,7.4200,-23.120 +3.3,b,17,6.8588,-20.684 +3.3,b,18,5.7006,-15.854 +3.3,b,19,4.2320,-8.966 +3.3,b,20,3.6828,-6.845 +3.3,b,21,3.1156,-5.438 +3.3,b,22,2.5246,-4.640 +3.3,b,23,1.9216,-4.220 +3.3,b,24,0.0590,-1.406 +3.3,b,25,-1.1828,0.022 +3.3,b,26,-1.7977,0.715 +3.3,b,27,-2.4007,2.038 +3.3,b,28,-2.9917,3.655 +3.3,b,29,-3.5648,5.776 +3.3,b,30,-4.1141,9.010 +3.3,b,31,-4.6335,12.454 +3.3,b,32,-5.6006,20.224 +3.3,b,33,-6.4185,27.301 +3.3,b,34,-7.0931,33.559 +3.3,b,35,-8.0364,41.350 +3.3,b,36,-8.0185,41.938 +3.3,b,37,-7.8274,43.870 +3.3,b,38,-7.6603,44.773 +3.3,b,39,-7.4573,44.584 +3.3,b,40,-7.2125,43.051 +3.3,b,41,-6.5797,37.612 +3.3,b,42,-5.7976,30.640 +3.3,b,43,-5.3499,26.902 +3.3,b,44,-4.3588,19.321 +3.3,b,45,-3.8096,15.982 +3.3,b,46,-2.6335,9.724 +3.3,b,47,-2.0067,7.099 +3.3,b,48,-0.7589,2.941 +3.3,b,49,0.4709,0.127 +3.3,b,50,1.0977,-1.091 +3.3,b,51,1.7126,-1.196 +3.3,b,52,2.3276,-2.204 +3.3,b,53,3.4857,-3.527 +3.3,b,54,4.0350,-5.039 +3.3,b,55,5.0618,-8.273 +3.3,b,56,5.5215,-9.680 +3.3,b,57,5.9514,-11.801 +3.3,b,58,6.3454,-14.237 +3.3,b,59,6.7036,-16.043 +3.3,b,60,7.0200,-17.975 +3.3,b,61,7.9453,-20.894 +3.3,b,62,7.9215,-21.104 +3.3,b,63,7.7304,-22.511 +3.3,b,64,7.5752,-23.120 +3.3,b,65,7.3782,-23.015 +3.3,b,66,6.8469,-20.495 +3.3,b,67,6.1305,-17.555 +3.3,b,68,5.2469,-13.523 +3.3,b,69,4.7574,-11.087 +3.3,b,70,4.2320,-8.777 +3.3,b,71,3.6828,-6.656 +3.3,b,72,3.1156,-5.333 +3.3,b,73,2.5305,-4.535 +3.3,b,74,1.9216,-4.031 +3.3,b,75,0.6918,-2.204 +3.3,b,76,0.0649,-1.490 +3.3,b,77,-1.1828,0.421 +3.3,b,78,-2.3947,2.248 +3.3,b,79,-2.9857,3.865 +3.3,b,80,-3.5589,5.986 +3.3,b,81,-4.1081,9.010 +3.3,b,82,-4.6394,12.748 +3.3,b,83,-5.5946,20.119 +3.3,b,84,-6.0245,23.059 +3.3,b,85,-6.4185,27.490 +3.3,b,86,-7.0931,33.874 +3.3,b,87,-7.6006,37.801 +3.3,b,88,-8.0364,41.434 +3.3,b,89,-8.0185,42.043 +3.3,b,90,-7.8274,43.870 +3.3,b,91,-7.6603,44.878 +3.3,b,92,-7.4573,44.668 +3.3,b,93,-7.2125,43.156 +3.3,b,94,-6.9200,40.846 +3.3,b,95,-5.7976,30.640 +3.3,b,96,-5.3558,26.986 +3.3,b,97,-4.3708,19.510 +3.3,b,98,-3.8275,16.192 +3.3,b,99,-2.6574,9.913 +3.3,b,100,-2.0305,7.393 +3.3,b,101,-1.3858,5.272 +3.3,b,102,0.4888,0.211 +3.3,b,103,1.1037,-0.797 +3.3,b,104,1.7246,-1.196 +3.3,b,105,2.9246,-3.023 +3.3,b,106,3.4917,-3.821 +3.3,b,107,4.0410,-4.934 +3.3,b,108,5.5215,-9.575 +3.3,b,109,6.3454,-13.733 +3.3,b,110,7.0200,-17.555 +3.3,b,111,7.9453,-20.684 +3.3,b,112,7.8558,-21.398 +3.3,b,113,7.7364,-22.217 +3.3,b,114,7.5812,-22.910 +3.3,b,115,7.3842,-22.826 +3.3,b,116,6.8469,-20.285 +3.3,b,117,6.1305,-17.366 +3.3,b,118,3.6887,-6.446 +3.3,b,119,3.1216,-5.144 +3.3,b,120,2.5365,-4.325 +3.3,b,121,1.9276,-3.821 +3.3,b,122,0.0709,-1.301 +3.4,a,0,-0.0485,40.650 +3.4,a,1,-0.0366,40.356 +3.4,a,2,0.0172,39.957 +3.4,a,3,0.1485,39.852 +3.4,a,4,0.3574,40.440 +3.4,a,5,1.0141,39.663 +3.4,a,6,1.4500,39.663 +3.4,a,7,1.9395,41.133 +3.4,a,8,2.4828,40.944 +3.4,a,9,3.0738,41.721 +3.4,a,10,3.7126,41.826 +3.4,a,11,4.3872,42.813 +3.4,a,12,5.1036,43.401 +3.4,a,13,5.8618,44.661 +3.4,a,14,8.1304,47.118 +3.4,a,15,8.1960,46.824 +3.4,a,16,8.1722,45.648 +3.4,a,17,8.0886,42.813 +3.4,a,18,7.9752,38.004 +3.4,a,19,7.6349,21.897 +3.4,a,20,7.4199,16.017 +3.4,a,21,7.1573,11.397 +3.4,a,22,6.8588,7.386 +3.4,a,23,6.5185,1.296 +3.4,a,24,6.1304,-4.899 +3.4,a,25,5.7006,-10.380 +3.4,a,26,5.2409,-15.882 +3.4,a,27,4.7514,-21.090 +3.4,a,28,4.2320,-25.500 +3.4,a,29,3.6827,-28.629 +3.4,a,30,2.5246,-33.144 +3.4,a,31,1.9216,-35.811 +3.4,a,32,0.6918,-39.633 +3.4,a,33,-2.4007,-42.678 +3.4,a,34,-2.9917,-43.161 +3.4,a,35,-3.5648,-43.266 +3.4,a,36,-4.6335,-43.749 +3.4,a,37,-5.1349,-43.854 +3.4,a,38,-5.6006,-45.324 +3.4,a,39,-6.0245,-46.983 +3.4,a,40,-7.0931,-54.144 +3.4,a,41,-7.7916,-60.633 +3.4,a,42,-7.9289,-61.326 +3.4,a,43,-8.0125,-60.927 +3.4,a,44,-8.0364,-59.541 +3.4,a,45,-8.0185,-55.320 +3.4,a,46,-7.8274,-41.502 +3.4,a,47,-7.6603,-31.296 +3.4,a,48,-7.4573,-24.114 +3.4,a,49,-7.2125,-18.045 +3.4,a,50,-6.9200,-12.060 +3.4,a,51,-6.5797,-5.571 +3.4,a,52,-6.2095,1.107 +3.4,a,53,-5.7976,7.470 +3.4,a,54,-5.3499,13.959 +3.4,a,55,-4.8663,20.532 +3.4,a,56,-4.3588,25.824 +3.4,a,57,-3.8096,30.843 +3.4,a,58,-3.2365,33.972 +3.4,a,59,-2.6335,36.030 +3.4,a,60,-1.3798,39.180 +3.4,a,61,-0.7589,39.663 +3.4,a,62,-0.1440,40.440 +3.4,a,63,0.4709,40.440 +3.4,a,64,1.0977,39.663 +3.4,a,65,1.7126,40.251 +3.4,a,66,2.3275,40.251 +3.4,a,67,3.4857,39.558 +3.4,a,68,4.0350,40.734 +3.4,a,69,5.0618,40.251 +3.4,a,70,5.5215,41.532 +3.4,a,71,5.9513,41.721 +3.4,a,72,6.3453,43.002 +3.4,a,73,6.7035,43.695 +3.4,a,74,7.0200,43.884 +3.4,a,75,7.2886,45.060 +3.4,a,76,7.5155,45.648 +3.4,a,77,7.6946,46.446 +3.4,a,78,7.8259,46.740 +3.4,a,79,7.9095,46.341 +3.4,a,80,7.9453,45.165 +3.4,a,81,7.9214,42.519 +3.4,a,82,7.8498,37.605 +3.4,a,83,7.5752,21.708 +3.4,a,84,7.3782,15.723 +3.4,a,85,7.1334,11.103 +3.4,a,86,6.8468,7.176 +3.4,a,87,6.5125,1.002 +3.4,a,88,6.1304,-5.088 +3.4,a,89,5.7066,-10.674 +3.4,a,90,5.2469,-15.987 +3.4,a,91,4.7573,-21.174 +3.4,a,92,4.2320,-25.689 +3.4,a,93,3.6827,-28.545 +3.4,a,94,2.5305,-33.354 +3.4,a,95,1.9216,-35.811 +3.4,a,96,1.3126,-37.764 +3.4,a,97,0.0649,-40.620 +3.4,a,98,-0.5560,-41.586 +3.4,a,99,-1.7977,-41.985 +3.4,a,100,-3.5589,-43.266 +3.4,a,101,-4.6394,-43.350 +3.4,a,102,-5.1349,-44.148 +3.4,a,103,-5.5946,-45.429 +3.4,a,104,-6.0245,-47.865 +3.4,a,105,-6.4185,-49.251 +3.4,a,106,-6.7767,-51.603 +3.4,a,107,-7.3677,-56.706 +3.4,a,108,-7.6006,-59.163 +3.4,a,109,-7.7916,-60.738 +3.4,a,110,-7.9289,-61.515 +3.4,a,111,-8.0125,-61.032 +3.4,a,112,-8.0364,-59.541 +3.4,a,113,-8.0185,-55.530 +3.4,a,114,-7.8274,-41.502 +3.4,a,115,-7.6603,-31.674 +3.4,a,116,-7.4573,-24.114 +3.4,a,117,-7.2125,-18.234 +3.4,a,118,-6.9200,-12.144 +3.4,a,119,-6.5797,-5.676 +3.4,a,120,-6.2095,0.897 +3.4,a,121,-5.3558,13.854 +3.4,a,122,-4.8782,20.322 +3.4,a,123,-4.3708,25.635 +3.4,a,124,-3.8275,30.444 +3.4,a,125,-3.2544,33.972 +3.4,a,126,-2.6574,36.240 +3.4,a,127,-1.3858,38.676 +3.4,a,128,-0.7351,39.180 +3.4,a,129,-0.1202,40.251 +3.4,a,130,1.1037,39.663 +3.4,a,131,1.7246,39.768 +3.4,a,132,2.3335,40.356 +3.4,a,133,2.9245,40.062 +3.4,a,134,3.4917,39.474 +3.4,a,135,4.0409,40.251 +3.4,a,136,4.5663,40.545 +3.4,a,137,5.0618,39.957 +3.4,a,138,5.5215,41.637 +3.4,a,139,5.9513,41.427 +3.4,a,140,6.7035,43.590 +3.4,a,141,7.2946,45.060 +3.4,a,142,7.8259,46.740 +3.4,a,143,7.9155,46.236 +3.4,a,144,7.9453,45.165 +3.4,a,145,7.9214,42.414 +3.4,a,146,7.8558,37.416 +3.4,a,147,7.5811,21.603 +3.4,a,148,7.3841,15.723 +3.4,a,149,7.1334,10.914 +3.4,a,150,6.8468,6.798 +3.4,a,151,6.5125,0.897 +3.4,a,152,6.1304,-5.193 +3.4,a,153,5.7066,-10.884 +3.4,a,154,5.2528,-16.071 +3.4,a,155,4.7633,-21.279 +3.4,a,156,4.2379,-25.689 +3.4,a,157,3.6887,-28.734 +3.4,a,158,3.1216,-30.708 +3.4,a,159,1.9276,-35.895 +3.4,a,160,0.6977,-39.633 +3.4,a,161,0.0709,-40.410 +3.4,b,0,-0.0485,17.221 +3.4,b,1,-0.0366,16.738 +3.4,b,2,0.0172,16.339 +3.4,b,3,0.1485,15.856 +3.4,b,4,0.3575,16.045 +3.4,b,5,0.6500,15.751 +3.4,b,6,1.0142,15.079 +3.4,b,7,1.4500,14.785 +3.4,b,8,1.9395,15.646 +3.4,b,9,2.4828,15.373 +3.4,b,10,3.0738,15.751 +3.4,b,11,3.7126,15.646 +3.4,b,12,4.3872,15.940 +3.4,b,13,5.1036,15.856 +3.4,b,14,5.8618,16.444 +3.4,b,15,7.3543,16.633 +3.4,b,16,8.1304,16.444 +3.4,b,17,8.1961,15.940 +3.4,b,18,8.1722,14.869 +3.4,b,19,8.0886,12.916 +3.4,b,20,7.8200,5.209 +3.4,b,21,7.6349,0.316 +3.4,b,22,7.1573,-6.509 +3.4,b,23,6.8588,-10.709 +3.4,b,24,6.5185,-13.922 +3.4,b,25,6.1305,-16.379 +3.4,b,26,5.7006,-17.933 +3.4,b,27,5.2409,-18.710 +3.4,b,28,4.7514,-18.815 +3.4,b,29,4.2320,-18.416 +3.4,b,30,3.6828,-17.639 +3.4,b,31,3.1156,-17.156 +3.4,b,32,1.9216,-17.534 +3.4,b,33,1.3067,-17.240 +3.4,b,34,0.6918,-17.744 +3.4,b,35,-2.4007,-15.980 +3.4,b,36,-4.6335,-15.392 +3.4,b,37,-5.1349,-15.098 +3.4,b,38,-5.6006,-15.581 +3.4,b,39,-6.0245,-15.581 +3.4,b,40,-6.4185,-15.875 +3.4,b,41,-7.0931,-15.203 +3.4,b,42,-7.7916,-13.922 +3.4,b,43,-7.9289,-13.334 +3.4,b,44,-8.0125,-12.473 +3.4,b,45,-8.0364,-11.192 +3.4,b,46,-8.0185,-8.273 +3.4,b,47,-7.9409,-4.556 +3.4,b,48,-7.8274,0.232 +3.4,b,49,-7.6603,5.608 +3.4,b,50,-7.4573,9.787 +3.4,b,51,-7.2125,13.798 +3.4,b,52,-6.9200,17.032 +3.4,b,53,-6.5797,19.468 +3.4,b,54,-6.2096,21.022 +3.4,b,55,-5.7976,21.505 +3.4,b,56,-5.3499,21.127 +3.4,b,57,-4.3588,18.985 +3.4,b,58,-3.8096,18.187 +3.4,b,59,-2.6335,17.116 +3.4,b,60,-2.0067,17.116 +3.4,b,61,-1.3798,17.410 +3.4,b,62,0.4709,16.822 +3.4,b,63,1.0977,16.045 +3.4,b,64,2.3276,16.045 +3.4,b,65,3.4857,15.268 +3.4,b,66,4.0350,15.940 +3.4,b,67,5.0618,15.163 +3.4,b,68,5.5215,15.856 +3.4,b,69,5.9514,15.562 +3.4,b,70,6.3454,16.234 +3.4,b,71,6.7036,16.339 +3.4,b,72,7.0200,16.150 +3.4,b,73,7.5155,16.822 +3.4,b,74,7.8259,16.528 +3.4,b,75,7.9095,16.045 +3.4,b,76,7.9453,14.974 +3.4,b,77,7.9215,13.021 +3.4,b,78,7.8498,9.703 +3.4,b,79,7.7304,5.314 +3.4,b,80,7.5752,0.316 +3.4,b,81,7.3782,-2.897 +3.4,b,82,6.8469,-10.604 +3.4,b,83,6.5125,-13.733 +3.4,b,84,6.1305,-16.274 +3.4,b,85,5.7066,-17.828 +3.4,b,86,5.2469,-18.626 +3.4,b,87,4.7574,-18.710 +3.4,b,88,4.2320,-18.416 +3.4,b,89,3.6828,-17.534 +3.4,b,90,3.1156,-17.051 +3.4,b,91,0.6918,-17.240 +3.4,b,92,-0.5560,-16.946 +3.4,b,93,-2.3947,-15.791 +3.4,b,94,-4.6394,-14.909 +3.4,b,95,-6.0245,-16.085 +3.4,b,96,-6.7767,-15.287 +3.4,b,97,-7.3677,-14.615 +3.4,b,98,-7.7916,-13.838 +3.4,b,99,-7.9289,-13.145 +3.4,b,100,-8.0125,-12.263 +3.4,b,101,-8.0364,-11.003 +3.4,b,102,-8.0185,-8.063 +3.4,b,103,-7.8274,0.316 +3.4,b,104,-7.6603,5.797 +3.4,b,105,-7.4573,9.997 +3.4,b,106,-7.2125,13.987 +3.4,b,107,-6.9200,17.116 +3.4,b,108,-6.5797,19.552 +3.4,b,109,-6.2096,21.127 +3.4,b,110,-5.7976,21.715 +3.4,b,111,-5.3558,21.211 +3.4,b,112,-3.8275,18.397 +3.4,b,113,-3.2544,17.809 +3.4,b,114,-2.0305,17.305 +3.4,b,115,0.4888,16.822 +3.4,b,116,1.1037,16.339 +3.4,b,117,2.3335,16.339 +3.4,b,118,4.0410,15.457 +3.4,b,119,4.5663,15.751 +3.4,b,120,5.0618,15.079 +3.4,b,121,5.5215,16.045 +3.4,b,122,5.9514,15.562 +3.4,b,123,6.3454,16.234 +3.4,b,124,7.8259,16.738 +3.4,b,125,7.9155,16.045 +3.4,b,126,7.9453,15.079 +3.4,b,127,7.9215,13.126 +3.4,b,128,7.8558,9.787 +3.4,b,129,7.7364,5.398 +3.4,b,130,7.5812,0.526 +3.4,b,131,7.3842,-2.792 +3.4,b,132,6.8469,-10.415 +3.4,b,133,6.5125,-13.733 +3.4,b,134,6.1305,-16.169 +3.4,b,135,5.7066,-17.639 +3.4,b,136,5.2529,-18.521 +3.4,b,137,4.7633,-18.626 +3.4,b,138,4.2380,-18.227 +3.4,b,139,3.1216,-16.862 +3.4,b,140,1.9276,-17.345 +3.4,b,141,1.3186,-17.051 +3.4,b,142,0.6977,-17.345 +3.4,b,143,0.0709,-17.051 +3.5,a,0,-0.0485,24.315 +3.5,a,1,-0.0366,23.349 +3.5,a,2,0.0172,22.656 +3.5,a,3,0.1485,22.362 +3.5,a,4,0.3574,22.572 +3.5,a,5,1.0141,21.501 +3.5,a,6,1.4500,21.795 +3.5,a,7,1.9395,22.761 +3.5,a,8,2.4828,22.761 +3.5,a,9,3.0738,23.832 +3.5,a,10,3.7126,23.727 +3.5,a,11,4.3872,24.315 +3.5,a,12,5.1036,24.315 +3.5,a,13,5.8618,25.470 +3.5,a,14,7.8916,26.541 +3.5,a,15,8.1304,26.163 +3.5,a,16,8.1960,25.575 +3.5,a,17,8.1722,24.021 +3.5,a,18,8.0886,21.396 +3.5,a,19,7.8199,11.400 +3.5,a,20,7.6349,4.512 +3.5,a,21,7.4199,-1.011 +3.5,a,22,7.1573,-6.555 +3.5,a,23,6.8588,-12.288 +3.5,a,24,6.5185,-15.480 +3.5,a,25,6.1304,-18.399 +3.5,a,26,5.7006,-20.037 +3.5,a,27,5.2409,-21.297 +3.5,a,28,4.2320,-22.662 +3.5,a,29,3.6827,-22.956 +3.5,a,30,3.1156,-22.284 +3.5,a,31,2.5246,-22.473 +3.5,a,32,1.9216,-23.145 +3.5,a,33,1.3067,-23.334 +3.5,a,34,0.6918,-24.510 +3.5,a,35,-1.7977,-24.111 +3.5,a,36,-2.9917,-24.888 +3.5,a,37,-6.4185,-27.219 +3.5,a,38,-7.0931,-27.030 +3.5,a,39,-7.3677,-27.324 +3.5,a,40,-7.9289,-26.358 +3.5,a,41,-8.0125,-24.993 +3.5,a,42,-8.0364,-23.439 +3.5,a,43,-8.0185,-19.659 +3.5,a,44,-7.9408,-14.514 +3.5,a,45,-7.8274,-8.109 +3.5,a,46,-7.6603,-0.822 +3.5,a,47,-7.4573,5.772 +3.5,a,48,-7.2125,12.282 +3.5,a,49,-6.9200,16.734 +3.5,a,50,-6.5797,20.136 +3.5,a,51,-6.2095,22.572 +3.5,a,52,-5.7976,23.916 +3.5,a,53,-5.3499,24.798 +3.5,a,54,-3.8096,25.764 +3.5,a,55,-2.0067,24.987 +3.5,a,56,-1.3798,24.798 +3.5,a,57,-0.7589,24.210 +3.5,a,58,-0.1440,24.420 +3.5,a,59,0.4709,23.727 +3.5,a,60,1.0977,22.362 +3.5,a,61,1.7126,22.173 +3.5,a,62,2.3275,22.362 +3.5,a,63,3.4857,21.585 +3.5,a,64,4.0350,22.656 +3.5,a,65,4.5663,22.761 +3.5,a,66,5.0618,22.278 +3.5,a,67,5.5215,23.139 +3.5,a,68,5.9513,23.349 +3.5,a,69,6.3453,24.798 +3.5,a,70,7.0200,25.470 +3.5,a,71,7.2886,26.163 +3.5,a,72,7.6946,26.352 +3.5,a,73,7.8259,26.247 +3.5,a,74,7.9095,25.470 +3.5,a,75,7.9453,23.832 +3.5,a,76,7.9214,21.207 +3.5,a,77,7.8498,17.028 +3.5,a,78,7.7304,11.106 +3.5,a,79,7.5752,4.512 +3.5,a,80,7.3782,-1.011 +3.5,a,81,7.1334,-6.555 +3.5,a,82,6.8468,-12.372 +3.5,a,83,6.5125,-15.669 +3.5,a,84,6.1304,-18.294 +3.5,a,85,5.7066,-20.037 +3.5,a,86,5.2469,-21.402 +3.5,a,87,4.7573,-22.179 +3.5,a,88,4.2320,-22.662 +3.5,a,89,3.6827,-22.851 +3.5,a,90,3.1156,-22.074 +3.5,a,91,1.9216,-22.851 +3.5,a,92,1.3126,-23.628 +3.5,a,93,0.6918,-23.733 +3.5,a,94,0.0649,-24.321 +3.5,a,95,-1.1828,-24.510 +3.5,a,96,-1.7977,-23.922 +3.5,a,97,-3.5589,-24.993 +3.5,a,98,-4.6394,-25.581 +3.5,a,99,-5.1349,-26.358 +3.5,a,100,-5.5946,-26.547 +3.5,a,101,-6.0245,-27.219 +3.5,a,102,-7.0931,-27.219 +3.5,a,103,-7.3677,-27.219 +3.5,a,104,-7.7916,-26.736 +3.5,a,105,-7.9289,-26.064 +3.5,a,106,-8.0125,-25.098 +3.5,a,107,-8.0364,-23.439 +3.5,a,108,-8.0185,-19.659 +3.5,a,109,-7.9408,-14.514 +3.5,a,110,-7.8274,-8.193 +3.5,a,111,-7.6603,-0.444 +3.5,a,112,-7.4573,5.583 +3.5,a,113,-7.2125,11.988 +3.5,a,114,-6.9200,16.650 +3.5,a,115,-6.5797,20.136 +3.5,a,116,-6.2095,22.572 +3.5,a,117,-5.7976,24.021 +3.5,a,118,-5.3558,24.693 +3.5,a,119,-3.2544,25.680 +3.5,a,120,-0.7351,24.126 +3.5,a,121,-0.1202,24.315 +3.5,a,122,1.1037,22.467 +3.5,a,123,2.9245,22.278 +3.5,a,124,3.4917,21.690 +3.5,a,125,4.0409,22.362 +3.5,a,126,4.5663,22.656 +3.5,a,127,5.0618,22.362 +3.5,a,128,5.5215,23.433 +3.5,a,129,5.9513,23.433 +3.5,a,130,7.0200,25.680 +3.5,a,131,7.5214,26.352 +3.5,a,132,7.6946,26.457 +3.5,a,133,7.8259,26.163 +3.5,a,134,7.9155,25.470 +3.5,a,135,7.9453,24.021 +3.5,a,136,7.9214,21.501 +3.5,a,137,7.8558,17.238 +3.5,a,138,7.7364,11.316 +3.5,a,139,7.5811,4.512 +3.5,a,140,7.3841,-0.822 +3.5,a,141,7.1334,-6.450 +3.5,a,142,6.8468,-12.078 +3.5,a,143,6.5125,-15.669 +3.5,a,144,6.1304,-18.399 +3.5,a,145,5.7066,-19.953 +3.5,a,146,5.2528,-21.213 +3.5,a,147,4.7633,-21.696 +3.5,a,148,4.2379,-22.662 +3.5,a,149,3.6887,-22.557 +3.5,a,150,3.1216,-21.990 +3.5,a,151,2.5365,-22.368 +3.5,a,152,1.9276,-23.061 +3.5,a,153,1.3186,-23.439 +3.5,a,154,0.6977,-24.216 +3.5,a,155,0.0709,-24.321 +3.5,b,0,-0.0485,30.220 +3.5,b,1,-0.0366,29.716 +3.5,b,2,0.0172,29.422 +3.5,b,3,0.1485,29.422 +3.5,b,4,0.6500,29.926 +3.5,b,5,1.0142,29.317 +3.5,b,6,1.4500,29.128 +3.5,b,7,1.9395,30.430 +3.5,b,8,2.4828,30.430 +3.5,b,9,3.0738,31.228 +3.5,b,10,5.1036,32.614 +3.5,b,11,5.8618,33.811 +3.5,b,12,7.8916,35.113 +3.5,b,13,8.1304,34.903 +3.5,b,14,8.1961,34.210 +3.5,b,15,8.1722,32.803 +3.5,b,16,8.0886,30.115 +3.5,b,17,7.6349,13.000 +3.5,b,18,7.4200,7.729 +3.5,b,19,7.1573,2.731 +3.5,b,20,6.8588,-1.847 +3.5,b,21,6.1305,-10.415 +3.5,b,22,5.7006,-14.489 +3.5,b,23,5.2409,-18.080 +3.5,b,24,4.7514,-21.062 +3.5,b,25,4.2320,-23.246 +3.5,b,26,3.6828,-24.653 +3.5,b,27,3.1156,-25.241 +3.5,b,28,1.3067,-28.328 +3.5,b,29,0.6918,-29.819 +3.5,b,30,0.0590,-30.218 +3.5,b,31,-1.1828,-30.512 +3.5,b,32,-2.9917,-31.709 +3.5,b,33,-5.1349,-33.305 +3.5,b,34,-6.0245,-35.300 +3.5,b,35,-6.4185,-36.791 +3.5,b,36,-7.3677,-39.689 +3.5,b,37,-7.7916,-40.970 +3.5,b,38,-7.9289,-40.886 +3.5,b,39,-8.0125,-40.088 +3.5,b,40,-8.0364,-38.576 +3.5,b,41,-8.0185,-34.712 +3.5,b,42,-7.9409,-29.714 +3.5,b,43,-7.8274,-23.351 +3.5,b,44,-7.6603,-16.085 +3.5,b,45,-7.4573,-10.100 +3.5,b,46,-7.2125,-4.829 +3.5,b,47,-6.9200,0.358 +3.5,b,48,-6.5797,5.734 +3.5,b,49,-6.2096,10.711 +3.5,b,50,-5.7976,15.289 +3.5,b,51,-5.3499,19.069 +3.5,b,52,-4.8663,21.967 +3.5,b,53,-4.3588,24.151 +3.5,b,54,-3.8096,25.747 +3.5,b,55,-2.6335,27.532 +3.5,b,56,-2.0067,28.225 +3.5,b,57,-1.3798,29.233 +3.5,b,58,-0.7589,29.527 +3.5,b,59,-0.1440,30.115 +3.5,b,60,1.0977,29.233 +3.5,b,61,2.3276,29.527 +3.5,b,62,3.4857,29.233 +3.5,b,63,4.0350,30.115 +3.5,b,64,4.5663,30.430 +3.5,b,65,5.0618,30.115 +3.5,b,66,5.5215,31.018 +3.5,b,67,5.9514,31.123 +3.5,b,68,6.3454,32.509 +3.5,b,69,6.7036,33.202 +3.5,b,70,7.0200,33.307 +3.5,b,71,7.5155,34.609 +3.5,b,72,7.6946,34.903 +3.5,b,73,7.8259,34.798 +3.5,b,74,7.9095,34.105 +3.5,b,75,7.9453,32.803 +3.5,b,76,7.9215,30.031 +3.5,b,77,7.8498,25.642 +3.5,b,78,7.7304,19.762 +3.5,b,79,7.5752,13.000 +3.5,b,80,7.3782,7.624 +3.5,b,81,7.1334,2.647 +3.5,b,82,6.8469,-1.742 +3.5,b,83,6.1305,-10.415 +3.5,b,84,5.7066,-14.489 +3.5,b,85,5.2469,-18.080 +3.5,b,86,4.7574,-20.957 +3.5,b,87,4.2320,-23.351 +3.5,b,88,3.6828,-24.653 +3.5,b,89,3.1156,-25.241 +3.5,b,90,0.6918,-29.420 +3.5,b,91,-0.5560,-30.512 +3.5,b,92,-1.1828,-30.827 +3.5,b,93,-1.7977,-30.722 +3.5,b,94,-2.9857,-31.415 +3.5,b,95,-4.1081,-32.213 +3.5,b,96,-4.6394,-32.402 +3.5,b,97,-5.5946,-34.397 +3.5,b,98,-6.0245,-35.699 +3.5,b,99,-6.4185,-36.497 +3.5,b,100,-7.7916,-40.886 +3.5,b,101,-7.9289,-40.781 +3.5,b,102,-8.0125,-40.088 +3.5,b,103,-8.0364,-38.492 +3.5,b,104,-8.0185,-34.712 +3.5,b,105,-7.9409,-29.714 +3.5,b,106,-7.8274,-23.351 +3.5,b,107,-7.6603,-16.085 +3.5,b,108,-7.4573,-10.100 +3.5,b,109,-7.2125,-4.829 +3.5,b,110,-6.9200,0.253 +3.5,b,111,-6.5797,5.629 +3.5,b,112,-6.2096,10.711 +3.5,b,113,-5.7976,15.184 +3.5,b,114,-5.3558,18.964 +3.5,b,115,-4.8782,21.967 +3.5,b,116,-4.3708,24.046 +3.5,b,117,-3.8275,25.747 +3.5,b,118,-2.6574,27.931 +3.5,b,119,-1.3858,29.233 +3.5,b,120,-0.7351,29.317 +3.5,b,121,-0.1201,30.031 +3.5,b,122,1.1037,29.023 +3.5,b,123,1.7246,29.422 +3.5,b,124,2.9246,29.821 +3.5,b,125,3.4917,29.317 +3.5,b,126,4.0410,29.317 +3.5,b,127,4.5663,30.430 +3.5,b,128,5.0618,30.031 +3.5,b,129,5.5215,31.123 +3.5,b,130,5.9514,31.312 +3.5,b,131,7.6946,34.903 +3.5,b,132,7.8259,34.798 +3.5,b,133,7.9155,34.105 +3.5,b,134,7.9453,32.719 +3.5,b,135,7.9215,30.031 +3.5,b,136,7.8558,25.642 +3.5,b,137,7.5812,12.895 +3.5,b,138,7.3842,7.519 +3.5,b,139,7.1334,2.647 +3.5,b,140,6.8469,-1.847 +3.5,b,141,6.1305,-10.415 +3.5,b,142,5.7066,-14.489 +3.5,b,143,5.2529,-18.080 +3.5,b,144,4.7633,-20.957 +3.5,b,145,4.2380,-23.141 +3.5,b,146,3.6887,-24.548 +3.5,b,147,3.1216,-25.241 +3.5,b,148,1.3186,-28.328 +3.5,b,149,0.6977,-29.630 +3.5,b,150,0.0709,-30.113 diff --git a/validation/paper_data/saevik2011_figs17_23.csv b/validation/paper_data/saevik2011_figs17_23.csv index d9e14f6..99af42b 100644 --- a/validation/paper_data/saevik2011_figs17_23.csv +++ b/validation/paper_data/saevik2011_figs17_23.csv @@ -14,8 +14,8 @@ # 0.5 % of the axis span); NOT experimental uncertainty. # Load case 4: Table 2 prints 34 MPa, Table 3 and the Fig. 19(b) caption 17 MPa (17 used). # Normalisation: 'with respect to the static stress level' (Sec. 7.4); its value is not -# printed. Whether the measured value is the tendon axial stress or one side of the -# tendon is not stated (one side was lost at stations 2.1-2.5, Sec. 7.4). +# printed. The quantity is not stated (one side was lost at stations 2.1-2.5, p. 2289); +# at LC 14, 3.1-3.5 it matches the larger side range of Lukassen (2019) (row SV11-SIDE). figure,load_case,angle_range_deg,tension_kN,pressure_MPa,station,tendon,azimuth_deg,x_mm,measured,mm_model,sbm_model,reading_resolution 17a,7,0.5,500,34,1.1,1,0,-570,0.0693,0.0482,0.0760,0.0088 17a,7,0.5,500,34,1.2,1,45,-343,0.0274,0.0551,0.0658,0.0088 diff --git a/validation/scripts/check_core_friction.py b/validation/scripts/check_core_friction.py index 9ae6b2f..76970f4 100644 --- a/validation/scripts/check_core_friction.py +++ b/validation/scripts/check_core_friction.py @@ -516,3 +516,78 @@ def menard() -> None: f"targets {'PASS' if out['pass'] else 'FAIL'}" ) print("Janocha Fig. 6 half-height, code-to-code:", janocha_code_to_code()) + + +#: Skeie, Sødahl, Pettersen and Verde (2023, OMAE2023-104817), Sec. 4.2 and +#: Table 1: three tubes in core-core contact only. +SKEIE2023 = { + "r_helix_m": 5.37e-3, + "lay_angle_deg": 7.6, + "tube_outer_radius_m": 4.65e-3, + "tube_thickness_m": 0.1e-3, + "E_Pa": 2.1e11, + "mu": 0.2, + "contact_N_per_m": 4.44e3, # per neighbour (Table 1 prints 4.44 "MPa") + "table1_onset_1_mm": 2.25e-5, + "table1_full_model_1_mm": 2.36e-5, + "table1_full_fe_1_mm": 2.37e-5, +} + + +def skeie2023_table1(stations_per_core: int = 720) -> dict[str, float]: + """Skeie et al. (2023) Table 1 through the coupled stations of CableXSec. + + Three tubes, core-core friction only (``StationCoupling`` with no + interlayer share), monotonic planar bending. Returns the onset curvature + (contact load per metre of cable, as CableXSec takes it, and per metre of + helix, as their Eq. 16 matches), the curvature at which the largest + friction stress stops growing, and the coalescence (every station + slipping), as ratios of the onset. + """ + from cablexsec.mechanics.mkappa import HelicalLayerSpec # noqa: PLC0415 + from cablexsec.mechanics.papailiou import ( # noqa: PLC0415 + slip_onset_curvature, + wire_slip_history, + ) + from cablexsec.mechanics.station_coupling import StationCoupling # noqa: PLC0415 + + sk = SKEIE2023 + n = 3 + ro, t = sk["tube_outer_radius_m"], sk["tube_thickness_m"] + area = math.pi * (ro**2 - (ro - t) ** 2) + q = 2.0 * sk["contact_N_per_m"] # both neighbours of one core + r_c, beta = sk["r_helix_m"], math.radians(sk["lay_angle_deg"]) + pressure = n * q / (2.0 * math.pi * r_c) + layer = HelicalLayerSpec( + n_wires=n * stations_per_core, + r_helix_m=r_c, + lay_angle_rad=beta, + E_wire_Pa=sk["E_Pa"], + A_wire_m2=area / stations_per_core, + xi=1.0, + mu=sk["mu"], + F_n_axi_N=q, + contact_pressure_Pa=pressure, + normal_load_is_line=True, + ) + coupling = StationCoupling(n, 0.0, sk["mu"], pressure) + onset = slip_onset_curvature(layer) + a = np.linspace(0.0, 1.4, 14001) + history = wire_slip_history( + layer, + a * onset, + np.zeros_like(a), + coupling=coupling, + direction_hold_fraction=0.0, + ) + peak = np.max(np.abs(history.stress_Pa), axis=0) + slipping = history.slipping_count + closed = sk["mu"] * q / (sk["E_Pa"] * area * math.cos(beta) ** 2 * math.sin(beta)) + return { + "onset_1_mm": onset * 1e-3, + "onset_helix_1_mm": onset / math.cos(beta) * 1e-3, + "eq16_1_mm": closed * 1e-3, + "first_slip_ratio": float(a[np.argmax(slipping > 0)]), + "saturation_ratio": float(a[np.argmax(peak >= peak[-1] * (1.0 - 1e-9))]), + "coalescence_ratio": float(a[np.argmax(slipping == n * stations_per_core)]), + } diff --git a/validation/scripts/check_saevik2011.py b/validation/scripts/check_saevik2011.py index 2b77857..8d10560 100644 --- a/validation/scripts/check_saevik2011.py +++ b/validation/scripts/check_saevik2011.py @@ -54,6 +54,7 @@ import sys import time import warnings +from collections.abc import Callable from dataclasses import dataclass, replace from functools import lru_cache from pathlib import Path @@ -718,6 +719,192 @@ def gjosteen( } +# --------------------------------------------------------------------------- # +# Measured quantity and normaliser (SV11-LK, SV11-SIDE, SV11-SUB, SV11-NORM) # +# --------------------------------------------------------------------------- # +LK_STATIONS = ("3.1", "3.2", "3.3", "3.4", "3.5") +#: Coincident bending-plane pairs (one axial position, opposite sides). +PAIRS = (("1.5", "2.1"), ("2.5", "3.1"), ("3.5", "4.1")) +ONE_SIDED = ("2.1", "2.5") # [Saevik2011] p. 2289: one side lost at 2.1-2.5 + + +def measured_lukassen() -> dict[str, dict[str, tuple[np.ndarray, np.ndarray]]]: + """Lukassen (2019) Figs 2.7-2.11: measured (theta [deg], stress [MPa]) of + side ``a`` and side ``b`` at stations 3.1-3.5, LC 14 at +-8 deg.""" + raw: dict[str, dict[str, tuple[list[float], list[float]]]] = {} + for r in _rows(DATA / "lukassen2019_lc14_two_sides.csv"): + theta, stress = raw.setdefault(r["station"], {}).setdefault(r["side"], ([], [])) + theta.append(float(r["theta_deg"])) + stress.append(float(r["stress_MPa"])) + return { + st: {sd: (np.asarray(t), np.asarray(s)) for sd, (t, s) in sides.items()} + for st, sides in raw.items() + } + + +def _legs(theta: np.ndarray, stress: np.ndarray) -> list[tuple[np.ndarray, np.ndarray]]: + """Monotonic legs of a record from its first reversal on.""" + sign = np.sign(np.diff(theta)) + moving = np.flatnonzero(sign != 0) + turns = [ + int(moving[i + 1]) + for i in range(moving.size - 1) + if sign[moving[i + 1]] != sign[moving[i]] + ] + bounds = [*turns, theta.size - 1] + return [ + (theta[a : b + 1], stress[a : b + 1]) + for a, b in zip(bounds[:-1], bounds[1:], strict=True) + ] + + +def lukassen_measured_ranges() -> dict[str, dict[str, float]]: + """Measured ranges [MPa] at 3.1-3.5 (the SV11-LK registered reduction). + + Each side, the larger side, and the axial (sigma_a + sigma_b) / 2 with the + two sides paired at equal theta on the same leg (linear interpolation), + all from the first reversal on. + """ + out = {} + for st, sides in measured_lukassen().items(): + legs_a = _legs(*sides["a"]) + legs_b = _legs(*sides["b"]) + if len(legs_a) != len(legs_b): + raise RuntimeError(f"station {st}: the two sides have different legs") + axial = [] + for (ta, sa), (tb, sb) in zip(legs_a, legs_b, strict=True): + lo = max(min(ta[0], ta[-1]), min(tb[0], tb[-1])) + hi = min(max(ta[0], ta[-1]), max(tb[0], tb[-1])) + grid = np.linspace(lo, hi, 401) + oa, ob = np.argsort(ta), np.argsort(tb) + axial.append( + 0.5 + * (np.interp(grid, ta[oa], sa[oa]) + np.interp(grid, tb[ob], sb[ob])) + ) + ra = float(np.ptp(np.concatenate([s for _t, s in legs_a]))) + rb = float(np.ptp(np.concatenate([s for _t, s in legs_b]))) + out[st] = { + "a": ra, + "b": rb, + "larger": max(ra, rb), + "axial": float(np.ptp(np.concatenate(axial))), + } + return out + + +def lukassen_values(mu: float = MU_DECLARED) -> dict: + """SV11-LK and SV11-SIDE (reported, not gated). + + Lukassen's two-sided LC 14 records against the SV11-GJ chain at +-8 deg, + and the static stress that Sævik's normalised LC 14 values imply for each + reading of the two sides. + """ + case = next(c for c in load_cases() if c.lc == 14) + res = predict_case(case, mu, half_angle_deg=GJ_HALF_ANGLE_DEG, only=LK_STATIONS) + meas = lukassen_measured_ranges() + stations = {} + for st in LK_STATIONS: + v = res["stations"][st] + stations[st] = { + "measured": meas[st], + "sectional_axial_MPa": v["sectional"]["axial_p"] / 1e6, + "termination_axial_MPa": v["termination"]["axial_p"] / 1e6, + "sectional_side_MPa": v["sectional"]["side_hi_p"] / 1e6, + "termination_side_MPa": v["termination"]["side_hi_p"] / 1e6, + } + + def mean_ratio(names: tuple[str, ...], pred: str, quantity: str) -> float: + p = np.mean([stations[s][pred] for s in names]) + m = np.mean([stations[s]["measured"][quantity] for s in names]) + return float(p / m) + + ratios = {} + for label, names in (("plane", ("3.1", "3.5")), ("all", LK_STATIONS)): + ratios[label] = { + "sectional_axial": mean_ratio(names, "sectional_axial_MPa", "axial"), + "termination_axial": mean_ratio(names, "termination_axial_MPa", "axial"), + "sectional_side": mean_ratio(names, "sectional_side_MPa", "larger"), + "termination_side": mean_ratio(names, "termination_side_MPa", "larger"), + } + norm = { + r["station"]: float(r["measured"]) + for r in measured_saevik() + if r["load_case"] == "14" and r["station"] in LK_STATIONS + } + implied = {} + for quantity in ("axial", "a", "b", "larger"): + vals = np.array([meas[s][quantity] / norm[s] for s in LK_STATIONS]) + implied[quantity] = { + "MPa": dict(zip(LK_STATIONS, vals.tolist(), strict=True)), + "cv": float(np.std(vals) / np.mean(vals)), + } + return { + "stations": stations, + "ratios": ratios, + "implied_static": implied, + "model_static_MPa": res["static_Pa"] / 1e6, + } + + +def _plane_metric(cases: dict, transform: Callable[[int, dict, str], float]) -> dict: + """SV11-PLANE median and band count after ``transform`` of each case.""" + out = {} + for kind in ("termination", "sectional"): + r = np.array([transform(lc, v, kind) for lc, v in cases.items()]) + out[kind] = { + "median": float(np.median(r)), + "in_band": int(np.sum((r >= 0.70) & (r <= 1.43))), + "R": dict(zip(cases, r.tolist(), strict=True)), + } + return out + + +def audit_values(mu: float = MU_DECLARED) -> dict: + """SV11-SUB and SV11-NORM (reported, not gated; NORM is a hypothesis). + + Recomputed from the registered predictions of :func:`gate_values`; only + the measured set, the measured values or the normaliser change. + """ + g = gate_values(mu) + cases = g["plane"]["cases"] + + def subset(lc: int, v: dict, kind: str) -> float: + st = {s: x for s, x in v["stations"].items() if s not in ONE_SIDED} + pred = np.mean([x[kind] for x in st.values()]) + return float(pred / np.mean([x["measured"] for x in st.values()])) + + def paired(lc: int, v: dict, kind: str) -> float: + meas = {s: x["measured"] for s, x in v["stations"].items()} + for a, b in PAIRS: + meas[a] = meas[b] = math.sqrt(meas[a] * meas[b]) + pred = np.mean([x[kind] for x in v["stations"].values()]) + return float(pred / np.mean(list(meas.values()))) + + ref = next( + g["static_MPa"][c.lc] + for c in load_cases() + if c.tension_N == 500e3 and c.pressure_Pa == 34e6 + ) + + def common(lc: int, v: dict, kind: str) -> float: + own = v["R_termination" if kind == "termination" else "R_sectional"] + return float(own * g["static_MPa"][lc] / ref) + + gj = g["gjosteen"] + plane = ("3.1", "3.5") + gj_meas = sum(gj["plane_measured_MPa"][s] for s in plane) + return { + "without_one_sided": _plane_metric(cases, subset), + "pair_geometric_mean": _plane_metric(cases, paired), + "gj_3x": { + "termination": sum(gj["plane_pred_MPa"][s] for s in plane) / gj_meas, + "sectional": sum(gj["plane_sectional_MPa"][s] for s in plane) / gj_meas, + }, + "common_normaliser": _plane_metric(cases, common), + "reference_static_MPa": ref, + } + + # --------------------------------------------------------------------------- # # Decomposition of the termination increment (SV11-SPLIT, SV11-REACH) # # --------------------------------------------------------------------------- # diff --git a/validation/scripts/check_tb880.py b/validation/scripts/check_tb880.py new file mode 100644 index 0000000..58edc50 --- /dev/null +++ b/validation/scripts/check_tb880.py @@ -0,0 +1,216 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""CIGRE TB 880 (2022) Case studies 2 and 8 against ``compute_thermal``. + +Rows TB880-C2 and TB880-C8 of the validation report (targets registered in +``doc/benchmarks.md`` before the first run). The cables are +``tests/data/tb880/case2_30kv.yaml`` (3x630 mm2 18/30 kV, lead sheaths, +galvanised steel wire armour) and ``case8_220kv.yaml`` (3x1000 mm2 220 kV, lead +sheaths, stainless steel wire armour), built from the TB 880 datasheets +(Figs 29 and 40) and the dimensions of its input tables. Reference values +are the brochure's printed results. + +Each case is compared in two parts: + +* the ladder and loss terms (gated): ``T1``, ``T3``, ``y_s`` and ``W_d`` on + the datasheet geometry, within 0.5 %; ``y_p`` and ``lambda1'`` in the + spacing TB 880 uses for them (cores touching, ``s`` = core diameter), with + the factor 1.5 that TB 880 Guidance Point 25 puts on ``y_s + y_p`` under + magnetic armour, within 0.5 % and 1 %. TB 880 takes the cores touching for + ``s`` but the datasheet diameter over the assembled cores for ``x`` of the + filler factor and for ``c`` of the armour loss; one core offset cannot give + both, so ``T2`` is stated, not gated. +* the rating (stated): the current at a 90 degC conductor with TB 880's loss + choices (``lambda1`` with the eddy loss times ``F``, ``lambda2``, the + Guidance Point 25 factor, the datasheet resistance per metre of core times + ``C_LL`` in Case 8) and with the IEC defaults of ``compute_thermal``. +""" + +from __future__ import annotations + +import math +import warnings +from dataclasses import dataclass +from pathlib import Path + +import cablexsec as cx +from cablexsec.cables.schema import CableData +from cablexsec.mechanics.thermal import ThermalResult, compute_thermal + +ROOT = Path(__file__).resolve().parents[2] +DATA = ROOT / "tests" / "data" / "tb880" + +#: Registered bands (doc/benchmarks.md, "CIGRE TB 880 Case studies 2 and 8"). +BAND_LADDER = 0.005 # T1, T3, y_s, y_p, W_d: relative +BAND_LAMBDA1 = 0.01 # lambda1' in the TB 880 spacing: relative + + +@dataclass(frozen=True) +class Case: + """A TB 880 case: inputs and the printed results used here.""" + + key: str + file: str + current_amps: float + area_m2: float + T4: float + spacing_m: float # distance between conductor axes TB 880 uses (touching) + armour_factor: float # TB 880 GP 25 factor on y_s + y_p (1.5 magnetic armour) + r20_ohm_m: float | None # datasheet resistance as compute_thermal reads it + T1: float + T2: float + T3: float + y_s: float + y_p: float + lambda1_circ: float + W_d: float + lambda1: float + lambda2: float + + +CASES = ( + # TB 880 Section 6: Tables 6-1 to 6-17, steps 6.2 to 6.11. + Case( + "C2", + "case2_30kv.yaml", + current_amps=838.3399739336, + area_m2=630e-6, + T4=0.3617633359, + spacing_m=0.0621, + armour_factor=1.5, + r20_ohm_m=None, # IEC 60228 Table 4 = datasheet 0.0283 ohm/km per cable + T1=0.3578707848, + T2=0.0779300464, + T3=0.0376252079, + y_s=0.0601241268, + y_p=0.0511765348, + lambda1_circ=0.1408854886, + W_d=0.1316852157, + lambda1=0.1628367815, + lambda2=0.4206526837, + ), + # TB 880 Section 12: Tables 12-1 to 12-18; converged values of step 12.11. + Case( + "C8", + "case8_220kv.yaml", + current_amps=1134.8196615454, + area_m2=1000e-6, + T4=0.3107202651, + spacing_m=0.1046, + armour_factor=1.0, + # 0.0176 ohm/km per metre of core, times C_LL = 1.0118110892 (GP 23). + r20_ohm_m=0.0176e-3 * 1.0118110892, + T1=0.48728714947, + T2=0.02641373992, + T3=0.03170182109, + y_s=0.1444369104, + y_p=0.05683893091, + lambda1_circ=0.3584934634, + W_d=0.96295182288, + lambda1=0.4557096608, + lambda2=0.0, + ), +) + + +def _rel(value: float, ref: float) -> float: + return (value - ref) / ref + + +def _touching(cable: CableData, spacing_m: float) -> CableData: + """The cable with its cores touching at ``spacing_m`` between axes.""" + r_offset = spacing_m / math.sqrt(3.0) + layers = tuple( + layer.model_copy(update={"r_offset_m": r_offset}) + if layer.layer_type == "cylindrical_offset" + else layer + for layer in cable.layers + ) + return cable.model_copy(update={"layers": layers}) + + +def _thermal( + case: Case, cable: CableData, current_A: float, **kw: object +) -> ThermalResult: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") # the 90 degC range guard near the rating + return compute_thermal( + cable, + current_A, + case.area_m2, + T4_external_Km_W=case.T4, + ambient_C=15.0, + include_dielectric_loss=True, + **kw, # type: ignore[arg-type] + ) + + +def _rating(case: Case, cable: CableData, **kw: object) -> float: + """Current at a 90 degC conductor (bisection to 1e-9 A).""" + lo, hi = 0.25 * case.current_amps, 2.0 * case.current_amps + while hi - lo > 1e-9: + mid = 0.5 * (lo + hi) + if _thermal(case, cable, mid, **kw).T_conductor_C > 90.0: + hi = mid + else: + lo = mid + return 0.5 * (lo + hi) + + +def evaluate(case: Case) -> dict[str, float | bool]: + """Relative deviations of the ladder terms and the ratings of one case.""" + cable = cx.load_cable(DATA / case.file, geometry_override=None) + base = _thermal(case, cable, case.current_amps) + assert base.resistances is not None and base.losses is not None + touch = _touching(cable, case.spacing_m) + plain = _thermal(case, touch, case.current_amps) + assert plain.losses is not None + f = case.armour_factor + tb_y = {"y_s": f * plain.losses["y_s"], "y_p": f * plain.losses["y_p"]} + sheath = _thermal( + case, + touch, + case.current_amps, + conductor_resistance_20C_ohm_m=case.r20_ohm_m, + **tb_y, + ) + assert sheath.losses is not None + out: dict[str, float | bool] = { + "T1": _rel(base.resistances["T1_Km_W"], case.T1), + "T2": _rel(base.resistances["T2_Km_W"], case.T2), + "T3": _rel(base.resistances["T3_Km_W"], case.T3), + "y_s": _rel(base.losses["y_s"], case.y_s), + "W_d": _rel(base.losses["W_d_W_m"], case.W_d), + "y_p": _rel(plain.losses["y_p"], case.y_p), + "lambda1_circ": _rel(sheath.losses["lambda1"], case.lambda1_circ), + } + gated = ("T1", "T3", "y_s", "W_d", "y_p") + out["pass"] = all(abs(float(out[k])) <= BAND_LADDER for k in gated) and ( + abs(float(out["lambda1_circ"])) <= BAND_LAMBDA1 + ) + tb_choices = { + "y_s": f * base.losses["y_s"], + "y_p": f * base.losses["y_p"], + "lambda1": case.lambda1, + "lambda2": case.lambda2, + "conductor_resistance_20C_ohm_m": case.r20_ohm_m, + } + out["rating_tb_A"] = _rating(case, cable, **tb_choices) + out["rating_iec_A"] = _rating(case, cable, lambda2=case.lambda2) + return out + + +if __name__ == "__main__": + for c in CASES: + result = evaluate(c) + print( + c.key, + { + k: ( + f"{v * 100:+.4f} %" + if k not in ("pass",) and abs(float(v)) < 1 + else v + ) + for k, v in result.items() + }, + ) diff --git a/validation/scripts/compression_application.py b/validation/scripts/compression_application.py index 6967d5b..554a430 100644 --- a/validation/scripts/compression_application.py +++ b/validation/scripts/compression_application.py @@ -43,7 +43,7 @@ "inter_array_single_core_33kv": cx.inter_array_single_core_yaml_path, "inter_array_three_core_33kv": cx.inter_array_three_core_yaml_path, "export_three_core_220kv": cx.export_three_core_yaml_path, - "cigre_tb880_220kv": cx.cigre_tb880_yaml_path, + "poradowski2025_220kv": cx.poradowski2025_220kv_yaml_path, } diff --git a/validation/scripts/digitise_lukassen2019.py b/validation/scripts/digitise_lukassen2019.py new file mode 100644 index 0000000..8333992 --- /dev/null +++ b/validation/scripts/digitise_lukassen2019.py @@ -0,0 +1,166 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Digitise the measured two-sided tendon stresses of the Sævik (2011) FBG riser. + +Source +------ +T. V. Lukassen, "Constitutive behavior of tensile armor wires in unbonded +flexible pipes", PhD thesis, Technical University of Denmark (2019), Ch. 2, +pp. 13-14 (PDF pages 30-31), Figs 2.7-2.11: the inner tensile armour stress +on the two narrow sides of one tendon, sigma_a (panels a) and sigma_b +(panels b), at stations 3.1-3.5 of the test of Sævik (2011) (load case 14: +500 kN, 34 MPa, rocker +-8 deg), against the bending angle theta. Each panel +holds the FE result (red) and the measurement, "experimental OMS" (blue); +the colours are those of the caption glyphs. The sensors have a 40 mm gauge +length on both narrow sides (p. 11). + +Procedure (the CSV header records the numbers) +---------------------------------------------- +1. Axis calibration per panel: the thin black grid lines are vector lines at + the labelled ticks (theta -8 ... 8 deg in steps of 2, stress -135 ... 135 + MPa in steps of 30). A straight line is fitted to (PDF coordinate, label) + per axis; the largest residual is recorded. +2. Measured series: the blue polyline of each panel (one stroked path of + width 0.4 pt), its vertices mapped through the panel calibration in their + stored order. The blue circle markers on the same curve are not used. + +Reading resolution (half-width, not experimental uncertainty): the larger +calibration residual plus 0.01 pt (the coordinate precision of the PDF), +in data units. + +Usage (needs PyMuPDF, ``pip install pymupdf``; not a CableXSec dependency):: + + python validation/scripts/digitise_lukassen2019.py THESIS.pdf + +writes ``validation/paper_data/lukassen2019_lc14_two_sides.csv``. +""" + +from __future__ import annotations + +import hashlib +import sys +from pathlib import Path + +import numpy as np + +ROOT = Path(__file__).resolve().parents[2] +OUT = ROOT / "validation" / "paper_data" / "lukassen2019_lc14_two_sides.csv" +LF = "\n" + +THETA_TICKS = tuple(float(v) for v in range(-8, 9, 2)) +STRESS_TICKS = tuple(float(v) for v in range(-135, 136, 30)) +#: PDF page index (0-based) -> stations of the panel rows, top to bottom. +PAGES = {29: ("3.1", "3.2", "3.3"), 30: ("3.4", "3.5")} +BLUE = (0.0, 0.0, 1.0) +GRID = (0.0, 0.0, 0.0) + + +def _fit(coord: list[float], value: tuple[float, ...]) -> tuple[float, float, float]: + c = np.asarray(coord, dtype=float) + v = np.asarray(value, dtype=float) + b, a = np.polyfit(c, v, 1) + return float(a), float(b), float(np.max(np.abs(a + b * c - v))) + + +def _clusters(values: list[float], size: int) -> list[list[float]]: + """Sorted unique coordinates split into consecutive groups of ``size``.""" + u = sorted({round(v, 3) for v in values}) + if len(u) % size: + raise RuntimeError(f"unexpected grid: {len(u)} lines, groups of {size}") + return [u[i : i + size] for i in range(0, len(u), size)] + + +def _page(page: object, stations: tuple[str, ...]) -> list[dict[str, object]]: + vertical, horizontal, lines = [], [], [] + for d in page.get_drawings(): # type: ignore[attr-defined] + colour, width, rect = d.get("color"), d.get("width") or 0.0, d["rect"] + if colour == GRID and abs(width - 0.1) < 0.01 and len(d["items"]) == 1: + if rect.width < 1e-3: + vertical.append(rect.x0) + elif rect.height < 1e-3: + horizontal.append(rect.y0) + elif colour == BLUE and abs(width - 0.4) < 0.01 and d["type"] == "s": + items = d["items"] + pts = [items[0][1]] + [it[-1] for it in items] + lines.append(np.array([(p.x, p.y) for p in pts], dtype=float)) + columns = _clusters(vertical, len(THETA_TICKS)) + rows = _clusters(horizontal, len(STRESS_TICKS)) + if len(columns) != 2 or len(rows) != len(stations): + raise RuntimeError("unexpected panel layout: check the page") + out = [] + for station, ys in zip(stations, rows, strict=True): + for side, xs in zip(("a", "b"), columns, strict=True): + tx = _fit(xs, THETA_TICKS) + sy = _fit(sorted(ys), tuple(reversed(STRESS_TICKS))) # PDF y down + inside = [ + ln + for ln in lines + if xs[0] - 5 <= ln[:, 0].mean() <= xs[-1] + 5 + and ys[0] - 5 <= ln[:, 1].mean() <= ys[-1] + 5 + ] + if len(inside) != 1: + raise RuntimeError( + f"station {station} side {side}: {len(inside)} lines" + ) + pts = inside[0] + theta = tx[0] + tx[1] * pts[:, 0] + stress = sy[0] + sy[1] * pts[:, 1] + out.append( + { + "station": station, + "side": side, + "theta": theta, + "stress": stress, + "fit_theta": tx, + "fit_stress": sy, + "half_width": ( + tx[2] + 0.01 * abs(tx[1]), + sy[2] + 0.01 * abs(sy[1]), + ), + } + ) + return out + + +def main(argv: list[str]) -> None: + import pymupdf # noqa: PLC0415 + + pdf = Path(argv[1]) + sha = hashlib.sha256(pdf.read_bytes()).hexdigest() + doc = pymupdf.open(pdf) + panels = [] + for index, stations in PAGES.items(): + panels.extend(_page(doc[index], stations)) + hw_t = max(p["half_width"][0] for p in panels) # type: ignore[index] + hw_s = max(p["half_width"][1] for p in panels) # type: ignore[index] + res_t = max(p["fit_theta"][2] for p in panels) # type: ignore[index] + res_s = max(p["fit_stress"][2] for p in panels) # type: ignore[index] + head = [ + "# Lukassen (2019) PhD thesis, DTU, Ch. 2, Figs 2.7-2.11 (PDF pages 30-31):", + "# measured (experimental OMS, blue) inner tensile armour stress on the two", + "# narrow sides of one tendon, sigma_a (side a) and sigma_b (side b), at", + "# stations 3.1-3.5 of the Saevik (2011) FBG riser, load case 14 (500 kN,", + "# 34 MPa, rocker +-8 deg); 40 mm gauge length (p. 11). Stresses are the", + "# bending stress variations from the state under gravity, tension and", + "# pressure (p. 12).", + f"# thesis PDF sha256 {sha}", + "# method: native PDF polyline in stored order" + " (validation/scripts/digitise_lukassen2019.py)", + f"# calibration: per panel on the grid lines; largest residual {res_t:.2e} deg," + f" {res_s:.2e} MPa", + f"# reading half-width: {hw_t:.2e} deg, {hw_s:.2e} MPa" + " (NOT experimental uncertainty)", + "station,side,sample,theta_deg,stress_MPa", + ] + rows = [] + for p in panels: + for i, (t, s) in enumerate(zip(p["theta"], p["stress"], strict=True)): # type: ignore[call-overload] + rows.append(f"{p['station']},{p['side']},{i},{t:.4f},{s:.3f}") + OUT.write_text(LF.join(head + rows) + LF, encoding="utf-8", newline=LF) + for p in panels: + s = np.asarray(p["stress"]) + print(p["station"], p["side"], len(s), f"range {np.ptp(s):.1f} MPa") + + +if __name__ == "__main__": + main(sys.argv) diff --git a/validation/scripts/run_validation.py b/validation/scripts/run_validation.py index 4357056..065202b 100644 --- a/validation/scripts/run_validation.py +++ b/validation/scripts/run_validation.py @@ -31,6 +31,7 @@ from dataclasses import astuple, dataclass from functools import partial from pathlib import Path +from types import ModuleType from typing import IO import numpy as np @@ -68,6 +69,8 @@ iec_conductor_temperature, proximity_effect_factor, sheath_circulating_loss_factor, + sheath_eddy_loss_factor, + sheath_reactance, skin_effect_factor, ) @@ -87,10 +90,23 @@ class Row: status: str def line(self) -> str: - return ( - f"| {self.tier} | {self.ident} | {self.quantity} | {self.target} | " - f"{self.value} | {self.status} |" - ) + return _prefix(self) + _cell(self.value) + _suffix(self) + + +def _cell(text: str) -> str: + """A Markdown table cell: a literal ``|`` (as in ``|cos|``) is escaped.""" + return text.replace("|", r"\|") + + +def _prefix(row: Row) -> str: + return ( + f"| {_cell(row.tier)} | {_cell(row.ident)} | {_cell(row.quantity)} | " + f"{_cell(row.target)} | " + ) + + +def _suffix(row: Row) -> str: + return f" | {_cell(row.status)} |" # Staleness check. A value far inside its own tolerance and below an absolute @@ -153,14 +169,15 @@ def _row_recorded(row: Row, line: str) -> bool: """True if a recorded report line states this row up to round-off.""" if line == row.line(): return True - prefix = f"| {row.tier} | {row.ident} | {row.quantity} | {row.target} | " - suffix = f" | {row.status} |" + prefix, suffix = _prefix(row), _suffix(row) if not (line.startswith(prefix) and line.endswith(suffix)): return False if len(line) < len(prefix) + len(suffix): return False recorded = line[len(prefix) : len(line) - len(suffix)] - return _value_classes(recorded, row.target) == _value_classes(row.value, row.target) + return _value_classes(recorded, row.target) == _value_classes( + _cell(row.value), row.target + ) def report_is_stale( @@ -196,39 +213,59 @@ def _pct(a: float, b: float) -> float: return abs(a - b) / abs(b) * 100.0 -def _bm5_conductor_temperature() -> float: - """Reproduce BM5 via the [Poradowski2025] Table-1 IEC thermal network. +def _bm5_conductor_temperature() -> tuple[float, float]: + """BM5 from the [Poradowski2025] Table-1 IEC thermal network. - Uses ``iec_conductor_temperature`` with the paper's *tabulated* T1/T2/T3/T4 - (public, Poradowski Table 1) — NOT the auto-built ladder of compute_thermal, - which omits the IEC-60287-2-1 three-core geometric factor. Circulating- - current sheath loss λ1' only; the eddy term λ1″ is BLOCKED (≈5 K residual). + Uses ``iec_conductor_temperature`` with the paper's tabulated T1/T2/T3/T4: + the packaged cable is a single-core-equivalent stack of a three-core + cable, so ``compute_thermal`` on it is not comparable. ``R0`` from + [IEC60228] Table 4; the circulating sheath loss of IEC 60287-1-1 5.3.2 + (non-magnetic armour, CIGRE TB 880 Guidance Point 38). Returns the + temperature with ``lambda1'' = 0`` (IEC) and with the eddy loss of + 5.3.7.1 times the solid-bonding factor F (TB 880 Guidance Points 6, 31). """ t1, t2, t3, t4, t_amb = 0.6579, 0.1121, 0.0357, 0.3211, 15.0 - rho = library.get_property("copper_stranded", "rho_ohm_m") alpha = library.get_property("copper_stranded", "alpha_R_per_K") - r_dc = (rho / 1200e-6) * (1.0 + alpha * (90.0 - 20.0)) + r_dc = 0.0151e-3 * (1.0 + alpha * (90.0 - 20.0)) # [IEC60228] Table 4 y_s = skin_effect_factor(r_dc, 50.0) y_p = proximity_effect_factor(r_dc, 50.0, 0.042, 0.13175) r_ac = r_dc * (1.0 + y_s + y_p) w_c = 908.45**2 * r_ac w_d = dielectric_loss(220.0, 2.5, 0.001, 0.0227, 0.0466) a_s = math.pi / 4 * (0.11395**2 - 0.11195**2) - r_s = rho * 1.3406 / a_s * (1.0 + alpha * (80.0 - 20.0)) - x = 2.0 * (2.0 * math.pi * 50.0) * 1e-7 * math.log(2.0 * 0.13175 / 0.1129) + rho_s = library.get_property("copper_tape_screen", "rho_ohm_m") * ( + 1.0 + alpha * (80.0 - 20.0) + ) + r_s = rho_s * 1.3406 / a_s + d_s = 0.5 * (0.11195 + 0.11395) + x = sheath_reactance(0.13175, d_s) lam1 = sheath_circulating_loss_factor(r_s, r_ac, x) - return iec_conductor_temperature( - t1, - t2, - t3, - t4, - W_c=w_c, - W_d=w_d, - lambda1=lam1, - n_conductors=3, - T_ambient_C=t_amb, + lam1_e = sheath_eddy_loss_factor( + r_s, + r_ac, + sheath_mean_diameter_m=d_s, + sheath_outer_diameter_m=0.11395, + sheath_thickness_m=0.001, + sheath_resistivity_ohm_m=rho_s, + spacing_m=0.13175, + solid_bonding_reactance_ohm_m=x, ) + def theta(lambda1: float) -> float: + return iec_conductor_temperature( + t1, + t2, + t3, + t4, + W_c=w_c, + W_d=w_d, + lambda1=lambda1, + n_conductors=3, + T_ambient_C=t_amb, + ) + + return theta(lam1), theta(lam1 + lam1_e) + def _reader_known_answer_residual() -> float: """Max relative residual: time-history CSV reader→fatigue vs closed-form σ_A damage. @@ -527,6 +564,97 @@ def _saevik_rows() -> list[Row]: f"static stress {gj['static_Pa'] / 1e6:.0f} MPa", "PASS" if gj["gate"] else "FAIL", ), + *_saevik_quantity_rows(sv), + ] + + +def _saevik_quantity_rows(sv: ModuleType) -> list[Row]: + """Measured quantity and normaliser of the SV11 rows (reported, not gated). + + Registered before the runs (doc/benchmarks.md, "Measured quantity and + normaliser"): Lukassen's (2019) two-sided LC 14 records (SV11-LK, + SV11-SIDE), the SV11 metrics on subsets of the stations (SV11-SUB) and + the hypothesis of one normalising static stress (SV11-NORM). + """ + lk = sv.lukassen_values() + st, ratios = lk["stations"], lk["ratios"] + names = sv.LK_STATIONS + + def series(key: str) -> str: + return "/".join(f"{st[s][key]:.0f}" for s in names) + + measured = "/".join(f"{st[s]['measured']['axial']:.0f}" for s in names) + implied = lk["implied_static"] + larger = implied["larger"]["MPa"].values() + axial = implied["axial"]["MPa"].values() + au = sv.audit_values() + sub, pair = au["without_one_sided"], au["pair_geometric_mean"] + norm = au["common_normaliser"] + return [ + Row( + "2", + "SV11-LK", + "Lukassen (2019) Figs 2.7-2.11, LC 14 at +-8 deg, stations 3.1-3.5: " + "measured axial range (mean of the two narrow sides) against the " + "predicted axial range; measured larger side against the predicted " + "larger single side (mean ratios over 3.1 and 3.5; over all five)", + "stated, not gated", + f"axial measured {measured} MPa; sectional {series('sectional_axial_MPa')} " + f"({ratios['plane']['sectional_axial']:.2f}; " + f"{ratios['all']['sectional_axial']:.2f}); corrected " + f"{series('termination_axial_MPa')} " + f"({ratios['plane']['termination_axial']:.2f}; " + f"{ratios['all']['termination_axial']:.2f}); larger side: sectional " + f"{ratios['plane']['sectional_side']:.2f}; " + f"{ratios['all']['sectional_side']:.2f}, corrected " + f"{ratios['plane']['termination_side']:.2f}; " + f"{ratios['all']['termination_side']:.2f}", + "INFO", + ), + Row( + "2", + "SV11-SIDE", + "Sævik (2011) Fig. 21(a), LC 14: static stress implied at stations " + "3.1-3.5 by Lukassen's measured range divided by Sævik's normalised " + "value, for each reading of the two sides (coefficient of variation)", + "stated, not gated", + f"larger side {min(larger):.0f}-{max(larger):.0f} MPa " + f"({implied['larger']['cv']:.2f}); side a {implied['a']['cv']:.2f}; " + f"side b {implied['b']['cv']:.2f}; axial {min(axial):.0f}-" + f"{max(axial):.0f} MPa ({implied['axial']['cv']:.2f}); model static " + f"{lk['model_static_MPa']:.0f} MPa", + "INFO", + ), + Row( + "2", + "SV11-SUB", + "SV11 metrics on subsets: (a) SV11-PLANE without the one-sided " + "stations 2.1 and 2.5; (b) SV11-PLANE with each coincident pair by " + "the geometric mean of its measured values; (c) SV11-GJ at 3.1 and " + "3.5 only", + "stated, not gated", + f"(a) median R {sub['termination']['median']:.2f} " + f"({sub['termination']['in_band']} of 14), sectional " + f"{sub['sectional']['median']:.2f} ({sub['sectional']['in_band']}); " + f"(b) {pair['termination']['median']:.2f} " + f"({pair['termination']['in_band']}), sectional " + f"{pair['sectional']['median']:.2f} ({pair['sectional']['in_band']}); " + f"(c) {au['gj_3x']['termination']:.2f}, sectional " + f"{au['gj_3x']['sectional']:.2f}", + "INFO", + ), + Row( + "2", + "SV11-NORM", + "Hypothesis (no paper prints the normaliser): SV11-PLANE with every " + "load case normalised by the static stress of 500 kN and 34 MPa", + "stated, not gated", + f"median R {norm['termination']['median']:.2f} " + f"({norm['termination']['in_band']} of 14), sectional " + f"{norm['sectional']['median']:.2f} ({norm['sectional']['in_band']} " + f"of 14); reference static {au['reference_static_MPa']:.0f} MPa", + "INFO", + ), ] @@ -627,7 +755,30 @@ def _anchored_wire_fe_rows() -> list[Row]: z90, f90 = zt["cablexsec"][90.0], zt["fea"][90.0] z45, f45 = zt["cablexsec"][45.0], zt["fea"][45.0] rms = zt["fea_far_field_rms"] + from check_core_friction import SKEIE2023, skeie2023_table1 # noqa: PLC0415 + + sk = skeie2023_table1() + t1 = SKEIE2023 return [ + Row( + "2", + "SK23-T1", + "Skeie et al. (2023) Table 1: three tubes in core-core contact only " + "(R 5.37 mm, lay 7.6 deg, mu 0.2, 4.44 N/mm per neighbour), coupled " + "stations of core_core_coupling='relative' against the source's model " + "and FE: onset (contact load per metre of cable; per metre of helix as " + "their Eq. 16) and the curvature where the largest friction stress " + "stops growing, as a ratio of the onset; coalescence of the slip zones", + "stated, not gated (code-to-code)", + f"onset {sk['onset_1_mm']:.4e} 1/mm ({sk['onset_helix_1_mm']:.4e} per " + f"metre of helix; Eq. 16 {sk['eq16_1_mm']:.4e}) vs " + f"{t1['table1_onset_1_mm']:.2e}; saturation {sk['saturation_ratio']:.4f} " + f"x onset (pi/3) vs " + f"{t1['table1_full_model_1_mm'] / t1['table1_onset_1_mm']:.3f} (model) / " + f"{t1['table1_full_fe_1_mm'] / t1['table1_onset_1_mm']:.3f} (FE); " + f"coalescence {sk['coalescence_ratio']:.4f} x onset (2 pi/(3 sqrt 3))", + "INFO", + ), Row( "2", "AW-DONG25", @@ -1298,6 +1449,47 @@ def _zeidan_rows() -> list[Row]: return rows +def _tb880_rows() -> list[Row]: + """Rows TB880-C2 and TB880-C8: CIGRE TB 880 (2022) Case studies 2 and 8 + against compute_thermal (registered targets in doc/benchmarks.md; + check_tb880.py).""" + import check_tb880 as tb # noqa: PLC0415 + + rows: list[Row] = [] + for case, title in zip( + tb.CASES, + ( + "CIGRE TB 880 Case study 2, 3x630 mm2 18/30 kV array cable (lead " + "sheaths, galvanised steel wire armour)", + "CIGRE TB 880 Case study 8, 3x1000 mm2 220 kV export cable (lead " + "sheaths, stainless steel wire armour)", + ), + strict=True, + ): + out = tb.evaluate(case) + + def p(key: str, out: dict[str, float | bool] = out) -> str: + return f"{float(out[key]) * 100:+.4f}%" + + rows.append( + Row( + "2", + f"TB880-{case.key}", + f"{title}: T1, T3, y_s, W_d on the datasheet geometry; y_p and " + "lambda1' in the spacing TB 880 uses (cores touching), with its " + "GP 25 factor on y_s + y_p; T2 stated", + "T1, T3, y_s, y_p, W_d within 0.5%; lambda1' within 1%", + f"T1 {p('T1')}, T3 {p('T3')}, y_s {p('y_s')}, W_d {p('W_d')} " + f"(TB 880 eps0 1e-9/36pi, IEC 8.854e-12), y_p {p('y_p')}, lambda1' " + f"{p('lambda1_circ')}; T2 {p('T2')} (stated); rating at 90 °C with " + f"TB 880's loss factors {float(out['rating_tb_A']):.2f} A vs " + f"{case.current_amps:.2f} A, IEC defaults {float(out['rating_iec_A']):.2f} A", + "PASS" if out["pass"] else "FAIL", + ) + ) + return rows + + def _rows() -> list[Row]: rows: list[Row] = _normal_state_rows() menard = cx.load_cable(cx.menard2023_yaml_path(), geometry_override=None) @@ -2142,20 +2334,22 @@ def _comp_row(tier: str, ident: str, quantity: str, keys: tuple[str, ...]) -> Ro rows.extend(_dai2020_rows()) rows.extend(_dai2018_rows()) - theta_bm5 = _bm5_conductor_temperature() # paper tabulated network, λ1' only + theta_bm5, theta_bm5_eddy = _bm5_conductor_temperature() rows.append( Row( "2", "BM5", - "CIGRE TB880 conductor temp (cited Poradowski tabulated T-network, λ1')", - "≤ 90 °C, ~5 K low", - f"{theta_bm5:.1f} °C " - "(FEM 89.62 / IEC 90; λ1″ closes residual). NOT yet from " - "compute_thermal(cable) — three-core geometric factor pending " - "IEC 60287-2-1 (not yet implemented)", - "PARTIAL (cited network; λ1″ + 3-core factor gated)", + "Poradowski (2025) 220 kV conductor temperature (cited tabulated " + "T-network; R0 [IEC60228], λ1' IEC 5.3.2)", + "≤ 90 °C (λ1″ = 0, IEC)", + f"{theta_bm5:.1f} °C with λ1″ = 0; {theta_bm5_eddy:.1f} °C with the " + "CIGRE TB 880 GP 6/31 eddy loss (FEM 89.62 / IEC 90). Not from " + "compute_thermal(cable): the packaged cable is a single-core-" + "equivalent stack of a three-core cable", + "PARTIAL (cited network)", ) ) + rows.extend(_tb880_rows()) rows.append( Row( @@ -2533,7 +2727,7 @@ def main() -> None: "|----|------------------|-----------------------------|", "| BM1 | `menard2023.yaml` geometry + material library | YES — `ei_min_slip(cable)` |", "| BM3 | `nasution_2014_copper` curve in the S-N registry (cited fit) | YES — from the material/S-N definition |", - "| BM5 | Poradowski Table-1 **tabulated** T1/T2/T3 (cited) | PARTIAL — uses the cited tabulated network; `compute_thermal(cigre_tb880.yaml)` reads high (136 °C at the BM5 inputs, three cores) because the IEC-60287-2-1 three-core geometric factor is not yet applied |", + "| BM5 | Poradowski Table-1 **tabulated** T1/T2/T3 (cited) | PARTIAL — uses the cited tabulated network; the packaged `poradowski2025_220kv.yaml` is a single-core-equivalent stack of the three-core cable, so `compute_thermal` on it (SL-type losses and the filler geometric factor need the three cores) is not comparable |", "| BM6 | `copper_poon2022` SWT constants (cited registry) + representative contact | curve YES (registry); cable-level contact driver is representative, not from a cable |", "| WITZ | `witz1996.yaml` geometry + material library + digitised Witz Figs 5-6 | EI_min YES (parameter-free); WITZ-ID: initial pressure identified on the Fig. 5 width (declared `identified`), Fig. 6 predicted without refitting |", "| SV11 | `saevik2011.yaml` geometry (Table 1; outer armour, tapes and sheath assumed) + material library (polymer modulus identified on the Table 1 EI) + rig constants in `validation/scripts/check_saevik2011.py` + digitised Sævik Figs 17-23 and Gjøsteen Figs 27-35 | PARTIAL — section from the cable definition; the curvature profile along the pipe comes from a harness beam model with an assumed rotation point |", diff --git a/validation/validation_report.md b/validation/validation_report.md index 5bec003..112853c 100644 --- a/validation/validation_report.md +++ b/validation/validation_report.md @@ -31,9 +31,9 @@ Every row is computed from published data or closed-form references in this repo | 1 | MK-Tcyc | compute_mkappa with a tension history cycling within the bending cycles vs the fatigue-path friction stress on the same history; work balance under the changing friction bound | < 1e-12 relative; < 1e-12 relative | 3.4e-16; 8.9e-16 | PASS | | 1 | MX-scale | Exported law with a slip scaling variable: compute_mkappa at T2 vs the T1 law with the bound scaled (66 kV, cores included); group elements at T2 vs the T1 elements with yield curvatures scaled (Menard, two layers); tension cycle inside the bending cycles, scaled law vs the contact-tension history over the fixed-tension Iwan residual | < 1e-12 relative; < 1e-9 relative; ratio <= 1.25 | 5.5e-16; 1.2e-13; 1.21 | PASS | | 1 | FL-P | Pressure-dependent friction coefficient (FrictionLaw.pressure_factor): spring-slider under pressure steps vs closed form; compiled vs NumPy direction-tied kernel under a pressure history (static/dynamic law, local pressures across the table); work balance | < 1e-9 relative; < 1e-9 relative; < 1e-9 relative | 3.0e-16; 8.7e-16; 2.5e-15 | PASS | -| 1 | slip-onset | First-to-slip wire at the neutral axis (|cos| → 0, compression side at psi ≈ 3 lam/2; Raoof/Papailiou, not extreme-fibre loop) | |cos| < 0.2 | |cos|=0.156 | PASS | +| 1 | slip-onset | First-to-slip wire at the neutral axis (\|cos\| → 0, compression side at psi ≈ 3 lam/2; Raoof/Papailiou, not extreme-fibre loop) | \|cos\| < 0.2 | \|cos\|=0.156 | PASS | | 1 | xsec-K | Coupling tangent bounds (κ→0=EI_max, κ→∞=EI_min); slip-front local slope | < 0.01% | κ0:1.91e-14% / κ∞:5.99e-13% | PASS | -| 1 | QP-KKT | Concentric contact max|normal line force times gap| (common extension, twist and radial equilibrium) | < 1e-8 N | 1.1e-13 (q>=0: True) | PASS | +| 1 | QP-KKT | Concentric contact max\|normal line force times gap\| (common extension, twist and radial equilibrium) | < 1e-8 N | 1.1e-13 (q>=0: True) | PASS | | 1 | QP-Lamé | Isolated cylinder surface compliances vs compound-cylinder shrink-fit closed form | < 1e-6 | 1.3e-16 | PASS | | 1 | COMP-T | Uniform free thermal expansion, all components | < 1e-6 Pa residual | 0.00e+00 Pa | PASS | | 1 | COMP-N | All-component axial-force equilibrium | < 1e-12 relative | 0.00e+00 | PASS | @@ -63,9 +63,14 @@ Every row is computed from published data or closed-form references in this repo | 2 | WITZ-ID | Witz (1996) 300-bar loop predicted after p0 identified on the 0-bar width at kappa = 0 (mu = 0.10 declared) | width within [1692, 2489] N·m and energy within 15% of 3125 J/m | p0 1.071 MPa (YAML 1.071); 0-bar energy 1121 vs 1118 J/m; 300-bar width 1356 vs [1990, 2164] N·m (-31.8% / -37.3%), energy 2725 J/m (-12.8%) | FAIL | | 2 | SV11-PLANE | Sævik (2011) Figs 17-23, 14 load cases: normalised inner-armour axial stress range at the 8 bending-plane FBG stations, termination-corrected prediction, mu = 0.20 declared | median R in [0.85, 1.18] and >= 12 of 14 R in [0.70, 1.43] (R = mean predicted / mean measured, bending-plane stations) | median R 2.17 (0.79-5.14), 3 of 14 in band; sectional median 1.19 (0.76-2.39), 12 of 14 | FAIL | | 2 | SV11-GJ | Gjøsteen et al. (2027) Figs 27-35, LC 14 at +-8 deg: absolute axial range at stations 2.1, 2.5, 3.1, 3.5, termination-corrected, mu = 0.20 | mean ratio in [0.72, 1.38] | 2.07 (sectional 1.27); static stress 271 MPa | FAIL | +| 2 | SV11-LK | Lukassen (2019) Figs 2.7-2.11, LC 14 at +-8 deg, stations 3.1-3.5: measured axial range (mean of the two narrow sides) against the predicted axial range; measured larger side against the predicted larger single side (mean ratios over 3.1 and 3.5; over all five) | stated, not gated | axial measured 139/77/19/69/64 MPa; sectional 207/103/0/103/144 (1.72; 1.51); corrected 356/318/219/108/44 (1.97; 2.84); larger side: sectional 1.35; 0.94, corrected 1.54; 1.61 | INFO | +| 2 | SV11-SIDE | Sævik (2011) Fig. 21(a), LC 14: static stress implied at stations 3.1-3.5 by Lukassen's measured range divided by Sævik's normalised value, for each reading of the two sides (coefficient of variation) | stated, not gated | larger side 272-334 MPa (0.08); side a 0.30; side b 0.33; axial 51-254 MPa (0.45); model static 271 MPa | INFO | +| 2 | SV11-SUB | SV11 metrics on subsets: (a) SV11-PLANE without the one-sided stations 2.1 and 2.5; (b) SV11-PLANE with each coincident pair by the geometric mean of its measured values; (c) SV11-GJ at 3.1 and 3.5 only | stated, not gated | (a) median R 1.89 (3 of 14), sectional 1.12 (12); (b) 2.22 (3), sectional 1.21 (12); (c) 1.51, sectional 1.33 | INFO | +| 2 | SV11-NORM | Hypothesis (no paper prints the normaliser): SV11-PLANE with every load case normalised by the static stress of 500 kN and 34 MPa | stated, not gated | median R 2.06 (3 of 14), sectional 1.07 (13 of 14); reference static 271 MPa | INFO | | 2 | SV11-SPLIT | Sævik (2011) termination increment by origin: (a) end-fitting anchor alone (the correction with uniform curvature from the end-fitting face), 14 load cases (SV11-PLANE) and LC 14 at +-8 deg (SV11-GJ); (b) no end fitting (armour anchored 20 m upstream of the face, bellmouth curvature profile unchanged), LC 14 (SV11-PLANE) and LC 14 at +-8 deg (SV11-GJ) | stated, not gated | (a) median R 1.23 (11 of 14 in band), GJ 1.36; (b) LC 14 R 2.09, GJ 2.07, largest change against the registered correction below 1e-12; registered 2.17 and 2.07, sectional 1.19 and 1.27 | INFO | | 2 | SV11-REACH | SV11-PLANE reach of any termination correction: largest slip demand a = kappa / kappa_c of the correction at 0.5 and 1 deg, and the load cases whose sectional R is outside [0.70, 1.43] | stated, not gated | a_max 0.37 and 0.64; R corrected 0.79 and 0.86 (sectional 0.79 and 0.86); sectional outside the band: LC 4 2.39, LC 6 1.48 | INFO | | 2 | SV11-EQ88 | Sævik (2011) Eq. 88, kappa = 0.067 + 0.11 s, at the two published bellmouth ends (Sævik 1.72 m; Gjøsteen et al. 1.79 m): radius and slope | Sævik's text: 3.9 m and 16 deg | 1.72 m: 3.90 m, 15.9 deg; 1.79 m: 3.79 m, 17.0 deg; 3.9 m at s = 1.722 m | INFO | +| 2 | SK23-T1 | Skeie et al. (2023) Table 1: three tubes in core-core contact only (R 5.37 mm, lay 7.6 deg, mu 0.2, 4.44 N/mm per neighbour), coupled stations of core_core_coupling='relative' against the source's model and FE: onset (contact load per metre of cable; per metre of helix as their Eq. 16) and the curvature where the largest friction stress stops growing, as a ratio of the onset; coalescence of the slip zones | stated, not gated (code-to-code) | onset 2.2320e-05 1/mm (2.2518e-05 per metre of helix; Eq. 16 2.2518e-05) vs 2.25e-05; saturation 1.0472 x onset (pi/3) vs 1.049 (model) / 1.053 (FE); coalescence 1.2092 x onset (2 pi/(3 sqrt 3)) | INFO | | 2 | AW-DONG25 | Dong et al. (2025) Figs 14 and 25: armour wire anchored at both ends of one pitch, pipe bent to a uniform 0.005 1/m (a = 1.87), clamp-layer solver against the source's FE: neutral-axis wire (Fig. 14) and anchor stress for theta0 = 0, 45, 90, 135, 180 deg (Fig. 25) [MPa] | stated, not gated (code-to-code) | Fig. 14 anchor 156.4 vs FE 156.9 (source theory 147.8); peak 207.8 at X/P 0.217 vs 204.5 at 0.223; Fig. 25 anchors 81.8/117.6/156.4/191.9/200.0 vs 89.3/121.2/164.8/199.1/195.0 | INFO | | 2 | AW-ZT14 | Zhu and Tan (2014) Figs 4-8: normalised anchor / peak stress of an anchored wire at a = 4.92 (from their Table 2), clamp-layer solver against the source's FE, wires starting at 45 and 90 deg; FE far field against the full-slip triangle | stated, not gated (code-to-code) | 90 deg 1.19 / 1.70 vs FE 2.22 / 2.23; 45 deg 0.05 / 1.32 vs 0.97 / 1.59; FE far field RMS distance to a cosine 0.028, to the full-slip triangle 0.154 (the FE wire is not in slip) | INFO | | 2 | DAI20-KAPPA | Dai et al. (2020) Fig. 9: centre-tube curvature in a bellmouth (0.1 1/m, 3 m, 200 kN) at S2 and S3, rig beam with the bending stiffness identified on the S2 curvature at 4 deg (0.03995 1/m): angle where S2 reaches 90 % and S3 50 % of the bellmouth curvature | both within +-1.0 deg of the measured 7.03 and 14.57 deg | EI 59.1 kN m2; S2 6.16 deg (-0.87), S3 13.69 deg (-0.89); finer beam meshes S2/S3 error 10 mm -0.89/-0.89; 5 mm -0.91/-0.90; 2.5 mm -0.91/-0.90 deg | PASS | @@ -74,14 +79,16 @@ Every row is computed from published data or closed-form references in this repo | 2 | DAI18-RS | Dai et al. (2018) Fig. 4a/4c, 7 loops: re-stick peak above the dynamic level at every reversal; spring-slider (FrictionLaw static_factor = mu_s/mu_d) with stick_time_s = 0 vs the default inf, third cycle | excess > 5 reading resolutions on all 14 measured strokes; stick_time_s = 0 on all 14; inf on none | measured 14/14 (excess 0.039-0.094); stick_time_s = 0 14/14; inf 0/14 | PASS | | 2 | DAI18-T1 | Dai et al. (2018) Test 1 loops vs spring-slider with the printed mu_s/mu_d, stick_time_s = 0 and each loop's stick slope (last 0.5 mm before each reversal excluded): peak and dynamic level (+x/-x stroke), stroke work; decay and peak position, Tests 1 and 3 | stated, not gated | 8 MPa: peak -1.8/-0.8%, level +0.1/+4.7%, work -2.6%; 4 MPa: peak -0.4/+0.6%, level -1.0/+6.6%, work -1.9%; 1 MPa: peak +1.0/+0.2%, level -3.3/+12.3%, work -2.1%; decay to 10% of peak-level 0.6-2.3 mm (model: one step); peak 1.4-2.5x the slider's elastic travel from the reversal | INFO | | 2 | DAI18-T3 | Dai et al. (2018) Test 3 (4 MPa, groove track, 0.01-0.2 Hz) vs the rate-independent spring-slider with the 0.01 Hz peak and level | stated, not gated | dynamic level vs 0.01 Hz -3.5, -2.4, +0.3% at 0.05/0.1/0.2 Hz (model 0); static peak +10.6% at 0.2 Hz (model 0: no rate term on mu_s); 0.2 Hz peak error -7.9/-11.4%; work -5.4 to -0.9% | INFO | -| 2 | BM5 | CIGRE TB880 conductor temp (cited Poradowski tabulated T-network, λ1') | ≤ 90 °C, ~5 K low | 84.4 °C (FEM 89.62 / IEC 90; λ1″ closes residual). NOT yet from compute_thermal(cable) — three-core geometric factor pending IEC 60287-2-1 (not yet implemented) | PARTIAL (cited network; λ1″ + 3-core factor gated) | +| 2 | BM5 | Poradowski (2025) 220 kV conductor temperature (cited tabulated T-network; R0 [IEC60228], λ1' IEC 5.3.2) | ≤ 90 °C (λ1″ = 0, IEC) | 85.8 °C with λ1″ = 0; 90.9 °C with the CIGRE TB 880 GP 6/31 eddy loss (FEM 89.62 / IEC 90). Not from compute_thermal(cable): the packaged cable is a single-core-equivalent stack of a three-core cable | PARTIAL (cited network) | +| 2 | TB880-C2 | CIGRE TB 880 Case study 2, 3x630 mm2 18/30 kV array cable (lead sheaths, galvanised steel wire armour): T1, T3, y_s, W_d on the datasheet geometry; y_p and lambda1' in the spacing TB 880 uses (cores touching), with its GP 25 factor on y_s + y_p; T2 stated | T1, T3, y_s, y_p, W_d within 0.5%; lambda1' within 1% | T1 +0.0000%, T3 +0.0000%, y_s +0.0000%, W_d +0.1364% (TB 880 eps0 1e-9/36pi, IEC 8.854e-12), y_p +0.0000%, lambda1' +0.0000%; T2 -5.1137% (stated); rating at 90 °C with TB 880's loss factors 841.50 A vs 838.34 A, IEC defaults 864.29 A | PASS | +| 2 | TB880-C8 | CIGRE TB 880 Case study 8, 3x1000 mm2 220 kV export cable (lead sheaths, stainless steel wire armour): T1, T3, y_s, W_d on the datasheet geometry; y_p and lambda1' in the spacing TB 880 uses (cores touching), with its GP 25 factor on y_s + y_p; T2 stated | T1, T3, y_s, y_p, W_d within 0.5%; lambda1' within 1% | T1 -0.0000%, T3 -0.0000%, y_s +0.0000%, W_d +0.1364% (TB 880 eps0 1e-9/36pi, IEC 8.854e-12), y_p -0.0000%, lambda1' +0.0001%; T2 +0.4265% (stated); rating at 90 °C with TB 880's loss factors 1134.95 A vs 1134.82 A, IEC defaults 1168.86 A | PASS | | 2 | BM4 | Saevik-Bruaseth EA population; no-radial-interaction bound | mean model/measured < 1.25 | mean ratio about 1.45; U1 > 2.0 | NOT VALIDATED (negative finding; radial interaction missing) | ## Test taxonomy (full gate suite) -- analytical_sanity: `1319 passed` -- independent_method: `92 passed` -- full_scale: `59 passed` +- analytical_sanity: `1356 passed` +- independent_method: `105 passed` +- full_scale: `62 passed` Run `pytest -m ` to reproduce each group. @@ -93,7 +100,7 @@ Does each benchmark's pass come from the cable/material definition, or from an i |----|------------------|-----------------------------| | BM1 | `menard2023.yaml` geometry + material library | YES — `ei_min_slip(cable)` | | BM3 | `nasution_2014_copper` curve in the S-N registry (cited fit) | YES — from the material/S-N definition | -| BM5 | Poradowski Table-1 **tabulated** T1/T2/T3 (cited) | PARTIAL — uses the cited tabulated network; `compute_thermal(cigre_tb880.yaml)` reads high (136 °C at the BM5 inputs, three cores) because the IEC-60287-2-1 three-core geometric factor is not yet applied | +| BM5 | Poradowski Table-1 **tabulated** T1/T2/T3 (cited) | PARTIAL — uses the cited tabulated network; the packaged `poradowski2025_220kv.yaml` is a single-core-equivalent stack of the three-core cable, so `compute_thermal` on it (SL-type losses and the filler geometric factor need the three cores) is not comparable | | BM6 | `copper_poon2022` SWT constants (cited registry) + representative contact | curve YES (registry); cable-level contact driver is representative, not from a cable | | WITZ | `witz1996.yaml` geometry + material library + digitised Witz Figs 5-6 | EI_min YES (parameter-free); WITZ-ID: initial pressure identified on the Fig. 5 width (declared `identified`), Fig. 6 predicted without refitting | | SV11 | `saevik2011.yaml` geometry (Table 1; outer armour, tapes and sheath assumed) + material library (polymer modulus identified on the Table 1 EI) + rig constants in `validation/scripts/check_saevik2011.py` + digitised Sævik Figs 17-23 and Gjøsteen Figs 27-35 | PARTIAL — section from the cable definition; the curvature profile along the pipe comes from a harness beam model with an assumed rotation point |