Last edited May 3, 2008 by Michael Mlsna

Find this document at

illiBalloon: A Dubious Experiment in Levity 2008


My program will model the physics of a hot air balloon as it rises and falls according to Archimedes' principle of buoyancy. Buoyancy is defined as "the upward force on an object produced by the surrounding liquid or gas in which it is fully or partially immersed, due to the pressure difference of the fluid between the top and bottom of the object" (Wikipedia). Essentially, the density of the fluid on the bottom of the object 'pushes' up while gravity 'pushes' down. Objects float when the buoyant force equals the force of gravity, objects sink when gravity is greater, and objects rise when the buoyant force is greater. Buoyancy is most commonly thought to involve liquids, and having objects be submerged in them. However, another application of buoyancy is in the physics of hot air balloons. Since buoyancy depends on the pressure difference between the fluids above and below the object, hot air balloons must make the pressure inside the balloon greater than the pressure outside of it. This is achieved by heating the air inside of the balloon by burning propane, causing the pressure to increase. Then, the force of the displaced air will be greater than the force of gravity, causing the balloon to lift. I will explain the math and physics of hot air balloons later in more detail.

Buoyancy is also known as Archimedes' principle, who is given credit for discovering this law of physics. According to many myths, Archimedes discovered that the volume of liquid that was displaced by a submerged object was equal to the volume of the object. Then, according to the legends, Archimedes ran through the streets of Syracuse naked, shouting "Eureka!". A picture of Archimedes can be found here (fully clothed, of course).

Hot air balloons are the worlds earliest form of manned-flight. The first hot air balloon was invented the the Montgolfier brothers in 1783; however, credit for the first manned-flight goes to Jean-Francois Pilatre de Rozier and Francois Laurent d'Arlandes of Paris on November 21, 1783. Hot air balloons have come a long way since those days. In 2005, Vijaypat Singhania set a high altitude record for hot air balloons--his balloon reached a staggering 21,290 meters. However, most commercial hot air balloons stay afloat at much more conservative altitudes.

Math and Physics

As I said before, the buoyant force is essentially the weight of the displaced fluid pushing up on the object. In the case of hot air balloons, the displaced fluid is the atmosphere. Thus, the buoyant force is equal to the weight of the cool air (as in unheated air) that is displaced by the balloon. The other force acting on the balloon is gravity, which takes into account the mass of the heated air inside the balloon and the mass of the balloon itself.

As stated earlier, buoyancy can be thought of as the difference in pressures between the surrounding fluid and the fluid on the inside of the hot air balloon. Buoyancy can then be thought of as B = -pVg, where p=density of (cool) air, V=volume, and g=gravity.

The force of gravity is equal to mg, where m=mass of balloon and heated air, and g = gravity.

The net force acting on the balloon, therefore, is mg-pVg.

Now, since my program will be manipulating the temperature in order to cause the balloon to rise/fall, we must put the buoyancy equation in terms of temperature.

By the Ideal Gas Laws, we all know that PV=nRT, where P=pressure, V=volume, n=moles, R=universal gas constant, and T=temperature. Density d=m/V, and moles n=m/MW, where MW=molecular weight. By substitution and some rearranging of variables, we get the buoyant force B=nPVg/RT.Now we have put the buoyancy equation in terms of temperature T.

The last piece to the puzzle is to relate temperature T to the amount of propane burned. In order to do this, I need the specific heat of the atmosphere, which I found out to be 1.009 kJ/kg*K. Then, by finding the moles of air in the balloon (n=PV/RT), I could find the mass of air in the balloon (moles * molar mass). The molar mass of air is 0.2879 kg/mol. Therefore, I could calculate the specific heat for the entire balloon (specific heat is the heat (J) required to raise the temperature of by 1.0 degrees K). By using the heat of combustion of propane and dividing it by the mass of propane burned, I could calculate the total heat generated from a given amount of propane. A simple division of that heat by the specific heat of the balloon gave me a dT for the balloon, in terms of grams (or kg) of propane burned.

Therefore, I now had related buoyant force to mass of burned propane. With the buoyant force and the weight of the balloon, I could now calculate the acceleration acting on the balloon (F=ma), and then derive the velocity and position of the balloon.

And that is the end of the math!


Operating Instructions

Since this program is written in Python, there is no need to recompile the program before executing it. Once in Aszgaard, simply go to the directory where it is located, and type 'movpy' in the shell. The program should appear.


The balloon follows the physics of hot air balloons described above. Heating up the gas increases the pressure inside the balloon, giving the balloon more buoyancy, which results in lift. The propane is burned by pressing the 'i' key. The propane will keep burning until another button is pressed (most likely '1', the 'idle' button). The other buttons are for navigation.

