<jupyter_start><jupyter_text>Descent RateA falling object will accelerate towards the ground until it reaches [terminal velocity](https://en.wikipedia.org/wiki/Terminal_velocity) when the force of gravity is balanced by upwards forces acting on it - namely, the drag force and bouyancy.For our model, we will assume a zero bouyancy (the balloon has popped) and that the time to reach terminal velocity is negligible.<jupyter_code>from preamble import *
Eq(F_d, F_g)
_.replace(F_d, Rational(1/2) * rho * C_d * A * v**2).replace(F_g, m * g)
terminal_velocity = _.replace(A, pi * (D/2)**2)
terminal_velocity.solve(D**2)
calc_velocity = lambdify([g,m,C_d,rho,D], sqrt(terminal_velocity.solve(v**2).rhs), "numpy")
calc_diameter = lambdify([g,m,C_d,rho,v], sqrt(_.rhs), "numpy")
KE = symbol_table.define('KE', 'Kinetic Energy')
Eq(KE,Rational(1/2) * m * v**2)
_.solve(v**2)
calc_desired_velocity = lambdify([KE,m], sqrt(_.rhs), "numpy")
payload_mass = 1480 * units.g
balloon_mass = 1200 * units.g
total_mass = payload_mass + balloon_mass

kinetic_energy = np.linspace(20,100) * units.J

velocity = calc_desired_velocity(kinetic_energy, total_mass).to_base_units()

g = 9.86 * units.m / (units.s ** 2)
C_d = 0.78
rho = 1.22 * units.kg / (units.m ** 3)
diameter = calc_diameter(g, total_mass, C_d, rho, velocity).to_base_units()
fig, axes = plt.subplots(2,1, sharex=True, figsize=(16,16))
axes[0].plot(diameter, velocity);
axes[0].set_title('Parachute diameter / descent velocity')
axes[1].plot(diameter, kinetic_energy);
axes[1].set_title('Parachute diameter / kinetic energy')

rocketman_chutes = [4,5,6] * units.ft

for ax in axes:
    for i, chute in enumerate(rocketman_chutes):
        ax.axvline(chute, color=f'C{i+1}', label=f'{chute:~P}')
    ax.legend()
calc_velocity(g, total_mass, C_d, rho, rocketman_chutes)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1498371335504886, 'fraction_numerical': 0.026601520086862108, 'mean_word_length': 5.825925925925926, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '137881', 'license': 'MIT', 'n_tokens_mistral': 760, 'n_tokens_neox': 699, 'n_words': 163, 'path': 'docs/_sources/descent.ipynb', 'repo_name': 'sea7aero/pyhab', 'size': '1842'}