Hot Air Balloons - 1 (Program: "balloon")

Hot air balloons are exotically beautiful devices, and have captured the imagination of young and old alike since 1783, when two Frenchmen flew the first one over Paris. There are hundreds of web pages describing hot air balloons, and for those interested we have compiled a set of links to some of them. We feel that the best web overview of hot air ballons is the Wikipedia site.

This exercise is the first of a sequence of programming exercises based on a common theme, in which we wish to evaluate the lifting capability of hot air balloons. In this first exercise we develop and test the basic payload vs. altitude function that we will use with minor changes throughout this exercise sequence.

The principle of operation the hot air balloon is intuitively simple. Because of the opening at the base of the balloon envelope (the mouth) the air inside the balloon is at the same pressure as the surroundings. The pressure P[Pa], density ρ [kg/m3] (pronounced "rho") and temperature T[°C] of air are related by the ideal gas equation of state:

where R is the gas constant of air. Thus as we increase the temperature of the air inside the balloon its density decreases, and the balloon "floats" on the surrounding air. Standard balloons are designed to fly with a crown temperature of 100°C (373K) without fabric deterioration. If we could determine the density of the surrounding air, we would be able to evaluate the lifting capability of the balloon at various altitudes, however we find this to be a challenging exercise. The earth's atmosphere is a dynamically changing system, constantly in a state of flux. The pressure and temperature of the atmosphere depend on altitude, location, time of day, season, solar sunspot activity -- it becomes totally impractical to take all these variations into account. We resolve this by defining a standard atmosphere in order to relate aircraft design and testing to a common reference.

The International Standard Atmosphere (ISA) is based on a defined temperature distribution with altitude, as shown below.

The relevant pressure distribution is obtained by considering the earth's gravitational field, and the density distribution is obtained from the ideal gas equation of state. We will limit our balloon flights to an altitude of 11km, using the constant temperature lapse rate of -6.5°C/km. For those of you who would like to delve deeper into the development of the various equations we refer you to an excellent text: "Introduction to Flight" by John D. Anderson, Jr., McGraw-Hill, 3rd Edition, 1989, as well as the web link balloon_eqns.html in which we develop the pressure equation at altitude z(m). The complete sequence of 5 equations relating payload (kg) to altitude (m) that we will use in this exercise sequence is shown below:

A Word on Units

Notice that we have used SI units throughout, thus volume (V) is in cubic meters (1 cubic meter equals 35.3 cubic feet), mass (m) is in kilograms, pressure (P) is in Pascals (The ISA sea level pressure is 101,325Pa, which is equivalent to 14.7psi), and temperature (T) is in degrees Celsius (The ISA sea level temperature is 15°C). We convert from Celsius temperature to absolute (Kelvin) temperature by adding 273°C. In the US "units" is an ongoing battle causing much confusion in the global economy. Even the NCEES is confused at this point - the Fundamentals of Engineering (FE) Reference Handbook and exam contain exclusively SI units and then, when you reach maturity and are ready to take the Professional Engineering (PE) exam, you find that the English system of units (USCS) is acceptable, and in some cases used exclusively. This confusion reached a new climax when in the Fall of 1999, NASA's $125 million Mars Climate Orbiter broke up in the Martian atmosphere, because scientists in one of NASA's subcontractors failed to convert critical data from the English sytem to the SI system of units.

Our First Exercise

Our first exercise will be to use the above equation set to evaluate the payload mass (mp) that can be lifted to a certain altitude (z) under specified conditions. Note that we cannot solve the equation set explicitly for altitude - thus we cannot ask, "to what altitude will the balloon lift me and my spouse, a payload of 150kg?" We will develop techniques for answering that question in forthcoming exercises. This first exercise is much less ambitious:

The Computer Program

There are two parts to this exercise, the computer program to evaluate the payload mass as a function of altitude, and a graph which you will plot by hand on regular graph paper.

enter balloon volume (typically 1000 cu.m):
1000
enter balloon empty mass (typ. 100)[kg]
100
balloon initialised as follows:
balloon volume: 1000[cu.m]
balloon empty mass: 100[kg]
standard atmospheric conditions:
temperature lapse rate: -0.0065[deg C/m]
temperature at sea level: 15[deg C]
standard pressure at sea level: 101325[Pa]
evaluate balloon payload mass as a function of altitude
enter altitude[m]
3000
value entered is 3000.0[m]
for altitude of 3000.0[m]
payload mass is 154.8[kg]

The source code should be in your home directory by 10:00am of the due date and named balloon.cpp

Notice in this exercise that we have used the computer in a very unsophisticated role - as a mere calculator. In the coming exercises we will successively (and joyfully) relinquish all the manual tasks defined above (multiple execution of the program, drawing the graph, determining the altitude which you can attain with a specified payload, and more) to the computer.