Replies: 1 comment
-
|
Just to report that this has been solved in the following PR: #944 The 1.4 version has this fixed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have used the rotor design mentioned in the modelling tutorial and tried for a static analysis. there was a error message as mentioned below the code. I am using the ross lib latest version 1.3.0 and Python 3.10.0. Can anyone tell me whats the problem
code:
steel = rs.Material(name="Steel", rho=7810, E=211e9, G_s=81.2e9)
steel2 = rs.Material(name="Steel", rho=7810, E=211e9, Poisson=0.3)
steel3 = rs.Material(name="Steel", rho=7810, G_s=81.2e9, Poisson=0.3)
n = 6
shaft_elem = [
rs.ShaftElement(
L=0.25,
idl=0.0,
odl=0.05,
material=steel,
shear_effects=True,
rotary_inertia=True,
gyroscopic=True,
)
for _ in range(n)
]
disk0 = rs.DiskElement.from_geometry(
n=2, material=steel, width=0.07, i_d=0.05, o_d=0.28
)
disk1 = rs.DiskElement.from_geometry(
n=4, material=steel, width=0.07, i_d=0.05, o_d=0.28
)
disks = [disk0, disk1]
stfx = 1e6
stfy = 0.8e6
bearing0 = rs.BearingElement(0, kxx=stfx, kyy=stfy, cxx=0, n_link=7)
bearing1 = rs.BearingElement(6, kxx=stfx, kyy=stfy, cxx=0)
bearing2 = rs.BearingElement(7, kxx=stfx, kyy=stfy, cxx=0)
bearings = [bearing0, bearing1, bearing2]
pm0 = rs.PointMass(n=7, m=30)
pointmass = [pm0]
rotor1 = rs.Rotor(shaft_elem, disks, bearings, pointmass)
print("Rotor total mass = ", np.round(rotor1.m, 2))
print("Rotor center of gravity =", np.round(rotor1.CG, 2))
plotting the rotor model
rotor1.plot_rotor()
running static analysis
static = rotor1.run_static()
error:
ValueError Traceback (most recent call last)
Cell In[61], line 1
----> 1 static = rotor1.run_static()
File c:\python_project\venv\lib\site-packages\ross\rotor_assembly.py:2889, in Rotor.run_static(self)
2887 for j in range(mx.shape[0]):
2888 if j == 0:
-> 2889 mx[j] = [0, 0.5 * sum(vx[j]) * np.diff(vx_axis[j])]
2890 if j == mx.shape[0] - 1:
2891 mx[j] = [-0.5 * sum(vx[j]) * np.diff(vx_axis[j]), 0]
ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1.
Beta Was this translation helpful? Give feedback.
All reactions