Python API

The public interface is the cablexsec namespace: import cablexsec as cx. A calculation loads a cable definition and calls a compute_*, solve_*, simulate_* or read_* entry point; every result object carries a provenance record. The tables below list the entry points; their docstrings, shown here, give the parameters, units and limitations. The Local analysis guide explains how they fit together.

Cables

cablexsec.load_cable(yaml_path, *, geometry_override=None)

Load and validate a cable definition from YAML.

Parameters:
  • yaml_path (str or pathlib.Path) – Path to the cable YAML file (e.g. cablexsec/cables/menard2023.yaml).

  • geometry_override (str, pathlib.Path or None, optional) – Path to a separate YAML file supplying withheld geometry values, deep-merged by layer name. If the path does not exist it is ignored (the definition’s null placeholders remain). None (default) applies no override. An existing override must be a readable file that supplies values; what it supplies must reach the cable (see _deep_merge_layers()).

Returns:

The schema-checked, immutable cable definition.

Return type:

CableData

Raises:
  • FileNotFoundError – If yaml_path does not exist.

  • CableSchemaError – If a file is not UTF-8 YAML with a mapping at its root and a list of layers, or if it has a top-level key other than cable, layers, aggregate_properties, environment, initial_state, core_lay, water_ingress and materials; if an existing geometry override is not a readable file, supplies nothing, holds a key other than cable (name only), layers, aggregate_properties, initial_state and core_lay, names a layer the cable does not have, or does not match the cable’s name.

  • pydantic.ValidationError – If the merged data violates the schema (out-of-range or inconsistent values, layers not listed from the axis outwards, overlapping layers).

cablexsec.menard2023_yaml_path()

Return the path to the packaged Ménard & Cartraud (2023) cable (BM1).

A fully public three-core dynamic-cable definition (Marine Structures 91, Table 1) used for benchmark BM1 (calibration-free EI_min validation).

cablexsec.iea_task49_66kv_yaml_path()

Path to the public 66 kV three-core wet-design template.

Janocha et al. (2024) 66 kV cable, the 630 mm2 reference cable of the IEA Wind Task 49 design basis; provenance in doc/template_66kv.md.

Section properties and contact state

cablexsec.compute_stiffness(cable)

Cross-section axial/torsional/bending stiffness bounds for a cable.

Assembles the axial-twist 2x2 reduction, individual bending, and parallel-axis contributions of the declared components. The no-slip stiffness with finite polymer shear compliance and the component-axis plane-section limit are returned separately. A comparison must use the same kinematic definition and material moduli on both sides. An effective core modulus does not resolve contact and slip among its internal strands.

Parameters:

cable (CableData) – A fully-specified cable.

Return type:

StiffnessResult

Raises:

CableSchemaError – If the cable geometry is not fully specified.

References

[WitzTan1992a] (axial Schur); [WitzTan1992b] (full-slip EI); [Yun2020] (ξ).

Examples

>>> from cablexsec import load_cable, compute_stiffness, menard2023_yaml_path
>>> s = compute_stiffness(load_cable(menard2023_yaml_path(),
...                                  geometry_override=None))
>>> s.ei_min_Nm2 > 0.0
True
cablexsec.solve_section_state(cable, *, tension_N=0.0, torque_Nm=0.0, prescribed_twist_per_m=0.0, p_int_Pa=0.0, p_ext_Pa=None, thermal=None, temperature_C=None, T_ref_C=20.0, temperature_dependent_modulus=True, youngs_modulus_Pa=None, initial_wire_strain=None, contact_model='qp')

Solve the section and recover layer stresses from that same solution.

A temperature input activates registered E(T) laws within their source ranges. Materials without a registered law retain their stated constant modulus; the selected laws are returned. Explicit layer moduli override E(T). Each annulus has one temperature in this reduced radial model. An explicit external pressure replaces the initial-state boundary value.

cablexsec.compute_section_properties(cable, load_cases, *, kappa_max_1_m=0.2, n_points=120, mu=None, bending_contact='bounded', annulus='flooded', torque_step_Nm=1000.0, water_density_kg_m3=1025.0, progress=None, core_friction=None, published_tolerance=0.1)

Section properties of cable at each load case.

Parameters:
  • cable (CableData) – A fully specified cable with at least one structural armour layer.

  • load_cases (sequence of SectionLoadCase) – The cases, with unique names.

  • kappa_max_1_m (float, optional) – Largest curvature of the backbones [1/m].

  • n_points (int, optional) – Points of the geometric curvature grid (the slip curvatures of every armour layer below kappa_max_1_m are added as nodes).

  • mu (float, optional) – Armour friction coefficient; None reads each armour material’s.

  • bending_contact ({"bounded", "solved"}, optional) – Contact model of the bending law: the benchmarked bounded radial chain (default, as export_bending_law()) or the solved radial section of the case.

  • annulus ({"flooded", "sealed"}, optional) – Whether an external pressure acts on every solid (flooded) or on the outer sheath only (sealed); see the module notes.

  • torque_step_Nm (float, optional) – Torque step for the torsional stiffness in each direction [N m].

  • water_density_kg_m3 (float, optional) – Sea-water density for the weight in water.

  • progress (callable, optional) – Called with the fraction done and a message (it may raise to cancel).

  • core_friction (bool or CoreFrictionSpec, optional) – The core lay stage of the bending law (module notes): passed to compute_mkappa(); True uses the default CoreFrictionSpec. The core slip curvatures are added as nodes of the curvature grid and reported per case. None or False (default) keeps the armour-only law, in which the laid cores bend about their own axes from the start. Needs one family of laid cores (a declared core lay).

  • published_tolerance (float or None, optional) – Relative difference above which a computed value is flagged against the cable’s published value (compare_published(), reported in published); None leaves the comparison out. A published value stated at a tension that no case has, twist held, is compared with a further case at that tension, solved with the same settings.

Return type:

SectionPropertiesResult

Bending and stress

cablexsec.compute_mkappa(cable, kappa_history, *, tension_N=0.0, mu=None, phi_bend=0.0, contact_model=None, section_state=None, radial_state=None, core_friction=None, friction_model='direction_tied', progressive=None, contact_pressure_Pa=None, contact_tension_history_N=None, friction_law=None, time_s=None, core_loads='follow')

Moment-curvature hysteresis of a cable over a curvature history.

Uses the physical-wire Papailiou slip-front law: slip starts at the neutral axis and propagates towards the extreme fibres. The per-layer friction-setting contact pressure P1+P2 combines the cable’s cited manufacturing state with the applied-tension increment from the selected contact solver. The physical wire return maps retain phi_bend and use uniform mean pressure on each armour population. An inner bedding-support reaction is not substituted for armour pressure. EI_min is the individual-component full-slip stiffness.

