Repository: ross-rotordynamics/ross
Pull request #58 (2019-03-04 00:14:24)

Examples taken from Frisswell and New rotor save format
Some examples taken from Frisswell textbook and new format for saving rotors.


Patch:
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..341534d5
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,30 @@
+environment:
+
+  matrix:
+    - PYTHON: "C:\\Python36"
+    - PYTHON: "C:\\Python37"
+    - PYTHON: "C:\\Python36-x64"
+    - PYTHON: "C:\\Python37-x64"
+
+install:
+  - "%PYTHON%\\python.exe -m pip install wheel"
+  - "%PYTHON%\\python.exe -m pip install numpy"
+  - "%PYTHON%\\python.exe -m pip install scipy"
+  - "%PYTHON%\\python.exe -m pip install matplotlib"
+  - "%PYTHON%\\python.exe -m pip install toml"
+  - "%PYTHON%\\python.exe -m pip install pytest"
+  - "%PYTHON%\\python.exe -m pip install pandas"
+  - "%PYTHON%\\python.exe -m pip install coverage"
+
+build: off
+
+test_script:
+  - "%PYTHON%\\python.exe setup.py test"
+
+after_test:
+  - "%PYTHON%\\python.exe setup.py bdist_wheel"
+  - "%PYTHON%\\python.exe setup.py bdist_wheel"
+
+artifacts:
+  - path: dist\*
+
diff --git a/doc/conf.py b/doc/conf.py
index 73ca87f8..f3d641c4 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -14,20 +14,21 @@
 #
 import os
 import sys
+
 # sys.path.insert(0, os.path.abspath('.'))
 
-sys.path.append(os.path.abspath('../../ross'))
+sys.path.append(os.path.abspath("../../ross"))
 
 # -- Project information -----------------------------------------------------
 
-project = 'ross'
-copyright = '2019, Team Ross'
-author = 'Team Ross'
+project = "ross"
+copyright = "2019, Team Ross"
+author = "Team Ross"
 
 # The short X.Y version
-version = ''
+version = ""
 # The full version, including alpha/beta/rc tags
-release = '1.0'
+release = "1.0"
 
 
 # -- General configuration ---------------------------------------------------
