Variable center of pressure.
The blue dot indictes the center of pressure. At lift-off the rocket is
pitched by just a 1/1000th degrees simulating sort of a disturbance. The pitch
leads the rocket to be slightly unsymmetrical around its flight path. Upon
reaching maximum height, the center of pressure is below the center of mass
(small moving point slightly below the center of pressure during the first two
seconds at lift-off). After reaching maximum height, the rocket will start to
descend due to gravity and will start to flip over due to the aerodynamic
forces (lift and drag, drag only in this example) acting on the rocket. The
point of action of these aerodynamical forces can be thought off as acting
through the center of pressure. With respect to the given example here, the
drag force pulls at the center of pressure while the rocket is descending at a
slight angle. This, essentially, produces a torque around the center of mass
leading the rocket to flip over. Note: The strong oscillatory motion will be
damped by a lifting force, which isn't implemented yet. And for the sake of
completeness, the rocket burns fuel out of the lower section and as such loses
mass making the lower stage much lighter then the upper stage, as one can see
by the moving center of mass. So it becomes way easy for the drag force to
flip the lower stage over.
Backdraft:
For those who are more technically interested.
Due to an ingenious thought I had, objects are now able to rotate solely by
aerodynamic forces applied to them. I finally found a way to approximate the
pressure around an object and was able to compute the center of pressure from
it where the lift and drag forces are (better; should in general be) applied.
And since the center of pressure is usually at a distance to the center of
mass, a torque will be generated making objects start rotate about its center
of mass.
The classic parabolic flight path of a rocket. The rotation of the rocket is
solely due to drag with respect to the (moving) center of mass.
Well, it is virtually impossible without doing a proper fluid simulation to
get the pressure distribution around any objects for many different attitudes
-- that's why we have lift and drag coefficients to begin with. If we would
have this distribution, we could actually compute lift and drag from it. Of
course, the pressure distribution around an object can be computed by doing a
full fluid simulation, but to get the same lift and drag data from such a
computation compared to the lift and drag data from, for example, a NACA
airfoil would require a very accurate simulation, which would take hours to
compute to yield the pressure field. Having the pressure around an object is
one thing. Computing lift, drag, and the center of pressure is another one.
Now lets say we got lift and drag from somewhere. The most important question
is; where do we apply these forces? These forces can be thought of as acting
through just one point, i.e. the center of pressure. But where to get this
center from when there is no pressure distribution we can compute it from?
Engineers have circumvented this problem for airfoils by having found a point
similar to the center of pressure which doesn't change like the center of
pressure does (which changes with the angles of attack, usually). And this
point is known as the aerodynamic center which usually doesn't coincide with
the center of pressure. But the difference is accounted for by including
another datum within the lift and drag data charts, i.e. the momentum
coefficient accounting for the pitching moment an airfoil experiences due to
the difference in pressure distribution below and above the airfoil.
(As you can see, I've made some progress towards the wings!
)
Hence, having lift, drag, and the pitching moment, one doesn't need a pressure
distribution. But now guess you don't have any airfoil with known data.
Instead you may have kind of a different object. Now where do we apply the
(possibly user created) lift and drag forces? At the center of mass? Well, you
can do it that way, but your objects won't start to rotate, since, usually,
the center of pressure is at a distance (> 0) to the center of mass. And any
force acting through the center of pressure in a line different than the one
connecting these two centers will start to produce a torque making the object
rotate, which is way cool -- and gives my expensive angular momentum equation
something to shine through!
One solution would be to manually set the center of pressure for each object.
If chosen wisely, one can get good results this way. However, this will be
sort of a trail and error approach and you will need a good understanding of
some aerodynamics nevertheless. And once you change the geometry, everything
will be off.
And we would still have to consider that the center of pressure moves while
an object moves through the air, i.e. changes its attitude. So usually we
have to account for this as well, which is impossible until the pressure
distribution is trivial or you get it from a fluid simulation.
However, I drew a pretty good conclusion from a fundamental observation, i.e.
all aerodynamic forces (and as such the pressure) are proportional to the area
of a surface.
That means, if we change the surface area the pressure will change as well,
and with it the center of pressure of the whole body. Hence, the center of
pressure is dependent on the surface area, of course. Given the pressure it
would be possible to compute the center of pressure with respect to the
surface area. But we don't have the pressure.
Here is how I solved this problem; I did a very rude approximation of the
pressure around the rocket and have integrate it around the surface area of
the rocket leading to a, well, center of pressure! Well, it was a lil more
difficult as these lines here say.
The approximation can be improved by inputting a better pressure distribution.
It's an idea of mine to use my oncoming fluid simulator to compute a very
rough pressure distribution in realtime, or, if this isn't possible, to
compute some fixed pressure distributions and use interpolation in-between.
Would be quite a novelty if that is going to work, yielding some awesome
dynamics. Anyhow. Now someone could than say; given this rough approximation,
why not also compute lift an drag from it? Well the problem is, one would
get very bad lift and drag values for the object at hand. The simulation needs
to be very detailed to get good values. However, with respect to the center of
pressure we just need a rough location which can be off by some margin.
The cool thing with this model is that I don't have to set the center of
pressure by trail and error. And best of all, the center of pressure will
move with respect to the surface area, since it depends on it. Hence, objects
can change their shape and will as such change the position of the center of
pressure as well -- influencing the objects behavior through the air.
For the games I have in mind this means that I can for example add retractable
or extendible surfaces to a craft to change the crafts center of pressure
modifying its racing characteristics. Possibly at runtime.
Well, I essentially came to this idea of approximating the center of pressure
while looking at the (crisscross) fins of a standard rocket. I knew they are
used for stabilization. But I didn't knew how by just looking at the
aerodynamic forces like lift and drag they generate. But I knew also that a
usual engineer won't knew about the exact aerodynamics of the fins at all, yet
he places some of them aft the rocket. So I skipped lift and drag and
considered the pressure from which these quantities are generated. And than it
become clear to me; by enlarging the aft section of the rocket in area with
the help of the fins, there will be more area exposed to the air, which will
ultimately influence the pressure of the entire rocket, esp. at the aft
section, producing a larger area where pressure forces can act. This,
essentially, pulls the center of pressure towards the aft section of the
rocket! Hence, increasing the fins will pull the center of pressure down. Why
is that important? Because the center of pressure needs to be below the center
of mass to make the rocket stable during ascend. So either one rises the
center of mass, which is may more complicated due to design considerations, or
one puts larger fins aft the rocket to make it more stable. That's the deal
with all the fins! But one can use them also to navigate/trim the rocket as
well.
So even while you don't know anything about the pressure distribution around
a rocket, you can add some fins aft to it and it will become more stable
during ascend. By understanding why this mechanism works out of the box
without killing the rockets aerodynamics, I was able to implement a model for
approximating the center of pressure for a given object.
For my rockets this means that they will now start to turn solely by the
aerodynamic forces. To make it clear, I don't have to rotate the rocket
myself (the nozzle is held fixed in all the animations). The aerodynamic
forces will do the job.
Currently, I have only a drag model implemented, lift will follow soon, but
drag is already enough to make the rocket turn over while the center of
pressure is below the center of mass and the rocket is slightly tilt to the
flight path descending downwards. This, essentially, is an instable
configuration;
The rocket to the right has more surface area (fins not shown) attached to the
lower stage pulling the center of pressure more downwards.
The rocket to the left has the same amount of surface area attached to the
upper stage as the one to the right has on its lower stage. Both rockets are
pitched by 10 degrees at lift-off. As one can see, the drag force pulls the
rockets in quite different directions.
Same as above, different perspective.
This model here is currently in an early stage of development, but even at
this stage it's already quite useful and delivers rather good results.
Everything written and show here is just for the purpose of programming cool
video games for the masses. Going deeper is what pushes me forward. And I hope
you guys and gals try to do the same.
Don't give up!