By default the pressure is that of one contact state, held over the history. contact_tension_history_N lets it follow a tension history (the contact histories of compute_fatigue() and armour_contact_histories()), and contact_pressure_Pa takes the per-sample pressure of each armour layer directly. The pressure then sets the friction bound of every wire at every sample, in the same return map as the fatigue path: the slip state is carried across the change, a falling bound clips a wire’s friction stress (friction work), and a rising bound leaves a sticking wire unchanged. With contact_tension_history_N the laid-core and filler-profile contact loads (core_friction) follow the same history by default (core_loads). The stick stiffness, EI_min, EI_max, the pressure-held part of the internal rings and the wire-yield range check stay at the reference state (tension_N, section_state or radial_state; the first sample of a tension history).

Parameters:
  • cable (CableData) – A fully-specified cable.

  • kappa_history (numpy.ndarray) – Driven curvature time series [1/m].

  • tension_N (float, optional) – Axial tension for the contact F_n [N]: the true wall tension, the force the layers carry, as tension_N of compute_fatigue(). No external pressure acts in this call, so an effective tension from a global model is converted first (sealed annulus T_e - p_o A_o, cablexsec.analysis.compression.true_wall_tension(); cablexsec.compute_section_properties() does this per load case, or pass a section_state or radial_state solved with the pressure). Without external pressure the two are equal.

  • mu (float, optional) – Armour friction coefficient (default: material mu_on_hdpe).

  • phi_bend (float, optional) – Bending-plane azimuth [rad].

  • contact_model ({"bounded", "qp", "solved"}, optional) – Contact model for per-wire normal forces. "bounded" is the default chain, used by the published bending comparisons; "qp" uses the KKT radial-compliance solver for controlled cross-model studies; "solved" uses the coupled radial contact solution (concentric and three-core, manufacturing residual wire stress included; doc/radial_model.md).

  • section_state (SectionState, optional) – Previously solved normal equilibrium. Its layer moduli and shear support are held fixed over the supplied bending history, and so are its contact pressures unless contact_pressure_Pa is given. Do not also supply tension or a conflicting contact model.

  • radial_state (CableRadialState, optional) – A solved radial state from solve_cable_radial_state(), which accepts internal/external or flooded pressure, an end-cap thrust, torque or twist, prescribed axial strain and layer temperatures. Its face pressures and line loads are held fixed over the bending history unless contact_pressure_Pa is given. Do not also supply tension, a section state or another contact model.

  • core_friction (bool or CoreFrictionSpec, optional) – Add the stick-slip law of the laid power cores against their neighbours, the filler and the surrounding ring, and of resolved internal wire rings (cablexsec.mechanics.core_friction, gap R1b). True uses the default CoreFrictionSpec. Core contact loads come from the same contact model (solved trefoil forces or the bounded estimate). None (default) keeps the armour-only law bitwise unchanged. Requires one family of laid cores.

  • friction_model ({"direction_tied", "progressive"}, optional) – Armour friction law. "direction_tied" (default) is one spring-slider per wire with the Papailiou cap. "progressive" splits every wire into parallel sub-elements whose caps average to the same cap (cablexsec.mechanics.progressive_friction, gap G8): by default the parameter-free friction-continuity density, which spreads the stick-to-slip transition of each wire; stick stiffness and full-slip moment are unchanged.

  • progressive (ProgressiveFriction, optional) – Settings of the progressive law (density, sub-elements, spread); None uses ProgressiveFriction defaults. Only with friction_model="progressive".

  • contact_pressure_Pa (dict[str, numpy.ndarray], optional) – Per-sample friction-setting pressure P1+P2 [Pa] of every structural armour layer, keyed by layer name (all of them), each the shape of kappa_history, finite and non-negative; for example the histories of armour_contact_histories() or of a sequence of solved section states. The reference state (tension_N, section_state or radial_state) supplies everything else. A history equal to the fixed pressure at every sample reproduces the fixed-pressure result bit for bit.

  • contact_tension_history_N (numpy.ndarray, optional) – Tension history [N] that sets the armour contact pressure at every sample through the selected contact model, as tension_N does in compute_fatigue(): the bounded chain is affine in tension, the qp model is solved at every distinct tension, and the solved model is exact up to 33 distinct tensions and interpolated between 33 exact solutions beyond. Non-negative, the shape of kappa_history. The reference state is the first sample; the wire-yield range check uses the largest tension. Not with tension_N, section_state, radial_state or contact_pressure_Pa.

  • friction_law (FrictionLaw, optional) – Static/dynamic and rate-dependent armour friction coefficient (FrictionLaw) of every armour wire: a static factor until a wire slips, a dynamic factor while it slips and after it until it has stuck for the healing time, and a logarithmic and viscous rate term, and a factor on the coefficient as a function of the local contact pressure (pressure_factor, evaluated at each sample’s P1+P2). Only with the direction-tied law and without core_friction. work then carries the rate-dependent dissipation in viscous_J_per_m. None (default) or a neutral law is the rate-independent law, bit for bit.

  • time_s (numpy.ndarray, optional) – Sample times [s] of kappa_history, required by a law that depends on time (a slip rate or a finite positive healing time); refused otherwise.

  • core_loads ({"follow", "reference"}, optional) – Contact loads of the laid cores and filler profiles under a contact_tension_history_N. "follow" (default) evaluates them at every sample through the same contact model (core_load_history()), so that every friction bound of the section follows the tension, as the slip scale of an exported law assumes; "reference" holds them at the first sample (the earlier behaviour). Without a tension history the loads are those of the reference state either way.

Return type:

MkappaResult

Notes

Energy under a pressure history: the pressure enters only the friction bound of each spring-slider, not its stiffness, so no material-work term arises (wire_slip_history keeps that term for a changing stiffness). A bound that drops from c0 to c1 below a slipping wire’s stress at fixed curvature releases the stored energy A cos a (c0^2 - c1^2) / (2 k) as friction work (k the stick modulus); the reported friction increment of one such step is A cos a c1 (c0 - c1) / k and the rest is the integration remainder of work, which vanishes as the change is resolved in smaller steps. A rising bound does no work.

References

[Kim2020] (friction stress); [Yun2020] (ξ); [MenardCartraud2023] (Eq. 14); [WitzTan1992b] (EI bounds); [KarlsenHusoy2026] (internal rings).

Examples

>>> import numpy as np
>>> from cablexsec import load_cable, compute_mkappa, menard2023_yaml_path
>>> cab = load_cable(menard2023_yaml_path(), geometry_override=None)
>>> r = compute_mkappa(cab, 0.05 * np.sin(np.linspace(0, 6 * np.pi, 600)))
>>> r.EI_min_Nm2 <= r.EI_max_Nm2
True
cablexsec.compute_stress(cable, kappa_x, kappa_y=0.0, *, tension_N=0.0, mu=None, thermal=None, T_ref_C=20.0, contact_model=None, section_state=None, p_int_Pa=0.0, p_ext_Pa=None, torque_Nm=0.0, prescribed_twist_per_m=0.0, friction=None)