@@ -48,15 +49,15 @@ extensions = [
     # 'sphinx.ext.autosummary',
     # 'sphinx.ext.doctest',
     # 'sphinx.ext.inheritance_diagram',
-    'sphinx.ext.githubpages',
-    'sphinx.ext.autodoc',
-    'sphinx.ext.autosummary',
-    'sphinx.ext.doctest',
-    'sphinx.ext.todo',
-    'sphinx.ext.imgmath',
-    'sphinx.ext.viewcode',
-    'sphinx.ext.coverage',
-    'numpydoc',
+    "sphinx.ext.githubpages",
+    "sphinx.ext.autodoc",
+    "sphinx.ext.autosummary",
+    "sphinx.ext.doctest",
+    "sphinx.ext.todo",
+    "sphinx.ext.imgmath",
+    "sphinx.ext.viewcode",
+    "sphinx.ext.coverage",
+    "numpydoc",
     # 'plot_generator',
     # 'plot_directive',
     # 'ipython_directive',
@@ -65,16 +66,16 @@ extensions = [
 ]
 
 # Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
 
 # The suffix(es) of source filenames.
 # You can specify multiple suffix as a list of string:
 #
 # source_suffix = ['.rst', '.md']
-source_suffix = '.rst'
+source_suffix = ".rst"
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = "index"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -86,7 +87,7 @@ language = None
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 # This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = None
@@ -97,7 +98,7 @@ pygments_style = None
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 #
-html_theme = 'haiku'
+html_theme = "haiku"
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -108,7 +109,7 @@ html_theme = 'haiku'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ["_static"]
 
 # Custom sidebar templates, must be a dictionary that maps document names
 # to template names.
@@ -124,7 +125,7 @@ html_static_path = ['_static']
 # -- Options for HTMLHelp output ---------------------------------------------
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'rossdoc'
+htmlhelp_basename = "rossdoc"
 
 
 # -- Options for LaTeX output ------------------------------------------------
@@ -133,15 +134,12 @@ latex_elements = {
     # The paper size ('letterpaper' or 'a4paper').
     #
     # 'papersize': 'letterpaper',
-
     # The font size ('10pt', '11pt' or '12pt').
     #
     # 'pointsize': '10pt',
-
     # Additional stuff for the LaTeX preamble.
     #
     # 'preamble': '',
-
     # Latex figure (float) alignment
     #
     # 'figure_align': 'htbp',
@@ -151,8 +149,7 @@ latex_elements = {
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    (master_doc, 'ross.tex', 'ross Documentation',
-     'Team Ross', 'manual'),
+    (master_doc, "ross.tex", "ross Documentation", "Team Ross", "manual")
 ]
 
 
@@ -160,10 +157,7 @@ latex_documents = [
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
-man_pages = [
-    (master_doc, 'ross', 'ross Documentation',
-     [author], 1)
-]
+man_pages = [(master_doc, "ross", "ross Documentation", [author], 1)]
 
 
 # -- Options for Texinfo output ----------------------------------------------
@@ -172,9 +166,15 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    (master_doc, 'ross', 'ross Documentation',
-     author, 'ross', 'One line description of project.',
-     'Miscellaneous'),
+    (
+        master_doc,
+        "ross",
+        "ross Documentation",
+        author,
+        "ross",
+        "One line description of project.",
+        "Miscellaneous",
+    )
 ]
 
 
@@ -193,7 +193,7 @@ epub_title = project
 # epub_uid = ''
 
 # A list of files that should not be packed into the epub file.
-epub_exclude_files = ['search.html']
+epub_exclude_files = ["search.html"]
 
 
-# -- Extension configuration -------------------------------------------------
\ No newline at end of file
+# -- Extension configuration -------------------------------------------------
diff --git a/ross/__init__.py b/ross/__init__.py
index 511ccd4d..5ce0d81a 100644
--- a/ross/__init__.py
+++ b/ross/__init__.py
@@ -1,2 +1,15 @@
-from . import materials
+from . import materials as mtr
 from . import element
+from . import bearing_seal_element as bse
+from . import disk_element as disk
+from . import results as rst
+from . import rotor_assembly as rotor
+from . import shaft_element as shaft
+from .materials import *
+from .rotor_assembly import *
+from .disk_element import *
+from .shaft_element import *
+from .shaft_element import *
+from .results import *
+from .bearing_seal_element import *
+from .element import *
diff --git a/ross/bearing_seal_element.py b/ross/bearing_seal_element.py
index 1709c0c5..f9c5d2f2 100644
--- a/ross/bearing_seal_element.py
+++ b/ross/bearing_seal_element.py
@@ -4,6 +4,7 @@ import scipy.interpolate as interpolate
 import matplotlib.pyplot as plt
 import matplotlib.patches as mpatches
 from ross.element import Element
+import pytest
 
 __all__ = ["BearingElement", "SealElement"]
 
@@ -35,6 +36,12 @@ class _Coefficient:
         else:
             self.interpolated = lambda x: np.array(self.coefficient[0])
 
+    def __eq__(self, other):
+        if pytest.approx(self.__dict__["coefficient"]) == other.__dict__["coefficient"]:
+            return True
+        else:
+            return False
+
     def plot(self, ax=None, **kwargs):
         if ax is None:
             ax = plt.gca()
@@ -120,7 +127,7 @@ class BearingElement(Element):
         for arg in args:
             if arg[0] == "k":
                 coefficients[arg] = _Stiffness_Coefficient(
-                    args_dict[arg], args_dict["w"]
+                    coefficient=args_dict[arg], w=args_dict["w"]
                 )
             else:
                 coefficients[arg] = _Damping_Coefficient(args_dict[arg], args_dict["w"])
@@ -153,6 +160,28 @@ class BearingElement(Element):
     def __repr__(self):
         return "%s" % self.__class__.__name__
 
+    def __eq__(self, other):
+        try:
+            if pytest.approx(self.__dict__) == other.__dict__:
+                return True
+            else:
+                return False
+
+        except TypeError:
+
+            self_dict = self.__dict__
+            other_dict = other.__dict__
+
+            self_dict["w"] = 0
+            other_dict["w"] = 0
+
+            if (
+                self.__dict__["w"] == other.__dict__["w"]
+            ).__bool__() and self_dict == other_dict:
+                return True
+            else:
+                return False
+
     def M(self):
         M = np.zeros((4, 4))
 
diff --git a/ross/disk_element.py b/ross/disk_element.py
index c257a10d..8ba10f0c 100644
--- a/ross/disk_element.py
+++ b/ross/disk_element.py
@@ -1,7 +1,7 @@
 import numpy as np
 import matplotlib.patches as mpatches
 from ross.element import Element
-
+import pytest
 
 __all__ = ["DiskElement"]
 
@@ -40,6 +40,26 @@ class DiskElement(Element):
         self.Ip = Ip
         self.color = "#bc625b"
 
+    def __eq__(self, other):
+        false_number = 0
+        for i in self.__dict__:
+            try:
+                if pytest.approx(self.__dict__[i]) == other.__dict__[i]:
+                    pass
+                else:
+                    false_number += 1
+
+            except TypeError:
+                if self.__dict__[i] == other.__dict__[i]:
+                    pass
+                else:
+                    false_number += 1
+
+        if false_number == 0:
+            return True
+        else:
+            return False
+
     def M(self):
         """
         This method will return the mass matrix for an instance of a disk
diff --git a/ross/materials.py b/ross/materials.py
index 66883449..9af43469 100644
--- a/ross/materials.py
+++ b/ross/materials.py
@@ -60,6 +60,12 @@ class Material:
         elif self.Poisson is None:
             self.Poisson = (self.E / (2 * self.G_s)) - 1
 
+    def __eq__(self, other):
+        if self.__dict__ == other.__dict__:
+            return True
+        else:
+            return False
+
     @staticmethod
     def dump_data(data):
         with open("available_materials.toml", "w") as f:
diff --git a/ross/results.py b/ross/results.py
index bd58caa4..5dca46a4 100644
--- a/ross/results.py
+++ b/ross/results.py
@@ -85,11 +85,11 @@ class CampbellResults(Results):
         whirl = self[..., 2]
         speed_range = self[..., 3]
 
-        default_values = dict(cmap="RdBu", vmin=0.1, vmax=2., s=20, alpha=0.5)
+        default_values = dict(cmap="RdBu", vmin=0.1, vmax=2.0, s=20, alpha=0.5)
         for k, v in default_values.items():
             kwargs.setdefault(k, v)
 
-        for mark, whirl_dir in zip(["^", "o", "v"], [0., 0.5, 1.]):
+        for mark, whirl_dir in zip(["^", "o", "v"], [0.0, 0.5, 1.0]):
             num_frequencies = wd.shape[1]
             for i in range(num_frequencies):
                 if wn is True:
diff --git a/ross/rotor_assembly.py b/ross/rotor_assembly.py
index 43659d96..856d28c9 100644
--- a/ross/rotor_assembly.py
+++ b/ross/rotor_assembly.py
@@ -1,6 +1,5 @@
 import os
 import warnings
-import pickle
 import numpy as np
 import pandas as pd
 import scipy.linalg as la
@@ -9,11 +8,11 @@ import scipy.signal as signal
 import scipy.io as sio
 from copy import copy
 from collections import Iterable
-
+import shutil
 import matplotlib as mpl
 import matplotlib.pyplot as plt
 from cycler import cycler
-
+from pathlib import Path
 from ross.bearing_seal_element import BearingElement
 from ross.disk_element import DiskElement
 from ross.shaft_element import ShaftElement
@@ -24,7 +23,8 @@ from ross.results import (
     ForcedResponseResults,
     ModeShapeResults,
 )
-
+import toml
+import ross
 
 __all__ = ["Rotor", "rotor_example"]
 
@@ -124,6 +124,14 @@ class Rotor(object):
         rated_w=None,
     ):
 
+        self.parameters = {
+            "w": w,
+            "sparse": True,
+            "n_eigen": n_eigen,
+            "min_w": min_w,
+            "max_w": max_w,
+            "rated_w": rated_w,
+        }
         self._w = w
 
         ####################################################
@@ -259,10 +267,16 @@ class Rotor(object):
 
         #  diameter at node position
 
-        # call self._calc_system() to calculate current evalues and evectors
-        self._calc_system()
+        self.plot_rotor()
+        print("To calculate eigenvalues and frequencies, use the method run().")
 
-    def _calc_system(self):
+    def __eq__(self, other):
+        if self.elements == other.elements and self.parameters == other.parameters:
+            return True
+        else:
+            return False
+
+    def run(self):
         self.evalues, self.evectors = self._eigen(self.w)
         wn_len = len(self.evalues) // 2
         self.wn = (np.absolute(self.evalues))[:wn_len]
@@ -284,7 +298,7 @@ class Rotor(object):
     @w.setter
     def w(self, value):
         self._w = value
-        self._calc_system()
+        self.run()
 
     def _dofs(self, element):
 
@@ -1028,7 +1042,7 @@ class Rotor(object):
 
         #  plot shaft centerline
         shaft_end = self.nodes_pos[-1]
-        ax.plot([-.2 * shaft_end, 1.2 * shaft_end], [0, 0], "k-.")
+        ax.plot([-0.2 * shaft_end, 1.2 * shaft_end], [0, 0], "k-.")
         try:
             max_diameter = max([disk.o_d for disk in self.disk_elements])
         except (ValueError, AttributeError):
@@ -1371,8 +1385,111 @@ class Rotor(object):
         ----------
         file_name : str
         """
-        with open(file_name, "wb") as f:
-            pickle.dump(self, f)
+        main_path = os.path.dirname(ross.__file__)
+        path = Path(main_path)
+        path_rotors = path / "rotors"
+
+        if os.path.isdir(path_rotors / file_name):
+            if int(
+                input(
+                    "There is a rotor with this file_name, do you want to overwrite it? (1 for yes and 0 for no)"
+                )
+            ):
+                shutil.rmtree(path_rotors / file_name)
+            else:
+                return "The rotor was not saved."
+
+        os.chdir(path_rotors)
+        current = Path(".")
+
+        os.mkdir(file_name)
+        os.chdir(current / file_name)
+
+        with open("properties.toml", "w") as f:
+            toml.dump({"parameters": self.parameters}, f)
+        os.mkdir("results")
+        os.mkdir("elements")
+        current = Path(".")
+
+        os.chdir(current / "elements")
+
+        for element in self.shaft_elements:
+            Rotor.save_shaft_element(element, "shaft_elements.toml")
+        for element in self.disk_elements:
+            Rotor.save_disk_element(element, "disk_elements.toml")
+        for element in self.bearing_seal_elements:
+            Rotor.save_bearing_seal_element(element, "bearing_seal_elements.toml")
+        os.chdir(main_path)
+
+    @staticmethod
+    def save_bearing_seal_element(element, file_name):
+        data = Rotor.load_data(file_name)
+        if type(element.w) == np.ndarray:
+            try:
+                element.w[0]
+                w = list(element.w)
+            except IndexError:
+                w = []
+        data[file_name[:-6]][str(element.n)] = {
+            "n": element.n,
+            "kxx": element.kxx.coefficient[0],
+            "cxx": element.cxx.coefficient[0],
+            "kyy": element.kyy.coefficient[0],
+            "kxy": element.kxy.coefficient[0],
+            "kyx": element.kyx.coefficient[0],
+            "cyy": element.cyy.coefficient[0],
+            "cxy": element.cxy.coefficient[0],
+            "cyx": element.cyx.coefficient[0],
+            "w": w,
+        }
+        Rotor.dump_data(data, file_name)
+
+    @staticmethod
+    def save_shaft_element(element, file_name):
+        data = Rotor.load_data(file_name)
+        data[file_name[:-6]][str(element.n)] = {
+            "L": element.L,
+            "i_d": element.i_d,
+            "o_d": element.o_d,
+            "material": element.material,
+            "n": element.n,
+            "axial_force": element.axial_force,
+            "torque": element.torque,
+            "shear_effects": element.shear_effects,
+            "rotary_inertia": element.rotary_inertia,
+            "gyroscopic": element.gyroscopic,
+            "shear_method_calc": element.shear_method_calc,
+        }
+        Rotor.dump_data(data, file_name)
+
+    @staticmethod
+    def save_disk_element(element, file_name):
+        data = Rotor.load_data(file_name)
+        data[file_name[:-6]][str(element.n)] = {
+            "n": element.n,
+            "m": element.m,
+            "Id": element.Id,
+            "Ip": element.Ip,
+        }
+        Rotor.dump_data(data, file_name)
+
+    @staticmethod
+    def load_data(file_name):
+        try:
+            with open(file_name, "r") as f:
+                data = toml.load(f)
+                if data == {"": {}}:
+                    data = {file_name[:-6]: {}}
+
+        except FileNotFoundError:
+            data = {file_name[:-6]: {}}
+            Rotor.dump_data(data, file_name)
+        return data
+
+    @staticmethod
+    def dump_data(data, file_name):
+        with open(file_name, "w") as f:
+            toml.dump(data, f)
 
     @staticmethod
     def load(file_name):
@@ -1386,8 +1503,82 @@ class Rotor(object):
         -------
         rotor : ross.rotor.Rotor
         """
-        with open(file_name, "rb") as f:
-            return pickle.load(f)
+        main_path = os.path.dirname(ross.__file__)
+        rotor_path = Path(main_path) / "rotors" / file_name
+        try:
+            os.chdir(rotor_path / "elements")
+        except FileNotFoundError:
+            return "A rotor with this name does not exist, check the rotors folder."
+
+        shaft_elements = []
+        with open("shaft_elements.toml", "r") as f:
+            shaft_elements_dict = toml.load(f)
+            for element in shaft_elements_dict["shaft_element"]:
+                shaft_elements.append(
+                    ShaftElement(**shaft_elements_dict["shaft_element"][element])
+                )
+        os.chdir(rotor_path / "elements")
+
+        disk_elements = []
+        with open("disk_elements.toml", "r") as f:
+            disk_elements_dict = toml.load(f)
+            for element in disk_elements_dict["disk_element"]:
+                disk_elements.append(
+                    DiskElement(**disk_elements_dict["disk_element"][element])
+                )
+        os.chdir(rotor_path / "elements")
+
+        bearing_seal_elements = []
+        bearing_seal_elements_dict = Rotor.load_data("bearing_seal_elements.toml")
+        for element in bearing_seal_elements_dict["bearing_seal_element"]:
+            bearing = BearingElement(
+                **bearing_seal_elements_dict["bearing_seal_element"][element]
+            )
+            bearing.kxx.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["kxx"]
+            ]
+            bearing.kxy.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["kxy"]
+            ]
+            bearing.kyx.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["kyx"]
+            ]
+            bearing.kyy.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["kyy"]
+            ]
+            bearing.cxx.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["cxx"]
+            ]
+            bearing.cxy.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["cxy"]
+            ]
+            bearing.cyx.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["cyx"]
+            ]
+            bearing.cyy.coefficient = [
+                bearing_seal_elements_dict["bearing_seal_element"][element]["cyy"]
+            ]
+            bearing_seal_elements.append(bearing)
+
+        os.chdir(rotor_path)
+        with open("properties.toml", "r") as f:
+            parameters = toml.load(f)["parameters"]
+
+        os.chdir(main_path)
+        return Rotor(
+            shaft_elements=shaft_elements,
+            bearing_seal_elements=bearing_seal_elements,
+            disk_elements=disk_elements,
+            **parameters,
+        )
+
+    @staticmethod
+    def available_rotors():
+        return [x for x in os.listdir(Path(os.path.dirname(ross.__file__)) / "rotors")]
+
+    @staticmethod
+    def remove(rotor_name):
+        shutil.rmtree(Path(os.path.dirname(ross.__file__)) / "rotors" / rotor_name)
 
 
 def rotor_example():
@@ -1422,8 +1613,12 @@ def rotor_example():
         for l in L
     ]
 
-    disk0 = DiskElement(2, steel, 0.07, 0.05, 0.28)
-    disk1 = DiskElement(4, steel, 0.07, 0.05, 0.35)
+    disk0 = DiskElement.from_geometry(
+        n=2, material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = DiskElement.from_geometry(
+        n=4, material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
 
     stfx = 1e6
     stfy = 0.8e6
diff --git a/ross/rotors/Rotor_format/elements/bearing_seal_elements.toml b/ross/rotors/Rotor_format/elements/bearing_seal_elements.toml
new file mode 100644
index 00000000..40d2056d
--- /dev/null
+++ b/ross/rotors/Rotor_format/elements/bearing_seal_elements.toml
@@ -0,0 +1,23 @@
+[bearing_seal_element.0]
+n = 0
+kxx = 10000000.0
+cxx = 0
+kyy = 10000000.0
+kxy = 0
+kyx = 0
+cyy = 0
+cxy = 0
+cyx = 10000000.0
+w = []
+
+[bearing_seal_element.32]
+n = 32
+kxx = 10000000.0
+cxx = 0
+kyy = 10000000.0
+kxy = 0
+kyx = 0
+cyy = 0
+cxy = 0
+cyx = 10000000.0
+w = []
diff --git a/ross/rotors/Rotor_format/elements/disk_elements.toml b/ross/rotors/Rotor_format/elements/disk_elements.toml
new file mode 100644
index 00000000..1b688950
--- /dev/null
+++ b/ross/rotors/Rotor_format/elements/disk_elements.toml
@@ -0,0 +1,5 @@
+[disk_element.48]
+n = 48
+m = 51.5252611115262
+Id = 0.4235805840543383
+Ip = 0.8050822048675969
diff --git a/ross/rotors/Rotor_format/elements/shaft_elements.toml b/ross/rotors/Rotor_format/elements/shaft_elements.toml
new file mode 100644
index 00000000..e8f31a97
--- /dev/null
+++ b/ross/rotors/Rotor_format/elements/shaft_elements.toml
@@ -0,0 +1,623 @@
+[shaft_element.0]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 0
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.1]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 1
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.2]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 2
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.3]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 3
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.4]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 4
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.5]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 5
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.6]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 6
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.7]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 7
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.8]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 8
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.9]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 9
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.10]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 10
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.11]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 11
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.12]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 12
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.13]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 13
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.14]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 14
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.15]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 15
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.16]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 16
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.17]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 17
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.18]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 18
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.19]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 19
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.20]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 20
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.21]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 21
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.22]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 22
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.23]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 23
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.24]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 24
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.25]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 25
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.26]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 26
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.27]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 27
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.28]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 28
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.29]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 29
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.30]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 30
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.31]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 31
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.32]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 32
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.33]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 33
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.34]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 34
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.35]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 35
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.36]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 36
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.37]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 37
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.38]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 38
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.39]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 39
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.40]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 40
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.41]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 41
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.42]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 42
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.43]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 43
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.44]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 44
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.45]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 45
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.46]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 46
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
+
+[shaft_element.47]
+L = 0.03125
+i_d = 0.0
+o_d = 0.05
+material = "Steel"
+n = 47
+axial_force = 0
+torque = 0
+shear_effects = true
+rotary_inertia = true
+gyroscopic = true
+shear_method_calc = "cowper"
diff --git a/ross/rotors/Rotor_format/properties.toml b/ross/rotors/Rotor_format/properties.toml
new file mode 100644
index 00000000..89bdab9e
--- /dev/null
+++ b/ross/rotors/Rotor_format/properties.toml
@@ -0,0 +1,4 @@
+[parameters]
+w = 0
+sparse = true
+n_eigen = 12
diff --git a/ross/shaft_element.py b/ross/shaft_element.py
index c2b0b511..dc6f2816 100644
--- a/ross/shaft_element.py
+++ b/ross/shaft_element.py
@@ -1,6 +1,11 @@
 import numpy as np
 import matplotlib.patches as mpatches
 from ross.element import Element
+from ross.materials import steel
+from ross.materials import Material
+import os
+import ross
+from pathlib import Path
 
 __all__ = ["ShaftElement"]
 
@@ -95,11 +100,17 @@ class ShaftElement(Element):
         shear_method_calc="cowper",
     ):
 
-        self.material = material
+        if type(material) is str:
+            os.chdir(Path(os.path.dirname(ross.__file__)))
+            self.material = Material.use_material(material)
+        else:
+            self.material = material
+
         self.shear_effects = shear_effects
         self.rotary_inertia = rotary_inertia
         self.gyroscopic = gyroscopic
-
+        self.axial_force = axial_force
+        self.torque = torque
         self._n = n
         self.n_l = n
         self.n_r = None
@@ -117,6 +128,7 @@ class ShaftElement(Element):
         self.o_d_l = float(o_d)
         self.i_d_r = float(i_d)
         self.o_d_r = float(o_d)
+        self.color = self.material.color
 
         self.A = np.pi * (o_d ** 2 - i_d ** 2) / 4
         self.volume = self.A * self.L
@@ -161,6 +173,12 @@ class ShaftElement(Element):
 
         self.phi = phi
 
+    def __eq__(self, other):
+        if self.__dict__ == other.__dict__:
+            return True
+        else:
+            return False
+
     @property
     def n(self):
         return self._n
@@ -173,7 +191,12 @@ class ShaftElement(Element):
             self.n_r = value + 1
 
     def __repr__(self):
-        return f"{self.__class__.__name__}" f"(L={self.L:{0}.{5}}, i_d={self.i_d:{0}.{5}}, " f"o_d={self.o_d:{0}.{5}}, material={self.material!r}, " f"n={self.n})"
+        return (
+            f"{self.__class__.__name__}"
+            f"(L={self.L:{0}.{5}}, i_d={self.i_d:{0}.{5}}, "
+            f"o_d={self.o_d:{0}.{5}}, material={self.material!r}, "
+            f"n={self.n})"
+        )
 
     def __str__(self):
         return (
diff --git a/setup.py b/setup.py
index b05f5afb..5a4f232a 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,16 @@ REQUIRES_PYTHON = ">=3.6.0"
 VERSION = "0.0.1"
 
 # What packages are required for this module to be executed?
-REQUIRED = ["numpy", "scipy", "matplotlib", "toml", "pandas"]
+REQUIRED = [
+    "numpy",
+    "scipy",
+    "matplotlib",
+    "toml",
+    "pandas",
+    "pytest",
+    "bokeh",
+    "coverage",
+]
 
 # What packages are optional?
 EXTRAS = {


Test patch:
diff --git a/ross/tests/test_bearing_seal_element.py b/ross/tests/test_bearing_seal_element.py
index b0d1ae66..8c5a54fb 100644
--- a/ross/tests/test_bearing_seal_element.py
+++ b/ross/tests/test_bearing_seal_element.py
@@ -7,22 +7,22 @@ from ross.bearing_seal_element import BearingElement
 
 @pytest.fixture
 def bearing0():
-    Kxx_bearing = np.array([8.5e+07, 1.1e+08, 1.3e+08, 1.6e+08, 1.8e+08,
-                           2.0e+08, 2.3e+08, 2.5e+08, 2.6e+08])
-    Kyy_bearing = np.array([9.2e+07, 1.1e+08, 1.4e+08, 1.6e+08, 1.9e+08,
-                            2.1e+08, 2.3e+08, 2.5e+08, 2.6e+08])
-    Cxx_bearing = np.array([226837, 211247, 197996, 185523, 174610,
-                            163697, 153563, 144209, 137973])
-    Cyy_bearing = np.array([235837, 211247, 197996, 185523, 174610,
-                            163697, 153563, 144209, 137973])
-    wb = np.array([314.2, 418.9, 523.6, 628.3, 733.,
-                   837.8, 942.5, 1047.2, 1151.9])
-    bearing0 = BearingElement(4,
-                              kxx=Kxx_bearing,
-                              kyy=Kyy_bearing,
-                              cxx=Cxx_bearing,
-                              cyy=Cyy_bearing,
-                              w=wb)
+    Kxx_bearing = np.array(
+        [8.5e07, 1.1e08, 1.3e08, 1.6e08, 1.8e08, 2.0e08, 2.3e08, 2.5e08, 2.6e08]
+    )
+    Kyy_bearing = np.array(
+        [9.2e07, 1.1e08, 1.4e08, 1.6e08, 1.9e08, 2.1e08, 2.3e08, 2.5e08, 2.6e08]
+    )
+    Cxx_bearing = np.array(
+        [226837, 211247, 197996, 185523, 174610, 163697, 153563, 144209, 137973]
+    )
+    Cyy_bearing = np.array(
+        [235837, 211247, 197996, 185523, 174610, 163697, 153563, 144209, 137973]
+    )
+    wb = np.array([314.2, 418.9, 523.6, 628.3, 733.0, 837.8, 942.5, 1047.2, 1151.9])
+    bearing0 = BearingElement(
+        4, kxx=Kxx_bearing, kyy=Kyy_bearing, cxx=Cxx_bearing, cyy=Cyy_bearing, w=wb
+    )
     return bearing0
 
 
@@ -49,22 +49,30 @@ def test_bearing_interpol_cyy(bearing0):
 @pytest.fixture
 def bearing1():
     # using lists
-    Kxx_bearing = [8.5e+07, 1.1e+08, 1.3e+08, 1.6e+08, 1.8e+08,
-                   2.0e+08, 2.3e+08, 2.5e+08, 2.6e+08]
-    Kyy_bearing = np.array([9.2e+07, 1.1e+08, 1.4e+08, 1.6e+08, 1.9e+08,
-                            2.1e+08, 2.3e+08, 2.5e+08, 2.6e+08])
-    Cxx_bearing = np.array([226837, 211247, 197996, 185523, 174610,
-                            163697, 153563, 144209, 137973])
-    Cyy_bearing = np.array([235837, 211247, 197996, 185523, 174610,
-                            163697, 153563, 144209, 137973])
-    wb = [314.2, 418.9, 523.6, 628.3, 733.,
-          837.8, 942.5, 1047.2, 1151.9]
-    bearing1 = BearingElement(4,
-                              kxx=Kxx_bearing,
-                              kyy=Kyy_bearing,
-                              cxx=Cxx_bearing,
-                              cyy=Cyy_bearing,
-                              w=wb)
+    Kxx_bearing = [
+        8.5e07,
+        1.1e08,
+        1.3e08,
+        1.6e08,
+        1.8e08,
+        2.0e08,
+        2.3e08,
+        2.5e08,
+        2.6e08,
+    ]
+    Kyy_bearing = np.array(
+        [9.2e07, 1.1e08, 1.4e08, 1.6e08, 1.9e08, 2.1e08, 2.3e08, 2.5e08, 2.6e08]
+    )
+    Cxx_bearing = np.array(
+        [226837, 211247, 197996, 185523, 174610, 163697, 153563, 144209, 137973]
+    )
+    Cyy_bearing = np.array(
+        [235837, 211247, 197996, 185523, 174610, 163697, 153563, 144209, 137973]
+    )
+    wb = [314.2, 418.9, 523.6, 628.3, 733.0, 837.8, 942.5, 1047.2, 1151.9]
+    bearing1 = BearingElement(
+        4, kxx=Kxx_bearing, kyy=Kyy_bearing, cxx=Cxx_bearing, cyy=Cyy_bearing, w=wb
+    )
     return bearing1
 
 
@@ -94,22 +102,25 @@ def test_bearing_error1():
     cx = 1e8 * speed
     with pytest.raises(Exception) as excinfo:
         BearingElement(-1, kxx=kx, cxx=cx)
-    assert 'Arguments (coefficients and w)' \
-           ' must have the same dimension' in str(excinfo.value)
+    assert "Arguments (coefficients and w)" " must have the same dimension" in str(
+        excinfo.value
+    )
 
 
 def test_bearing_error2():
     with pytest.raises(ValueError) as excinfo:
-        BearingElement(4, kxx=[7e8, 8e8, 9e8],
-                       cxx=[0, 0, 0, 0], w=[10, 100, 1000, 10000])
-    assert 'Arguments (coefficients and w) ' \
-           'must have the same dimension' in str(excinfo.value)
+        BearingElement(
+            4, kxx=[7e8, 8e8, 9e8], cxx=[0, 0, 0, 0], w=[10, 100, 1000, 10000]
+        )
+    assert "Arguments (coefficients and w) " "must have the same dimension" in str(
+        excinfo.value
+    )
 
     with pytest.raises(ValueError) as excinfo:
-        BearingElement(4, kxx=[6e8, 7e8, 8e8, 9e8],
-                       cxx=[0, 0, 0, 0, 0])
-    assert 'Arguments (coefficients and w) ' \
-           'must have the same dimension' in str(excinfo.value)
+        BearingElement(4, kxx=[6e8, 7e8, 8e8, 9e8], cxx=[0, 0, 0, 0, 0])
+    assert "Arguments (coefficients and w) " "must have the same dimension" in str(
+        excinfo.value
+    )
 
 
 @pytest.fixture
diff --git a/ross/tests/test_disk_element.py b/ross/tests/test_disk_element.py
index 48b4e320..3ee6b683 100644
--- a/ross/tests/test_disk_element.py
+++ b/ross/tests/test_disk_element.py
@@ -11,16 +11,24 @@ def disk():
 
 
 def test_mass_matrix_disk(disk):
-    Md1 = np.array([[ 32.58973,   0.     ,   0.     ,   0.     ],
-                    [  0.     ,  32.58973,   0.     ,   0.     ],
-                    [  0.     ,   0.     ,   0.17809,   0.     ],
-                    [  0.     ,   0.     ,   0.     ,   0.17809]])
+    Md1 = np.array(
+        [
+            [32.58973, 0.0, 0.0, 0.0],
+            [0.0, 32.58973, 0.0, 0.0],
+            [0.0, 0.0, 0.17809, 0.0],
+            [0.0, 0.0, 0.0, 0.17809],
+        ]
+    )
     assert_almost_equal(disk.M(), Md1, decimal=5)
 
 
 def test_gyroscopic_matrix_disk(disk):
-    Gd1 = np.array([[ 0.     ,  0.     ,  0.     ,  0.     ],
-                    [ 0.     ,  0.     ,  0.     ,  0.     ],
-                    [ 0.     ,  0.     ,  0.     ,  0.32956],
-                    [ 0.     ,  0.     , -0.32956,  0.     ]])
+    Gd1 = np.array(
+        [
+            [0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.32956],
+            [0.0, 0.0, -0.32956, 0.0],
+        ]
+    )
     assert_almost_equal(disk.G(), Gd1, decimal=5)
diff --git a/ross/tests/test_examples.py b/ross/tests/test_examples.py
new file mode 100644
index 00000000..acdcd087
--- /dev/null
+++ b/ross/tests/test_examples.py
@@ -0,0 +1,337 @@
+from ross import *
+import numpy as np
+import pytest
+
+steel = mtr.steel
+
+
+def rotor_example1(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.1, page 206 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example1_w_equals0rpm() and test_example1_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.:Isotropic bearings.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5) * 0.5, material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5), material=steel, width=0.07, i_d=0.05, o_d=0.35
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e6, kyy=1e6, cxx=0, cyy=0)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e6, kyy=1e6, cxx=0, cyy=0)
+
+    return rotor.Rotor(shaft_elm, [disk0, disk1], [bearing0, bearing1], w=w)
+
+
+def test_example1_w_equals_0rpm():
+    ROT = rotor_example1(0, 6)
+    ROT.run()
+    assert ROT.wn == pytest.approx(
+        np.array([86.66, 86.66, 274.31, 274.31, 716.78, 716.78]), 1e-3
+    )
+
+
+def test_example1_w_equals_4000rpm():
+    ROT = rotor_example1(4000 * np.pi / 30, 6)
+    ROT.run()
+    assert ROT.wn == pytest.approx(
+        np.array([85.39, 87.80, 251.78, 294.71, 600.18, 827.08]), 1e-3
+    )
+
+
+def rotor_example2(w=0, n_el=48):
+    """
+    This function instantiate a overhung rotor similar to the example  5.9.9, page 218 (Dynamics of rotating machine,
+    FRISSWELL).
+    The following functions test_example2_w_equals0rpm() and test_example2_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.: Overhung rotor.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    return rotor.Rotor(
+        shaft_elm,
+        [
+            disk.DiskElement.from_geometry(
+                n=n_el, material=steel, width=0.07, i_d=0.05, o_d=0.35
+            )
+        ],
+        [
+            bse.BearingElement(n=0, kxx=10e6, kyy=10e6, cxx=0, cyy=0),
+            bse.BearingElement(n=int((n_el / 1.5)), kxx=10e6, kyy=10e6, cxx=0, cyy=0),
+        ],
+        w=w,
+    )
+
+
+def test_example2_w_eq_0rpm():
+    ROT = rotor_example2(0, 6)
+    ROT.run()
+    assert pytest.approx(ROT.wn, 1e-3) == np.array(
+        [90.14, 90.14, 630.73, 630.73, 830.43, 830.43]
+    )
+
+
+def test_example2_w_eq_4000rpm():
+    ROT = rotor_example2(4000 * np.pi / 30, 6)
+    ROT.run()
+    assert pytest.approx(ROT.wn, 1e-3) == np.array(
+        [76.19, 103.91, 565.99, 634.23, 647.75, 1174.2]
+    )
+
+
+def rotor_example3(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.2, page 208 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example3_w_equals0rpm() and test_example3_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.: Anisotropic bearings.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+    assert not n_el % 3, "n_el must be a multiple of 3"
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 3), material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5), material=steel, width=0.07, i_d=0.05, o_d=0.35
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e6, kyy=8e5, cxx=0, cyy=0)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e6, kyy=8e5, cxx=0, cyy=0)
+
+    return rotor.Rotor(shaft_elm, [disk0, disk1], [bearing0, bearing1], w=w)
+
+
+def test_example3_w_equals_0rpm():
+    ROT = rotor_example3(0, 48)
+    ROT.run()
+    assert pytest.approx(ROT.wn, 1e-3) == np.array(
+        [82.65, 86.66, 254.52, 274.31, 679.49, 716.79]
+    )
+
+
+def test_example3_w_equals_4000rpm():
+    ROT = rotor_example3(4000 * np.pi / 30, 48)
+    ROT.run()
+    assert pytest.approx(ROT.wn, 1e-3) == np.array(
+        [82.33, 86.86, 239.64, 287.25, 583.49, 806.89]
+    )
+
+
+def rotor_example4(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.5, page 212 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example4_w_equals0rpm() and test_example4_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.: Isotropic, damped bearings.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5) * 0.5, material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5), material=steel, width=0.07, i_d=0.05, o_d=0.35
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e6, kyy=1e6, cxx=3e3, cyy=3e3)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e6, kyy=1e6, cxx=3e3, cyy=3e3)
+
+    return rotor.Rotor(shaft_elm, [disk0, disk1], [bearing0, bearing1], w=w)
+
+
+def test_example4_w_equals_0rpm():
+    ROT = rotor_example4(0, 6)
+    ROT.run()
+    wn_hertz = ROT.wn / (2 * np.pi)
+    wd_hertz = ROT.wd / (2 * np.pi)
+    assert pytest.approx(wn_hertz, 1e-2) == np.array(
+        [13.91, 13.91, 48.18, 48.18, 137.06, 137.06]
+    )
+    assert pytest.approx(wd_hertz, 1e-2) == np.array(
+        [13.89, 13.89, 46.54, 46.54, 103.22, 103.22]
+    )
+
+
+def test_example4_w_equals_4000rpm():
+    ROT = rotor_example4((4000 * np.pi) / 30, 6)
+    ROT.run()
+    wn_hertz = ROT.wn / (2 * np.pi)
+    wd_hertz = ROT.wd / (2 * np.pi)
+    assert pytest.approx(wn_hertz, 1e-1) == np.array(
+        [13.70, 14.09, 43.61, 52.18, 122.37, 149.81]
+    )
+    assert pytest.approx(wd_hertz, 1e-1) == np.array(
+        [13.68, 14.07, 41.98, 50.65, 104.25, 105.66]
+    )
+
+
+def rotor_example5(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.3, page 209 (Dynamics of rotating machine, FRISSWELL)
+    The following function, test_example5_w_equals4000rpm() is the test function of
+    this example.
+
+    P.S.: Mixed Modes.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 3), material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5), material=steel, width=0.07, i_d=0.05, o_d=0.35
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e6, kyy=2e5, cxx=0, cyy=0)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e6, kyy=2e5, cxx=0, cyy=0)
+
+    return rotor.Rotor(shaft_elm, [disk0, disk1], [bearing0, bearing1], w=w)
+
+
+def test_example5_w_equals4000rpm():
+    ROT = rotor_example5((4000 * np.pi) / 30, 48)
+    ROT.run()
+    wn_hertz = ROT.wn / (2 * np.pi)
+    assert pytest.approx(wn_hertz, 1) == (
+        np.array([8.545, 13.77, 22.35, 44.06, 78.76, 120.4])
+    ) / (2 * np.pi)
+
+
+def rotor_example6(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.4, page 210 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example6_w_equals0rpm() and test_example6_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.:Cross-coupled bearings.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.05)
+        )
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5) * 0.5, material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+    disk1 = disk.DiskElement.from_geometry(
+        n=(n_el / 1.5), material=steel, width=0.07, i_d=0.05, o_d=0.35
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e6, kyy=1e6, cxx=0, kxy=5e5, cyy=0)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e6, kyy=1e6, cxx=0, kxy=5e5, cyy=0)
+
+    return rotor.Rotor(shaft_elm, [disk0, disk1], [bearing0, bearing1], w=w)
+
+
+def test_example6_w_equals4000rpm():
+    ROT = rotor_example6((4000 * np.pi) / 30, 48)
+    ROT.run()
+    wn_hertz = ROT.wn / (2 * np.pi)
+    assert pytest.approx(wn_hertz, 1) == (
+        np.array([11.66, 14.80, 33.97, 49.19, 97.97, 126.61])
+    )
+
+
+def rotor_example7(w=0, n_el=48):
+    """
+    This function instantiate a rotor similar to the example  5.9.10, page 219 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example7_w_equals0rpm() and test_example7_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.: Tapered shaft and damped bearings with anisotropic properties.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+    """
+    shaft_elm = []
+    for i in range(n_el):
+        shaft_elm.append(
+            shaft.ShaftElement(
+                L=1.5 / n_el, material=steel, n=i, i_d=0, o_d=0.025 + 0.015 * (i / n_el)
+            )
+        )
+
+    disk0 = disk.DiskElement.from_geometry(
+        n=(n_el / 2), material=steel, width=0.07, i_d=0.05, o_d=0.28
+    )
+
+    bearing0 = bse.BearingElement(n=0, kxx=1e7, kyy=1e7, cxx=1e3, cyy=1e3)
+    bearing1 = bse.BearingElement(n=n_el, kxx=1e7, kyy=1e7, cxx=1e3, cyy=1e3)
+
+    return rotor.Rotor(shaft_elm, [disk0], [bearing0, bearing1], w=w)
+
+
+def test_example7_w_equals3000rpm():
+    rotor0 = rotor_example7(w=3000 * np.pi / 30, n_el=48)
+    pass
+
+
+"""
+def rotor_example21(w, n_el):
+    
+    This function instantiate a rotor similar to the example  5.9.6, page 212 (Dynamics of rotating machine, FRISSWELL)
+    The following functions test_example5_w_equals0rpm() and test_example5_w_equals4000rpm() are the test functions of
+    this example.
+
+    P.S.: Hydrodynamic bearings.
+
+    :param w: speed of rotation.
+    :param n_el: number of shaft elements.
+    :return: Rotor object.
+   
+    
+"""
diff --git a/ross/tests/test_materials.py b/ross/tests/test_materials.py
index c59f04ea..2dea3da5 100644
--- a/ross/tests/test_materials.py
+++ b/ross/tests/test_materials.py
@@ -1,44 +1,50 @@
 import pytest
 from ross.materials import *
 from numpy.testing import assert_allclose
