pterasoftware.movements.free_flight_movement¶
Contains the FreeFlightMovement class.
Classes¶
A class used to contain a FreeFlightUnsteadyProblem’s movement. |
Module Contents¶
- class pterasoftware.movements.free_flight_movement.FreeFlightMovement(airplane_movements: list[pterasoftware.movements.free_flight_airplane_movement.FreeFlightAirplaneMovement], operating_point_movement: pterasoftware.movements.free_flight_operating_point_movement.FreeFlightOperatingPointMovement, delta_time: float | int, prescribed_num_steps: int, free_num_steps: int, max_wake_rows: int | None = None)[source]¶
A class used to contain a FreeFlightUnsteadyProblem’s movement.
In free flight, airplane geometry is prescribed (flapping, CG oscillation, etc.) but OperatingPoints are dynamically determined by the solver as it integrates rigid body dynamics at each time step. FreeFlightMovement pre generates all Airplanes upfront and provides a FreeFlightOperatingPointMovement whose mutable operating_points list the solver populates during simulation.
The simulation is divided into two phases. During the prescribed phase, the solver uses the operating conditions from the initial OperatingPoint. During the free flight phase, the solver integrates rigid body dynamics using MuJoCo and creates new OperatingPoints from the resulting state at each time step.
Contains the following methods:
lcm_period: The least common multiple of all motion periods, ensuring all motions complete an integer number of cycles when cycle averaging forces and moments.
max_period: The longest period of motion of FreeFlightMovement’s sub movement objects, the motion(s) of its sub sub movement object(s), and the motions of its sub sub sub movement objects.
min_period: The shortest non zero period of motion of FreeFlightMovement’s sub movement objects, the motion(s) of its sub sub movement object(s), and the motions of its sub sub sub movement objects.
static: Flags if FreeFlightMovement’s sub movement objects, its sub sub movement object(s), and its sub sub sub movement objects all represent no motion.
This method checks that all Wings maintain their symmetry type across all time steps. See the WingMovement class documentation for more details on this requirement. See the Wing class documentation for more information on symmetry types.
- Parameters:
airplane_movements – A list of the FreeFlightAirplaneMovements associated with each of the FreeFlightUnsteadyProblem’s Airplanes.
operating_point_movement – A FreeFlightOperatingPointMovement holding the initial OperatingPoint. The solver populates its mutable operating_points list during simulation.
delta_time – The time, in seconds, between each time step. It must be a positive number (int or float). It will be converted internally to a float.
prescribed_num_steps – The number of prescribed flight time steps to simulate before the free flight time steps. It must be a positive int.
free_num_steps – The number of free flight time steps to simulate after the prescribed time steps. It must be a positive int.
max_wake_rows – The maximum number of chordwise wake ring vortex rows per Wing. Must be a positive int if set. The default is None (no truncation).
- Returns:
None
- property lcm_period: float¶
The least common multiple of all motion periods, ensuring all motions complete an integer number of cycles when cycle averaging forces and moments.
Using the LCM ensures that when cycle averaging forces and moments, we capture a complete cycle of all motions, not just the longest one. For example, if one motion has a period of 2.0 s and another has a period of 3.0 s, the LCM is 6.0, which contains exactly 3 cycles of the first motion and 2 cycles of the second.
- Returns:
The LCM period in seconds. If all the motion is static, this will be 0.0.
- property max_period: float¶
The longest period of motion across each Airplane’s movement class, each Wing’s movement class, each WingCrossSection’s movement class, and the OperatingPoint’s movement class.
For cycle averaging calculations, lcm_period should be used instead of max_period to ensure all motions complete an integer number of cycles.
- Returns:
The longest period in seconds. If all the motion is static, this will be 0.0.
- property min_period: float¶
The shortest non zero period of motion across each Airplane’s movement class, each Wing’s movement class, each WingCrossSection’s movement class, and the OperatingPoint’s movement class.
- Returns:
The shortest non zero period in seconds. If all the motion is static, this will be 0.0.