Per-wire all-component stress at a target curvature (κ_x, κ_y).

The friction stress is the closed-form Papailiou slip-front (the same engine compute_mkappa() integrates) evaluated per physical wire at κ_mag = √(κ_x² + κ_y²) along φ_bend = atan2(κ_y, κ_x), so the assembled cable moment recovers compute_mkappa() to within per-wire discretisation (cross-engine consistency, gate A11).

Parameters:
  • cable (CableData) – A fully-specified cable.

  • kappa_x (float) – Target biaxial curvature [1/m].

  • kappa_y (float) – Target biaxial curvature [1/m].

  • tension_N (float, optional) – Axial tension for σ_A and the contact F_n [N].

  • mu (float, optional) – Armour friction coefficient (default material mu_on_hdpe).

  • thermal (ThermalResult, optional) – If given, σ_T = -E α_T (T(r_h) - T_ref_C) is the fixed-global-strain thermal increment from the radial profile; otherwise σ_T = 0 (isothermal). Use cablexsec.compute_component_response() when common axial strain and differential thermal expansion must be solved in equilibrium.

  • T_ref_C (float, optional) – Stress-free reference temperature for σ_T [°C].

  • section_state (SectionState, optional) – Reuse a normal equilibrium without prescribing separate section loads. The concentric calculation retains normal pressure, extension/twist and thermal expansion. Local bending is superposed on that normal state; bending-induced ovalisation and contact redistribution are not solved by this reduced model.

  • friction (FrictionField, optional) – The friction stress a load history left on the wires, in place of the slip front at the curvature (FrictionField); a wire is reported slipping where its friction stress has reached its slip stress.

Return type:

StressResult

Examples

>>> from cablexsec import load_cable, compute_stress, menard2023_yaml_path
>>> cab = load_cable(menard2023_yaml_path(), geometry_override=None)
>>> s = compute_stress(cab, 0.05, tension_N=1.0e4)
>>> s.critical_layer in {"inner_armour", "outer_armour"}
True
cablexsec.compute_component_response(cable, kappa_x, kappa_y=0.0, *, tension_N=0.0, mu=None, core_state='frictional', core_friction=None, thermal=None, T_ref_C=20.0, p_int_Pa=0.0, p_ext_Pa=None, contact_model=None, n_points=180, section_state=None, torque_Nm=0.0, prescribed_twist_per_m=0.0, armour=True, friction=None)

Compute the longitudinal response of every cross-section component.

Manufacturing clamping enters through the declared cable inputs. The default bounded contact approximation also accepts offset cores. The optional coupled radial calculation requires a genuinely concentric section; it must be selected explicitly with contact_model=”qp”.

Parameters:
  • mu (float, optional) – Armour friction coefficient, as in compute_stress() (default: the armour material’s mu_on_hdpe).

  • core_state ({"frictional", "stuck", "free"}) – Slip state of the laid cores in which the extremes, strains and utilisation of offset components are assessed (module notes). The stress ranges of all three states are always returned. When the core friction law cannot be built the frictional state falls back to the stuck state and the component’s basis says why.

  • core_friction (CoreFrictionSpec, optional) – Friction inputs of the laid cores (default CoreFrictionSpec, friction coefficient 0.2 for every core contact, [MenardCartraud2023] Section 5). Internal strand slip of the core law is not used here.

  • armour (bool) – Recover the armour wire stresses (default). False leaves the armour layers not assessed, for a caller that needs the other components only (component_usage_curve()).

  • friction (FrictionField, optional) – The friction a load history left on the armour wires and the laid cores, in place of the slip fronts at the curvature: the armour wire stresses (compute_stress()) and the frictional state of the laid cores take it.

Friction law

The static/dynamic, rate- and contact-pressure-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.

class cablexsec.FrictionLaw(static_factor=1.0, dynamic_factor=1.0, stick_time_s=inf, rate_coefficient=0.0, rate_reference_m_per_s=0.001, viscous_velocity_m_per_s=inf, pressure_factor=None)

Static/dynamic, rate- and pressure-dependent friction coefficient (module notes).

Parameters:
  • static_factor (float) – m_s = mu_s / mu: factor of a healed (sticking) contact, positive.

  • dynamic_factor (float) – m_d = mu_d / mu: factor while the contact slips, positive.

  • stick_time_s (float) – Healing time t_stick [s] of stick after which the static factor returns; inf (default) never heals, 0 heals after one stick step.

  • rate_coefficient (float) – c >= 0 of R(v) = 1 + c ln(1 + v/v_0) + v/v_eta.

  • rate_reference_m_per_s (float) – v_0 > 0 [m/s] of the logarithmic term.

  • viscous_velocity_m_per_s (float) – v_eta > 0 [m/s] of the viscous term (eta = b / v_eta); inf (default) has no viscous term.

  • pressure_factor (sequence of (float, float), optional) – (P [Pa], f) pairs of the factor f(P) on the coefficient at the local friction-setting pressure P = (P1 + P2) g (module notes): at least two pairs, pressures finite, non-negative and strictly rising, factors finite and positive; piecewise linear, clamped to the end factors outside the table. None (default) or a table of unit factors has no pressure dependence.

property is_neutral

True when the law reproduces the rate-independent coefficient.

property needs_time

True when the law needs the sample times of the history.

pressure_factor_at(pressure_Pa)

f(P) at the local friction-setting pressure P [Pa]: linear between the table points, the end factors outside (one without a table).

rate_factor(slip_rate_m_per_s)

R(v) at the slip rate magnitude v [m/s].

describe()

Short provenance text.

cablexsec.mechanics.friction_law.slider_history(displacement_m, bound_N, stiffness_N_per_m, *, friction_law=None, time_s=None, contact_pressure_Pa=None)

One elastic spring in series with a slider under the friction law.

The spring of stiffness k is driven by the displacement history from a stress-free start; the slider’s rate-independent bound b (constant or per sample) is scaled by the law’s factor, |f| <= m b, with the viscous term f = m_d b sign(v) + (b / v_eta) v in slip. The return map is the one of the armour kernels (module notes), here with a bound linear in the factor. None is the rate-independent slider.

contact_pressure_Pa (constant or per sample, the local pressure P of the module notes) is required by a law with a pressure factor and refused without one: the bound of each sample is then f(P) b, with b the bound at the coefficient mu (it carries the normal force, so a pressure history changes b and f(P) together).

Fatigue

cablexsec.compute_fatigue(cable, kappa_x, kappa_y, *, tension_N=None, axial_strain=None, contact_tension_N=None, contact_tension_history_N=None, mu=None, contact_model=None, thermal_stress_Pa=None, section_states=None, n_fibres=32, rainflow_counter='auto', friction_model=None, distributed_nodes_per_pitch=None, distributed_max_increment=0.1, distributed_bound='signed', copper_contact_model='slip_cycle', partial_slip_cycles='skip', termination=None, thermal=None, time_s=None, progressive=None, sn_curves=None, mean_stress=None, scf=None, count_from_sample=0, friction_law=None, wire_positions=None)