+import os
+import ross
 
+os.chdir(os.path.dirname(ross.__file__))
 
-AISI4140 = Material(name= 'AISI4140', rho = 7850,
-                    E=203200000000.0,
-                    Poisson=0.27,
-                    G_s=80000000000.0,
-                    color="#525252")
+AISI4140 = Material(
+    name="AISI4140",
+    rho=7850,
+    E=203200000000.0,
+    Poisson=0.27,
+    G_s=80000000000.0,
+    color="#525252",
+)
 
 
 def test_raise_name_material():
     with pytest.raises(AssertionError) as excinfo:
-        mat = Material('with space', rho=7850, G_s=80e9, Poisson=0.27)
-    assert 'Spaces are not allowed' in str(excinfo.value)
+        mat = Material("with space", rho=7850, G_s=80e9, Poisson=0.27)
+    assert "Spaces are not allowed" in str(excinfo.value)
 
 
 def test_E():
-    mat = Material(name='test', rho=7850, G_s=80e9, Poisson=0.27)
+    mat = Material(name="test", rho=7850, G_s=80e9, Poisson=0.27)
     assert_allclose(mat.E, 203.2e9)
     assert_allclose(mat.G_s, 80e9)
     assert_allclose(mat.Poisson, 0.27)
 
 
 def test_G_s():
-    mat = Material(name='test', rho=7850, E=203.2e9, Poisson=0.27)
+    mat = Material(name="test", rho=7850, E=203.2e9, Poisson=0.27)
     assert_allclose(mat.E, 203.2e9)
     assert_allclose(mat.G_s, 80e9)
     assert_allclose(mat.Poisson, 0.27)
 
 
 def test_Poisson():
-    mat = Material(name='test', rho=7850, E=203.2e9, G_s=80e9)
+    mat = Material(name="test", rho=7850, E=203.2e9, G_s=80e9)
     assert_allclose(mat.E, 203.2e9)
     assert_allclose(mat.G_s, 80e9)
     assert_allclose(mat.Poisson, 0.27)
 
 
 def test_E_G_s_Poisson():
-    mat = Material(name='test', rho=7850, E=203.2e9, G_s=80e9, Poisson=0.27)
+    mat = Material(name="test", rho=7850, E=203.2e9, G_s=80e9, Poisson=0.27)
     assert_allclose(mat.E, 203.2e9)
     assert_allclose(mat.G_s, 80e9)
     assert_allclose(mat.Poisson, 0.27)
@@ -53,15 +59,16 @@ def test_specific_material():
 
 def test_error_rho():
     with pytest.raises(TypeError) as ex:
-        Material(name='test', E=203.2e9, G_s=80e9)
+        Material(name="test", E=203.2e9, G_s=80e9)
 
     assert "__init__() missing 1 required positional argument: 'rho'" == str(ex.value)
 
 
 def test_error_E_G_s_Poisson():
     with pytest.raises(AssertionError) as ex:
-        Material(name='test', rho=785, E=203.2e9)
-    assert 'At least 2 arguments from E' in str(ex.value)
+        Material(name="test", rho=785, E=203.2e9)
+    assert "At least 2 arguments from E" in str(ex.value)
+
 
 # Serialization tests.
 
@@ -72,11 +79,11 @@ def test_available_materials():
 
 def test_serialization():
     available = Material.available_materials()
-    obj1 = Material(name='obj1', rho =92e1, E=281.21, G_s=20e9)
+    obj1 = Material(name="obj1", rho=92e1, E=281.21, G_s=20e9)
     obj1.save_material()
-    obj2 = Material.use_material('obj1')
+    obj2 = Material.use_material("obj1")
     assert obj1.__dict__ == obj2.__dict__
 
-    obj1.remove_material('obj1')
+    obj1.remove_material("obj1")
     available_after = Material.available_materials()
     assert available == available_after
diff --git a/ross/tests/test_rotor_assembly.py b/ross/tests/test_rotor_assembly.py
index cfbc9338..c7740145 100644
--- a/ross/tests/test_rotor_assembly.py
+++ b/ross/tests/test_rotor_assembly.py
@@ -19,14 +19,12 @@ def rotor1():
     i_d_ = 0
     o_d_ = 0.05
 
-    tim0 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
-    tim1 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
+    tim0 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
+    tim1 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
 
     shaft_elm = [tim0, tim1]
     return Rotor(shaft_elm, [], [])
@@ -46,25 +44,40 @@ def test_rotor_attributes(rotor1):
 
 
 def test_index_eigenvalues_rotor1(rotor1):
-    evalues = np.array([-3.8 + 68.6j, -3.8 - 68.6j, -1.8 + 30.j, -1.8 - 30.j, -0.7 + 14.4j, -0.7 - 14.4j])
-    evalues2 = np.array([0. + 68.7j, 0. - 68.7j, 0. + 30.1j, 0. - 30.1j, -0. + 14.4j, -0. - 14.4j])
+    evalues = np.array(
+        [
+            -3.8 + 68.6j,
+            -3.8 - 68.6j,
+            -1.8 + 30.0j,
+            -1.8 - 30.0j,
+            -0.7 + 14.4j,
+            -0.7 - 14.4j,
+        ]
+    )
+    evalues2 = np.array(
+        [0.0 + 68.7j, 0.0 - 68.7j, 0.0 + 30.1j, 0.0 - 30.1j, -0.0 + 14.4j, -0.0 - 14.4j]
+    )
     assert_almost_equal([4, 2, 0, 1, 3, 5], rotor1._index(evalues))
     assert_almost_equal([4, 2, 0, 1, 3, 5], rotor1._index(evalues2))
 
 
 def test_mass_matrix_rotor1(rotor1):
-    Mr1 = np.array([[ 1.421,  0.   ,  0.   ,  0.049,  0.496,  0.   ,  0.   , -0.031,  0.   ,  0.   ,  0.   ,  0.   ],
-                    [ 0.   ,  1.421, -0.049,  0.   ,  0.   ,  0.496,  0.031,  0.   ,  0.   ,  0.   ,  0.   ,  0.   ],
-                    [ 0.   , -0.049,  0.002,  0.   ,  0.   , -0.031, -0.002,  0.   ,  0.   ,  0.   ,  0.   ,  0.   ],
-                    [ 0.049,  0.   ,  0.   ,  0.002,  0.031,  0.   ,  0.   , -0.002,  0.   ,  0.   ,  0.   ,  0.   ],
-                    [ 0.496,  0.   ,  0.   ,  0.031,  2.841,  0.   ,  0.   ,  0.   ,  0.496,  0.   ,  0.   , -0.031],
-                    [ 0.   ,  0.496, -0.031,  0.   ,  0.   ,  2.841,  0.   ,  0.   ,  0.   ,  0.496,  0.031,  0.   ],
-                    [ 0.   ,  0.031, -0.002,  0.   ,  0.   ,  0.   ,  0.005,  0.   ,  0.   , -0.031, -0.002,  0.   ],
-                    [-0.031,  0.   ,  0.   , -0.002,  0.   ,  0.   ,  0.   ,  0.005,  0.031,  0.   ,  0.   , -0.002],
-                    [ 0.   ,  0.   ,  0.   ,  0.   ,  0.496,  0.   ,  0.   ,  0.031,  1.421,  0.   ,  0.   , -0.049],
-                    [ 0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.496, -0.031,  0.   ,  0.   ,  1.421,  0.049,  0.   ],
-                    [ 0.   ,  0.   ,  0.   ,  0.   ,  0.   ,  0.031, -0.002,  0.   ,  0.   ,  0.049,  0.002,  0.   ],
-                    [ 0.   ,  0.   ,  0.   ,  0.   , -0.031,  0.   ,  0.   , -0.002, -0.049,  0.   ,  0.   ,  0.002]])
+    Mr1 = np.array(
+        [
+            [1.421, 0.0, 0.0, 0.049, 0.496, 0.0, 0.0, -0.031, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 1.421, -0.049, 0.0, 0.0, 0.496, 0.031, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, -0.049, 0.002, 0.0, 0.0, -0.031, -0.002, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.049, 0.0, 0.0, 0.002, 0.031, 0.0, 0.0, -0.002, 0.0, 0.0, 0.0, 0.0],
+            [0.496, 0.0, 0.0, 0.031, 2.841, 0.0, 0.0, 0.0, 0.496, 0.0, 0.0, -0.031],
+            [0.0, 0.496, -0.031, 0.0, 0.0, 2.841, 0.0, 0.0, 0.0, 0.496, 0.031, 0.0],
+            [0.0, 0.031, -0.002, 0.0, 0.0, 0.0, 0.005, 0.0, 0.0, -0.031, -0.002, 0.0],
+            [-0.031, 0.0, 0.0, -0.002, 0.0, 0.0, 0.0, 0.005, 0.031, 0.0, 0.0, -0.002],
+            [0.0, 0.0, 0.0, 0.0, 0.496, 0.0, 0.0, 0.031, 1.421, 0.0, 0.0, -0.049],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.496, -0.031, 0.0, 0.0, 1.421, 0.049, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.031, -0.002, 0.0, 0.0, 0.049, 0.002, 0.0],
+            [0.0, 0.0, 0.0, 0.0, -0.031, 0.0, 0.0, -0.002, -0.049, 0.0, 0.0, 0.002],
+        ]
+    )
 
     assert_almost_equal(rotor1.M(), Mr1, decimal=3)
 
@@ -74,14 +87,12 @@ def test_raise_if_element_outside_shaft():
     i_d_ = 0
     o_d_ = 0.05
 
-    tim0 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
-    tim1 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
+    tim0 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
+    tim1 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
 
     shaft_elm = [tim0, tim1]
     disk0 = DiskElement.from_geometry(3, steel, 0.07, 0.05, 0.28)
@@ -92,11 +103,11 @@ def test_raise_if_element_outside_shaft():
 
     with pytest.raises(ValueError) as excinfo:
         Rotor(shaft_elm, [disk0])
-    assert 'Trying to set disk or bearing outside shaft' == str(excinfo.value)
+    assert "Trying to set disk or bearing outside shaft" == str(excinfo.value)
 
     with pytest.raises(ValueError) as excinfo:
         Rotor(shaft_elm, bearing_seal_elements=bearings)
-    assert 'Trying to set disk or bearing outside shaft' == str(excinfo.value)
+    assert "Trying to set disk or bearing outside shaft" == str(excinfo.value)
 
 
 @pytest.fixture
@@ -106,14 +117,12 @@ def rotor2():
     i_d_ = 0
     o_d_ = 0.05
 
-    tim0 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
-    tim1 = ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=True,
-                        rotary_inertia=True,
-                        gyroscopic=True)
+    tim0 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
+    tim1 = ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+    )
 
     shaft_elm = [tim0, tim1]
     disk0 = DiskElement.from_geometry(1, steel, 0.07, 0.05, 0.28)
