How to convert rotational speed from Hz to rpm in Python using UliEngineering
You can easily convert rotational speed from Hz (revolutions per second) to rpm (revolutions per minute) using the UliEngineering Python library:
hz_to_rpm.py
from UliEngineering.Physics.Rotation import *
from UliEngineering.EngineerIO import *
# Convert 1 Hz to rpm
speed = hz_to_rpm("1 Hz")
print(f"1 Hz = {format_value(speed, 'rpm')}")
# Convert 50 Hz to rpm
speed = hz_to_rpm("50 Hz")
print(f"50 Hz = {format_value(speed, 'rpm')}")Example output
hz_to_rpm_output.txt
1 Hz = 60.0 rpm
50 Hz = 3.00 kRPMThe conversion uses the formula: $rpm = Hz \times 60$
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow