diff --git a/CHANGELOG.md b/CHANGELOG.md index 7349a78..d467252 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,48 @@ All notable changes to CableXSec are recorded in this file. The format follows `core_full_slip_moment` and `core_full_slip_curvature`. - The default stays `"absolute"`; its results are unchanged, bit for bit. +### Changed + +- The normal (out-of-surface, weak-axis) local bending of a helical wire follows the + wire's axial slip state. This is a correction and the new default; it changes results. + - Before, every recovery used the curve curvature of the deformed helix, + `cos²α cos2α` per unit projected curvature (Out and von Morgen 1997 Eq. 41; Leroy + and Estrier 2001 Eq. 13), in every slip state. That value belongs to a wire that + carries no friction stress. + - The bending strain of a wire is set by the rotation of its cross-section per unit + material length. The helix starts with the normal curvature `sin²α / r`, so the + axial strain `σ_f / E` that the wire carries adds `(sin²α / r) σ_f / E` + (`cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). A stuck wire with + the plane-section strain takes `cos⁴α`; with the stick coefficient ξ, + `cos²α cos2α + ξ sin²α cos²α`; a wire without friction stress keeps `cos²α cos2α`; + a wire in Coulomb slip keeps that slope and carries the offset of its friction + stress. On the outer face the term is `(t/2)(sin²α / r) σ_f`. + - Before, a stuck wire's weak-axis bending stress was low by + `cos⁴α / (cos²α cos2α) − 1`: 3.2 % at 10°, 15.5 % at 20.1° and 96 % at 35°. The + stick and slip limits were checked against an independent finite-element model of + a wire on a bent support (not published). + - It enters the fatigue field (direction-tied, distributed and progressive friction, + compiled and NumPy paths, with any termination increment), `compute_stress`, the + wire-yield capacity, the helix field of `compute_kinematics`, the rig-test gauges, + the laid cores (core normal curvature of `core_kinematics`, the component states and + utilisation), the frictional tape state and the outer-fibre strand-slip parameters + of conductors (stick slope `R cos²α + (d/2) cos⁴α`, friction amplitude times + `1 + (d/2) sin²α / R`). The lateral term `cos α (1 + sin²α)` and the section + stiffness are unchanged. + - `local_bending_fibre_stress`, `local_bending_stress` and `local_bending_amplitude` + take the friction stress and the helix radius as keyword arguments; without them + they return the value of a wire without friction stress, as before. + - Validation row σ_B now checks the three states (μ = 0 against Ménard Eq. 14, a stuck + wire, a slipping wire); its target is unchanged. No other row changes. Tests: + `tests/test_normal_term_slip_state.py`. + - Effect on the power-cable examples is small, because their wires slip in most of each + cycle and `(t/2) sin²α / r` is about 1e-3: on the 66 kV template record of + doc/template_66kv.md Section 4 the largest wire damage rises 0.23–0.27 % (inner + armour) and 0.05–0.06 % (outer armour) in all four model combinations; tutorial 3 + moves by −0.1 % (the governing inner face takes the term with the opposite sign) and + the tutorial and how-to outputs are regenerated. Riser armour at 35° in stick takes + nearly twice the earlier weak-axis bending stress. + ## [0.2.0] - 2026-11-21 The Python interfaces are versioned but may change before `1.0.0`. The evidence for diff --git a/VALIDATION.md b/VALIDATION.md index f55c02f..209c8ce 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -41,7 +41,7 @@ afterwards: a comparison that misses its target is reported as failed. | **TQ-SV** | Saint-Venant twist rigidity with free warping: rectangle; bonded annulus as a mirrored 60° sector | series solution; polar moment | 1.0e-4; −1.5e-8 | <3e-4; <1e-6 | Pass | | **TQ-FT** | Twist-rate wire stress of the fatigue path: stress and damage, torque and tension carried by the wires, mirror lay, zero twist | Knapp (1981), Eqs. 2, 11; `K_et`, `K_tt` | 4.5e-15; 2.2e-16; 0; 0 | <1e-12; <1e-12; <1e-12; 0 | Pass | | **A11** | Moment–curvature energy closure | loop area against closed form | 0.082 % | <0.1 % | Pass | -| **σ_B** | Radial-fibre bending stress | Ménard and Cartraud (2023), Eq. 14 | 0 | <1e-6 % | Pass | +| **σ_B** | Radial-fibre bending stress: no friction stress (μ = 0), stuck wire, slipping wire; the normal curvature follows the slip state | Ménard and Cartraud (2023), Eq. 14 (μ = 0); `cos²α cos2α + ξ sin²α cos²α` (stuck); Eq. 14 + `(sin²α / r) σ_f / E` (slipping) | 0; 0; 0 | <1e-6 % each | Pass | | **M-rec, M-rec-3core** | Assembled per-wire moment against the section engine | cross-engine | 0.000 % | <2 % | Pass | | **MK-Tcyc** | Moment–curvature law with tension cycling inside the bending cycles; work balance under the changing friction bound | fatigue-path friction stress, same kernels | 3.4e-16; 8.9e-16 | <1e-12 | Pass | | **MX-scale** | Exported bending law with a slip scaling variable: bound homogeneity, scaled group yield curvatures, tension cycle inside the bending cycles | `compute_mkappa` at another tension; contact-tension history | 5.5e-16; 1.2e-13; ratio 1.21 | <1e-12; <1e-9; ≤1.25 | Pass | diff --git a/doc/benchmarks.md b/doc/benchmarks.md index bb755d9..568fe6a 100644 --- a/doc/benchmarks.md +++ b/doc/benchmarks.md @@ -147,7 +147,7 @@ All rows are verification, not validation. Source: the scorecard | CF | A | Laid-core friction: μ = 0 gives the armour-only loop; large μ tangent vs EI_max; full-slip core moment vs closed form; dissipation ≥ 0; rotation equivariance | 0 N·m; < 1e-9; < 5e-3; ≥ 0; < 1e-9 rel. | 0; 1.0e-15; 1.0e-4; 5.0e-6; 5.0e-14 | PASS | | CFW | A | Laid-core contact statics (wedged trefoil and central filler, with and without a filler): radial equilibrium of one core; filler profiles: μ = 0 gives the armour-only loop; full-slip profile moment vs closed form; stick tangent vs `EI_max + E J_f cos³β_f / 2` | < 1e-12 rel.; 0 N·m; < 5e-3; < 1e-9 | 9.5e-17; 0; 1.0e-4; 7.8e-16 | PASS | | A11 | A | Moment–curvature energy closure (loop area vs closed form) | < 0.1% | 0.082% | PASS | -| σ_B | A | Radial-fibre bending stress vs Ménard Eq. 14 | < 1e-6% | 0 | PASS | +| σ_B | A | Radial-fibre bending stress at φ = 0: μ = 0 vs Ménard Eq. 14; stuck wire vs `cos²α cos2α + ξ sin²α cos²α`; slipping wire vs Eq. 14 + `(sin²α / r) σ_f / E` (section NT) | < 1e-6% each | 0; 0; 0 | PASS | | M-rec | I | Assembled per-wire moment vs `compute_mkappa`, single core | < 2% | 0.000% | PASS | | M-rec-3core | I | As M-rec, offset-core geometry | < 2% | 0.000% | PASS | | MK-Tcyc | I | `compute_mkappa` with a contact-tension history cycling inside the bending cycles vs the moment of the fatigue-path friction stress on the same history; work-balance residual over the friction work | < 1e-12 rel.; < 1e-12 rel. | 3.4e-16; 1.1e-15 | PASS | @@ -2980,6 +2980,31 @@ No input is changed and the band is not tightened: the model reproduces the source's analytical model term by term, and nothing published locates the FE's or the test's smaller direction dependence. +## Normal wire curvature and the slip state (NT) + +The normal (out-of-surface, weak-axis) local bending of a helical wire is +`cos²α cos2α p_n + (sin²α / r) σ_f / E` per unit material length: the curve +curvature of the deformed helix (Out and von Morgen 1997, Eq. 41; Leroy and +Estrier 2001, Eq. 13) plus the initial normal curvature `sin²α / r` times the +axial strain `σ_f / E` the wire carries +(`cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). Earlier +releases used `cos²α cos2α` in every slip state. The stick and slip limits were +checked against an independent finite-element model of a wire on a bent +support (not published). Tests `tests/test_normal_term_slip_state.py`. + +| ID | Class | Check | Target | Result | Status | +| --- | --- | --- | --- | --- | --- | +| NT-1 | A | Stuck wire, `ξ = 1`, monotonic ramp below the onset (10°, 20.1°, 35°; compiled and NumPy field): outer-face bending over `E (d/2) p_n` against `cos⁴α` | 1e-12 relative | PASS | PASS | +| NT-2 | A | Stuck wire with `ξ` = 0.35 and 0.8: `cos²α cos2α + ξ sin²α cos²α` | 1e-12 relative | PASS | PASS | +| NT-3 | A | `μ = 0` (no friction stress), direction-tied, distributed and progressive laws, biaxial history: the field equals Ménard Eq. 14 (`cos²α cos2α`) | 1e-12 of scale | PASS | PASS | +| NT-4 | A | Partial slip, cyclic biaxial history, three friction laws, compiled and NumPy: field minus the Eq. 14 value equals `(d/2)(sin²α / r) σ_f`; with a termination increment, `σ_f` includes it | 1e-12 of scale | PASS | PASS | +| NT-5 | A | Spring-slider on a planar history: stick steps take the slope `cos²α cos2α + ξ sin²α cos²α`, slip steps `cos²α cos2α` (no transition on a sample) | 1e-9 relative | PASS | PASS | +| NT-6 | A | Lateral term `cos α (1 + sin²α)` unchanged | 1e-12 of scale | PASS | PASS | +| NT-7 | A | Compiled assembly with friction, termination increment and a modulus history against the NumPy expressions | 1e-12 of scale | PASS | PASS | +| NT-8 | A | `compute_stress` (μ = 0 and the shipped μ), capacity bending (round and rectangular) against the closed form with the per-wire friction stress | 1e-12 | PASS | PASS | +| NT-9 | A | Laid cores: normal gradient `cos⁴β κ_r` stuck, `cos²β cos2β κ_r` free, `cos²β cos2β κ_r + (sin²β / r_c) ε_b` frictional | 1e-12 of scale | PASS | PASS | +| NT-10 | A | Conductor strand slip, outer fibre: stick slope `R cos²α + (d/2) cos⁴α`, slip slope `(d/2) cos²α cos2α`, friction amplitude times `1 + (d/2) sin²α / R`; centroid parameters unchanged | 1e-13 | PASS | PASS | + ## Planned benchmarks None of these is a completed comparison. Each will be registered under the diff --git a/doc/howto.md b/doc/howto.md index f41b6cf..921f204 100644 --- a/doc/howto.md +++ b/doc/howto.md @@ -149,16 +149,16 @@ tension and curvature, for a section stress map. ```text core state: frictional layer kind min MPa max MPa use limit -cu_conductor annulus -34.9 107.1 0.893 yielding +cu_conductor annulus -35.0 107.3 0.894 yielding conductor_screen annulus -0.2 0.3 - no limit given xlpe_insulation annulus -0.3 0.4 - no limit given insulation_screen annulus -0.3 0.4 - no limit given -cu_screen annulus -249.7 309.0 - follows the section +cu_screen annulus -250.0 310.7 - follows the section hdpe_core_sheath annulus -2.1 2.5 0.037 strain limit pp_filler annulus -7.0 7.6 - no limit given hdpe_bedding annulus -4.3 4.6 0.068 strain limit -inner_armour wires -71.4 152.2 0.221 yielding -outer_armour wires -25.7 97.8 0.142 yielding +inner_armour wires -71.9 152.7 0.221 yielding +outer_armour wires -25.7 98.0 0.142 yielding hdpe_outer_sheath annulus -5.5 5.9 0.086 strain limit inner_armour: 61 wires, centre line -38.9 to 119.7 MPa outer_armour: 67 wires, centre line 7.9 to 65.3 MPa @@ -218,8 +218,8 @@ all from one record. ```text armour: critical layer inner_armour, wire at 0 deg, fibre at 0 deg - inner_armour damage in 600 s 5.619e-05 - outer_armour damage in 600 s 2.468e-06 + inner_armour damage in 600 s 5.749e-05 + outer_armour damage in 600 s 2.509e-06 copper fibre: 122 cycles, max amplitude 1568 ue, damage 3.647e-05 curvature: mean 60 s maximum 0.0479 1/m, 1 h most probable 0.0761, 90 % fractile 0.0941 1/m inner_armour slip range 361.4 um, slipping share 0.56 diff --git a/doc/howto/figures/howto_04_section_stress.png b/doc/howto/figures/howto_04_section_stress.png index debf280..006a977 100644 Binary files a/doc/howto/figures/howto_04_section_stress.png and b/doc/howto/figures/howto_04_section_stress.png differ diff --git a/doc/local_analysis_guide.md b/doc/local_analysis_guide.md index 5e7caa8..146bbb2 100644 --- a/doc/local_analysis_guide.md +++ b/doc/local_analysis_guide.md @@ -552,6 +552,22 @@ rotating bending it can be constant while material points cycle. For direct control use `cx.compute_fatigue(cable, kx, ky, ...)` with one of `tension_N`, `axial_strain` or `section_states`. +**Local bending follows the slip state.** The normal (radial, weak-axis) +local bending of each wire is `E (t/2) [cos²α cos2α p_n + (sin²α / r) σ_f / E]` +with `p_n = κx cos φ + κy sin φ` and `σ_f` the friction stress the wire carries +at that sample (with any termination increment). The first term is the curve +curvature of the deformed helix (Out and von Morgen 1997, Eq. 41; Leroy and +Estrier 2001, Eq. 13); the second converts it to the rotation of the wire's +cross-section per unit material length, which is what bends the wire. A stuck +wire with the plane-section strain therefore takes `cos⁴α`, with the stick +coefficient `ξ` it takes `cos²α cos2α + ξ sin²α cos²α`, and a wire without +friction stress keeps `cos²α cos2α`. In Coulomb slip the slope stays +`cos²α cos2α`. The lateral term `cos α (1 + sin²α) p_l` does not depend on the +slip state. `radial_Pa` of `WireStressField` holds the sum, so every fibre +recovery and component stress concentration factor uses it. The stick and slip +limits were checked against an independent finite-element model of a wire on a +bent support (not published). + **Selected wire positions.** For long records at many cable locations, `cx.compute_fatigue(..., wire_positions=12)` evaluates 12 equally spaced wire positions per armour layer instead of every wire. A list of azimuths in degrees @@ -1201,7 +1217,9 @@ tendon on the bent pipe and its transverse equilibrium: coefficients per unit pipe curvature for a transverse slip fraction `eta` of the geodesic offset `w_g = r² cos a (1 + sin² a) / sin² a` (Sævik 1992 Eq. 2.30). `eta = 0` is the loxodrome of the fatigue path (lateral - `cos a (1 + sin² a)`, normal `cos² a cos 2a`), `eta = 1` the geodesic + `cos a (1 + sin² a)`, normal `cos² a cos 2a` for a tendon without friction + stress; the stress recovery adds the term of the tendon's slip state, + Section 5, Step 2), `eta = 1` the geodesic (lateral 0, normal `3 cos² a`, Sævik 1992 Eq. 2.32, Out and von Morgen 1997 Eq. 39; checked against a numerical geodesic on the torus in `validation/scripts/check_out_von_morgen.py`). @@ -2292,7 +2310,10 @@ kin = cx.core_kinematics(cable, kx, ky, state="stuck") # axis strain, gradient ``` A cable axial strain adds `ε cos²β` to the core axis in every state. The -layers of a core are taken as bonded (they share `ε_c`). +layers of a core are taken as bonded (they share `ε_c`). The normal gradient +`g_r` follows the core slip state like the normal bending of an armour wire +(Section 5, Step 2): `g_r = cos²β cos2β κ_r + (sin²β / r_c) ε_b`, with `ε_b` the +bending part of `ε_c`, which is `cos⁴β κ_r` stuck and `cos²β cos2β κ_r` free. ### 13.2 Wire screens wound about each core (P1) diff --git a/doc/template_66kv.md b/doc/template_66kv.md index 9f6adf2..ad21863 100644 --- a/doc/template_66kv.md +++ b/doc/template_66kv.md @@ -189,6 +189,13 @@ armour governs): | `direction_tied` (default) | 1.31e-9 | 7.88e-10 | | `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 +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 +stick-dependent values above. + The two friction laws agree within 1 % on this smooth history. Core friction (Section 4.1) does not change these damages: the fatigue path is curvature driven, and the armour wire stresses do not depend on the cores. At 50 kN the diff --git a/doc/tutorials/03_global_to_fatigue.md b/doc/tutorials/03_global_to_fatigue.md index 2fdba9b..da4a0d9 100644 --- a/doc/tutorials/03_global_to_fatigue.md +++ b/doc/tutorials/03_global_to_fatigue.md @@ -188,8 +188,8 @@ gives `T_e − p_o A_o`, and use `fatigue_from_series`. ```text warnings: DirectionTiedFrictionWarning, MissingClampingStateWarning -inner_armour: 139 wires, damage 7.715e-09 to 1.383e-08, largest on wire 70 at 181.3 deg, fibre 180.00 deg -outer_armour: 145 wires, damage 7.428e-09 to 8.886e-09, largest on wire 73 at 181.2 deg, fibre 180.00 deg +inner_armour: 139 wires, damage 7.715e-09 to 1.382e-08, largest on wire 70 at 181.3 deg, fibre 180.00 deg +outer_armour: 145 wires, damage 7.429e-09 to 8.884e-09, largest on wire 73 at 181.2 deg, fibre 180.00 deg governing: inner_armour, wire at 181.3 deg, fibre 180.00 deg (bulk damage) ``` @@ -250,7 +250,7 @@ wire about its own axes. `at_fibre(angle)` combines them at any fibre. ```text inner_armour: same damage as compute_fatigue True, 1 Hz equivalent range 2.18 to 12.39 MPa -outer_armour: same damage as compute_fatigue True, 1 Hz equivalent range 2.11 to 11.10 MPa +outer_armour: same damage as compute_fatigue True, 1 Hz equivalent range 2.11 to 11.09 MPa ``` With the contact pressure history of `armour_contact_histories` and the @@ -272,10 +272,10 @@ local analysis guide, and the `count_from_sample` argument of ```text S-N curve saevik_2011_flat_steel: slope m = 4, [Saevik2011] Eq. (89) stress at the governing fibre: 16.1 to 48.8 MPa -rainflow: 153.0 cycles, largest range 32.74 MPa +rainflow: 153.0 cycles, largest range 32.73 MPa equivalent range over the counted cycles 17.44 MPa equivalent range at 1 Hz, 600 cycles 12.39 MPa -damage from the equivalent range 1.3829e-08, from compute_fatigue 1.3829e-08 +damage from the equivalent range 1.3816e-08, from compute_fatigue 1.3816e-08 ``` For an S–N curve of a single slope `m`, the damage-equivalent stress range diff --git a/doc/tutorials/04_contact_and_fretting.md b/doc/tutorials/04_contact_and_fretting.md index bc674da..b3a2460 100644 --- a/doc/tutorials/04_contact_and_fretting.md +++ b/doc/tutorials/04_contact_and_fretting.md @@ -143,10 +143,10 @@ loading; they are not the stresses of the deformed contact. contact loads at 150 kN; extreme fibre of the dynamic bending at -4.0 deg inner_armour/outer_face on outer_armour: mu 0.12, load 209.7 N, p0 3112 MPa, transition amplitude 1.11 um largest slip amplitude 364 um; cycles in stick 0%, partial slip 16%, gross slip 84% - damage per year at the contact fibre 9.597 at 1 deg from the extreme fibre; largest wear at 88 deg + damage per year at the contact fibre 9.687 at 1 deg from the extreme fibre; largest wear at 88 deg outer_armour/inner_face on inner_armour: mu 0.12, load 209.7 N, p0 3112 MPa, transition amplitude 1.11 um largest slip amplitude 402 um; cycles in stick 0%, partial slip 15%, gross slip 85% - damage per year at the contact fibre 2.169 at 4 deg from the extreme fibre; largest wear at 88 deg + damage per year at the contact fibre 2.149 at 4 deg from the extreme fibre; largest wear at 88 deg outer_armour/outer_face: no normal load on this face ``` @@ -254,18 +254,18 @@ strain histories. ```text -wire 109 (gross slip): largest bulk cycle 373.0 MPa about 106.9 MPa -SWT of the bulk cycle alone 0.2598 MPa +wire 109 (gross slip): largest bulk cycle 373.9 MPa about 107.1 MPa +SWT of the bulk cycle alone 0.2610 MPa x = +0.0 a, z = 0.5 b: SWT 0.0000 MPa -x = -1.0 a, z = 0.5 b: SWT 0.2911 MPa -x = -1.1 a, z = 0.5 b: SWT 0.3546 MPa -x = -1.1 a, z = 0.05 b: SWT 0.8058 MPa, plane normal 8 deg from the wire axis -x = -1.1 a, z = 0.10 b: SWT 0.7393 MPa, plane normal 8 deg from the wire axis -x = -1.1 a, z = 0.20 b: SWT 0.6116 MPa, plane normal 8 deg from the wire axis -x = -1.1 a, z = 0.30 b: SWT 0.5033 MPa, plane normal 8 deg from the wire axis -x = -1.1 a, z = 0.50 b: SWT 0.3546 MPa, plane normal 8 deg from the wire axis -x = -1.1 a, z = 0.75 b: SWT 0.2665 MPa, plane normal 10 deg from the wire axis -x = -1.1 a, z = 1.00 b: SWT 0.2345 MPa, plane normal 10 deg from the wire axis +x = -1.0 a, z = 0.5 b: SWT 0.2923 MPa +x = -1.1 a, z = 0.5 b: SWT 0.3560 MPa +x = -1.1 a, z = 0.05 b: SWT 0.8079 MPa, plane normal 8 deg from the wire axis +x = -1.1 a, z = 0.10 b: SWT 0.7413 MPa, plane normal 8 deg from the wire axis +x = -1.1 a, z = 0.20 b: SWT 0.6134 MPa, plane normal 8 deg from the wire axis +x = -1.1 a, z = 0.30 b: SWT 0.5049 MPa, plane normal 8 deg from the wire axis +x = -1.1 a, z = 0.50 b: SWT 0.3560 MPa, plane normal 8 deg from the wire axis +x = -1.1 a, z = 0.75 b: SWT 0.2677 MPa, plane normal 10 deg from the wire axis +x = -1.1 a, z = 1.00 b: SWT 0.2356 MPa, plane normal 10 deg from the wire axis ``` The script builds one cycle at the crossing of the inner-armour wire with the diff --git a/doc/tutorials/figures/tutorial_03_damage_circumference.png b/doc/tutorials/figures/tutorial_03_damage_circumference.png index c1d9a9a..d43b49c 100644 Binary files a/doc/tutorials/figures/tutorial_03_damage_circumference.png and b/doc/tutorials/figures/tutorial_03_damage_circumference.png differ diff --git a/doc/tutorials/figures/tutorial_03_governing_fibre_stress.png b/doc/tutorials/figures/tutorial_03_governing_fibre_stress.png index 9fcdd44..a9e9fe6 100644 Binary files a/doc/tutorials/figures/tutorial_03_governing_fibre_stress.png and b/doc/tutorials/figures/tutorial_03_governing_fibre_stress.png differ diff --git a/doc/tutorials/figures/tutorial_04_swt_depth.png b/doc/tutorials/figures/tutorial_04_swt_depth.png index b6044d0..fb3931a 100644 Binary files a/doc/tutorials/figures/tutorial_04_swt_depth.png and b/doc/tutorials/figures/tutorial_04_swt_depth.png differ diff --git a/src/cablexsec/analysis/capacity.py b/src/cablexsec/analysis/capacity.py index 6864f85..07f77bf 100644 --- a/src/cablexsec/analysis/capacity.py +++ b/src/cablexsec/analysis/capacity.py @@ -137,7 +137,10 @@ from cablexsec.mechanics.papailiou import wire_slip_stress_bounds from cablexsec.mechanics.section_state import SectionState, solve_section_state from cablexsec.mechanics.stiffness import ea_fixed -from cablexsec.mechanics.wire_stress import local_bending_amplitude +from cablexsec.mechanics.wire_stress import ( + local_bending_amplitude, + slip_state_normal_curvature, +) from cablexsec.provenance import Provenance @@ -308,6 +311,8 @@ def _local_bending_max( e_w: float, lay_angle_rad: float, phi_bend: float, + friction_stress_Pa: NDArray[np.float64] | None = None, + r_helix_m: float | None = None, ) -> NDArray[np.float64]: """Largest local bending stress over the wire section [Pa]. @@ -315,18 +320,38 @@ def _local_bending_max( wires (gap G1): the normal curvature at the outer face ``t/2`` and the lateral curvature at the edge ``b/2`` combined at the corner (:meth:`~cablexsec.mechanics.tendon_section.WireSection.max_bending_stress`). + A given friction stress (with the helix radius) adds the normal curvature + of each wire's slip state + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`); + without it the normal term is the slip limit ``cos^2 a cos 2a``. """ assert layer.d_wire_m is not None if layer.wire_shape == "round": return np.asarray( local_bending_amplitude( - kappa, phi, e_w, layer.d_wire_m, lay_angle_rad, phi_bend + kappa, + phi, + e_w, + layer.d_wire_m, + lay_angle_rad, + phi_bend, + friction_stress_Pa=friction_stress_Pa, + r_helix_m=r_helix_m, ) ) section = layer.wire_section angle = np.asarray(phi, dtype=np.float64) - phi_bend c, s = math.cos(lay_angle_rad), math.sin(lay_angle_rad) - face = e_w * abs(kappa) * c * c * math.cos(2 * lay_angle_rad) * np.cos(angle) + if friction_stress_Pa is None: + face = e_w * abs(kappa) * c * c * math.cos(2 * lay_angle_rad) * np.cos(angle) + else: + assert r_helix_m is not None + face = e_w * ( + kappa * c * c * math.cos(2 * lay_angle_rad) * np.cos(angle) + + slip_state_normal_curvature( + friction_stress_Pa, e_w, lay_angle_rad, r_helix_m + ) + ) edge = e_w * abs(kappa) * c * (1 + s * s) * np.sin(angle) return section.max_bending_stress( face * section.half_thickness_m, edge * section.half_width_m @@ -685,7 +710,14 @@ def maximum_usage(kappa: float) -> float: sigma_slip = np.where(cos_phi >= 0.0, cap_hi, cap_lo) sigma_friction = np.sign(cos_phi) * np.minimum(sigma_stick, sigma_slip) sigma_bending = _local_bending_max( - layer, kappa, phi, spec.E_wire_Pa, spec.lay_angle_rad, phi_bend + layer, + kappa, + phi, + spec.E_wire_Pa, + spec.lay_angle_rad, + phi_bend, + friction_stress_Pa=sigma_friction, + r_helix_m=spec.r_helix_m, ) sigma_total = ( np.abs(sigma_axial + sigma_friction + sigma_T_Pa) + sigma_bending diff --git a/src/cablexsec/analysis/components.py b/src/cablexsec/analysis/components.py index 81826a2..67efc98 100644 --- a/src/cablexsec/analysis/components.py +++ b/src/cablexsec/analysis/components.py @@ -114,7 +114,10 @@ from cablexsec.mechanics.shell_bending import shell_wall_stress from cablexsec.mechanics.stiffness import axial_stiffness_by_layer from cablexsec.mechanics.thermal import ThermalResult -from cablexsec.mechanics.wire_stress import local_bending_amplitude +from cablexsec.mechanics.wire_stress import ( + local_bending_amplitude, + slip_state_normal_curvature, +) from cablexsec.provenance import Provenance, require_finite __all__ = [ @@ -418,6 +421,22 @@ def _axial_stiffnesses(cable: CableData) -> dict[str, float]: return axial_stiffness_by_layer(cable) +def _core_slip_curvature( + beta: float, r_c: float, axis_strain: float | np.ndarray +) -> np.ndarray: + """Normal curvature of a laid core's slip state [1/m]. + + ``(sin^2(beta) / r_c) epsilon_b`` of the bending part ``epsilon_b`` of + the core-axis strain + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`): + the core's normal curvature is ``cos^4(beta)`` per unit projected cable + curvature when stuck and ``cos^2(beta) cos(2 beta)`` when free. + """ + if r_c <= 0.0: + return np.zeros_like(np.asarray(axis_strain, dtype=np.float64)) + return slip_state_normal_curvature(axis_strain, 1.0, beta, r_c) + + @dataclass(frozen=True) class _CoreAxis: """Bending part of the core-axis strain of each core, per slip state. @@ -582,6 +601,7 @@ def _resolved_core_states( """ phi = np.linspace(0, 2 * math.pi, n_points, endpoint=False) beta = core_angle(section_state.cable, layer) + r_c = float(layer.r_offset_m or 0.0) e = section_state.youngs_modulus_Pa[layer.name] out: dict[str, list[np.ndarray]] = {} for state in CORE_SLIP_STATES: @@ -600,6 +620,22 @@ def _resolved_core_states( local_x, local_y = core_bending_components( beta, phase, kappa_x, kappa_y ) + # The normal curvature of the core follows its slip state. + local_x += float( + _core_slip_curvature(beta, r_c, float(axis_strain[core])) + ) + ring_strain = ( + c2 + * ring.r_helix_m + * (local_x * np.cos(phi) + local_y * np.sin(phi)) + ) + # The ring wires carry the ring strain (held to the core axis) + # or none (free), which sets their own normal curvature. + held = ( + e * ring_strain + if state != "free" and ring.r_helix_m > 0.0 + else None + ) amp = local_bending_amplitude( math.hypot(local_x, local_y), phi, @@ -607,11 +643,8 @@ def _resolved_core_states( ring.d_wire_m, ring.lay_angle_rad, math.atan2(local_y, local_x), - ) - ring_strain = ( - c2 - * ring.r_helix_m - * (local_x * np.cos(phi) + local_y * np.sin(phi)) + friction_stress_Pa=held, + r_helix_m=ring.r_helix_m if held is not None else None, ) if state == "free": centre = np.full(n_points, mean) @@ -641,6 +674,7 @@ def _laid_annulus_states( scales the bending about the core's own axis (:func:`own_bending_ratio`). """ beta = core_angle(section_state.cable, layer) + r_c = float(layer.r_offset_m or 0.0) theta = np.linspace(0, 2 * math.pi, n_points, endpoint=False) if radius is None: radius = layer.r_outer_m or 0.0 @@ -658,6 +692,7 @@ def _laid_annulus_states( for i in range(layer.n_cores): phase = 2 * math.pi * i / layer.n_cores bx, by = core_bending_components(beta, phase, kx, ky) + bx += float(_core_slip_curvature(beta, r_c, float(axis_strain[i]))) bending = e * c2 * (bx * local_x + by * local_y) chunks.append(mean + bending + e * c2 * axis_strain[i]) out[state] = chunks @@ -1855,8 +1890,11 @@ def core_component_utilisation( c, s = math.cos(beta), math.sin(beta) radial = kx * np.cos(phi) + ky * np.sin(phi) tangential = -kx * np.sin(phi) + ky * np.cos(phi) + # The normal curvature of the core follows its slip state. local = np.hypot( - c * c * math.cos(2 * beta) * radial, c * (1 + s * s) * tangential + c * c * math.cos(2 * beta) * radial + + _core_slip_curvature(beta, float(layer.r_offset_m or 0.0), axis), + c * (1 + s * s) * tangential, ) c2 = axial_cosine(layer) ** 2 lever = own_bending_ratio(layer) * float(layer.r_outer_m or 0.0) diff --git a/src/cablexsec/analysis/fast_field.py b/src/cablexsec/analysis/fast_field.py index 5fd62e3..8641233 100644 --- a/src/cablexsec/analysis/fast_field.py +++ b/src/cablexsec/analysis/fast_field.py @@ -9,8 +9,10 @@ arithmetic of the NumPy expressions it replaces, operation for operation: the local bending stress of :func:`cablexsec.mechanics.wire_stress.local_bending_fibre_stress` at the -outward radial fibre and at the edge (fibre angle ``pi/2``), the outward -total ``((sigma_A + sigma_B) + sigma_f) + sigma_T`` plus any termination +outward radial fibre and at the edge (fibre angle ``pi/2``), with the +normal curvature of the wire's slip state from its friction stress (and any +termination increment) when the helix radius is given, the outward total +``((sigma_A + sigma_B) + sigma_f) + sigma_T`` plus any termination increment, and ``mean = outward - radial``. The trigonometric factors are evaluated by NumPy, as in the reference expressions, and passed in. The results are equal to the NumPy path bit for bit @@ -28,6 +30,7 @@ from numpy.typing import NDArray from cablexsec._numba import HAVE_NUMBA, njit +from cablexsec.exceptions import CableInputError __all__ = ["HAVE_NUMBA", "assemble_wire_field"] @@ -53,6 +56,9 @@ def _assemble_kernel( thermal: FloatArray, extra: FloatArray, has_extra: bool, + modulus: FloatArray, + slip_coefficient: float, + has_slip: bool, ) -> tuple[FloatArray, FloatArray, FloatArray]: n_w, n_t = friction.shape mean = np.empty((n_w, n_t)) @@ -65,6 +71,11 @@ def _assemble_kernel( x = kx[i] y = ky[i] rb = c_radial * (x * cp + y * sp) + if has_slip: + f = friction[w, i] + if has_extra: + f = f + extra[w, i] + rb = rb + slip_coefficient * (f / modulus[i]) tb = c_tangential * ((-x) * sp + y * cp) sb = coef_radial[i] * (rb * cos_outward + tb * sin_outward) out = ((axial[i] + sb) + friction[w, i]) + thermal[i] @@ -88,22 +99,29 @@ def assemble_wire_field( friction_Pa: FloatArray, thermal_Pa: FloatArray, extra_Pa: FloatArray | None = None, + r_helix_m: float | None = None, ) -> tuple[FloatArray, FloatArray, FloatArray]: """``(mean, radial, tangential)`` of the wire stress field [Pa]. - Equal bit for bit to the NumPy expressions :: + Equal to the NumPy expressions :: - radial = local_bending_fibre_stress(kx, ky, phi[:, None], E, depth, a) + held = friction + extra # friction alone without extra + radial = local_bending_fibre_stress( + kx, ky, phi[:, None], E, depth, a, + friction_stress_Pa=held, r_helix_m=r_helix_m, + ) tangential = local_bending_fibre_stress( - kx, ky, phi[:, None], E, width, a, pi / 2 + kx, ky, phi[:, None], E, width, a, pi / 2, + friction_stress_Pa=held, r_helix_m=r_helix_m, ) outward = axial[None, :] + radial + friction + thermal[None, :] outward = outward + extra # when given mean = outward - radial - ``modulus_Pa`` is a constant or one value per sample; ``axial_Pa`` and - ``thermal_Pa`` hold one value per sample, ``friction_Pa`` and - ``extra_Pa`` one row per wire. + ``r_helix_m=None`` leaves out the normal curvature of the slip state + (``friction_stress_Pa=None`` above). ``modulus_Pa`` is a constant or one + value per sample; ``axial_Pa`` and ``thermal_Pa`` hold one value per + sample, ``friction_Pa`` and ``extra_Pa`` one row per wire. """ kx = np.ascontiguousarray(kappa_x, dtype=np.float64) ky = np.ascontiguousarray(kappa_y, dtype=np.float64) @@ -116,7 +134,15 @@ def assemble_wire_field( c, s = math.cos(lay_angle_rad), math.sin(lay_angle_rad) c_radial = c * c * math.cos(2 * lay_angle_rad) c_tangential = c * (1 + s * s) + has_slip = r_helix_m is not None + slip_coefficient = 0.0 + if r_helix_m is not None: + if not (math.isfinite(r_helix_m) and r_helix_m > 0.0): + raise CableInputError("the helix radius must be finite and positive") + # As slip_state_normal_curvature forms it. + slip_coefficient = math.sin(lay_angle_rad) ** 2 / r_helix_m modulus = np.asarray(modulus_Pa) + modulus_t = np.ascontiguousarray(np.broadcast_to(modulus, (n_t,)), dtype=np.float64) coef_radial = np.ascontiguousarray( np.broadcast_to(modulus * depth_m / 2, (n_t,)), dtype=np.float64 ) @@ -148,4 +174,7 @@ def assemble_wire_field( np.ascontiguousarray(thermal_Pa, dtype=np.float64), extra, extra_Pa is not None, + modulus_t, + slip_coefficient, + has_slip, ) diff --git a/src/cablexsec/analysis/fatigue.py b/src/cablexsec/analysis/fatigue.py index 506db89..3d0c64f 100644 --- a/src/cablexsec/analysis/fatigue.py +++ b/src/cablexsec/analysis/fatigue.py @@ -841,7 +841,9 @@ def _wire_stress_series( Shape ``(n_wires, n_steps)``; ``sigma_total = sigma_A + sigma_B + sigma_f + sigma_T`` with the parts of :func:`_wire_stress_parts` (same options) and the local bending stress at the outer face (``t/2`` for a - rectangular or profiled wire, gap G1). + rectangular or profiled wire, gap G1), whose normal curvature follows + the slip state of the friction stress + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). """ parts = _wire_stress_parts( layer, @@ -869,6 +871,8 @@ def _wire_stress_series( spec.E_wire_Pa if wire_modulus_Pa is None else wire_modulus_Pa, d_wire, spec.lay_angle_rad, + friction_stress_Pa=parts.friction, + r_helix_m=spec.r_helix_m, ) return np.asarray( parts.axial[None, :] + sigma_B_kt + parts.friction + parts.thermal[None, :] @@ -1276,7 +1280,14 @@ def wire_stress_field( Local tendon bending (gap G1, :mod:`cablexsec.mechanics.tendon_bending`). A rectangular or profiled wire (``layer.spec.section``) takes its local - bending at the outer face ``t/2`` and the edge ``b/2``. ``transverse`` + bending at the outer face ``t/2`` and the edge ``b/2``. The normal + (radial) curvature follows each wire's axial slip state: the + deformed-helix term ``cos^2 a cos 2a p_n`` plus ``(sin^2 a / r_h) + sigma_f / E`` of the friction stress the wire carries, with any + termination increment + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`): + ``cos^4 a`` for a stuck wire with ``xi = 1``, ``cos^2 a cos 2a`` without + friction stress. ``transverse`` (:class:`~cablexsec.mechanics.tendon_bending.TransverseSlipModel`) adds the transverse slip towards the geodesic per wire (Jenkin element): the lateral curvature becomes ``cos a (1 + sin^2 a) p_l - k^2 v`` and the @@ -1426,8 +1437,12 @@ def wire_stress_field( depth = 2 * spec.section.half_thickness_m width = 2 * spec.section.half_width_m phi_eval = spec.phi_wires if wires is None else spec.phi_wires[wires] + # The normal curvature of each wire's slip state is set by the axial + # stress the wire carries from bending: its friction stress with any + # termination clamp increment. + held = parts.friction if extra is None else parts.friction + extra if _FAST_FIELD: - # One compiled pass, equal bit for bit to the expressions below. + # One compiled pass, with the arithmetic of the expressions below. mean, radial, tangential = assemble_wire_field( kx, ky, @@ -1440,6 +1455,7 @@ def wire_stress_field( parts.friction, parts.thermal, extra, + spec.r_helix_m, ) else: # Outward radial fibre (y_n = t/2) and edge (y_l = b/2); a rectangular @@ -1451,6 +1467,8 @@ def wire_stress_field( modulus, depth, spec.lay_angle_rad, + friction_stress_Pa=held, + r_helix_m=spec.r_helix_m, ) tangential = local_bending_fibre_stress( kx, @@ -1460,6 +1478,8 @@ def wire_stress_field( width, spec.lay_angle_rad, math.pi / 2, + friction_stress_Pa=held, + r_helix_m=spec.r_helix_m, ) outward = ( parts.axial[None, :] + radial + parts.friction + parts.thermal[None, :] diff --git a/src/cablexsec/analysis/kinematics.py b/src/cablexsec/analysis/kinematics.py index de98b96..baa5516 100644 --- a/src/cablexsec/analysis/kinematics.py +++ b/src/cablexsec/analysis/kinematics.py @@ -78,7 +78,8 @@ strain; the ends are held against twist, so the twist is zero. The centre-line wire stress is ``E cos^2 a eps0 + sigma_f``; the utilisation is the largest stress round the wire (with its local bending, -:func:`~cablexsec.mechanics.wire_stress.local_bending_fibre_stress`) over the +:func:`~cablexsec.mechanics.wire_stress.local_bending_fibre_stress`, whose +normal curvature follows the friction stress of the station) over the yield stress of the armour material. The transverse slip of the wire from its loxodrome @@ -569,8 +570,14 @@ def _bending( phi: FloatArray, kx: FloatArray, ky: FloatArray, + friction: FloatArray, ) -> tuple[FloatArray, FloatArray]: - """Local bending stress at the outer face and the edge (stations, kept).""" + """Local bending stress at the outer face and the edge (stations, kept). + + The normal curvature follows each station's slip state through its + friction stress + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). + """ depth = 2.0 * section.half_thickness_m width = 2.0 * section.half_width_m radial = local_bending_fibre_stress( @@ -580,6 +587,8 @@ def _bending( spec.E_wire_Pa, depth, spec.lay_angle_rad, + friction_stress_Pa=friction, + r_helix_m=spec.r_helix_m, ) tangential = local_bending_fibre_stress( kx[None, :], @@ -589,6 +598,8 @@ def _bending( width, spec.lay_angle_rad, math.pi / 2, + friction_stress_Pa=friction, + r_helix_m=spec.r_helix_m, ) return np.asarray(radial), np.asarray(tangential) @@ -646,7 +657,7 @@ def _armour_field( slip, slipping, share = _spring_slider_slip(spec, phi, stress, drive, sign) friction = stress[:, drive.kept] kx, ky = drive.kx[drive.kept], drive.ky[drive.kept] - radial, tangential = _bending(spec, section, phi, kx, ky) + radial, tangential = _bending(spec, section, phi, kx, ky, friction) transverse_slip = None if transverse is not None: transverse_slip, radial, tangential = _transverse( diff --git a/src/cablexsec/analysis/rig_test.py b/src/cablexsec/analysis/rig_test.py index df00ac3..5868c87 100644 --- a/src/cablexsec/analysis/rig_test.py +++ b/src/cablexsec/analysis/rig_test.py @@ -28,7 +28,8 @@ Sectional friction and local bending: the package laws at the local curvature ``kappa(x, t) = kappa_ref(t) k_hat(x)`` (direction-tied friction, :func:`~cablexsec.mechanics.fast_slip.wire_friction_stress`; outward-fibre -local bending, :func:`~cablexsec.mechanics.wire_stress.local_bending_fibre_stress`). +local bending, :func:`~cablexsec.mechanics.wire_stress.local_bending_fibre_stress`, +whose normal curvature follows the friction strain the wire carries). Clamp: each wire is followed along the whole specimen with the anchored-wire solver of :mod:`cablexsec.mechanics.clamp_layer` (anchors at both clamps, @@ -1447,34 +1448,42 @@ def rng(values: FloatArray) -> float: def bending( theta: float, + friction_microstrain: FloatArray, kx: FloatArray = kx_local, sp: HelicalLayerSpec = spec, d: float = diameter, ) -> FloatArray: + # Outer-face local bending; its normal curvature follows the + # wire's slip state through the friction strain it carries. stress = local_bending_fibre_stress( - kx, 0.0, theta, sp.E_wire_Pa, d, sp.lay_angle_rad, 0.0 + kx, + 0.0, + theta, + sp.E_wire_Pa, + d, + sp.lay_angle_rad, + 0.0, + friction_stress_Pa=friction_microstrain * 1e-6 * sp.E_wire_Pa, + r_helix_m=sp.r_helix_m, ) return np.asarray(stress / sp.E_wire_Pa * 1e6) nominal = runs[(g.layer, *nominal_key)] theta_g = nominal.theta[i] - bend = bending(theta_g) friction = nominal.friction[i] + bend = bending(theta_g, friction) total = axial + bend + friction - by_mu = { - mu_nominal[g.layer] * f: rng( - axial + bend + runs[(g.layer, f, nominal_setback)].friction[i] + by_mu: dict[float, float] = {} + for f in mu_values: + held = runs[(g.layer, f, nominal_setback)].friction[i] + by_mu[mu_nominal[g.layer] * f] = rng(axial + bending(theta_g, held) + held) + by_setback: dict[float, float] = {} + for sb in setbacks: + run = runs[(g.layer, 1.0, sb)] + by_setback[sb] = rng( + axial + bending(run.theta[i], run.friction[i]) + run.friction[i] ) - for f in mu_values - } - by_setback = { - sb: rng( - axial - + bending(runs[(g.layer, 1.0, sb)].theta[i]) - + runs[(g.layer, 1.0, sb)].friction[i] - ) - for sb in setbacks - } + sectional = nominal.sectional[i] results.append( GaugeResult( location=g, @@ -1492,7 +1501,7 @@ def bending( "total": rng(total), }, range_by_mu=by_mu, - range_sectional=rng(axial + bend + nominal.sectional[i]), + range_sectional=rng(axial + bending(theta_g, sectional) + sectional), range_by_setback=by_setback, ) ) diff --git a/src/cablexsec/analysis/stress.py b/src/cablexsec/analysis/stress.py index e16c5fb..79028da 100644 --- a/src/cablexsec/analysis/stress.py +++ b/src/cablexsec/analysis/stress.py @@ -20,7 +20,11 @@ ============ ====================================================== ============== with ``σ_total = σ_A + σ_B + σ_f + σ_T`` and ``p_0`` the Hertz peak pressure of -the opposite-laid armour crossing. +the opposite-laid armour crossing. The normal (radial) curvature in ``σ_B`` +follows each wire's slip state: ``cos²α cos2α κ cosθ + (sin²α / r) σ_f / E`` +(:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`), which +is ``cos⁴α`` for a stuck wire with ``ξ = 1`` and the Eq. 14 value +``cos²α cos2α`` for a wire without friction stress. The retained sigma_vm names do not denote a resolved contact tensor invariant: the axial and contact terms need not be coincident, and the result is not a proven upper bound. A local contact assessment must recover coincident tensors. @@ -78,6 +82,7 @@ from cablexsec.mechanics.wire_stress import ( local_bending_amplitude, local_bending_stress, + slip_state_normal_curvature, von_mises_stress, ) from cablexsec.provenance import Provenance, require_finite @@ -397,11 +402,22 @@ def compute_stress( # second thermal increment or replace it with N/EA. sigma_A_val = section_state.layers[lyr.name].longitudinal_stress_Pa sigma_A = np.full(spec.n_wires, sigma_A_val) - # sigma_B: local wire bending ([MenardCartraud2023] Eq. 14). + # sigma_B: local wire bending ([MenardCartraud2023] Eq. 14), with the + # normal curvature of each wire's slip state from its friction stress + # (cos^4 a stuck at xi = 1, cos^2 a cos 2a without friction stress). section = spec.section depth = d_wire if section is None else 2.0 * section.half_thickness_m sigma_B = np.asarray( - local_bending_stress(kappa_mag, phi, e_w, depth, a, phi_bend) + local_bending_stress( + kappa_mag, + phi, + e_w, + depth, + a, + phi_bend, + friction_stress_Pa=sigma_f, + r_helix_m=r_h, + ) ) # sigma_T: fully restrained thermal increment (0 if isothermal). # Heating at fixed global strain is compressive in the tensile-positive @@ -428,12 +444,22 @@ def compute_stress( sigma_vm = np.asarray(von_mises_stress(sigma_total, p0)) if section is None: bending_amplitude = local_bending_amplitude( - kappa_mag, phi, e_w, d_wire, a, phi_bend + kappa_mag, + phi, + e_w, + d_wire, + a, + phi_bend, + friction_stress_Pa=sigma_f, + r_helix_m=r_h, ) else: # Rectangular/profiled wire (gap G1): corner of the section. s_a = math.sin(a) - face = e_w * kappa_mag * cos_b**2 * math.cos(2 * a) * cphi + face = e_w * ( + kappa_mag * cos_b**2 * math.cos(2 * a) * cphi + + slip_state_normal_curvature(sigma_f, e_w, a, r_h) + ) edge = e_w * kappa_mag * cos_b * (1 + s_a * s_a) * np.sin(phi - phi_bend) bending_amplitude = section.max_bending_stress( face * section.half_thickness_m, edge * section.half_width_m diff --git a/src/cablexsec/analysis/tape.py b/src/cablexsec/analysis/tape.py index 4f3c724..2238235 100644 --- a/src/cablexsec/analysis/tape.py +++ b/src/cablexsec/analysis/tape.py @@ -54,7 +54,11 @@ ``sigma_0 = rho (P1 + P2) / (t sin^2 beta)`` and ``psi`` the helix angle from the neutral line of the current bending direction ([Papailiou1997]; the per-unit-length friction force of a tape is - ``mu (P1 + P2) w``), plus the uniform part. + ``mu (P1 + P2) w``), plus the uniform part. The flat-wise bending of the + free state gains, in this state, ``+-(t/2) (sin^2 beta / rho) sigma / E`` + of the bending stress ``sigma`` the line carries: the normal curvature of + a helix follows its axial slip state + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). Slip and overlap ---------------- @@ -129,6 +133,7 @@ from cablexsec.mechanics.core_friction import CoreFrictionSpec from cablexsec.mechanics.core_kinematics import CoreSlipState, core_kinematics from cablexsec.mechanics.radial_cable import CableRadialState +from cablexsec.mechanics.wire_stress import slip_state_normal_curvature from cablexsec.provenance import Provenance __all__ = [ @@ -300,6 +305,7 @@ def tape_strain( else: last = direction[i] line_strain: dict[float, FloatArray] = {} + line_bending: dict[float, FloatArray] = {} for w_pos in lines: ang = theta + w_pos * geometry.edge_angle_rad bend_stuck = rho * ( @@ -324,6 +330,7 @@ def tape_strain( bend_stuck, direction, ang, k, sigma0, mu * math.sin(beta) ) membrane = uniform + stress / E_Pa + line_bending[w_pos] = stress / E_Pa line_strain[w_pos] = membrane if w_pos == 0.0: # slip along the tape: integral of (stuck - carried) strain @@ -357,6 +364,12 @@ def tape_strain( value = line_strain[w_pos] if state != "stuck": value = value + face * half_t * flat + if w_pos in line_bending: + # The flat-wise curvature follows the slip state of the + # line: (sin^2 beta / rho) times its bending strain. + value = value + face * half_t * slip_state_normal_curvature( + line_bending[w_pos], 1.0, beta, rho + ) if path == "loxodromic" and w_pos != 0.0: value = value + w_pos * half_w * edge else: diff --git a/src/cablexsec/mechanics/core_kinematics.py b/src/cablexsec/mechanics/core_kinematics.py index 88afd16..2b56eb7 100644 --- a/src/cablexsec/mechanics/core_kinematics.py +++ b/src/cablexsec/mechanics/core_kinematics.py @@ -18,12 +18,15 @@ ``theta = pi/2`` along the lay circle in the direction of increasing ``phi``) and ``g_r``, ``g_t`` are the strain gradients of the core's own bending: the two Lutchansky components of the helical core axis, -``g_r = cos^2(beta) cos(2 beta) kappa_r`` and +``g_r = cos^2(beta) cos(2 beta) kappa_r + (sin^2(beta) / r_c) epsilon_b`` and ``g_t = cos(beta) (1 + sin^2 beta) kappa_t`` (:func:`cablexsec.mechanics.core_lay.core_bending_components`, after -[MenardCartraud2023] Eq. 14). The core curvature follows the cable curvature -in every state; the slip state sets only the core-axis strain -``epsilon_c``: +[MenardCartraud2023] Eq. 14), where ``epsilon_b`` is the bending part of the +core-axis strain (the normal curvature of a helical rod follows its axial +slip state, :func:`cablexsec.mechanics.wire_stress.slip_state_normal_curvature`: +``g_r = cos^4(beta) kappa_r`` stuck, ``cos^2(beta) cos(2 beta) kappa_r`` +free). The slip state sets the core-axis strain ``epsilon_c`` and, through +it, the normal core curvature: ``"stuck"`` Plane-section bound: the core is bonded to the cable cross-section, @@ -84,6 +87,7 @@ from cablexsec.mechanics.core_lay import core_angle from cablexsec.mechanics.radial_cable import CableRadialState from cablexsec.mechanics.section_state import SectionState +from cablexsec.mechanics.wire_stress import slip_state_normal_curvature __all__ = [ "CORE_SLIP_STATES", @@ -308,6 +312,9 @@ def core_kinematics( else: axis = np.zeros((count, kx.size)) xi = 0.0 + # The normal curvature of the core follows its slip state through the + # bending part of the core-axis strain (before the axial strain is added). + held = slip_state_normal_curvature(axis, 1.0, beta, r_c) if r_c > 0.0 else 0.0 if eps_axial is not None: axis = axis + math.cos(beta) ** 2 * eps_axial[None, :] c, s = math.cos(beta), math.sin(beta) @@ -320,7 +327,7 @@ def core_kinematics( lay_angle_rad=beta, phase_rad=phase, axis_strain=np.asarray(axis, dtype=np.float64), - gradient_radial_per_m=np.asarray(c * c * math.cos(2.0 * beta) * kr), + gradient_radial_per_m=np.asarray(c * c * math.cos(2.0 * beta) * kr + held), gradient_tangential_per_m=np.asarray(c * (1.0 + s * s) * kt), xi=xi, slipping=slipping, diff --git a/src/cablexsec/mechanics/core_lay.py b/src/cablexsec/mechanics/core_lay.py index 1a8119c..1db762f 100644 --- a/src/cablexsec/mechanics/core_lay.py +++ b/src/cablexsec/mechanics/core_lay.py @@ -41,7 +41,12 @@ def core_bending_components( The azimuth is measured from the positive extension side of kx, as in the global core-axis strain. Ménard and Cartraud (2023), Eq. (14), use an azimuth measured from the bending axis instead. Its second coefficient - is cos²(angle)*cos(2*angle), not cos⁴(angle). + is cos²(angle)*cos(2*angle), the curve curvature of the deformed helix: + the normal curvature of a core that carries no bending axial strain + (free). The slip state adds ``(sin²(angle) / r_c) epsilon_b`` of the + bending part of the core-axis strain + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`), + which makes a stuck core ``cos⁴(angle)``; the callers add it. """ c, s = math.cos(angle), math.sin(angle) radial = kx * math.cos(phase) + ky * math.sin(phase) diff --git a/src/cablexsec/mechanics/strand_slip.py b/src/cablexsec/mechanics/strand_slip.py index 0fa76b2..cde416c 100644 --- a/src/cablexsec/mechanics/strand_slip.py +++ b/src/cablexsec/mechanics/strand_slip.py @@ -42,8 +42,14 @@ resolved wire ring of a stranded conductor from geometry, friction and contact load. The stick slope is the plane-section strain ``R cos^2 alpha``; the slip slope is the local wire bending ``(d/2) cos^2 alpha cos 2 alpha`` -([Nasution2014b] Eq. 6); the friction amplitude integrates the available -friction force per unit wire length over a quarter pitch +([Nasution2014b] Eq. 6). At the outer fibre the normal curvature of the wire +follows its slip state +(:func:`cablexsec.mechanics.wire_stress.slip_state_normal_curvature`): the +axial strain the wire carries is taken ``1 + (d/2) sin^2 alpha / R`` times +(``StrandSlipParameters.slip_state_factor``), so the outer-fibre stick slope +is ``R cos^2 alpha + (d/2) cos^4 alpha`` and the slip slope stays +``(d/2) cos^2 alpha cos 2 alpha``. The friction amplitude integrates the +available friction force per unit wire length over a quarter pitch ([Nasution2014b] Eq. 7). The interface line loads are the inward helix loads of all rings outside the interface (with the ring's own load on its inner face), the reading of [Nasution2014b] Eq. 9 adopted here, plus an optional @@ -112,6 +118,13 @@ class StrandSlipParameters: eps_f_zero_tension : tuple of float Friction strain amplitudes at zero tension (pressure-held contact). Empty means zero, which is Eq. 4 exactly. + slip_state_factor : float + Factor on the wire-axis part ``eps_B - beta_n kappa`` of the bending + strain, the axial strain the wire carries (positive). At the outer + fibre of a wire it is ``1 + (d/2) sin^2 a / R``: the normal curvature + of the wire follows its slip state + (:func:`cablexsec.mechanics.wire_stress.slip_state_normal_curvature`). + ``1`` (default) leaves the operator of the source unchanged. """ alpha_per_N: float @@ -119,6 +132,7 @@ class StrandSlipParameters: eps_f_ref: tuple[float, ...] T0_N: float eps_f_zero_tension: tuple[float, ...] = field(default=()) + slip_state_factor: float = 1.0 def __post_init__(self) -> None: beta = tuple(float(x) for x in self.beta_m) @@ -131,6 +145,10 @@ def __post_init__(self) -> None: values = (self.alpha_per_N, self.T0_N, *beta, *ref, *zero) if not all(math.isfinite(x) for x in values): raise CableInputError("strand-slip parameters must be finite") + factor = float(self.slip_state_factor) + if not (math.isfinite(factor) and factor > 0.0): + raise CableInputError("slip_state_factor must be finite and positive") + object.__setattr__(self, "slip_state_factor", factor) if min(ref + zero, default=0.0) < 0: raise CableInputError("friction strain amplitudes must be nonnegative") if self.T0_N < 0 or (self.T0_N == 0 and ref != zero): @@ -346,6 +364,11 @@ def strand_slip_strain( np.ascontiguousarray(kappa_e), np.ascontiguousarray(eps_f), beta ) bending = order_strain[-1] + if parameters.slip_state_factor != 1.0: + # The axial part the wire carries, eps_B - beta_n kappa, sets the + # normal curvature of its slip state at the outer fibre. + local = beta[-1] * kappa_e + bending = local + parameters.slip_state_factor * (bending - local) axial = np.broadcast_to(parameters.alpha_per_N * tension, kappa_e.shape).copy() provenance = Provenance( method=( @@ -530,6 +553,13 @@ def _friction_strain( return math.pi * ring.r_helix_m * tau / (2.0 * s * ring.area_m2 * E_Pa) +def _outer_fibre_slip_factor( + d_wire_m: float, lay_angle_rad: float, r_helix_m: float +) -> float: + """``(d/2) sin^2 a / R``: outer-fibre normal curvature per wire-axis strain.""" + return 0.5 * d_wire_m * math.sin(lay_angle_rad) ** 2 / r_helix_m + + def conductor_ring_parameters( rings: Sequence[ConductorRing], E_Pa: float, @@ -629,6 +659,15 @@ def conductor_ring_parameters( face_mu = mu_out if i == last else mu_wire eps_ref = _friction_strain(ring, out_ref[i], in_ref[i], face_mu, mu_wire, E_Pa) eps_zero = _friction_strain(ring, out_0[i], in_0[i], face_mu, mu_wire, E_Pa) + # Outer fibre: the normal curvature follows the slip state. + factor = ( + 1.0 + + _outer_fibre_slip_factor( + ring.d_wire_m, ring.lay_angle_rad, ring.r_helix_m + ) + if fibre == "outer" + else 1.0 + ) parameters.append( StrandSlipParameters( alpha_per_N=alpha, @@ -636,6 +675,7 @@ def conductor_ring_parameters( eps_f_ref=(eps_ref,), T0_N=reference_tension_N, eps_f_zero_tension=(eps_zero,), + slip_state_factor=factor, ) ) return tuple(parameters) diff --git a/src/cablexsec/mechanics/tendon_bending.py b/src/cablexsec/mechanics/tendon_bending.py index 6592758..67ef435 100644 --- a/src/cablexsec/mechanics/tendon_bending.py +++ b/src/cablexsec/mechanics/tendon_bending.py @@ -15,9 +15,14 @@ * loxodrome (no transverse slip): lateral ``cos a (1 + sin^2 a) p_l`` (Sævik 1992 Eq. 2.65; Sævik 2011 Eq. 51; Lukassen 2019 Eq. 16), normal ``cos^2 a cos 2a p_n`` (the curve curvature of the deformed helix, Out and - von Morgen 1997 Eq. 41, used throughout CableXSec; Sævik's material value - for a stuck tendon is ``cos^4 a``, Eq. 2.66, which differs by the term of - the axial strain ``sin^2 a cos^2 a``, Skeie 2026 Eq. 15); + von Morgen 1997 Eq. 41; Leroy and Estrier 2001 Eq. 13), the normal + curvature of a tendon that carries no friction stress. The stress + recovery adds the term of the tendon's axial slip state, + ``(sin^2 a / r) sigma_f / E`` + (:func:`~cablexsec.mechanics.wire_stress.slip_state_normal_curvature`), + which gives Sævik's material value ``cos^4 a`` (Eq. 2.66) for a stuck + tendon; the coefficients below (the individual tendon bending of the + section stiffness) are those of the slipping tendon; * geodesic (free transverse slip): lateral ``0``, normal ``3 cos^2 a p_n`` (Sævik 1992 Eq. 2.32; Out and von Morgen Eq. 39; Lukassen Eq. 15); * partial transverse slip ``v = eta w_g p_l`` towards the geodesic offset @@ -132,7 +137,8 @@ def curvature_coefficients( ``eta = 0`` returns the coefficients of :func:`~cablexsec.mechanics.wire_stress.local_bending_fibre_stress` - (loxodrome), ``eta = 1`` the geodesic (module notes). + without a friction stress (loxodrome, slipping tendon), ``eta = 1`` the + geodesic (module notes). """ eta = float(transverse_fraction) if not (math.isfinite(eta) and 0.0 <= eta <= 1.0): diff --git a/src/cablexsec/mechanics/wire_stress.py b/src/cablexsec/mechanics/wire_stress.py index 3875cc9..dec9f74 100644 --- a/src/cablexsec/mechanics/wire_stress.py +++ b/src/cablexsec/mechanics/wire_stress.py @@ -10,7 +10,8 @@ wire strain of [Knapp1979], [FeretBournazel1987]). * ``sigma_B`` — the local wire bending stress at a specified material fibre, using both radial and tangential curvature components - ([MenardCartraud2023] Eq. 14). + ([MenardCartraud2023] Eq. 14), with the normal (radial) component + following the wire's axial slip state (below). * ``sigma_f`` — the friction (stick-slip) stress, the universal Coulomb return-mapping element (R1 Instantiation A). Its driving variable is the signed curvature projection ``kappa cos(phi - phi_bend)``, its elastic @@ -21,6 +22,34 @@ * ``sigma_T`` — the thermal stress ``E_w alpha_T (T(r_h) - T_amb)`` (supplied by the thermal solver; zero in an isothermal analysis). +Normal curvature and the slip state +----------------------------------- +The normal (out-of-surface, weak-axis for a flat wire) curvature change of +a wire on the deformed helix is ``cos^2(a) cos(2a) p_n`` per unit current +arc length, ``p_n = kappa_x cos(phi) + kappa_y sin(phi)`` (the curve +curvature of the helix carried with the bent surface: Out and von Morgen +1997 Eq. 41; Leroy and Estrier 2001 Eq. 13 without transverse slip). The +bending strain of the wire is set by the rotation of its cross-section per +unit material length, the curve curvature times the stretch ``1 + eps_w``. +The helix starts with the normal curvature ``sin^2(a) / r_h``, so to first +order + + dkappa_n = cos^2(a) cos(2a) p_n + (sin^2(a) / r_h) eps_w, + +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``; +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 +Coulomb slip keeps the slope ``cos^2(a) cos(2a)`` with the offset of its +friction stress. On the outer face the term is ``(t/2) (sin^2(a) / r_h) +sigma_f``, independent of the modulus. The lateral (in-surface) component +``cos(a) (1 + sin^2 a) p_l`` does not change: the helix starts with zero +geodesic curvature. The stick and slip limits were checked against an +independent finite-element model of a wire on a bent support (not +published). + The legacy axial/contact indicator combines the axial total with the circular contact shear estimate ``tau_H = 0.31 p0`` ([Johnson1985], nu = 0.3): @@ -39,6 +68,7 @@ from numpy.typing import NDArray from cablexsec.constants import TAU_MAX_OVER_P0_NU03 +from cablexsec.exceptions import CableInputError __all__ = [ "friction_stiffness", @@ -46,12 +76,53 @@ "local_bending_stress", "local_bending_amplitude", "local_bending_fibre_stress", + "slip_state_normal_curvature", "von_mises_stress", ] FloatArray = NDArray[np.float64] +def slip_state_normal_curvature( + friction_stress_Pa: float | FloatArray, + E_wire_Pa: float | FloatArray, + lay_angle_rad: float, + r_helix_m: float, +) -> FloatArray: + """Normal curvature of the wire's axial slip state [1/m] (module notes). + + ``(sin^2(a) / r_h) sigma_f / E_w``: the initial normal curvature of the + helix times the bending-induced axial strain ``sigma_f / E_w`` of the + wire. Added to the deformed-helix term ``cos^2(a) cos(2a) p_n`` it gives + ``cos^4(a) p_n`` for a stuck wire (``sigma_f = E_w r_h cos^2(a) p_n``), + ``cos^2(a) cos(2a) + xi sin^2(a) cos^2(a)`` with the stick coefficient + ``xi`` and nothing for a wire without friction stress. + """ + if not (math.isfinite(r_helix_m) and r_helix_m > 0.0): + raise CableInputError("the helix radius must be finite and positive") + coefficient = math.sin(lay_angle_rad) ** 2 / r_helix_m + return np.asarray( + coefficient * (np.asarray(friction_stress_Pa) / np.asarray(E_wire_Pa)), + dtype=np.float64, + ) + + +def _slip_term( + friction_stress_Pa: float | FloatArray | None, + E_wire_Pa: float | FloatArray, + lay_angle_rad: float, + r_helix_m: float | None, +) -> FloatArray | None: + """:func:`slip_state_normal_curvature`, or ``None`` without a friction stress.""" + if friction_stress_Pa is None: + return None + if r_helix_m is None: + raise CableInputError("a friction stress needs the helix radius r_helix_m") + return slip_state_normal_curvature( + friction_stress_Pa, E_wire_Pa, lay_angle_rad, r_helix_m + ) + + def local_bending_fibre_stress( kappa_x: float | FloatArray, kappa_y: float | FloatArray, @@ -60,6 +131,9 @@ def local_bending_fibre_stress( d_wire_m: float, lay_angle_rad: float, fibre_angle_rad: float | FloatArray = 0.0, + *, + friction_stress_Pa: float | FloatArray | None = None, + r_helix_m: float | None = None, ) -> FloatArray: """Signed bending stress on a fixed circular-wire material fibre [Pa]. @@ -70,6 +144,13 @@ def local_bending_fibre_stress( Array arguments follow NumPy broadcasting, e.g. wire azimuths ``[:, None]`` and curvature samples ``[None, :]``. No rotation of a critical fibre or instantaneous perimeter maximisation is used here. + + ``friction_stress_Pa`` (with the helix radius ``r_helix_m``) is the + bending-induced axial stress of the wire, which sets the normal + curvature of its slip state (:func:`slip_state_normal_curvature`, module + notes). Without it the normal coefficient is the slip limit + ``cos^2(a) cos(2a)`` ([MenardCartraud2023] Eq. 14), the curvature of a + wire that carries no friction stress. """ kx, ky = np.asarray(kappa_x), np.asarray(kappa_y) angle, theta = np.asarray(phi), np.asarray(fibre_angle_rad) @@ -77,6 +158,9 @@ def local_bending_fibre_stress( radial = ( c * c * math.cos(2 * lay_angle_rad) * (kx * np.cos(angle) + ky * np.sin(angle)) ) + slip = _slip_term(friction_stress_Pa, E_wire_Pa, lay_angle_rad, r_helix_m) + if slip is not None: + radial = radial + slip tangential = c * (1 + s * s) * (-kx * np.sin(angle) + ky * np.cos(angle)) return np.asarray( np.asarray(E_wire_Pa) @@ -112,23 +196,32 @@ def local_bending_stress( d_wire_m: float, lay_angle_rad: float, phi_bend: float = 0.0, + *, + friction_stress_Pa: float | FloatArray | None = None, + r_helix_m: float | None = None, ) -> FloatArray: """Local stress on the outward radial fibre ([MenardCartraud2023] Eq. 14). Phi is measured from the positive extension side, not from the source's - bending axis. The radial coefficient is cos²(a)*cos(2a); the tangential - coefficient enters the perimeter envelope in local_bending_amplitude. + bending axis. The radial coefficient is cos²(a)*cos(2a), plus the normal + curvature of the wire's slip state when its friction stress is given + (:func:`slip_state_normal_curvature`); the tangential coefficient enters + the perimeter envelope in local_bending_amplitude. """ a = lay_angle_rad phi_a = np.asarray(phi, dtype=np.float64) - return np.asarray( - E_wire_Pa - * kappa - * math.cos(a) ** 2 - * math.cos(2 * a) - * (d_wire_m / 2.0) - * np.cos(phi_a - phi_bend) - ) + slip = _slip_term(friction_stress_Pa, E_wire_Pa, a, r_helix_m) + if slip is None: + return np.asarray( + E_wire_Pa + * kappa + * math.cos(a) ** 2 + * math.cos(2 * a) + * (d_wire_m / 2.0) + * np.cos(phi_a - phi_bend) + ) + normal = kappa * math.cos(a) ** 2 * math.cos(2 * a) * np.cos(phi_a - phi_bend) + return np.asarray(E_wire_Pa * (d_wire_m / 2.0) * (normal + slip)) def local_bending_amplitude( @@ -138,23 +231,40 @@ def local_bending_amplitude( d_wire_m: float, lay_angle_rad: float, phi_bend: float = 0.0, + *, + friction_stress_Pa: float | FloatArray | None = None, + r_helix_m: float | None = None, ) -> FloatArray: """Maximum local bending stress over a circular wire perimeter [Pa]. This is the norm of the two Lutchansky bending coefficients, not the signed stress at one chosen fibre. Add it to abs(mean axial stress) when - screening the maximum absolute axial stress at a section. + screening the maximum absolute axial stress at a section. A given + friction stress (with ``r_helix_m``) adds the normal curvature of the + wire's slip state (:func:`slip_state_normal_curvature`) to the normal + component, with the sign of the signed curvature ``kappa``. """ angle = np.asarray(phi, dtype=np.float64) - phi_bend c, s = math.cos(lay_angle_rad), math.sin(lay_angle_rad) + slip = _slip_term(friction_stress_Pa, E_wire_Pa, lay_angle_rad, r_helix_m) + if slip is None: + return np.asarray( + E_wire_Pa + * abs(kappa) + * d_wire_m + / 2 + * np.hypot( + c * c * math.cos(2 * lay_angle_rad) * np.cos(angle), + c * (1 + s * s) * np.sin(angle), + ) + ) return np.asarray( E_wire_Pa - * abs(kappa) * d_wire_m / 2 * np.hypot( - c * c * math.cos(2 * lay_angle_rad) * np.cos(angle), - c * (1 + s * s) * np.sin(angle), + kappa * c * c * math.cos(2 * lay_angle_rad) * np.cos(angle) + slip, + kappa * c * (1 + s * s) * np.sin(angle), ) ) diff --git a/tests/test_capacity.py b/tests/test_capacity.py index bb96222..2d6aaaf 100644 --- a/tests/test_capacity.py +++ b/tests/test_capacity.py @@ -282,6 +282,9 @@ def test_capacity_boundary_matches_public_stress_engine() -> None: layer.d_wire_m, layer.lay_angle_rad, stress.phi_bend_rad, + # The normal curvature follows each wire's slip state. + friction_stress_Pa=stress.sigma_f_Pa[layer.name], + r_helix_m=layer.r_helix_m, ) usage = max( usage, diff --git a/tests/test_core_screens_sheaths.py b/tests/test_core_screens_sheaths.py index f908259..4496e30 100644 --- a/tests/test_core_screens_sheaths.py +++ b/tests/test_core_screens_sheaths.py @@ -267,8 +267,16 @@ def test_stuck_core_adds_the_axis_strain_to_the_screen(thies): assert free.axis_strain_range[0] == 0.0 assert np.max(stuck.stress_range_Pa) > 3 * np.max(free.stress_range_Pa) assert np.any(stuck.exceeds_yield) - # The axis strain is common to the core layers: no extra slip. - assert np.allclose(stuck.slip_amplitude_m, free.slip_amplitude_m, rtol=1e-12) + # The axis strain is common to the core layers: no extra slip. The stuck + # core bends with the normal curvature cos^4(beta) instead of the free + # cos^2(beta) cos(2 beta) (the normal curvature follows the core slip + # state), so the screen slip grows at most by cos^2(beta) / cos(2 beta). + moving = free.slip_amplitude_m > 0.0 + assert np.array_equal(moving, stuck.slip_amplitude_m > 0.0) + ratio = stuck.slip_amplitude_m[moving] / free.slip_amplitude_m[moving] + assert np.all(ratio >= 1.0 - 1e-12) + assert np.all(ratio <= math.cos(beta) ** 2 / math.cos(2 * beta) * (1 + 1e-12)) + assert np.any(ratio > 1.0 + 1e-6) def test_thies_screen_reproduces_the_core_level_workaround(aligned): diff --git a/tests/test_helical_bending_geometry.py b/tests/test_helical_bending_geometry.py index d02bc20..19f636d 100644 --- a/tests/test_helical_bending_geometry.py +++ b/tests/test_helical_bending_geometry.py @@ -104,16 +104,23 @@ def test_armour_stress_extrema_include_all_fibres_not_only_the_radial_fibre(): result.sigma_A_Pa[name] + result.sigma_f_Pa[name] + result.sigma_T_Pa[name] ) angles = np.radians(result.phi_deg[name]) - math.atan2(ky, kx) - direct = np.array( - [np.linalg.norm(_gradient(layer.lay_angle_rad, p)) for p in angles] + e = library.get_property(layer.material, "E_Pa") + kappa = math.hypot(kx, ky) + # The curve curvature of the bent helix, whose normal component gains + # the term of each wire's slip state, (sin^2 a / r) sigma_f / E. + slip = ( + math.sin(layer.lay_angle_rad) ** 2 + / layer.r_helix_m + * result.sigma_f_Pa[name] + / (e * kappa) ) - amplitude = ( - direct - * library.get_property(layer.material, "E_Pa") - * math.hypot(kx, ky) - * layer.d_wire_m - / 2 + direct = np.array( + [ + np.linalg.norm(_gradient(layer.lay_angle_rad, p) + np.array([s, 0.0])) + for p, s in zip(angles, slip, strict=True) + ] ) + amplitude = direct * e * kappa * layer.d_wire_m / 2 np.testing.assert_allclose( result.sigma_perimeter_min_Pa[name], mean - amplitude, rtol=1e-7, atol=0.01 ) diff --git a/tests/test_kinematics.py b/tests/test_kinematics.py index f84d962..a9fa95d 100644 --- a/tests/test_kinematics.py +++ b/tests/test_kinematics.py @@ -305,7 +305,8 @@ def test_utilisation_is_the_largest_fibre_over_yield() -> None: limit = library.get_property(material, "sigma_y_Pa") largest = np.abs(layer.stress_Pa) + layer.bending_Pa np.testing.assert_allclose(layer.utilisation, largest / limit, rtol=1e-12) - # The local bending is that of the stress route at the outer fibres. + # The local bending is that of the stress route at the outer fibres, its + # normal curvature following the friction stress of each station. spec = cable_to_mkappa_specs(CABLE, 80e3)[0] diameter = 2 * math.sqrt(spec.A_wire_m2 / math.pi) radial = local_bending_fibre_stress( @@ -315,6 +316,8 @@ def test_utilisation_is_the_largest_fibre_over_yield() -> None: spec.E_wire_Pa, diameter, spec.lay_angle_rad, + friction_stress_Pa=layer.friction_Pa, + r_helix_m=spec.r_helix_m, ) tangential = local_bending_fibre_stress( CYCLE[None, :], @@ -324,6 +327,8 @@ def test_utilisation_is_the_largest_fibre_over_yield() -> None: diameter, spec.lay_angle_rad, math.pi / 2, + friction_stress_Pa=layer.friction_Pa, + r_helix_m=spec.r_helix_m, ) np.testing.assert_allclose(layer.bending_Pa, np.hypot(radial, tangential)) diff --git a/tests/test_normal_term_slip_state.py b/tests/test_normal_term_slip_state.py new file mode 100644 index 0000000..7952dcb --- /dev/null +++ b/tests/test_normal_term_slip_state.py @@ -0,0 +1,458 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""The normal wire curvature follows the wire's axial slip state. + +On the deformed helix the normal (weak-axis) curvature change is +``cos^2 a cos 2a p_n`` per unit current length; the wire's bending strain is +its cross-section rotation per unit material length, which adds +``(sin^2 a / r) eps_w`` of the axial strain ``eps_w = sigma_f / E`` the wire +carries (``mechanics.wire_stress`` module notes). The analytical limits: + +* stuck wire with the plane-section strain (``xi = 1``): ``cos^4 a``; +* stuck with the shear-lag coefficient ``xi``: + ``cos^2 a cos 2a + xi sin^2 a cos^2 a``; +* no friction stress (``mu = 0``): ``cos^2 a cos 2a`` + ([MenardCartraud2023] Eq. 14); +* Coulomb slip: slope ``cos^2 a cos 2a``, offset of the friction stress. + +The lateral (in-surface) term ``cos a (1 + sin^2 a)`` is unchanged. +""" + +from __future__ import annotations + +import math +import warnings + +import numpy as np +import pytest + +import cablexsec as cx +import cablexsec.analysis.fatigue as fatigue +from cablexsec.analysis.capacity import _local_bending_max +from cablexsec.analysis.fast_field import assemble_wire_field +from cablexsec.analysis.fatigue import FatigueLayer, wire_stress_field +from cablexsec.exceptions import CableInputError +from cablexsec.materials import library +from cablexsec.materials.sn_curves import SN_CURVES +from cablexsec.mechanics.core_kinematics import core_kinematics +from cablexsec.mechanics.mkappa import HelicalLayerSpec +from cablexsec.mechanics.strand_slip import ( + ConductorRing, + conductor_ring_parameters, + strand_slip_strain, +) +from cablexsec.mechanics.wire_stress import ( + local_bending_amplitude, + local_bending_fibre_stress, + local_bending_stress, + slip_state_normal_curvature, +) + +pytestmark = pytest.mark.analytical_sanity + +ANGLES_DEG = (10.0, 20.1, 35.0) +E_W = 200e9 +R_H = 0.05 +D_W = 0.004 + + +def _spec(alpha_deg: float, xi: float = 1.0, mu: float = 50.0) -> HelicalLayerSpec: + return HelicalLayerSpec( + n_wires=16, + r_helix_m=R_H, + lay_angle_rad=math.radians(alpha_deg), + E_wire_Pa=E_W, + A_wire_m2=math.pi * (D_W / 2) ** 2, + xi=xi, + mu=mu, + F_n_axi_N=2e3, + contact_pressure_Pa=2e5, + ) + + +def _layer(spec: HelicalLayerSpec) -> FatigueLayer: + return FatigueLayer( + spec=spec, sn_bulk=SN_CURVES["dnv_rpc203_t_curve"], sigma_UTS_Pa=1e9 + ) + + +def _ratio(field, spec: HelicalLayerSpec, kx: np.ndarray) -> np.ndarray: + """Outer-face bending over ``E (d/2) p_n`` where ``|p_n|`` is not small.""" + p_n = np.cos(spec.phi_wires)[:, None] * kx[None, :] + mask = np.abs(p_n) > 0.05 * np.abs(p_n).max() + return np.asarray(field.radial_Pa[mask] / (E_W * D_W / 2 * p_n[mask])) + + +def _coefficients(alpha_deg: float) -> tuple[float, float]: + a = math.radians(alpha_deg) + return math.cos(a), math.sin(a) + + +def test_slip_state_normal_curvature_is_the_initial_curvature_times_the_strain(): + a = math.radians(20.1) + value = slip_state_normal_curvature(np.array([3e7, -2e7]), E_W, a, R_H) + expected = math.sin(a) ** 2 / R_H * np.array([3e7, -2e7]) / E_W + np.testing.assert_allclose(value, expected, rtol=1e-15, atol=0) + for radius in (0.0, -1.0, math.inf, math.nan): + with pytest.raises(CableInputError, match="helix radius"): + slip_state_normal_curvature(1e7, E_W, a, radius) + with pytest.raises(CableInputError, match="r_helix_m"): + local_bending_fibre_stress(0.01, 0.0, 0.0, E_W, D_W, a, friction_stress_Pa=1e7) + + +@pytest.mark.parametrize("alpha_deg", ANGLES_DEG) +@pytest.mark.parametrize("fast", [True, False]) +def test_stuck_wire_takes_cos4(monkeypatch, alpha_deg, fast): + # Monotonic ramp far below the slip onset: every wire sticks with the + # plane-section strain (xi = 1). + monkeypatch.setattr(fatigue, "_FAST_FIELD", fast) + spec = _spec(alpha_deg) + kx = np.linspace(0.0, 1e-3, 11) + field = wire_stress_field(_layer(spec), kx, np.zeros_like(kx), keep_friction=True) + assert field.friction_Pa is not None + stick = spec.k_f * R_H * np.cos(spec.phi_wires)[:, None] * kx[None, :] + np.testing.assert_allclose(field.friction_Pa, stick, rtol=1e-12, atol=1e-6) + c, _s = _coefficients(alpha_deg) + np.testing.assert_allclose(_ratio(field, spec, kx), c**4, rtol=1e-12, atol=0) + + +@pytest.mark.parametrize("alpha_deg", ANGLES_DEG) +@pytest.mark.parametrize("xi", [0.35, 0.8]) +def test_stuck_wire_with_shear_lag_carries_xi_of_the_correction(alpha_deg, xi): + spec = _spec(alpha_deg, xi=xi) + kx = np.linspace(0.0, 1e-3, 11) + field = wire_stress_field(_layer(spec), kx, np.zeros_like(kx)) + c, s = _coefficients(alpha_deg) + expected = c * c * math.cos(2 * math.radians(alpha_deg)) + xi * s * s * c * c + np.testing.assert_allclose(_ratio(field, spec, kx), expected, rtol=1e-12, atol=0) + + +@pytest.mark.parametrize("alpha_deg", ANGLES_DEG) +@pytest.mark.parametrize("model", ["direction_tied", "distributed", "progressive"]) +def test_frictionless_wire_keeps_the_deformed_helix_value(alpha_deg, model): + spec = _spec(alpha_deg, mu=0.0) + kx = 0.01 * np.sin(np.linspace(0.0, 6.0, 40)) + ky = 0.004 * np.cos(np.linspace(0.0, 5.0, 40)) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + field = wire_stress_field(_layer(spec), kx, ky, friction_model=model) + legacy = local_bending_fibre_stress( + kx, ky, spec.phi_wires[:, None], E_W, D_W, spec.lay_angle_rad + ) + scale = float(np.abs(legacy).max()) + np.testing.assert_allclose(field.radial_Pa, legacy, rtol=0, atol=1e-12 * scale) + c, _s = _coefficients(alpha_deg) + ratio = _ratio(wire_stress_field(_layer(spec), kx, 0 * kx), spec, kx) + np.testing.assert_allclose( + ratio, c * c * math.cos(2 * math.radians(alpha_deg)), rtol=1e-12, atol=0 + ) + + +def _cyclic(n: int = 400) -> tuple[np.ndarray, np.ndarray]: + # Amplitude well above the onset, off the sample grid at every transition. + t = np.linspace(0.0, 3.0, n) + return 0.031 * np.sin(2 * np.pi * t + 0.17), 0.0071 * np.cos(2 * np.pi * t) + + +@pytest.mark.parametrize("model", ["direction_tied", "distributed", "progressive"]) +@pytest.mark.parametrize("fast", [True, False]) +def test_partial_slip_adds_the_term_of_the_carried_friction_stress( + monkeypatch, model, fast +): + monkeypatch.setattr(fatigue, "_FAST_FIELD", fast) + spec = _spec(20.1, xi=0.8, mu=0.15) + kx, ky = _cyclic() + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + field = wire_stress_field( + _layer(spec), kx, ky, friction_model=model, keep_friction=True + ) + assert field.friction_Pa is not None + legacy = local_bending_fibre_stress( + kx, ky, spec.phi_wires[:, None], E_W, D_W, spec.lay_angle_rad + ) + s2 = math.sin(spec.lay_angle_rad) ** 2 + expected = legacy + D_W / 2 * s2 / R_H * field.friction_Pa + scale = float(np.abs(field.radial_Pa).max()) + np.testing.assert_allclose(field.radial_Pa, expected, rtol=0, atol=1e-12 * scale) + # The term is not negligible in this history. + assert np.abs(field.radial_Pa - legacy).max() > 1e-3 * scale + + +def test_stick_and_slip_segments_take_their_own_slopes(): + # Direction-tied spring-slider on a planar history: a step is stick when + # the friction increment is the elastic increment k_f r dp_n, slip when + # the friction stress holds its cap. + xi = 0.8 + spec = _spec(20.1, xi=xi, mu=0.15) + t = np.linspace(0.0, 3.0, 601) + kx = 0.031 * np.sin(2 * np.pi * t + 0.17) + field = wire_stress_field(_layer(spec), kx, 0 * kx, keep_friction=True) + assert field.friction_Pa is not None + p_n = np.cos(spec.phi_wires)[:, None] * kx[None, :] + dp = np.diff(p_n, axis=1) + df = np.diff(field.friction_Pa, axis=1) + dr = np.diff(field.radial_Pa, axis=1) / (E_W * D_W / 2) + big = np.abs(dp) > 1e-6 + stick = big & (np.abs(df - spec.k_f * R_H * dp) <= 1e-9 * spec.k_f * R_H * 0.03) + slip = big & (np.abs(df) <= 1e-9 * spec.k_f * R_H * 0.03) + assert stick.sum() > 50 and slip.sum() > 50 + c, s = _coefficients(20.1) + lox = c * c * math.cos(2 * math.radians(20.1)) + np.testing.assert_allclose( + dr[stick] / dp[stick], lox + xi * s * s * c * c, rtol=1e-9 + ) + np.testing.assert_allclose(dr[slip] / dp[slip], lox, rtol=1e-9) + + +def test_tangential_term_is_unchanged(): + spec = _spec(35.0, xi=0.8, mu=0.15) + kx, ky = _cyclic(200) + field = wire_stress_field(_layer(spec), kx, ky) + legacy = local_bending_fibre_stress( + kx, ky, spec.phi_wires[:, None], E_W, D_W, spec.lay_angle_rad, math.pi / 2 + ) + scale = float(np.abs(legacy).max()) + np.testing.assert_allclose(field.tangential_Pa, legacy, rtol=0, atol=1e-12 * scale) + + +def test_assembly_with_friction_and_increment_equals_the_numpy_expressions(): + rng = np.random.default_rng(3) + n_w, n_t = 6, 70 + kx, ky = rng.normal(0, 0.01, n_t), rng.normal(0, 0.005, n_t) + phi = np.linspace(0, 2 * math.pi, n_w, endpoint=False) + friction = rng.normal(0, 4e7, (n_w, n_t)) + extra = rng.normal(0, 1e7, (n_w, n_t)) + modulus = 200e9 * (1 + 0.02 * np.sin(np.linspace(0, 4, n_t))) + axial, thermal = rng.normal(0, 1e7, n_t), rng.normal(0, 1e6, n_t) + mean, radial, tangential = assemble_wire_field( + kx, ky, phi, modulus, D_W, 0.006, 0.3, axial, friction, thermal, extra, R_H + ) + held = friction + extra + radial_ref = local_bending_fibre_stress( + kx, ky, phi[:, None], modulus, D_W, 0.3, friction_stress_Pa=held, r_helix_m=R_H + ) + edge_ref = local_bending_fibre_stress( + kx, + ky, + phi[:, None], + modulus, + 0.006, + 0.3, + math.pi / 2, + friction_stress_Pa=held, + r_helix_m=R_H, + ) + mean_ref = axial[None, :] + friction + thermal[None, :] + extra + scale = float(np.abs(mean_ref).max()) + np.testing.assert_allclose(radial, radial_ref, rtol=0, atol=1e-12 * scale) + np.testing.assert_allclose(tangential, edge_ref, rtol=0, atol=1e-12 * scale) + np.testing.assert_allclose(mean, mean_ref, rtol=0, atol=1e-12 * scale) + with pytest.raises(CableInputError, match="helix radius"): + assemble_wire_field( + kx, ky, phi, modulus, D_W, 0.006, 0.3, axial, friction, thermal, None, 0.0 + ) + + +def test_termination_increment_enters_the_carried_stress(monkeypatch): + from cablexsec.analysis.termination import TerminationSpec # noqa: PLC0415 + + spec = _spec(20.1, xi=0.8, mu=0.15) + kx, ky = _cyclic(120) + term = TerminationSpec( + distance_m=0.5, segments_per_pitch=8, max_increment=2.0, reach_lengths=1.0 + ) + for fast in (True, False): + monkeypatch.setattr(fatigue, "_FAST_FIELD", fast) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + field = wire_stress_field( + _layer(spec), kx, ky, termination=term, keep_friction=True + ) + assert field.termination is not None and field.termination.applied + assert field.friction_Pa is not None # sectional plus increment + legacy = local_bending_fibre_stress( + kx, ky, spec.phi_wires[:, None], E_W, D_W, spec.lay_angle_rad + ) + s2 = math.sin(spec.lay_angle_rad) ** 2 + expected = legacy + D_W / 2 * s2 / R_H * field.friction_Pa + scale = float(np.abs(field.radial_Pa).max()) + np.testing.assert_allclose( + field.radial_Pa, expected, rtol=0, atol=1e-12 * scale + ) + + +def test_scalar_helpers_add_the_slip_state_term(): + a = math.radians(20.1) + c, s = math.cos(a), math.sin(a) + phi = np.linspace(0, 2 * math.pi, 9, endpoint=False) + kappa = 0.02 + sigma = 4e7 * np.cos(phi) + slip = s * s / R_H * sigma / E_W + normal = kappa * c * c * math.cos(2 * a) * np.cos(phi) + slip + stress = local_bending_stress( + kappa, phi, E_W, D_W, a, friction_stress_Pa=sigma, r_helix_m=R_H + ) + np.testing.assert_allclose(stress, E_W * D_W / 2 * normal, rtol=1e-13, atol=0) + amplitude = local_bending_amplitude( + kappa, phi, E_W, D_W, a, friction_stress_Pa=sigma, r_helix_m=R_H + ) + lateral = kappa * c * (1 + s * s) * np.sin(phi) + np.testing.assert_allclose( + amplitude, E_W * D_W / 2 * np.hypot(normal, lateral), rtol=1e-13, atol=0 + ) + # Without a friction stress: the unchanged Eq. 14 helpers. + assert np.array_equal( + local_bending_amplitude(-kappa, phi, E_W, D_W, a), + local_bending_amplitude(kappa, phi, E_W, D_W, a), + ) + + +def test_stress_route_follows_the_slip_front(): + cable = cx.load_cable(cx.menard2023_yaml_path()) + for mu in (0.0, None): + result = cx.compute_stress(cable, 0.03, 0.01, tension_N=1e4, mu=mu) + for name, sigma_b in result.sigma_B_Pa.items(): + layer = cable.get_layer(name) + a = layer.lay_angle_rad + assert a is not None and layer.r_helix_m is not None + e = library.get_property(layer.material, "E_Pa") + phi = np.radians(result.phi_deg[name]) + theta = phi - math.atan2(0.01, 0.03) + kappa = math.hypot(0.03, 0.01) + expected = ( + e + * layer.d_wire_m + / 2 + * ( + kappa * math.cos(a) ** 2 * math.cos(2 * a) * np.cos(theta) + + math.sin(a) ** 2 / layer.r_helix_m * result.sigma_f_Pa[name] / e + ) + ) + scale = float(np.abs(expected).max()) + np.testing.assert_allclose(sigma_b, expected, rtol=0, atol=1e-12 * scale) + if mu == 0.0: + assert np.all(result.sigma_f_Pa[name] == 0.0) + + +def test_capacity_bending_adds_the_slip_state_term(): + cable = cx.load_cable(cx.menard2023_yaml_path()) + layer = next( + x for x in cable.helical_layers if getattr(x, "wire_shape", None) == "round" + ) + a = layer.lay_angle_rad + assert a is not None and layer.r_helix_m is not None + phi = np.linspace(0, 2 * math.pi, 12, endpoint=False) + sigma = 3e7 * np.sign(np.cos(phi)) + got = _local_bending_max( + layer, 0.05, phi, E_W, a, 0.0, friction_stress_Pa=sigma, r_helix_m=0.06 + ) + ref = local_bending_amplitude( + 0.05, phi, E_W, layer.d_wire_m, a, friction_stress_Pa=sigma, r_helix_m=0.06 + ) + np.testing.assert_allclose(got, ref, rtol=1e-15, atol=0) + plain = _local_bending_max(layer, 0.05, phi, E_W, a, 0.0) + assert np.all(got[np.cos(phi) > 0.1] > plain[np.cos(phi) > 0.1]) + + +def test_capacity_rectangular_face_adds_the_slip_state_term(): + rect = cx.load_cable(cx.saevik2011_yaml_path("rectangular")) + layer = next(x for x in rect.helical_layers if x.wire_shape != "round") + a = layer.lay_angle_rad + assert a is not None + section = layer.wire_section + phi = np.linspace(0, 2 * math.pi, 12, endpoint=False) + sigma = 3e7 * np.cos(phi) + got = _local_bending_max( + layer, 0.05, phi, E_W, a, 0.0, friction_stress_Pa=sigma, r_helix_m=0.1 + ) + c, s = math.cos(a), math.sin(a) + face = E_W * ( + 0.05 * c * c * math.cos(2 * a) * np.cos(phi) + s * s / 0.1 * sigma / E_W + ) + edge = E_W * 0.05 * c * (1 + s * s) * np.sin(phi) + ref = section.max_bending_stress( + face * section.half_thickness_m, edge * section.half_width_m + ) + np.testing.assert_allclose(got, ref, rtol=1e-14, atol=0) + + +def test_laid_core_normal_gradient_follows_the_core_state(): + cable = cx.load_cable(cx.iea_task49_66kv_yaml_path()) + t = np.linspace(0.0, 2.0, 30) + kx, ky = 0.02 * np.sin(2 * np.pi * t + 0.1), 0.01 * np.cos(2 * np.pi * t) + eps = 1e-4 * np.ones_like(t) + for state in ("stuck", "free", "frictional"): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + kin = core_kinematics(cable, kx, ky, state=state, axial_strain=eps) + beta, r_c = kin.lay_angle_rad, kin.r_offset_m + c, s = math.cos(beta), math.sin(beta) + kr = ( + np.cos(kin.phase_rad)[:, None] * kx[None, :] + + np.sin(kin.phase_rad)[:, None] * ky[None, :] + ) + bending = kin.axis_strain - c * c * eps[None, :] + expected = c * c * math.cos(2 * beta) * kr + s * s / r_c * bending + scale = float(np.abs(kr).max()) + np.testing.assert_allclose( + kin.gradient_radial_per_m, expected, rtol=0, atol=1e-12 * scale + ) + if state == "stuck": + np.testing.assert_allclose( + kin.gradient_radial_per_m, c**4 * kr, rtol=0, atol=1e-12 * scale + ) + if state == "free": + np.testing.assert_allclose( + kin.gradient_radial_per_m, + c * c * math.cos(2 * beta) * kr, + rtol=0, + atol=1e-12 * scale, + ) + + +def test_strand_slip_outer_fibre_stick_slope_is_cos4(): + rings = [ + ConductorRing(n_wires=1, d_wire_m=0.003, r_helix_m=0.0, lay_angle_rad=0.0), + ConductorRing( + n_wires=6, d_wire_m=0.003, r_helix_m=0.003, lay_angle_rad=math.radians(12.0) + ), + ConductorRing( + n_wires=12, + d_wire_m=0.003, + r_helix_m=0.006, + lay_angle_rad=math.radians(14.0), + ), + ] + kwargs = {"mu_wire": 0.3, "reference_tension_N": 2e4} + outer = conductor_ring_parameters(rings, 110e9, fibre="outer", **kwargs) + centroid = conductor_ring_parameters(rings, 110e9, fibre="centroid", **kwargs) + assert outer[0].slip_state_factor == centroid[0].slip_state_factor == 1.0 + # Planar ramp to well above the onset, then the element at theta = 0. + kappa = np.linspace(0.0, 1.0, 2001) + for ring, o, m in zip(rings[1:], outer[1:], centroid[1:], strict=True): + c, s = math.cos(ring.lay_angle_rad), math.sin(ring.lay_angle_rad) + r, half = ring.r_helix_m, ring.d_wire_m / 2 + lox = half * c * c * math.cos(2 * ring.lay_angle_rad) + # The friction amplitude is the friction strain; the outer fibre + # carries the wire-axis strain with the factor of its slip state. + assert o.eps_f_ref == m.eps_f_ref + assert o.slip_state_factor == pytest.approx(1.0 + half * s * s / r, rel=1e-15) + assert m.slip_state_factor == 1.0 + assert m.beta_m == pytest.approx((r * c * c, 0.0), rel=1e-15) + strain = strand_slip_strain( + o, kappa, np.zeros_like(kappa), np.full_like(kappa, 2e4), theta_rad=[0.0] + ).strain[0] + onset = o.eps_f_ref[0] / (o.beta_m[0] - o.beta_m[1]) + stick = kappa < 0.9 * onset + slip = kappa > 1.1 * onset + assert stick.sum() > 10 and slip.sum() > 10 + axial = o.alpha_per_N * 2e4 + np.testing.assert_allclose( + strain[stick] - axial, (r * c * c + half * c**4) * kappa[stick], rtol=1e-12 + ) + np.testing.assert_allclose( + strain[slip] - axial, + lox * kappa[slip] + o.slip_state_factor * o.eps_f_ref[0], + rtol=1e-12, + ) diff --git a/tests/test_rect_tendon_paths.py b/tests/test_rect_tendon_paths.py index a5a774f..87af9bc 100644 --- a/tests/test_rect_tendon_paths.py +++ b/tests/test_rect_tendon_paths.py @@ -190,12 +190,18 @@ def test_strip_stress_at_faces_edges_and_corners(strip_layer): assert spec.section is not None and spec.section.shape == "rectangular" kx = np.array([0.0, 0.05, 0.1]) ky = np.zeros(3) - field = wire_stress_field(strip_layer, kx, ky) + field = wire_stress_field(strip_layer, kx, ky, keep_friction=True) + assert field.friction_Pa is not None c = curvature_coefficients(spec.lay_angle_rad) phi = spec.phi_wires[:, None] e = spec.E_wire_Pa + # Loxodrome normal term plus the slip-state term of the friction stress. + slip = math.sin(spec.lay_angle_rad) ** 2 / spec.r_helix_m * field.friction_Pa / e assert np.allclose( - field.radial_Pa, e * c.normal * kx * np.cos(phi) * 0.0025, rtol=1e-12, atol=1e-6 + field.radial_Pa, + e * (c.normal * kx * np.cos(phi) + slip) * 0.0025, + rtol=1e-12, + atol=1e-6, ) assert np.allclose( field.tangential_Pa, @@ -222,14 +228,27 @@ def test_transverse_model_in_the_field_reaches_the_geodesic(strip_layer): assert model.frictionless_fraction == pytest.approx(1.0, abs=1e-12) kx = np.linspace(0.0, 0.1, 21) field = wire_stress_field(strip_layer, kx, np.zeros_like(kx), transverse=model) - plain = wire_stress_field(strip_layer, kx, np.zeros_like(kx)) + plain = wire_stress_field(strip_layer, kx, np.zeros_like(kx), keep_friction=True) + assert plain.friction_Pa is not None + # The slip-state term of the friction stress is added to both fields. + held = ( + spec.E_wire_Pa + * math.sin(spec.lay_angle_rad) ** 2 + / spec.r_helix_m + * plain.friction_Pa + / spec.E_wire_Pa + * 0.0025 + ) assert np.allclose(field.tangential_Pa, 0.0, atol=1e-3) geo = curvature_coefficients(spec.lay_angle_rad, 1.0).normal lox = curvature_coefficients(spec.lay_angle_rad, 0.0).normal # the normal curvature gains the tangent-rotation term (finite difference # over the 55 wire azimuths) assert np.allclose( - field.radial_Pa, plain.radial_Pa * geo / lox, rtol=3e-3, atol=1e-3 + field.radial_Pa - held, + (plain.radial_Pa - held) * geo / lox, + rtol=3e-3, + atol=1e-3, ) assert np.array_equal(field.mean_Pa, plain.mean_Pa) diff --git a/tests/test_restrictor_tapes_copper.py b/tests/test_restrictor_tapes_copper.py index 8b61f52..5dedf05 100644 --- a/tests/test_restrictor_tapes_copper.py +++ b/tests/test_restrictor_tapes_copper.py @@ -577,7 +577,10 @@ def test_tape_states_closed_forms(): mu=0.2, ) assert np.allclose(lo, free) - centre = hi[0, :, 0, :] - own[:, None] * k[None, :] + # The stuck line carries factor rho cos(theta) kappa, which adds + # (t/2) (sin^2 beta / rho) times it to the flat-wise curvature. + held = g.thickness_m / 2 * math.sin(beta) ** 2 * factor * np.cos(theta) + centre = hi[0, :, 0, :] - (own + held)[:, None] * k[None, :] stuck_mid = factor * ( eps0[None, :] + g.radius_m * np.cos(theta)[:, None] * k[None, :] ) diff --git a/tests/test_rig_test.py b/tests/test_rig_test.py index 46cd8ff..181143f 100644 --- a/tests/test_rig_test.py +++ b/tests/test_rig_test.py @@ -144,6 +144,15 @@ def test_local_bending_and_axial_parts(menard, menard_run): / E * 1e6 ) + # The normal curvature follows the slip state: the friction strain the + # wire carries adds (d/2)(sin^2 a / r) times it at the outer face. + expected = expected + ( + layer.d_wire_m + / 2 + * math.sin(layer.lay_angle_rad) ** 2 + / layer.r_helix_m + * np.asarray(g.friction) + ) assert np.allclose(g.local_bending, expected, atol=1e-9) tension = 50e3 state = solve_cable_radial_state(menard, tension) diff --git a/tests/test_section_history.py b/tests/test_section_history.py index f6393f0..6a7d018 100644 --- a/tests/test_section_history.py +++ b/tests/test_section_history.py @@ -107,6 +107,8 @@ def test_variable_modulus_wire_history_matches_independent_plastic_strain_update friction = np.clip(stiffness[t] * (drive - plastic), -lower[t], upper[t]) plastic = drive - friction / stiffness[t] bending = modulus[t] * value * cosine**2 * math.cos(0.8) * 0.003 / 2 + # The normal curvature follows the slip state of the friction stress. + bending += 0.003 / 2 * sine**2 / spec.r_helix_m * friction expected.append(normal[t] + friction + bending) np.testing.assert_allclose(calculated[0], expected, rtol=1e-12, atol=1e-8) diff --git a/tests/test_stress.py b/tests/test_stress.py index 4384d4a..314d8c1 100644 --- a/tests/test_stress.py +++ b/tests/test_stress.py @@ -50,22 +50,31 @@ def _stress_contact(kappa=0.03): return cx.compute_stress(_contact_cable(), kappa, tension_N=0.0) -def test_sigma_B_at_phi0_matches_menard_eq14_closed_form() -> None: +def test_sigma_B_at_phi0_matches_menard_eq14_plus_the_slip_state_term() -> None: + # Ménard Eq. 14 is the normal curvature of a wire without friction + # stress; the friction stress the wire carries adds (sin^2 a / r) sigma_f / E + # (wire_stress.slip_state_normal_curvature). cable = _menard() - sr = _stress() - for name in sr.phi_deg: - lyr = cable.get_layer(name) - e = library.get_property(lyr.material, "E_Pa") - a = lyr.lay_angle_rad - closed = ( - e - * sr.kappa_mag_1_m - * math.cos(a) ** 2 - * math.cos(2 * a) - * (lyr.d_wire_m / 2.0) - ) - k0 = int(np.argmin(np.abs(sr.phi_deg[name]))) # wire nearest phi = 0 - assert sr.sigma_B_Pa[name][k0] == pytest.approx(closed, rel=1e-9) + for mu in (0.0, None): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + sr = cx.compute_stress(cable, 0.03, tension_N=1.0e4, mu=mu) + for name in sr.phi_deg: + lyr = cable.get_layer(name) + e = library.get_property(lyr.material, "E_Pa") + a = lyr.lay_angle_rad + k0 = int(np.argmin(np.abs(sr.phi_deg[name]))) # wire nearest phi = 0 + closed = ( + e + * ( + sr.kappa_mag_1_m * math.cos(a) ** 2 * math.cos(2 * a) + + math.sin(a) ** 2 / lyr.r_helix_m * sr.sigma_f_Pa[name][k0] / e + ) + * (lyr.d_wire_m / 2.0) + ) + assert sr.sigma_B_Pa[name][k0] == pytest.approx(closed, rel=1e-9) + if mu == 0.0: + assert sr.sigma_f_Pa[name][k0] == 0.0 def test_sigma_f_respects_per_wire_kappa_c_boundary() -> None: diff --git a/tests/test_validation_report.py b/tests/test_validation_report.py index 9f3e46d..785dad8 100644 --- a/tests/test_validation_report.py +++ b/tests/test_validation_report.py @@ -30,7 +30,9 @@ def incorrect_bending(*args, **kwargs): monkeypatch.setattr(run_validation.cx, "compute_stress", incorrect_bending) row = next(r for r in run_validation._rows() if r.ident == "σ_B") assert row.status == "FAIL" - assert float(row.value.rstrip("%")) == pytest.approx(100.0) + # Every state (mu = 0, stuck, slipping) reports the doubled bending. + values = [float(part.split()[-1].rstrip("%")) for part in row.value.split(";")] + assert values == pytest.approx([100.0, 100.0, 100.0]) @needs_numba diff --git a/validation/scripts/run_validation.py b/validation/scripts/run_validation.py index 8d31623..4357056 100644 --- a/validation/scripts/run_validation.py +++ b/validation/scripts/run_validation.py @@ -38,6 +38,7 @@ import cablexsec as cx from cablexsec.analysis.capacity import birdcage_buckling_detail from cablexsec.analysis.curve_comparison import cycle_work, insert_cycle_crossings +from cablexsec.cable_adapters import cable_to_mkappa_specs from cablexsec.cables import ( inter_array_single_core_legacy_r2_yaml_path, inter_array_three_core_legacy_r2_yaml_path, @@ -1554,24 +1555,47 @@ def _rows() -> list[Row]: ) ) - # σ_B closed form (Ménard Eq. 14) at φ=0. - sr = cx.compute_stress(menard, 0.03, tension_N=1.0e4) - name = next(iter(sr.phi_deg)) + # σ_B at φ=0: the normal curvature follows the wire's slip state, + # cos²a cos2a κ + (sin²a / r) σ_f / E. Without friction (μ = 0) it is + # Ménard Eq. 14; a stuck wire takes cos²a cos2a + ξ sin²a cos²a (cos⁴a + # at ξ = 1); a slipping wire adds the term of its friction stress. + name = next(iter(cx.compute_stress(menard, 0.03, tension_N=1.0e4).phi_deg)) lyr = menard.get_layer(name) e = library.get_property(lyr.material, "E_Pa") a = lyr.lay_angle_rad - closed = ( - e * sr.kappa_mag_1_m * math.cos(a) ** 2 * math.cos(2 * a) * (lyr.d_wire_m / 2) - ) - k0 = int(np.argmin(np.abs(sr.phi_deg[name]))) + c2, s2 = math.cos(a) ** 2, math.sin(a) ** 2 + lox = c2 * math.cos(2 * a) + xi_b = next( + s.xi + for s in cable_to_mkappa_specs(menard, 1.0e4) + if math.isclose(s.r_helix_m, lyr.r_helix_m) + ) + errors_b = [] + stuck_b = slipping_b = True + for kappa_b, mu_b in ((0.03, 0.0), (1.0e-5, None), (0.03, None)): + sr = cx.compute_stress(menard, kappa_b, tension_N=1.0e4, mu=mu_b) + k0 = int(np.argmin(np.abs(sr.phi_deg[name]))) + sigma_f0 = float(sr.sigma_f_Pa[name][k0]) + if mu_b == 0.0: + coefficient = lox * sr.kappa_mag_1_m + elif kappa_b < 1e-3: + stuck_b = not bool(sr.slipping[name][k0]) + coefficient = (lox + xi_b * s2 * c2) * sr.kappa_mag_1_m + else: + slipping_b = bool(sr.slipping[name][k0]) + coefficient = lox * sr.kappa_mag_1_m + s2 / lyr.r_helix_m * sigma_f0 / e + closed = e * coefficient * (lyr.d_wire_m / 2) + errors_b.append(_pct(sr.sigma_B_Pa[name][k0], closed)) rows.append( Row( "1", "σ_B", - "Radial-fibre bending vs Ménard Eq. 14 (φ=0 from extension side)", - "< 1e-6%", - f"{_pct(sr.sigma_B_Pa[name][k0], closed):.2e}%", - "PASS" if _pct(sr.sigma_B_Pa[name][k0], closed) < 1e-6 else "FAIL", + "Radial-fibre bending at φ=0 (from the extension side): μ = 0 vs " + "Ménard Eq. 14; stuck wire vs cos²α cos2α + ξ sin²α cos²α (cos⁴α at " + "ξ = 1); slipping wire vs Eq. 14 + (sin²α / r) σ_f / E", + "< 1e-6% each", + "μ = 0 {:.2e}%; stuck {:.2e}%; slipping {:.2e}%".format(*errors_b), + "PASS" if max(errors_b) < 1e-6 and stuck_b and slipping_b else "FAIL", ) ) diff --git a/validation/validation_report.md b/validation/validation_report.md index 772fe95..5ef3adb 100644 --- a/validation/validation_report.md +++ b/validation/validation_report.md @@ -25,7 +25,7 @@ Every row is computed from published data or closed-form references in this repo | 1 | TQ-SV | Saint-Venant twist rigidity with free warping (trefoil filler lobes): 2 x 1 rectangle vs series solution; bonded annulus as a mirrored 60 deg sector vs polar moment | < 3e-4 relative; < 1e-6 relative | 1.0e-04; -1.5e-08 | PASS | | 1 | TQ-FT | Twist-rate wire stress of the fatigue path (Knapp 1981 Eqs. 2, 11): 66 kV armour stress and damage under tension and twist vs closed form; Feyrer 1x37 torque and tension from the wire stresses vs K_et, K_tt; mirror lay with reversed twist; zero twist vs none | < 1e-12; < 1e-12; < 1e-12; 0 | 4.5e-15; 2.2e-16; 0.0e+00; 0.0e+00 | PASS | | 1 | A11 | M-κ energy closure (loop area vs closed form) | < 0.1% | 0.082% | PASS | -| 1 | σ_B | Radial-fibre bending vs Ménard Eq. 14 (φ=0 from extension side) | < 1e-6% | 0.00e+00% | PASS | +| 1 | σ_B | Radial-fibre bending at φ=0 (from the extension side): μ = 0 vs Ménard Eq. 14; stuck wire vs cos²α cos2α + ξ sin²α cos²α (cos⁴α at ξ = 1); slipping wire vs Eq. 14 + (sin²α / r) σ_f / E | < 1e-6% each | μ = 0 0.00e+00%; stuck 0.00e+00%; slipping 0.00e+00% | PASS | | 1 | M-rec | Assembled per-wire moment vs compute_mkappa (cross-engine, single-core) | < 2% | 0.000% | PASS | | 1 | M-rec-3core | Cross-engine moment vs compute_mkappa with offset-core geometry and shared mean armour pressure | < 2% | 0.000% | PASS | | 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 | @@ -79,7 +79,7 @@ Every row is computed from published data or closed-form references in this repo ## Test taxonomy (full gate suite) -- analytical_sanity: `1278 passed` +- analytical_sanity: `1316 passed` - independent_method: `92 passed` - full_scale: `59 passed`