pterasoftware.movements.movement¶
Contains the Movement class.
Classes¶
A class used to contain an UnsteadyProblem’s movement. |
Module Contents¶
- class pterasoftware.movements.movement.Movement(airplane_movements: list[pterasoftware.movements.airplane_movement.AirplaneMovement], operating_point_movement: pterasoftware.movements.operating_point_movement.OperatingPointMovement, delta_time: float | int | str | None = None, num_cycles: int | None = None, num_chords: int | None = None, num_steps: int | None = None, max_wake_rows: int | None = None, max_wake_chords: int | None = None, max_wake_cycles: int | None = None)[source]¶
A class used to contain an UnsteadyProblem’s movement.
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 Movement’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 Movement’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 Movement’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 AirplaneMovements associated with each of the UnsteadyProblem’s Airplanes.
operating_point_movement – An OperatingPointMovement characterizing any changes to the UnsteadyProblem’s operating conditions.
delta_time – The time between each time step. Accepts the following: None (default): Movement analytically estimates the delta_time that produces wake ring vortices with roughly the same chord length as the bound trailing edge ring vortices, accounting for both freestream and geometry motion velocities. This provides good results across all Strouhal numbers. “optimize”: Movement first runs the analytical estimation, then uses that result as an initial guess for an iterative optimization that minimizes the area mismatch between wake ring vortices and their parent bound trailing edge ring vortices. This is slower but may produce slightly more accurate results. Positive number (int or float): Use the specified value directly. All values are converted internally to floats. The units are in seconds.
num_cycles – The number of cycles of the maximum period motion used to calculate a num_steps parameter initialized as None if Movement isn’t static. If num_steps is not None or if Movement is static, this must be None. If num_steps is initialized as None and the Movement isn’t static, num_cycles must be a positive int. In that case, I recommend setting num_cycles to 3. The default is None.
num_chords – The number of chord lengths used to calculate a num_steps parameter initialized as None if Movement is static. If num_steps is not None or if Movement isn’t static, this must be None. If num_steps is initialized as None and Movement is static, num_chords must be a positive int. In that case, I recommend setting num_chords to 10. For cases with multiple Airplanes, the num_chords will reference the largest reference chord length. The default is None.
num_steps – The number of time steps of the unsteady simulation. If initialized as None, and Movement isn’t static, Movement will calculate a value for num_steps such that the simulation will cover some number of cycles of the maximum period of all the motion described in Movement’s sub movement objects, sub sub movement object(s), and sub sub sub movement objects. If num_steps is initialized as None, and Movement is static, Movement will calculate a value for num_steps such that the simulation will result in a wake extending back by some number of reference chord lengths.
max_wake_rows – The maximum number of chordwise wake ring vortex rows per Wing. Works for both static and non static Movements. Must be a positive int if set. At most one of max_wake_rows, max_wake_chords, and max_wake_cycles can be non None. The default is None (no truncation).
max_wake_chords – The maximum wake length in chord lengths, converted to max_wake_rows internally. Only valid for static Movements (mirrors num_chords). Must be a positive int if set. The default is None.
max_wake_cycles – The maximum wake length in motion cycles, converted to max_wake_rows internally. Only valid for non static Movements (mirrors num_cycles). Must be a positive int if set. The default is None.
- 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.