We do too, Terry Virts, NASA astronaut. We do too. And although we never actually went on any rocket, simulating it's journey has been a blast. Alas, all good things must come to and end, and it's time we got back on solid ground.
It's time to put all of the theory from the last blog post into practice. Before we land, we want to simulate the landing to get a rough estimate of how the landing is going to turn out. How much force do the thrusters need in order to land? We are going to give the lander a boost towards the planet when we launch it, how big should this boost be? If we can find out these things before we send down our lander, we don't need to move onto the actual landing blindfolded.
Like our previous simulations, we want to integrate the path of an object (in this case the lander we are sending down from our rocket) using programming. We start with integrating acceleration to get the velocity, then integrating the velocity to the position. The acceleration is once again obtained from the forces acting on the object, so let's remind ourselves of the forces we identified.
The drag force from the atmosphere: \(\mathbf{F_d}= \frac{1}{2}\rho C_d A v_{drag}^2(-\hat{v}_{drag})\)
The gravitational force from the planet: \(\mathbf{F_g}=G\frac{Mm}{r^2}\hat{r}\)
And finally, the force from the thrusters, when we deploy them during our descent: \(\mathbf{F}_L = F_t\hat{r}\)
The lander has a cross sectional area of 0.3 m2, which is the \(A\) in the drag force, and a mass of 90 kg, which is the \(m\) in the gravitational force. \(F_t\) is a scalar value that we give as an input to adjust the thruster force, which works in a radial direction, hence the \(\hat{r}\). We mentioned the \(F_L\) force in the previous post, and the expression we got was by taking an analytical approach. In our actual simulation we are going to give ourselves free reign to adjust the force as we see fit. We may discover that we need more thrust force than just a force to balance out the gravitational force and the drag force, which is why we abandon the expression we initially derived.
Armed with these forces, we find the acceleration by dividing the force by the mass. (\(F = ma \Leftrightarrow a = \frac{F}{m}\), remember?)
The next thing we need is an initial position. As we didn't quite finish our simulation, we ended up going for the position we were at when NASA helped us into a stable orbit so we had something to work with. In reality, we should take the planet's rotation, the path of the lander, and the time it takes the lander to land into account when deciding the position where we want to launch the lander. The lander will move along a curved trajectory, not in a straight line downwards, and the planet will rotate by the time the lander reaches the surface. As we have several lakes on our planet, we have to make sure that we don't end up in one of them!
The lander will also have an initial velocity. As the lander is attached to the spacecraft in orbit, it will initially have the same velocity as the spacecraft. We want to push the lander out of the stable orbit of the spacecraft, and we will therefore give it a boost to push it downwards. It can also be a good idea to give it a push against the direction of motion to slow it down a bit before we let the atmosphere, thrusters, and parachute do the rest of the work.
When we are 500 meters above the ground, we deploy the landing thrusters, which gives a boost in the opposite direction of motion. We also release the parachute to further slow ourselves down. As the parachute can only handle a drag force of 250.000 N, we have to check if \(F_d\) exceeds this limit! If that is the case, we need to adjust other parameters, like the landing thrust force or the initial boost.
And this is our simulated trajectory! Looking pretty good over all, but the landing part is a bit... weird. We gave an initial boost of \(\Delta \mathbf{v} = [700, -950]\), and a thrust force of 710 N. This way, we landed with a speed of 2.7 m/s! Less thrust force gave us too much speed at landing, and more thrust force just gave us an error when running the simulation. A very satisfactory result, but the end of the landing was less than ideal.
Some quick debugging revealed that our gravitational force is about 500 N when we launch the lander, and about 20 N as we get closer to the planet. This, of course, is incorrect, and a very obvious source of error. Yet two amateur scientists banging their head against the wall could not seem to find the root cause of the problem. We also noticed that changing the thrust force didn't make an ounce of difference, and the trajectory was only affected by the initial boost.
As we already know that there are some errors in our simulation, we have to take the information we got from it with a grain of salt. That's why the actual landing will be done with some trial and error. We are going to work with the same initial position as in the simulation, as this yielded a very convenient landing spot, which we will se in the video further down. We are also going to keep the initial boost.
Our goal is to (obviously) reach our destination planet, but we also need to slow down to 3 m/s. We do this by giving the lander a boost at launch, using the parachute, and the landing thrusters when we reach 500 meters above ground.
After trying out the equipment provided to us by NASA, we realized that neither changing the area of the parachute nor giving a different boost at launch made any difference. The only thing that would change the speed at landing was adjusting the landing thrusters. (The opposite situation of what we experienced in the simulation!) This was very likely due to user error when utilizing the equipment, but we chose to press on and see how far we got with only one parameter to adjust.
An illustration of our process is provided to the left. We started at 500 N and felt pretty confident; only 5 times as fast as the maximum velocity for a soft landing! At 400 N, the velocity increased, which was no surprise, as we use less force to slow ourselves down. At 600 N we never reached the planet, which was curious, but
prompted us to take a closer look at what would happen within the interval between 500 N and 600 N. The lander never reaches the surface at 580 N, and we concluded that this was to be our upper boundary. As you can see from our notes, we had to be absurdly exact in order to reach 3 m/s. Which we almost did. Anything more or less than 579.3813 never got us to 3 m/s, so we had to throw in the towel and accept defeat at 3.0001 m/s.
After all this work, we were robbed of a proper landing by 0.001 m/s!
Still, it was fun to see our simulation and the actual landing somewhat correlate! (Unlike our travel plan, where none of our planned boosts worked out...)
The simulation and the actual landing overlap completely all the way to the end, where they drastically diverge. We can see that our simulated landing is unrealistic, and the actual landing was made in a more controlled fashion, where we slowed down after deploying the thrusters, and (almost) landed gracefully, while the simulation suddenly drops the lander straight downwards.
Our journey through space has finally come to an end, so let's check out the final product, warts and all!