Skip to content

Commit e8c05ea

Browse files
committed
ENH: Fixing volume calculation from spheroid to hemispheroid
1 parent b72a606 commit e8c05ea

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

rocketpy/rocket/parachute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __init__(
212212
self.height = height or radius
213213
self.initial_radius = initial_radius or radius
214214
self.initial_volume = (
215-
(4 / 3) * math.pi * (self.height / self.radius) * self.initial_radius**3
215+
(2 / 3) * math.pi * (self.height / self.radius) * self.initial_radius**3
216216
)
217217
self.porosity = porosity
218218
self.added_mass_coefficient = 1.068 * (

rocketpy/simulation/flight.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,15 +2732,15 @@ def u_dot_parachute(self, t, u, post_processing=False):
27322732
# Initialize parachute geometrical parameters
27332733
inflated_radius = min(self.parachute_radius, (
27342734
(3 * self.parachute_volume * self.parachute_radius)
2735-
/ (4 * math.pi * self.parachute_height)
2735+
/ (2 * math.pi * self.parachute_height)
27362736
) ** (1 / 3))
27372737
inflated_height = (
27382738
inflated_radius * self.parachute_height / self.parachute_radius
27392739
)
27402740

27412741
# Calculate the surface area of the parachute
27422742
if self.parachute_radius == self.parachute_height:
2743-
surface_area = math.pi * inflated_radius**2 * 4
2743+
surface_area = math.pi * inflated_radius**2 * 2
27442744
elif self.parachute_radius > self.parachute_height:
27452745
e = math.sqrt(1 - (inflated_height**2) / (inflated_radius**2))
27462746
surface_area = (
@@ -2769,7 +2769,7 @@ def u_dot_parachute(self, t, u, post_processing=False):
27692769
dt = t1 - self.__t0
27702770

27712771
# Integrating parachute volume
2772-
max_volume = (4 / 3) * math.pi * self.parachute_radius**2 * self.parachute_height
2772+
max_volume = (2 / 3) * math.pi * self.parachute_radius**2 * self.parachute_height
27732773
self.parachute_volume = min(self.parachute_volume + volume_flow * dt, max_volume)
27742774

27752775
# Dragged air mass

0 commit comments

Comments
 (0)