@@ -125,100 +134,270 @@ def rotor2():
 
 
 def test_mass_matrix_rotor2(rotor2):
-    Mr2 = np.array([[  1.421,   0.   ,   0.   ,   0.049,   0.496,   0.   ,   0.   ,  -0.031,   0.   ,   0.   ,   0.   ,   0.   ],
-                    [  0.   ,   1.421,  -0.049,   0.   ,   0.   ,   0.496,   0.031,   0.   ,   0.   ,   0.   ,   0.   ,   0.   ],
-                    [  0.   ,  -0.049,   0.002,   0.   ,   0.   ,  -0.031,  -0.002,   0.   ,   0.   ,   0.   ,   0.   ,   0.   ],
-                    [  0.049,   0.   ,   0.   ,   0.002,   0.031,   0.   ,   0.   ,  -0.002,   0.   ,   0.   ,   0.   ,   0.   ],
-                    [  0.496,   0.   ,   0.   ,   0.031,  35.431,   0.   ,   0.   ,   0.   ,   0.496,   0.   ,   0.   ,  -0.031],
-                    [  0.   ,   0.496,  -0.031,   0.   ,   0.   ,  35.431,   0.   ,   0.   ,   0.   ,   0.496,   0.031,   0.   ],
-                    [  0.   ,   0.031,  -0.002,   0.   ,   0.   ,   0.   ,   0.183,   0.   ,   0.   ,  -0.031,  -0.002,   0.   ],
-                    [ -0.031,   0.   ,   0.   ,  -0.002,   0.   ,   0.   ,   0.   ,   0.183,   0.031,   0.   ,   0.   ,  -0.002],
-                    [  0.   ,   0.   ,   0.   ,   0.   ,   0.496,   0.   ,   0.   ,   0.031,   1.421,   0.   ,   0.   ,  -0.049],
-                    [  0.   ,   0.   ,   0.   ,   0.   ,   0.   ,   0.496,  -0.031,   0.   ,   0.   ,   1.421,   0.049,   0.   ],
-                    [  0.   ,   0.   ,   0.   ,   0.   ,   0.   ,   0.031,  -0.002,   0.   ,   0.   ,   0.049,   0.002,   0.   ],
-                    [  0.   ,   0.   ,   0.   ,   0.   ,  -0.031,   0.   ,   0.   ,  -0.002,  -0.049,   0.   ,   0.   ,   0.002]])
+    Mr2 = np.array(
+        [
+            [1.421, 0.0, 0.0, 0.049, 0.496, 0.0, 0.0, -0.031, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 1.421, -0.049, 0.0, 0.0, 0.496, 0.031, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, -0.049, 0.002, 0.0, 0.0, -0.031, -0.002, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.049, 0.0, 0.0, 0.002, 0.031, 0.0, 0.0, -0.002, 0.0, 0.0, 0.0, 0.0],
+            [0.496, 0.0, 0.0, 0.031, 35.431, 0.0, 0.0, 0.0, 0.496, 0.0, 0.0, -0.031],
+            [0.0, 0.496, -0.031, 0.0, 0.0, 35.431, 0.0, 0.0, 0.0, 0.496, 0.031, 0.0],
+            [0.0, 0.031, -0.002, 0.0, 0.0, 0.0, 0.183, 0.0, 0.0, -0.031, -0.002, 0.0],
+            [-0.031, 0.0, 0.0, -0.002, 0.0, 0.0, 0.0, 0.183, 0.031, 0.0, 0.0, -0.002],
+            [0.0, 0.0, 0.0, 0.0, 0.496, 0.0, 0.0, 0.031, 1.421, 0.0, 0.0, -0.049],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.496, -0.031, 0.0, 0.0, 1.421, 0.049, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.031, -0.002, 0.0, 0.0, 0.049, 0.002, 0.0],
+            [0.0, 0.0, 0.0, 0.0, -0.031, 0.0, 0.0, -0.002, -0.049, 0.0, 0.0, 0.002],
+        ]
+    )
     assert_almost_equal(rotor2.M(), Mr2, decimal=3)
 
 
 def test_a0_0_matrix_rotor2(rotor2):
-    A0_0 = np.array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]])
+    A0_0 = np.array(
+        [
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+        ]
+    )
     assert_almost_equal(rotor2.A()[:12, :12], A0_0, decimal=3)
 
 
 def test_a0_1_matrix_rotor2(rotor2):
