trick/trick_sims/SIM_rocket
jmpenn fedb4aaee3 Disable unneeded SimObjects from default_trick_sys.sm in Trick exampl… (#1719)
* Disable unneeded SimObjects from default_trick_sys.sm in Trick example sims.

* Take out unit test disable. Add some S_defines I forgot.
2024-07-09 16:05:48 -05:00
..
images Model Rocket Simulation. Ref #726 2019-01-15 16:23:12 -06:00
models/rocket Model Rocket Simulation. Ref #726 2019-01-15 16:23:12 -06:00
Modified_data Model Rocket Simulation. Ref #726 2019-01-15 16:23:12 -06:00
RUN_test Python3 exec open (#907) 2019-11-14 13:35:57 -06:00
scripts Disambiguate python use #1250 (#1251) 2022-03-22 15:15:40 -05:00
Readme.md Update Readme.md 2019-01-15 16:27:11 -06:00
S_define Disable unneeded SimObjects from default_trick_sys.sm in Trick exampl… (#1719) 2024-07-09 16:05:48 -05:00
S_overrides.mk Model Rocket Simulation. Ref #726 2019-01-15 16:23:12 -06:00

Forces

The following describes a Trick-based simulation of a model rocket under the forces of thrust, gravity and drag, using the parameters and equations shown below.

Thrust Force

In our model rocket simulation, we use an Estes E9 motor by default. It's thrust profile is shown below.

E9Engine

Name Units Value
rocket.motor.thrust_sample_times s 0.000, 0.010, 0.020, 0.030, 0.040, 0.050, 0.100, 0.110, 0.120, 0.130,0.140, 0.155, 0.165, 0.180, 0.190, 0.200, 0.215, 0.230, 0.250, 0.275, 0.300, 0.400, 0.500, 2.600, 2.700, 2.725, 2.750, 2.800, 100.0
rocket.motor.thrust_sample_values N 0.0, 0.1, 0.3, 0.5, 0.8, 1.5, 10.0, 12.6, 15.2, 17.8, 20.4, 23.0, 24.6, 25.0, 24.8, 24.4, 22.0, 17.0, 13.7, 12.6, 11.9, 10.7, 10.6, 10.5, 10.3, 10.0, 9.7, 0.0, 0.0
rocket.motor.thrust_sample_count -- 29

Drag Force

The drag on the model rocket will be calculated using the drag equation shown below:

ForceDrag

Symbol Name Units Value
ρ rocket.env.air_density kg/m³ 1.2
Cd rocket.coefficient_of_drag (unitless) 0.75
A rocket.cross_sectional_area 0.0015
v rocket.velocity m/s Initially 0.0, Updated by integration of rocket-acceleration over time.

Gravitation Force

ForceOfGravity

Symbol Name Units Value
g rocket.env.gravity m/s² -9.81
m rocket.total_mass kg Initially [Eq#2]. Updated by integration of rocket-mass-rate.

Mass

As the rocket motor burns, it expels mass, at high speed. Initially the rocket motor contains all of its propellant mass. When it burns out, it contains no propellant mass.

Name Units Value
rocket.empty_mass kg 0.1162
rocket.motor.total_mass kg 0.0567
rocket.motor.propellant_mass kg 0.0358

Initialization

Name Units Value
rocket.motor.exhaust_speed m/s Calculated by [Eq#1]
rocket.motor.total_impulse N s Calculated by integrating motor thrust over time.
rocket.total_mass kg Calculated by [Eq#2]
rocket.velocity m/s 0.0
rocket.position m 0.0
rocket.mission_time s 0.0

[Eq#1] exhaust-speed = rocket.motor.total_impulse / rocket.motor.propellant_mass

[Eq#2] rocket.total_mass (@t=0) = rocket.empty_mass + rocket.motor.total_mass (@t=0).

State Derivatives

Name Units Value
rocket.mission_time_rate s 1.0
rocket.thrust_force N Interpolation of E9 Engine Thrust function
rocket.mass_rate kg/s Calculated by [Eq#3]
rocket.drag_force N Calculated by [Eq#4]
rocket.gravity_force N Calculated by [Eq#5]
rocket.total_force N Calculated by [Eq#6]
rocket.acceleration N Calculated by [Eq#7]

[Eq#3] rocket.mass_rate = ‖ rocket.thrust_force ‖ / rocket.motor.exhaust_speed

[Eq#4] rocket.drag_force = - 0.5 × rocket.coefficient_of_drag × rocket.env.air_density × rocket.cross_sectional_area × rocket.velocity × ‖ rocket.velocity ‖

[Eq#5] rocket.gravity_force = rocket.total_mass × rocket.env.gravity

[Eq#6] rocket.total_force = rocket.thrust_force + rocket.drag_force + rocket.gravity_force

[Eq#7] rocket.acceleration = rocket.total_force / rocket.total_mass

State Integration

Name Units Value
rocket.mission_time s Numerical integration of rocket.mission_time_rate.
rocket.total_mass kg Numerical integration of rocket.mass_rate.
rocket.velocity m/s Numerical integration of rocket.acceleration.
rocket.position m/s² Numerical integration of rocket.velocity.

Results with Default Parameterization

Forces

Forces

Forces

Forces