Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ All notable changes to CableXSec are recorded in this file. The format follows
curvature is about 1% of its peak, so the wire next to it stays in stick and the anchor
condition does not reach the stations; the over-prediction is a curvature-gradient effect.
Section records of the sea-state batch carry the new key; records without it load as rigid.
- A friction law with a static/dynamic and a rate-dependent coefficient (`FrictionLaw`,
`compute_mkappa(..., friction_law=, time_s=)`, `compute_fatigue(..., friction_law=, time_s=)`).
Before, every contact pair had one rate-independent Coulomb coefficient. The law gives each
wire (direction-tied model) or helix node (distributed model) a factor on its coefficient:
`static_factor` until it slips, `dynamic_factor` while it slips and until it has stuck for
`stick_time_s`, either order (`mu_s > mu_d` gives a breakaway peak, `mu_s < mu_d` velocity
strengthening), times `R(v) = 1 + c ln(1 + v/v0) + v/v_eta` at slip rate `v`. The last term
is a regularised Coulomb law `t = b sign(v) + eta v` with `eta = b/v_eta`, solved as a
backward-Euler (Perzyna) return that is exact for each step (a bracketed Newton iteration
with bisection that converges however steep the rate term is, and a return that does not
converge is refused); `BendingWork.viscous_J_per_m`
reports its dissipation and the work balance closes with it to round-off. The direction-tied
kernel takes every option (NumPy reference and compiled kernel), the distributed kernel the
static/dynamic option; the progressive model, the laid-core friction and the termination
clamp increment refuse a non-neutral law, and so does the exported bending law (a Masing/Iwan
law is rate independent). A law that depends on time needs the sample times and is refused
without them. Neutral parameters reproduce every result bit for bit. `slider_history` runs
the law on one spring-slider: breakaway peak, healing, steady logarithmic rate and the
viscous loop area `pi eta omega x0^2` are tested in closed form. No rate-dependent friction
data of armour interfaces is in the validation set.
- `compute_mkappa` can let the armour contact pressure follow the bending history:
`contact_tension_history_N` sets the per-sample `P1+P2` from a tension history through the
contact model (the histories `compute_fatigue` forms from `tension_N`), and
Expand Down
11 changes: 11 additions & 0 deletions doc/api_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ Bending and stress
.. autofunction:: cablexsec.compute_stress
.. autofunction:: cablexsec.compute_component_response

Friction law
------------

The static/dynamic and rate-dependent armour friction coefficient taken by
``compute_mkappa`` and ``compute_fatigue`` (``friction_law``, with ``time_s``),
and the single spring-slider that shows its closed forms.

.. autoclass:: cablexsec.FrictionLaw
:members: rate_factor, describe, is_neutral, needs_time
.. autofunction:: cablexsec.mechanics.friction_law.slider_history

Fatigue
-------

Expand Down
64 changes: 64 additions & 0 deletions doc/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,70 @@ follows the history: the stick stiffness, the full-slip stiffness and the
contact loads of the laid cores stay at the reference state. The bending-test
simulator and the exported bending law keep a fixed pressure.

## The friction coefficient can depend on slip state and rate

By default every contact pair has one rate-independent Coulomb coefficient
`mu`. A `FrictionLaw` replaces it by an effective coefficient `m mu`, with a
factor `m` that each wire (direction-tied model) or helix node (distributed
model) carries on its own. The factor enters where the kernel uses `mu`: in
the capstan exponent of the wire bounds, `sigma0 g expm1(m lam psi)` and
`sigma0 g (1 - exp(-m lam psi))`, and on the whole node bound
`m (rho g + lam n)` of the distributed model.

**Static and dynamic coefficient.** A wire keeps the static factor
`static_factor` (`mu_s / mu`) until it slips, then the dynamic factor
`dynamic_factor` (`mu_d / mu`) while it slips, and returns to the static one
after `stick_time_s` of stick. Each step is a backward-Euler return map with
the factor of the end of the step. A wire whose trial stress leaves the
interval of its current factor starts or continues a slip episode and is
returned to the dynamic interval. With `mu_s > mu_d` the loop has a breakaway
peak: the stress drops from the static to the dynamic bound in the step of
breakaway. With `mu_s < mu_d` (velocity strengthening) the stick episode ends
at the static bound without slip, and the wire continues elastically up to
the dynamic bound. A healing time of `inf` (default) never heals, `0` heals
after one stick step.

