Skip to content

Commit

Permalink
Merge pull request #1138 from ViniciusTxc3/dev_pint_plot_deflected_shape
Browse files Browse the repository at this point in the history
get speed in pint library for plot_deflected_shape function
  • Loading branch information
raphaeltimbo authored Jan 16, 2025
2 parents 695e6fe + aa1a52a commit 8df3e1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ross/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -4051,6 +4051,7 @@ def plot_bending_moment(

return fig

@check_units
def plot_deflected_shape(
self,
speed,
Expand All @@ -4074,7 +4075,7 @@ def plot_deflected_shape(
Parameters
----------
speed : float
speed : float, pint.Quantity
The rotor rotation speed. Must be an element from the speed_range argument
passed to the class (rad/s).
samples : int, optional
Expand Down
14 changes: 7 additions & 7 deletions ross/rotor_assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,15 +1247,15 @@ def A(self, speed=0, frequency=None, synchronous=False):
Examples
--------
>>> rotor = rotor_example()
>>> np.round(rotor.A()[75:83, :2])
>>> np.round(rotor.A()[75:83, :2]) + 0.
array([[ 0., 10927.],
[-10924., -0.],
[ -0., -0.],
[-10924., 0.],
[ 0., 0.],
[ -174., 0.],
[ -0., -174.],
[ -0., -0.],
[ -0., 10723.],
[-10719., -0.]])
[ 0., -174.],
[ 0., 0.],
[ 0., 10723.],
[-10719., 0.]])
"""
if frequency is None:
frequency = speed
Expand Down

0 comments on commit 8df3e1c

Please sign in to comment.