pterasoftware.UnsteadyProblem¶
- class pterasoftware.UnsteadyProblem( )¶
A class used to contain unsteady aerodynamics problems.
The solver populates the mutable load lists during simulation, with one entry per Airplane: the final lists for static motion, the final cycle averaged lists for cyclic motion, and the final cycle root mean squared lists for variable geometry problems. The lists with names ending in Forces_W, ForceCoefficients_W, Moments_W_CgP1, and MomentCoefficients_W_CgP1 hold the total force (in wind axes), the total moment (in wind axes, relative to the first Airplane's CG), and their coefficients. The lists with names ending in Forces_G, ForceCoefficients_G, Moments_G_Cg, MomentCoefficients_G_Cg, Moments_W_Cg, and MomentCoefficients_W_Cg hold the total force (in geometry axes), the total moment (in geometry axes, relative to the CG), the total moment (in wind axes, relative to the CG), and their coefficients. In these per-Airplane lists, the G and Cg IDs are used without an Airplane index to implicitly mean "in the entry's own Airplane's geometry axes" and "relative to the entry's own Airplane's CG". For the first Airplane's entries, the Moments_W_Cg and MomentCoefficients_W_Cg lists equal the Moments_W_CgP1 and MomentCoefficients_W_CgP1 lists.
The named load properties derive the named load components and coefficients, as defined in AXES_POINTS_AND_FRAMES.md, from the wind axes lists. Each returns one float per Airplane, or an empty list until its source list has been populated.
- Parameters:
movement -- The Movement that contains this UnsteadyProblem's OperatingPointMovement and AirplaneMovements.
only_final_results -- Determines whether the Solver will only calculate loads for the final time step (for static Movements) or (for non static Movements) for will only calculate loads for the time steps in the final complete motion cycle (of the Movement's sub Movement with the longest period), which increases simulation speed. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
- 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,
- 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 one time step's SteadyProblem's Airplanes' Wings' Panels, along with their axes and points.
The diagram is the time step's SteadyProblem's diagram, so it is drawn in the first Airplane's geometry axes, relative to the first Airplane's CG, at that time step. It shows the Earth axes at the Earth origin and every Wing's Panels. The units are in meters.
Some problems, such as AeroelasticUnsteadyProblems and FreeFlightUnsteadyProblems, create each time step's SteadyProblem while they are solved, so before then only the first time step can be drawn. If step is negative and some time steps' SteadyProblems haven't been created yet, a warning is logged, because step then counts back from the last time step created so far rather than from the last time step.
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, as an index into this problem's SteadyProblems. Negative values count back from the last one, so the default of -1 draws the last time step whose SteadyProblem has been created. It must be an int in the range from negative the number of SteadyProblems created so far, inclusive, to that number, 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.
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 finalCrosswindForceCoefficients_W: list[float]¶
The final crosswind force coefficient experienced by each Airplane (in wind axes).
Crosswind force coefficient corresponds to the wind axes' -y basis direction, so each entry is the negative of the corresponding finalForceCoefficients_W entry's y component.
- Returns:
The final crosswind force coefficients, one entry per Airplane. Empty if finalForceCoefficients_W has not been populated.
- property finalCrosswindForces_W: list[float]¶
The final crosswind force experienced by each Airplane (in wind axes).
Crosswind force points along the wind axes' -y basis direction, so each entry is the negative of the corresponding finalForces_W entry's y component.
- Returns:
The final crosswind forces in Newtons, one entry per Airplane. Empty if finalForces_W has not been populated.
- property finalInducedDragCoefficients_W: list[float]¶
The final induced drag force coefficient experienced by each Airplane (in wind axes).
Induced drag coefficient corresponds to the wind axes' -x basis direction, so each entry is the negative of the corresponding finalForceCoefficients_W entry's x component.
- Returns:
The final induced drag coefficients, one entry per Airplane. Empty if finalForceCoefficients_W has not been populated.
- property finalInducedDrags_W: list[float]¶
The final induced drag force experienced by each Airplane (in wind axes).
Induced drag points along the wind axes' -x basis direction, so each entry is the negative of the corresponding finalForces_W entry's x component.
- Returns:
The final induced drag forces in Newtons, one entry per Airplane. Empty if finalForces_W has not been populated.
- property finalLiftCoefficients_W: list[float]¶
The final lift force coefficient experienced by each Airplane (in wind axes).
Lift coefficient corresponds to the wind axes' -z basis direction, so each entry is the negative of the corresponding finalForceCoefficients_W entry's z component.
- Returns:
The final lift coefficients, one entry per Airplane. Empty if finalForceCoefficients_W has not been populated.
- property finalLifts_W: list[float]¶
The final lift force experienced by each Airplane (in wind axes).
Lift points along the wind axes' -z basis direction, so each entry is the negative of the corresponding finalForces_W entry's z component.
- Returns:
The final lift forces in Newtons, one entry per Airplane. Empty if finalForces_W has not been populated.
- property finalMeanCrosswindForceCoefficients_W: list[float]¶
The final cycle averaged crosswind force coefficient experienced by each Airplane (in wind axes).
Crosswind force coefficient corresponds to the wind axes' -y basis direction, so each entry is the negative of the corresponding finalMeanForceCoefficients_W entry's y component.
- Returns:
The final cycle averaged crosswind force coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_W has not been populated.
- property finalMeanCrosswindForces_W: list[float]¶
The final cycle averaged crosswind force experienced by each Airplane (in wind axes).
Crosswind force points along the wind axes' -y basis direction, so each entry is the negative of the corresponding finalMeanForces_W entry's y component.
- Returns:
The final cycle averaged crosswind forces in Newtons, one entry per Airplane. Empty if finalMeanForces_W has not been populated.
- property finalMeanInducedDragCoefficients_W: list[float]¶
The final cycle averaged induced drag force coefficient experienced by each Airplane (in wind axes).
Induced drag coefficient corresponds to the wind axes' -x basis direction, so each entry is the negative of the corresponding finalMeanForceCoefficients_W entry's x component.
- Returns:
The final cycle averaged induced drag coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_W has not been populated.
- property finalMeanInducedDrags_W: list[float]¶
The final cycle averaged induced drag force experienced by each Airplane (in wind axes).
Induced drag points along the wind axes' -x basis direction, so each entry is the negative of the corresponding finalMeanForces_W entry's x component.
- Returns:
The final cycle averaged induced drag forces in Newtons, one entry per Airplane. Empty if finalMeanForces_W has not been populated.
- property finalMeanLiftCoefficients_W: list[float]¶
The final cycle averaged lift force coefficient experienced by each Airplane (in wind axes).
Lift coefficient corresponds to the wind axes' -z basis direction, so each entry is the negative of the corresponding finalMeanForceCoefficients_W entry's z component.
- Returns:
The final cycle averaged lift coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_W has not been populated.
- property finalMeanLifts_W: list[float]¶
The final cycle averaged lift force experienced by each Airplane (in wind axes).
Lift points along the wind axes' -z basis direction, so each entry is the negative of the corresponding finalMeanForces_W entry's z component.
- Returns:
The final cycle averaged lift forces in Newtons, one entry per Airplane. Empty if finalMeanForces_W has not been populated.
- property finalMeanPitchingMomentCoefficients_W_Cg: list[float]¶
The final cycle averaged pitching moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Pitching moment coefficient corresponds to the wind axes' +y basis direction, so each entry equals the corresponding finalMeanMomentCoefficients_W_Cg entry's y component.
- Returns:
The final cycle averaged pitching moment coefficients, one entry per Airplane. Empty if finalMeanMomentCoefficients_W_Cg has not been populated.
- property finalMeanPitchingMoments_W_Cg: list[float]¶
The final cycle averaged pitching moment experienced by each Airplane (in wind axes, relative to its own CG).
Pitching moment acts about the wind axes' +y basis direction, so each entry equals the corresponding finalMeanMoments_W_Cg entry's y component.
- Returns:
The final cycle averaged pitching moments in Newton-meters, one entry per Airplane. Empty if finalMeanMoments_W_Cg has not been populated.
- property finalMeanRollingMomentCoefficients_W_Cg: list[float]¶
The final cycle averaged rolling moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Rolling moment coefficient corresponds to the wind axes' +x basis direction, so each entry equals the corresponding finalMeanMomentCoefficients_W_Cg entry's x component.
- Returns:
The final cycle averaged rolling moment coefficients, one entry per Airplane. Empty if finalMeanMomentCoefficients_W_Cg has not been populated.
- property finalMeanRollingMoments_W_Cg: list[float]¶
The final cycle averaged rolling moment experienced by each Airplane (in wind axes, relative to its own CG).
Rolling moment acts about the wind axes' +x basis direction, so each entry equals the corresponding finalMeanMoments_W_Cg entry's x component.
- Returns:
The final cycle averaged rolling moments in Newton-meters, one entry per Airplane. Empty if finalMeanMoments_W_Cg has not been populated.
- property finalMeanYawingMomentCoefficients_W_Cg: list[float]¶
The final cycle averaged yawing moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Yawing moment coefficient corresponds to the wind axes' +z basis direction, so each entry equals the corresponding finalMeanMomentCoefficients_W_Cg entry's z component.
- Returns:
The final cycle averaged yawing moment coefficients, one entry per Airplane. Empty if finalMeanMomentCoefficients_W_Cg has not been populated.
- property finalMeanYawingMoments_W_Cg: list[float]¶
The final cycle averaged yawing moment experienced by each Airplane (in wind axes, relative to its own CG).
Yawing moment acts about the wind axes' +z basis direction, so each entry equals the corresponding finalMeanMoments_W_Cg entry's z component.
- Returns:
The final cycle averaged yawing moments in Newton-meters, one entry per Airplane. Empty if finalMeanMoments_W_Cg has not been populated.
- property finalPitchingMomentCoefficients_W_Cg: list[float]¶
The final pitching moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Pitching moment coefficient corresponds to the wind axes' +y basis direction, so each entry equals the corresponding finalMomentCoefficients_W_Cg entry's y component.
- Returns:
The final pitching moment coefficients, one entry per Airplane. Empty if finalMomentCoefficients_W_Cg has not been populated.
- property finalPitchingMoments_W_Cg: list[float]¶
The final pitching moment experienced by each Airplane (in wind axes, relative to its own CG).
Pitching moment acts about the wind axes' +y basis direction, so each entry equals the corresponding finalMoments_W_Cg entry's y component.
- Returns:
The final pitching moments in Newton-meters, one entry per Airplane. Empty if finalMoments_W_Cg has not been populated.
- property finalRollingMomentCoefficients_W_Cg: list[float]¶
The final rolling moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Rolling moment coefficient corresponds to the wind axes' +x basis direction, so each entry equals the corresponding finalMomentCoefficients_W_Cg entry's x component.
- Returns:
The final rolling moment coefficients, one entry per Airplane. Empty if finalMomentCoefficients_W_Cg has not been populated.
- property finalRollingMoments_W_Cg: list[float]¶
The final rolling moment experienced by each Airplane (in wind axes, relative to its own CG).
Rolling moment acts about the wind axes' +x basis direction, so each entry equals the corresponding finalMoments_W_Cg entry's x component.
- Returns:
The final rolling moments in Newton-meters, one entry per Airplane. Empty if finalMoments_W_Cg has not been populated.
- property finalYawingMomentCoefficients_W_Cg: list[float]¶
The final yawing moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Yawing moment coefficient corresponds to the wind axes' +z basis direction, so each entry equals the corresponding finalMomentCoefficients_W_Cg entry's z component.
- Returns:
The final yawing moment coefficients, one entry per Airplane. Empty if finalMomentCoefficients_W_Cg has not been populated.
- property finalYawingMoments_W_Cg: list[float]¶
The final yawing moment experienced by each Airplane (in wind axes, relative to its own CG).
Yawing moment acts about the wind axes' +z basis direction, so each entry equals the corresponding finalMoments_W_Cg entry's z component.
- Returns:
The final yawing moments in Newton-meters, one entry per Airplane. Empty if finalMoments_W_Cg has not been populated.