-    A0_1 = np.array([[ 1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  1.]])
+    A0_1 = np.array(
+        [
+            [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
+        ]
+    )
     assert_almost_equal(rotor2.A()[:12, 12:24], A0_1, decimal=3)
 
 
 def test_a1_0_matrix_rotor2(rotor2):
-    A1_0 = np.array([[  20.63 ,   -0.   ,    0.   ,    4.114,  -20.958,    0.   ,    0.   ,    1.11 ,    0.056,   -0.   ,   -0.   ,   -0.014],
-                     [   0.   ,   20.63 ,   -4.114,    0.   ,   -0.   ,  -20.958,   -1.11 ,    0.   ,   -0.   ,    0.056,    0.014,    0.   ],
-                     [   0.   ,  697.351, -131.328,    0.   ,   -0.   , -705.253,  -44.535,    0.   ,   -0.   ,    2.079,    0.596,    0.   ],
-                     [-697.351,    0.   ,   -0.   , -131.328,  705.253,   -0.   ,   -0.   ,  -44.535,   -2.079,    0.   ,    0.   ,    0.596],
-                     [   0.442,    0.   ,   -0.   ,    0.072,   -0.887,   -0.   ,   -0.   ,   -0.   ,    0.442,    0.   ,    0.   ,   -0.072],
-                     [   0.   ,    0.442,   -0.072,    0.   ,   -0.   ,   -0.887,    0.   ,    0.   ,    0.   ,    0.442,    0.072,   -0.   ],
-                     [   0.   ,    6.457,   -0.837,    0.   ,   -0.   ,    0.   ,   -1.561,    0.   ,   -0.   ,   -6.457,   -0.837,   -0.   ],
-                     [  -6.457,   -0.   ,    0.   ,   -0.837,    0.   ,    0.   ,    0.   ,   -1.561,    6.457,    0.   ,    0.   ,   -0.837],
-                     [   0.056,   -0.   ,    0.   ,    0.014,  -20.958,    0.   ,    0.   ,   -1.11 ,   20.63 ,    0.   ,    0.   ,   -4.114],
-                     [   0.   ,    0.056,   -0.014,    0.   ,   -0.   ,  -20.958,    1.11 ,    0.   ,    0.   ,   20.63 ,    4.114,   -0.   ],
-                     [  -0.   ,   -2.079,    0.596,   -0.   ,    0.   ,  705.253,  -44.535,   -0.   ,   -0.   , -697.351, -131.328,    0.   ],
-                     [   2.079,    0.   ,   -0.   ,    0.596, -705.253,   -0.   ,    0.   ,  -44.535,  697.351,    0.   ,    0.   , -131.328]])
-    assert_almost_equal(rotor2.A()[12:24, :12]/1e7, A1_0, decimal=3)
+    A1_0 = np.array(
+        [
+            [
+                20.63,
+                -0.0,
+                0.0,
+                4.114,
+                -20.958,
+                0.0,
+                0.0,
+                1.11,
+                0.056,
+                -0.0,
+                -0.0,
+                -0.014,
+            ],
+            [
+                0.0,
+                20.63,
+                -4.114,
+                0.0,
+                -0.0,
+                -20.958,
+                -1.11,
+                0.0,
+                -0.0,
+                0.056,
+                0.014,
+                0.0,
+            ],
+            [
+                0.0,
+                697.351,
+                -131.328,
+                0.0,
+                -0.0,
+                -705.253,
+                -44.535,
+                0.0,
+                -0.0,
+                2.079,
+                0.596,
+                0.0,
+            ],
+            [
+                -697.351,
+                0.0,
+                -0.0,
+                -131.328,
+                705.253,
+                -0.0,
+                -0.0,
+                -44.535,
+                -2.079,
+                0.0,
+                0.0,
+                0.596,
+            ],
+            [
+                0.442,
+                0.0,
+                -0.0,
+                0.072,
+                -0.887,
+                -0.0,
+                -0.0,
+                -0.0,
+                0.442,
+                0.0,
+                0.0,
+                -0.072,
+            ],
+            [0.0, 0.442, -0.072, 0.0, -0.0, -0.887, 0.0, 0.0, 0.0, 0.442, 0.072, -0.0],
+            [
+                0.0,
+                6.457,
+                -0.837,
+                0.0,
+                -0.0,
+                0.0,
+                -1.561,
+                0.0,
+                -0.0,
+                -6.457,
+                -0.837,
+                -0.0,
+            ],
+            [-6.457, -0.0, 0.0, -0.837, 0.0, 0.0, 0.0, -1.561, 6.457, 0.0, 0.0, -0.837],
+            [
+                0.056,
+                -0.0,
+                0.0,
+                0.014,
+                -20.958,
+                0.0,
+                0.0,
+                -1.11,
+                20.63,
+                0.0,
+                0.0,
+                -4.114,
+            ],
+            [
+                0.0,
+                0.056,
+                -0.014,
+                0.0,
+                -0.0,
+                -20.958,
+                1.11,
+                0.0,
+                0.0,
+                20.63,
+                4.114,
+                -0.0,
+            ],
+            [
+                -0.0,
+                -2.079,
+                0.596,
+                -0.0,
+                0.0,
+                705.253,
+                -44.535,
+                -0.0,
+                -0.0,
+                -697.351,
+                -131.328,
+                0.0,
+            ],
+            [
+                2.079,
+                0.0,
+                -0.0,
+                0.596,
+                -705.253,
+                -0.0,
+                0.0,
+                -44.535,
+                697.351,
+                0.0,
+                0.0,
+                -131.328,
+            ],
+        ]
+    )
+    assert_almost_equal(rotor2.A()[12:24, :12] / 1e7, A1_0, decimal=3)
 
 
 def test_a1_1_matrix_rotor2(rotor2):
-    A1_1 = np.array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.],
-                     [ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.]])
+    A1_1 = np.array(
+        [
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+            [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+        ]
+    )
     assert_almost_equal(rotor2.A()[12:24, 12:24] / 1e7, A1_1, decimal=3)
 
 
 def test_evals_sorted_rotor2(rotor2):
-    evals_sorted = np.array([  1.4667459679e-12 +215.3707255735j,   3.9623200168e-12 +215.3707255733j,
-                               7.4569772223e-11 +598.0247411492j,   1.1024641658e-11 +598.0247411456j,
-                               4.3188161105e-09+3956.2249777612j,   2.5852376472e-11+3956.2249797838j,
-                               4.3188161105e-09-3956.2249777612j,   2.5852376472e-11-3956.2249797838j,
-                               7.4569772223e-11 -598.0247411492j,   1.1024641658e-11 -598.0247411456j,
-                               1.4667459679e-12 -215.3707255735j,   3.9623200168e-12 -215.3707255733j])
-
-    evals_sorted_w_10000 = np.array([ -4.838034e-14  +34.822138j,  -5.045245e-01 +215.369011j,
-                                      5.045245e-01 +215.369011j,   8.482603e-08+3470.897616j,
-                                      4.878990e-07+3850.212629j,   4.176291e+01+3990.22903j ,
-                                      4.176291e+01-3990.22903j ,   4.878990e-07-3850.212629j,
-                                      8.482603e-08-3470.897616j,   5.045245e-01 -215.369011j,
-                                      -5.045245e-01 -215.369011j,  -4.838034e-14  -34.822138j])
-
+    evals_sorted = np.array(
+        [
+            1.4667459679e-12 + 215.3707255735j,
+            3.9623200168e-12 + 215.3707255733j,
+            7.4569772223e-11 + 598.0247411492j,
+            1.1024641658e-11 + 598.0247411456j,
+            4.3188161105e-09 + 3956.2249777612j,
+            2.5852376472e-11 + 3956.2249797838j,
+            4.3188161105e-09 - 3956.2249777612j,
+            2.5852376472e-11 - 3956.2249797838j,
+            7.4569772223e-11 - 598.0247411492j,
+            1.1024641658e-11 - 598.0247411456j,
+            1.4667459679e-12 - 215.3707255735j,
+            3.9623200168e-12 - 215.3707255733j,
+        ]
+    )
+
+    evals_sorted_w_10000 = np.array(
+        [
+            -4.838034e-14 + 34.822138j,
+            -5.045245e-01 + 215.369011j,
+            5.045245e-01 + 215.369011j,
+            8.482603e-08 + 3470.897616j,
+            4.878990e-07 + 3850.212629j,
+            4.176291e01 + 3990.22903j,
+            4.176291e01 - 3990.22903j,
+            4.878990e-07 - 3850.212629j,
+            8.482603e-08 - 3470.897616j,
+            5.045245e-01 - 215.369011j,
+            -5.045245e-01 - 215.369011j,
+            -4.838034e-14 - 34.822138j,
+        ]
+    )
+    rotor2.run()
     rotor2_evals, rotor2_evects = rotor2._eigen()
     assert_allclose(rotor2_evals, evals_sorted, rtol=1e-3)
     assert_allclose(rotor2.evalues, evals_sorted, rtol=1e-3)
@@ -234,10 +413,12 @@ def rotor3():
     n = 6
     L = [0.25 for _ in range(n)]
 
-    shaft_elem = [ShaftElement(l, i_d, o_d, steel,
-                               shear_effects=True,
-                               rotary_inertia=True,
-                               gyroscopic=True) for l in L]
+    shaft_elem = [
+        ShaftElement(
+            l, i_d, o_d, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
+        )
+        for l in L
+    ]
 
     disk0 = DiskElement.from_geometry(2, steel, 0.07, 0.05, 0.28)
     disk1 = DiskElement.from_geometry(4, steel, 0.07, 0.05, 0.35)
@@ -251,62 +432,347 @@ def rotor3():
 
 
 def test_evects_sorted_rotor3(rotor3):
-    evects_sorted = np.array([[ -4.056e-16 +8.044e-15j,   6.705e-19 -1.153e-03j,  -2.140e-15 +2.486e-14j,  -7.017e-17 +8.665e-04j],
-                              [ -4.507e-17 -1.454e-03j,   5.888e-16 -1.658e-14j,  -1.698e-16 +9.784e-04j,   6.498e-16 +6.575e-14j],
-                              [  3.930e-16 +4.707e-03j,  -1.916e-15 +5.753e-14j,   1.493e-17 +3.452e-04j,   2.575e-16 +1.289e-14j],
-                              [ -1.988e-15 +3.816e-14j,  -5.225e-17 -4.648e-03j,  -1.167e-16 -3.922e-14j,   1.538e-16 -1.023e-04j],
-                              [ -8.603e-16 +1.698e-14j,  -3.537e-17 -2.271e-03j,  -2.048e-15 +1.606e-14j,   1.939e-17 +8.099e-04j],
-                              [ -1.022e-16 -2.586e-03j,   1.047e-15 -3.047e-14j,  -1.993e-16 +8.642e-04j,   5.357e-16 +6.104e-14j],
-                              [  3.437e-16 +4.153e-03j,  -1.638e-15 +5.135e-14j,  -1.607e-17 +6.848e-04j,   4.770e-16 +3.704e-14j],
-                              [ -1.736e-15 +3.413e-14j,  -1.168e-16 -4.098e-03j,   8.543e-16 -4.710e-14j,   1.840e-16 -4.807e-04j],
-                              [ -1.298e-15 +2.574e-14j,  -7.387e-17 -3.118e-03j,  -1.588e-15 -7.947e-15j,   5.808e-17 +5.782e-04j],
-                              [ -1.974e-16 -3.445e-03j,   1.381e-15 -4.169e-14j,  -1.433e-16 +5.933e-04j,   3.236e-16 +4.312e-14j],
-                              [  2.387e-16 +2.529e-03j,  -1.028e-15 +3.221e-14j,  -2.678e-16 +1.561e-03j,   1.039e-15 +1.022e-13j],
-                              [ -1.085e-15 +2.105e-14j,  -3.912e-17 -2.485e-03j,   3.717e-15 -4.134e-14j,   5.483e-17 -1.463e-03j],
-                              [ -1.457e-15 +2.827e-14j,  -7.171e-17 -3.463e-03j,  -3.515e-16 -1.138e-14j,   3.815e-17 +1.101e-04j],
-                              [ -2.795e-16 -3.800e-03j,   1.573e-15 -4.573e-14j,  -5.757e-17 +1.120e-04j,   3.794e-17 +1.081e-14j],
-                              [  6.589e-18 +2.699e-04j,  -1.258e-16 +5.309e-15j,  -5.315e-16 +2.124e-03j,   1.364e-15 +1.555e-13j],
-                              [ -2.067e-16 +3.324e-15j,  -3.704e-19 -2.394e-04j,   5.665e-15 -1.530e-14j,  -2.417e-16 -2.095e-03j],
-                              [ -1.287e-15 +2.544e-14j,  -2.928e-17 -3.224e-03j,   1.039e-15 +1.573e-15j,  -3.299e-17 -3.849e-04j],
-                              [ -1.851e-16 -3.567e-03j,   1.468e-15 -4.382e-14j,   1.043e-16 -3.941e-04j,  -2.973e-16 -2.819e-14j],
-                              [ -1.492e-16 -2.150e-03j,   8.603e-16 -2.432e-14j,  -4.512e-16 +1.755e-03j,   1.236e-15 +1.412e-13j],
-                              [  8.553e-16 -1.661e-14j,   1.701e-17 +2.167e-03j,   4.628e-15 +4.535e-14j,  -2.653e-16 -1.672e-03j],
-                              [ -1.023e-15 +2.015e-14j,   3.903e-18 -2.426e-03j,   1.846e-15 +8.393e-15j,   6.506e-18 -6.765e-04j],
-                              [ -9.796e-17 -2.771e-03j,   1.179e-15 -3.432e-14j,   1.394e-16 -7.208e-04j,  -5.197e-16 -5.518e-14j],
-                              [ -2.651e-16 -4.008e-03j,   1.614e-15 -4.657e-14j,  -1.703e-16 +9.358e-04j,   5.812e-16 +8.236e-14j],
-                              [  1.629e-15 -3.212e-14j,   1.655e-16 +4.011e-03j,   2.089e-15 +5.726e-14j,  -1.483e-16 -7.478e-04j],
-                              [ -5.683e-16 +1.120e-14j,   1.973e-18 -1.316e-03j,   2.135e-15 +2.161e-14j,  -1.782e-16 -8.042e-04j],
-                              [ -1.326e-16 -1.661e-03j,   6.747e-16 -2.122e-14j,   2.023e-16 -9.021e-04j,  -6.436e-16 -7.128e-14j],
-                              [ -2.641e-16 -4.641e-03j,   1.899e-15 -5.464e-14j,  -8.833e-17 +6.219e-04j,   3.673e-16 +5.731e-14j],
-                              [  1.912e-15 -3.674e-14j,   8.212e-17 +4.639e-03j,   1.118e-15 +5.106e-14j,  -1.381e-16 -3.957e-04j],
-                              [ -6.649e-13 -3.259e-14j,   9.993e-02 +1.484e-16j,  -6.328e-12 -5.265e-13j,  -2.377e-01 -2.190e-14j],
-                              [  1.202e-01 +3.939e-15j,   1.437e-12 +4.632e-14j,  -2.490e-01 +1.433e-14j,  -1.804e-11 +1.579e-13j],
-                              [ -3.890e-01 -1.104e-16j,  -4.986e-12 -1.506e-13j,  -8.786e-02 +2.066e-14j,  -3.536e-12 +4.313e-14j],
-                              [ -3.154e-12 -1.584e-13j,   4.028e-01 -4.557e-16j,   9.983e-12 -3.182e-14j,   2.806e-02 +5.927e-14j],
-                              [ -1.403e-12 -7.024e-14j,   1.968e-01 -9.752e-16j,  -4.087e-12 -5.170e-13j,  -2.222e-01 -8.547e-15j],
-                              [  2.138e-01 -3.508e-16j,   2.641e-12 +8.131e-14j,  -2.199e-01 +3.955e-15j,  -1.674e-11 +1.529e-13j],
-                              [ -3.432e-01 +1.993e-15j,  -4.450e-12 -1.318e-13j,  -1.743e-01 +2.838e-14j,  -1.016e-11 +9.643e-14j],
-                              [ -2.821e-12 -1.418e-13j,   3.552e-01 +1.011e-15j,   1.199e-11 +2.189e-13j,   1.319e-01 +5.933e-14j],
-                              [ -2.127e-12 -1.070e-13j,   2.702e-01 -1.220e-15j,   2.023e-12 -4.081e-13j,  -1.586e-01 +2.107e-14j],
-                              [  2.847e-01 +5.856e-16j,   3.613e-12 +1.088e-13j,  -1.510e-01 -5.642e-15j,  -1.183e-11 +1.084e-13j],
-                              [ -2.090e-01 -6.114e-16j,  -2.791e-12 -8.398e-14j,  -3.973e-01 -4.666e-15j,  -2.804e-11 +2.739e-13j],
-                              [ -1.740e-12 -9.060e-14j,   2.154e-01 +2.735e-15j,   1.052e-11 +9.056e-13j,   4.013e-01 +2.727e-14j],
-                              [ -2.336e-12 -1.183e-13j,   3.001e-01 -1.686e-15j,   2.896e-12 -9.755e-14j,  -3.019e-02 +1.411e-14j],
-                              [  3.141e-01 +3.027e-16j,   3.963e-12 +1.216e-13j,  -2.852e-02 -9.895e-15j,  -2.965e-12 +2.787e-14j],
-                              [ -2.231e-02 -7.712e-16j,  -4.601e-13 -1.276e-14j,  -5.407e-01 -1.298e-14j,  -4.266e-11 +3.859e-13j],
-                              [ -2.747e-13 -1.805e-14j,   2.074e-02 +1.739e-15j,   3.895e-12 +1.389e-12j,   5.747e-01 -1.335e-14j],
-                              [ -2.103e-12 -1.056e-13j,   2.794e-01 +4.152e-15j,  -4.003e-13 +2.638e-13j,   1.056e-01 -1.101e-14j],
-                              [  2.948e-01 +2.284e-15j,   3.797e-12 +1.154e-13j,   1.003e-01 +2.587e-15j,   7.733e-12 -7.168e-14j],
-                              [  1.777e-01 -1.271e-15j,   2.108e-12 +6.492e-14j,  -4.467e-01 -1.871e-14j,  -3.874e-11 +3.205e-13j],
-                              [  1.373e-12 +6.849e-14j,  -1.877e-01 +3.120e-15j,  -1.154e-11 +1.153e-12j,   4.588e-01 -3.120e-14j],
-                              [ -1.665e-12 -8.544e-14j,   2.102e-01 +9.552e-16j,  -2.136e-12 +4.515e-13j,   1.856e-01 -4.985e-15j],
-                              [  2.290e-01 -6.196e-16j,   2.974e-12 +8.935e-14j,   1.835e-01 -7.359e-15j,   1.514e-11 -1.221e-13j],
-                              [  3.313e-01 +2.523e-16j,   4.036e-12 +1.236e-13j,  -2.382e-01 +6.579e-15j,  -2.259e-11 +1.654e-13j],
-                              [  2.655e-12 +1.347e-13j,  -3.476e-01 +8.013e-16j,  -1.457e-11 +5.232e-13j,   2.051e-01 -1.595e-14j],
-                              [ -9.256e-13 -4.619e-14j,   1.141e-01 +1.417e-15j,  -5.501e-12 +5.233e-13j,   2.206e-01 -2.267e-15j],
-                              [  1.373e-01 -4.564e-15j,   1.838e-12 +5.302e-14j,   2.296e-01 -8.382e-15j,   1.955e-11 -1.490e-13j],
-                              [  3.836e-01 +1.840e-16j,   4.735e-12 +1.445e-13j,  -1.583e-01 +9.794e-15j,  -1.572e-11 +1.066e-13j],
-                              [  3.037e-12 +1.550e-13j,  -4.020e-01 +1.116e-15j,  -1.300e-11 +2.719e-13j,   1.086e-01 -6.340e-15j]])
+    rotor3.run()
+    evects_sorted = np.array(
+        [
+            [
+                -4.056e-16 + 8.044e-15j,
+                6.705e-19 - 1.153e-03j,
+                -2.140e-15 + 2.486e-14j,
+                -7.017e-17 + 8.665e-04j,
+            ],
+            [
+                -4.507e-17 - 1.454e-03j,
+                5.888e-16 - 1.658e-14j,
+                -1.698e-16 + 9.784e-04j,
+                6.498e-16 + 6.575e-14j,
+            ],
+            [
+                3.930e-16 + 4.707e-03j,
+                -1.916e-15 + 5.753e-14j,
+                1.493e-17 + 3.452e-04j,
+                2.575e-16 + 1.289e-14j,
+            ],
+            [
+                -1.988e-15 + 3.816e-14j,
+                -5.225e-17 - 4.648e-03j,
+                -1.167e-16 - 3.922e-14j,
+                1.538e-16 - 1.023e-04j,
+            ],
+            [
+                -8.603e-16 + 1.698e-14j,
+                -3.537e-17 - 2.271e-03j,
+                -2.048e-15 + 1.606e-14j,
+                1.939e-17 + 8.099e-04j,
+            ],
+            [
+                -1.022e-16 - 2.586e-03j,
+                1.047e-15 - 3.047e-14j,
+                -1.993e-16 + 8.642e-04j,
+                5.357e-16 + 6.104e-14j,
+            ],
+            [
+                3.437e-16 + 4.153e-03j,
+                -1.638e-15 + 5.135e-14j,
+                -1.607e-17 + 6.848e-04j,
+                4.770e-16 + 3.704e-14j,
+            ],
+            [
+                -1.736e-15 + 3.413e-14j,
+                -1.168e-16 - 4.098e-03j,
+                8.543e-16 - 4.710e-14j,
+                1.840e-16 - 4.807e-04j,
+            ],
+            [
+                -1.298e-15 + 2.574e-14j,
+                -7.387e-17 - 3.118e-03j,
+                -1.588e-15 - 7.947e-15j,
+                5.808e-17 + 5.782e-04j,
+            ],
+            [
+                -1.974e-16 - 3.445e-03j,
+                1.381e-15 - 4.169e-14j,
+                -1.433e-16 + 5.933e-04j,
+                3.236e-16 + 4.312e-14j,
+            ],
+            [
+                2.387e-16 + 2.529e-03j,
+                -1.028e-15 + 3.221e-14j,
+                -2.678e-16 + 1.561e-03j,
+                1.039e-15 + 1.022e-13j,
+            ],
+            [
+                -1.085e-15 + 2.105e-14j,
+                -3.912e-17 - 2.485e-03j,
+                3.717e-15 - 4.134e-14j,
+                5.483e-17 - 1.463e-03j,
+            ],
+            [
+                -1.457e-15 + 2.827e-14j,
+                -7.171e-17 - 3.463e-03j,
+                -3.515e-16 - 1.138e-14j,
+                3.815e-17 + 1.101e-04j,
+            ],
+            [
+                -2.795e-16 - 3.800e-03j,
+                1.573e-15 - 4.573e-14j,
+                -5.757e-17 + 1.120e-04j,
+                3.794e-17 + 1.081e-14j,
+            ],
+            [
+                6.589e-18 + 2.699e-04j,
+                -1.258e-16 + 5.309e-15j,
+                -5.315e-16 + 2.124e-03j,
+                1.364e-15 + 1.555e-13j,
+            ],
+            [
+                -2.067e-16 + 3.324e-15j,
+                -3.704e-19 - 2.394e-04j,
+                5.665e-15 - 1.530e-14j,
+                -2.417e-16 - 2.095e-03j,
+            ],
+            [
+                -1.287e-15 + 2.544e-14j,
+                -2.928e-17 - 3.224e-03j,
+                1.039e-15 + 1.573e-15j,
+                -3.299e-17 - 3.849e-04j,
+            ],
+            [
+                -1.851e-16 - 3.567e-03j,
+                1.468e-15 - 4.382e-14j,
+                1.043e-16 - 3.941e-04j,
+                -2.973e-16 - 2.819e-14j,
+            ],
+            [
+                -1.492e-16 - 2.150e-03j,
+                8.603e-16 - 2.432e-14j,
+                -4.512e-16 + 1.755e-03j,
+                1.236e-15 + 1.412e-13j,
+            ],
+            [
+                8.553e-16 - 1.661e-14j,
+                1.701e-17 + 2.167e-03j,
+                4.628e-15 + 4.535e-14j,
+                -2.653e-16 - 1.672e-03j,
+            ],
+            [
+                -1.023e-15 + 2.015e-14j,
+                3.903e-18 - 2.426e-03j,
+                1.846e-15 + 8.393e-15j,
+                6.506e-18 - 6.765e-04j,
+            ],
+            [
+                -9.796e-17 - 2.771e-03j,
+                1.179e-15 - 3.432e-14j,
+                1.394e-16 - 7.208e-04j,
+                -5.197e-16 - 5.518e-14j,
+            ],
+            [
+                -2.651e-16 - 4.008e-03j,
+                1.614e-15 - 4.657e-14j,
+                -1.703e-16 + 9.358e-04j,
+                5.812e-16 + 8.236e-14j,
+            ],
+            [
+                1.629e-15 - 3.212e-14j,
+                1.655e-16 + 4.011e-03j,
+                2.089e-15 + 5.726e-14j,
+                -1.483e-16 - 7.478e-04j,
+            ],
+            [
+                -5.683e-16 + 1.120e-14j,
+                1.973e-18 - 1.316e-03j,
+                2.135e-15 + 2.161e-14j,
+                -1.782e-16 - 8.042e-04j,
+            ],
+            [
+                -1.326e-16 - 1.661e-03j,
+                6.747e-16 - 2.122e-14j,
+                2.023e-16 - 9.021e-04j,
+                -6.436e-16 - 7.128e-14j,
+            ],
+            [
+                -2.641e-16 - 4.641e-03j,
+                1.899e-15 - 5.464e-14j,
+                -8.833e-17 + 6.219e-04j,
+                3.673e-16 + 5.731e-14j,
+            ],
+            [
+                1.912e-15 - 3.674e-14j,
+                8.212e-17 + 4.639e-03j,
+                1.118e-15 + 5.106e-14j,
+                -1.381e-16 - 3.957e-04j,
+            ],
+            [
+                -6.649e-13 - 3.259e-14j,
+                9.993e-02 + 1.484e-16j,
+                -6.328e-12 - 5.265e-13j,
+                -2.377e-01 - 2.190e-14j,
+            ],
+            [
+                1.202e-01 + 3.939e-15j,
+                1.437e-12 + 4.632e-14j,
+                -2.490e-01 + 1.433e-14j,
+                -1.804e-11 + 1.579e-13j,
+            ],
+            [
+                -3.890e-01 - 1.104e-16j,
+                -4.986e-12 - 1.506e-13j,
+                -8.786e-02 + 2.066e-14j,
+                -3.536e-12 + 4.313e-14j,
+            ],
+            [
+                -3.154e-12 - 1.584e-13j,
+                4.028e-01 - 4.557e-16j,
+                9.983e-12 - 3.182e-14j,
+                2.806e-02 + 5.927e-14j,
+            ],
+            [
+                -1.403e-12 - 7.024e-14j,
+                1.968e-01 - 9.752e-16j,
+                -4.087e-12 - 5.170e-13j,
+                -2.222e-01 - 8.547e-15j,
+            ],
+            [
+                2.138e-01 - 3.508e-16j,
+                2.641e-12 + 8.131e-14j,
+                -2.199e-01 + 3.955e-15j,
+                -1.674e-11 + 1.529e-13j,
+            ],
+            [
+                -3.432e-01 + 1.993e-15j,
+                -4.450e-12 - 1.318e-13j,
+                -1.743e-01 + 2.838e-14j,
+                -1.016e-11 + 9.643e-14j,
+            ],
+            [
+                -2.821e-12 - 1.418e-13j,
+                3.552e-01 + 1.011e-15j,
+                1.199e-11 + 2.189e-13j,
+                1.319e-01 + 5.933e-14j,
+            ],
+            [
+                -2.127e-12 - 1.070e-13j,
+                2.702e-01 - 1.220e-15j,
+                2.023e-12 - 4.081e-13j,
+                -1.586e-01 + 2.107e-14j,
+            ],
+            [
+                2.847e-01 + 5.856e-16j,
+                3.613e-12 + 1.088e-13j,
+                -1.510e-01 - 5.642e-15j,
+                -1.183e-11 + 1.084e-13j,
+            ],
+            [
+                -2.090e-01 - 6.114e-16j,
+                -2.791e-12 - 8.398e-14j,
+                -3.973e-01 - 4.666e-15j,
+                -2.804e-11 + 2.739e-13j,
+            ],
+            [
+                -1.740e-12 - 9.060e-14j,
+                2.154e-01 + 2.735e-15j,
+                1.052e-11 + 9.056e-13j,
+                4.013e-01 + 2.727e-14j,
+            ],
+            [
+                -2.336e-12 - 1.183e-13j,
+                3.001e-01 - 1.686e-15j,
+                2.896e-12 - 9.755e-14j,
+                -3.019e-02 + 1.411e-14j,
+            ],
+            [
+                3.141e-01 + 3.027e-16j,
+                3.963e-12 + 1.216e-13j,
+                -2.852e-02 - 9.895e-15j,
+                -2.965e-12 + 2.787e-14j,
+            ],
+            [
+                -2.231e-02 - 7.712e-16j,
+                -4.601e-13 - 1.276e-14j,
+                -5.407e-01 - 1.298e-14j,
+                -4.266e-11 + 3.859e-13j,
+            ],
+            [
+                -2.747e-13 - 1.805e-14j,
+                2.074e-02 + 1.739e-15j,
+                3.895e-12 + 1.389e-12j,
+                5.747e-01 - 1.335e-14j,
+            ],
+            [
+                -2.103e-12 - 1.056e-13j,
+                2.794e-01 + 4.152e-15j,
+                -4.003e-13 + 2.638e-13j,
+                1.056e-01 - 1.101e-14j,
+            ],
+            [
+                2.948e-01 + 2.284e-15j,
+                3.797e-12 + 1.154e-13j,
+                1.003e-01 + 2.587e-15j,
+                7.733e-12 - 7.168e-14j,
+            ],
+            [
+                1.777e-01 - 1.271e-15j,
+                2.108e-12 + 6.492e-14j,
+                -4.467e-01 - 1.871e-14j,
+                -3.874e-11 + 3.205e-13j,
+            ],
+            [
+                1.373e-12 + 6.849e-14j,
+                -1.877e-01 + 3.120e-15j,
+                -1.154e-11 + 1.153e-12j,
+                4.588e-01 - 3.120e-14j,
+            ],
+            [
+                -1.665e-12 - 8.544e-14j,
+                2.102e-01 + 9.552e-16j,
+                -2.136e-12 + 4.515e-13j,
+                1.856e-01 - 4.985e-15j,
+            ],
+            [
+                2.290e-01 - 6.196e-16j,
+                2.974e-12 + 8.935e-14j,
+                1.835e-01 - 7.359e-15j,
+                1.514e-11 - 1.221e-13j,
+            ],
+            [
+                3.313e-01 + 2.523e-16j,
+                4.036e-12 + 1.236e-13j,
+                -2.382e-01 + 6.579e-15j,
+                -2.259e-11 + 1.654e-13j,
+            ],
+            [
+                2.655e-12 + 1.347e-13j,
+                -3.476e-01 + 8.013e-16j,
+                -1.457e-11 + 5.232e-13j,
+                2.051e-01 - 1.595e-14j,
+            ],
+            [
+                -9.256e-13 - 4.619e-14j,
+                1.141e-01 + 1.417e-15j,
+                -5.501e-12 + 5.233e-13j,
+                2.206e-01 - 2.267e-15j,
+            ],
+            [
+                1.373e-01 - 4.564e-15j,
+                1.838e-12 + 5.302e-14j,
+                2.296e-01 - 8.382e-15j,
+                1.955e-11 - 1.490e-13j,
+            ],
+            [
+                3.836e-01 + 1.840e-16j,
+                4.735e-12 + 1.445e-13j,
+                -1.583e-01 + 9.794e-15j,
+                -1.572e-11 + 1.066e-13j,
+            ],
+            [
+                3.037e-12 + 1.550e-13j,
+                -4.020e-01 + 1.116e-15j,
+                -1.300e-11 + 2.719e-13j,
+                1.086e-01 - 6.340e-15j,
+            ],
+        ]
+    )
 
     rotor3_evals, rotor3_evects = rotor3._eigen()
     mac1 = MAC_modes(evects_sorted, rotor3_evects[:, :4], plot=False)
@@ -315,64 +781,348 @@ def test_evects_sorted_rotor3(rotor3):
     assert_allclose(mac2.diagonal(), np.ones_like(mac1.diagonal()))
 
 
-@pytest.mark.skip(reason='Different evector order when not sorted')
+@pytest.mark.skip(reason="Different evector order when not sorted")
 def test_evects_not_sorted_rotor3(rotor3):
-    evects = np.array([[ -1.153e-03 +2.437e-20j,  -1.153e-03 -2.437e-20j,  -2.681e-18 +6.093e-17j,  -2.681e-18 -6.093e-17j],
-                       [  2.532e-16 -1.888e-19j,   2.532e-16 +1.888e-19j,   5.543e-18 -1.454e-03j,   5.543e-18 +1.454e-03j],
-                       [ -8.195e-16 +6.110e-19j,  -8.195e-16 -6.110e-19j,   2.826e-17 +4.707e-03j,   2.826e-17 -4.707e-03j],
-                       [ -4.648e-03 +9.316e-20j,  -4.648e-03 -9.316e-20j,   2.284e-18 +1.820e-16j,   2.284e-18 -1.820e-16j],
-                       [ -2.271e-03 +6.619e-20j,  -2.271e-03 -6.619e-20j,   7.094e-18 +1.117e-16j,   7.094e-18 -1.117e-16j],
-                       [  4.503e-16 -3.358e-19j,   4.503e-16 +3.358e-19j,   4.878e-18 -2.586e-03j,   4.878e-18 +2.586e-03j],
-                       [ -7.230e-16 +5.391e-19j,  -7.230e-16 -5.391e-19j,   2.309e-17 +4.153e-03j,   2.309e-17 -4.153e-03j],
-                       [ -4.098e-03 +9.646e-20j,  -4.098e-03 -9.646e-20j,   6.285e-18 +1.507e-16j,   6.285e-18 -1.507e-16j],
-                       [ -3.118e-03 +7.505e-20j,  -3.118e-03 -7.505e-20j,   5.038e-18 +1.360e-16j,   5.038e-18 -1.360e-16j],
-                       [  5.998e-16 -4.472e-19j,   5.998e-16 +4.472e-19j,  -5.367e-18 -3.445e-03j,  -5.367e-18 +3.445e-03j],
-                       [ -4.403e-16 +3.283e-19j,  -4.403e-16 -3.283e-19j,   3.491e-17 +2.529e-03j,   3.491e-17 -2.529e-03j],
-                       [ -2.485e-03 +6.818e-20j,  -2.485e-03 -6.818e-20j,   1.613e-18 +5.238e-17j,   1.613e-18 -5.238e-17j],
-                       [ -3.463e-03 +7.983e-20j,  -3.463e-03 -7.983e-20j,   1.691e-18 +1.370e-16j,   1.691e-18 -1.370e-16j],
-                       [  6.615e-16 -4.932e-19j,   6.615e-16 +4.932e-19j,  -1.563e-17 -3.800e-03j,  -1.563e-17 +3.800e-03j],
-                       [ -4.700e-17 +3.504e-20j,  -4.700e-17 -3.504e-20j,   3.001e-17 +2.699e-04j,   3.001e-17 -2.699e-04j],
-                       [ -2.394e-04 +4.508e-21j,  -2.394e-04 -4.508e-21j,   4.834e-18 -5.179e-17j,   4.834e-18 +5.179e-17j],
-                       [ -3.224e-03 +6.921e-20j,  -3.224e-03 -6.921e-20j,   4.506e-18 +1.193e-16j,   4.506e-18 -1.193e-16j],
-                       [  6.211e-16 -4.631e-19j,   6.211e-16 +4.631e-19j,  -1.799e-17 -3.567e-03j,  -1.799e-17 +3.567e-03j],
-                       [  3.743e-16 -2.791e-19j,   3.743e-16 +2.791e-19j,   9.757e-18 -2.150e-03j,   9.757e-18 +2.150e-03j],
-                       [  2.167e-03 -5.888e-20j,   2.167e-03 +5.888e-20j,   2.154e-18 -9.755e-17j,   2.154e-18 +9.755e-17j],
-                       [ -2.426e-03 +5.395e-20j,  -2.426e-03 -5.395e-20j,   3.628e-18 +8.559e-17j,   3.628e-18 -8.559e-17j],
-                       [  4.824e-16 -3.596e-19j,   4.824e-16 +3.596e-19j,  -3.232e-17 -2.771e-03j,  -3.232e-17 +2.771e-03j],
-                       [  6.978e-16 -5.203e-19j,   6.978e-16 +5.203e-19j,  -8.435e-18 -4.008e-03j,  -8.435e-18 +4.008e-03j],
-                       [  4.011e-03 -9.307e-20j,   4.011e-03 +9.307e-20j,  -2.427e-18 -1.435e-16j,  -2.427e-18 +1.435e-16j],
-                       [ -1.316e-03 +3.508e-20j,  -1.316e-03 -3.508e-20j,   9.714e-19 +4.506e-17j,   9.714e-19 -4.506e-17j],
-                       [  2.892e-16 -2.156e-19j,   2.892e-16 +2.156e-19j,  -1.356e-17 -1.661e-03j,  -1.356e-17 +1.661e-03j],
-                       [  8.080e-16 -6.025e-19j,   8.080e-16 +6.025e-19j,  -2.083e-17 -4.641e-03j,  -2.083e-17 +4.641e-03j],
-                       [  4.639e-03 -1.428e-19j,   4.639e-03 +1.428e-19j,  -8.017e-18 -1.683e-16j,  -8.017e-18 +1.683e-16j],
-                       [ -1.296e-23 +9.993e-02j,  -1.296e-23 -9.993e-02j,   5.034e-15 +2.212e-17j,   5.034e-15 -2.212e-17j],
-                       [ -1.489e-17 -2.194e-14j,  -1.489e-17 +2.194e-14j,  -1.202e-01 -4.117e-16j,  -1.202e-01 +4.117e-16j],
-                       [  4.820e-17 +7.101e-14j,   4.820e-17 -7.101e-14j,   3.890e-01 -4.097e-16j,   3.890e-01 +4.097e-16j],
-                       [  4.403e-22 +4.028e-01j,   4.403e-22 -4.028e-01j,   1.505e-14 -3.590e-16j,   1.505e-14 +3.590e-16j],
-                       [  1.277e-22 +1.968e-01j,   1.277e-22 -1.968e-01j,   9.228e-15 -4.179e-16j,   9.228e-15 +4.179e-16j],
-                       [ -2.649e-17 -3.902e-14j,  -2.649e-17 +3.902e-14j,  -2.138e-01 -7.890e-16j,  -2.138e-01 +7.890e-16j],
-                       [  4.253e-17 +6.265e-14j,   4.253e-17 -6.265e-14j,   3.432e-01 -3.858e-16j,   3.432e-01 +3.858e-16j],
-                       [  1.276e-22 +3.552e-01j,   1.276e-22 -3.552e-01j,   1.244e-14 -3.266e-16j,   1.244e-14 +3.266e-16j],
-                       [  2.608e-22 +2.702e-01j,   2.608e-22 -2.702e-01j,   1.125e-14 -3.575e-16j,   1.125e-14 +3.575e-16j],
-                       [ -3.528e-17 -5.198e-14j,  -3.528e-17 +5.198e-14j,  -2.847e-01 -4.124e-16j,  -2.847e-01 +4.124e-16j],
-                       [  2.590e-17 +3.815e-14j,   2.590e-17 -3.815e-14j,   2.090e-01 -1.071e-15j,   2.090e-01 +1.071e-15j],
-                       [ -5.880e-23 +2.154e-01j,  -5.880e-23 -2.154e-01j,   4.324e-15 -1.180e-16j,   4.324e-15 +1.180e-16j],
-                       [  6.259e-22 +3.001e-01j,   6.259e-22 -3.001e-01j,   1.132e-14 -2.655e-16j,   1.132e-14 +2.655e-16j],
-                       [ -3.891e-17 -5.733e-14j,  -3.891e-17 +5.733e-14j,  -3.141e-01 -3.203e-17j,  -3.141e-01 +3.203e-17j],
-                       [  2.764e-18 +4.073e-15j,   2.764e-18 -4.073e-15j,   2.231e-02 -1.418e-15j,   2.231e-02 +1.418e-15j],
-                       [ -9.563e-23 +2.074e-02j,  -9.563e-23 -2.074e-02j,  -4.281e-15 +1.484e-16j,  -4.281e-15 -1.484e-16j],
-                       [ -2.147e-22 +2.794e-01j,  -2.147e-22 -2.794e-01j,   9.875e-15 -2.726e-16j,   9.875e-15 +2.726e-16j],
-                       [ -3.653e-17 -5.382e-14j,  -3.653e-17 +5.382e-14j,  -2.948e-01 +4.481e-16j,  -2.948e-01 -4.481e-16j],
-                       [ -2.202e-17 -3.244e-14j,  -2.202e-17 +3.244e-14j,  -1.777e-01 -1.334e-15j,  -1.777e-01 +1.334e-15j],
-                       [ -1.264e-22 -1.877e-01j,  -1.264e-22 +1.877e-01j,  -8.073e-15 +8.601e-17j,  -8.073e-15 -8.601e-17j],
-                       [  2.541e-22 +2.102e-01j,   2.541e-22 -2.102e-01j,   7.082e-15 -2.242e-16j,   7.082e-15 +2.242e-16j],
-                       [ -2.837e-17 -4.180e-14j,  -2.837e-17 +4.180e-14j,  -2.290e-01 +6.707e-16j,  -2.290e-01 -6.707e-16j],
-                       [ -4.104e-17 -6.047e-14j,  -4.104e-17 +6.047e-14j,  -3.313e-01 -7.048e-16j,  -3.313e-01 +7.048e-16j],
-                       [ -4.908e-22 -3.476e-01j,  -4.908e-22 +3.476e-01j,  -1.187e-14 +3.158e-16j,  -1.187e-14 -3.158e-16j],
-                       [  1.023e-22 +1.141e-01j,   1.023e-22 -1.141e-01j,   3.718e-15 -9.254e-17j,   3.718e-15 +9.254e-17j],
-                       [ -1.701e-17 -2.506e-14j,  -1.701e-17 +2.506e-14j,  -1.373e-01 +5.962e-16j,  -1.373e-01 -5.962e-16j],
-                       [ -4.753e-17 -7.002e-14j,  -4.753e-17 +7.002e-14j,  -3.836e-01 -2.575e-16j,  -3.836e-01 +2.575e-16j],
-                       [ -1.956e-22 -4.020e-01j,  -1.956e-22 +4.020e-01j,  -1.390e-14 +5.053e-16j,  -1.390e-14 -5.053e-16j]])
+    evects = np.array(
+        [
+            [
+                -1.153e-03 + 2.437e-20j,
+                -1.153e-03 - 2.437e-20j,
+                -2.681e-18 + 6.093e-17j,
+                -2.681e-18 - 6.093e-17j,
+            ],
+            [
+                2.532e-16 - 1.888e-19j,
+                2.532e-16 + 1.888e-19j,
+                5.543e-18 - 1.454e-03j,
+                5.543e-18 + 1.454e-03j,
+            ],
+            [
+                -8.195e-16 + 6.110e-19j,
+                -8.195e-16 - 6.110e-19j,
+                2.826e-17 + 4.707e-03j,
+                2.826e-17 - 4.707e-03j,
+            ],
+            [
+                -4.648e-03 + 9.316e-20j,
+                -4.648e-03 - 9.316e-20j,
+                2.284e-18 + 1.820e-16j,
+                2.284e-18 - 1.820e-16j,
+            ],
+            [
+                -2.271e-03 + 6.619e-20j,
+                -2.271e-03 - 6.619e-20j,
+                7.094e-18 + 1.117e-16j,
+                7.094e-18 - 1.117e-16j,
+            ],
+            [
+                4.503e-16 - 3.358e-19j,
+                4.503e-16 + 3.358e-19j,
+                4.878e-18 - 2.586e-03j,
+                4.878e-18 + 2.586e-03j,
+            ],
+            [
+                -7.230e-16 + 5.391e-19j,
+                -7.230e-16 - 5.391e-19j,
+                2.309e-17 + 4.153e-03j,
+                2.309e-17 - 4.153e-03j,
+            ],
+            [
+                -4.098e-03 + 9.646e-20j,
+                -4.098e-03 - 9.646e-20j,
+                6.285e-18 + 1.507e-16j,
+                6.285e-18 - 1.507e-16j,
+            ],
+            [
+                -3.118e-03 + 7.505e-20j,
+                -3.118e-03 - 7.505e-20j,
+                5.038e-18 + 1.360e-16j,
+                5.038e-18 - 1.360e-16j,
+            ],
+            [
+                5.998e-16 - 4.472e-19j,
+                5.998e-16 + 4.472e-19j,
+                -5.367e-18 - 3.445e-03j,
+                -5.367e-18 + 3.445e-03j,
+            ],
+            [
+                -4.403e-16 + 3.283e-19j,
+                -4.403e-16 - 3.283e-19j,
+                3.491e-17 + 2.529e-03j,
+                3.491e-17 - 2.529e-03j,
+            ],
+            [
+                -2.485e-03 + 6.818e-20j,
+                -2.485e-03 - 6.818e-20j,
+                1.613e-18 + 5.238e-17j,
+                1.613e-18 - 5.238e-17j,
+            ],
+            [
+                -3.463e-03 + 7.983e-20j,
+                -3.463e-03 - 7.983e-20j,
+                1.691e-18 + 1.370e-16j,
+                1.691e-18 - 1.370e-16j,
+            ],
+            [
+                6.615e-16 - 4.932e-19j,
+                6.615e-16 + 4.932e-19j,
+                -1.563e-17 - 3.800e-03j,
+                -1.563e-17 + 3.800e-03j,
+            ],
+            [
+                -4.700e-17 + 3.504e-20j,
+                -4.700e-17 - 3.504e-20j,
+                3.001e-17 + 2.699e-04j,
+                3.001e-17 - 2.699e-04j,
+            ],
+            [
+                -2.394e-04 + 4.508e-21j,
+                -2.394e-04 - 4.508e-21j,
+                4.834e-18 - 5.179e-17j,
+                4.834e-18 + 5.179e-17j,
+            ],
+            [
+                -3.224e-03 + 6.921e-20j,
+                -3.224e-03 - 6.921e-20j,
+                4.506e-18 + 1.193e-16j,
+                4.506e-18 - 1.193e-16j,
+            ],
+            [
+                6.211e-16 - 4.631e-19j,
+                6.211e-16 + 4.631e-19j,
+                -1.799e-17 - 3.567e-03j,
+                -1.799e-17 + 3.567e-03j,
+            ],
+            [
+                3.743e-16 - 2.791e-19j,
+                3.743e-16 + 2.791e-19j,
+                9.757e-18 - 2.150e-03j,
+                9.757e-18 + 2.150e-03j,
+            ],
+            [
+                2.167e-03 - 5.888e-20j,
+                2.167e-03 + 5.888e-20j,
+                2.154e-18 - 9.755e-17j,
+                2.154e-18 + 9.755e-17j,
+            ],
+            [
+                -2.426e-03 + 5.395e-20j,
+                -2.426e-03 - 5.395e-20j,
+                3.628e-18 + 8.559e-17j,
+                3.628e-18 - 8.559e-17j,
+            ],
+            [
+                4.824e-16 - 3.596e-19j,
+                4.824e-16 + 3.596e-19j,
+                -3.232e-17 - 2.771e-03j,
+                -3.232e-17 + 2.771e-03j,
+            ],
+            [
+                6.978e-16 - 5.203e-19j,
+                6.978e-16 + 5.203e-19j,
+                -8.435e-18 - 4.008e-03j,
+                -8.435e-18 + 4.008e-03j,
+            ],
+            [
+                4.011e-03 - 9.307e-20j,
+                4.011e-03 + 9.307e-20j,
+                -2.427e-18 - 1.435e-16j,
+                -2.427e-18 + 1.435e-16j,
+            ],
+            [
+                -1.316e-03 + 3.508e-20j,
+                -1.316e-03 - 3.508e-20j,
+                9.714e-19 + 4.506e-17j,
+                9.714e-19 - 4.506e-17j,
+            ],
+            [
+                2.892e-16 - 2.156e-19j,
+                2.892e-16 + 2.156e-19j,
+                -1.356e-17 - 1.661e-03j,
+                -1.356e-17 + 1.661e-03j,
+            ],
+            [
+                8.080e-16 - 6.025e-19j,
+                8.080e-16 + 6.025e-19j,
+                -2.083e-17 - 4.641e-03j,
+                -2.083e-17 + 4.641e-03j,
+            ],
+            [
+                4.639e-03 - 1.428e-19j,
+                4.639e-03 + 1.428e-19j,
+                -8.017e-18 - 1.683e-16j,
+                -8.017e-18 + 1.683e-16j,
+            ],
+            [
+                -1.296e-23 + 9.993e-02j,
+                -1.296e-23 - 9.993e-02j,
+                5.034e-15 + 2.212e-17j,
+                5.034e-15 - 2.212e-17j,
+            ],
+            [
+                -1.489e-17 - 2.194e-14j,
+                -1.489e-17 + 2.194e-14j,
+                -1.202e-01 - 4.117e-16j,
+                -1.202e-01 + 4.117e-16j,
+            ],
+            [
+                4.820e-17 + 7.101e-14j,
+                4.820e-17 - 7.101e-14j,
+                3.890e-01 - 4.097e-16j,
+                3.890e-01 + 4.097e-16j,
+            ],
+            [
+                4.403e-22 + 4.028e-01j,
+                4.403e-22 - 4.028e-01j,
+                1.505e-14 - 3.590e-16j,
+                1.505e-14 + 3.590e-16j,
+            ],
+            [
+                1.277e-22 + 1.968e-01j,
+                1.277e-22 - 1.968e-01j,
+                9.228e-15 - 4.179e-16j,
+                9.228e-15 + 4.179e-16j,
+            ],
+            [
+                -2.649e-17 - 3.902e-14j,
+                -2.649e-17 + 3.902e-14j,
+                -2.138e-01 - 7.890e-16j,
+                -2.138e-01 + 7.890e-16j,
+            ],
+            [
+                4.253e-17 + 6.265e-14j,
+                4.253e-17 - 6.265e-14j,
+                3.432e-01 - 3.858e-16j,
+                3.432e-01 + 3.858e-16j,
+            ],
+            [
+                1.276e-22 + 3.552e-01j,
+                1.276e-22 - 3.552e-01j,
+                1.244e-14 - 3.266e-16j,
+                1.244e-14 + 3.266e-16j,
+            ],
+            [
+                2.608e-22 + 2.702e-01j,
+                2.608e-22 - 2.702e-01j,
+                1.125e-14 - 3.575e-16j,
+                1.125e-14 + 3.575e-16j,
+            ],
+            [
+                -3.528e-17 - 5.198e-14j,
+                -3.528e-17 + 5.198e-14j,
+                -2.847e-01 - 4.124e-16j,
+                -2.847e-01 + 4.124e-16j,
+            ],
+            [
+                2.590e-17 + 3.815e-14j,
+                2.590e-17 - 3.815e-14j,
+                2.090e-01 - 1.071e-15j,
+                2.090e-01 + 1.071e-15j,
+            ],
+            [
+                -5.880e-23 + 2.154e-01j,
+                -5.880e-23 - 2.154e-01j,
+                4.324e-15 - 1.180e-16j,
+                4.324e-15 + 1.180e-16j,
+            ],
+            [
+                6.259e-22 + 3.001e-01j,
+                6.259e-22 - 3.001e-01j,
+                1.132e-14 - 2.655e-16j,
+                1.132e-14 + 2.655e-16j,
+            ],
+            [
+                -3.891e-17 - 5.733e-14j,
+                -3.891e-17 + 5.733e-14j,
+                -3.141e-01 - 3.203e-17j,
+                -3.141e-01 + 3.203e-17j,
+            ],
+            [
+                2.764e-18 + 4.073e-15j,
+                2.764e-18 - 4.073e-15j,
+                2.231e-02 - 1.418e-15j,
+                2.231e-02 + 1.418e-15j,
+            ],
+            [
+                -9.563e-23 + 2.074e-02j,
+                -9.563e-23 - 2.074e-02j,
+                -4.281e-15 + 1.484e-16j,
+                -4.281e-15 - 1.484e-16j,
+            ],
+            [
+                -2.147e-22 + 2.794e-01j,
+                -2.147e-22 - 2.794e-01j,
+                9.875e-15 - 2.726e-16j,
+                9.875e-15 + 2.726e-16j,
+            ],
+            [
+                -3.653e-17 - 5.382e-14j,
+                -3.653e-17 + 5.382e-14j,
+                -2.948e-01 + 4.481e-16j,
+                -2.948e-01 - 4.481e-16j,
+            ],
+            [
+                -2.202e-17 - 3.244e-14j,
+                -2.202e-17 + 3.244e-14j,
+                -1.777e-01 - 1.334e-15j,
+                -1.777e-01 + 1.334e-15j,
+            ],
+            [
+                -1.264e-22 - 1.877e-01j,
+                -1.264e-22 + 1.877e-01j,
+                -8.073e-15 + 8.601e-17j,
+                -8.073e-15 - 8.601e-17j,
+            ],
+            [
+                2.541e-22 + 2.102e-01j,
+                2.541e-22 - 2.102e-01j,
+                7.082e-15 - 2.242e-16j,
+                7.082e-15 + 2.242e-16j,
+            ],
+            [
+                -2.837e-17 - 4.180e-14j,
+                -2.837e-17 + 4.180e-14j,
+                -2.290e-01 + 6.707e-16j,
+                -2.290e-01 - 6.707e-16j,
+            ],
+            [
+                -4.104e-17 - 6.047e-14j,
+                -4.104e-17 + 6.047e-14j,
+                -3.313e-01 - 7.048e-16j,
+                -3.313e-01 + 7.048e-16j,
+            ],
+            [
+                -4.908e-22 - 3.476e-01j,
+                -4.908e-22 + 3.476e-01j,
+                -1.187e-14 + 3.158e-16j,
+                -1.187e-14 - 3.158e-16j,
+            ],
+            [
+                1.023e-22 + 1.141e-01j,
+                1.023e-22 - 1.141e-01j,
+                3.718e-15 - 9.254e-17j,
+                3.718e-15 + 9.254e-17j,
+            ],
+            [
+                -1.701e-17 - 2.506e-14j,
+                -1.701e-17 + 2.506e-14j,
+                -1.373e-01 + 5.962e-16j,
+                -1.373e-01 - 5.962e-16j,
+            ],
+            [
+                -4.753e-17 - 7.002e-14j,
+                -4.753e-17 + 7.002e-14j,
+                -3.836e-01 - 2.575e-16j,
+                -3.836e-01 + 2.575e-16j,
+            ],
+            [
+                -1.956e-22 - 4.020e-01j,
+                -1.956e-22 + 4.020e-01j,
+                -1.390e-14 + 5.053e-16j,
+                -1.390e-14 - 5.053e-16j,
+            ],
+        ]
+    )
 
     rotor3_evals, rotor3_evects = rotor3._eigen(sorted_=False)
     mac1 = MAC_modes(evects, rotor3_evects[:, :4], plot=False)
@@ -387,45 +1137,46 @@ def test_evects_not_sorted_rotor3(rotor3):
 
 
 def test_kappa_rotor3(rotor3):
-    assert_allclose(rotor3.kappa(0, 0)['Frequency'], 82.653037, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 0)['Major axes'], 0.001454062985920231, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 0)['Minor axes'], 2.0579515874459978e-11, rtol=1e-3, atol=1e-6)
-    assert_allclose(rotor3.kappa(0, 0)['kappa'], -1.415311171090584e-08, rtol=1e-3, atol=1e-6)
+    rotor3.run()
+    assert_allclose(rotor3.kappa(0, 0)["Frequency"], 82.653037, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 0)["Major axes"], 0.001454062985920231, rtol=1e-3)
+    assert_allclose(
+        rotor3.kappa(0, 0)["Minor axes"], 2.0579515874459978e-11, rtol=1e-3, atol=1e-6
+    )
+    assert_allclose(
+        rotor3.kappa(0, 0)["kappa"], -1.415311171090584e-08, rtol=1e-3, atol=1e-6
+    )
 
     rotor3.w = 2000
