import numpy as np
import matplotlib.pyplot as plt
from IPython.lib.display import YouTubeVideo
YouTubeVideo('FPg5EjHEo6c')

Building Quiz_06

A 2m×2m×2m cube is attached at a corner to a spherical joint. It can rotate along the x-, y-, and z-axes, but the attached corner cannot move. The moment of inertia about its center of mass is

IG=m12[800080008] m2

a. Use the parallel axis theorem to shift the point of rotation to corner where the cube is fixed.

b. What is the kinetic energy if the cube has an angular velocity of ω=1ˆi+10ˆj

I_G = 8/12*np.eye(3,3)
I_G
array([[0.66666667, 0.        , 0.        ],
       [0.        , 0.66666667, 0.        ],
       [0.        , 0.        , 0.66666667]])

Parallel axis theorem

IO=m[y2+z2xyxzxyx2+z2yzxzyzx2+y2] m2+IG
x = -1
y = -1
z = -1
I_parallel = np.array([[y**2+z**2, -x*y, -x*z],
                       [-x*y, x**2+z**2, -y*z],
                       [-x*z, -y*z, x**2+y**2]])
I_parallel
array([[ 2, -1, -1],
       [-1,  2, -1],
       [-1, -1,  2]])
IO = I_parallel + I_G
IO
array([[ 2.66666667, -1.        , -1.        ],
       [-1.        ,  2.66666667, -1.        ],
       [-1.        , -1.        ,  2.66666667]])

Kinetic Energy

Kinetic energy because the point of rotation is fixed,

TO=12ωIOω

omega = np.array([1, 10, 0])

T = 0.5*omega@IO@omega

T
124.66666666666664
hO = IO@omega
hO
array([ -7.33333333,  25.66666667, -11.        ])