diff --git a/src/hyperstruct/__init__.py b/src/hyperstruct/__init__.py index 6d456bf..378c206 100644 --- a/src/hyperstruct/__init__.py +++ b/src/hyperstruct/__init__.py @@ -1,6 +1,10 @@ """Hyperstruct.""" from dataclasses import dataclass +from importlib.metadata import version + + +__version__ = version("hyperstruct") @dataclass diff --git a/src/hyperstruct/fuselage.py b/src/hyperstruct/fuselage.py index 3df23f5..159197b 100644 --- a/src/hyperstruct/fuselage.py +++ b/src/hyperstruct/fuselage.py @@ -255,22 +255,28 @@ def panel_flutter(self, mach: float, altitude: float) -> float: To find the final required thickness, this method must be looped over for all Mach and altitudes corresponding to the flight envelope conditions of the aircraft. + + Inputs: Mach Number, and Altitude (in thousands of feet) + Returns: Field Thickness """ # Dynamic pressures based on standard day atmosphere. # Dynamic Pressure, q, in [psf] # Altitudes must be measured in [ft] - if altitude <= 20000: + if altitude <= 20: q = mach**2 * (1479.757 - 52.187 * altitude + 0.619868 * altitude**2) - elif 20000 < altitude <= 70000: + elif 20 < altitude <= 70: q = mach**2 * ( 1465.175 - 50.76695 * altitude + 0.6434412 * altitude**2 - 0.002907194 * altitude**3 ) - elif altitude > 70000: + elif altitude > 70: q = mach**2 * (199.659 / altitude) ** 4 + # Dynamic pressure is in [psf] convert to [psi] + q = q / 144 + # Calculate the Mach Number Effect # The Mach Number Effect, FM, is a 3 piece function from SWEEP. # This function is more conservative than the AFRL baseline curve,