pterasoftware.problems¶
Contains the SteadyProblem, UnsteadyProblem, AeroelasticUnsteadyProblem, and FreeFlightUnsteadyProblem classes.
Classes¶
A class used to contain steady aerodynamics problems. |
|
A class used to contain unsteady aerodynamics problems. |
|
A class used to contain problems with coupled unsteady aerodynamics and rigid body dynamics. |
|
A subclass of _CoupledUnsteadyProblem used to couple aeroelastic wing deformations with unsteady aerodynamics. |
Module Contents¶
- class pterasoftware.problems.SteadyProblem(
- airplanes: list[pterasoftware.geometry.airplane.Airplane],
- operating_point: pterasoftware.operating_point.OperatingPoint,
A class used to contain steady aerodynamics problems.
Contains the following methods:
reynolds_numbers: A tuple of Reynolds numbers, one for each Airplane in the SteadyProblem.
- 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.
Notes:
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.
- class pterasoftware.problems.UnsteadyProblem(
- movement: pterasoftware.movements.movement.Movement,
- only_final_results: bool | numpy.bool_ = False,
A class used to contain unsteady aerodynamics problems.
Contains the following methods:
only_final_results: Determines whether the solver will only calculate loads for the final time step or final cycle.
num_steps: The number of time steps.
delta_time: The time step size in seconds.
first_averaging_step: The first time step included in cycle averaging.
first_results_step: The first time step for which loads are calculated.
max_wake_rows: The maximum chordwise wake rows per Wing.
movement: The Movement that contains this UnsteadyProblem’s OperatingPointMovement and AirplaneMovements.
steady_problems: A tuple of SteadyProblems, one for each time step.
finalInducedDrags_W: The final induced drag force experienced by each Airplane (in wind axes).
finalSideForces_W: The final side force experienced by each Airplane (in wind axes).
finalLifts_W: The final lift force experienced by each Airplane (in wind axes).
finalInducedDragCoefficients_W: The final induced drag force coefficient experienced by each Airplane (in wind axes).
finalSideForceCoefficients_W: The final side force coefficient experienced by each Airplane (in wind axes).
finalLiftCoefficients_W: The final lift force coefficient experienced by each Airplane (in wind axes).
finalRollingMoments_W_Cg: The final rolling moment experienced by each Airplane (in wind axes, relative to its own CG).
finalPitchingMoments_W_Cg: The final pitching moment experienced by each Airplane (in wind axes, relative to its own CG).
finalYawingMoments_W_Cg: The final yawing moment experienced by each Airplane (in wind axes, relative to its own CG).
finalRollingMomentCoefficients_W_Cg: The final rolling moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
finalPitchingMomentCoefficients_W_Cg: The final pitching moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
finalYawingMomentCoefficients_W_Cg: The final yawing moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanInducedDrags_W: The final cycle averaged induced drag force experienced by each Airplane (in wind axes).
finalMeanSideForces_W: The final cycle averaged side force experienced by each Airplane (in wind axes).
finalMeanLifts_W: The final cycle averaged lift force experienced by each Airplane (in wind axes).
finalMeanInducedDragCoefficients_W: The final cycle averaged induced drag force coefficient experienced by each Airplane (in wind axes).
finalMeanSideForceCoefficients_W: The final cycle averaged side force coefficient experienced by each Airplane (in wind axes).
finalMeanLiftCoefficients_W: The final cycle averaged lift force coefficient experienced by each Airplane (in wind axes).
finalMeanRollingMoments_W_Cg: The final cycle averaged rolling moment experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanPitchingMoments_W_Cg: The final cycle averaged pitching moment experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanYawingMoments_W_Cg: The final cycle averaged yawing moment experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanRollingMomentCoefficients_W_Cg: The final cycle averaged rolling moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanPitchingMomentCoefficients_W_Cg: The final cycle averaged pitching moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
finalMeanYawingMomentCoefficients_W_Cg: The final cycle averaged yawing moment coefficient experienced by each Airplane (in wind axes, relative to its own CG).
Notes:
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
- 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 finalSideForces_W: list[float]¶
The final side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalForces_W entry’s y component.
- Returns:
The final side forces in Newtons, one entry per Airplane. Empty if finalForces_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 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 finalSideForceCoefficients_W: list[float]¶
The final side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalForceCoefficients_W entry’s y component.
- Returns:
The final side force coefficients, one entry per Airplane. Empty if finalForceCoefficients_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 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 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 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.
- 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 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 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 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 finalMeanSideForces_W: list[float]¶
The final cycle averaged side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForces_W entry’s y component.
- Returns:
The final cycle averaged side forces in Newtons, one entry per Airplane. Empty if finalMeanForces_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 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 finalMeanSideForceCoefficients_W: list[float]¶
The final cycle averaged side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForceCoefficients_W entry’s y component.
- Returns:
The final cycle averaged side force coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_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 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 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 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 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 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 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.
- class pterasoftware.problems.FreeFlightUnsteadyProblem(
- movement: pterasoftware.movements.free_flight_movement.FreeFlightMovement,
- mass: float | int,
- I_BP1_CgP1: numpy.ndarray | collections.abc.Sequence[collections.abc.Sequence[float | int]],
- external_loads_fn: collections.abc.Callable[[pterasoftware.operating_point.OperatingPoint, pterasoftware.geometry.airplane.Airplane], tuple[numpy.ndarray, numpy.ndarray]] | None = None,
- k_max: int = 20,
- integrator: str = 'RK4',
- extra_xml: dict[str, str] | None = None,
- mujoco_assets: dict[str, bytes] | None = None,
Bases:
_CoupledUnsteadyProblemA class used to contain problems with coupled unsteady aerodynamics and rigid body dynamics.
Contains the following methods:
only_final_results: Determines whether the solver will only calculate loads for the final time step or final cycle.
num_steps: The number of time steps.
delta_time: The time step size in seconds.
first_averaging_step: The first time step included in cycle averaging.
first_results_step: The first time step for which loads are calculated.
max_wake_rows: The maximum chordwise wake rows per Wing.
movement: The FreeFlightMovement that defines the motion parameters for this FreeFlightUnsteadyProblem.
steady_problems: A tuple of SteadyProblems, one for each time step that has been initialized so far.
get_steady_problem: Gets the SteadyProblem at a specified time step.
initialize_next_problem: Initializes the next time step’s SteadyProblem from rigid body dynamics.
mass: The mass of the Airplane in kilograms.
I_BP1_CgP1: The inertia matrix of the Airplane (in the first Airplane’s body axes, relative to the first Airplane’s CG) in kilogram square meters.
k_max: The maximum number of strongly coupled sub-iterations per free-flight time step.
external_loads_fn: A callable that computes additional forces and moments to apply to the Airplane during the simulation, or None.
- Parameters:
movement – The FreeFlightMovement that defines the prescribed Airplane geometry for this FreeFlightUnsteadyProblem. The initial Airplane and OperatingPoint are derived from the FreeFlightMovement at the first time step. The FreeFlightMovement must contain exactly one AirplaneMovement; multi-airplane free flight is not supported in this release.
mass – A number (int or float) representing the mass of the Airplane. It must be greater than zero and will be converted internally to a float. The units are in kilograms. It must satisfy weight == mass * |g_E| within floating point tolerance, where weight is the Airplane’s weight and g_E is the OperatingPoint’s gravitational acceleration, which keeps the Airplane’s weight, the supplied mass, and the gravitational field mutually consistent.
I_BP1_CgP1 – An array-like object of numbers (int or float) with shape (3,3) representing the inertia matrix of the Airplane (in the first Airplane’s body axes, relative to the first Airplane’s CG). It must be symmetric. Can be a tuple, list, or ndarray. Values are converted to floats internally. The units are in kilogram square meters.
external_loads_fn – A callable that computes additional forces and moments to apply to the Airplane during the simulation. It takes an OperatingPoint and an Airplane and returns a tuple of two (3,) ndarrays of floats: the additional force (in wind axes, in Newtons) and the additional moment (in wind axes, relative to the first Airplane’s CG, in Newton meters). The return value is validated on the callable’s first invocation; a return that is not a pair of (3,) finite numeric vectors raises a descriptive error. The physical correctness of the forces and moments themselves is not checked. Setting this to None applies no additional loads. The default is None. This is the only mechanism for non-aerodynamic loads in free flight: the OperatingPoint’s externalFX_W is never applied and must be zero.
k_max – An int giving the maximum number of strongly coupled sub- iterations per free-flight time step. Each time step drives the aerodynamic loads and the rigid body state to mutual consistency with an Aitken-relaxed fixed-point sub-iteration; this caps the iterations spent before the step is accepted. A step that reaches the cap without converging is accepted anyway, with a warning. It must be greater than zero and will be converted internally to an int. Raising it trades more work per step for a tighter solve when convergence is slow, which can happen for a very light vehicle (a large added-mass ratio). The default is 20.
integrator – A str naming the MuJoCo integrator used to advance the rigid body dynamics. It must be one of “Euler”, “RK4”, “implicit”, or “implicitfast”. The choice is baked into the generated MuJoCo model XML, so it survives saving and loading. “RK4” is accurate for smooth dynamics but handles contacts poorly, so runs with collision geometry (injected via extra_xml) should prefer “implicit” or “implicitfast”. The default is “RK4”.
extra_xml – A dict mapping injection point names to XML fragment strings to inject into the MuJoCo model’s XML. Supported keys are “default”, “asset”, “visual”, “worldbody”, and “body”. Setting this to None injects no extra XML. The default is None. The argument is checked to be a dict (or None) whose keys are supported injection points and whose values are strings; the XML fragments themselves are not validated, which is left to MuJoCo, so this is an advanced-user parameter. Any file a fragment references (such as a mesh) must be supplied through mujoco_assets, and construction raises a ValueError if a fragment references an on-disk path instead.
mujoco_assets – A dict mapping virtual filenames to their binary contents for the MuJoCo model. Setting this to None provides no extra assets. The default is None. Each key must be a bare filename with a nonempty extension (for example “body.stl”), with no path separators or drive prefixes, because MuJoCo selects its asset decoder from the extension and machine-specific paths must stay out of saved files. Supply a file by reading its bytes (for example Path(“body.stl”).read_bytes()) under the virtual filename that the extra_xml fragments reference. Whether a referenced asset is actually supplied is left to MuJoCo, so this is an advanced-user parameter. The assets are serialized into saved files, so a FreeFlightUnsteadyProblem built with mujoco_assets saves and loads without touching the filesystem.
- Returns:
None
- initialize_next_problem(
- solver: pterasoftware._coupled_unsteady_ring_vortex_lattice_method.CoupledUnsteadyRingVortexLatticeMethodSolver,
- step: int,
Initializes the next time step’s SteadyProblem from rigid body dynamics.
On every step except the last one, advances the MuJoCo dynamics and creates the next SteadyProblem with the new OperatingPoint and the prescribed Airplane geometry for the next step. During the prescribed phase, the loads are withheld so the body coasts at its initial trimmed condition while the wake develops, and the body advances once. During the free flight phase (once the step index reaches the movement’s prescribed_num_steps), the aerodynamic loads and the rigid body state are driven to mutual consistency by the strongly coupled sub- iteration before the next step is committed.
- Parameters:
solver – The CoupledUnsteadyRingVortexLatticeMethodSolver instance providing aerodynamic data from the current time step.
step – The current time step index (zero indexed).
- Returns:
None
- get_steady_problem(
- step: int,
Get the SteadyProblem at a given time step.
- Parameters:
step – The time step index (zero indexed). Must be greater than or equal to zero and less than the total number of time steps.
- Returns:
The SteadyProblem at the specified time step.
- 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 finalSideForces_W: list[float]¶
The final side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalForces_W entry’s y component.
- Returns:
The final side forces in Newtons, one entry per Airplane. Empty if finalForces_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 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 finalSideForceCoefficients_W: list[float]¶
The final side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalForceCoefficients_W entry’s y component.
- Returns:
The final side force coefficients, one entry per Airplane. Empty if finalForceCoefficients_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 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 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 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.
- 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 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 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 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 finalMeanSideForces_W: list[float]¶
The final cycle averaged side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForces_W entry’s y component.
- Returns:
The final cycle averaged side forces in Newtons, one entry per Airplane. Empty if finalMeanForces_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 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 finalMeanSideForceCoefficients_W: list[float]¶
The final cycle averaged side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForceCoefficients_W entry’s y component.
- Returns:
The final cycle averaged side force coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_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 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 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 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 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 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 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.
- class pterasoftware.problems.AeroelasticUnsteadyProblem(
- movement: pterasoftware.movements.aeroelastic_movement.AeroelasticMovement,
- wing_density: float,
- spring_constant_rad: float,
- damping_constant_rad: float,
- step_discards: int = 5,
Bases:
_CoupledUnsteadyProblemA subclass of _CoupledUnsteadyProblem used to couple aeroelastic wing deformations with unsteady aerodynamics.
This class couples aerodynamic loads with wing structural dynamics (spring-mass- damper system) to simulate aeroelastic deformation. Each time step, wing deformations are calculated based on the combined effects of each strip’s aerodynamic, inertial, and spring-damper restoring torsional moments, all taken as y components (in the first Airplane’s geometry axes) of moments relative to the strip’s leading edge point.
Contains the following methods:
only_final_results: Determines whether the solver will only calculate loads for the final time step or final cycle.
num_steps: The number of time steps.
delta_time: The time step size in seconds.
first_averaging_step: The first time step included in cycle averaging.
first_results_step: The first time step for which loads are calculated.
max_wake_rows: The maximum chordwise wake rows per Wing.
movement: The AeroelasticMovement that defines the motion parameters for this AeroelasticUnsteadyProblem.
steady_problems: A tuple of SteadyProblems, one for each time step that has been initialized so far.
get_steady_problem: Gets the SteadyProblem at a specified time step.
initialize_next_problem: Initializes the next time step’s SteadyProblem from the deformed geometry.
wing_density: The mass per unit span area of the wing (kg/m^2).
spring_constant_rad: The torsional spring stiffness for the spring-mass-damper model (N*m/rad).
damping_constant_rad: The torsional damping coefficient (N*m*s/rad).
step_discards: The number of initial time steps to discard for numerical stability.
Notes:
The aeroelastic coupling assumes a torsional spring-mass-damper model for each spanwise section. Wing motion is prescribed through wing flapping, and each strip’s aerodynamic moment y components (in the first Airplane’s geometry axes, relative to the strip’s leading edge point) are combined with its inertial and spring restoring moments about the same axis and point via ODE integration to produce structural deformations.
Sets up the aeroelastic problem with structural parameters for the torsional spring-mass-damper model applied to each wing spanwise section. Initializes the per-wing structural state time series.
See _CoupledUnsteadyProblem’s initialization method for descriptions of inherited parameters.
- Parameters:
movement – An AeroelasticMovement containing the prescribed motion and aerodynamic setup for the aeroelastic simulation.
wing_density – The mass per unit span area of the wing (kg/m^2). Used to distribute wing mass across Panels for inertial calculations.
spring_constant_rad – The torsional spring stiffness for the spring-mass- damper model (N*m/rad). Controls the restoring moment opposing deformation.
damping_constant_rad – The torsional damping coefficient (N*m*s/rad). Controls the viscous damping in the spring-mass-damper system.
step_discards – The number of initial time steps to discard for numerical stability (there are inconsistent startup effects from the UVLM solver). During these time steps, the solver will run but the results will not be applied to the deformation of the Wings. The default is 5.
- Returns:
None
- initialize_next_problem(
- solver: pterasoftware._coupled_unsteady_ring_vortex_lattice_method.CoupledUnsteadyRingVortexLatticeMethodSolver,
- step: int,
Initialize the next time step’s SteadyProblem and perform per step work.
Subclasses must override this method. It is invoked by the solver on every step, so subclasses are responsible for guarding any work that depends on a next step existing (such as building the next SteadyProblem) with
step < self.num_steps - 1. Per step work that should run on every step (such as recording the current step’s loads) belongs outside that guard.- Parameters:
solver – The CoupledUnsteadyRingVortexLatticeMethodSolver instance providing aerodynamic data from the current time step.
step – The current time step index (zero indexed).
- Returns:
None
- Raises:
NotImplementedError – Always. Subclasses must override this method.
- get_steady_problem(
- step: int,
Get the SteadyProblem at a given time step.
- Parameters:
step – The time step index (zero indexed). Must be greater than or equal to zero and less than the total number of time steps.
- Returns:
The SteadyProblem at the specified time step.
- 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 finalSideForces_W: list[float]¶
The final side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalForces_W entry’s y component.
- Returns:
The final side forces in Newtons, one entry per Airplane. Empty if finalForces_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 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 finalSideForceCoefficients_W: list[float]¶
The final side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalForceCoefficients_W entry’s y component.
- Returns:
The final side force coefficients, one entry per Airplane. Empty if finalForceCoefficients_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 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 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 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.
- 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 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 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 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 finalMeanSideForces_W: list[float]¶
The final cycle averaged side force experienced by each Airplane (in wind axes).
Side force points along the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForces_W entry’s y component.
- Returns:
The final cycle averaged side forces in Newtons, one entry per Airplane. Empty if finalMeanForces_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 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 finalMeanSideForceCoefficients_W: list[float]¶
The final cycle averaged side force coefficient experienced by each Airplane (in wind axes).
Side force coefficient corresponds to the wind axes’ +y basis direction, so each entry equals the corresponding finalMeanForceCoefficients_W entry’s y component.
- Returns:
The final cycle averaged side force coefficients, one entry per Airplane. Empty if finalMeanForceCoefficients_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 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 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 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 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 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 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.