### The water rocket: Numerical calculations

So now we're ready to put all the calculations together: launch tube, water thrust, air thrust, and ballistic flight. The launch tube calculation is more like an initialization for the water thrust phase; we just have one time step of the duration of launch tube traversal. Get the initial pressure \(P_0\) for water thrust from (L1), and the velocity \(v_0\) from (L4), and use these values in the first water thrust time step. You may also want to initialize the altitude achieved as the height of the tube. Water thrust calculationFor the water thrust phase, we do the following calculations at each time interval, which should be 1 millisecond or less in duration:At the beginning of time interval \(i\):Get the pressure \(P_1\) from (W4), using the change in water volume from the previous time interval.From the water volume, calculate the height of the water in the bottle — needed for \(H\) in equation (W1). This can be approximated by calculating the height of the water in a cylinder …