|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Defiance Mk. IV\n", |
| 7 | + "# Defiance Mk. IV - University of Toronto Aerospace - 2024\n", |
8 | 8 | "Launched in Launch Canada 2024. Defiance Mk. IV is the fourth rocket in the defiance series of hybrid rocket from University of Toronto Aerospace Team.\n",
|
9 | 9 | "\n",
|
10 | 10 | "Defiance Mk. IV set a new Canadian amateur rocketry record with a recorded apogee altitude of $9308.318 m$.\n",
|
|
106 | 106 | ],
|
107 | 107 | "source": [
|
108 | 108 | "flight_date = datetime.date(2024, 8, 24)\n",
|
109 |
| - "env = Environment(\n", |
110 |
| - " latitude = 47.966527,\n", |
111 |
| - " longitude = -81.87413,\n", |
112 |
| - " elevation = 1383.4\n", |
113 |
| - ")\n", |
| 109 | + "env = Environment(latitude=47.966527, longitude=-81.87413, elevation=1383.4)\n", |
114 | 110 | "\n",
|
115 | 111 | "env.set_date((flight_date.year, flight_date.month, flight_date.day, 0))\n",
|
116 |
| - "env.set_atmospheric_model(\n", |
117 |
| - " type = \"custom_atmosphere\",\n", |
118 |
| - " wind_v = 1.0,\n", |
119 |
| - " wind_u = -2.9\n", |
120 |
| - ")\n", |
| 112 | + "env.set_atmospheric_model(type=\"custom_atmosphere\", wind_v=1.0, wind_u=-2.9)\n", |
121 | 113 | "\n",
|
122 | 114 | "env.info()"
|
123 | 115 | ]
|
|
135 | 127 | "metadata": {},
|
136 | 128 | "outputs": [],
|
137 | 129 | "source": [
|
138 |
| - "oxidizer_liq = Fluid(name = 'N2O_l', density = 960)\n", |
139 |
| - "oxidizer_gas = Fluid(name = 'N2O_g', density = 1.9277)\n", |
| 130 | + "oxidizer_liq = Fluid(name='N2O_l', density=960)\n", |
| 131 | + "oxidizer_gas = Fluid(name='N2O_g', density=1.9277)\n", |
140 | 132 | "\n",
|
141 | 133 | "tank_shape = CylindricalTank(0.0665, 1.79)\n",
|
142 | 134 | "\n",
|
143 | 135 | "oxidizer_tank = MassFlowRateBasedTank(\n",
|
144 |
| - " name = 'oxidizer_tank',\n", |
145 |
| - " geometry = tank_shape,\n", |
146 |
| - " flux_time = (6.5),\n", |
147 |
| - " liquid = oxidizer_liq,\n", |
148 |
| - " gas = oxidizer_gas,\n", |
149 |
| - " initial_liquid_mass = 17,\n", |
150 |
| - " initial_gas_mass = 0,\n", |
151 |
| - " liquid_mass_flow_rate_in = 0,\n", |
152 |
| - " liquid_mass_flow_rate_out = 17/6.5,\n", |
153 |
| - " gas_mass_flow_rate_in = 0,\n", |
154 |
| - " gas_mass_flow_rate_out = 0\n", |
| 136 | + " name='oxidizer_tank',\n", |
| 137 | + " geometry=tank_shape,\n", |
| 138 | + " flux_time=(6.5),\n", |
| 139 | + " liquid=oxidizer_liq,\n", |
| 140 | + " gas=oxidizer_gas,\n", |
| 141 | + " initial_liquid_mass=17,\n", |
| 142 | + " initial_gas_mass=0,\n", |
| 143 | + " liquid_mass_flow_rate_in=0,\n", |
| 144 | + " liquid_mass_flow_rate_out=17 / 6.5,\n", |
| 145 | + " gas_mass_flow_rate_in=0,\n", |
| 146 | + " gas_mass_flow_rate_out=0,\n", |
155 | 147 | ")\n",
|
156 | 148 | "\n",
|
157 | 149 | "''' Defining the thrust curve'''\n",
|
| 150 | + "\n", |
| 151 | + "\n", |
158 | 152 | "def thrust_fuction(t):\n",
|
159 |
| - " return 5750 * 2**(-t / 200)\n", |
| 153 | + " return 5750 * 2 ** (-t / 200)\n", |
| 154 | + "\n", |
160 | 155 | "\n",
|
161 | 156 | "hybrid_motor = HybridMotor(\n",
|
162 |
| - " thrust_source = '../../data/rockets/defiance/Thrust_curve.csv',\n", |
163 |
| - " dry_mass = 13.832,\n", |
164 |
| - " dry_inertia = (1.801, 1.801, 0.0305),\n", |
165 |
| - " center_of_dry_mass_position = 780/1000,\n", |
166 |
| - " reshape_thrust_curve = False,\n", |
167 |
| - " grain_number = 1,\n", |
168 |
| - " grain_separation = 0,\n", |
169 |
| - " grain_outer_radius = 0.0665,\n", |
170 |
| - " grain_initial_inner_radius = 0.061,\n", |
171 |
| - " grain_initial_height = 1.25,\n", |
172 |
| - " grain_density = 920,\n", |
173 |
| - " nozzle_radius = 0.0447,\n", |
174 |
| - " throat_radius = 0.0234,\n", |
175 |
| - " interpolation_method = 'linear',\n", |
176 |
| - " grains_center_of_mass_position = 0.377,\n", |
177 |
| - " coordinate_system_orientation = 'nozzle_to_combustion_chamber',\n", |
| 157 | + " thrust_source='../../data/rockets/defiance/Thrust_curve.csv',\n", |
| 158 | + " dry_mass=13.832,\n", |
| 159 | + " dry_inertia=(1.801, 1.801, 0.0305),\n", |
| 160 | + " center_of_dry_mass_position=780 / 1000,\n", |
| 161 | + " reshape_thrust_curve=False,\n", |
| 162 | + " grain_number=1,\n", |
| 163 | + " grain_separation=0,\n", |
| 164 | + " grain_outer_radius=0.0665,\n", |
| 165 | + " grain_initial_inner_radius=0.061,\n", |
| 166 | + " grain_initial_height=1.25,\n", |
| 167 | + " grain_density=920,\n", |
| 168 | + " nozzle_radius=0.0447,\n", |
| 169 | + " throat_radius=0.0234,\n", |
| 170 | + " interpolation_method='linear',\n", |
| 171 | + " grains_center_of_mass_position=0.377,\n", |
| 172 | + " coordinate_system_orientation='nozzle_to_combustion_chamber',\n", |
178 | 173 | ")\n",
|
179 | 174 | "\n",
|
180 |
| - "hybrid_motor.add_tank(tank = oxidizer_tank, position = 2.2)" |
| 175 | + "hybrid_motor.add_tank(tank=oxidizer_tank, position=2.2)" |
181 | 176 | ]
|
182 | 177 | },
|
183 | 178 | {
|
|
205 | 200 | ],
|
206 | 201 | "source": [
|
207 | 202 | "defiance = Rocket(\n",
|
208 |
| - " radius = 0.07,\n", |
209 |
| - " mass = 37.211,\n", |
| 203 | + " radius=0.07,\n", |
| 204 | + " mass=37.211,\n", |
210 | 205 | " # inertia = (180.142, 180.142, 0.262),\n",
|
211 |
| - " inertia = (94.14, 94.14, 0.09),\n", |
212 |
| - " center_of_mass_without_motor = 3.29,\n", |
213 |
| - " power_off_drag = '../../data/rockets/defiance/DragCurve.csv',\n", |
214 |
| - " power_on_drag = '../../data/rockets/defiance/DragCurve.csv',\n", |
215 |
| - " coordinate_system_orientation = 'tail_to_nose'\n", |
| 206 | + " inertia=(94.14, 94.14, 0.09),\n", |
| 207 | + " center_of_mass_without_motor=3.29,\n", |
| 208 | + " power_off_drag='../../data/rockets/defiance/DragCurve.csv',\n", |
| 209 | + " power_on_drag='../../data/rockets/defiance/DragCurve.csv',\n", |
| 210 | + " coordinate_system_orientation='tail_to_nose',\n", |
216 | 211 | ")\n",
|
217 | 212 | "\n",
|
218 |
| - "defiance.add_motor(hybrid_motor, position = 0.2)\n", |
| 213 | + "defiance.add_motor(hybrid_motor, position=0.2)\n", |
219 | 214 | "\n",
|
220 |
| - "defiance.add_nose(\n", |
221 |
| - " length = 0.563,\n", |
222 |
| - " kind = \"vonKarman\",\n", |
223 |
| - " position = 4.947\n", |
224 |
| - ")\n", |
| 215 | + "defiance.add_nose(length=0.563, kind=\"vonKarman\", position=4.947)\n", |
225 | 216 | "\n",
|
226 | 217 | "defiance.add_trapezoidal_fins(\n",
|
227 |
| - " n = 3,\n", |
228 |
| - " span = 0.115,\n", |
229 |
| - " root_chord = 0.4,\n", |
230 |
| - " tip_chord = 0.2,\n", |
231 |
| - " position = 0.175\n", |
| 218 | + " n=3, span=0.115, root_chord=0.4, tip_chord=0.2, position=0.175\n", |
232 | 219 | ")\n",
|
233 | 220 | "\n",
|
234 |
| - "defiance.add_tail(\n", |
235 |
| - " top_radius = 0.07,\n", |
236 |
| - " bottom_radius = 0.064,\n", |
237 |
| - " length = 0.0597,\n", |
238 |
| - " position = 0.1\n", |
239 |
| - ")\n", |
| 221 | + "defiance.add_tail(top_radius=0.07, bottom_radius=0.064, length=0.0597, position=0.1)\n", |
240 | 222 | "\n",
|
241 |
| - "defiance.add_parachute(\n", |
242 |
| - " name = 'main',\n", |
243 |
| - " cd_s = 2.2,\n", |
244 |
| - " trigger = 305,\n", |
245 |
| - " sampling_rate = 100,\n", |
246 |
| - " lag = 0\n", |
247 |
| - ")\n", |
| 223 | + "defiance.add_parachute(name='main', cd_s=2.2, trigger=305, sampling_rate=100, lag=0)\n", |
248 | 224 | "\n",
|
249 | 225 | "defiance.add_parachute(\n",
|
250 |
| - " name ='drogue',\n", |
251 |
| - " cd_s = 1.55,\n", |
252 |
| - " trigger = 'apogee',\n", |
253 |
| - " sampling_rate = 100,\n", |
254 |
| - " lag = 0\n", |
| 226 | + " name='drogue', cd_s=1.55, trigger='apogee', sampling_rate=100, lag=0\n", |
255 | 227 | ")"
|
256 | 228 | ]
|
257 | 229 | },
|
|
296 | 268 | ],
|
297 | 269 | "source": [
|
298 | 270 | "test_flight = Flight(\n",
|
299 |
| - " rocket = defiance,\n", |
300 |
| - " environment = env,\n", |
301 |
| - " inclination = 85,\n", |
302 |
| - " heading = 90,\n", |
303 |
| - " rail_length = 10\n", |
| 271 | + " rocket=defiance, environment=env, inclination=85, heading=90, rail_length=10\n", |
304 | 272 | ")\n",
|
305 | 273 | "\n",
|
306 | 274 | "test_flight.prints.apogee_conditions()\n",
|
|
0 commit comments