wingstructure.data package¶
Submodules¶
wingstructure.data.geometry module¶
Geometry Module
Contains classes for storing plane geometry
-
class
wingstructure.data.geometry.
Airfoil
(coords: numpy.array)¶ Bases:
object
A storage class for Airfoil Coordinates
-
interpolate
(airfoil, beta)¶ interpolation with other airfoil
Parameters: - airfoil (Airfoil) – another airfoil
- beta (float) – interpolation weighting factor
Returns: interpolated airfoil
Return type:
-
plot
(*args)¶ show airfoil with matplotlib
Parameters: args
Arguments passed to matplotlib.pyplot.plot function
-
-
class
wingstructure.data.geometry.
ControlSurface
(span_start, span_end, chord)¶ Bases:
object
Data object for flap definition
Instances of the class store the span position (start and end) and the chord position of a control surface. The chord position is defined relative to the chord length (0.0-1.0) and can either be constant or linear.
Examples
>>> constantflap = ws.ControlSurface(4.5, 6.5, 0.8) >>> linearflap = ws.ControlSurface(4.5, 6.5, [0.8, 0.75])
-
chordpos_at
(span_pos: float)¶ interpolate chord position
-
-
class
wingstructure.data.geometry.
Point
(x, y, z)¶ Bases:
tuple
-
x
¶ Alias for field number 0
-
y
¶ Alias for field number 1
-
z
¶ Alias for field number 2
-
-
class
wingstructure.data.geometry.
Section
(pos: wingstructure.data.geometry.Point, chord: float, twist: float = 0.0, airfoil: str = '')¶ Bases:
object
A storage class for wing sections
-
x
¶
-
y
¶
-
z
¶
-
-
class
wingstructure.data.geometry.
Wing
(pos: wingstructure.data.geometry.Point = Point(x=0, y=0, z=0), rot: wingstructure.data.geometry.Point = Point(x=0, y=0, z=0))¶ Bases:
wingstructure.data.geometry._BaseWing
Storage class for Wing definition
Instances of the Wing class can be used to store geometry information for wing elements. Many useful functions are available as well through it’s objects.
-
classmethod
create_from_dict
(adict)¶ build _BaseWing from dictionary definition
-
get_flap_depth
(span_pos: float) → float¶
-
is_airbrake_pos
(span_pos: float) → bool¶
-
plot
()¶
-
set_airbrake
(span_pos_start, span_pos_end)¶
-
set_flap
(name, span_pos_start, span_pos_end, depth)¶
-
set_spoiler
(span_pos_start, span_pos_end)¶
-
within_flap
(flapname: str, ys: numpy.ndarray) → numpy.ndarray¶
-
classmethod
wingstructure.data.schema module¶
-
wingstructure.data.schema.
clear
(data)¶ helper function removing metadata
-
wingstructure.data.schema.
loaddata
(filename: str)¶ opens file and trys reading construction data
Parameters: filename (str) – file containing construction data Returns: read data Return type: OrderedDict