Per-wire fatigue of a cable over a biaxial curvature (and tension) history.

Assembles the FatigueLayer specs from the cable YAML (cablexsec.cable_adapters.cable_to_fatigue_layers(): bulk S-N from bulk_sn, steel slip-amplitude or copper SWT fretting routed by fretting_sn, Hertz K_t/p_0 from the opposite-laid partner layer) and runs rainflow counting and Miner summation. The selected material curve determines any mean-stress treatment; no generic Goodman correction is applied to the adopted armour stress-range curve. An omitted/empty fretting_sn explicitly selects bulk-only assessment. A requested but unknown or unavailable contact-life law raises an input error rather than silently contributing zero contact damage. Only structural helical armour is assessed. A bulk_sn or fretting_sn declared on any other layer (for example the stranded copper conductor of a three-core cable, or a metallic sheath) is not evaluated, and an armour fretting_sn without a direct crossed-wire contact has no contact damage. Each such case emits UnevaluatedFatigueCurveWarning and is appended to provenance.limitations; the damage values are unchanged. The copper SWT branch counts cycles of each crossing’s tangential force, skips cycles without slip and evaluates one SWT driver per slipping cycle (see cablexsec.analysis.fatigue.compute_fatigue()); the former one-driver-per-bulk-cycle estimate is available only through copper_contact_model="legacy_gross_sliding". The stranded conductor is assessed by compute_conductor_fatigue().

Parameters:
  • cable (CableData) – A fully-specified cable.

  • kappa_x (numpy.ndarray) – Axial-strain-gradient components [1/m], giving bending strain kappa_x*x+kappa_y*y in the material frame.

  • kappa_y (numpy.ndarray) – Axial-strain-gradient components [1/m], giving bending strain kappa_x*x+kappa_y*y in the material frame.

  • tension_N (numpy.ndarray or None, optional) – True material force [N] for the fixed-radius σ_A approximation (uses EA_fixed). Effective tension must be pressure-converted.

  • axial_strain (numpy.ndarray or None, optional) – Stress-driving axial strain for the fixed-radius uniaxial law, instead of true material force divided by the matched axial stiffness. For a linear global line model this is the direct tensile strain, not the total mean axial strain including Poisson deformation. This input does not add radial deformation or pressure redistribution. Use section_states to retain solved coupled-section stresses instead. Tension and prescribed strain are mutually exclusive inputs.

  • contact_tension_N (float or None, optional) – Explicit frozen reference tension for contact F_n [N]. When omitted and tension_N is supplied, contact pressure and normal force are refreshed over the tension history. With no tension history, zero is used. Registered contact-life laws require constant normal contact; changing force with frozen Hertz stiffness/pressure is rejected. Bulk-only assessment retains the changing normal load. A supplied frozen reference is an explicit modelling assumption, not a variable-contact solution.

  • contact_tension_history_N (numpy.ndarray or None, optional) – Force history [N] that sets the armour contact (declared manufacturing clamping plus the tension increment) while axial_strain drives the wire stress: the contact of the tension route over a prescribed-strain record, for example the strain times the axial stiffness EA_fixed it was formed with. Non-negative, the shape of the curvature histories; only with axial_strain and without contact_tension_N. With the same force on both routes the damage equals that of tension_N.

  • mu (float, optional) – Armour friction coefficient for the M-κ stress (default mu_on_hdpe).

  • section_states (sequence of SectionState, optional) – One normal equilibrium per curvature sample, obtained with solve_section_state(). Repeated states may reuse the same object. Wire mean stress, material moduli, shear support and face pressures come from these states. Bending slip is retained between samples. Tension, prescribed strain, frozen contact tension and a separate thermal stress must then be omitted. Variable normal states currently support bulk fatigue; a registered contact-life branch requires constant Hertz contact properties. The concentric qp tension interface constructs consistent normal states automatically.

  • n_fibres (int, optional) – Equally spaced material fibres around each circular wire (default 32). Each fibre is counted separately; per-wire bulk damage is the largest accumulated fibre damage. Increase this count to check angular convergence. An instantaneous stress envelope is not a fibre history.

  • wire_positions (int, sequence of float or mapping, optional) – Evaluate selected wires instead of every wire: N equally spaced positions per armour layer, explicit azimuths in degrees (the nearest wire to each; azimuth 360 k / n_wires is wire k, the convention of phi_critical_deg), or a mapping from every assessed layer name to either. Each wire’s damage equals its value in the full evaluation, bit for bit; the direction-tied model then solves only the selected wires. FatigueResult.wire_index names the rows; totals and the critical wire are over the selected wires only.

  • rainflow_counter ({"auto", "compiled", "reference"}, optional) – Rainflow counter for the bulk Miner sums. "auto" (default) uses the compiled counter when numba is active and the reference counter otherwise; both give the same damage. See cablexsec.analysis.fatigue.compute_fatigue().

  • friction_model ({"direction_tied", "auto", "distributed", "progressive"}, optional) – Armour friction-stress model. "direction_tied" (the default, None) keeps the pointwise Papailiou cap at the held bending direction. "progressive" splits each wire of that law into parallel sub-elements whose caps average to the same cap (gap G8; settings progressive, default the friction-continuity density). "distributed" solves the elastic–Coulomb friction field along the helix of each layer with the capstan bound mu |sin a| and the Yun interface stiffness xi/(1 - xi); the model and its parameters are recorded in provenance. It requires a constant stick modulus over section_states and a thermal history (one ThermalState per call). "auto" (opt-in) takes the direction-tied model for a planar curvature path and the distributed model for any other, where it applies: the direction-tied cap turns with the bending direction and under rotating curvature gives friction-stress ranges below those of the distributed model. The model of every layer is recorded in provenance. The default changes to "auto" in the next release: left at its default on a non-planar path (the only case in which the two differ), the direction-tied model warns once per call (DirectionTiedFrictionWarning, a FutureWarning, with the measured bias); the result of this release is unchanged. See cablexsec.analysis.fatigue.compute_fatigue().

  • distributed_nodes_per_pitch (int, dict[str, int] or None, optional) – Helix nodes per pitch for the distributed model (all layers or per layer; default four per wire).

  • distributed_max_increment (float, optional) – Largest curvature increment per substep of the distributed model, in units of the slip-onset curvature (default 0.1).

  • distributed_bound ({"signed", "uniform"}, optional) – Friction bound of the distributed model: "signed" (default, the capstan term on the signed bending force of the wire) or "uniform" (no capstan term).

  • progressive (ProgressiveFriction, optional) – Settings of the progressive law; only with friction_model="progressive".

  • copper_contact_model ({"slip_cycle", "legacy_gross_sliding"}, optional) – Copper SWT contact branch; "slip_cycle" (default) is the per-cycle slip-history assessment, "legacy_gross_sliding" the former estimate.

  • partial_slip_cycles ({"skip", "cattaneo_mindlin"}, optional) – Treatment of non-slipping cycles in the "slip_cycle" branch.

  • termination (TerminationSpec, dict[str, TerminationSpec] or None, optional) – Clamp correction for a section near an end fitting or a clamped bend-stiffener root (all armour layers, or per layer name): the friction stress becomes the sectional value plus the anchored-wire clamp increment along the curvature history. The lay hand of each layer comes from the cable. The anchor is rigid unless TerminationSpec.k_anchor_N_m gives its stiffness per wire. See cablexsec.analysis.fatigue.compute_fatigue() and doc/local_analysis_guide.md.

  • thermal (ThermalHistory or ThermalState, optional) – Energised analysis (opt-in). Layer temperatures on the slow time scale are coupled one way into the solved radial contact state (free thermal strain and registered polymer E(T): clamping P1+P2, friction caps and crossing loads), into the stick stiffness through the Yun coefficient and into the wire stress (sigma_T at fixed tension). The state is frozen within each slow-time block; the slip state is carried across blocks. Requires contact_model="solved" (the default when thermal is given). All layers at T_ref reproduce the unenergised solved result bit for bit. See cablexsec.analysis.thermal_coupling and compute_thermal_fatigue() for block-weighted damage.

  • time_s (numpy.ndarray, optional) – Sample times [s] of the curvature record, placing it on the slow time axis of a multi-node ThermalHistory, and the time base of a time-dependent friction_law. Refused when neither uses it.

  • sn_curves (dict[str, str or SNcurve], optional) – Bulk S-N curve per armour layer name, replacing the layer’s bulk_sn (a registered name, see cablexsec.materials.sn_curves.register_sn_curve(), or a curve).

  • mean_stress (MeanStressSpec, str or dict, optional) – Mean-stress correction of the bulk cycles, for every layer or per layer name (cablexsec.materials.mean_stress). A method name ("goodman", "gerber", "soderberg", "swt", "dnv_base", "dnv_pwht") takes the strength of the layer’s library material with its citation. None (default) counts the unmodified ranges, bit for bit as before.

  • scf (ComponentSCF or dict, optional) – Stress concentration factors of the axial, friction and local bending parts, mean and dynamic, for every layer or per layer name (ComponentSCF).

  • count_from_sample (int, optional) – Lead-in: the friction state runs through the whole history from the stress-free section, and the bulk cycles are counted from this sample on (default 0, every sample, bit for bit as before). Not available with a contact-life branch or with section_states.

  • friction_law (FrictionLaw, optional) – Static/dynamic and rate-dependent armour friction coefficient (FrictionLaw), with the sample times time_s when it depends on time: the direction-tied model takes every option, the distributed model the static/dynamic option; refused with the progressive model and a termination correction. A pressure factor of the law follows the contact pressure of every sample (both models). The crossing contact-life branches keep their rate-independent coefficient. None (default) or a neutral law gives the earlier result, bit for bit.

