pyyeti.ode.eigss

pyyeti.ode.eigss(A, delcc)[source]

Solve complex eigen problem for state-space formulation.

Parameters:
  • A (2d ndarray) – The state-space matrix (which doesn’t have to be defined as below)

  • delcc (bool) – If True, delete one of each complex-conjugate pair and put the appropriate factor of 2. in ur output (see below). This is handy for real time-domain solutions, but not for frequency domain solutions. See note below.

Returns:

  • A SimpleNamespace with the members

  • lam (1d ndarray; complex) – The vector of complex eigenvalues

  • ur (2d ndarray; complex) – Normalized complex right eigenvectors

  • ur_inv (2d ndarray; complex) – Inverse of right eigenvectors

  • dups (1d ndarray) – Index partition vector for repeated roots; it will be empty (np.array([])) if there are no repeated roots. For example, if only the second and third roots are duplicates of each other, dups will be np.array([1, 2]).

  • wn (1d ndarray; real) – Vector of natural frequencies (rad/sec) in the same order as lam (see get_freq_damping())

  • zeta (1d ndarray; real) – Vector of critical damping ratios (see get_freq_damping())

  • eig_success (bool) – True if routine is successful. False if the eigenvectors form a singular matrix or they do not diagonalize A; in that case, ODE solution (if computed) is most likely wrong.

Notes

The typical 2nd order ODE is:

\[M \ddot{q} + B \dot{q} + K q = F\]

The 2nd order ODE set of equations are transformed into the 1st order ODE (see make_A()):

\[\begin{split}\left\{ \begin{array}{c} \ddot{q} \\ \dot{q} \end{array} \right\} - \left[ \begin{array}{cc} -M^{-1} B & -M^{-1} K \\ I & 0 \end{array} \right] \left\{ \begin{array}{c} \dot{q} \\ q \end{array} \right\} = \left\{ \begin{array}{c} M^{-1} F \\ 0 \end{array} \right\}\end{split}\]

or:

\[\dot{y} - A y = w\]

When the M, B and K are assembled into the A matrix, they must not contain any rigid-body modes since the inverse of ur may not exist, causing the method to fail. If you seen any warning messages about a matrix being singular or near singular, the method has likely failed. Duplicate roots can also cause trouble, so if there are duplicates, check to see if ur_inv @ ur and ur_inv @ A @ ur are diagonal matrices (if not delcc, these would be identity and the eigenvalues, but if delcc is True, the factor of 2.0 discussed next has the chance to modify that). If method fails, see SolveExp1 or SolveExp2.

For underdamped modes, the complex eigenvalues and modes come in complex conjugate pairs. Each mode of a pair yields the same solution for real time-domain problems. This routine takes advantage of this fact (if delcc is True) by chopping out one of the pair and multiplying the other one by 2.0 (in ur). Then, if all modes are underdamped: len(lam) = M.shape[0] and if no modes are underdamped: len(lam) = 2*M.shape[0].