Thanks for the clarification.
If you have E Joules of energy, you can apply a torque of E/theta Newton-metres, where theta is the angle turned by the object being twisted:
T = energy / theta
T = power / angular velocity
(where all angles are measured in radians)
It sounds like you are keen to calculate an accurate simulation, in which case you should bear in mind that in order for formulae like these to be useful, everything you do must be in S.I. units: distances in metres, masses in kilograms, angles in radians, and everything else in units directly derived from these (eg. velocity in metres per second.)
If the flywheel is being used to turn the ship, then the torque on the wheel should be equal and opposite to the torque on the ship.
Tartley - Jonathan Hartley,
Using Pymunk (Chipmunk's Python bindings) for a game project: