Rotational Dynamics

I’ve long been an advocate for thinking carefully about rotational dynamics in space colony design.  For any given object, some spin directions may be inherently unstable, as you can see in this video.  In the spacecraft industry, there is a well-known rule of thumb that the desired spin axis must have a moment of inertia at least 1.2 times that of any other axis.  However, this rule was largely unknown in the space habitat community, resulting in a lot of designs that wouldn’t work in real life.  (This is the insight that led to co-authorship of the Kalpana One paper; the original design had to be substantially revised for stability.)

Now it’s time to apply those same insights to the High Frontier game.  A grossly unstable design should wobble, and end up tumbling end-over-end, just as it would in real life.  However, when we tried to simulate this using the built-in physics engine in Unity, we ran into trouble.  No matter what we did, we couldn’t get a rotating object to tumble.  We can knock it off its original axis, sure, but as soon as we stop poking it, it just spins happily around whatever its new axis happens to be.

This led to diving more deeply into the physics, as well as asking for help on Physics StackExchange and the Unity forum.  We got a bit of help from the former, and chirping crickets at the latter, but ultimately we ended up writing our own physics code from first principles.  We know that angular momentum, in the absence of external forces, is constant.  Angular velocity (which is how the object is actually turning) is not constant, because it derives from the current inertia tensor, in world coordinates rather than object coordinates…

OK, that’s getting into gory details that most of you have no reason to care about.  To summarize: it appears that the Unity physics engine (which seems to be just wrapping the standard Nvidia Physx library) does not properly simulate rotational dynamics.  But our custom code seems to.  Check out the demonstration in the video below.

All this has put us behind schedule a bit for version 0.06; we need to incorporate this new physics code into the game itself, and figure out how we’re going to deal with multi-part colonies with rotational bearings.  But we’ll get there soon… so it would be a good idea to start thinking about rotational stability now!

Advertisements

7 thoughts on “Rotational Dynamics

  1. Stephen Covey July 31, 2014 / 9:17 am

    Isn’t part of the problem that real objects aren’t perfectly rigid – they stretch and flex? And that in a real habitat, there are nearly continuous, somewhat random (although relatively small) momentum transfers due to occupant movements, air flows, water movements, and the like? Those will apply tiny perturbations to the nice, tidy initial conditions leading to potential problems, even though they balance out in the long run (unless your inhabitants jog around the perimeter in the same direction every day).

    Like

    • Joe Strout July 31, 2014 / 1:10 pm

      That’s part of the problem, yes. Stretching, flexing, and sloshing of fluids (including air) dissipates energy, which both impacts stability and eventually causes the rotation to run down (though this could take a very long time).

      However, even with perfectly rigid bodies, some directions of rotation are far more stable than others, depending on the moments of inertia. That’s the effect we were trying to replicate (and found we couldn’t do using the Unity/Nvidia physics engine).

      Like

  2. Al Globus July 31, 2014 / 4:58 pm

    The cause of the instability is forces on the system. That can be the motion of stuff inside the cylinder, air resistance, light pressure, irregular gravity fields of the body being orbited (say, Earth), and/or other gravitational perturbations (e.g., the Moon, Jupiter, etc.). In the absence of any perturbations I wouldn’t expect the axis to do anything but sit rock solid.

    In your tests, consider addidng small random forces at irregular times. Alternately, you can try to model some of the above forces.

    Like

    • Joe Strout August 1, 2014 / 2:29 am

      Yes, it’s counterintuitive, but nonetheless true: under some configurations, the axis will tumble even in the absence of any external forces at all. This is true, for example, in the case of a rectangular prism, initially rotating about its middle (not longest or shortest) axis.

      Of course if it’s perfectly balanced to begin with, it will stay perfectly balanced until some force acts on it. But this is like a pencil balanced on its tip: give it the slightest nudge in any direction, and it will tip. In this case, the “tip” means that it starts oscillating. No further input of forces is needed after that; it’s all driven by conservation of angular momentum.

      The simulation above shows this (on the right), and if you follow the link to the video shot in the space station, you can see the same thing it in real life. Sure, you could imagine that small air currents are involved, but the math shows that they’re not necessary. These oscillations are an intrinsic behavior of rotating rigid bodies.

      Like

      • Joe Strout August 16, 2014 / 1:32 pm

        I now realize I was oversimplifying here a bit. There are two different effects we should think about separately. Shown here is the “Dzhanibekov effect” in which a rigid body with three different moments of inertia tumbles when spun about the intermediate axis.

        There’s another effect which is actually more important for space colonization, which is the tendency of any body to spin about the axis with the longest moment of inertia. This doesn’t happen in ideal rigid bodies; it requires some means of energy dissipation. This effect surprised the engineers of the Explorer 1 satellite, which was designed to spin around its long axis (the one with the least moment of inertia), but dissipated energy through whipping antennas, and ended up tumbling the other way.

        That second effect is something I’m still working on modeling for the game… I’ll get it soon!

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s