Return type:

FatigueResult

References

[ASTM E1049]; [Miner1945]; [DNVGL-RP-C203]; [Perier2009]; [Poon2022]; [Poon2023].

Examples

>>> import numpy as np
>>> from cablexsec import load_cable, compute_fatigue, menard2023_yaml_path
>>> cab = load_cable(menard2023_yaml_path(), geometry_override=None)
>>> k = 0.02 * np.sin(np.linspace(0, 20 * np.pi, 400))
>>> res = compute_fatigue(cab, k, np.zeros_like(k))
>>> res.critical_layer in {"inner_armour", "outer_armour"}
True
cablexsec.compute_long_term_fatigue(cases, *, exposure_years, design_fatigue_factor=1.0, seconds_per_year=31557600.0, damage_basis='bulk')

Accumulate stationary fixed-fibre damage rates before choosing the maximum.

At each material point, annual damage is seconds_per_year * sum(probability * record_damage / duration_s). Probabilities must sum to one within 1e-12; missing conditions are neither silently normalised nor assigned zero damage. No rainflow cycles are joined across records. These must represent independent stationary exposures, not chunks of one continuous history with uncounted boundary cycles.

damage_basis='bulk' retains the unamplified bulk assessment. Explicitly select 'bulk_with_termination' to use each record’s fixed-fibre field counted at SCF-amplified stress ranges. Every record must contain that field with the same layer/wire/fibre layout as its bulk field. No factor is applied again, and neither wire maxima nor wire-level termination adjustments are accumulated. The caller’s assessment identity must include the SCF model. Fretting remains excluded because its wire-level indicator does not establish a coincident material point or a validated combined damage law. The chosen design factor is caller policy, not a code-compliance assertion.

cablexsec.compute_conductor_fatigue(cable, kappa_x, kappa_y, *, tension_N=None, layer_name=None, mu_wire=None, mu_outer=None, reference_tension_N=None, external_pressure_Pa=0.0, pressure_transmission='outer_interface', n_orientations=8, partial_slip_cycles='skip', rainflow_counter='auto', trellis_fretting=False, trellis_model='critical_distance', critical_distance=None, contact_yield_Pa=300000000.0, contact_pressure_factor=3.0, strain_life=None, strain_life_correction='swt', sn_curve=None, mean_stress='swt', scf=None)

Strand-slip fatigue of a resolved stranded conductor.

The conductor layer (a cylindrical_offset layer with resolved strand_layers) is assessed ring by ring with the multilinear stick-slip operator of [KarlsenHusoy2026]; the default damage is the bulk wire-stress S-N count (bulk_sn), which reproduces four of the five published Nasution conductor test groups within a factor of 3. Per-slip-cycle SWT fretting at the trellis contacts of oppositely laid rings (cablexsec.analysis.conductor_fatigue.assess_conductor_fatigue()) is evaluated only with trellis_fretting=True and the layer’s fretting_sn. It is not validated: it predicts the dry tests one to two orders of magnitude short and does not resolve the bending radius (gap 1.3c), and requesting it emits UnvalidatedModelWarning. A fretting_sn declared but not requested emits UnevaluatedFatigueCurveWarning. The conductor axis follows the cable curvature; the axial strain is the tension divided by the cable’s fixed-end axial stiffness. The power core is taken in full slip inside the cable (no core-level stick order).

