DIY ROCKET SHIP!!

This is a Do It Yourself tutorial on how to build your rocket ship (to a certain degree)

Now we buil…

Karl: Rebecca?!?! Where are you?



 

To avoid any big surprises, we need to simulate our space voyage. Our gas tank will have a dimension of 10-6 m in each direction and eventually more than 105 particles in this tiny space! There is no way we can keep track of all those particles (unless we have a super computer, which we do not have). Luckily we found this DIY (do it yourself) rocket ship list. Let us read it together:

 

  1. Keep track of particle movement

In order to keep track of the particles, we need some particles to even look at. We will generate them randomly. By randomly, we will use something called Gauss distribution (random.gauss) to give it a initial velocity. Do not worry, I will explain more about Gauss further down on this page. To generate a position we will use random.uniform in order to place a particle within our box with equal probability for it being placed anywhere in the box. 

To spy on this particle, there is something called the “Eulers method”. Yes, fancy wording that tells you nothing. 

Figure 1.6: How to spy on gas particles with Euler’s method

 

Now that we have a figure to visualise. Briefly explained, Euler’s method lets you calculate the position and velocity of a particle numerically, in other words you can look at the change in acceleration (which we will blissfully ignore), velocity and position over a small time step, and update them according to their preceding values. Amazing, right?! This trivialises the simulation of the random particle movement within our engine, meaning we won’t need to find some super over the top function to describe it. 

 

  1. Bounce bounce

So, what if they bounce on to one of the sides of the box? Hint: H2 is an ideal gas! Our only consideration is what if they bounce on to the walls, which also happens to be an elastic collision. We only need to switch direction of the component perpendicular to the bounce surface. Easy peasy lemon squeezy. 

 

Figure 1.7: A bounce scenario simplified in 2D system. See how only Vx switches direction?

 

  1. Double escape?!

While we escape our dear dear planet, particles will escape as well through the hole in the box. 

If we keep track of how many particles escape and their velocity we could calculate how much fuel is needed to complete the voyage. However, we will use a magic trick (at least for now). Every particle that leaves the box through the hole will magically teleport back into the box with the same velocity (to maintain the momentum). It is like a video game where you never die. You just keep reappearing in the game universe. 

 

  1. What a teeny tiny box????

There is no way this teeny tiny box can help us escape? Thanks Jedi Frode for teaching us about statistics (even though it is super boring, sorry) and mastermind Gauss. We know our molecules will ALWAYS follow a gaussian distribution. If we just multiply the amount of boxes, we should be able to take off! Why you may ask? As long as we keep the same amount of molecules in every box, aka. make a clone of each box, they all should follow the same gaussian distribution. Simulation will be made easier if we only need to keep track of one box type!!

 

Time to test everything...

Publisert 7. sep. 2021 17:05 - Sist endret 6. mars 2023 13:35