Skip to content
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

ENH: New nosecone types added. #339

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions rocketpy/AeroSurfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def __init__(
length : float
Nose cone length. Has units of length and must be given in meters.
kind : string
Nose cone kind. Can be "conical", "ogive" or "lvhaack".
Nose cone kind. Can be "conical", "ogive", "elliptical", "tangent",
"von karman", "parabolic" or "lvhaack".
baseRadius : float, optional
Nose cone base radius. Has units of length and must be given in meters.
If not given, the ratio between baseRadius and rocketRadius will be
Expand Down Expand Up @@ -162,8 +163,19 @@ def kind(self, value):
self.k = 0.466
elif value == "lvhaack":
self.k = 0.563
elif value == "tangent":
rho = (self.baseRadius**2 + self.length**2) / (2 * self.baseRadius)
volume = np.pi * (
self.length * rho**2
- (self.length**3) / 3
- (rho - self.baseRadius) * rho**2 * np.arcsin(self.length / rho)
)
area = np.pi * self.baseRadius**2
self.k = 1 - volume / (area * self.length)
elif value == "elliptical":
self.k = 1 / 3
else:
self.k = 0.5
self.k = 0.5 # Parabolic and Von Karman
self.evaluateCenterOfPressure()

def evaluateGeometricalParameters(self):
Expand Down