Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM bug fix created a issue when rescaling hertz #174

Open
seanbrant opened this issue Feb 26, 2020 · 4 comments
Open

RPM bug fix created a issue when rescaling hertz #174

seanbrant opened this issue Feb 26, 2020 · 4 comments

Comments

@seanbrant
Copy link

seanbrant commented Feb 26, 2020

The bug fix in commit 393d37e introduced a bug when rescaling rpm's to hertz's.

Example:

import quantities

print(quantities.Quantity(60, 'rpm').rescale('Hz'))

# used to equal 1.0 Hz before the bug fix
# now equals 6.283185307179586 Hz
@seanbrant seanbrant changed the title RPM bug fix created a issue when rescaling to a unit based on hertz RPM bug fix created a issue when rescaling hertz Feb 26, 2020
@apdavison
Copy link
Contributor

hi, do you have any suggestions on how this should be fixed? What is the relationship between a cycle and a revolution?

@benhamill
Copy link

According to https://www.convertunits.com/from/hertz/to/RPM, 1 hertz = 60 RPM.

This seems to have occurred because of the more complex modeling of rpm that includes pi (notice that it's saying that 60 rpm = 2pi Hertz). I'm not sure the best way to account for this without simplifying the definition of revolution again or writing special case logic somehow.

@benhamill
Copy link

I think it might help if you could explain the cases that rpm being defined in terms of revolution instead of just 1/min was important. The commit that made that change didn't have tests or anything and the Issue that inspired it didn't have a lot of discussion, IIRC.

@carl-youngblood
Copy link

If I'm reading this correctly https://en.wikipedia.org/wiki/Revolutions_per_minute then RPM should be 1/60.

The value that rpm was changed to in 393d37e of 2pi / 60 is the value you would expect when asking for the angular velocity of something completing 1 RPM. Specifically, the value of 2pi / 60 radians per second.

The key distinction is that revolutions per minute do not have a unit associated with them, but angular velocity does explicitly include radians.

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

No branches or pull requests

4 participants