-    assert_allclose(rotor3.kappa(0, 0)['Frequency'], 77.37957042, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 0)['Major axes'], 0.0011885396330204021, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 0)['Minor axes'], 0.0007308144427338161, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 0)['kappa'], -0.6148843693807821, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 0)["Frequency"], 77.37957042, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 0)["Major axes"], 0.0011885396330204021, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 0)["Minor axes"], 0.0007308144427338161, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 0)["kappa"], -0.6148843693807821, rtol=1e-3)
 
-    assert_allclose(rotor3.kappa(0, 1)['Frequency'], 88.98733511566752, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 1)['Major axes'], 0.0009947502339267566, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 1)['Minor axes'], 0.0008412470069506472, rtol=1e-3)
-    assert_allclose(rotor3.kappa(0, 1)['kappa'], 0.8456866641084784, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 1)["Frequency"], 88.98733511566752, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 1)["Major axes"], 0.0009947502339267566, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 1)["Minor axes"], 0.0008412470069506472, rtol=1e-3)
+    assert_allclose(rotor3.kappa(0, 1)["kappa"], 0.8456866641084784, rtol=1e-3)
 
-    assert_allclose(rotor3.kappa(1, 1)['Frequency'], 88.98733511566752, rtol=1e-3)
-    assert_allclose(rotor3.kappa(1, 1)['Major axes'], 0.0018877975750108973, rtol=1e-3)
-    assert_allclose(rotor3.kappa(1, 1)['Minor axes'], 0.0014343257484060105, rtol=1e-3)
-    assert_allclose(rotor3.kappa(1, 1)['kappa'], 0.7597878964314968, rtol=1e-3)
+    assert_allclose(rotor3.kappa(1, 1)["Frequency"], 88.98733511566752, rtol=1e-3)
+    assert_allclose(rotor3.kappa(1, 1)["Major axes"], 0.0018877975750108973, rtol=1e-3)
+    assert_allclose(rotor3.kappa(1, 1)["Minor axes"], 0.0014343257484060105, rtol=1e-3)
+    assert_allclose(rotor3.kappa(1, 1)["kappa"], 0.7597878964314968, rtol=1e-3)
 
 
 def test_kappa_mode_rotor3(rotor3):
     rotor3.w = 2000
