Simple project solving some differtial equations for a water rocket using a Cash-Karp Runge-Kutta solver.
This program comes with ABSOLUTELY NO WARRANTY and serves only as toy model.
In the following, we assume a cylindrical rocket with the cross-section area
In the following we assume all momenta, forces etc. in z-direction. Newton's second law states that in the absence of external forces, the total momentum is conserved:
We can split the total momentum into two components, the momentum of the rocket system
In the labrotory frame, the time derivative of the momentum of the rocket system can be written as
Hence, the momentum of the rocket may increase over time with inceasing mass or inceasing velocity.
The momentum of the water system inceases as the rocket is loosing its mass and expelling it with velocity
Combining those two equations results in the well-known rocket equation
where the first term describes the acceleration of the rocket and the second term can be interpreted as the thrust force acting on the rocket.
Extending the equation above and considering also external forces results in the following balance of forces:
where
-
$F_{rocket}=m_{rocket}\frac{dv_{rocket}}{dt}$ , -
$F_{thrust}=-v_{expel}\frac{dm_{rocket}}{dt}$ , -
$F_{gravitation}=-m_{rocket}g$ , $F_{drag}=-\frac{1}{2} \rho_{ambient} v_{rocket}^2 C_D A_{rocket}\frac{v_{rocket}}{|v_{rocket}|}$
Above, we assume quadratic drag for objects at high Reynolds numbers and, since for our simple setup, we do not expect the rocket to fly higher than a few meters, we can safely assume the gravitational acceleration to be constant. Inserting these relations obove, we obtain:
The mass of the rocket consists of several contributions,
Further, also the expel velocity is a function of time, since the pressure in the bottle will decrease as more water or air is expelled from the bottle.
In summary, we have the unknown variables
During the starting phase of the water rocket, the thrust is generated by the expelling water due to the high pressure in the bottle. However, the pressure will decrease over time, as more and more water is expelled from the bottle.
To relate the water pressure in the bottle to the pressure at the nozzle, the Bernoulli equation is applied:
where
To determine the water pressure
However, with sinking water level in the bottle, also the air pressure is lowering. To relate the air pressure at time
Combining all these relations, we obtain a set of equations for the rocket during the time when the expelling water is contributing to the thrust. However, two conditions must be met for the water thrust:
$p_{air}(t) > p_{ambient}$ $h_{water}(t) > 0$
If these two conditions are not fullfilled anymore, the water-thrust phase can be considered over. In the case those two conditions are fulfilled, the Bernoulli equation together with the mass conservation leads to an expression for the expelling water velocity:
where
Having this expression we can write the equations of motions:
where
Hence, the calculation scheme is the following:
- Calculate the rocket's mass,
$m_{rocket}(t)$ - Calculate the pressure in the rocket,
$p_{air}(t)$ - Calculate the expelling velocity,
$v_{expel}(t)$ - Calculate the acceleration of the rocket,
$\frac{dv_{rocket}}{dt}$ - Calculate the velocity of the rocket,
$\frac{dh_{rocket}}{dt}$ - Calculate the sinking velocity of the water in the rocket,
$\frac{dh_{water}}{dt}$
The calculations above are repeated until the conditions
If the water level is zero either because all water is already expelled or because simply no water was filled into the rocket, we can still have a thrust force due to the higher air pressure inside the rocket than outside.
Recalling the thrust force,
The mass of the rocket containing no water is given as
Recalling the integral version of the continuity equation,
Similar as before, we use the energy consevation (Bernoulli eq.) to relate the pressure to the expelling velocity
leading to
To find an equation relating the air pressure and the air density we assume in this case the air to be an ideal gas. The ideal gas equation of state can be written as:
where
In summary, we again obtain an expression for the expelling velocity:
a differential equation for the air density
and the equation of motion of the rocket
Hence, the calculation scheme is the following:
- (Only once, when the condition
$h_{water} < 0$ is met first, calculate$\rho_{air}(t_0)$ at that point in time$t_0$ using the ideal gas equation.) - Calculate the rocket's mass,
$m_{rocket}(t)=m_{hull}+\rho_{air}(t)V_{rocket}$ - Calculate the expelling velocity,
$v_{expel}(t)$ - Calculate the acceleration of the rocket,
$\frac{dv_{rocket}}{dt}$ - Calculate the velocity of the rocket,
$\frac{dh_{rocket}}{dt}$ - Calculate the air density change,
$\frac{d\rho_{air}}{dt}$
The calculations above are repeated until the condition
When the presure in the rocket equals the ambient pressure, the rocket undergoes a simple ballistic motion
Many!
- rocket is basically reduced to a point model
- no tumbling
- "cylindical" shape of rocket
- laminar flow
- air = ideal gas
- viscosity and friction of water neglected
- ...
Example of a trajectory of a simple 1L water rocket.
Maximum height reached for different air pressures and filling levels of water.