Water Rocket 1 - Program "rockdef"

At this stage we pause in the analysis (given in Analysis Page1 and Analysis Page2) to develop the basic Rocket class, including the private and public variables which define a specific water rocket system as well as the Constructor for constructing objects of the class. In general private variables are used to completely define a specific rocket, whereas public variables define the environment in which it is used. Using the previous analysis, and in anticipation of the acceleration, velocity and height analyses which follow in the next exercise we have defined seven private and five public variables as follows:

Ms - the mass of the rocket solid parts (shell + payload) [kg]
Vtotal - the total volume in the bottle (water + air) [m3]
AN - the area of the nozzle normal to the flow of expelled water [m2]
P0 - the initial compressed air absolute pressure in the bottle (at launch) [Pa]
V0 - the initial compressed air volume in the bottle (at launch) [m3]
Cd - the coefficient of drag for the rocket (reflecting streamlining, surface roughness etc.)
Abottle - the projected area of the rocket normal to the direction of flight [m2]

The five public variables are as follows:

g - the acceleration due to gravity [9.81 m/s2]
- the density of water [1000 kg/m3]
- the density of the outside air [assume = 1.2 kg/m3]
k - the ratio of specific heat capacities of air [k = 1.4]
Patm - the absolute pressure of the atmosphere [assume = 100,000 Pa]

The Computer Program

Write a program that defines a class Rocket based on the private and public variables defined above. The various relevant parameters used in the equation should be declared as private or public variables, as shown in the structure diagram below. Notice that we generally use different variable names to those used in the mathematical analysis, avoiding upper case or Greek letters. Notice also the input variables that are used to evaluate the private variables, thus for example:

vtot = vtotal/1e6 [since vtotal is entered in cubic centimeters]
vol0 = (1 - fill)*vtot [since fill is the fill ratio: vwater/vtotal]
pres0 = (pgage + 1)*patm [since pgage is the gage pressure]

We see that the main program defines two rocket objects, a "nielsen" rocket, using the default values as specified by Dr. Peter Nielsen in the pdf file: (Nielsen_Rocket.pdf [164k file]), and a "myRocket" rocket, in which you use values entered from the keyboard in order to define your own rocket. The Nielsen default values are shown in red in the above diagram.

Latest news: In order to make this a meaningful theme exercise we have available 10 Skylab rocket kits from the Antigravity Research Corporation in Canada. Each kit includes a complete rocket and launching system except for the soda pop bottle and bicycle pump (refer: SkyLab-Instructions.pdf (9.8 MByte file). We will divide the class into 4-person teams. Each team will locate a suitable soda pop bottle and bicycle pump (MUST include a pressure gage) in order to build, test and simulate the performance of the team rocket. Your first task will be to measure, weigh, experiment with, and finally decide on suitable values to define your rocket. The input data required are shown below [with the Nielsen default values shown in brackets]

mass = empty solid mass [120] gm
vtotal = total bottle volume [1250] cc
dnoz = nozzle diameter [0.9] cm
fill = fill ratio, water volume/total volume [0.35] (dimensionless)
pgage = initial charge gage pressure [5.0] atm (note that one atmosphere = 14.7 psig)
cdrag - at this stage use the nielsen default value [0.3] (dimensionless)
dbottle - external diameter of the bottle [11.3] cm

A useful set of links has been provided by Science Toy Maker in their Great Water Rocket Links site. Concerning safety, refer to the website Burst Testing with Berggren and Youens, in which they determined experimentally the burst pressure of 2 and 3 liter soda bottles. The full report of their comprehensive study is available in the LaunchMonkeys website. My advice is that you make sure not to go above 80 psig, and I believe that the Antigravity Research launch tube is designed to self eject at that pressure.

Note that the data measurement and all experiments are to be a team effort, however the computer program and interpretation of the measured data to determine input data should be an individual effort. Pay particular attention to the units that we use. All data must be converted to the equivalent SI units prior to use in any of the equations.

A typical execution is shown below using the small 20 fl.oz. bottle (591 cc), with the input data shown in italics. Note that your output does not need to be identical to this solution, however should be easily readable, and all values should be shown with relevant units. Please be sure to enter your data in the same order as this solution (which is available to test in the programs directory of condor) since the exercises are checked automatically using a data file for input. Your source code solution named rockdef.cpp should be in your home directory before 10:00am of the due date.

 The Nielsen standard default rocket:
Water rocket initialized as follows:
Solid mass[gm]: 120, total volume[liters]: 1.25
absolute charge pressure[kPa]: 600
initial air charge volume[liters]: 0.8125
Nozzle free flow area [sq.cm]: 0.636172
Bottle cross sect. area [sq.cm]: 100.288
Density - water: 1000kg/m^3, outside air: 1.2kg/m^3
Ratio of specific heat capacities for air (k): 1.4
Drag coefficient: 0.3
gravity acceleration: 9.807m/s^2
Values to define a new water rocket [Nielsen values]:
enter rocket + payload solid mass in grams [120]
 value entered is 43grams
 enter total volume in cc [1250]
 value entered is 591 cc
enter diameter of nozzle in cm [0.9]
 value entered is 0.4cm
enter fill ratio (water/total volume) [0.35]
 value entered is 0.3
enter charge gage pressure in atm [5]
 value entered is 4atm
enter drag coefficient Cd [0.3]
 value entered is 0.3
enter outside diameter of bottle in cm [11.3]
 value entered is 8cm
Water rocket initialized as follows:
Solid mass[gm]: 43, total volume[liters]: 0.591
absolute charge pressure[kPa]: 500
initial air charge volume[liters]: 0.4137
Nozzle free flow area [sq.cm]: 0.125664
Bottle cross sect. area [sq.cm]: 50.2655
Density - water: 1000kg/m^3, outside air: 1.2kg/m^3
Ratio of specific heat capacities for air (k): 1.4
Drag coefficient: 0.3
gravity acceleration: 9.807m/s^2

Back to Page 1 of the Water Rocket Analysis

Back to Page 2 of the Water Rocket Analysis

Did it go this way? .... that way?.... where is that darn rocket?......