-
-
Notifications
You must be signed in to change notification settings - Fork 199
ENH: Improve parachute geometric parametrization #835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 3 commits
0873d21
02ddd1b
1119ef8
413503f
f09a4b0
78ef92e
7defc38
465f526
c5ce166
f84459d
4fcb406
159cce8
0c434f8
f136ffb
112b75a
40d10c5
1e2a2fd
65530fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -767,7 +767,16 @@ def __simulate(self, verbose): | |||||||||
callbacks = [ | ||||||||||
lambda self, parachute_cd_s=parachute.cd_s: setattr( | ||||||||||
self, "parachute_cd_s", parachute_cd_s | ||||||||||
) | ||||||||||
), | ||||||||||
lambda self, parachute_radius=parachute.parachute_radius: setattr( | ||||||||||
self, "parachute_radius", parachute_radius | ||||||||||
), | ||||||||||
lambda self, parachute_height=parachute.parachute_height: setattr( | ||||||||||
self, "parachute_height", parachute_height | ||||||||||
), | ||||||||||
lambda self, parachute_porosity=parachute.porosity: setattr( | ||||||||||
self, "parachute_porosity", parachute_porosity | ||||||||||
), | ||||||||||
] | ||||||||||
self.flight_phases.add_phase( | ||||||||||
node.t + parachute.lag, | ||||||||||
|
@@ -1013,7 +1022,16 @@ def __simulate(self, verbose): | |||||||||
lambda self, | ||||||||||
parachute_cd_s=parachute.cd_s: setattr( | ||||||||||
self, "parachute_cd_s", parachute_cd_s | ||||||||||
) | ||||||||||
), | ||||||||||
lambda self, parachute_radius=parachute.parachute_radius: setattr( | ||||||||||
self, "parachute_radius", parachute_radius | ||||||||||
), | ||||||||||
lambda self, parachute_height=parachute.parachute_height: setattr( | ||||||||||
self, "parachute_height", parachute_height | ||||||||||
), | ||||||||||
lambda self, parachute_porosity=parachute.porosity: setattr( | ||||||||||
self, "parachute_porosity", parachute_porosity | ||||||||||
), | ||||||||||
] | ||||||||||
self.flight_phases.add_phase( | ||||||||||
overshootable_node.t + parachute.lag, | ||||||||||
|
@@ -1961,22 +1979,27 @@ def u_dot_parachute(self, t, u, post_processing=False): | |||||||||
|
||||||||||
# Get Parachute data | ||||||||||
cd_s = self.parachute_cd_s | ||||||||||
parachute_radius = self.parachute_radius | ||||||||||
parachute_height = self.parachute_height | ||||||||||
porosity = self.parachute_porosity | ||||||||||
|
||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need these definitions... We can save a few nanoseconds by not defining them here. You can use the attributes directly: using self.cds instead of cds |
||||||||||
|
||||||||||
# Get the mass of the rocket | ||||||||||
mp = self.rocket.dry_mass | ||||||||||
|
||||||||||
# Define constants | ||||||||||
ka = 1 # Added mass coefficient (depends on parachute's porosity) | ||||||||||
R = 1.5 # Parachute radius | ||||||||||
ka = 1.068 * (1 - 1.465 * porosity - 0.25975 * porosity**2 + 1.2626 * porosity**3) | ||||||||||
Gui-FernandesBR marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
# to = 1.2 | ||||||||||
# eta = 1 | ||||||||||
# Rdot = (6 * R * (1 - eta) / (1.2**6)) * ( | ||||||||||
# (1 - eta) * t**5 + eta * (to**3) * (t**2) | ||||||||||
# ) | ||||||||||
# Rdot = 0 | ||||||||||
|
||||||||||
# tf = 8 * nominal diameter / velocity at line stretch | ||||||||||
|
||||||||||
# Calculate added mass | ||||||||||
ma = ka * rho * (4 / 3) * np.pi * R**3 | ||||||||||
ma = ka * rho * (4 / 3) * np.pi * parachute_radius**2 * parachute_height | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The added mass calculation uses the full ellipsoid volume (4/3·π·a²·c) but the parachute is modeled as a hemispheroid; this should use half the volume (2/3·π·a²·c) to correctly compute added mass.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||
|
||||||||||
# Calculate freestream speed | ||||||||||
freestream_x = vx - wind_velocity_x | ||||||||||
|
@@ -1987,12 +2010,12 @@ def u_dot_parachute(self, t, u, post_processing=False): | |||||||||
# Determine drag force | ||||||||||
pseudo_drag = -0.5 * rho * cd_s * free_stream_speed | ||||||||||
# pseudo_drag = pseudo_drag - ka * rho * 4 * np.pi * (R**2) * Rdot | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These comments??? Should we start using it?
Suggested change
|
||||||||||
Dx = pseudo_drag * freestream_x | ||||||||||
Dx = pseudo_drag * freestream_x # add eta efficiency for wake | ||||||||||
Dy = pseudo_drag * freestream_y | ||||||||||
Dz = pseudo_drag * freestream_z | ||||||||||
ax = Dx / (mp + ma) | ||||||||||
ay = Dy / (mp + ma) | ||||||||||
az = (Dz - 9.8 * mp) / (mp + ma) | ||||||||||
az = (Dz - mp * self.env.gravity.get_value_opt(z)) / (mp + ma) | ||||||||||
|
||||||||||
if post_processing: | ||||||||||
self.__post_processed_variables.append( | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you be more spacific on the parachute_radius definition please? I believe it is still not intuitive what the radius is.