Skip to content

Commit c062212

Browse files
authored
Merge pull request #685 from RocketPy-Team/bug/prandtl-glauert-rollback
BUG: Rollback Prandtl-Glauert corrections for Tail and Nose.
2 parents 9c0b3e7 + 4de4c95 commit c062212

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Attention: The newest changes should be on top -->
3838

3939
### Fixed
4040

41-
41+
- BUG: Rollback Prandtl-Glauert corrections for Tail and Nose. [#685](https://github.com/RocketPy-Team/RocketPy/pull/685)
4242

4343
## [v1.4.2] - 2024-08-03
4444

rocketpy/rocket/aero_surface/nose_cone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def evaluate_lift_coefficient(self):
451451
# It must be set as a Function because it will be called and treated
452452
# as a function of mach in the simulation.
453453
self.clalpha = Function(
454-
lambda mach: 2 / self._beta(mach) * self.radius_ratio**2,
454+
lambda mach: 2 * self.radius_ratio**2,
455455
"Mach",
456456
f"Lift coefficient derivative for {self.name}",
457457
)

rocketpy/rocket/aero_surface/tail.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def evaluate_lift_coefficient(self):
169169
# as a function of mach in the simulation.
170170
self.clalpha = Function(
171171
lambda mach: 2
172-
/ self._beta(mach)
173172
* (
174173
(self.bottom_radius / self.rocket_radius) ** 2
175174
- (self.top_radius / self.rocket_radius) ** 2

tests/unit/test_flight.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ def test_out_of_rail_stability_margin(flight_calisto_custom_wind):
167167
@pytest.mark.parametrize(
168168
"flight_time, expected_values",
169169
[
170-
("t_initial", (0.17179073815516033, -0.431117, 0)),
171-
("out_of_rail_time", (0.543760, -1.364593, 0)),
172-
("apogee_time", (-0.5874848151271623, -0.7563596, 0)),
170+
("t_initial", (0.171780, -0.431091, 0)),
171+
("out_of_rail_time", (0.546945, -1.372586, 0)),
172+
("apogee_time", (-0.587317, -0.756234, 0)),
173173
("t_final", (0, 0, 0)),
174174
],
175175
)
@@ -206,10 +206,10 @@ def test_aerodynamic_moments(flight_calisto_custom_wind, flight_time, expected_v
206206
@pytest.mark.parametrize(
207207
"flight_time, expected_values",
208208
[
209-
("t_initial", (1.6542528, 0.65918, -0.067107)),
210-
("out_of_rail_time", (5.05334, 2.01364, -1.7541)),
211-
("apogee_time", (2.366258, -1.830744, -0.875342)),
212-
("t_final", (0, 0, 159.2212)),
209+
("t_initial", (1.654150, 0.659142, -0.067103)),
210+
("out_of_rail_time", (5.052628, 2.01336, -1.75370)),
211+
("apogee_time", (2.352518, -1.826998, -0.878729)),
212+
("t_final", (0, 0, 159.2210)),
213213
],
214214
)
215215
def test_aerodynamic_forces(flight_calisto_custom_wind, flight_time, expected_values):
@@ -246,9 +246,12 @@ def test_aerodynamic_forces(flight_calisto_custom_wind, flight_time, expected_va
246246
"flight_time, expected_values",
247247
[
248248
("t_initial", (0, 0, 0)),
249-
("out_of_rail_time", (0, 2.248727, 25.703072)),
250-
("apogee_time", (-13.204789, 15.990903, -0.000138)),
251-
("t_final", (5, 2, -5.65998)),
249+
("out_of_rail_time", (0, 2.248540, 25.700928)),
250+
(
251+
"apogee_time",
252+
(-13.214438, 16.052063, -0.000421),
253+
),
254+
("t_final", (5, 2, -5.66015)),
252255
],
253256
)
254257
def test_velocities(flight_calisto_custom_wind, flight_time, expected_values):
@@ -284,9 +287,9 @@ def test_velocities(flight_calisto_custom_wind, flight_time, expected_values):
284287
"flight_time, expected_values",
285288
[
286289
("t_initial", (0, 0, 0)),
287-
("out_of_rail_time", (0, 7.8068, 89.2325)),
288-
("apogee_time", (0.07534, -0.058127, -9.614386)),
289-
("t_final", (0, 0, 0.0017346294117130806)),
290+
("out_of_rail_time", (0, 7.8067, 89.2315)),
291+
("apogee_time", (0.07532, -0.0581194, -9.614827)),
292+
("t_final", (0, 0, 0.0019548)),
290293
],
291294
)
292295
def test_accelerations(flight_calisto_custom_wind, flight_time, expected_values):
@@ -334,10 +337,10 @@ def test_rail_buttons_forces(flight_calisto_custom_wind):
334337
"""
335338
test = flight_calisto_custom_wind
336339
atol = 5e-3
337-
assert pytest.approx(3.833613, abs=atol) == test.max_rail_button1_normal_force
338-
assert pytest.approx(1.648938, abs=atol) == test.max_rail_button1_shear_force
339-
assert pytest.approx(1.165307, abs=atol) == test.max_rail_button2_normal_force
340-
assert pytest.approx(0.501229, abs=atol) == test.max_rail_button2_shear_force
340+
assert pytest.approx(3.803078, abs=atol) == test.max_rail_button1_normal_force
341+
assert pytest.approx(1.635804, abs=atol) == test.max_rail_button1_shear_force
342+
assert pytest.approx(1.193331, abs=atol) == test.max_rail_button2_normal_force
343+
assert pytest.approx(0.513283, abs=atol) == test.max_rail_button2_shear_force
341344

342345

343346
def test_max_values(flight_calisto_robust):

0 commit comments

Comments
 (0)