Parameters:
  • cable (CableData) – A fully specified cable with a resolved stranded conductor.

  • kappa_x (numpy.ndarray) – Curvature history [1/m].

  • kappa_y (numpy.ndarray) – Curvature history [1/m].

  • tension_N (numpy.ndarray or None, optional) – True material force history [N].

  • layer_name (str or None, optional) – Conductor layer; defaults to the only layer with resolved strands that declares a bulk_sn curve.

  • mu_wire (float or None, optional) – Wire-wire friction; defaults to the library mu_on_cu of the conductor material. [Nasution2014b] and Hu et al. (2022) use 0.2.

  • mu_outer (float or None, optional) – Friction on the conductor surface; defaults to mu_wire.

  • reference_tension_N (float or None, optional) – Tension for the friction parameters and crossing forces (default: the largest absolute tension of the history).

  • external_pressure_Pa (float, optional) – Contact pressure of the conductor screen on the conductor surface.

  • pressure_transmission ({"all_interfaces", "outer_interface"}, optional) – Transmission of that pressure to inner interfaces.

  • n_orientations (int, optional) – Azimuths per ring (default 8).

  • partial_slip_cycles ({"skip", "cattaneo_mindlin"}, optional) – Treatment of fretting cycles without slip.

  • rainflow_counter ({"auto", "compiled", "reference"}, optional) – Counter for the bulk Miner sums.

  • trellis_fretting (bool, optional) – Add the trellis SWT fretting damage (default False; not validated).

  • contact_yield_Pa (float or None, optional) – Wire yield stress for the trellis pressure limit (default 300 MPa, [Nasution2014b] Fig. 9); None keeps the elastic Hertz pressure. Used only with trellis_fretting=True.

  • contact_pressure_factor (float, optional) – Pressure limit over the yield stress (default 3, [Johnson1985] §6.3).

  • strain_life (str, StrainLifeConstants or None, optional) – Gap P7: strain-life constants (for example "copper_poon2022" or "copper_annealed_mus_derived") for an additional strain-life damage of the outer-fibre strain (D_strain_life_per_ring; Masing cyclic curve), which assesses ranges above the wire yield. None (default) leaves the result unchanged.

  • strain_life_correction ({"swt", "morrow", "none"}, optional) – Mean-stress correction of the strain-life route.

  • sn_curve (str or SNcurve, optional) – Bulk curve replacing the layer’s bulk_sn (a registered name or a curve).

  • mean_stress (MeanStressSpec or str or None, optional) – Mean-stress correction of the bulk cycles (cablexsec.materials.mean_stress; a method name takes the strength of the conductor material). Default "swt": every cycle is mapped to the stress ratio of the bulk curve by the Smith-Watson- Topper correction, the configuration that reproduces the Nasution conductor tests (gap CF2, doc/benchmarks.md). None counts the unmodified ranges (the behaviour before gap CF2).

  • trellis_model ({"critical_distance", "surface_swt"}, optional) – Trellis rule used with trellis_fretting=True. The default is the point method of critical distances (CriticalDistanceSpec), which needs no fretting_sn; "surface_swt" is the per-slip-cycle surface rule of gap 1.3c (not validated; needs fretting_sn).

  • critical_distance (CriticalDistanceSpec, optional) – Threshold, material length and sampling of the critical-distance rule (default: the class defaults).

  • scf (ComponentSCF, optional) – Factors on the axial part (axial factors) and on the stick-slip bending strain of the operator (friction factors), mean and dynamic.

Return type:

ConductorFatigueResult

Raises:

CableSchemaError – If no resolved conductor exists, bulk_sn is missing or not a stress-range curve, fretting_sn names no registered SWT constants, or trellis_fretting=True without a fretting_sn.

cablexsec.analysis.fatigue.curvature_path_out_of_plane_ratio(kappa_x, kappa_y)

Out-of-plane extent of a curvature path, relative to its curvature range.

A planar history keeps one bending plane: every sample (kappa_x, kappa_y) lies on one line through the origin. The line is the principal axis of the second moment sum k k^T of the samples about the origin (not about their mean: the bending plane passes through the straight cable). The ratio is the largest distance of a sample from that line over the smaller of the largest curvature magnitude and the largest distance of a sample from the mean curvature: zero for a planar path in any plane, a static offset in the plane included, one for a circle, b/a for an ellipse of semi-axes a >= b centred on the origin. The second scale keeps a static bend from hiding the cycles about it: a static curvature with small cycles normal to its plane is as far from planar as the cycles are large, not as small as they are against the static bend. A range below 1e-2 of the largest curvature is judged against that floor, so that the rounding of a nearly constant curvature in output files (six significant digits: at most 7.1e-4) stays planar; cycles normal to a static bend then count from 1e-5 of it. A zero history returns zero.

Thermal

cablexsec.compute_thermal(cable, current_A, conductor_area_m2, *, n_cores=None, conductor_material=None, conductor_temp_C=90.0, y_s=0.0, y_p=0.0, lambda1=0.0, T4_external_Km_W=None, ambient_C=None, lambda2=0.0)

Steady-state IEC 60287 conductor temperature for a cable definition.

Assembles the concentric conduction ladder from the cable’s annular layers (each with r_inner_m/r_outer_m and a material conductivity) and closes it with the external Robin resistance T4 from the cable’s environment block (or the override argument). The ladder is split as in [IEC60287-1-1] 1.4.1.1 Eq. 1: T1 is the resistance between the conductor and the metallic sheath/screen, T2/T3 the resistance outside it ([IEC60287-2-1] for the annulus resistances). The conductor temperature follows iec_conductor_temperature() ([Poradowski2025] Eq. 2).

The conductor Joule loss is W_c = I^2 R_ac per conductor with R_ac from ac_resistance() at conductor_temp_C (skin/proximity y_s, y_p supplied by the caller via skin_effect_factor() / proximity_effect_factor()); dielectric loss is added above 100 kV.

Radial profile

The returned T(r) is piecewise logarithmic, with the heat flow through each annulus carrying the losses generated inside it (see _layer_heat_flows()): W_c + ½W_d per core between the conductor and the sheath, W_c(1+λ1) + W_d per core outside the sheath, n times that through layers common to all cores. Integrating inward from the surface temperature θ_a + W_tot T4 (W_tot = n[W_c(1+λ1) + W_d]) therefore returns exactly θ_c at the conductor surface. The sheath radius is the inner radius of the first metallic layer (a cylindrical_shell, or an annulus with λ ≥ 10 W/(m·K)) outside the insulation; per-core metallic layers take precedence over cable-level ones. The insulation is identified from the layer stack, not from layer names: it is the run of non-metallic annuli that starts at the first non-metallic annulus outside the conductor (in the per-core stack of a multi-core cable) and ends at the next metallic layer. If no metallic layer follows it, the split of T1 and T2 is undefined: a call with a dielectric loss or lambda1 > 0, which depend on the split, is refused; without them the split does not change the result. Metallic shells and helical armour carry no conduction resistance in the ladder (temperature continuous across them). For a multi-core cable r_m runs over the per-core radii (from the core axis) and then over the cable-level radii (from the cable axis).

Armour temperature

T_armour_C is the profile temperature at the helix radius of the innermost structural helical layer. A cable without a structural helical layer has no armour temperature (NaN, recorded in the provenance); a structural helical layer without r_helix_m is refused.

Conductor material

Without conductor_material the material of the cable’s conductor layer is used: the cylindrical_offset layer at the core centre (r_inner_m = 0), else the helical_stranded layer. A cable with no such layer, or with several of different materials, needs conductor_material. The choice is recorded in the provenance.