-    assert_allclose(rotor3.kappa_mode(0), [-0.614884,
-                                           -0.696056,
-                                           -0.723983,
-                                           -0.729245,
-                                           -0.708471,
-                                           -0.656976,
-                                           -0.513044], rtol=1e-3)
-
-    assert_allclose(rotor3.kappa_mode(1), [0.845687,
-                                           0.759788,
-                                           0.734308,
-                                           0.737393,
-                                           0.778295,
-                                           0.860137,
-                                           0.948157], rtol=1e-3)
+    assert_allclose(
+        rotor3.kappa_mode(0),
+        [-0.614884, -0.696056, -0.723983, -0.729245, -0.708471, -0.656976, -0.513044],
+        rtol=1e-3,
+    )
+
+    assert_allclose(
+        rotor3.kappa_mode(1),
+        [0.845687, 0.759788, 0.734308, 0.737393, 0.778295, 0.860137, 0.948157],
+        rtol=1e-3,
+    )
 
 
 @pytest.fixture
@@ -437,8 +1188,8 @@ def rotor4():
     n = 6
     L = [0.25 for _ in range(n)]
 
-    n0 = len(L)//2
-    n1 = len(L)//2
+    n0 = len(L) // 2
+    n1 = len(L) // 2
     L0 = sum(L[:n0])
     L1 = sum(L[n1:])
     sec0 = ShaftElement.section(L0, n0, i_d, o_d, steel)
@@ -467,55 +1218,98 @@ def test_evals_rotor3_rotor4(rotor3, rotor4):
 def test_campbell(rotor4):
     speed = np.linspace(0, 300, 3)
     camp = rotor4.campbell(speed)[:, :, 0]
-    camp_desired = np.array([[82.65303734,  86.65811435, 254.52047828, 274.31285391, 679.48903239, 716.78631221],
-                             [82.60929602,  86.68625235, 251.70037114, 276.87787937, 652.85679897, 742.60864608],
-                             [82.48132723,  86.76734307, 245.49092844, 282.33294699, 614.05536277, 779.07778334]])
+    camp_desired = np.array(
+        [
+            [
+                82.65303734,
+                86.65811435,
+                254.52047828,
+                274.31285391,
+                679.48903239,
+                716.78631221,
+            ],
+            [
+                82.60929602,
+                86.68625235,
+                251.70037114,
+                276.87787937,
+                652.85679897,
+                742.60864608,
+            ],
+            [
+                82.48132723,
+                86.76734307,
+                245.49092844,
+                282.33294699,
+                614.05536277,
+                779.07778334,
+            ],
+        ]
+    )
     assert_allclose(camp, camp_desired)
 
 
-@pytest.mark.skip(reason='Needs investigation. It fails depending on system.')
+@pytest.mark.skip(reason="Needs investigation. It fails depending on system.")
 def test_freq_response(rotor4):
-    magdb_exp = np.array([[[-120.        , -120.86944548, -115.66348242, -125.09053613],
-        [-363.3527912 , -151.34622928, -119.93523136, -131.80470016],
-        [-354.61148814, -160.12580074, -126.60092157, -129.32321566],
-        [-123.52182518, -115.10369362, -117.98804019, -114.71703185]],
-
-       [[-372.78089953, -151.34622928, -119.93523136, -131.80470016],
-        [-118.06179974, -118.64323754, -120.32380413, -123.40124075],
-        [-121.58362492, -113.542778  , -118.87061678, -113.43742325],
-        [-359.49336181, -167.93504252, -134.49524237, -130.94575121]],
-
-       [[-373.93814241, -160.12580074, -126.60092157, -129.32321566],
-        [-121.58362492, -113.542778  , -118.87061678, -113.43742325],
-        [-101.07120376, -105.55913457, -104.14094712, -102.44191459],
-        [-370.75325104, -173.53567801, -139.05415269, -127.7170584 ]],
-
-       [[-123.52182518, -115.10369362, -117.98804019, -114.71703185],
-        [-362.65206982, -167.93504252, -134.49524237, -130.94575121],
-        [-350.39254778, -173.53567801, -139.05415269, -127.7170584 ],
-        [-101.29234967, -106.9521567 , -104.66576262, -103.46014727]]])
-
-    magdb_exp_modes_4 = np.array([[[-186.09498071, -141.31217447, -156.3727046 , -164.2331948 ],
-        [-343.18648319, -177.48024148, -185.20860324, -186.64998732],
-        [-334.7831122 , -177.53606335, -187.59501345, -184.89095401],
-        [-153.70571976, -128.91233707, -141.534854  , -146.49160424]],
-
-       [[-359.4389246 , -177.48024148, -185.20860324, -186.64998732],
-        [-122.88901214, -139.43588496, -154.12804564, -161.85419832],
-        [-124.04894039, -128.97278476, -141.32571597, -146.31133247],
-        [-347.60421616, -175.0690129 , -185.41011193, -182.54955925]],
-
-       [[-350.13764012, -177.53606335, -187.59501345, -184.89095401],
-        [-124.04894039, -128.97278476, -141.32571597, -146.31133247],
-        [-111.60564526, -122.9491126 , -123.76248808, -122.27201722],
-        [-337.19738844, -162.11699607, -159.52366304, -159.38118889]],
-
-       [[-153.70571976, -128.91233707, -141.534854  , -146.49160424],
-        [-333.15975187, -175.0690129 , -185.41011193, -182.54955925],
-        [-323.43173195, -162.11699607, -159.52366304, -159.38118889],
-        [-121.31645881, -120.44617713, -124.36604496, -122.47735964]]])
-
-    omega = np.linspace(0., 450., 4)
+    magdb_exp = np.array(
+        [
+            [
+                [-120.0, -120.86944548, -115.66348242, -125.09053613],
+                [-363.3527912, -151.34622928, -119.93523136, -131.80470016],
+                [-354.61148814, -160.12580074, -126.60092157, -129.32321566],
+                [-123.52182518, -115.10369362, -117.98804019, -114.71703185],
+            ],
+            [
+                [-372.78089953, -151.34622928, -119.93523136, -131.80470016],
+                [-118.06179974, -118.64323754, -120.32380413, -123.40124075],
+                [-121.58362492, -113.542778, -118.87061678, -113.43742325],
+                [-359.49336181, -167.93504252, -134.49524237, -130.94575121],
+            ],
+            [
+                [-373.93814241, -160.12580074, -126.60092157, -129.32321566],
+                [-121.58362492, -113.542778, -118.87061678, -113.43742325],
+                [-101.07120376, -105.55913457, -104.14094712, -102.44191459],
+                [-370.75325104, -173.53567801, -139.05415269, -127.7170584],
+            ],
+            [
+                [-123.52182518, -115.10369362, -117.98804019, -114.71703185],
+                [-362.65206982, -167.93504252, -134.49524237, -130.94575121],
+                [-350.39254778, -173.53567801, -139.05415269, -127.7170584],
+                [-101.29234967, -106.9521567, -104.66576262, -103.46014727],
+            ],
+        ]
+    )
+
+    magdb_exp_modes_4 = np.array(
+        [
+            [
+                [-186.09498071, -141.31217447, -156.3727046, -164.2331948],
+                [-343.18648319, -177.48024148, -185.20860324, -186.64998732],
+                [-334.7831122, -177.53606335, -187.59501345, -184.89095401],
+                [-153.70571976, -128.91233707, -141.534854, -146.49160424],
+            ],
+            [
+                [-359.4389246, -177.48024148, -185.20860324, -186.64998732],
+                [-122.88901214, -139.43588496, -154.12804564, -161.85419832],
+                [-124.04894039, -128.97278476, -141.32571597, -146.31133247],
+                [-347.60421616, -175.0690129, -185.41011193, -182.54955925],
+            ],
+            [
+                [-350.13764012, -177.53606335, -187.59501345, -184.89095401],
+                [-124.04894039, -128.97278476, -141.32571597, -146.31133247],
+                [-111.60564526, -122.9491126, -123.76248808, -122.27201722],
+                [-337.19738844, -162.11699607, -159.52366304, -159.38118889],
+            ],
+            [
+                [-153.70571976, -128.91233707, -141.534854, -146.49160424],
+                [-333.15975187, -175.0690129, -185.41011193, -182.54955925],
+                [-323.43173195, -162.11699607, -159.52366304, -159.38118889],
+                [-121.31645881, -120.44617713, -124.36604496, -122.47735964],
+            ],
+        ]
+    )
+
+    omega = np.linspace(0.0, 450.0, 4)
     freq_resp = rotor4.freq_response(frequency_range=omega)
     magdb = 20.0 * np.log10(freq_resp.magnitude)
     assert_allclose(magdb[:4, :4, :4], magdb_exp)
@@ -525,46 +1319,58 @@ def test_freq_response(rotor4):
     assert_allclose(magdb[:4, :4, :4], magdb_exp_modes_4)
 
 
-
 def test_freq_response_w_force(rotor4):
