-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Changes from 10 commits
0873d21
02ddd1b
1119ef8
413503f
f09a4b0
78ef92e
7defc38
465f526
c5ce166
f84459d
4fcb406
159cce8
0c434f8
f136ffb
112b75a
40d10c5
1e2a2fd
65530fd
363bfc8
53b0940
87216ca
4f20568
68fc191
9a03c01
486a5d1
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |||||||||
|
|
||||||||||
|
|
||||||||||
| class Parachute: | ||||||||||
| """Keeps parachute information. | ||||||||||
| """Keeps information of the parachute, which is modeled as a hemispheroid. | ||||||||||
|
|
||||||||||
| Attributes | ||||||||||
| ---------- | ||||||||||
|
|
@@ -92,6 +92,15 @@ class Parachute: | |||||||||
| Function of noisy_pressure_signal. | ||||||||||
| Parachute.clean_pressure_signal_function : Function | ||||||||||
| Function of clean_pressure_signal. | ||||||||||
| Parachute.parachute_radius : float | ||||||||||
| Length of the non-unique semi-axis (radius) of the inflated hemispheroid | ||||||||||
| parachute in meters. | ||||||||||
| Parachute.parachute_height : float | ||||||||||
|
||||||||||
| Parachute.parachute_height : float | |
| Parachute.parachute_height : float, None |
or
| Parachute.parachute_height : float | |
| Parachute.parachute_height : Optional[float] |
Outdated
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.
Gui-FernandesBR marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
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.
self.parachute_height = parachute_height or parachute_radius
Gui-FernandesBR marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1433,7 +1433,16 @@ def add_free_form_fins( | |||||||||
| return fin_set | ||||||||||
|
|
||||||||||
| def add_parachute( | ||||||||||
| self, name, cd_s, trigger, sampling_rate=100, lag=0, noise=(0, 0, 0) | ||||||||||
| self, | ||||||||||
| name, | ||||||||||
| cd_s, | ||||||||||
| trigger, | ||||||||||
| sampling_rate=100, | ||||||||||
| lag=0, | ||||||||||
| noise=(0, 0, 0), | ||||||||||
| parachute_radius=1.5, | ||||||||||
| parachute_height=None, | ||||||||||
|
||||||||||
| parachute_radius=1.5, | |
| parachute_height=None, | |
| radius=1.5, | |
| height=None, |
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.
I was looking in other Rocket class methods such as add_trapezoidal_fins and set_rail_buttons, and both use radius already to refer to the fuselage radius. So changing it in the add_parachute method wouldn't break the consistency?
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.
Also, since we already use radius in some inputs as the fuselage radius, maybe it will be more clear as an input to explicitly mention parachute
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.
I would like to hear a third opinion here, maybe @MateusStano or @phmbressan .
Based on my experience, I don't think parachute_radius is a good idea, it sounds verbose to me.
However, I don't know iff we would have any conflict with other classes.
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.
I think the simpler naming is better. If the documentation is there we can rely on that
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -765,7 +765,18 @@ 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, | ||||||||||
|
|
@@ -1011,7 +1022,25 @@ 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, | ||||||||||
|
|
@@ -1965,22 +1994,28 @@ 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 | ||||||||||
|
|
||||||||||
| # 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 | ||||||||||
| ) | ||||||||||
| # 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 | ||||||||||
|
||||||||||
| ma = ka * rho * (4 / 3) * np.pi * parachute_radius**2 * parachute_height | |
| ma = ka * rho * (2 / 3) * np.pi * parachute_radius**2 * parachute_height |
Outdated
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.
These comments??? Should we start using it?
| pseudo_drag = -0.5 * rho * cd_s * free_stream_speed | |
| # pseudo_drag = pseudo_drag - ka * rho * 4 * np.pi * (R**2) * Rdot | |
| 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 comment
The reason will be displayed to describe this comment to others. Learn more.
having both
cdsandparachute_radius? do you think we could possible calculate the cd based on these other parameters?