zondag 30 maart 2014

Propagating trajectories

It is many weeks since my last blog post, my humble apologies! I was very engaged with my work. I was teaching students the wonders of Planetary Sciences, which is a difficult task, because 80 percent of them just wants to build satellites (damn you engineerings, wanting to built stuff). However I do not complain because this year's group is really participating and some of the students even want to do some science (mate).

In one of their last assignments they had to work with ballistic trajectories (calculating planetary geysers and volcanic exit velocities). This particular subject gave me inspiration for a new blog post, so there you go. Ballistic trajectories always interested the minds of many young boys (and might a say girls) and I have a great story about it, but I was always hesitant to write it in my blog. Some would say (me being one of them) that guns are bad (but can be modeled very well with ballistic trajectory theory)! Still my fascination for modeling and science wins this internal discussion.

What is the ballistic trajectory assumption? It is a way to model objects that are kicked, thrown, blasted and shot into the air. For example a stone, arrow, bullet or cannonball (Oh, I am re-living knights and dragons, which I played when I was a boy). Lets say you want to know at what angle you should hold your bow and arrow (gun or cannon) to shoot the farthest. What is your maximum reach! Very handy to know, so that you can shoot your enemy knights. In the movies (I saw a lot of cowboy, king Arthur and Roman age movies) they always state that you want to shoot the farthest, the angle of bow and arrow should be 30 degrees. Lets check that with the ballistic trajectory assumption.

When shooting an arrow in our model world it is only affected by gravitational attraction of the ground. On Earth this acceleration is around 9.8 m/s^2 (depending a little bit where you are on a Earth). It is pulling the object (in our case the arrow) back to the ground. However, this is delayed because we give the arrow a certain initial speed at a certain angle, when we release the bow. This will give the arrow a parabolic flight path.

The exit velocity in this case was 100 m/s and the exit angle was 45 degrees. This results in a parabolic flight of the arrow.
Depending on the angle, the arrow flies high or low and will drop to the ground far away or close by. The trajectory of the arrow is characterized with the following equation:


Here is s the location of the arrow, v is the velocity of the arrow and a is the acceleration of the arrow. Both s0 and v0 are the location and velocity at the beginning. In 2D space this relationship is a vector equation with two dimensions, x and y. So s is a vector which states the location of the arrow in x and y dimensions. The acceleration on the arrow is only the gravitational attraction, ay = -g. This relation can be solved when we have an estimate for the exit velocity and the angle of the bow and arrow. Because the exit velocity is fixed (depending on the strength of your bow, or how much gunpowder you use), essentially we have to solve this equation for maximum distance depending on the angle. Or, in other words, the longer the arrow stays in the air, the further it travels. So (using the abc-formule):


Solving this results that the maximum distance with a bow and arrow (or any other trajectory producing device) is 45 degrees. Hmmm, this is not the same as in the movies! Are the movies incorrect? Of course not!

We miss an essential parameter, namely air-drag. The arrow is flying through an atmosphere which slows the arrow down. So we have to model this as well and here is where the propagator comes into play. The introduction of drag makes the problem that much complex that it cannot easily be solved analytically. Therefore, a numerical propagator is used to solve the problem. What is a propagator and how can we solve the problem with drag.

There are many different propagators: Runge-Kutta, Adams-Bashford (see my previous post), and many others. But to explain the principle we use the most simple one called the Euler propagator (after the famous mathematician Euler).


This relation states that a state of an object in the future can be determined by its previous state plus its time derivative times the amount of time between the two states. For example, when I run with constant speed (15 km/h) and I know where I am now, I can predict where I will be after one second, because of my constant running speed. You can even go a little bit more complex by using the Euler propagator to estimate your velocity, when accelerations are known.


With these two relations, the trajectory of the arrow can be computed (or propagated) with any known force model (gravity, drag, wind, rotation of the Earth, aliens shooting at it, higgs boson, ...). We only have to determine the force model, which in our case, now is gravity and air-drag.

To determine the air drag, we need some physical parameters of the arrow (ballistic coefficient!!). I found another geeky site which explains this quite well. Furthermore, I need a density profile of the Earth's atmosphere. Because we are not doing rocket science, I will estimate the density of the atmosphere by a simple exponential decaying relation (you will be surprised how many rocket scientists still using an exponential decaying density distribution). Now that we have all the physical parameters, lets shoot some arrows!

Great thing about modelling with computers is that you can do many experiments in seconds. So I used the physical parameters of a heavy thin arrow (best of the best!) and shot the arrow at angles between 0 and 90 degrees and I measured the distance they traveled. These were the results:


As you can see, around 30 degrees the arrows travelled the furthest. So you see, movies are correct when it comes to arrow trajectories.

Arrows are very nice, but does this also work with the biggest gun ever made: the Paris gun. This gun was used by the Germans to shoot at Paris (giving its name.), however they used an elevation angle (exit angle) of 55 degrees. Could they shoot even further?

Using the parameters from the wikipedia page to calculate the ballistic coefficients of the Paris Gun bullets and putting this in my program, resulted in the following plot.


Clearly, a different profile is seen with respect to the bow and arrow case. First of all, the used elevation of 55 degrees results in the largest distances achieved. Also an asymmetric profile is seen, this is mainly due to the atmosphere. The projectiles of the Paris Gun flew between 20-60 km height. At these altitudes the atmosphere is very thin, which caused the the projectile to fly even further. The 55 degrees elevation would cause the projectile to fly quickly above the thick atmosphere and travel its largest distances above the troposphere. However, at exit angles below 30 degrees, the projectile would stay in the troposphere experiencing a lot more air drag.

Again modeling proves that movies and wikipedia tell the truth!