Interstitial filler (multi-core cables)

A cable-level layer with r_inner_m = 0 in a cable with more than one core is the filler around the cores, not a heat source. It is not dropped: until the [IEC60287-2-1] filler/bedding geometric factor is implemented, it is represented by the annulus of equal filler area, √n_geo · r_core ≤ r ≤ r_outer, with r_core the largest per-core outer radius and n_geo the number of cores. This explicit approximation is recorded in the provenance limitations. As an order-of-magnitude check only (filler conductivity of [Poradowski2025] not stated), the CIGRE TB 880 geometry (touching cores of 65.9 mm radius in a 141.95 mm filler, library pp_filler and hdpe) gives 0.166 K·m/W for filler plus armour bedding, about 1.5 times the tabulated T2 = 0.1121 K·m/W of [Poradowski2025] Table 1, i.e. on the high (conservative) side; the previous behaviour (filler omitted) gave about 0.008. A per-core layer with r_inner_m = 0 (and any such layer of a single-core cable) is the conductor, the heat source, and is excluded from the ladder.

Three-core reduction gate

With n_cores = 1, no dielectric loss and lambda1 = 0 the ladder collapses to θ_a + W_c (ΣR_internal + T4) — i.e. exactly the 1-D primitive steady_state_profile() evaluated on the same annuli with the cable surface raised by W_c T4. The three-core mutual-heating geometric factor of [IEC60287-2-1] is not applied; for n_cores > 1 the result follows the lumped IEC ladder, and the geometric correction is left as a documented refinement.

Limitations

The armour loss factor λ2 ([IEC60287-1-1] 2.4) is not computed: it is the caller’s lambda2 (default 0, armour losses then absent from the heat flow through T3 and T4 and from P_total_W_m), released at the armour radii in equal shares. The sheath eddy-current loss λ1'' is not computed (lambda1 is whatever the caller supplies).

param cable:

Cable whose concentric annuli define the conduction ladder.

type cable:

CableData

param current_A:

Conductor current [A].

type current_A:

float

param conductor_area_m2:

Conductor cross-sectional area [m²] for R_dc.

type conductor_area_m2:

float

param n_cores:

Number of loaded conductors n. Defaults to the count of cylindrical_offset cores, else 1.

type n_cores:

int, optional

param conductor_material:

Material key for rho_ohm_m and alpha_R_per_K; defaults to the material of the cable’s conductor layer (see above).

type conductor_material:

str, optional

param conductor_temp_C:

Temperature at which R_ac is evaluated [°C] (default 90 = XLPE max).

type conductor_temp_C:

float, optional

param y_s:

Skin and proximity factors (default 0 = DC limit).

type y_s:

float, optional

param y_p:

Skin and proximity factors (default 0 = DC limit).

type y_p:

float, optional

param lambda1:

Sheath loss factor (default 0).

type lambda1:

float, optional

param T4_external_Km_W:

Override the cable environment block.

type T4_external_Km_W:

float, optional

param ambient_C:

Override the cable environment block.

type ambient_C:

float, optional

param lambda2:

Armour loss factor ([IEC60287-1-1] 2.4; default 0), released at the radii of the structural armour layers in equal shares.

type lambda2:

float, optional

Global results

cablexsec.read_series_csv(path)

Read the canonical exchange CSV written by write_series_csv().

cablexsec.read_time_history_csv(path, *, time_col='Time', curvature_x_col='x curvature', curvature_y_col='y curvature', tension_col='Wall tension', temperature_col=None, axial_strain_col=None, curvature_convention='rotation', tension_kind=None, axial_strain_kind=None, curvature_scale_to_1_m=1.0, tension_scale_to_N=1000.0, axial_strain_scale=0.01)

Read a time-history CSV export into a LoadCaseSeries.

Column names are matched case-insensitively on whole words, with runs of white space treated as one space. A heading equal to the selector is taken first, otherwise a heading containing the selector’s words in sequence (exports often append units and object names, e.g. "Effective Tension (kN)"). The selection must be unique. A curvature component may not be taken from a heading that denotes a magnitude or an extreme (max, min, magnitude, abs, resultant). Every data row must have as many fields as the header; blank lines are skipped.

Parameters:
  • path (str or pathlib.Path) – Time-history CSV export.

  • time_col (str) – Heading words selecting the required columns.

  • curvature_x_col (str) – Heading words selecting the required columns.

  • tension_col (str) – Heading words selecting the required columns.

  • curvature_y_col (str or None, optional) – Second signed curvature component. None explicitly declares the omitted input component zero. A requested but absent column is an error.

  • curvature_convention (str, optional) – Native right-handed rotation components (default) are mapped to the strain gradient (-y curvature, x curvature), fibre strain k_x*y - k_y*x. Use strain_gradient only for already transformed, signed input. Curvature magnitude cannot retain reversals.

  • tension_kind (str or None, optional) – Inferred from recognised wall/true/effective-tension headings. A custom heading needs an explicit kind before fatigue. An override cannot contradict a recognised native heading.

  • axial_strain_col (str or None, optional) – Optional strain column. Direct/total native headings retain their kind; custom headings need an explicit kind before fatigue.

  • axial_strain_kind (str or None, optional) – Optional strain column. Direct/total native headings retain their kind; custom headings need an explicit kind before fatigue.

  • temperature_col (str or None, optional) – Heading words selecting a temperature column; None → isothermal.

  • curvature_scale_to_1_m (float, optional) – Multiplier from the file’s curvature unit to 1/m (1.0 for rad/m; use e.g. 1e3 for 1/mm).

  • tension_scale_to_N (float, optional) – Multiplier from the file’s tension unit to N (default 1e3 for kN).

  • axial_strain_scale (float, optional) – Multiplier to dimensionless strain (default 0.01 for native percent).

Return type:

LoadCaseSeries

cablexsec.read_riflex_ascii(path, *, time_col=1, curvature_x_col=2, tension_col=3, curvature_y_col=None, temperature_col=None, comment_prefixes=('#', '%', '!'), curvature_scale_to_1_m=1.0, tension_scale_to_N=1.0, tension_kind='unspecified', curvature_convention='strain_gradient')

Read a RIFLEX ASCII time-history into a LoadCaseSeries.

Parameters:
  • path (str or pathlib.Path) – RIFLEX ASCII results file.

  • time_col (int) – 1-based column indices of the required quantities.

  • curvature_x_col (int) – 1-based column indices of the required quantities.

  • tension_col (int) – 1-based column indices of the required quantities.

  • curvature_y_col (int or None, optional) – 1-based indices of the optional out-of-plane curvature / temperature; None → planar / isothermal.

  • temperature_col (int or None, optional) – 1-based indices of the optional out-of-plane curvature / temperature; None → planar / isothermal.

  • comment_prefixes (tuple[str, ...], optional) – Line prefixes treated as comments and skipped.

  • curvature_scale_to_1_m (float, optional) – Multipliers from the file’s units to 1/m and N.

  • tension_scale_to_N (float, optional) – Multipliers from the file’s units to 1/m and N.

  • tension_kind (str, optional) – Declare true or effective tension from the selected result definition. An unlabelled positional column is not assumed to be material force.

  • curvature_convention (str, optional) – Selected signed columns are strain gradients by default. Choose rotation for right-handed rod rotation components (fibre strain k_x*y - k_y*x); the reader then maps them to the section strain gradient (-k_y, k_x). Verify the source convention.