**Rate dependence.** At slip rate `v` the dynamic factor becomes `m_d R(v)`,

$$
R(v) = 1 + c \ln(1 + v / v_0) + v / v_\eta ,
$$

the logarithmic law `mu(v) = mu_d (1 + c ln(1 + v/v_0))` plus a regularised
(viscous) Coulomb term `t = b sign(v) + eta v` with `eta = b / v_eta`, a
Perzyna overstress proportional to the rate-independent bound `b`. The slip
increment `dp` of a slipping wire solves
`|sigma_trial| - k dp = B(m_d R(L dp / dt))` with `B` the bound on its side;
the left side falls and the right side rises with `dp`, so the root is
unique and the return is exact for the step. Only `c >= 0` is accepted
(velocity weakening loses this uniqueness). The direction-tied wire slips in
a reduced strain; its slip rate is that strain rate times `L = r / |sin a|`,
the wire length per radian of helix, which turns the extreme-fibre strain
`r kappa` into the largest slip displacement of a freely sliding wire. It is
a representative wire velocity, not a local one. The distributed model takes
the static/dynamic option only.

**Energy.** The work of a slipping wire splits into the rate-independent
friction work `B(m_d) |dp|` and the rate-dependent (viscous) part
`[B(m_d R) - B(m_d)] |dp|`; `BendingWork.viscous_J_per_m` reports the second,
and the balance input work = stored energy + friction + viscous dissipation +
backward-Euler remainder closes to round-off. One slider driven at full slip
by `x0 sin(omega t)` dissipates `4 b x0` by friction and `pi eta omega x0^2`
by the viscous term per cycle (`slider_history` reproduces both).

**Where it applies.** `compute_mkappa` and `compute_fatigue` take
`friction_law` with the sample times `time_s` when the law needs them (a rate
term or a finite positive healing time); without a time base such a law is
refused, and `time_s` without one is refused too. The stress-free start lies
one sampling interval before the first sample. The progressive (Iwan) model,
the laid-core friction, the termination clamp increment and the bending-test
simulator keep the rate-independent coefficient and refuse a non-neutral law.
The exported bending law refuses one as well: its parallel elastic-plastic
elements with Masing's rules are rate independent and cannot represent it.
Neutral parameters (`mu_s = mu_d = mu`, `c = 0`, `v_eta = inf`) leave every
result unchanged, bit for bit. No rate-dependent or static/dynamic friction
data of armour interfaces is in the validation set.

## Fatigue is counted at fixed material points

A fatigue crack starts at a point of the material, so CableXSec counts fatigue
Expand Down
1 change: 1 addition & 0 deletions release/check_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"tests/test_along_wire_test_inputs.py",
"tests/test_along_wire_chain.py",
"tests/test_friction_kernels.py",
"tests/test_friction_law.py",
)


Expand Down
2 changes: 2 additions & 0 deletions src/cablexsec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
ExtrapolationWarning,
FatigueLayer,
FatigueResult,
FrictionLaw,
MkappaResult,
PhysicalRangeError,
ProgressiveFriction,
Expand Down Expand Up @@ -523,6 +524,7 @@
"ContactQPResult",
"CoreFrictionHistory",
"CoreFrictionSpec",
"FrictionLaw",
"ProgressiveFriction",
"birdcage_buckling_detail",
"cable_to_mkappa_specs",
Expand Down
21 changes: 20 additions & 1 deletion src/cablexsec/analysis/bending_law.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
from numpy.typing import ArrayLike, NDArray

from cablexsec.exceptions import CableInputError
from cablexsec.mechanics.friction_law import FrictionLaw
from cablexsec.mechanics.papailiou import wire_slip_stress_bounds
from cablexsec.provenance import Provenance

Expand Down Expand Up @@ -851,7 +852,10 @@ def export_bending_law(
**mkappa_options
Passed to :func:`cablexsec.api.compute_mkappa` (``mu``,
``contact_model``, ``friction_model``, ``progressive``,
``core_friction``); planar bending only.
``core_friction``); planar bending only. A non-neutral
``friction_law`` (static/dynamic or rate dependent) is refused: the
exported parallel elastic-plastic law with Masing's rules is rate
independent and cannot represent it.

