Repository navigation
feat: slip scaling variable of the exported bending law - #4
Conversation
The exported bending law held one contact state per tension and was interpolated between tensions, with no rule for its slider states when the tension changes. export_bending_law(..., slip_scale=True) now adds BendingLawExport.slip_scale, a SlipScaleTable: - the law at a reference tension split into friction groups, one per structural armour layer and laid_cores for the core lay stage, each with its Iwan elements (k_i, kappa_y,i), plus EI_slip; - the cap R_g of every group (its planar full-slip friction moment) over a table of tensions and, optionally, external pressures (solved section states), the group scale rho_g = R_g / R_g,ref, the single cap-weighted scale s = sum R_g / sum R_g,ref, and the derivatives d/dT and d/dp_e (central differences of the contact model). Why it is exact per group: the direction-tied wire is a spring-slider of fixed stiffness k_f = xi E cos^2 a whose bounds are proportional to its layer's P1+P2. The return map is positively homogeneous, so a group whose bounds scale by rho obeys M(kappa; rho) = rho M(kappa / rho; 1) over any history (the signed capstan bound included), and its Iwan elements keep k_i while their yield curvatures become rho kappa_y,i. Under a changing state every element follows the return map with the new cap, e_i <- clip(e_i + dkappa, -rho kappa_y,i, rho kappa_y,i), the rule the fatigue kernels and the contact-tension history of compute_mkappa apply to every wire (SlipScaleTable.moment, law_at, dissipated_energy). The caps come from the scalar-tension contact states of compute_mkappa (pressure only; no crossed-wire line loads), so layer stacks whose contact histories are refused still export a scale. Tests (tests/test_bending_law_slip_scale.py): - compute_mkappa at 70 kN is the 20 kN law with the bound scaled over a loop history, cores included (66 kV template, every group ~ T): 4e-16; - every group law decomposed at 60 kN on the grid rho_g kappa is the 10 kN group law with yield curvatures times rho_g (Menard, layers scaling by 2.06 and 1.40; 33 kV three-core with cores): < 1e-13; - with symmetric wire bounds on a grid through every wire's slip curvature, the scaled law under a tension cycle inside bending cycles is compute_mkappa with the contact-tension history, moment and work, to 1e-14; - with the signed bound it misses the history route by at most 1.02 times the fixed-tension Iwan residual (Menard 0.17 %, 66 kV 0.11 % of the range); the frozen law misses by 19 % and 43 %; - table values and slopes, the pressure axis, JSON/CSV, project round trip, input checks, a falling cap at fixed curvature. One scale for all groups is exact when the groups scale alike and keeps the stick stiffness and full-slip moment otherwise. Largest error against the per-group law over 10-150 kN (backbone and cycles to 1.5 times full slip): 66 kV 0; 33 kV three-core 0.10 % (0.29 % with cores); Menard 12 %; with an external pressure of 0-2 MPa 21 % (66 kV), 12 % (33 kV), 19 % (Menard). Torque is not a table variable, and the internal-ring slip of resolved strands is refused. Format: the JSON law with a slip scale is cablexsec.bending_law/2 (a new slip_scale object, version-1 fields unchanged); without one it stays version 1. SlipScaleTable.to_csv writes the table. BendingLawSettings passes the new options. The project codec accepts a missing field that has a default, so project files written before slip_scale existed still load. export_bending_law refuses contact_pressure_Pa and contact_tension_history_N as options. Fixed: the docs and provenance claimed the exported Iwan law follows compute_mkappa exactly. The signed capstan bound makes each wire's slip interval asymmetric, which no Masing element carries; the residual is about 0.1 % of the moment range near full slip (0.02 % at mu = 0.02, 0.017 % with symmetric bounds on Menard). New validation row MX-scale (tier 1): 4.1e-16; 8.3e-14; ratio 1.02 against < 1e-12; < 1e-12; <= 1.25. Docs: global-local guide Section 8.1, file formats, concepts, benchmark register, VALIDATION.md, changelog. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 698bfd2766
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 698bfd2766
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The group element stiffnesses are differences of fitted slopes, so the identity holds to a few hundred machine epsilons: 8.3e-14 here, 1.1e-13 on the CI runner, where the report checker read it as a real change against the 1e-12 target. The target is now 1e-9 (round-off for the checker); a wrong scaling misses it by orders of magnitude. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…nce lies off the table axes record() built the reference elements through law_at() at the reference state, which the table refuses when its tension or pressure axis does not hold that state (the default reference is the first exported tension with contact, and the pressure reference is the cable's own). json_text() and to_json() then failed on an export that was otherwise valid. At the reference every group scale is 1, so SlipScaleTable.reference_law() now merges the group elements unscaled, and law_at() shares that merge. Test: a tension axis starting above the reference and a pressure axis excluding the cable's external pressure both serialise (both failed before), and reference_law() equals law_at() at the reference on a table that holds it. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
The exported bending law now carries a slip scaling variable, so a global analysis can follow the section's friction as tension (and, optionally, external pressure) changes. It comes with a stated slider-update rule for a changing state. The rule is exact per friction group and tested against
compute_mkappawith a contact-tension history (#3). The format stays backward compatible.This PR also corrects an "exact" claim in the docs that has been false since #2.
Why scaling is exact
Each direction-tied wire is a spring-slider. Its stiffness$k_f = \xi E\cos^2\alpha$ is fixed, and its friction bounds are proportional to its layer's $P_1+P_2$ . The return map $f \leftarrow \mathrm{clip}(f + k\Delta d, -\rho l, \rho u)$ is positively homogeneous. A layer whose bounds scale by $\rho$ therefore obeys
over any curvature history, including the asymmetric capstan bound. Its Iwan elements keep$k_i$ , and their yield curvatures become $\rho,\kappa_{y,i}$ .
Friction groups and scales
Groups:
laid_coresgroup for the core lay stage, with its own contact load.Group cap$R_g$ : the planar full-slip friction moment, computed analytically from
wire_slip_stress_bounds.Group scale:$\rho_g = R_g/R_{g,\mathrm{ref}}$ .
Single cap-weighted scale:$s = \sum R_g / \sum R_{g,\mathrm{ref}}$ . It keeps the stick stiffness and the full-slip moment exact.
Slider update for a changing state:
$$ e_i \leftarrow \mathrm{clip}\left(e_i + \Delta\kappa,\ -\rho_g\kappa_{y,i},\ \rho_g\kappa_{y,i}\right), \qquad M = EI_\mathrm{slip},\kappa + \sum_i k_i e_i, $$
implemented as
SlipScaleTable.moment,.law_atand.dissipated_energy.Reference state: the smallest exported tension at which every group has contact, so that$\rho \ge 1$ .
Axes:
solve_section_statefor bounded/qp,solve_cable_radial_statefor solved);Not exported: torque, which needs a free twist and moves contra-wound layers in opposite senses. The internal-ring slip of resolved strands is refused.
Tests (
tests/test_bending_law_slip_scale.py, 22)compute_mkappaat 70 kN vs the 20 kN law with the bound scaled (loop history, 66 kV with cores)compute_mkappa(contact_tension_history_N), symmetric wire boundsAll 22 also pass with the pip wheels of both CI Python versions and with
CABLEXSEC_DISABLE_NUMBA=1.Single-scale error against the per-group law
Range 10–150 kN, reference 10 kN. The moment error is in % of the moment range; the work is per cycle at 1.5 × full slip.
With external pressure, use the per-group scales.
Correction: the Iwan law is not exact under the signed bound
The docs stated that the exported Iwan law reproduces
compute_mkappaexactly. That stopped being true with the signed capstan bound (#2): each wire's slip interval is now asymmetric, which no Masing element can carry. With symmetric bounds the residual drops tenfold, which confirms the cause. The residual is 0.08–0.26 % of the moment range near full slip on the templates, and 0.02 % at μ = 0.02.The wording is corrected in the provenance strings (
export_bending_law,cabledyn_bending_law), the module docstring, the global–local guide,concepts.mdandbenchmarks.md, with a CHANGELOG "Fixed" entry. The law itself is unchanged.Format
cablexsec.bending_law/2, with a newslip_scaleobject. Every version-1 field is unchanged. A law without a slip scale is still written as version 1, byte for byte.SlipScaleTable.to_csvwrites one row per state.SlipScaleTable(withreference_law(), the law at the reference built from the group elements, so a reference outside the table axes still serialises) andCORE_GROUP;BendingLawSettingsgains theslip_scale*options.slip_scaleload.export_bending_lawrefusescontact_pressure_Paandcontact_tension_history_Nas options.Validation and checks
bending_law.py98.86 %).src tests examples validation release doc, as in CI.file_formats.md,concepts.md,benchmarks.md(MX-scale, MX-scale-1),VALIDATION.md,ARCHITECTURE.md,project_guide.mdand CHANGELOG.