Continuum Robot Components¶
PCS and GVS use the same public vocabulary for continuum links, cross-sections, isotropic materials, and joints. This page describes the physical meaning and ownership of those shared components. For construction, immutable replacement, and gradient-based identification workflows, see Parameters and Optimization.
Model composition¶
Continuum-system parameters use shallow composition:
PCSParams / PlanarPCSParams
└── link: ContinuumLinkParams
└── cross_section: CrossSectionParams
GVSParams
├── link: ContinuumLinkParams
│ └── cross_section: CrossSectionParams
└── joint: JointParams
The hierarchy expresses physical ownership rather than a different material model for every system. A link owns its geometry, reference strain, mass properties, stiffness, and damping. A GVS joint separately owns joint stiffness and damping. System-level parameters own the base pose and gravity.
Cross-sections¶
CrossSectionParams.coefficients is a two-dimensional array with one row per
link. The static system structure determines how each row is interpreted:
- a scalar dimension defines a constant profile;
LinearProfile(base, tip)defines a base-to-tip linear profile;- rows are zero-padded when different GVS links require different numbers of coefficients.
The supported solid cross-sections are circular, rectangular, and elliptical.
CrossSectionGeometry identifies the family, while shared geometry utilities
calculate area and second moments of area. Geometry dimensions are finite and
strictly positive. robot.cross_section_geometry(q, s) returns
(geometry, outer_dimensions, inner_dimensions), with None for entirely
solid models and zero inner dimensions at solid links in mixed models.
Shared evaluators and this query use
[height, width] for rectangular sections and [semi_major, semi_minor] for
elliptical sections. Height and semi-major radius span local material y; width
and semi-minor radius span local material z. These axes rotate with the link
and do not imply a world-up direction.
LinkSpec provides the ergonomic construction interface:
from soromox.systems import LinearProfile, LinkSpec
circular = LinkSpec.circular(
length=0.2,
radius=0.012,
density=1000.0,
young_modulus=1.0e6,
shear_modulus=3.4e5,
material_damping_coefficient=1.0e4,
reference_strain=[0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
)
tapered_rectangle = LinkSpec.rectangular(
length=0.25,
height=LinearProfile(base=0.03, tip=0.02),
width=0.025,
density=1000.0,
young_modulus=1.0e6,
shear_modulus=3.4e5,
material_damping_coefficient=1.0e4,
reference_strain=[0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
)
PCS currently accepts constant solid circular links. GVS accepts constant or
linear circular, rectangular, and elliptical cross-sections. Add
wall_thickness=0.001 or wall_thickness=LinearProfile(0.002, 0.001) to
LinkSpec.circular(...) or LinkSpec.rectangular(...) for a tube, together
with an explicit rod constitutive law. Elliptical
sections are currently solid only.
Wall thickness must be positive and leave an open cavity throughout the link. The same geometry supplies rendering, inertia, and material-derived stiffness and damping. Tubes require effective shear areas and Saint-Venant torsion; rectangular tubes use Marshall within that choice. Switching between solid and hollow sections requires constructing a new model. For geometry updates, follow the material update guidance.
Continuum links¶
ContinuumLinkParams stores the canonical numeric values used at runtime:
| Field | Shape | Meaning |
|---|---|---|
length |
(N,) |
Link backbone lengths |
density |
(N,) |
Volumetric mass densities |
reference_strain |
(N, strain_dimension) |
Stress-free strain fields |
cross_section.coefficients |
(N, max_coefficients) |
Packed geometry profiles |
stiffness |
(N, generalized_dimension, generalized_dimension) |
Generalized link stiffness |
damping |
same as stiffness |
Generalized link damping |
sectional_inertia |
(N, d, d) or (N, Q, d, d), optional |
Angular-first inertia per reference length |
sectional_inertia_mask |
(N,), optional boolean |
Select supplied sectional inertia per link; other links use geometry and density |
tip_inertia |
(N, d, d), optional |
Attached-body inertia about each link tip |
Stiffness and damping are finite symmetric matrices. They are not required to be diagonal or positive definite, which permits anisotropic, coupled, fitted, and learned constitutive models. Link lengths and densities must be finite and strictly positive; reference strains must be finite.
The generalized dimension depends on the system:
| System | Canonical link matrix shape |
|---|---|
| Spatial PCS | (N, 6, 6) |
| PlanarPCS | (N, 3, 3) |
| GVS | (N, max_dof, max_dof) |
GVS matrices are zero-padded beyond each link's active basis coordinates.
Distributed and attached-body inertia¶
Optional sectional_inertia and tip_inertia matrices describe mass and
rotational inertia in each link's local material frame, including an offset
center of mass. Use angular-first order with d=3 for planar mechanics and
d=6 for spatial mechanics. Sectional matrices are per unit reference length;
tip matrices describe the whole attached body about the link tip. Omitting
sectional inertia uses geometry and density; omitting tip inertia adds no attached
body. With supplied sectional matrices, sectional_inertia_mask selects which
links use them: True selects the override and False keeps geometry-and-density
evaluation. Omitting the mask selects every supplied row. This allows mixed
geometric and prepared inertia distributions, including subsequent density updates.
A sectional matrix may be constant along a link or sampled at its interior Gauss nodes. Sampled arrays must match the model's quadrature grid, including GVS padding. Matrices must be finite, symmetric, positive semidefinite, and have an isotropic translational mass block.
spatial_inertia constructs these matrices from mass, center of mass, and
rotational inertia about that center, including parallel-axis and coupling terms:
from soromox.systems import spatial_inertia
tip = spatial_inertia(masses, centers_of_mass, inertias_about_centers)
robot = robot.update_link_params(tip_inertia=tip)
Numeric updates preserve the model structure when shapes and optional-field presence remain fixed. Allocate zero tip matrices before compilation if masses will be attached later. See the helper's API reference below for input shapes and units.
Isotropic material model¶
IsotropicMaterialParams holds Young's modulus, either shear modulus or
Poisson's ratio, and optional scalar material damping. Each field may be a
scalar or one value per link. These are caller-owned construction and
identification inputs; the robot stores the resulting stiffness and damping
matrices.
from soromox.systems import IsotropicMaterialParams
material = IsotropicMaterialParams(
young_modulus=1.0e6,
poisson_ratio=0.45,
material_damping_coefficient=100.0,
)
Supply exactly one of shear_modulus and poisson_ratio. Moduli must be
positive, explicit Poisson ratios must lie in (-1, 0.5), and damping must be
nonnegative. Omitting damping produces a zero damping matrix. The relation
\(G=E/[2(1+\nu)]\) is evaluated inside the material mapping so gradients
include both inputs. Changing which optional fields are present changes the
PyTree structure and requires recompilation.
Rod constitutive laws¶
The default RodConstitutiveLaw uses uniform transverse shear and polar-moment torsion
for solid sections. Shear and torsion can be selected independently. Hollow
links require effective shear and Saint-Venant torsion.
RodConstitutiveLaw selects how the isotropic material and
cross-section produce rod stiffness. For strain order
[twist, bend_y, bend_z, extension, shear_y, shear_z], the local matrix is
Area \(A\) and bending moments \(I_y,I_z\) subtract the cavity contribution exactly. The model choices determine the effective shear areas \(A_s\) and torsion constant \(J\). Rotational mass inertia uses \(I_y+I_z\), which can differ from \(J\).
| Choice | Supported sections and behavior |
|---|---|
TransverseShearRodModel.UNIFORM (default) |
Solid sections; shear stiffness is \(GA\). |
TransverseShearRodModel.EFFECTIVE_AREA |
Solid/hollow circles use material-dependent Cowper factors; solid/hollow rectangles use Jourawski shear-energy matching. |
TorsionRodModel.POLAR_MOMENT (default) |
Solid sections; torsional stiffness is \(G(I_y+I_z)\). |
TorsionRodModel.SAINT_VENANT |
Marshall for solid/hollow rectangles; exact circular/annular and solid elliptical torsion. |
For solid circular and rectangular links, consider EFFECTIVE_AREA when
transverse shear contributes appreciably to deformation, especially for short,
thick links under transverse loading. It accounts approximately for nonuniform
shear stress; its effect on overall deflection depends on the geometry and
loading. Hollow links require this choice at every supported wall thickness.
For a rectangular tube, select both alternatives explicitly:
from soromox.systems import (
LinkSpec, TorsionRodModel, RodConstitutiveLaw,
TransverseShearRodModel,
)
link = LinkSpec.rectangular(
length=0.2, height=0.02, width=0.04, wall_thickness=0.003,
density=1000.0, young_modulus=1e6, poisson_ratio=0.45,
reference_strain=[0, 0, 0, 1, 0, 0],
constitutive_law=RodConstitutiveLaw(
transverse_shear=TransverseShearRodModel.EFFECTIVE_AREA,
torsion=TorsionRodModel.SAINT_VENANT,
),
)
These choices are retained in GVSLinkStructure; reconstruct the model to
change them. Hollow links require effective shear areas and Saint-Venant
torsion, using Marshall for rectangles. PCS/PlanarPCS use uniform shear and
polar-moment torsion for solid circular sections.
The effective shear laws connect continuously to their solid counterparts: Cowper's circular factor becomes \(6(1+\nu)/(7+6\nu)\), and rectangular shear area becomes \(5A/6\). These differ from uniform shear, so opting in also changes solid-link stiffness. Circular torsion is exact at every wall thickness. Marshall approaches Bredt for thin walls; its solid-square extension is about 3.74% above the exact solid solution. Rectangular shear uses the mean stress over the material breadth at each cut. Saint-Venant torsion assumes free warping and stable cross-sectional walls. See the transverse-shear and torsion API references below for formulas, limits, and publications.
The scalar Kelvin–Voigt damping convention uses \(V=\eta\,\mathrm{diag}(J,3I_y,3I_z,3A,A_{s,y},A_{s,z})\), including the selected shear and torsion models. Cowper shear uses the elastic Poisson ratio for both stiffness and damping. With explicit stiffness and Cowper shear, supply an explicit damping matrix or leave damping disabled.
Applying and updating material¶
link_matrices_from_material(material) returns generalized stiffness and
damping without changing the robot. with_isotropic_material(material) returns
a robot containing those matrices, projected through its strain bases and
quadrature. Cowper shear is reevaluated at the supplied Poisson ratio, including
its dependence on \(E\) and \(G\).
Geometry updates refresh inertia but preserve stored stiffness and damping. Reapply the material when those matrices should follow new dimensions:
robot = robot.update_link_params(cross_section=new_section)
robot = robot.with_isotropic_material(material)
Explicit generalized matrices remain independent inputs. For complete update and differentiation examples, see Parameters and Optimization.
Joints¶
GVS segments may start with a fixed, revolute, prismatic, helical,
cylindrical, planar, spherical, or free joint. JointSpec accepts stiffness
and damping in active joint coordinates. Omitted values create zero matrices.
At runtime, JointParams stores both matrices with the same GVS padding as the
link matrices:
import jax.numpy as jnp
from soromox.systems import JointSpec
joint = JointSpec.revolute(
axis="z",
stiffness=jnp.array([[0.3]]),
damping=jnp.array([[0.02]]),
)
The GVS global matrices interleave joint and link contributions before projection into active coordinates. PCS has no separate joint component.
Construction specs, params, and structure¶
The three object categories have different lifetimes:
| Category | Purpose | Typical examples |
|---|---|---|
| Specs | Convenient user input during construction | LinkSpec, JointSpec, GVSSegment, StrainBasisSpec |
| Params | Dynamic numeric JAX PyTrees | ContinuumLinkParams, JointParams, PCSParams, GVSParams |
| Structure | Static choices affecting layout or compilation | PCSStructure, GVSStructure |
Specs may contain either isotropic material values or explicit generalized matrices. Construction resolves them to one canonical runtime representation. Changing numeric params with the same layout supports JAX transformations; changing segment count, basis order, active strains, or padding requires reconstruction with a new structure.
API reference¶
soromox.systems.components
¶
Reusable link, joint, cross-section, and material components.
RodConstitutiveLaw
dataclass
¶
RodConstitutiveLaw(transverse_shear: TransverseShearRodModel = UNIFORM, torsion: TorsionRodModel = POLAR_MOMENT)
Independent sectional assumptions for an isotropic rod.
Attributes:
| Name | Type | Description |
|---|---|---|
transverse_shear |
TransverseShearRodModel
|
Uniform shear (solid sections only), or effective areas from Cowper's circular formula and rectangular Jourawski shear energy. Elliptical sections use uniform shear. |
torsion |
TorsionRodModel
|
Polar area moment for solid sections, or free-warping Saint-Venant torsion using Marshall for rectangles and exact constants for circular/annular and solid elliptical sections. |
Axial and bending stiffness always use EA, EIy and EIz. Rotational mass inertia always uses area moments, independently of these choices. The default law uses uniform shear and polar-moment torsion for stiffness and damping. Hollow sections require EFFECTIVE_AREA shear and SAINT_VENANT torsion.
__post_init__
¶
Validate the shear and torsion selections.
Returns:
| Type | Description |
|---|---|
None
|
None. The immutable law retains the supplied model choices. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If either selection uses an unsupported enum type. |
validate_geometry
¶
validate_geometry(geometry: CrossSectionGeometry, hollow: bool) -> None
Reject unsupported geometry/law combinations at construction and update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Cross-section family. |
required |
hollow
|
bool
|
Whether the section has a cavity. |
required |
Returns:
| Type | Description |
|---|---|
None
|
None after successful validation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the selected models do not support this geometry. |
cross_section_properties
¶
cross_section_properties(geometry: CrossSectionGeometry, outer: Array, inner: Array | None = None, *, poisson_ratio: Array | float = 0.0, shear_factors_override: Array | None = None) -> RodCrossSectionProperties
Evaluate a solid or hollow cross-section for a link or strand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Cross-section family. |
required |
outer
|
Array
|
Outer dimensions in the last axis [m]. |
required |
inner
|
Array | None
|
Optional centred cavity dimensions [m]. |
None
|
poisson_ratio
|
Array | float
|
Elastic Poisson ratio used by Cowper shear. |
0.0
|
shear_factors_override
|
Array | None
|
Optional calibrated y/z shear factors. These supply the effective areas directly, independently of the material's Poisson ratio. The last axis has size two. |
None
|
Returns:
| Type | Description |
|---|---|
RodCrossSectionProperties
|
Material area, principal area moments, torsion constant and |
RodCrossSectionProperties
|
effective shear areas, with any leading section batch dimensions. |
requires_poisson_ratio
¶
requires_poisson_ratio(geometry: CrossSectionGeometry) -> bool
Check whether shear areas depend on the elastic Poisson ratio.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Cross-section family. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True for circular sections using effective shear areas. |
shear_areas
¶
shear_areas(geometry: CrossSectionGeometry, outer: Array, inner: Array | None = None, *, poisson_ratio: Array | float = 0.0) -> Array
Return effective areas along material y/z, in square metres.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Section family. |
required |
outer
|
Array
|
Outer dimensions in the last axis, in metres. |
required |
inner
|
Array | None
|
Optional centred cavity dimensions, in metres. |
None
|
poisson_ratio
|
Array | float
|
Elastic Poisson ratio; only used for Cowper shear. |
0.0
|
Returns:
| Type | Description |
|---|---|
Array
|
Two effective shear areas per section. Rectangular areas integrate |
Array
|
Q²/b over each strip, assuming Jourawski shear stress VQ/(Ib). |
Array
|
The assumed stress is averaged over the material breadth at each cut. |
material_diagonals
¶
material_diagonals(geometry: CrossSectionGeometry, outer: Array, inner: Array | None = None, *, poisson_ratio: Array | float = 0.0) -> tuple[Array, Array, Array]
Return sectional unit Young's, shear and damping diagonals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Cross-section family. |
required |
outer
|
Array
|
Dimensions with arbitrary leading sample dimensions. |
required |
inner
|
Array | None
|
Optional centred uniform-wall cavity dimensions. |
None
|
poisson_ratio
|
Array | float
|
Elastic Poisson ratio used for Cowper shear, including the damping law. |
0.0
|
Returns:
| Type | Description |
|---|---|
Array
|
Three arrays of shape |
Array
|
Stiffness is |
Array
|
is |
tuple[Array, Array, Array]
|
use the polar area moment, not the torsion constant. |
torsion_constant
¶
torsion_constant(geometry: CrossSectionGeometry, outer: Array, inner: Array | None = None) -> Array
Return the torsion constant J in metres to the fourth power.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry
|
Section family. |
required |
outer
|
Array
|
Outer dimensions in the last axis, in metres. |
required |
inner
|
Array | None
|
Optional centred uniform-wall cavity dimensions, in metres. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
J for use in GJ: the polar moment for POLAR_MOMENT, or a |
Array
|
geometry-specific constant for SAINT_VENANT. For rectangles, |
Array
|
Marshall adds Pm*t³/3 to Bredt's 4*Am²*t/Pm. Its solid extension |
Array
|
evaluates the same expression at |
Array
|
t=min(height,width)/2, ensuring continuity as the cavity closes. |
RodCrossSectionProperties
¶
Bases: NamedTuple
flowchart TD
soromox.systems.components.RodCrossSectionProperties[RodCrossSectionProperties]
click soromox.systems.components.RodCrossSectionProperties href "" "soromox.systems.components.RodCrossSectionProperties"
Evaluated mechanical cross-section properties for links and strands.
Geometry determines area and area moments. The selected rod law determines the torsion constant and effective shear areas; Cowper shear also depends on the material Poisson ratio. Values are evaluated from the current geometry, material and law.
Attributes:
| Name | Type | Description |
|---|---|---|
area |
Array
|
Material area [m²]. |
second_moments |
Array
|
Area moments about y/z, last axis of size two [m⁴]. |
torsion_constant |
Array
|
Constant J for torsional stiffness GJ [m⁴]. |
shear_areas |
Array
|
Effective areas along y/z, last axis of size two [m²]. |
TorsionRodModel
¶
Bases: Enum
flowchart TD
soromox.systems.components.TorsionRodModel[TorsionRodModel]
click soromox.systems.components.TorsionRodModel href "" "soromox.systems.components.TorsionRodModel"
Torsion assumptions in an isotropic rod constitutive law.
POLAR_MOMENT uses \(J=I_y+I_z\) for solid sections. It assumes zero
cross-sectional warping and is exact for circular solids. Hollow sections
require SAINT_VENANT.
SAINT_VENANT accounts for free warping through geometry-specific
torsion constants: exact circular/annular and solid elliptical formulas,
and Marshall's approximation for rectangles. Marshall supports centred,
uniform-wall tubes with sharp corners and a continuous solid extension:
\(A_m\) is the area enclosed by the wall midline and \(P_m\) its perimeter. The first term is Bredt's thin-wall expression. The relative correction, \(P_m^2t^2/(12A_m^2)\), vanishes quadratically for thin walls. At square-tube wall/outer-side ratios of 1%, 5%, and 10%, the correction is 0.0136%, 0.3693%, and 1.6461%, respectively.
For a solid, Marshall is evaluated at \(t=\min(h,w)/2\). This engineering extension is continuous with the tube formula. Its relative errors against the exact solid solution are +3.739% for a square, and approximately -2.065%, -1.882%, and -1.078% for side ratios 2, 5, and 10. A nonsquare uniform-wall cavity closes to a line; Marshall's solid endpoint is an engineering approximation along this path. The model assumes free warping and stable cross-sectional walls.
For SAINT_VENANT, circular torsion is exact for solids and annuli,
\(J=\pi(R^4-r^4)/2\). Solid ellipses use \(J=\pi a^3b^3/(a^2+b^2)\).
References
Ridley-Ellis, D. J., Owen, J. S., & Davies, G. (2003). Torsional behaviour of rectangular hollow sections. Journal of Constructional Steel Research, 59(5), 641–663. doi:10.1016/S0143-974X(02)00060-3. Equation (1) gives Marshall's approximation used here for tubes.
TransverseShearRodModel
¶
Bases: Enum
flowchart TD
soromox.systems.components.TransverseShearRodModel[TransverseShearRodModel]
click soromox.systems.components.TransverseShearRodModel href "" "soromox.systems.components.TransverseShearRodModel"
Transverse-shear assumptions in an isotropic rod constitutive law.
UNIFORM uses the material area, \(A_{s,y}=A_{s,z}=A\), and supports
solid sections only. EFFECTIVE_AREA uses Cowper's expression for
circles and annuli, and Jourawski shear-energy matching for rectangles.
Elliptical sections use UNIFORM shear.
For circles, with \(m=r/R\) and elastic Poisson ratio \(\nu\),
This expression applies across wall thicknesses. The solid limit is \(k=6(1+\nu)/(7+6\nu)\); the thin-wall limit is \(k=2(1+\nu)/(4+3\nu)\). The material supplies \(\nu\) directly or through \(E/(2G)-1\), and the same factor enters the scalar damping model.
For rectangles, \(A_s=I^2/\int Q(u)^2/b(u)\,du\) matches the energy of the assumed stress \(\tau=VQ/(Ib)\). Here \(b\) is the material breadth at a cut, \(Q\) its first area moment, and \(I\) the bending moment of area for the chosen shear direction. This recovers \(5A/6\) for solids and continuously as a cavity closes. The assumed shear field uses the mean stress over the material breadth at each cut. These effective areas give solid shear stiffnesses of \(kGA\) for circles and \(5GA/6\) for rectangles.
References
Cowper, G. R. (1966). The Shear Coefficient in Timoshenko's Beam Theory. Journal of Applied Mechanics, 33(2), 335–340. doi:10.1115/1.3625046. Source of the circular and annular shear factors.
CrossSectionGeometry
¶
Bases: IntEnum
flowchart TD
soromox.systems.components.CrossSectionGeometry[CrossSectionGeometry]
click soromox.systems.components.CrossSectionGeometry href "" "soromox.systems.components.CrossSectionGeometry"
Supported cross-section boundary families.
CrossSectionParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.components.CrossSectionParams[CrossSectionParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.components.CrossSectionParams
click soromox.systems.components.CrossSectionParams href "" "soromox.systems.components.CrossSectionParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Batched dynamic cross-section coefficients.
Static geometry, profile kinds, and coefficient names live in each system's structure. Rows are zero-padded to the largest coefficient count in the model.
Attributes:
| Name | Type | Description |
|---|---|---|
coefficients |
Array
|
Cross-section coefficients with shape
|
replace
¶
replace(**updates: Any) -> BaseSystemParams
Return an immutable copy with selected fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and their replacement values.
Nested parameter components should first be replaced with their
own |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSystemParams
|
A validated parameter PyTree of the same concrete class. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If any update names an unknown parameter field. |
TypeError
|
If a replacement cannot be inserted into the PyTree. |
ValueError
|
If validation of the resulting parameters fails. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
Validate parameters fully against static construction choices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Any
|
System-specific static structure to validate against. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate the batched cross-section coefficient array shape.
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
LinearProfile
dataclass
¶
A scalar cross-section dimension varying linearly along a link.
Attributes:
| Name | Type | Description |
|---|---|---|
base |
float
|
Dimension at normalized arc length zero. |
tip |
float
|
Dimension at normalized arc length one. |
__post_init__
¶
Validate the endpoint dimensions.
Raises:
| Type | Description |
|---|---|
ValueError
|
If either endpoint is non-finite or not strictly positive. |
JointParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.components.JointParams[JointParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.components.JointParams
click soromox.systems.components.JointParams href "" "soromox.systems.components.JointParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Canonical batched generalized joint matrices.
Attributes:
| Name | Type | Description |
|---|---|---|
stiffness |
Array
|
Padded joint stiffness matrices with shape
|
damping |
Array
|
Padded joint damping matrices with the same shape as
|
replace
¶
replace(**updates: Any) -> BaseSystemParams
Return an immutable copy with selected fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and their replacement values.
Nested parameter components should first be replaced with their
own |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSystemParams
|
A validated parameter PyTree of the same concrete class. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If any update names an unknown parameter field. |
TypeError
|
If a replacement cannot be inserted into the PyTree. |
ValueError
|
If validation of the resulting parameters fails. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
Validate parameters fully against static construction choices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Any
|
System-specific static structure to validate against. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate joint matrix shapes.
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If stiffness is not a batch of square matrices or damping has a different shape. |
JointSpec
dataclass
¶
JointSpec(type: JointType, axis: Literal['x', 'y', 'z'] = 'x', plane: Literal['xy', 'yz', 'xz'] = 'xy', pitch: float = 0.0, stiffness: Array | list = list(), damping: Array | list = list())
Kinematic and generalized viscoelastic specification of one joint.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
JointType
|
Joint family name. |
axis |
Literal['x', 'y', 'z']
|
Axis used by revolute, prismatic, helical, and cylindrical joints. |
plane |
Literal['xy', 'yz', 'xz']
|
Motion plane used by planar joints. |
pitch |
float
|
Translation per radian for a helical joint. |
stiffness |
Array | list
|
Stiffness matrix in active joint coordinates. An empty value requests a zero matrix. |
damping |
Array | list
|
Damping matrix in active joint coordinates. An empty value requests a zero matrix. |
fixed
classmethod
¶
fixed() -> JointSpec
Create a zero-degree-of-freedom fixed joint.
Returns:
| Type | Description |
|---|---|
JointSpec
|
A fixed-joint specification with zero stiffness and damping. |
revolute
classmethod
¶
revolute(axis: Literal['x', 'y', 'z'] = 'x', stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a one-degree-of-freedom revolute joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Literal['x', 'y', 'z']
|
Rotation axis in the joint material frame. |
'x'
|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A revolute-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the axis is invalid or a matrix has an invalid shape, non-finite entries, or asymmetry. |
prismatic
classmethod
¶
prismatic(axis: Literal['x', 'y', 'z'] = 'x', stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a one-degree-of-freedom prismatic joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Literal['x', 'y', 'z']
|
Translation axis in the joint material frame. |
'x'
|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A prismatic-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the axis or either matrix is invalid. |
helical
classmethod
¶
helical(axis: Literal['x', 'y', 'z'] = 'x', pitch: float = 0.0, stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a one-degree-of-freedom helical joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Literal['x', 'y', 'z']
|
Coupled rotation and translation axis. |
'x'
|
pitch
|
float
|
Translation per radian of rotation. |
0.0
|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A helical-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the axis or either matrix is invalid. |
cylindrical
classmethod
¶
cylindrical(axis: Literal['x', 'y', 'z'] = 'x', stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a cylindrical joint with rotation and translation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Literal['x', 'y', 'z']
|
Shared rotation and translation axis. |
'x'
|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A two-degree-of-freedom cylindrical-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the axis or either matrix is invalid. |
planar
classmethod
¶
planar(plane: Literal['xy', 'yz', 'xz'] = 'xy', stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a three-degree-of-freedom planar joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plane
|
Literal['xy', 'yz', 'xz']
|
Plane in which the joint translates and rotates. |
'xy'
|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A planar-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the plane or either matrix is invalid. |
spherical
classmethod
¶
spherical(stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a three-degree-of-freedom spherical joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A spherical-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If either matrix is invalid. |
free
classmethod
¶
free(stiffness: Array | list | None = None, damping: Array | list | None = None) -> JointSpec
Create a free six-degree-of-freedom spatial joint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stiffness
|
Array | list | None
|
Optional |
None
|
damping
|
Array | list | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
JointSpec
|
A free-joint specification. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If either matrix is invalid. |
ContinuumLinkParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.components.ContinuumLinkParams[ContinuumLinkParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.components.ContinuumLinkParams
click soromox.systems.components.ContinuumLinkParams href "" "soromox.systems.components.ContinuumLinkParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Canonical batched dynamic parameters for continuum links.
Attributes:
| Name | Type | Description |
|---|---|---|
length |
Array
|
Link lengths with shape |
density |
Array
|
Volumetric mass densities with shape |
reference_strain |
Array
|
Reference strain rows with shape
|
cross_section |
CrossSectionParams
|
Batched cross-section coefficients shared by all continuum-system families. |
stiffness |
Array
|
Canonical generalized link stiffness matrices with shape
|
damping |
Array
|
Canonical generalized link damping matrices with the same
shape as |
sectional_inertia |
Array | None
|
Optional angular-first spatial inertia per unit length
in local material frames, shape |
sectional_inertia_mask |
Array | None
|
Optional boolean array of shape |
tip_inertia |
Array | None
|
Optional attached-body spatial inertia about each link tip,
shape |
replace
¶
replace(**updates: Any) -> BaseSystemParams
Return an immutable copy with selected fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and their replacement values.
Nested parameter components should first be replaced with their
own |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSystemParams
|
A validated parameter PyTree of the same concrete class. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If any update names an unknown parameter field. |
TypeError
|
If a replacement cannot be inserted into the PyTree. |
ValueError
|
If validation of the resulting parameters fails. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
Validate parameters fully against static construction choices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Any
|
System-specific static structure to validate against. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate link-array and canonical matrix shapes.
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If link fields disagree on |
validate_values
¶
Validate eager link values and canonical matrix properties.
LinkSpec
dataclass
¶
LinkSpec(cross_section_geometry: CrossSectionGeometry, length: float, density: float, reference_strain: Array | list[float], cross_section_coefficients: tuple[float, ...], cross_section_profile_types: tuple[ProfileType, ...], cross_section_profile_parameter_counts: tuple[int, ...], cross_section_coefficient_names: tuple[str, ...], young_modulus: float | None = None, shear_modulus: float | None = None, poisson_ratio: float | None = None, material_damping_coefficient: float | None = None, stiffness: Array | None = None, damping: Array | None = None, hollow: bool = False, constitutive_law: RodConstitutiveLaw = RodConstitutiveLaw())
Construction specification for one continuum link.
Prefer the geometry-specific :meth:circular, :meth:rectangular, and
:meth:elliptical factories. Stiffness must be described by an explicit
stiffness matrix or by young_modulus together with exactly one of
shear_modulus and poisson_ratio. Damping may use
material_damping_coefficient or an explicit damping matrix; omitting
both disables damping.
Attributes:
| Name | Type | Description |
|---|---|---|
cross_section_geometry |
CrossSectionGeometry
|
Static cross-section family. |
hollow |
bool
|
Whether a wall-thickness profile follows the outer dimensions. |
constitutive_law |
RodConstitutiveLaw
|
Static shear and torsion assumptions for GVS links. |
length |
float
|
Link length. |
density |
float
|
Volumetric mass density. |
reference_strain |
Array | list[float]
|
Reference strain vector for this link. |
cross_section_coefficients |
tuple[float, ...]
|
Packed constant or linear profile coefficients. |
cross_section_profile_types |
tuple[ProfileType, ...]
|
Profile kind for each geometric dimension. |
cross_section_profile_parameter_counts |
tuple[int, ...]
|
Number of packed coefficients occupied by each geometric dimension. |
cross_section_coefficient_names |
tuple[str, ...]
|
Human-readable names corresponding to the packed coefficients. |
young_modulus |
float | None
|
Optional isotropic Young's modulus. |
shear_modulus |
float | None
|
Optional isotropic shear modulus. |
poisson_ratio |
float | None
|
Optional isotropic Poisson's ratio. |
material_damping_coefficient |
float | None
|
Optional isotropic material damping value.
Omitting it together with |
stiffness |
Array | None
|
Optional explicit generalized stiffness matrix. |
damping |
Array | None
|
Optional explicit generalized damping matrix. |
circular
classmethod
¶
circular(*, length: float, radius: float | LinearProfile, density: float, reference_strain: Array | list[float], young_modulus: float | None = None, shear_modulus: float | None = None, poisson_ratio: float | None = None, material_damping_coefficient: float | None = None, stiffness: Array | None = None, damping: Array | None = None, constitutive_law: RodConstitutiveLaw = RodConstitutiveLaw(), wall_thickness: float | LinearProfile | None = None) -> LinkSpec
Create a solid or hollow circular-link specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
float
|
Link length. |
required |
radius
|
float | LinearProfile
|
Constant radius or a base-to-tip linear radius profile. |
required |
wall_thickness
|
float | LinearProfile | None
|
Optional uniform wall, constant or linear along the link. Omit for a solid section. Must leave a positive cavity. |
None
|
density
|
float
|
Volumetric mass density. |
required |
reference_strain
|
Array | list[float]
|
Reference strain vector. Spatial systems use six entries and planar PCS uses three entries. |
required |
young_modulus
|
float | None
|
Young's modulus used with |
None
|
shear_modulus
|
float | None
|
Shear modulus used with |
None
|
poisson_ratio
|
float | None
|
Poisson's ratio used with |
None
|
material_damping_coefficient
|
float | None
|
Isotropic damping value used to build
generalized damping. Mutually exclusive with |
None
|
stiffness
|
Array | None
|
Explicit generalized stiffness matrix. |
None
|
damping
|
Array | None
|
Explicit generalized damping matrix. |
None
|
constitutive_law
|
RodConstitutiveLaw
|
Static shear and torsion assumptions. Defaults select uniform shear and polar-moment torsion. Hollow links require effective shear areas and Saint-Venant torsion, which uses Marshall for rectangles. |
RodConstitutiveLaw()
|
Returns:
| Type | Description |
|---|---|
LinkSpec
|
A circular :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If material and explicit sources are missing, incomplete, or supplied together, or if an explicit matrix is not finite, square, and symmetric, or if a physical dimension, density, length, or material scalar is outside its valid domain. |
rectangular
classmethod
¶
rectangular(*, length: float, height: float | LinearProfile, width: float | LinearProfile, density: float, reference_strain: Array | list[float], young_modulus: float | None = None, shear_modulus: float | None = None, poisson_ratio: float | None = None, material_damping_coefficient: float | None = None, stiffness: Array | None = None, damping: Array | None = None, constitutive_law: RodConstitutiveLaw = RodConstitutiveLaw(), wall_thickness: float | LinearProfile | None = None) -> LinkSpec
Create a solid or hollow rectangular-link specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
float
|
Link length. |
required |
height
|
float | LinearProfile
|
Full extent along local material y, constant or linear. |
required |
width
|
float | LinearProfile
|
Full extent along local material z, constant or linear. |
required |
wall_thickness
|
float | LinearProfile | None
|
Optional uniform wall, constant or linear along the link. Omit for a solid section. Must leave a positive cavity. |
None
|
density
|
float
|
Volumetric mass density. |
required |
reference_strain
|
Array | list[float]
|
Reference strain vector for the link. |
required |
young_modulus
|
float | None
|
Young's modulus used with |
None
|
shear_modulus
|
float | None
|
Shear modulus used with |
None
|
poisson_ratio
|
float | None
|
Poisson's ratio used with |
None
|
material_damping_coefficient
|
float | None
|
Isotropic damping value used to build
generalized damping. Mutually exclusive with |
None
|
stiffness
|
Array | None
|
Explicit generalized stiffness matrix. |
None
|
damping
|
Array | None
|
Explicit generalized damping matrix. |
None
|
constitutive_law
|
RodConstitutiveLaw
|
Static shear and torsion assumptions. Defaults select uniform shear and polar-moment torsion. Hollow links require effective shear areas and Saint-Venant torsion, which uses Marshall for rectangles. |
RodConstitutiveLaw()
|
Returns:
| Type | Description |
|---|---|
LinkSpec
|
A rectangular :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If material and explicit sources are missing, incomplete, or supplied together, or if an explicit matrix is not finite, square, and symmetric, or if a physical dimension, density, length, or material scalar is outside its valid domain. |
elliptical
classmethod
¶
elliptical(*, length: float, semi_major: float | LinearProfile, semi_minor: float | LinearProfile, density: float, reference_strain: Array | list[float], young_modulus: float | None = None, shear_modulus: float | None = None, poisson_ratio: float | None = None, material_damping_coefficient: float | None = None, stiffness: Array | None = None, damping: Array | None = None, constitutive_law: RodConstitutiveLaw = RodConstitutiveLaw()) -> LinkSpec
Create a solid elliptical-link specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
float
|
Link length. |
required |
semi_major
|
float | LinearProfile
|
Constant semi-major axis or base-to-tip linear profile. |
required |
semi_minor
|
float | LinearProfile
|
Constant semi-minor axis or base-to-tip linear profile. |
required |
density
|
float
|
Volumetric mass density. |
required |
reference_strain
|
Array | list[float]
|
Reference strain vector for the link. |
required |
young_modulus
|
float | None
|
Young's modulus used with |
None
|
shear_modulus
|
float | None
|
Shear modulus used with |
None
|
poisson_ratio
|
float | None
|
Poisson's ratio used with |
None
|
material_damping_coefficient
|
float | None
|
Isotropic damping value used to build
generalized damping. Mutually exclusive with |
None
|
stiffness
|
Array | None
|
Explicit generalized stiffness matrix. |
None
|
damping
|
Array | None
|
Explicit generalized damping matrix. |
None
|
constitutive_law
|
RodConstitutiveLaw
|
Static shear and torsion assumptions. Defaults select uniform shear and polar-moment torsion. Hollow links require effective shear areas and Saint-Venant torsion, which uses Marshall for rectangles. |
RodConstitutiveLaw()
|
Returns:
| Type | Description |
|---|---|
LinkSpec
|
An elliptical :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If material and explicit sources are missing, incomplete, or supplied together, or if an explicit matrix is not finite, square, and symmetric, or if a physical dimension, density, length, or material scalar is outside its valid domain. |
IsotropicMaterialParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.components.IsotropicMaterialParams[IsotropicMaterialParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.components.IsotropicMaterialParams
click soromox.systems.components.IsotropicMaterialParams href "" "soromox.systems.components.IsotropicMaterialParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Caller-owned isotropic material variables.
These values are construction and optimization variables rather than
canonical robot runtime parameters. Pass an instance to
link_matrices_from_material or with_isotropic_material to map it to
generalized link matrices.
Attributes:
| Name | Type | Description |
|---|---|---|
young_modulus |
Array
|
Scalar or per-link Young's modulus values. |
shear_modulus |
Array | None
|
Optional scalar or per-link shear modulus values.
Exactly one of |
poisson_ratio |
Array | None
|
Optional scalar or per-link Poisson-ratio values. |
material_damping_coefficient |
Array | None
|
Optional scalar or per-link isotropic
material damping values. |
The presence of shear_modulus, poisson_ratio, and
material_damping_coefficient is part of the PyTree structure. JIT-compiled
functions therefore specialize on the chosen stiffness parameterization and
on whether material damping is active, while the numeric arrays remain
differentiable leaves.
replace
¶
replace(**updates: Any) -> BaseSystemParams
Return an immutable copy with selected fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and their replacement values.
Nested parameter components should first be replaced with their
own |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSystemParams
|
A validated parameter PyTree of the same concrete class. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If any update names an unknown parameter field. |
TypeError
|
If a replacement cannot be inserted into the PyTree. |
ValueError
|
If validation of the resulting parameters fails. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
Validate parameters fully against static construction choices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Any
|
System-specific static structure to validate against. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate the material parameterization and static array layout.
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If both or neither of |
validate_values
¶
Validate eager material physical values.
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If either modulus is non-finite or not strictly
positive; Poisson's ratio is outside |
broadcast
¶
broadcast(num_links: int) -> IsotropicMaterialParams
Broadcast scalar material fields to one value per link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_links
|
int
|
Number of links in the target robot. |
required |
Returns:
| Type | Description |
|---|---|
IsotropicMaterialParams
|
A new material PyTree whose active fields all have shape |
IsotropicMaterialParams
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If a non-scalar field does not have shape
|
StrandCrossSection
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.components.StrandCrossSection[StrandCrossSection]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.components.StrandCrossSection
click soromox.systems.components.StrandCrossSection href "" "soromox.systems.components.StrandCrossSection"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Constant circular or rectangular cross-section normal to a strand's x axis.
Attributes:
| Name | Type | Description |
|---|---|---|
geometry |
CrossSectionGeometry
|
Static cross-section family. |
outer_dimensions |
Array
|
Dynamic dimensions [m]: |
wall_thickness |
Array | None
|
Uniform wall [m] for a hollow cross-section; None for solid. |
inner_dimensions
property
¶
Dimensions of the centred cavity, or None for a solid cross-section.
radial_extent
property
¶
Half-extent along the strand's local y (radial) axis [m].
replace
¶
replace(**updates: Any) -> BaseSystemParams
Return an immutable copy with selected fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and their replacement values.
Nested parameter components should first be replaced with their
own |
{}
|
Returns:
| Type | Description |
|---|---|
BaseSystemParams
|
A validated parameter PyTree of the same concrete class. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If any update names an unknown parameter field. |
TypeError
|
If a replacement cannot be inserted into the PyTree. |
ValueError
|
If validation of the resulting parameters fails. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
Validate parameters fully against static construction choices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
Any
|
System-specific static structure to validate against. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
circular
classmethod
¶
Construct a solid circular cross-section with radius in metres.
circular_hollow
classmethod
¶
Construct a circular tube from its outer radius and wall [m].
rectangular
classmethod
¶
Construct a solid rectangle with height along y and width along z [m].
rectangular_hollow
classmethod
¶
Construct a rectangular tube from outer dimensions and wall [m].
spatial_inertia
¶
Construct angular-first inertia about a material-frame origin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mass
|
Array
|
Mass [kg], or mass per unit length [kg/m]. |
required |
center_of_mass
|
Array
|
Center of mass relative to the origin [m], shape
|
required |
rotational_inertia
|
Array
|
Inertia about the center of mass, a scalar for planar
mechanics or shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Symmetric angular-first inertia, shape |
Array
|
|
Array
|
broadcasting over leading dimensions. All quantities use the same frame. |
evaluate_profile
¶
evaluate_profile(coefficients: Array, profile_type: ProfileType, normalized_arclength: Array) -> Array
Evaluate a cross-section profile at normalized arc-length positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coefficients
|
Array
|
Coefficients for one profile. A constant profile uses
the first entry; a linear profile uses |
required |
profile_type
|
ProfileType
|
Either |
required |
normalized_arclength
|
Array
|
Scalar or array of positions measured from zero at the link base to one at the link tip. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Profile values with the same shape as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
section_properties
¶
section_properties(geometry: CrossSectionGeometry | int, dimensions: Array, inner_dimensions: Array | None = None) -> tuple[Array, Array, Array, Array]
Return (I_x, I_y, I_z, area) for a centred solid or hollow section.
The material-frame x-axis is longitudinal. Rectangular dimensions are
ordered [height, width], spanning local y and z respectively. Elliptical
dimensions are ordered [semi_major, semi_minor], also along y and z.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
CrossSectionGeometry | int
|
Cross-section family, supplied as a
:class: |
required |
dimensions
|
Array
|
Geometry dimensions. Circular sections use |
required |
inner_dimensions
|
Array | None
|
Optional cavity dimensions in the same order. The caller validates that the cavity lies inside the outer boundary. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
about the longitudinal material x-axis, the transverse second moments, |
Array
|
and the section area. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
joint_dof
¶
Return the active-coordinate dimension of a supported joint type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_type
|
str
|
Lower-case joint family name. |
required |
Returns:
| Type | Description |
|---|---|
int
|
Number of active joint coordinates. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
shear_modulus_from_poisson_ratio
¶
shear_modulus_from_poisson_ratio(young_modulus: Array | float, poisson_ratio: Array | float) -> Array
Compute the shear modulus of an isotropic material.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
young_modulus
|
Array | float
|
Young's modulus |
required |
poisson_ratio
|
Array | float
|
Poisson's ratio |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The shear modulus |
Array
|
shape. |