Express the rho_air variable as a function that returns the density at a given altitude, let's call that density(h) where h is the current altitude. If you plug it in your equation you'll end up with a graph of terminal velocity vs. altitude.
Now distance divided by average velocity yields travel time, which is what we're after. We need to find the average speed of the object, which is given by a definite integral over the altitude range divided by the length of the range:
[math]\frac{\int_0^{h_m} f(h) dh}{h_m}[/math]
f(x) being your velocity function and h_m being the maximum (peak) altitude.
---------- Post added 06-06-10 at 12:58 AM ---------- Previous post was 06-05-10 at 11:25 PM ----------
This got me a little interested
Using the data from
this table, I approximated atmospheric density (kg/m³) vs. altitude (m) into this function:
[math]density(h) = \frac{1.225 - h \cdot 0.0000291}{1+h \cdot 0.00015}[/math]
It's approximate, but it'll do (
this is its graph (orange) compared to real pressures (blue)).
Your function provides terminal velocity at an altitude h (m). I added the drag coefficient term, because dome-shaped parachutes have C_d ≈ 1.5, which would influence the result considerably (for example allowing you to use a 40% smaller dome chute for the same effect a flat one would have).
[math]velocity(h) = \sqrt{\frac{2 \cdot m \cdot g}{density(h) \cdot A \cdot C_d}}[/math]
Descent time is vertical distance divided by average vertical speed:
[math]t = \frac{s}{v}[/math]
To get average value of a function you integrate it over a given range and divide it by this range, the range being your balloon cut-off altitude, or 's':
[math]v = \frac{\int_0^s velocity(h) \, dh}{s} = \frac{\int_0^s \sqrt{\frac{2 \cdot m \cdot g \cdot (1 + h \cdot 0.00015)}{A \cdot C_d \cdot (1.225 - h \cdot 0.0000291)}} \, dh}{s}[/math]
Now integrating this would get you an equation that looks something
like this. That's a no-no. So instead of an accurate analytical solution we'll do an approximate numerical one.
We'll divide the altitude range (0 to 30000 m) into 100-meter slices and calculate the terminal velocity for each one. Then we'll add them together multiplied by 100 (width of our slice). In pseudocode that would look something like this:
Code:
h = 30000.0
step = 100
sum = 0.0
while h > 0:
sum += velocity(h) * step
h -= step
At the end of this code the 'sum' variable holds the approximate value of the integral. Divide it by 30000 meters and you get your average descent velocity. Divide those 30000 meters by that velocity and you get your descent time in seconds.
For a 2kg payload on a 1m² flat parachute (C_d = 1.0) this would yield an average descent speed of 13.5 m/s (over 320 km/h in space and just 20 km/h at touchdown) with a descent time of 37 minutes, pretty average for most ballons.