Bending hysteresis
Goal: compute the moment–curvature loop of the Ménard and Cartraud (2023) cable, compare it with the loop they measured, split the work into stored and dissipated parts, and see how the friction coefficient and the clamping pressure change the loop. It follows on from Tutorial 1.
Script:
doc/tutorials/scripts/tutorial_02_bending_hysteresis.py
· Run time: a few seconds
The script reads the digitised measurement from validation/paper_data, so
run it from a source checkout:
python doc/tutorials/scripts/tutorial_02_bending_hysteresis.py
The code blocks below are taken from the script and the output blocks are what
it prints; tests/test_tutorials_01_02.py keeps the two in step.
Imports
import sys
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import cablexsec as cx
from cablexsec.analysis.curve_comparison import cycle_work, insert_cycle_crossings
from cablexsec.mechanics.papailiou import slip_onset_curvature
REPOSITORY = Path(__file__).resolve().parents[3]
MEASURED = REPOSITORY / "validation" / "paper_data" / "menard_fig16b_ordered.csv"
FIGURES = (
Path(sys.argv[1])
if len(sys.argv) > 1
else Path(__file__).resolve().parents[1] / "figures"
)
1. The measured loop
Ménard and Cartraud bent a cable specimen in a four-point bench through six
curvature ranges. Range (b) cycles between about −0.1 and +0.1 1/m. The
repository holds its moment–curvature path, extracted from the vector paths of
the published figure, in the order it was recorded
(validation/paper_data/menard_fig16b_ordered.csv).
cable = cx.load_cable(cx.menard2023_yaml_path())
measured = np.genfromtxt(MEASURED, delimiter=",", names=True)
kappa_test = measured["curvature_1_per_m"]
moment_test = measured["moment_Nm"]
print(f"measured points: {kappa_test.size}")
print(f"curvature {kappa_test.min():.4f} to {kappa_test.max():.4f} 1/m")
print(f"moment {moment_test.min():.0f} to {moment_test.max():.0f} N m")
measured points: 589
curvature -0.0974 to 0.0969 1/m
moment -502 to 526 N m
2. The section law follows the measured path
compute_mkappa drives the section law along any curvature history. The
script passes the measured curvature path twice. The first pass builds up the
slip state of the wires from the stress-free section; only the second pass is
compared.
insert_cycle_crossings adds a calculation point wherever the path crosses
zero curvature, so the work can be read exactly at the start and end of each
cycle. original indexes the measured points within the augmented path.
The friction coefficient 0.2 and the 0.3 MPa pressure of the cable’s
initial_state are the values the source fixed on range (a). Range (b) played
no part in setting them.
path, original, crossings = insert_cycle_crossings(kappa_test, crossing=0.0)
loop = cx.compute_mkappa(cable, np.tile(path, 2), tension_N=0.0, mu=0.2)
second = slice(path.size, None)
moment_model = loop.moment_Nm[second][original]
rmse = np.sqrt(np.mean((moment_model - moment_test) ** 2)) / np.ptp(moment_test)
print(f"model moment {moment_model.min():.0f} to {moment_model.max():.0f} N m")
print(f"ordered RMSE / measured range: {100 * rmse:.2f} %")
model moment -532 to 530 N m
ordered RMSE / measured range: 2.86 %
Point by point in the recorded order, the moment error is 2.71 % of the measured moment range.
3. The loop area is the friction work
loop.work holds the cumulative stored elastic energy and the cumulative
friction work per metre of cable along the history. Between any two
points, the work done on the section is the change of stored energy plus the
friction work in between. Over a closed cycle the stored energy returns to its
value, so the work of the cycle equals the friction work, which is the area of
the loop.
stored = loop.work.stored_J_per_m[second]
friction = loop.work.friction_J_per_m[second]
work_model = np.diff((stored + friction)[crossings])
work_test = cycle_work(kappa_test, moment_test, crossing=0.0)
print(f"stored energy at the cycle crossings: {stored[crossings].round(3)} J/m")
print(f"largest stored energy: {stored.max():.2f} J/m")
print(f"friction work per cycle, model: {work_model.round(1)} J/m")
print(f"loop area per cycle, measured: {work_test.round(1)} J/m")
difference = work_model.mean() / work_test.mean() - 1.0
print(f"difference of the means: {100 * difference:+.1f} %")
stored energy at the cycle crossings: [0.095 0.095 0.095] J/m
largest stored energy: 17.03 J/m
friction work per cycle, model: [69.8 69.6] J/m
loop area per cycle, measured: [62.4 62.2] J/m
difference of the means: +11.8 %
The stored energy is the same at every zero crossing, so each cycle closes. It peaks at the curvature extremes.
The calculated friction work per cycle is 11.8 % above the measured loop area, outside the 10 % target that the validation record registers for this comparison (8.8 % before the armour shear stack was cut at its support): row BM1-loop of the validation record, stated, not gated, and discussed in the benchmark register.
loop.W_diss_J_per_m is the friction work over the whole supplied history,
conditioning pass included. For the loss per cycle, take differences of
loop.work.friction_J_per_m between cycle boundaries.
Range (b) of Ménard and Cartraud (2023): measured points and the CableXSec loop on the same curvature path.
4. Friction and clamping set the loop width
The width of the loop is set by the friction stress the wires can carry,
and that grows with the friction coefficient and with the contact pressure.
The script cycles the cable twice between ±0.1 1/m and evaluates the second,
closed cycle. It varies the friction coefficient through the mu argument,
and the clamping through a copy of the cable with another initial pressure
p0, made with model_copy. The bundled file is not changed.
kappa = 0.1 * np.sin(np.linspace(0.0, 4.0 * np.pi, 801)) # two cycles, 1/m
cycle = slice(400, None) # the second, closed cycle
def describe(label, result, spec):
"""Peak moment, friction work of the second cycle and slip onset."""
work = result.work.friction_J_per_m
print(
f"{label:<15} peak {result.moment_Nm[cycle].max():5.0f} N m,"
f" friction work {work[-1] - work[400]:5.1f} J/m per cycle,"
f" inner slip onset {slip_onset_curvature(spec):.4f} 1/m"
)
friction_loops = {}
for mu in (0.1, 0.2, 0.3):
friction_loops[mu] = cx.compute_mkappa(cable, kappa, mu=mu)
describe(
f"mu = {mu}", friction_loops[mu], cx.cable_to_mkappa_specs(cable, 0.0, mu=mu)[0]
)
clamping_loops = {}
for pressure in (0.15e6, 0.3e6, 0.6e6):
clamped = cable.model_copy(
update={
"initial_state": cable.initial_state.model_copy(
update={"external_pressure_Pa": pressure}
)
}
)
clamping_loops[pressure] = cx.compute_mkappa(clamped, kappa)
describe(
f"p0 = {pressure / 1e6:.2f} MPa",
clamping_loops[pressure],
cx.cable_to_mkappa_specs(clamped, 0.0)[0],
)
mu = 0.1 peak 449 N m, friction work 36.5 J/m per cycle, inner slip onset 0.0005 1/m
mu = 0.2 peak 541 N m, friction work 72.7 J/m per cycle, inner slip onset 0.0009 1/m
mu = 0.3 peak 633 N m, friction work 108.7 J/m per cycle, inner slip onset 0.0014 1/m
p0 = 0.15 MPa peak 449 N m, friction work 36.6 J/m per cycle, inner slip onset 0.0005 1/m
p0 = 0.30 MPa peak 541 N m, friction work 72.7 J/m per cycle, inner slip onset 0.0009 1/m
p0 = 0.60 MPa peak 725 N m, friction work 144.0 J/m per cycle, inner slip onset 0.0018 1/m
The friction work per cycle is close to proportional to the friction coefficient and to the pressure, and so is the slip-onset curvature.
Halving the friction coefficient and halving the pressure give nearly the
same loop: the same peak, 449 N m, and 36.5 against 36.6 J/m. The friction stress scales with
mu sigma_0 and departs from that product only at second order in
mu sin(alpha), so a measured loop constrains the product of friction and
clamping, not the two separately. The
benchmark register reports the same for the six Ménard
ranges.
The 0.60 MPa case doubles the pressure of the bounded chain at zero tension, as a tension of about 40 kN would for the inner armour (Section 3 of Tutorial 1).
FIGURES.mkdir(parents=True, exist_ok=True)
fig, ax = plt.subplots(figsize=(5.0, 4.0))
ax.plot(kappa_test, moment_test, "o", ms=3, mfc="none", c="grey", label="measured")
ax.plot(path, loop.moment_Nm[second], c="black", label="CableXSec")
ax.set_xlabel("curvature [1/m]")
ax.set_xticks([-0.1, -0.05, 0.0, 0.05, 0.1])
ax.set_ylabel("bending moment [N m]")
ax.set_title("Ménard and Cartraud (2023), range (b)")
ax.legend(loc="upper left")
fig.tight_layout()
fig.savefig(FIGURES / "tutorial_02_measured_loop.png", dpi=150)
print(f"wrote {(FIGURES / 'tutorial_02_measured_loop.png').name}")
fig, (ax_mu, ax_p) = plt.subplots(1, 2, figsize=(9.0, 3.8), sharey=True)
for mu, result in friction_loops.items():
ax_mu.plot(kappa[cycle], result.moment_Nm[cycle], label=f"mu = {mu}")
for pressure, result in clamping_loops.items():
label = f"p0 = {pressure / 1e6:.2f} MPa"
ax_p.plot(kappa[cycle], result.moment_Nm[cycle], label=label)
ax_mu.set_title("Friction coefficient (p0 = 0.30 MPa)")
ax_p.set_title("Initial pressure p0 (mu = 0.2)")
ax_mu.set_ylabel("bending moment [N m]")
for axis in (ax_mu, ax_p):
axis.set_xlabel("curvature [1/m]")
axis.set_xticks([-0.1, -0.05, 0.0, 0.05, 0.1])
axis.legend(loc="upper left")
fig.tight_layout()
fig.savefig(FIGURES / "tutorial_02_sensitivity.png", dpi=150)
print(f"wrote {(FIGURES / 'tutorial_02_sensitivity.png').name}")
wrote tutorial_02_measured_loop.png
wrote tutorial_02_sensitivity.png
Second cycle between ±0.1 1/m. Left: friction coefficient 0.1, 0.2 and 0.3 at the published 0.3 MPa. Right: initial pressure 0.15, 0.3 and 0.6 MPa at a friction coefficient of 0.2.
Where next
A bending test rarely imposes a uniform curvature. To compare with a test
through its own arrangement, use simulate_bending_test (Section 6.2 of the
local analysis guide).
The same section law can be exported as a hysteretic bending law for a
global analysis with export_bending_law (Section 8 of the
global–local guide).
What the friction does to the wire stresses and to fatigue is the subject of Tutorial 3.