petrobras / ross

ROSS is a library written in Python for rotordynamic analysis.
https://ross.readthedocs.io
Apache License 2.0
126 stars 101 forks source link

MisalignmentFlex and MisalignmentRigid do not run for rotors with less than 2 disks #735

Closed rodrigomoliveira1 closed 3 years ago

rodrigomoliveira1 commented 3 years ago

I was running some examples with these classes to get familiar with them, and when I tried running them using a rotor model with a single or no disk, it returned an error:

Traceback (most recent call last):

  File "<ipython-input-2-37037196aef6>", line 4, in <module>
    response = misalignment_flex_parallel_example()

  File "ross\defects\misalignment.py", line 962, in misalignment_flex_parallel_example
    misalignment = rotor.run_misalignment(

  File "ross\rotor_assembly.py", line 2589, in run_misalignment
    defect.run(self)

  File "ross\defects\misalignment.py", line 152, in run
    self.ndofd1 = (self.rotor.disk_elements[0].n) * 6

IndexError: list index out of range

Taking a closer look at .run() function, I noticed these 2 attributes:

        self.ndofd1 = (self.rotor.disk_elements[0].n) * 6
        self.ndofd2 = (self.rotor.disk_elements[1].n) * 6

It requires at least 2 disks in the rotor model.

So, I would just like to clarify if these analyzes deal with misalignment between 2 disks only or it's possible to analyze other scenarios, like no disks or multiple disk, etc.

@verg1lio, @bela-bs, @marcusfilipesr.

bela-bs commented 3 years ago

Hello Rodrigo, the way the programming was done, yes. We will have to modify some parameters in the code to improve it for arbitrary tests. We'll do that tomorrow.