visualdynamics.io.sdynpy_shapes¶
sdynpy_shapes
¶
Read and write sdynpy mode shape files (.npy).
The file is a structured NumPy array with one record per mode and the fields 'frequency' (Hz), 'damping' (fraction of critical), 'coordinate' ((node, direction) pairs, one per DOF), 'shape_matrix' (a coefficient per DOF), 'modal_mass' and 'comment1' to 'comment5'. Every mode must cover the same DOFs.
The file does not record which mass unit the shapes were normalized
against, so they import unit-less unless mass_unit is declared.
Functions:
| Name | Description |
|---|---|
save |
Write mode shapes in the sdynpy .npy layout. |
Classes¶
Functions:¶
save
¶
save(shapes: ShapeSet, path: str | PathLike, unit_system: UnitSystem | None = None) -> None
Write mode shapes in the sdynpy .npy layout.
The shape coefficients are written against the mass unit of
unit_system when the units are defined, and as stored otherwise;
the modal masses are written as stored, since against coefficients in
1/sqrt(mass) a modal mass carries no unit. The format records neither
the unit nor the normalization. Complex shapes are written in the
layout's complex form, coefficients and modal masses both complex;
real shapes with a complex modal mass are refused with ValueError.
The first comment field holds the mode's description, or
its comment when it has none.