Skip to content

Commit 87216ca

Browse files
committed
ENH: changing parameter ka to added_mass_coefficient
1 parent 53b0940 commit 87216ca

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

rocketpy/rocket/parachute.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class Parachute:
103103
in [0, 1]. Affects only the added-mass scaling during descent; it does
104104
not change ``cd_s`` (drag). The default, 0.0432, yields an added-mass
105105
of 1.0 (“neutral” behavior).
106+
Parachute.added_mass_coefficient : float
107+
Coefficient used to calculate the added-mass due to dragged air. It is
108+
calculated from the porosity of the parachute.
106109
"""
107110

108111
def __init__(
@@ -200,7 +203,7 @@ def __init__(
200203
self.radius = radius
201204
self.height = height or radius
202205
self.porosity = porosity
203-
self.ka = 1.068 * (
206+
self.added_mass_coefficient = 1.068 * (
204207
1
205208
- 1.465 * self.porosity
206209
- 0.25975 * self.porosity**2

rocketpy/simulation/flight.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ def __simulate(self, verbose):
777777
lambda self, parachute_porosity=parachute.porosity: setattr(
778778
self, "parachute_porosity", parachute_porosity
779779
),
780-
lambda self, ka=parachute.ka: setattr(
780+
lambda self, ka=parachute.added_mass_coefficient: setattr(
781781
self, "parachute_ka", ka
782782
),
783783
]
@@ -1044,7 +1044,8 @@ def __simulate(self, verbose):
10441044
"parachute_porosity",
10451045
parachute_porosity,
10461046
),
1047-
lambda self, ka=parachute.ka: setattr(
1047+
lambda self,
1048+
ka=parachute.added_mass_coefficient: setattr(
10481049
self, "ka", ka
10491050
),
10501051
]
@@ -2012,7 +2013,7 @@ def u_dot_parachute(self, t, u, post_processing=False):
20122013

20132014
# Calculate added mass
20142015
ma = (
2015-
self.ka
2016+
self.added_mass_coefficient
20162017
* rho
20172018
* (2 / 3)
20182019
* np.pi

0 commit comments

Comments
 (0)