Repository navigation
fix: friction-model routing of the batch and of 'auto' - #14
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". |
57f94d5 to
6db4b75
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6db4b751c4
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
|
@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". |
The sea-state batch set friction_model="direction_tied" explicitly, so
DirectionTiedFrictionWarning, which compute_fatigue issues only when the
model is left at its default, never fired in the batch or cablexsec-batch,
and the batch would not follow the planned change of the default.
SeaStateBatchOptions.friction_model now defaults to None and the batch
passes it through. The library default is unchanged ("direction_tied", new
constant DEFAULT_FRICTION_MODEL), so results are unchanged bit for bit; the
manifest and the assessment digests record the model the default resolves
to and are unchanged too. Warnings of spawned worker processes, shown only
on the workers' standard error before, are issued again in the caller.
friction_model="auto" kept the direction-tied law silently (only a
provenance limitation) when the distributed model did not cover a layer on a
non-planar path: a rate-dependent friction law, a rigid interface or a
stick modulus that changes over the record. It now warns once per layer
(FrictionModelFallbackWarning) from compute_fatigue and wire_stress_field.
curvature_path_out_of_plane_ratio judged the out-of-plane distance against
the largest curvature, so a static bend hid cycles normal to it (0.05 1/m
with 4e-5 1/m normal cycles: 8e-4, planar). The distance is now judged
against the smaller of the largest curvature and the largest distance from
the mean curvature, floored at 1e-3 of the largest curvature so that a
nearly constant curvature written with six significant digits stays
planar: that path is 0.8 out of plane. Paths without a static offset keep
their ratio. Over the 1203 tests that reach the planarity test and the
shipped fatigue examples and tutorials no verdict changes except in the new
checks.
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Six significant digits round each curvature component by up to 5e-6 of the value (half a unit in the last digit of a mantissa near 1), not 5e-7, so a nearly constant curvature written that way could read up to 7e-3 out of plane against a floor of 1e-3 and switch "auto" to the distributed model. The floor of the range is now 1e-2 of the largest curvature: such a path is at most 7.1e-4 out of plane (3.2e-4 over a scan of angles and magnitudes), and cycles normal to a static bend count from 1e-5 of it. The test scans the worst rounding case over angles and magnitudes. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
f319cae to
576c773
Compare
Summary
Three fixes to how the armour friction model is chosen.
"direction_tied": never warned, would not follow the planned default changeNone: takes the library default and itsDirectionTiedFrictionWarning"auto"falls back to direction-tied on a non-planar pathFrictionModelFallbackWarning, once per layerThe library default stays
"direction_tied"; this PR does not change it.1. The batch takes the library default
SeaStateBatchOptions.friction_modelnow defaults toNoneand is passed through tocompute_fatigue. The batch andcablexsec-batchwarn on non-planar records, ascompute_fatiguedoes, and will follow the planned default change.cablexsec.analysis.fatigue.DEFAULT_FRICTION_MODEL = "direction_tied". The analysis-level and APIcompute_fatigueboth read it.workers > 1, warnings from the spawned workers used to appear only on the workers' standard error. They are now recorded in the worker and issued again in the caller. A category that cannot be pickled travels as aUserWarningwith its name in the message.2.
"auto"warns when it keeps the direction-tied lawWhen the distributed model does not cover a layer on a non-planar path,
"auto"keeps the direction-tied law. The causes are a rate-dependent friction law, a rigid interface (ξ ≥ 1) or a stick modulus that changes over the record.compute_fatigueandwire_stress_fieldnow warn in that case (FrictionModelFallbackWarning, aUserWarning, exported fromcablexsec). The provenance limitation is kept.3. Planarity relative to the cycles
curvature_path_out_of_plane_ratiodivides the distance from the bending line through the origin bymin(peak, max(spread, 1e-3 peak)). Herespreadis the largest distance of a sample from the mean curvature.b/a, circle, zero-mean planar pathsb/a, 1, round-offThe 1e-3 floor keeps the rounding of output files (at most 5e-4 at six digits) from making a static path non-planar. Cycles normal to a static bend count from 1e-6 of it.
Outcome check: I wrapped the function to log every changed verdict. Over the 1 203 tests that reach it, and over the shipped fatigue examples and tutorials (
demo_05, bothlong_term_*, tutorials 03 and 04), only the new checks change their verdict.Tests
test_out_of_plane_ratio: a static bend with normal cycles, in-plane cycles in three planes, a rounded oblique static bend and a constant path.test_auto_sees_cycles_normal_to_a_static_bend(compiled):"auto"takes the distributed model where the old ratio said planar.compute_fatigueandwire_stress_field, varying stick modulus) expect the warning, reported at the caller's line.test_no_fallback_warning_on_planar_paths_or_explicit_models.test_batch_friction_model_follows_the_library_default(workers 1 and 2): the warning reaches the caller, damage matches an explicit"direction_tied"run (bit for bit in process), and the manifest, input digest and assessment id are equal.Docs
CHANGELOG.md(Fixed), local analysis guide Section 9 (batch default, ratio definition, fallback warning), glossary (warning classes).Gates
src)CABLEXSEC_DISABLE_NUMBA=1No validation row changes: none uses the batch default,
"auto"or the planarity ratio. The branch is rebased on #13 and #16.run_validation.pyregenerated on the branch differs from the committed report only in round-off cells within their tolerance classes, so the committed report is kept unchanged.Review
Codex (round 2, after the rebase) flagged that six significant digits round by up to 5e-6 of a value, not 5e-7, so the 1e-3 spread floor could call a rounded constant curvature non-planar (1.3e-3 in its example). Fixed in d9b8b92: the floor is now 1e-2, which gives at most 7.1e-4 (3.2e-4 over a scan of 721 angles and 97 magnitudes), and the reviewed case is in the test. Round 3: no findings.