When the propane is burning, the temperature will rise. This can be seen visually in the color of the balloon. When the gas inside the balloon is the temperature of the atmosphere (it cannot go any lower), it will be blue. When the the gas inside the balloon has reached the maximum operating temperature (around 390K), the balloon will be red. Intermediate temperatures will be represented by intermediate shades of blue and red.

As of May 5, there is no visual representation of a 'floor' or 'stars'. However, when the balloon reaches where the floor should be, it will stop. The stars would be useful for navigation, but they have not yet been implemented. Due to the lack of stars, it is difficult to guage where you are in relation to the balloon, but this is not a terrible problem.


1. By default, the program is in 'idle' mode. Moving the mouse will not do anything.

2. Head mode. Moving left, right, up, or down, will cause the 'head' to move. This is not rotation, simply translation.

3. Zoom mode. Moving up on the mouse zooms in, moving down zooms out. Left and right do nothing.

4. Turn mode. Moving left, right, up, or down will cause the 'head' to rotate.

i. Pressing the 'i' key will cause the propane tanks to ignite, increasing the temperature and thereby causing lift. Ignition will not stop until another button is pressed, preferably '1'.

ESC. Exits the program

Progess Report


I changed the proposal idea from a chess simulation to a model of hot air balloons. The chess simulation proved to be beyond my programming experience. To properly model the AI of the chess game, I would have needed to learn another programming language better suited for AI, and c++ would not fit the bill. Also, the matter of moving peices proved to be another obstacle in my way.
Therefore, I am now planning on modeling a hot air balloon. The motion of the hot air balloon depends on the weight of the balloon(W=mg) and the buoyant force(as described by Archimedes's Principle, B = -pVg). I am currently planning on implementing the program using VPython for the graphics, seeing as how my only other programming experience has been with c++ and Java, neither of which I have done much any extensive graphics programming. I plan to manipulate the equations of weight and buoyancy to put them in terms of temperature.


I have done most of the research for the buoyancy and temperature equations. I have a rudimentary balloon working in VPython that responds to mouse clicks. The graphics are still very crude, but I will try to figure out how to texture map in VPython.


I have an almost complete program working in VPython. I have added the thermodynamic elements to the program, incorporating in the specific heat of air and the heat of combustion of propane. I can now model the hot air balloon in terms of grams of propane burned, not just temperature.


I have switched the VPython program into an object oriented program. I have an environment class and a balloon class. The environment class contains all the data relating to the current environmental conditions, such as pressure, and temperature. This class also holds many of the constants, such as the molar mass of propane and the heat of combustion of propane. The balloon class contains data relating to the balloon, such as position, velocity, acceleration, color, temperature, etc.


There appears to be a major snag in my program. After talking to Professor Francis, it appears that I have misunderstood the assignment. My VPython program will not run in SZG. I have been doing the wrong assignment for the past few weeks! I need to turn my program into either a master/slave program or distributed scene graph program. I will have to rewrite the program, probably from using an existing program as a template. Much work remains to be done!


My presentation is in a few days! I have spent a few good days converting my program from VPython into a SZG compatible program. It is now a distributed scene graph. After a lot of fiddling and tweaking, I have managed to get some rudimentary graphics working for my program. One major problem was that I could not find a way to process user input using the default simulator. I found a program that created it's own simulator, so I borrowed that code. My navigation is much worse than that of the default simulator, but that cannot be helped at this point. My program seems to run fine, except it throws an error if the mouse is clicked. That didn't happen before, but I suppose it is alright for now, seeing as how I don't need mouse-clicks to run the program or navigate.


I have solved the mouse clicking problem, so now it doesn't crash whenever I press a button. I have also managed to get the color to change according to the temperature of the balloon. I still have to get a floor into the scene graph, but I am having many problems with that.

Future Goals

In the future, I would definitely hope to update the graphics in illiBalloon. Right now, the balloon is only represented by a sphere.

I would also like to fix the navigation, because at the moment I can only go zoom and shift the head. I cannot fly around in 3-space, as other programs enable you to do. The problem is with the custom simulator. Either I get the default simulator (superior navigation) with no keyboard input, or I am stuck with poor navigation with keyboard input.

Many of the variables in this program have been replaced with constants for simplicity. I have the pressure of the atmosphere remain a constant, as well as the temperature. However, they should vary with altitude and such.

Another goal would be to add wind into the equation somewhere. Or else make obstacles to make this program more interesting than simply rising/falling.