How to convert rotational speed from rpm to Hz in Python using UliEngineering

You can easily convert rotational speed from rpm (revolutions per minute) to Hz (revolutions per second) using the UliEngineering Python library:

rpm_to_hz.py
from UliEngineering.Physics.Rotation import *
from UliEngineering.EngineerIO import *

# Convert 60 rpm to Hz
speed = rpm_to_Hz("60 rpm")
print(f"60 rpm = {format_value(speed, 'Hz')}")

# Convert 3000 rpm to Hz
speed = rpm_to_Hz("3000 rpm")
print(f"3000 rpm = {format_value(speed, 'Hz')}")

Example output

rpm_to_hz_output.txt
60 rpm = 1.00 Hz
3000 rpm = 50.0 Hz

The conversion uses the formula: $Hz = \frac{rpm}{60}$


Check out similar posts by category: Physics, Python