pterasoftware.AeroelasticUnsteadyRingVortexLatticeMethodSolver

class pterasoftware.AeroelasticUnsteadyRingVortexLatticeMethodSolver(
*,
aeroelastic_unsteady_problem: AeroelasticUnsteadyProblem,
)

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

This solver extends the unsteady ring vortex lattice method with calculations of the moments (in the first Airplane's geometry axes) about each panel's strip leading edge point (SLEP), which is important for analyzing wing loading and deformation characteristics relative to the wing root.

Key additions over the unsteady ring vortex lattice method:

Initializes and maintains the SLEP index mapping and position arrays, resets them at the start of each time step, and computes the moments (in the first Airplane's geometry axes) about the strip leading edge points from the per Panel total loads once those loads are known.

Structural coupling output:

moments_GP1_Slep is the solver's one public SLEP attribute: a (num_panels, 3) ndarray of floats representing the moments (in the first Airplane's geometry axes, each relative to its panel's strip leading edge point) on every Panel at the current time step, which the AeroelasticUnsteadyProblem's structural solve reads as its aerodynamic forcing. The SLEP index mapping and the relative-position arrays that produce it are private working state.

Initialize the solver for an AeroelasticUnsteadyProblem.

Sets up the solver infrastructure and initializes SLEP (Strip Leading Edge Point) related attributes.

Parameters:

aeroelastic_unsteady_problem -- The AeroelasticUnsteadyProblem to be solved.

Returns:

None

diagram(
*,
step: int = -1,
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 one time step's SteadyProblem's Airplanes' Wings' Panels, along with their axes and points and the vortices this solver placed on them and in their wake at that time step.

The diagram is drawn in the first Airplane's geometry axes, relative to the first Airplane's CG, at the time step. It shows the Earth axes at the Earth origin, every Wing's Panels, every Panel's bound ring vortex, and the wake ring vortices, which are 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 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:
  • step -- The time step to draw. Negative values count back from the last time step, so the default of -1 draws the last time step. It must be an int in the range from negative the number of time steps, inclusive, to the number of time steps, exclusive.

  • 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 and wake ring vortex is shrunk toward its center, which separates the legs that neighboring vortices share. Their corners are also rounded, they are drawn in different colors, 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

property force_method: str

The force calculation method selection from the most recent call to run.

Reading this property before run has been called raises a RuntimeError.

Returns:

Either "joukowski" or "katz".

property prescribed_wake: bool

The wake model selection from the most recent call to run.

Reading this property before run has been called raises a RuntimeError.

Returns:

True if the most recent run used a prescribed wake model and False if it used a free wake.

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(
*,
prescribed_wake: bool | np.bool = True,
calculate_streamlines: bool | np.bool = True,
show_progress: bool | np.bool = True,
force_method: str = 'joukowski',
) → None

Runs the solver on the UnsteadyProblem.

Parameters:
  • prescribed_wake -- Set this to True to solve using a prescribed wake model. Set to False to use a free-wake, which may be more accurate but will make the fun method significantly slower. Can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

  • 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.

  • show_progress -- Set this to True to show the TQDM progress bar. For showing the progress bar and displaying log statements, set up logging using the setup_logging function. It can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

  • force_method -- The method to use for calculating aerodynamic forces. Valid options are "joukowski" which uses the Kutta Joukowski theorem on each RingVortex leg, and "katz" which uses the pressure integration method adapted from "Low Speed Aerodynamics" by Katz and Plotkin (Section 13.12, Eq. 13.150 and 13.151). The default is "joukowski".

Returns:

None

property steady_problems: tuple[SteadyProblem, ...]

The SteadyProblems for this solver's UnsteadyProblem.

This read-only view always reflects the live state of the underlying UnsteadyProblem. For a standard UnsteadyProblem the tuple is fixed over the solver's lifetime; for a coupled problem it grows as each step is initialized during the run, so successive reads can return different-length tuples.

Returns:

A tuple of the SteadyProblems, one per initialized time step.