Skip to content

Conversation

@jguarato
Copy link
Collaborator

Resolves #1218


This PR fixes incorrect behavior in Rotor.add_nodes when applied to conical (tapered) shaft elements. The method now correctly interpolates diameters and lengths when splitting elements, preserving geometry and connectivity.

Notes

  • Updated add_nodes to handle conical elements.
  • Correct interpolation of inner/outer diameters and element lengths.
  • Fixed geometry issues when inserting nodes into conical shaft elements and ensuring rotor models remain consistent.

Example

import numpy as np
import ross as rs
from ross.materials import steel

L = 0.20

shaft_elements = [
    rs.ShaftElement(L=L, idl=0.0, odl=0.04, material=steel),
    rs.ShaftElement(L=L, idl=0.0, odl=0.04, material=steel),
    rs.ShaftElement(L=L, idl=0.0, odl=0.04, idr=0.0, odr=0.07, material=steel),
    rs.ShaftElement(L=L, idl=0.0, odl=0.07, material=steel),
    rs.ShaftElement(L=L, idl=0.0, odl=0.07, material=steel),
]

disk = rs.DiskElement(n=2, m=5.0, Ip=0.01, Id=0.02)
bearing0 = rs.BearingElement(n=0, kxx=1e6, kyy=1e6, cxx=100, frequency=[0])
bearing1 = rs.BearingElement(n=5, kxx=1e6, kyy=1e6, cxx=100, frequency=[0])

rotor = rs.Rotor(shaft_elements=shaft_elements,
                 disk_elements=[disk],
                 bearing_elements=[bearing0, bearing1],
                 tag="Rotor_with_conical_element")

new_rotor = rotor.add_nodes([0.5, 0.3, 0.66])
rotor.plot_rotor().show()
newplot(1)
new_rotor.plot_rotor().show()

Before:
newplot(2)

Now fixed:
newplot(3)

@raphaeltimbo raphaeltimbo merged commit 6dba5d1 into petrobras:main Oct 15, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add node does not work on conical shaft elements

2 participants