pterasoftware.SteadyProblem¶
- class pterasoftware.SteadyProblem(
- *,
- airplanes: list[Airplane],
- operating_point: OperatingPoint,
A class used to contain steady aerodynamics problems.
- Parameters:
airplanes -- The list of the Airplanes for this SteadyProblem.
operating_point -- The OperatingPoint for this SteadyProblem.
- Returns:
None
- property reynolds_numbers: tuple[float, ...]¶
A tuple of Reynolds numbers, one for each Airplane in the SteadyProblem.
The Reynolds number is calculated as: Re = (V x L) / nu, where V is the freestream speed, observed from the Earth frame (vCg__E from OperatingPoint, m/s), L is the characteristic length (c_ref from Airplane, m), and nu is the kinematic viscosity (nu from OperatingPoint, m^2/s).
These Reynolds numbers only consider the freestream speed, not any apparent velocity due to prescribed motion, so be careful interpreting it for cases where this SteadyProblem corresponds to one time step in an UnsteadyProblem.
- Returns:
A tuple of Reynolds numbers, one for each Airplane.
- diagram(
- *,
- show_airplane_axes_and_points: bool | np.bool = True,
- show_wing_axes_and_points: bool | np.bool = False,
- show_wing_cross_section_axes_and_points: bool | np.bool = False,
- show_airfoil_axes_and_points: bool | np.bool = False,
- show_airfoils: bool | np.bool = False,
- show_mcls: bool | np.bool = False,
- show_collocation_points: bool | np.bool = False,
- label_collocation_points: bool | np.bool = False,
- math_labels: bool | np.bool = False,
- save: bool | np.bool = False,
- path: str | Path = 'diagram.webp',
- quality: int | float = 75.0,
Displays a diagram of this SteadyProblem's Airplanes' Wings' Panels, along with their axes and points.
The diagram is drawn in the first Airplane's geometry axes, relative to the first Airplane's CG. It shows the Earth axes at the Earth origin and every Wing's Panels. The units are in meters.
A label can be edited by double-clicking it in the diagram's window. Its raw text is then shown in a monospaced font with a caret, which the left and right arrow keys move. Enter keeps the new text, Escape restores the old text, and entering empty text deletes the label. Text between pairs of dollar signs is written as math in Matplotlib's mathtext syntax, and the label is shown in red while that math isn't valid.
- Parameters:
show_airplane_axes_and_points -- Determines whether to draw each Airplane's geometry axes at its CG. Can be a bool or a numpy bool and will be converted internally to a bool. The default is True.
show_wing_axes_and_points -- Determines whether to draw each Wing's axes at its leading edge root point. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_wing_cross_section_axes_and_points -- Determines whether to draw each WingCrossSection's axes at its leading point. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_airfoil_axes_and_points -- Determines whether to draw each WingCrossSection's Airfoil's axes at its leading point. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_airfoils -- Determines whether to draw each WingCrossSection's Airfoil's outline and mean camber line. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_mcls -- Determines whether to draw each Airfoil's mean camber line. It has no effect if show_airfoils is False. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_collocation_points -- Determines whether to draw the Wings' Panels' collocation points. The labels number each Panel by its chordwise row and spanwise column, starting at one, followed by its Wing's and its Airplane's numbers (such as "Cppr3c2Wn1P2"). Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
label_collocation_points -- Determines whether to label the collocation points. If False, they are still marked. It has no effect if show_collocation_points is False. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
math_labels -- Determines whether to write the axes and point labels as math, set in the STIX font. Each basis direction arrow is then labeled with a unit vector whose superscript lists its axes' abbreviations, and each point with its name in capitals, whose subscript lists what it belongs to, if anything. If False, each label is the plain ID, set in a monospaced font. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
save -- Determines whether to save the diagram as a WebP with a white background once its window is closed, which keeps the view's orientation and any labels dragged by hand. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
path -- The file path to save the diagram to. It can be a str or a Path, must end with ".webp", and its directory must already exist. It has no effect if save is False. The default is "diagram.webp".
quality -- The quality of the saved WebP, where 0.0 is the smallest file with the most compression artifacts and 100.0 is the largest file with the fewest. It can be an int or a float and will be converted internally to a float. It has no effect if save is False. The default is 75.0.
- Returns:
None