-    F0 = np.array([[0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 22.5 + 0.j, 90.0 + 0.j, 202.5 + 0.j],
-                   [0.0 + 0.j, 0.0 - 22.5j, 0.0 - 90.j, 0.0 - 202.5j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j],
-                   [0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j, 0.0 + 0.j]])
-    mag_exp = np.array([[0.00000000e+00, 1.14259057e-06, 1.88932819e-04, 4.50376020e-05],
-       [0.00000000e+00, 3.02252319e-06, 1.50551126e-04, 4.98323245e-05],
-       [0.00000000e+00, 1.97842812e-05, 5.19405022e-05, 2.80824236e-05],
-       [0.00000000e+00, 2.02593969e-05, 1.64498124e-05, 1.06100461e-05]])
-    mag_exp_2_unb = np.array([[0.00000000e+00, 4.80337594e-06, 2.31170438e-04, 6.90062268e-05],
-       [0.00000000e+00, 3.15307288e-06, 1.87793923e-04, 8.08531462e-05],
-       [0.00000000e+00, 3.79692673e-05, 5.97050225e-05, 5.48105215e-05],
-       [0.00000000e+00, 4.16812885e-05, 1.38592416e-05, 2.20209089e-05]])
-
-    omega = np.linspace(0., 450., 4)
+    rotor4.run()
+    F0 = np.array(
+        [
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 22.5 + 0.0j, 90.0 + 0.0j, 202.5 + 0.0j],
+            [0.0 + 0.0j, 0.0 - 22.5j, 0.0 - 90.0j, 0.0 - 202.5j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+            [0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j, 0.0 + 0.0j],
+        ]
+    )
+    mag_exp = np.array(
+        [
+            [0.00000000e00, 1.14259057e-06, 1.88932819e-04, 4.50376020e-05],
+            [0.00000000e00, 3.02252319e-06, 1.50551126e-04, 4.98323245e-05],
+            [0.00000000e00, 1.97842812e-05, 5.19405022e-05, 2.80824236e-05],
+            [0.00000000e00, 2.02593969e-05, 1.64498124e-05, 1.06100461e-05],
+        ]
+    )
+    mag_exp_2_unb = np.array(
+        [
+            [0.00000000e00, 4.80337594e-06, 2.31170438e-04, 6.90062268e-05],
+            [0.00000000e00, 3.15307288e-06, 1.87793923e-04, 8.08531462e-05],
+            [0.00000000e00, 3.79692673e-05, 5.97050225e-05, 5.48105215e-05],
+            [0.00000000e00, 4.16812885e-05, 1.38592416e-05, 2.20209089e-05],
+        ]
+    )
+
+    omega = np.linspace(0.0, 450.0, 4)
     freq_resp = rotor4.forced_response(force=F0, frequency_range=omega)
     mag = freq_resp.magnitude
     assert_allclose(mag[:4, :4], mag_exp)
@@ -578,53 +1384,17 @@ def test_freq_response_w_force(rotor4):
     assert_allclose(mag[:4, :4], mag_exp)
 
     freq_resp = rotor4.unbalance_response(
-        [2, 3], [0.001, 0.001], [0., 0], frequency_range=omega)
+        [2, 3], [0.001, 0.001], [0.0, 0], frequency_range=omega
+    )
     mag = freq_resp.magnitude
     assert_allclose(mag[:4, :4], mag_exp_2_unb)
 
 
-#@pytest.fixture()
-#def rotor5():
-#    rotor_file = os.path.join(test_dir, 'data/xl_rotor.xls')
-#    bearing_file = os.path.join(test_dir, 'data/xl_bearing.xls')
-#
-#    shaft = ShaftElement.load_from_xltrc(rotor_file)
-#
-#   disks = LumpedDiskElement.load_from_xltrc(rotor_file)
-
-
-#    bearing0 = BearingElement.load_from_xltrc(8, bearing_file)
-#    bearing1 = BearingElement.load_from_xltrc(49, bearing_file)
-#    bearings = [bearing0, bearing1]
-#   return Rotor(shaft, disks, bearings)
-
-
-#def test_loaded_rotor(rotor5):
-#    assert len(rotor5.nodes) == 58
-#    assert len(rotor5.nodes_i_d) == 58
-#    assert len(rotor5.nodes_o_d) == 58
-#    assert rotor5.m_disks == 56.789932462458424
-#    assert rotor5.m_shaft == 190.08045208234347
-#    assert rotor5.m == 246.87038454480188
-#    assert rotor5.L == 1.65325
-
-
-#def test_save_load(rotor5):
-#    rotor5.save('rotor5.pck')
-#    rotor_5 = Rotor.load('rotor5.pck')
-
-#    assert_allclose(rotor5.evalues, rotor_5.evalues)
-#    assert_allclose(rotor5.bearing_seal_elements[0].kxx.interpolated(0),
-#                    rotor_5.bearing_seal_elements[0].kxx.interpolated(0))
+def test_save_load():
 
+    a = rotor_example()
+    a.save("teste00000000000000001")
+    b = Rotor.load("teste00000000000000001")
+    Rotor.remove("teste00000000000000001")
 
-#def test_plot_ucs(rotor5):
-#    x_data_exp = np.array([1000000., 1832980.710832, 3359818.286284,
-#                           6158482.11066, 11288378.916847])
-#    y_data_exp = np.array([89.619235, 120.896554, 162.592464, 217.425534,
-#                          287.645964])
-#    ax = rotor5.plot_ucs()
-#    l0 = ax.get_lines()[0]
-#    x_data, y_data = l0.get_data()
-#    assert_allclose(x_data[:5], x_data_exp)
-#    assert_allclose(y_data[:5], y_data_exp)
+    assert a == b
diff --git a/ross/tests/test_shaft_element.py b/ross/tests/test_shaft_element.py
index 901f343c..515cba3c 100644
--- a/ross/tests/test_shaft_element.py
+++ b/ross/tests/test_shaft_element.py
@@ -15,8 +15,9 @@ def eb():
     le_ = 0.25
     i_d_ = 0
     o_d_ = 0.05
-    return ShaftElement(le_, i_d_, o_d_, steel,
-                        shear_effects=False, rotary_inertia=False)
+    return ShaftElement(
+        le_, i_d_, o_d_, steel, shear_effects=False, rotary_inertia=False
+    )
 
 
 def test_parameters_eb(eb):
@@ -29,30 +30,38 @@ def test_parameters_eb(eb):
     assert eb.material.rho == 7810
     assert_almost_equal(eb.material.Poisson, 0.29926108)
     assert_almost_equal(eb.A, 0.00196349)
-    assert_almost_equal(eb.Ie*1e7, 3.06796157)
+    assert_almost_equal(eb.Ie * 1e7, 3.06796157)
 
 
 def test_mass_matrix_eb(eb):
-    M0e_eb = np.array([[ 1.42395,  0.     ,  0.     ,  0.0502 ,  0.49291,  0.     ,  0.     , -0.02967],
-                       [ 0.     ,  1.42395, -0.0502 ,  0.     ,  0.     ,  0.49291,  0.02967,  0.     ],
-                       [ 0.     , -0.0502 ,  0.00228,  0.     ,  0.     , -0.02967, -0.00171,  0.     ],
-                       [ 0.0502 ,  0.     ,  0.     ,  0.00228,  0.02967,  0.     ,  0.     , -0.00171],
-                       [ 0.49291,  0.     ,  0.     ,  0.02967,  1.42395,  0.     ,  0.     , -0.0502 ],
-                       [ 0.     ,  0.49291, -0.02967,  0.     ,  0.     ,  1.42395,  0.0502 ,  0.     ],
-                       [ 0.     ,  0.02967, -0.00171,  0.     ,  0.     ,  0.0502 ,  0.00228,  0.     ],
-                       [-0.02967,  0.     ,  0.     , -0.00171, -0.0502 ,  0.     ,  0.     ,  0.00228]])
+    M0e_eb = np.array(
+        [
+            [1.42395, 0.0, 0.0, 0.0502, 0.49291, 0.0, 0.0, -0.02967],
+            [0.0, 1.42395, -0.0502, 0.0, 0.0, 0.49291, 0.02967, 0.0],
+            [0.0, -0.0502, 0.00228, 0.0, 0.0, -0.02967, -0.00171, 0.0],
+            [0.0502, 0.0, 0.0, 0.00228, 0.02967, 0.0, 0.0, -0.00171],
+            [0.49291, 0.0, 0.0, 0.02967, 1.42395, 0.0, 0.0, -0.0502],
+            [0.0, 0.49291, -0.02967, 0.0, 0.0, 1.42395, 0.0502, 0.0],
+            [0.0, 0.02967, -0.00171, 0.0, 0.0, 0.0502, 0.00228, 0.0],
+            [-0.02967, 0.0, 0.0, -0.00171, -0.0502, 0.0, 0.0, 0.00228],
+        ]
+    )
     assert_allclose(eb.M(), M0e_eb, rtol=1e-3)
 
 
 def test_stiffness_matrix_eb(eb):
-    K0e_eb = np.array([[ 4.97157,  0.     ,  0.     ,  0.62145, -4.97157,  0.     ,  0.     ,  0.62145],
-                       [ 0.     ,  4.97157, -0.62145,  0.     ,  0.     , -4.97157, -0.62145,  0.     ],
-                       [ 0.     , -0.62145,  0.10357,  0.     ,  0.     ,  0.62145,  0.05179,  0.     ],
-                       [ 0.62145,  0.     ,  0.     ,  0.10357, -0.62145,  0.     ,  0.     ,  0.05179],
-                       [-4.97157,  0.     ,  0.     , -0.62145,  4.97157,  0.     ,  0.     , -0.62145],
-                       [ 0.     , -4.97157,  0.62145,  0.     ,  0.     ,  4.97157,  0.62145,  0.     ],
-                       [ 0.     , -0.62145,  0.05179,  0.     ,  0.     ,  0.62145,  0.10357,  0.     ],
-                       [ 0.62145,  0.     ,  0.     ,  0.05179, -0.62145,  0.     ,  0.     ,  0.10357]])
+    K0e_eb = np.array(
+        [
+            [4.97157, 0.0, 0.0, 0.62145, -4.97157, 0.0, 0.0, 0.62145],
+            [0.0, 4.97157, -0.62145, 0.0, 0.0, -4.97157, -0.62145, 0.0],
+            [0.0, -0.62145, 0.10357, 0.0, 0.0, 0.62145, 0.05179, 0.0],
+            [0.62145, 0.0, 0.0, 0.10357, -0.62145, 0.0, 0.0, 0.05179],
+            [-4.97157, 0.0, 0.0, -0.62145, 4.97157, 0.0, 0.0, -0.62145],
+            [0.0, -4.97157, 0.62145, 0.0, 0.0, 4.97157, 0.62145, 0.0],
+            [0.0, -0.62145, 0.05179, 0.0, 0.0, 0.62145, 0.10357, 0.0],
+            [0.62145, 0.0, 0.0, 0.05179, -0.62145, 0.0, 0.0, 0.10357],
+        ]
+    )
     assert_almost_equal(eb.K() / 1e7, K0e_eb, decimal=5)
 
 
@@ -63,50 +72,59 @@ def tim():
     le_ = 0.25
     i_d_ = 0
     o_d_ = 0.05
-    return ShaftElement(le_, i_d_, o_d_, steel,
-                        rotary_inertia=True,
-                        shear_effects=True)
+    return ShaftElement(le_, i_d_, o_d_, steel, rotary_inertia=True, shear_effects=True)
 
 
 def test_parameters_tim(tim):
     assert_almost_equal(tim.phi, 0.08795566)
     assert_almost_equal(tim.material.Poisson, 0.29926108)
     assert_almost_equal(tim.A, 0.00196349)
-    assert_almost_equal(tim.Ie*1e7, 3.06796157)
+    assert_almost_equal(tim.Ie * 1e7, 3.06796157)
 
 
 def test_mass_matrix_tim(tim):
-    M0e_tim = np.array([[ 1.42051,  0.     ,  0.     ,  0.04932,  0.49635,  0.     ,  0.     , -0.03055],
-                        [ 0.     ,  1.42051, -0.04932,  0.     ,  0.     ,  0.49635,  0.03055,  0.     ],
-                        [ 0.     , -0.04932,  0.00231,  0.     ,  0.     , -0.03055, -0.00178,  0.     ],
-                        [ 0.04932,  0.     ,  0.     ,  0.00231,  0.03055,  0.     ,  0.     , -0.00178],
-                        [ 0.49635,  0.     ,  0.     ,  0.03055,  1.42051,  0.     ,  0.     , -0.04932],
-                        [ 0.     ,  0.49635, -0.03055,  0.     ,  0.     ,  1.42051,  0.04932,  0.     ],
-                        [ 0.     ,  0.03055, -0.00178,  0.     ,  0.     ,  0.04932,  0.00231,  0.     ],
-                        [-0.03055,  0.     ,  0.     , -0.00178, -0.04932,  0.     ,  0.     ,  0.00231]])
+    M0e_tim = np.array(
+        [
+            [1.42051, 0.0, 0.0, 0.04932, 0.49635, 0.0, 0.0, -0.03055],
+            [0.0, 1.42051, -0.04932, 0.0, 0.0, 0.49635, 0.03055, 0.0],
+            [0.0, -0.04932, 0.00231, 0.0, 0.0, -0.03055, -0.00178, 0.0],
+            [0.04932, 0.0, 0.0, 0.00231, 0.03055, 0.0, 0.0, -0.00178],
+            [0.49635, 0.0, 0.0, 0.03055, 1.42051, 0.0, 0.0, -0.04932],
+            [0.0, 0.49635, -0.03055, 0.0, 0.0, 1.42051, 0.04932, 0.0],
+            [0.0, 0.03055, -0.00178, 0.0, 0.0, 0.04932, 0.00231, 0.0],
+            [-0.03055, 0.0, 0.0, -0.00178, -0.04932, 0.0, 0.0, 0.00231],
+        ]
+    )
     assert_almost_equal(tim.M(), M0e_tim, decimal=5)
 
 
 def test_stiffness_matrix_tim(tim):
-    K0e_tim = np.array([[ 4.56964,  0.     ,  0.     ,  0.57121, -4.56964,  0.     ,  0.     ,  0.57121],
-                        [ 0.     ,  4.56964, -0.57121,  0.     ,  0.     , -4.56964, -0.57121,  0.     ],
-                        [ 0.     , -0.57121,  0.09729,  0.     ,  0.     ,  0.57121,  0.04551,  0.     ],
-                        [ 0.57121,  0.     ,  0.     ,  0.09729, -0.57121,  0.     ,  0.     ,  0.04551],
-                        [-4.56964,  0.     ,  0.     , -0.57121,  4.56964,  0.     ,  0.     , -0.57121],
-                        [ 0.     , -4.56964,  0.57121,  0.     ,  0.     ,  4.56964,  0.57121,  0.     ],
-                        [ 0.     , -0.57121,  0.04551,  0.     ,  0.     ,  0.57121,  0.09729,  0.     ],
-                        [ 0.57121,  0.     ,  0.     ,  0.04551, -0.57121,  0.     ,  0.     ,  0.09729]])
+    K0e_tim = np.array(
+        [
+            [4.56964, 0.0, 0.0, 0.57121, -4.56964, 0.0, 0.0, 0.57121],
+            [0.0, 4.56964, -0.57121, 0.0, 0.0, -4.56964, -0.57121, 0.0],
+            [0.0, -0.57121, 0.09729, 0.0, 0.0, 0.57121, 0.04551, 0.0],
+            [0.57121, 0.0, 0.0, 0.09729, -0.57121, 0.0, 0.0, 0.04551],
+            [-4.56964, 0.0, 0.0, -0.57121, 4.56964, 0.0, 0.0, -0.57121],
+            [0.0, -4.56964, 0.57121, 0.0, 0.0, 4.56964, 0.57121, 0.0],
+            [0.0, -0.57121, 0.04551, 0.0, 0.0, 0.57121, 0.09729, 0.0],
+            [0.57121, 0.0, 0.0, 0.04551, -0.57121, 0.0, 0.0, 0.09729],
+        ]
+    )
     assert_almost_equal(tim.K() / 1e7, K0e_tim, decimal=5)
 
 
 def test_gyroscopic_matrix_tim(tim):
-    G0e_tim = np.array([[ -0.     ,  19.43344,  -0.22681,  -0.     ,  -0.     , -19.43344,  -0.22681,  -0.     ],
-                        [-19.43344,  -0.     ,  -0.     ,  -0.22681,  19.43344,  -0.     ,  -0.     ,  -0.22681],
-                        [  0.22681,  -0.     ,  -0.     ,   0.1524 ,  -0.22681,  -0.     ,  -0.     ,  -0.04727],
-                        [ -0.     ,   0.22681,  -0.1524 ,  -0.     ,  -0.     ,  -0.22681,   0.04727,  -0.     ],
-                        [ -0.     , -19.43344,   0.22681,  -0.     ,  -0.     ,  19.43344,   0.22681,  -0.     ],
-                        [ 19.43344,  -0.     ,  -0.     ,   0.22681, -19.43344,  -0.     ,  -0.     ,   0.22681],
-                        [  0.22681,  -0.     ,  -0.     ,  -0.04727,  -0.22681,  -0.     ,  -0.     ,   0.1524 ],
-                        [ -0.     ,   0.22681,   0.04727,  -0.     ,  -0.     ,  -0.22681,  -0.1524 ,  -0.     ]])
+    G0e_tim = np.array(
+        [
+            [-0.0, 19.43344, -0.22681, -0.0, -0.0, -19.43344, -0.22681, -0.0],
+            [-19.43344, -0.0, -0.0, -0.22681, 19.43344, -0.0, -0.0, -0.22681],
+            [0.22681, -0.0, -0.0, 0.1524, -0.22681, -0.0, -0.0, -0.04727],
+            [-0.0, 0.22681, -0.1524, -0.0, -0.0, -0.22681, 0.04727, -0.0],
+            [-0.0, -19.43344, 0.22681, -0.0, -0.0, 19.43344, 0.22681, -0.0],
+            [19.43344, -0.0, -0.0, 0.22681, -19.43344, -0.0, -0.0, 0.22681],
+            [0.22681, -0.0, -0.0, -0.04727, -0.22681, -0.0, -0.0, 0.1524],
+            [-0.0, 0.22681, 0.04727, -0.0, -0.0, -0.22681, -0.1524, -0.0],
+        ]
+    )
     assert_almost_equal(tim.G() * 1e3, G0e_tim, decimal=5)
-