Notes
-----
Expand Down Expand Up @@ -883,6 +887,21 @@ def export_bending_law(
):
if name in mkappa_options:
raise CableInputError(f"{name} is set by the export, not an option")
friction_law = mkappa_options.get("friction_law")
if friction_law is not None and (
not isinstance(friction_law, FrictionLaw) or not friction_law.is_neutral
):
# A static/dynamic or rate-dependent coefficient has no Masing/Iwan
# (rate-independent, parallel elastic-plastic) representation.
raise CableInputError(
"a non-neutral friction law cannot be exported as a Masing/Iwan "
"bending law (it is state or rate dependent); export the "
"rate-independent law"
)
if "time_s" in mkappa_options:
raise CableInputError(
"time_s is not an export option: the exported backbone is rate independent"
)
if not slip_scale and (
slip_scale_reference_N is not None
or slip_scale_tensions_N is not None
Expand Down
77 changes: 76 additions & 1 deletion src/cablexsec/analysis/fatigue.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
distributed_wire_friction_stress,
)
from cablexsec.mechanics.fast_slip import wire_friction_stress
from cablexsec.mechanics.friction_law import (
FrictionLaw,
active_friction_law,
friction_law_time_steps,
)
from cablexsec.mechanics.mindlin_contact import (
MindlinContact,
TransverseMap,
Expand Down Expand Up @@ -514,11 +519,16 @@ def _wire_stress_series(
distributed_max_increment: float = DEFAULT_MAX_INCREMENT,
progressive: ProgressiveFriction | None = None,
friction_out: list[FloatArray] | None = None,
friction_law: FrictionLaw | None = None,
time_s: FloatArray | None = None,
) -> FloatArray:
"""Build ``sigma_total(phi_k, t)`` for every wire of one layer [Pa].

``friction_out``, when given, receives the friction stress ``sigma_f``
(for the component stress concentration factors).
(for the component stress concentration factors). ``friction_law`` and
``time_s`` (:class:`~cablexsec.mechanics.friction_law.FrictionLaw`) pass to
the direction-tied and distributed kernels; the progressive law refuses a
non-neutral law.

Shape ``(n_wires, n_steps)``. ``sigma_total = sigma_A + sigma_B + sigma_f``.
Curvatures are axial-strain-gradient components, not rotation-curvature
Expand Down Expand Up @@ -585,6 +595,12 @@ def _wire_stress_series(
raise CableInputError(
"progressive settings require friction_model='progressive'"
)
law = active_friction_law(friction_law)
if law is not None and friction_model == "progressive":
raise CableInputError(
"a friction law acts on the single spring-slider per wire; the "
"progressive law is not implemented with it"
)
if friction_model == "progressive":
# Progressive (Iwan) split of the direction-tied cap (gap G8).
if stick_modulus_Pa is None and _FAST_SLIP:
Expand Down Expand Up @@ -616,6 +632,8 @@ def _wire_stress_series(
stick_modulus_Pa=stick_modulus_Pa,
nodes_per_pitch=distributed_nodes_per_pitch,
max_increment=distributed_max_increment,
friction_law=law,
time_s=time_s,
)
elif stick_modulus_Pa is None and _FAST_SLIP:
# Compiled force recursion, identical to wire_slip_history().stress_Pa
Expand All @@ -626,6 +644,8 @@ def _wire_stress_series(
kappa_y,
contact_pressure_Pa=contact_pressure_Pa,
direction_hold_fraction=direction_hold_fraction,
friction_law=law,
time_s=time_s,
)
else:
sigma_f_kt = wire_slip_history(
Expand All @@ -635,6 +655,8 @@ def _wire_stress_series(
contact_pressure_Pa=contact_pressure_Pa,
stick_modulus_Pa=stick_modulus_Pa,
direction_hold_fraction=direction_hold_fraction,
friction_law=law,
time_s=time_s,
).stress_Pa

# sigma_A (tension) — [Nasution2014b] Eq. 5: sigma_A = E cos^2 a * N / EA_full.
Expand Down Expand Up @@ -793,6 +815,8 @@ def wire_stress_field(
curvature_gradient: tuple[FloatArray, FloatArray] | None = None,
relief: LateralRelief | None = None,
keep_friction: bool = False,
friction_law: FrictionLaw | None = None,
time_s: FloatArray | None = None,
) -> WireStressField:
"""Recover the shared stress field once, retaining all preceding slip history.

Expand Down Expand Up @@ -834,8 +858,26 @@ def wire_stress_field(
estimate of the relief); it needs ``friction_model="distributed"``, whose
bound follows the azimuth along each wire. ``None`` for all three leaves
the field of a round wire unchanged, bit for bit.

``friction_law`` (:class:`~cablexsec.mechanics.friction_law.FrictionLaw`)
sets a static/dynamic and rate-dependent coefficient of the armour
friction (direction-tied model; static/dynamic only for the distributed
model), with the sample times ``time_s`` when the law needs them. The
termination clamp increment is rate independent and is refused with a
non-neutral law. ``None`` or a neutral law leaves the field unchanged,
bit for bit.
"""
kx, ky = real_array(kappa_x, "kappa_x"), real_array(kappa_y, "kappa_y")
if (
active_friction_law(friction_law) is not None
and isinstance(termination, TerminationSpec)
and termination.anchor != "none"
):
raise CableInputError(
"the termination clamp increment is rate independent; it is not "
"combined with a non-neutral friction law"
)
friction_law_time_steps(friction_law, time_s, kx.size) # checks the time base
unrelieved_spec = layer.spec
gradient = None
if curvature_gradient is not None:
Expand Down Expand Up @@ -882,6 +924,8 @@ def wire_stress_field(
distributed_max_increment=distributed_max_increment,
progressive=progressive,
friction_out=friction_parts,
friction_law=friction_law,
time_s=time_s,
)
spec = layer.spec
increment = None
Expand Down Expand Up @@ -1109,6 +1153,8 @@ def compute_fatigue(
termination: TerminationSpec | Mapping[str, TerminationSpec] | None = None,
progressive: ProgressiveFriction | None = None,
count_from_sample: int = 0,
friction_law: FrictionLaw | None = None,
time_s: FloatArray | None = None,
) -> FatigueResult:
"""Run the per-wire fatigue pipeline over a curvature/tension history.

Expand Down Expand Up @@ -1195,6 +1241,17 @@ def compute_fatigue(
bit for bit as before). Lets a record start from the stress-free
section and drop the start-up from the damage. Not available with a
contact-life branch.
friction_law : FrictionLaw, optional
Static/dynamic and rate-dependent armour friction coefficient
(:class:`~cablexsec.mechanics.friction_law.FrictionLaw`), for the
direction-tied model and (static/dynamic only) the distributed model;
refused with the progressive model and a termination correction. The
contact-life branches keep their own rate-independent crossing
contact. ``None`` (default) or a neutral law gives the earlier
result, bit for bit.
time_s : numpy.ndarray, optional
Sample times [s] of the history, required by a law that depends on
time (slip rate or a finite healing time).

Returns
-------
Expand Down Expand Up @@ -1415,6 +1472,8 @@ def compute_fatigue(
progressive=progressive,
keep_friction=layer.component_scf is not None
and not layer.component_scf.is_identity,
friction_law=friction_law,
time_s=time_s,
)
if field.termination is not None and layer_termination is not None:
clamp_summary[name] = _clamp_summary(layer_termination, field.termination)
Expand Down Expand Up @@ -1687,6 +1746,22 @@ def compute_fatigue(
)
if clamp_summary:
prov = _termination_provenance(prov, clamp_summary)
law = active_friction_law(friction_law)
if law is not None:
prov = Provenance(
method=prov.method
+ f"; armour friction coefficient: friction law ({law.describe()})",
citations=prov.citations,
gates=(*prov.gates, "tests/test_friction_law.py"),
limitations=(
*prov.limitations,
"friction law: no rate-dependent or static/dynamic friction data "
"of armour interfaces is in the validation set; the slip rate of "
"the direction-tied kernel is a representative wire value "
"(r / |sin a| times the plastic strain rate); the crossing "
"contact branches keep the rate-independent coefficient",
),
)
if count_from:
prov = dataclasses.replace(
prov,
Expand Down
Loading
Loading