pterasoftware.SteadyRingVortexLatticeMethodSolver

class pterasoftware.SteadyRingVortexLatticeMethodSolver(
*,
steady_problem: SteadyProblem,
)

A class used to solve SteadyProblems with the ring vortex lattice method.

Citation:

Adapted from: aerodynamics.vlm3.py in AeroSandbox

Author: Peter Sharpe

Date of retrieval: 04/28/2020

Parameters:

steady_problem -- The SteadyProblem to be solved.

Returns:

None

property ran: bool

Whether the solver has been run.

Returns:

True if a call to run has completed on this solver and False otherwise.

run(
*,
calculate_streamlines: bool | np.bool = True,
) → None

Runs the solver on the SteadyProblem.

Parameters:

calculate_streamlines -- Determines whether to calculate the streamlines emanating from the back of the wing after running the solver. Can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

Returns:

None

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,
simplify_vortices: 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,
) → None

Displays a diagram of this solver's SteadyProblem's Airplanes' Wings' Panels, along with their axes and points and the vortices this solver placed on them.

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, every Wing's Panels, every Panel's bound ring vortex, and the horseshoe vortex shed from every trailing edge Panel, which is drawn in a different color than the bound ring vortices. The vortices are drawn from the placement this solver used during its run, so the solver must have run. The horseshoe vortices' trailing legs are drawn shorter than the solver's, and their ends are dashed to show that they continue. 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.

  • simplify_vortices -- Determines whether to simplify the vortices' drawing. If True, each ring vortex is shrunk toward its center and each horseshoe vortex's finite leg toward its midpoint, which separates the legs that neighboring vortices share. Their corners are also rounded, they are drawn in a different color, and each of their legs gets an arrow showing its vorticity's direction for positive lift. 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