Water rocket simulator, what's on the inside (version 1.0)



An explanation of the the used algorithms and assumptions that are implemented in the rocketsimulator. I assume, because you are reading this page, that you are a little familiar with some basic principles of calculus and basic classical (NEWTON) physics.
Although i tried to implement to most relevant interactions and governing equations, i do not pretend that this simulator will give you exact results.
The dynamics of a water rocket are to complex and influenced by a massive number of effects and interactions. An exact calculation of the results is very complex.
The description here, is to give the interested readers more insight in the processes that interact on the water rocket during flight.
I also want to invite you to give some feedback on how you judge the accuracy of the results of this simulator.

For starters some constants are needed / assumed:

100.0000 [N/m^2] Atmospheric air pressure
1.4 [.](labda) Specific heat ratio Cp/Cv for air. This normally a good assumption
0.08206 [.] Universal constant for gases
998 [kg/m^3] ) Mass density off water
9.81 [.] Gravitational constant

Programming parameters and boundaries:

0.001 [sec] Incremental time step that is used in the iteration process of the simulator.
100000 [.] Max calculated datapoints, so max simulation time is 100 sec.
1 [%] Size of the lineair step in the iteration for optimal water fill, 100% = rocket volume
998 [kg/m^3] ) Mass density off water
9.81 [.] Gravitational constant


There are four different flight phases, this simulator uses a specific calculation method for each phase. The definition for these phases used are:

Launchtube phase : starts when the rocket is released from the clamping mechanism from the launcher, ends at the time the nozzle of the rocket leaves the launchtube.
Water thrust phase : starts after the launchtube phase ends at the moment the last water is expelled by the nozzle
Air blow down phase: starts directly after the water thrust phase, ends when the thrust force from the expelled air is decreased to a level that is considered as not relevant for the calculated results, or the internal pressure is (almost) atmospheric pressure.
Ballistic phase : starts after the air blow down, ends when the rocket hits the ground or maximum simulation time is reached.


As reference for the height of the rocket the nozzle outlet is taken, height of the rocket in launch position is taken as zero (0) meter. So launcher height and elevation above sea-level are discarded.
Calculation is done in a single reference frame (height), along the Z axis, pointing up. So it is assumed that the launch angle of the rocket is perfectly straight up.
It is also assumed that rocket stability is perfect. In practice especially when CP and CG are close rockets will be less stable an "wiggle" during flight. This wiggling will cause a lot more drag and so reduces the actual reached apogee height.
The effects of cross winds are not taken in account also, so in this simulator the rocket takes a nosedive and slams straight in to the launcher. Luckily in real life this does not happen (as often), because rebuilding your launcher after every launch is not the type of fun I'm looking for!

Now lets have a look at the calculations done in the various phases of flight.

Launchtube phase:
Description, approach of simulation:
The launchtube acts as a piston in the rocket under pressure. This is an (from energy point of view) an effective way of converting the energy of the pressurized air into kinetic energy (velocity) and potential energy (height), the things we want. This is also why it is always a good thing to extend the launchtube as for as the dimensions of the rocket allow.
During launchtube phase it is assumed that here there is little friction between tube and rocket/nozzle and that the expelled water/air between tube and nozzle is negligible.
As the rocket moves up the tube, the available volume for the air in the rocket increases (part of the tube has left the nozzle), this will cause the pressure in the rocket to drop. There will be an exchange of air between the launcher and the rocket as the tube leaves the rocket. This is where the launcher volume comes in, it represents the volume of the launcher (inner part of the tube) that is capable to freely exchange air during launchtube phase. Keep in mind that this phase is very short, so restrictions in the launcher decreases the volume that is contributing to the exchange of pressurized air.


The forces working on the rocket during launchtube phase are represented in the picture:
header

The drive force is the pressure difference inside versus outside times the cross sectional area from the tube.
This force pushes the rocket up.
The gravity pulls the rocket down g * total mass of the rocket (dry mass rocket + water).
And as the rocket is gaining speed the drag of the rocket increases.
The drag force is dependant on the square of the rockets velocity, the cross sectional area of the rocket and a parameter normally represented with the identifier CW. This CW or coefficient of drag represents how much your rocket is streamlined (less drag, lower CW value). A fair "gestimate" of the average water rocket CW value is between 0.5 and 0.8.
With these forces and mass known to work on the rocket, the acceleration, velocity, height of the rocket after a small period in time can be calculated.
Rocketsim uses 0.001 seconds as a time_step resolution.


to be continued ......