Repository navigation
perf: selected-position fatigue evaluation - #20
Conversation
|
@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. |
|
Codex Review: Didn't find any major issues. 🚀 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". |
compute_fatigue(wire_positions=...) evaluates chosen wires instead of every wire: N equally spaced positions per armour layer, explicit azimuths (the nearest wire to each) or a mapping per layer. Each wire's friction recursion, stress field and rainflow count are independent of the other wires, so every per-wire and per-fibre result of a selected wire equals the full evaluation bit for bit. The direction-tied kernel solves only the selected wires (the layer's wire count is passed for the tributary width); the other friction models, the termination increment and the reference kernels solve the layer and keep the selected rows. FatigueResult.wire_index and wire_azimuth_deg name the rows; the batch options pass the selection and the long-term accumulation requires the same wires in every case. On the 66 kV template, one hour at 10 Hz, both armour layers, one thread: 12 positions per layer take 0.11 s instead of 1.24 s (4 fibres) and 0.31 s instead of 3.72 s (32 fibres). The distributed model's time is all in its compiled increment solver (substep count set by the slip-onset curvature); no avoidable overhead was found outside it. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
ba55e75 to
6c98552
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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
compute_fatigue(..., wire_positions=...)evaluates selected wires instead of every wire of each armour layer:Wire$k$ of a layer of $n$ wires lies at the azimuth $360,k/n$ degrees, the convention of
phi_critical_deg. The per-wire arrays hold the selected wires in ascending order;FatigueResult.wire_indexandwire_azimuth_degname them. The critical wire and the damage sums are over the selected wires only.Identity. A wire's friction recursion, stress field and rainflow count do not depend on the other wires, so every per-wire and per-fibre array of a selection equals the same rows of the full evaluation bit for bit (
np.testing.assert_array_equal), in every route the selection reaches:n_totalkernel argument)transverseslip (wire_stress_fieldonly) couples neighbouring wires and is refused with a selection.SeaStateBatchOptions(wire_positions=...)passes the selection to every run (absent from the assessment digest when unset, so existing digests are unchanged), andcompute_long_term_fatiguerequires the same wires in every case and reports the critical wire by its number.Timings
66 kV template, one hour at 10 Hz (36 000 samples,$T = 100 \pm 10$ kN, $\kappa_x, \kappa_y$ irregular, standard deviations 0.004 and 0.002 1/m), both armour layers (139 + 145 wires),
compute_fatigue, one thread, warm:The every-wire columns differ by run-to-run variation only (the every-wire path is unchanged apart from passing the wire count to the kernel).
Distributed model profile. 23.1 s of the 24.0 s are in the compiled increment solver ($\kappa_{on}$ = 1.6e-4 and 5.1e-5 1/m against curvature standard deviations of 0.004 and 0.002 1/m). No avoidable overhead was found outside the solver, and the solver itself was not changed here: fewer substeps would change results beyond round-off. A selection saves the counting only, since the helix of the whole layer must be solved.
distributed_friction_history); the Python side (field, local bending, rainflow) is 0.9 s. The solver does 0.72 million substeps on the inner layer and 2.24 million on the outer, 1.30 and 1.14 Newton solves per substep, about 14 ns per helix node and substep (556 and 580 nodes). The substep count is set by the substep rule (0.1 of the slip-onset curvature) and the template's small slip-onset curvatures with tension-only contact (Tests
tests/test_selected_wire_positions.py(5 s):select_wiresrules; identity of every per-wire and per-fibre array against the full evaluation for direction-tied, distributed and progressive friction, the numba-free reference kernels, a friction law, Goodman mean stress, the termination clamp with SCF, copper slip-cycle and legacy contact life and the steel slip-amplitude branch; the critical wire's azimuth and above-core flag; input checks; long-term accumulation; a project round trip of the new fields.Gates: ruff, mypy (0 errors), full suite with numba and with
CABLEXSEC_DISABLE_NUMBA=1,run_validation.py --check(no row moves).