This looks like a good method, and with the code, ideas like this are of immediate interest. The general or canonical method of defining torque is
Tq = (dL / dt) (X, Y, Z) = (dL / dt + omega x L)(1, 2, 3)
leading to Eqs. (10.120) of Marion and Thornton, the Euler equations with torque. Here L is angular momentum. These are Eqs. (2) to (4) of UFT368, and the code can be used to build up any torque from the Euler angle trajectories of UFT368.
Sent: 31/01/2017 09:58:53 GMT Standard Time
Subj: External torque on gyro
To model an external torque around the Z axis, we could add this in the
Lagrange equation for phi. Since this equation is of first order, I
suggest to make an additional time derivative. Then we can write:
phi dot dot = … + Tq/I_phi
where I_phi is the momentum of inertia aroud the Z axis. Perhaps this
can be approximated by
I_phi approx. (X^2+Y^2)*m
What is the “canonical” method to introduce a torque? It must appear in
the kinetic energy then, before applying the Lagrange mechanism.