Skip to content

Commit

Permalink
unit tests with eigensolutions are painful
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcslater committed Jan 16, 2018
1 parent 064767a commit ccd3a71
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions vibrationtesting/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def mode_expansion_from_model(Psi, omega, M, K, measured):
Notes
-----
.. seealso:: incomplete multi-mode update. Would require each at a
different frequency.
different frequency.
"""
measured = measured.reshape(-1) # retained dofs
Expand Down Expand Up @@ -981,22 +981,22 @@ def ss_modal(A, B = None, C = None, D = None):
>>> Cd = Cv = np.zeros_like(Ca)
>>> A, B, C, D = vt.so2ss(M, Cso, K, Bt, Cd, Cv, Ca)
>>> Am, Bm, Cm, Dm, eigenvalues, modes = vt.ss_modal(A, B, C, D)
>>> print(Am)
[[-0.0044+1.8019j 0.0000+0.j 0.0000+0.j 0.0000+0.j -0.0000-0.j
-0.0000-0.j ]
[ 0.0000-0.j -0.0044-1.8019j 0.0000-0.j 0.0000-0.j -0.0000+0.j
-0.0000+0.j ]
[-0.0000+0.j 0.0000+0.j -0.0068+1.247j -0.0000-0.j 0.0000-0.j
0.0000-0.j ]
[ 0.0000-0.j -0.0000-0.j -0.0000+0.j -0.0068-1.247j
>>> print(Am+(0.00001+0.00001j))
[[-0.0013+0.4451j 0.0000+0.j 0.0000+0.j 0.0000+0.j 0.0000+0.j
0.0000+0.j ]
[ 0.0000+0.j -0.0013-0.445j 0.0000+0.j 0.0000+0.j 0.0000+0.j
0.0000+0.j ]
[ 0.0000+0.j 0.0000+0.j -0.0068+1.247j 0.0000+0.j 0.0000+0.j
0.0000+0.j ]
[ 0.0000+0.j 0.0000+0.j 0.0000+0.j -0.0068-1.247j
0.0000+0.j 0.0000+0.j ]
[ 0.0000-0.j 0.0000+0.j -0.0000-0.j 0.0000-0.j
-0.0013+0.445j -0.0000-0.j ]
[ 0.0000-0.j 0.0000+0.j 0.0000+0.j -0.0000+0.j -0.0000+0.j
-0.0013-0.445j ]]
[ 0.0000+0.j 0.0000+0.j 0.0000+0.j 0.0000+0.j
-0.0044+1.8019j 0.0000+0.j ]
[ 0.0000+0.j 0.0000+0.j 0.0000+0.j 0.0000+0.j 0.0000+0.j
-0.0044-1.8019j]]
>>> print(Cm)
[[ 0.0241-0.9307j 0.0241+0.9307j 0.0039-0.717j 0.0039+0.717j
0.0594-0.0001j 0.0594+0.0001j]]
[[ 0.0594-0.0001j 0.0594+0.0001j 0.0039-0.717j 0.0039+0.717j
0.0241-0.9307j 0.0241+0.9307j]]
"""
if B is None:
Expand Down

0 comments on commit ccd3a71

Please sign in to comment.