Package Layout
This document will describe the layout of SDynPy to help users find the functions they are looking for.
SDynPy Subpackages
SDynPy is split up into several subpackages to help organize its content. While these subpackages are convenient to organize the content, they are not convenient to use, as typical function calls might require descending multiple package levels, resulting in inconveniently long code. Therefore, SDynPy heavily relies on aliases to commonly used functions and classes.
The following sections describe the major subpackages that exist in SDynPy.
SDynPy Core Objects
The sdynpy.core
subpackage contains Python modules that define the core SDynPy objects and other core functionality. These are designed to represent common data used in structural dynamics, including degrees of freedom, geometry, data, or dynamic systems. Because of their ubiquitous nature, almost all of the modules, classes, and their corresponding helper functions are aliased to the top-level SDynPy namespace. The core
modules are:
SDynPy Core Modules |
Alias |
Description |
---|---|---|
Definition of the parent |
||
Definition of the color map scheme used by | SDynPy. |
||
Definition of the |
||
Definition of the |
||
Definition of the |
||
Definition of the |
||
Definition of the parent |
||
Definition of the parent |
In addition to the modules being aliased to the SDynPy namespace, many of the classes and functions from the core
subpackage are also aliased to the top-level namespace, as these are the most often called functions and classes in SDynPy.
SDynPy Array Class |
Alias |
Description |
---|---|---|
Parent class of all SDynPy Arrays. |
Coordinate Classes and Functions |
Alias |
Description |
---|---|---|
Class to represent degrees of freedom. |
||
Helper function to create |
Data Classes and Functions |
Alias |
Description |
---|---|---|
Parent class of all SDynPy Data Arrays. |
||
Data class representing time histories. |
||
Data class representing transfer functions or frequency response functions. |
||
Data class representing coherence functions. |
||
Data class representing multiple coherence functions. |
||
Data class representing power spectral density functions. |
||
Data class representing spectra (e.g. FFTs). |
||
An interactive data plotter. |
||
An interactive data plotter specifically for cross-power spectral density data. |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
Geometry Classes and Functions |
Alias |
Description |
---|---|---|
Class to represent a test or analysis geometry. |
||
Class to represent node locations in a geometry. |
||
Class to represent global and local coordinate systems in a geometry. |
||
Class to represent lines connecting nodes for visualization. |
||
Class to represent elements connecting nodes for visualization. |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Helper function to create |
||
Class to represent identification number maps between two geometries. |
Matrix Classes and Functions |
Alias |
Description |
---|---|---|
Class used to map degrees of freedom to rows and columns of a matrix. |
||
Helper function to create |
Shape Classes and Functions |
Alias |
Description |
---|---|---|
Class used to represent mode or deflection shapes. |
||
Helper function to create |
System Classes |
Alias |
Description |
---|---|---|
Class used to represent dynamic systems with mass, stiffness, and damping matrices. |
File Input and Output
Structural dynamics data often comes from external sources, whether it is a modal, vibration, or shock test or an equivalent finite element simulation. Therefore, being able to quickly and easily bring external data into SDynPy is a priority. While users could strip data from their external files and manually construct SDynPy objects from that data, this risks bookkeeping and other translation errors. Therefore if a file type is commonly read into or written from SDynPy, it is useful to add a dedicated reader or writer into SDynPy to handle this translation correctly. The sdynpy.fileio
subpackage contains much of the code to handle these conversions. For convenience, the modules are aliased to the top-level namespace. The fileio
modules are:
File Input/Output Modules |
Alias |
Description |
---|---|---|
Functionality for reading and writing the Universal File Format, a text-based file format common in structural dynamics. |
||
Functionality for reading output from the open-source vibration controller and modal testing software Rattlesnake |
||
Functionality for reading output from Correlated Solution’s VIC3D |
||
Functionality for writing geometry and shape data to a format that can be embedded into an interactive PDF for test or analysis documentation. |
||
Functionality for reading output data from T-Shaker, a vibration shaker controller. |
||
Functionality for reading and writing the Engineering Sciences Common Data Format. |
Finite Elements and Similar Numerical Functionality
SDynPy has a limited set of finite element and other numerical functionality in the sdynpy.fem
subpackage. This includes simple beam finite elements, electrodynamic shaker models, and sensor optimization routines to select optimal sensors for a test from finite element results. For convenience, the modules are aliased to the top-level namespace. The fem
modules are:
FEM Modules |
Alias |
Description |
---|---|---|
Functionality for defining beam finite elements. |
||
Functionality for definining shaker electromechanical models per Lang and Snyder. |
||
Techniques such as effective independence used to select sensors for a test given finite element data |
||
See Below |
Functionality for reading and writing the Exodus finite element model format. |
Because the Exodus file format is used often at Sandia National Laboratories where SDynPy was originally developed, key classes from the sdynpy_exodus
module are also aliased to the top-level namespace.
Exodus Classes |
Alias |
Description |
---|---|---|
Class to represent an Exodus file as stored on the filesystem |
||
Class that represents an Exodus file in memory in a format similar to a Matlab Structure |
Modal Analysis
SDynPy has capabilities for performing experimental modal analysis which entails fitting modes to frequency response functions measured on the test article. These and similar capabilities exist in the sdynpy.modal
subpackage. Many of the modules in this subpackage provide both code-based and GUI-based tools to fit modes to data. In the case of the modal
subpackage, much of the useful content boils down to a handful of classes. Therefore, instead of aliasing the modules in the subpackage to the top-level namespace, SDynPy aliases these classes to the top-level namespace.
Modal Classes |
Alias |
Description |
---|---|---|
Code-based implementation of the PolyMax mode fitter. |
||
GUI-based implementation of the PolyMax mode fitter. |
||
Code-based implemenation of the Synthesize Modes and Correlate mode fitter. |
||
GUI-based implemenation of the Synthesize Modes and Correlate mode fitter. |
||
GUI-based tool to interactively select and combine modes fit to multiple single-reference measurements. |
||
|
GUI-based tool to compute spectral quantities from time histories. |
|
A class to represent a typical modal test, intended to aid modal test practitioners in the data processing and documentation workflow. |
Signal Processing
The sdynpy.signal_processing
subpackage includes a wide variety of tools that are related to structural dynamics. Often, the code in this package is at a “lower level” than the rest of the SDynPy code, operating on raw data rather than SDynPy objects. Many times, SDynPy objects will often call these lower-level functions as part of their own operations. signal_processing
functions can be faster in that they remove the bookkeeping overhead that a lot of SDynPy objects implement, but the user must then be aware that their data must be correctly sorted prior to using the techniques. Additionally, some of the content in signal_processing
does not fit well within the existing SDynPy core objects, so the subpackage serves as a kind of catch-all for tools that can be used in structural dynamics, but perhaps are not commonly used. The modules of signal_processing
are generally aliased to the top-level namespace.
Signal Processing Modules |
Alias |
Description |
---|---|---|
Various functions for dealing with data from cameras, including camera calibration. |
||
Utility functions for working with complex numbers. |
||
Functions like the modal assurance cirterion for comparing data. |
||
Various functions for dealing with cross-power spectral density matrices. |
||
Various functions computing frequency response functions. |
||
Various functions for inverting frequency response functions, including regularization. |
||
Various functions for generating common time signals, like pseudorandom or sine sweeps. |
||
Various functions for dealing with geometry; for example, fitting a shape to a point cloud, or finding intersection points of lines. |
||
Functions for fitting sine waves to data. |
||
Various functions for generating and integrating state space systems. |
||
Advanced FRF computation technique using local rational modeling. |
||
Various functions for dealing with rotations; rotation matrices, Rodrigues parameters, rigid body transformations. |
||
Various functions for working with shock response spectra. |
Documentation
SDynPy has limited functionality to create documentation for test or analysis results. This functionality is currently a work-in-progress, but capability exists to dump common formats into PowerPoint or LaTeX documents.
Documentation Modules |
Alias |
Description |
---|---|---|
Various functions to document SDynPy results in a PowerPoint document. |
||
Various functions to document SDynPy results in a LaTeX document. |
Demonstration Objects
Sometimes when a user has a new idea that they would like to try out, they simply want to quickly create a somewhat “interesting” system (e.g. something more than a simple beam or spring-mass-damper system), and generate data to explore. The sdynpy.demo
subpackage provides two demonstration objects: a flat plate and a simple airplane-like model made out of beam elements. Note that there is some overhead in creating these demonstration objects, therefore the sdynpy.demo
subpackage is not imported automatically with SDynPy, it must be imported separately using import sdynpy.demo
. Because these are imported separately, there is no aliasing of the modules to the top-level namespace.
Demonstration Modules |
Alias |
Description |
---|---|---|
None |
Creates a system and geometry for a structure that looks like a V-tailed airplane. |
|
None |
Creates a system and geometry for a structure that looks like a flat plate. |