newton.utils.create_cable_stiffness_from_elastic_moduli#

newton.utils.create_cable_stiffness_from_elastic_moduli(youngs_modulus, radius, segment_length)[source]#

Create per-joint rod/cable stiffness parameters from elastic moduli.

For a circular cross-section, this computes material stiffnesses and converts them to the per-joint stiffness values expected by ModelBuilder.add_rod() and ModelBuilder.add_rod_graph():

  • stretch_stiffness = E * A / L [N/m]

  • bend_stiffness = E * I / L [N*m]

where: - A = pi * r^2 - I = (pi * r^4) / 4 (area moment of inertia for a solid circular rod) - L = segment_length

Parameters:
  • youngs_modulus (float) – Young’s modulus E in Pascals [N/m^2].

  • radius (float) – Rod/cable radius r in meters.

  • segment_length (float) – Segment length L in meters.

Returns:

Tuple (stretch_stiffness, bend_stiffness) = (E*A/L, E*I/L).

Return type:

tuple[float, float]