File formats
CableXSec reads a cable definition, the load histories of a global analysis and its own project files. It writes projects and bending laws for global analysis. Each file below is given with its layout, its units and the rules it is checked against.
File |
Read by |
Written by |
Format |
|---|---|---|---|
Cable definition |
|
(by hand) |
YAML |
Geometry override |
|
(by hand) |
YAML |
Time-history CSV export of a global analysis |
|
global analysis program |
CSV, named columns |
CableXSec exchange CSV |
|
|
CSV, fixed columns |
RIFLEX ASCII time history |
|
RIFLEX |
whitespace-separated columns |
CableDyn run (driver or OpenFAST module) |
|
CableDyn |
CableDyn output files and deck |
CableDyn 0.4.0 station table |
|
CableDyn |
CSV, tab or whitespace |
Sea-state batch specification |
|
(by hand) |
JSON |
Project |
|
|
JSON |
Hysteretic bending law |
— |
|
CSV, JSON |
Every file follows three rules
Units are SI. A key or column name carries its unit as a suffix: _m,
_Pa, _N, _s, _1_m (1/m), _deg. Angles in a cable file are in
degrees; the loaded layers also give them in radians.
Text is UTF-8. YAML, JSON and project files are UTF-8. The CSV and RIFLEX readers accept UTF-8, with or without a byte-order mark, and Windows-1252.
A bad file stops with a named error. A file that cannot be read as
specified never gives a partial or approximate result. A missing file raises
FileNotFoundError. A layout problem raises CableSchemaError, which names
the file, the column or the line. A value that breaks the cable schema
raises pydantic.ValidationError, and an invalid project or batch file
raises CableInputError.
Cable definition (YAML)
A cable is one YAML file whose root is a mapping. cx.load_cable(path) reads
it, validates it against the schema in cablexsec/cables/schema.py and returns
an immutable CableData. The bundled definitions, such as
cx.menard2023_yaml_path() and cx.iea_task49_66kv_yaml_path(), are complete
examples with a cited source for every value. Section 4.1 of the
local analysis guide lists them all.
Top-level blocks
Block |
Required |
Content |
|---|---|---|
|
yes |
metadata: |
|
yes |
list of layers from the centre outwards |
|
no |
thermal boundary: |
|
no |
uniform pressure on the assembled cable before loading: |
|
no |
|
|
no |
assembly lay of offset cores: |
|
no |
published values for comparison, never inputs: |
|
no |
materials of this cable (below) |
An unknown key is an error at every level: at the top, inside the blocks and inside the layers. A mistyped key is reported, never ignored.
A non-zero initial_state.external_pressure_Pa needs an identification
(measured, manufacturing_specification, published_calibration,
identified or assumed_bound) and a source. assumed_bound also needs
bounds_Pa. A wet design may not contain a radial metallic water barrier,
that is a cylindrical_shell or a lead or aluminium sheath. A dry design
must contain one.
Layers
Every layer has these keys:
Key |
Required |
Meaning |
|---|---|---|
|
yes |
unique within the cable |
|
yes |
|
|
yes |
a key of the cable’s |
|
no |
where the values come from; free text |
|
no |
|
|
no |
stress-range factor at an end fitting (default 1.0) |
The geometry keys below may be written as null when they are withheld, as
described under Withheld geometry. Every analysis needs
them filled.
|
Geometry an analysis needs |
Optional keys |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lay_angle_deg lies between −90° and 90°. A rectangular or profiled wire
fills in d_wire_m as the diameter of the round wire of the same area. A
given value must agree with it, and a layer whose wires overfill the
circumference is rejected.
bulk_sn and fretting_sn name registered S–N curves. An empty fretting_sn
selects bulk fatigue only, and an unknown or blocked name stops the analysis.
Sections 4.1, 4.2 and 13 of the local analysis guide describe the optional
keys.
Manufacturing clamping
The contact pressure that an armour layer carries at zero tension is declared on the layer:
manufacturing_clamping:
initial_contact_pressure_Pa: 2.0e6 # or armour_winding_stress_Pa
basis: representative
source: "Representative pressure jump P0; not a manufacturer value"
Key |
Meaning |
|---|---|
|
the radial pressure jump |
|
residual wire stress from stranding [Pa], converted to a pressure jump |
|
|
|
required |
Exactly one of the two values is given. not_published requires the value
zero, and analyses that depend on the friction then warn with
MissingClampingStateWarning. The legacy keys pretension_Pa and
winding_stress_Pa still load. Section 4.4 of the local analysis guide
covers the clamping state in full.
Materials with sources
A layer’s material names a material of the library
(cablexsec.materials.library.list_materials()) or of the cable’s own
materials block. A cable material with the key of a library material
replaces it for that cable only. Every property is a value and its source:
materials:
supplier_hdpe:
polymer: true
E_Pa: {value: 9.0e8, source: "supplier data sheet"}
nu: {value: 0.46, source: "model assumption"}
A property may also state its unit, which must then be the SI unit below.
polymer: true applies the polymer rules, temperature warnings and
relaxation. temperature_law names a registered law of the modulus against
temperature, scaled to E_Pa.
Property |
Unit |
Property |
Unit |
|---|---|---|---|
|
Pa |
|
– |
|
Pa |
|
– |
|
Pa |
|
– |
|
Pa |
|
1/K |
|
– |
|
W/(m K) |
|
kg/m³ |
|
J/(m³ K) |
|
– |
|
Ω m |
|
Pa |
|
1/K |
|
– (a ratio) |
|
– |
Values outside the admissible range of a property are rejected. Materials and
S–N curves can also be registered for a session with cx.register_material
and cx.register_sn_curve.
Withheld geometry
A definition may write a geometry value that cannot be shared as null and
supply it at load time from a second YAML file:
cable = cx.load_cable("cable.yaml", geometry_override="geometry.yaml")
The override mirrors the layers list. Its layers are matched by name, and
their keys replace those of the definition. It may also hold
aggregate_properties, initial_state and core_lay, and a cable.name
that must match the definition. Anything else is refused with the item
named: a layer name that is not in the definition, an unknown or misspelt key,
a layer given twice, a layer_type that differs from the definition, or an
override that supplies nothing. It never adds layers.
An override path that does not exist is ignored and the null values stay in
place. cable.missing_fields() lists them, and analyses refuse a cable that
is not fully specified.
A minimal complete definition
The bundled 33 kV single-core template
(cx.inter_array_single_core_yaml_path()), without its comments and notes:
cable:
name: "Single-core inter-array 33 kV (public representative)"
description: "33 kV single-core dynamic inter-array cable, polymer sheath"
manufacturer: "Public representative template"
source_document: "Representative public geometry (topology template)"
voltage_kV: 33
design_life_years: 25
MBR_dynamic_m: 2.5
environment:
ambient_C: 15.0
T4_external_Km_W: 0.5
frequency_Hz: 50.0
source: "Representative seabed boundary (topology template)"
layers:
- name: cu_conductor
layer_type: cylindrical_offset
material: copper_stranded
n_cores: 1
r_offset_m: 0.0
r_inner_m: 0.0
r_outer_m: 0.0097720502380584
conductor_area_mm2: 300.0
construction: aligned_solid_equivalent
source: "Representative"
- name: conductor_screen
layer_type: cylindrical_offset
material: xlpe_qiao2025
n_cores: 1
r_offset_m: 0.0
r_inner_m: 0.0097720502380584
r_outer_m: 0.01077
source: "Representative; thermal treatment [IEC60287-2-1]"
- name: xlpe_insulation
layer_type: cylindrical_offset
material: xlpe_qiao2025
n_cores: 1
r_offset_m: 0.0
r_inner_m: 0.01077
r_outer_m: 0.01877
electrical:
permittivity_relative: 2.3
loss_factor_tan_delta: 0.0004
vec_exponent_n: 15.0
thermal_b_k: 12430
vec_synergism_b: 4420
field_threshold_kV_mm: 5.0
source: "Representative; electrical [Mazzanti2007] Table I (XLPE)"
- name: insulation_screen
layer_type: cylindrical_offset
material: xlpe_qiao2025
n_cores: 1
r_offset_m: 0.0
r_inner_m: 0.01877
r_outer_m: 0.01977
source: "Representative; thermal treatment [IEC60287-2-1]"
- name: cu_screen
layer_type: cylindrical_offset
material: copper_tape_screen
n_cores: 1
r_offset_m: 0.0
r_inner_m: 0.01977
r_outer_m: 0.02047
structural: false
source: "Representative"
- name: hdpe_bedding
layer_type: cylindrical
material: hdpe
r_inner_m: 0.02047
r_outer_m: 0.02247
source: "Representative"
- name: inner_armour
layer_type: helical
material: galvanised_steel_armour
n_wires: 34
d_wire_m: 0.004
r_helix_m: 0.02447
lay_angle_deg: 25.0
lay_direction: right_hand
manufacturing_clamping:
initial_contact_pressure_Pa: 2.0e6
basis: representative
source: "Representative pressure jump P0 of this demonstration template; not a manufacturer or published value"
fretting_sn: ""
bulk_sn: saevik_2011_flat_steel
source: "Representative"
- name: outer_armour
layer_type: helical
material: galvanised_steel_armour
n_wires: 40
d_wire_m: 0.004
r_helix_m: 0.02847
lay_angle_deg: 25.0
lay_direction: left_hand
manufacturing_clamping:
initial_contact_pressure_Pa: 2.0e6
basis: representative
source: "Representative pressure jump P0 of this demonstration template; not a manufacturer or published value"
fretting_sn: ""
bulk_sn: saevik_2011_flat_steel
source: "Representative"
- name: hdpe_outer_sheath
layer_type: cylindrical
material: hdpe
r_inner_m: 0.03047
r_outer_m: 0.03447
source: "Representative"
aggregate_properties:
OD_mm: 68.9
The radii follow each other without gaps. The armour wires sit on the bedding,
so r_helix_m is the bedding outer radius plus the wire radius, and every
material is a key of the library. tests/test_tutorials_03_04.py loads this
block and checks that it gives the stiffness of the bundled file.
Load histories
Every reader returns a LoadCaseSeries, the history of one cable section:
Field |
Unit |
Meaning |
|---|---|---|
|
s |
sample times, strictly increasing; a uniform step is expected |
|
1/m |
strain-gradient components (below) |
|
N |
axial force, of the kind |
|
– |
|
|
– |
optional strain; |
|
°C |
optional; |
|
– |
where the record came from |
The arrays are read-only copies. dataclasses.replace makes an edited series.
Curvature is held as a strain gradient
CableXSec takes the strain gradient (g_x, g_y). A fibre at
(x, y) = r (cos φ, sin φ) of the section has the bending strain
g_x x + g_y y, and the gradient points to the most tensile fibre.
Global line programs write the rotation curvature (k_x, k_y), the
components of t × dt/ds on the section axes, with fibre strain
k_x y − k_y x. The readers convert it with
g_x = −k_y, g_y = k_x
This is cablexsec.mechanics.section_conventions.rotation_to_strain_curvature.
A sag bend of a line in a vertical plane, k_y < 0, is then in tension at
φ = 0. CableDyn 0.4.0 writes the curvature vector towards the centre of
curvature, (CurvX, CurvY), and its reader takes g = −(CurvX, CurvY).
A curvature magnitude cannot represent reversals of the bending direction and is refused. Section 2 of the global–local guide describes the sign checks.
The force kind must be declared
The wire stress needs the force that the armour carries. fatigue_from_series
and the project fatigue analysis accept true tension only, unless the record
holds a direct strain that drives the wire stress instead.
For a sealed armour annulus, effective tension is converted with
series.with_true_tension(external_pressure_Pa, external_area_m2). For a
flooded annulus the effective tension loads the armour and is passed to
compute_fatigue directly, as the sea-state batch does with
tension_basis="effective". An unspecified force is refused until its kind
is declared.
Of the strains, only direct, the direct tensile strain, drives the wire
stress. A total strain contains the Poisson contraction and is refused.
Time-history CSV export
cx.read_time_history_csv(path, ...) reads a comma-separated file with one
header row of column names and one row per sample:
Time (s),x curvature (rad/m),y curvature (rad/m),Effective tension (kN)
0,-0.000958504,-0.0483883,59.2063
0.2,-0.00121411,-0.0488292,59.5659
Argument |
Default |
Selects or sets |
|---|---|---|
|
|
time [s] |
|
|
first curvature component |
|
|
second component; |
|
|
axial force |
|
|
optional strain column |
|
|
optional temperature [°C] |
|
|
|
|
|
multiplier to 1/m |
|
|
multiplier to N (the default reads kN) |
|
|
multiplier to a ratio (the default reads percent) |
|
inferred |
override of the kind |
A selector matches a column whose heading contains it as whole words, without
regard to case or extra white space, and a heading equal to the selector is
taken first. It must match exactly one column: no match, two matches, or two
selectors on one column stop the read. A heading that denotes a magnitude or
an extreme (max, min, magnitude, abs, resultant) is refused for a
curvature component.
Units are not read from the headings. The scale arguments convert them.
The tension kind is inferred from the heading. wall tension and
true tension give true, effective tension gives effective, and any
other heading gives unspecified. direct tensile strain gives the strain
kind direct and total mean axial strain the kind total. An explicit kind
may not contradict a recognised heading.
Blank lines are skipped and other columns are ignored. A header separated by semicolons or tabs is refused. Every data row must have as many fields as the header, and a non-numeric value is refused with an error that names the line and column.
CableXSec exchange CSV
cx.write_series_csv(series, path) writes, and cx.read_series_csv(path)
reads, a fixed layout that keeps every kind:
Column |
Content |
|---|---|
|
time [s] |
|
strain-gradient components [1/m] |
|
the force [N]; the column name gives its kind ( |
|
temperature [°C]; empty cells for an isothermal record |
|
optional strain [–]; empty cells when absent |
The first three columns and exactly one tension column are required. Values
are written with full precision, so a series survives the round trip
unchanged. The bundled demonstration history
validation/paper_data/global_demo/global_history_si.csv is in this format.
RIFLEX ASCII time history
cx.read_riflex_ascii(path, ...) reads whitespace-separated columns, one row
per sample. Lines starting with #, % or ! and blank lines are skipped.
Columns are selected by their 1-based position, not by name:
Argument |
Default |
Meaning |
|---|---|---|
|
|
required columns |
|
|
optional columns ( |
|
|
unit multipliers |
|
|
declare |
|
|
|
The defaults differ from the CSV reader. Unless declared otherwise, the curvature is taken as strain gradient and the tension in N.
CableDyn outputs
Driver and OpenFAST module runs write CableDyn 0.1.x output.
cx.read_cabledyn_sections(out_root, deck, {"name": arc_length_m, ...}) reads
the output files of one run together with the deck: <root>.out,
<root>.Line<L>.p.out, <root>.Line<L>.t.out, <root>.static.out and
<root>.elements.out, or <root>.CD.out from OpenFAST. It rebuilds the
signed curvature vector of each named section from the tangent channels or
node positions. It returns a CableDynSectionHistory per section with the
effective tension, rotation curvature components, hydrostatic pressure,
elevation, torque and twist. history.to_load_case_series(A_o) gives the
true-force series with strain-gradient curvature. Sections 1 and 2 of the
global–local guide list the channels the deck must
request, the frame and the consistency checks.
CableDyn 0.4.0 writes station tables.
cablexsec.io.read_cabledyn_station_table(path) reads one station history:
Column |
Accepted names (any case) |
Unit |
|---|---|---|
time |
|
s |
effective tension |
|
N |
curvature components |
|
1/m |
The table is comma, tab or whitespace separated with one header row. Lines
starting with # are comments, and other columns are ignored. The series
holds effective tension and g = −(CurvX, CurvY), with wire azimuths measured
from CableDyn’s section x axis. right_handed=False reverses y for a
left-handed triad. cablexsec.io.series_from_curvature_components builds the
same series from arrays.
Synthetic records
cx.jonswap_series(...) generates a record whose curvature has the shape of a
JONSWAP wave spectrum and a chosen RMS, with optional dynamic tension and
out-of-plane curvature. It is for demonstrations and tests. It is not the
response of a global model.
Sea-state batch specification
cablexsec-batch batch.json --output-directory <new folder> takes a JSON
object with four keys:
Key |
Content |
|---|---|
|
a YAML path, or |
|
|
|
|
|
the fields of |
Relative paths are resolved against the folder of the JSON file, and unknown
keys are rejected. The output folder receives manifest.json, with the
SHA-256 digests of every input, the options, checks and results, together
with <section>_annual_damage.npz and <section>_<run>_history.npz.
Section 3 of the global–local guide gives an
example.
Project files
cx.Project.save(path) writes, and cx.Project.load(path) reads, one
self-contained UTF-8 JSON file. This manual names them .cxproj, but the
extension is not checked.
{"format": "CableXSec Project", "version": 2, "sha256": "<digest>", "payload": {...}}
Payload key |
Content |
|---|---|
|
project name |
|
CableXSec version, source digest, Python, platform, dependency versions and the registered materials and curves at creation |
|
cable definitions by name, in full |
|
load histories by name, with complete arrays |
|
analysis requests (name, model, load case, settings) |
|
completed runs: inputs, result, engine snapshot, fingerprint, run identifier and time |
The file does not refer to the original YAML or CSV files. Arrays are stored as tagged lists with their type and shape, and non-finite numbers as tagged values.
sha256 is the digest of the canonical payload. Project.load rejects a
mismatch, an unknown version, duplicate keys and result types that do not
match their analysis with CableInputError, and it decodes only a fixed list
of data and result classes. Version 1 files load; saving writes version 2.
Project.save writes a temporary file in the target folder and replaces the
target in one step. The project guide describes the
objects and the stale-result checks.
Bending law for global analysis
cx.export_bending_law(cable, tensions_N=..., kappa_max_1_m=...) returns a
BendingLawExport with three outputs:
to_csv(path): the virgin moment–curvature backbone at every exported tension, one row per curvature:kappa_1_m,M_0N_Nm,M_20000N_Nm 0.000000000e+00,0.000000000e+00,0.000000000e+00 2.000000000e-05,1.127743287e+00,1.127743287e+00
The first column is the curvature [1/m]; each further column is the moment [N m] at the tension named in its heading (
M_<tension>N_Nm).to_json(path): an object withformat(cablexsec.bending_law/1),hysteresis_rule(masing_iwan),planar_only,tension_N,kappa_1_m,moment_Nm(one backbone per tension),ei_slip_Nm2(the full-slip stiffness per tension),elements(the stiffness and yield curvature of the parallel elastic–perfectly plastic elements per tension),settings,methodandlimitations.backbone_table_kNm(tension_N): the backbone at one tension as pairs of curvature [rad/m] and moment [kN m], the input of a moment–curvature table of a global line model.
The law is planar and its contact state is fixed at each tension. Between tensions it is interpolated linearly, as Section 8 of the global–local guide explains.
cablexsec.io.global_export also writes the section properties of a set of
load cases as neutral CSV tables (section_properties_csv,
bending_tables_csv), each preceded by comment lines starting with # that
state the cable, the load cases, the units and the source of every value.