Torque and Angular Momentum
Useful Equations ¶
-
Linear Velocity $v$ ($m/s$):
-
$v = [\omega]_\times r$
-
-
Linear Acceleration $a$ ($m/s^2$):
-
$a = [\alpha]_{\times} r$
-
-
Angular Velocity $\omega$ ($rad/s$):
-
$\omega = [r]_\times v$
-
-
Angular Acceleration $\alpha$ ($rad/s^2$):
-
$\alpha = [r]_\times a$
-
-
Torque $\tau$ ($N \cdot m$):
-
$\tau = [r]_\times F$
-
-
Angular Inertia $\mathcal{I}$ ($kg \cdot m^2$):
-
$\mathcal{I} = mr^2$
-
-
Momentum $p$ ($kg \cdot m/s$):
-
$p = mv$
-
-
Angular Momentum $\mathcal{L}$ ($kg \cdot m^2/s$):
-
$\mathcal{L} = \mathcal{I}\omega$
-
- $\mathcal{L} = [r]_\times p = mr^2 \mathbf{\omega}$
- $\tau = \mathcal{I} \alpha$
- $\tau = \frac{d\mathcal{L}}{dt}$
Angular Momentum ¶
Though there are lots of equations expressing relations between different quantities, the real cause to make a object rotate is a force on it. So like:
- Give a force $F$ at $r$
- We get a torque $\tau = [r]_\times F$
- We get angular acceleration $\alpha = \tau / \mathcal{I}$
- The object starts to rotate and rotation speed $\omega = 0 + \alpha t$
- Remove the force
- Torque becomes 0
- Angular Momentum stays not changed as $\frac{d\mathcal{L}}{dt} = 0$.
- If we reduce $r$, $\omega$ will increase as $\mathcal{L} = mr^2\omega$
Based on steps described above, we need to know the force $F$ and $\mathcal{I}$. Here is a list of examples for momentum of inertia.
In the code below, we put $F_0$ and $F_1$ onto the object and let it rotate. And it also shows $F_1$ doesn't really change rotation axis since it is much smaller than $F_0$. This is exactly how gyroscope works. We make a disk rotate very very fast so it will keep its angular momentum not changed.
# Torque plot
import k3d
import k3d.platonic as platonic
import math
from time import sleep
import numpy as np
plot = k3d.plot()
obj1 = platonic.Cube().mesh
obj1.color = 0x00ff00
plot += obj1
angle_degree = 0
gamma = angle_degree * 3.1415926 / 180.0
obj1.transform.translation = [0, 0, 0]
obj1.transform.rotation = [gamma, angle_axis[0], angle_axis[1], angle_axis[2]]
obj2 = platonic.Cube().mesh
obj2.color = 0x0000ff
plot += obj2
obj2.transform.translation = [0, 0, 0]
obj2.transform.rotation = [gamma, angle_axis[0], angle_axis[1], angle_axis[2]]
plot.display()
weight = 6 # kg
# https://en.wikipedia.org/wiki/List_of_moments_of_inertia
inertia = 1 # kg * m^2
SIMULATION_TIME_SEC = 3
r = np.array([1, 0, 0])
F0 = np.array([0, 10, 0])
F1 = np.array([0, 0, 0.1])
F = F0 + F1
torque = np.cross(r, F)
alpha = torque / inertia
ACCELERATION_DURATION = 2
omega = alpha * ACCELERATION_DURATION
rotation_axis = np.stack((np.array([0, 0, 0], dtype=np.float32), 2 * omega / np.linalg.norm(omega)), axis=0)
plot += k3d.line(rotation_axis, shader='mesh', width=0.05, color=0xff0000, name='rotation axis')
SLEEP_TIME_SEC = 0.01
gamma = 0
for i in range(int(SIMULATION_TIME_SEC / SLEEP_TIME_SEC)):
angle_axis = omega / np.linalg.norm(omega)
gamma += np.linalg.norm(omega) * SLEEP_TIME_SEC
obj1.transform.translation = [0, 0, 0]
obj1.transform.rotation = [gamma, angle_axis[0], angle_axis[1], angle_axis[2]]
sleep(SLEEP_TIME_SEC)
#