Return type:

LoadCaseSeries

cablexsec.read_cabledyn_sections(out_root, deck, sections, *, line_id=1, frame='arc', curvature_source='auto', tangent_placement='auto', reference_vector=(0.0, 0.0, 1.0), pressure='hydrostatic', window_nodes=3, tension_source='auto', curvature_check_rtol=0.05, curvature_check_end_rtol=0.25, curvature_check_atol_1_m=None, chunk_rows=4096, hang_off_rotation=None)

Read the histories of named material sections from one CableDyn run.

Parameters:
  • out_root (str or pathlib.Path) – Output root given to the driver (<root>.out and its line files) or the OpenFAST root (<root>.CD.out).

  • deck (str, pathlib.Path or CableDynDeck) – The deck that produced the run.

  • sections (mapping of str to float) – Section name -> unstretched arc length from End A [m].

  • line_id (int) – Deck LINES id.

  • frame ({"arc", "section"}) – Twist-free transport of the section axes (module notes).

  • curvature_source ({"auto", "tangent", "positions", "components"}) – "auto" uses the tangent channels when every section has them and positions otherwise; the choice is recorded. "components" takes CableDyn’s CurvX<L>N<J>/CurvY<L>N<J> (finite-EI lines) on CableDyn’s section axes (module notes); a section on a deck node needs that node’s channels only.

  • tangent_placement ({"auto", "chord"}) – Where the Dec/Azi values sit along the line. "auto" (CableDyn 0.4.2 and later): at the node on a finite-EI line, at the mid-arc of the chord on an EI = 0 line. "chord": at the mid-arc of the chord on every line, for the output of CableDyn 0.4.1 and earlier. The placement is recorded in checks.

  • reference_vector (sequence of 3 floats) – Seed vector a of the frame (default global +z).

  • pressure ({"hydrostatic", "none"}) – External pressure model; "none" declares p_o = 0 explicitly.

  • window_nodes (int) – Nodes on each side of the section in the curvature spline.

  • tension_source ({"auto", "segments", "nodes"}) – "segments": element-midpoint axial forces of .Line<L>.t.out, linear between element mid-arcs; "nodes": Ten<L>N<J> channels (length-weighted element means; an end node carries the end force), linear between nodes. "auto" uses the segment file when written.

  • curvature_check_rtol – Tolerance of the check against Curv<L>N<J> channels: interior and end nodes relative to the node’s largest curvature, plus an absolute floor (default 2e-5 1/m from tangents, three times the estimated resolution from positions).

  • curvature_check_end_rtol – Tolerance of the check against Curv<L>N<J> channels: interior and end nodes relative to the node’s largest curvature, plus an absolute floor (default 2e-5 1/m from tangents, three times the estimated resolution from positions).

  • curvature_check_atol_1_m – Tolerance of the check against Curv<L>N<J> channels: interior and end nodes relative to the node’s largest curvature, plus an absolute floor (default 2e-5 1/m from tangents, three times the estimated resolution from positions).

  • chunk_rows (int) – Rows per streamed chunk.

  • hang_off_rotation (array_like or "none", optional) – How the holder of a line restrained in torsion at End A turns (module notes, Hang-off rotation): (n_rows, 3, 3) attitude matrices of the holder (global from holder axes, the axes of End A’s END CONNECTIONS Ez and Nx), or (n_rows,) its roll about the End A tangent [deg], right-handed about the End A -> End B tangent; or "none", the holder declared still. None (default) takes a Fixed holder as still and a Body<N> holder from its Body<N>Rx/Ry/Rz channels, and refuses a vessel, platform or turbine holder, whose turn the output does not record. Only a line CableDyn solves in torsion with End A restrained takes it.

Return type:

CableDynRead

cablexsec.read_cabledyn_range_graph(path)

Read a CableDyn range file <root>.Line<L>.range.out.

The layout is CableDyn’s (doc/outputs.rst, range graphs): a title naming the line, the sample count and the window, a header row Node ArcLength followed by <Quantity>Min Max Mean triples, a units row and one row per node. Every part is checked: the title, the column names and their order, the units, consecutive node numbers from 1, finite values, an arc length that starts at 0 and increases, Min <= Mean <= Max at every node (within the last printed digit) and, when the file name carries Line<L>, the same line id as the title.

Raises:
  • FileNotFoundError – If the file does not exist.

  • CableSchemaError – If the file is not a complete CableDyn range file.

cablexsec.read_cabledyn_lift(path, *, nodes=None, chunk_rows=4096)

Read a CableDyn VIV lift file <root>.Line<L>.V.out.

Parameters:
  • path (str or pathlib.Path) – The lift file.

  • nodes (sequence of int, optional) – Mesh nodes to read (1 = End A); every node by default. A long run of a fine mesh holds rows x nodes x 3 values.

  • chunk_rows (int) – Rows per streamed chunk.

  • title (The)

  • header (the optional # DeckNode line and the)

  • are (Time(s) Node<J>LiftX(N) Node<J>LiftY(N) Node<J>LiftZ(N) ...)

  • finite (checked against CableDyn's layout; every row must be complete and)

  • step. (and the time must increase with a uniform)

Raises:
  • FileNotFoundError – If the file does not exist.

  • CableSchemaError – If the file is not a complete CableDyn lift file, or nodes names a node it does not hold.

cablexsec.run_sea_state_batch(cable, runs, sections, *, options=None, output_directory=None, cable_source=None, capacity=None)

Weighted annual armour damage of named sections over CableDyn runs.

Parameters:
  • cable (CableData) – The local cross-section.

  • runs (sequence of SeaStateRun) – CableDyn runs; probabilities must sum to one.

  • sections (sequence of SectionRequest) – Material sections by arc length from End A.

  • options (SeaStateBatchOptions, optional) – Reader, fatigue and aggregation options.

  • output_directory (str or pathlib.Path, optional) – New directory for the manifest, summary, section histories and annual damage fields. It must not exist.

  • cable_source (str or pathlib.Path, optional) – The cable YAML, digested into the manifest.

  • capacity (CapacityBatchCheck, optional) – Capacity check of every section and run: utilisation histories, maxima and their times, exceedances, the minimum bend radius check and Gumbel extremes per group of seeds (cablexsec.analysis.capacity_check). None (default) leaves the results and the manifest unchanged.

Return type:

SeaStateBatchResult