rigid_body_ode, a Python code which solves the ordinary differential equations (ODE) representing the Euler equations for a rotating rigid body with three unequal moments of inertia, originally proposed by Fred Krogh.
A rectangular object can rotate stably about its longest or shortest axis, but not the intermediate one. We let x(t), y(t), and z(t) be the angular momenta, and I1, I2, I3 the moments of inertia about the three principal axes.
The ODE can be written:
x' = a y z y' = b x z z' = c x ywhere:
a = 1/I3 - 1/I2 b = 1/I1 - 1/I3 c = 1/I2 - 1/I1
Example choices include (I1,I2,I3) = (1,1/2,1/3) and (I1,I2,I3) = (1/6,1,2/3).
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
rigid_body_ode is available in a MATLAB version and an Octave version and a Python version.
python_ode, Python codes which sets up various systems of ordinary differential equations (ODE).