API Reference

hyperstruct

Hyperstruct.

class hyperstruct.Component(material)

The basic foundation for sizing.

An Aircraft is composed of different Assemblies, which contain various Components. Components have several base methods and attributes that enable sizing and weights estimation.

Parameters:

material (Material)

material: Material

material the cover is made of.

synthesis()

The sizing method.

The sizing method collects all sizing routines and executes them in the order of the routines list.

Return type:

None

class hyperstruct.Material(rho, E, E_c, nu, F_tu, F_ty, F_cy, F_su, F_bru, F_bry, F_en, db_r)

The HyperStruct material model.

The material object contains the basic material allowables. It also contains thermomechanical curves for environmental correction factors.

Parameters:
  • rho (float)

  • E (float)

  • E_c (float)

  • nu (float)

  • F_tu (float)

  • F_ty (float)

  • F_cy (float)

  • F_su (float)

  • F_bru (float)

  • F_bry (float)

  • F_en (float)

  • db_r (float)

E: float

Young’s Modulus, tension.

E_c: float

Young’s Modulus, compression.

F_bru: float

Bearing ultimate strength.

F_bry: float

Bearing yield strength.

F_cy: float

Compressive yield strength.

F_en: float

Endurance limit.

F_su: float

Shear ultimate strength.

F_tu: float

Tensile ultimate strength.

F_ty: float

Tensile yield strength.

db_r: float

Random spectrum decibel level that produces an acoustic fatigue life of 10^9.

nu: float

Poisson’s ratio.

rho: float

Weight density (aka specific weight)

class hyperstruct.Station(orientation, name, number, width, depth, vertical_centroid, radius)

The basic foundation for cross-sectional geometry.

The station class provides functionality to define a cross-sectional shape, and location of that shape. These definitions are needed for multi-station analysis methods, such as the fuselage shell structure.

Each Station class has an orientation system (FS, BL, WL), name, station number, and geometry definition.

Differing from the SWEEP convention, shape geometry here is required to have a depth, width, and radius input. The correction factor approach seemed overly complex. If the radius provided is zero, a rectangle is generated. If the radius provided is greater than either the depth or width, an ellipse is assumed with major radius as the larger of the two and minor radius as the smaller of the two. The depth and width of the shape are required to align with the aircraft global coordinates of Z (WL. Vertical direction, from origin pointing UP) and Y (BL, Horizontal Plane, from origin pointing RIGHT when seated in the cockpit), respectively.

Generally, sizing is accomplished for four shell sectors representing the upper, lower, and two sides. A 45-degree angle is used to define the limits of these sectors.

Parameters:
  • orientation (str)

  • name (str)

  • number (float)

  • width (float)

  • depth (float)

  • vertical_centroid (float)

  • radius (float)

arc_length(theta_start, theta_end)

This method calculates the length of an elliptic curve.

The semi-major axis is the distance from the centroid to the apex of the most extreme curve. The semi-minor axis is the distance from the centroid to the remaining apex.

Note that the angles provided are measured in cartesian coordinates, counterclockwise, starting from the positive x-axis intersection of the curve.

The semi-major axis is restricted to the larger of the Station depth or width, while the semi-minor axis is the opposite.

Parameters:
  • theta_start (float) – Angle for start of curve, in radians (float).

  • theta_end (float) – Angle for end of curve, in radians (float).

Returns:

arc length

Return type:

float

curvature()

Calculates the nominal readius of curvature.

Returns:

float of the radius of curvature

Raises:

NotImplementedError – until developed

Return type:

float

depth: float

Depth of the shape.

property doo: float

Incremental depth from centroid to corner tangency.

get_coords(theta, debug=False)

Get the planar coordinates of the shape intersection with a straight line at angle theta.

Coordinate extraction varies from the simplistic (Circle), to the very complext case of the rounded rectangle. The method used to evaluate the coordinates depends on the shape family (circle, ellipse, or rounded rectangle).

Parameters:
  • theta (float) – polar angle to calculate the intersection with. This must be in radians. Note that the angle is measured clockwise from the vertical axis (12 o’clock)

  • debug (bool) – bool to print debugging information

Returns:

Tuple of coordinates as floats, for example (x, y)

Return type:

Tuple[float, float]

property is_ellipse: bool

Checks whether the shape is an ellipse.

property lower_panel: float

Peripheral length of the lower panel cover element.

name: str

A reference designation for this Station (e.g. Nose/Tail/MLG Trunnion).

number: float

The station number. Measurement from the vehicle origin to the station plane.

orientation: str

Fuselage Station, Butt Line, or Water Line.

radius: float

Corner radius of the shape.

show(coords=None, display=True)

Plot the station shape for a visual check.

This method just uses matplotlib to draw the shape on a plot. It will select the appropriate shape (Artist) object, based on the Station properties, and put in a figure on it’s own.

Parameters:
  • coords (List[Tuple[float, float]] | None)

  • display (bool)

Return type:

Tuple[Figure, Axes]

property side_panel: float

Peripheral length of the side panel cover elements.

property upper_panel: float

Peripheral length of the upper panel cover element.

vertical_centroid: float

Distance from z reference plane to the centroid.

width: float

Width of the shape.

property wo: float

Incremental width from centroid to corner tangency.

hyperstruct.composite_cg(masses)

Calculate the cg of a combined set of masses, along a single axis.

The composite cg of a collection of objects can be computed if the masses and cg locations are known. The composite location along the length is determined by summing the moments about a reference point.

Note that unit consitency is assumed. Weights can be provided in lieu of masses, if the user is consistently using weight densities and weight values across the rest of the design.

Parameters:

masses (List[Tuple[float, float]]) – A 2-tuple list of masses (w, x), where w is the mass, and x is the location.

Returns:

a tuple of the composite mass and cg

Return type:

Tuple[float, float]