Repository navigation
feat: static/dynamic and rate-dependent armour friction law - #7
Conversation
Every contact pair had one rate-independent Coulomb coefficient. A FrictionLaw now gives each wire (direction-tied model) or helix node (distributed model) a factor on its coefficient where the kernel applies it: inside the capstan exponent of the wire bounds and on the whole node bound m (rho g + lam n). - Static/dynamic: static_factor until a wire slips in a stick episode, dynamic_factor while it slips and until it has stuck for stick_time_s, per-wire (per-node) stick timer, either order (breakaway peak or velocity strengthening). - Rate: R(v) = 1 + c ln(1 + v/v0) + v/v_eta on the dynamic factor; the viscous term is t = b sign(v) + eta v with eta = b/v_eta, solved as a backward-Euler (Perzyna) return by safeguarded Newton, unique for c >= 0 and exact per step. BendingWork.viscous_J_per_m carries the rate-dependent dissipation and the balance closes with it. The direction-tied slip rate is the plastic strain rate times r/|sin a|. - Direction-tied: NumPy reference in wire_slip_history and a compiled kernel in fast_slip; distributed: static/dynamic option with breakaway re-solve of the increment (rate terms refused). - compute_mkappa and compute_fatigue take friction_law and time_s; a law that depends on time is refused without sample times, time_s without such a law is refused. The progressive law, core friction, the termination clamp increment and the bending-law export (Masing/Iwan is rate independent) refuse a non-neutral law. - Neutral parameters keep the rate-independent code paths bit for bit. Tests: one-slider closed forms (breakaway peak, strengthening, healing, steady viscous loop area pi eta omega x0^2, steady logarithmic rate), energy identity to round-off, equal factors equal to a scaled mu, compiled kernel against the reference, entry-point refusals. 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: b2770b3d28
ℹ️ 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 slip return of a rate-dependent law took Newton steps from the rate-free root and bisected only when a step left the bracket. With a strong viscous term or a short step the bound rises steeply with the slip, the steps shrink to a vanishing share of the bracket, and after 200 iterations the unconverged iterate was returned: its bound (6.6e100 Pa for a trial stress of 1e8 Pa) became the wire stress. - Scalar (compiled) and NumPy returns: Newton steps only inside the bracket and only while the bracket at least halves every second iteration, bisection otherwise, so the bracket shrinks geometrically however steep the bound. Convergence on the residual at round-off of the trial stress or on the bracket at round-off of the slip itself. An unconverged return is NaN and is refused by every caller (wire_slip_history, wire_friction_stress, slider_history) instead of being consumed. - The end-of-step stress is the bound at the slip, never above the trial stress (_return_stress; the NumPy path clips the same way). - The bound exponent is capped at 600 (was 700) so that capped bounds and slopes stay finite in binary64: no overflow inside the bracket. - A zero lay angle has zero capstan bounds; the law paths divided by sin(a) for the slip length. Both paths now give that layer zero friction under any law, as the existing bound and onset helpers do. - wire_friction_stress refuses a law on a layer without stick stiffness, as the reference does. Tests (all fail before this change): the reported return case and a sweep of 864 extreme rate cases (residual <= 1e-14 of the trial stress, bound between the rate-free bound and the trial stress, NumPy equal to scalar); both kernels with a steep viscous term and 1e-6 s steps (stress within the elastic envelope, kernels agree to 1e-12, energy balance); refusal of an unresolved return; static/dynamic and rate laws on a zero-lay-angle layer, compiled and NumPy. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2f6271cc9
ℹ️ 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".
…ith a timed law Two values were formed for both sides or consumers where only one is valid. - Direction-tied NumPy reference: the end-of-step bound of a slipping wire was evaluated on both sides at its rate factor. Under a strong viscous term the falling bound saturates at sigma0 g (a valid, finite return) while the rising exponential of the same factor overflows, so wire_slip_history raised for a finite solution (e.g. pressure 2e4 Pa, v_eta = 1e-9 m/s: falling bound 7.95e6 Pa, unused exponent 5401). The new _side_bound evaluates each wire on its own side only (with the scalar form's exponent cap); the kept cap of a slipping wire is that bound, and wires without slip, which carry no rate factor, keep both bounds. The NumPy return iteration evaluates bound and slope on each element's side only as well. The compiled kernel already evaluated one side (_bound). - compute_fatigue: time_s serves a ThermalHistory and a time-dependent friction law. A frozen ThermalState refuses any time_s, so a frozen state with a timed law always failed one of the two checks. The times now go to the friction kernel and, for a frozen state, not to the thermal helper; a frozen state given time_s without a timed law is still refused, and a ThermalHistory still takes the times. Tests (each fails before this change): the reported case on both curvature signs, compiled against the NumPy reference, compressed wires on the saturated bound, stresses within the trial stress, finite kept caps; compute_fatigue with a frozen ThermalState and a rate law, equal to the identical-block ThermalHistory, with the existing refusals. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@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". |
The parametrised friction-law tests add three more cases than were counted; the three taxonomy lines now give the deselected counts the CI coverage job collects (3164, 4227, 4270). 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
Armour friction had one rate-independent Coulomb coefficient per material pair. This PR adds a$m$ on $\mu$ :
FrictionLawthat gives every wire (direction-tied kernel) or helix node (distributed kernel) its own factorThe neutral law reproduces the present kernels bit for bit. Routes that cannot represent a state- or rate-dependent coefficient refuse a non-neutral law instead of computing something wrong.
The law (
cx.FrictionLaw,cablexsec.mechanics.friction_law)Where the factor acts. It sits inside the capstan exponent, so the signed bound of #2 keeps its asymmetry:
In the distributed kernel it multiplies the node bound,$m(\rho g + \lambda n)$ .
Static/dynamic (
static_factor,dynamic_factor,stick_time_s):stick_time_sof completed stick steps heals it back. The default,inf, never heals;0heals after one stick step.Rate, direction-tied kernel only. The dynamic factor is multiplied by
Energy.
BendingWorkgainsviscous_J_per_mand adissipation_J_per_mproperty. The balance is input = stored + friction + viscous + remainder.Distributed kernel (static/dynamic only):
Single slider.
slider_historyruns the law on one spring-slider; the closed-form tests use it.Entry points and time base
Entry points. These take
friction_law=andtime_s=:compute_mkappa,compute_fatigue(both levels);wire_slip_history,wire_friction_stress,distributed_friction_history;wire_stress_field,compute_mkappa_wire_slip_front.Time base:
time_s.time_swithout such a law is refused, except incompute_fatigue, where it still serves a thermal history.Refused for a non-neutral law:
compute_mkappa;export_bending_law: no Masing/Iwan law carries a state- or rate-dependent coefficient. A neutral law is accepted and gives an identical export.Not wired:
The crossing contact-life branches of the fatigue path keep their own Mindlin coefficient, and the provenance says so.
Tests (
tests/test_friction_law.py, 76; 23 analytical_sanity)stick_time_s0.3 s) gives a second peak; 0.1 s does notcompute_mkappa,compute_fatigue, exportAlso tested:
There are no new validation rows: CableXSec has no rate-dependent or static/dynamic loop data yet.
Checks
CABLEXSEC_DISABLE_NUMBA=1ruff check,ruff format --check(CI trees)friction_law.py98.3 %,fast_slip.py97.7 %,papailiou.py98.2 %);test_friction_law.pyjoins the coverage script's no-JIT pass so the compiled bodies are tracedDocs:
concepts.md(slip-state and rate-dependent coefficient),api_python.rst(Friction law), the module and kernel docstrings, and the CHANGELOG.