pterasoftware.movements.aeroelastic_wing_cross_section_movement

Contains the AeroelasticWingCrossSectionMovement class.

Classes

AeroelasticWingCrossSectionMovement

A class used to contain a WingCrossSection’s movement in an aeroelastic simulation.

Module Contents

class pterasoftware.movements.aeroelastic_wing_cross_section_movement.AeroelasticWingCrossSectionMovement(base_wing_cross_section: pterasoftware.geometry.wing_cross_section.WingCrossSection, ampLp_Wcsp_Lpp: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0), periodLp_Wcsp_Lpp: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0), spacingLp_Wcsp_Lpp: numpy.ndarray | collections.abc.Sequence[str | collections.abc.Callable[[float], float]] = ('sine', 'sine', 'sine'), phaseLp_Wcsp_Lpp: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0), ampAngles_Wcsp_to_Wcs_ixyz: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0), periodAngles_Wcsp_to_Wcs_ixyz: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0), spacingAngles_Wcsp_to_Wcs_ixyz: numpy.ndarray | collections.abc.Sequence[str | collections.abc.Callable[[float], float]] = ('sine', 'sine', 'sine'), phaseAngles_Wcsp_to_Wcs_ixyz: numpy.ndarray | collections.abc.Sequence[float | int] = (0.0, 0.0, 0.0))[source]

A class used to contain a WingCrossSection’s movement in an aeroelastic simulation.

In aeroelastic simulations, wing cross section geometry is prescribed via oscillation parameters (the same oscillation based generation as WingCrossSectionMovement), but the solver adds structural deformation angles at each time step. This class overrides generate_wing_cross_section_at_time_step to accept an optional deformation that is added to the prescribed angles_Wcsp_to_Wcs_ixyz.

Contains the following methods:

__deepcopy__: Creates a deep copy of this AeroelasticWingCrossSectionMovement.

all_periods: All unique non zero periods from this AeroelasticWingCrossSectionMovement.

max_period: AeroelasticWingCrossSectionMovement’s longest period of motion.

generate_wing_cross_section_at_time_step: Creates the WingCrossSection at a single time step, optionally applying structural deformation.

generate_wing_cross_sections: Creates the WingCrossSection at each time step, and returns them in a list.

Parameters:
  • base_wing_cross_section – The base WingCrossSection from which the WingCrossSection at each time step will be created.

  • ampLp_Wcsp_Lpp – An array-like object of non negative numbers (int or float) with shape (3,) representing the amplitudes of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ Lp_Wcsp_Lpp parameters. Can be a tuple, list, or ndarray. Values are converted to floats internally. Each amplitude must be low enough that it doesn’t drive its base value out of the range of valid values. Otherwise, this AeroelasticWingCrossSectionMovement will try to create WingCrossSections with invalid parameter values. The units are in meters. The default is (0.0, 0.0, 0.0).

  • periodLp_Wcsp_Lpp – An array-like object of non negative numbers (int or float) with shape (3,) representing the periods of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ Lp_Wcsp_Lpp parameters. Can be a tuple, list, or ndarray. Values are converted to floats internally. Each element must be 0.0 if the corresponding element in ampLp_Wcsp_Lpp is 0.0 and non zero if not. The units are in seconds. The default is (0.0, 0.0, 0.0).

  • spacingLp_Wcsp_Lpp – An array-like object of strs or callables with shape (3,) representing the spacing of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ Lp_Wcsp_Lpp parameters. Can be a tuple, list, or ndarray. Each element can be the str “sine”, the str “uniform”, or a callable custom spacing function. Custom spacing functions are for advanced users and must start at 0.0, return to 0.0 after one period of 2.0 * pi radians, have amplitude of 1.0, be periodic, return finite values only, and accept a float as input and return a float. Custom functions are scaled by ampLp_Wcsp_Lpp, shifted horizontally and vertically by phaseLp_Wcsp_Lpp and the base value, and have a period set by periodLp_Wcsp_Lpp. The default is (“sine”, “sine”, “sine”).

  • phaseLp_Wcsp_Lpp – An array-like object of numbers (int or float) with shape (3,) representing the phase offsets of the elements in the first time step’s WingCrossSection’s Lp_Wcsp_Lpp parameter relative to the base WingCrossSection’s Lp_Wcsp_Lpp parameter. Can be a tuple, list, or ndarray. Elements must lie in the range (-180.0, 180.0]. Each element must be 0.0 if the corresponding element in ampLp_Wcsp_Lpp is 0.0 and non zero if not. Values are converted to floats internally. The units are in degrees. The default is (0.0, 0.0, 0.0).

  • ampAngles_Wcsp_to_Wcs_ixyz – An array-like object of non negative numbers (int or float) with shape (3,) representing the amplitudes of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ angles_Wcsp_to_Wcs_ixyz parameters. Can be a tuple, list, or ndarray. Values are converted to floats internally. Each amplitude must be low enough that it doesn’t drive its base value out of the range of valid values. Otherwise, this AeroelasticWingCrossSectionMovement will try to create WingCrossSections with invalid parameter values. The units are in degrees. The default is (0.0, 0.0, 0.0).

  • periodAngles_Wcsp_to_Wcs_ixyz – An array-like object of non negative numbers (int or float) with shape (3,) representing the periods of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ angles_Wcsp_to_Wcs_ixyz parameters. Can be a tuple, list, or ndarray. Values are converted to floats internally. Each element must be 0.0 if the corresponding element in ampAngles_Wcsp_to_Wcs_ixyz is 0.0 and non zero if not. The units are in seconds. The default is (0.0, 0.0, 0.0).

  • spacingAngles_Wcsp_to_Wcs_ixyz – An array-like object of strs or callables with shape (3,) representing the spacing of the AeroelasticWingCrossSectionMovement’s changes in its WingCrossSections’ angles_Wcsp_to_Wcs_ixyz parameters. Can be a tuple, list, or ndarray. Each element can be the str “sine”, the str “uniform”, or a callable custom spacing function. Custom spacing functions are for advanced users and must start at 0.0, return to 0.0 after one period of 2.0 * pi radians, have amplitude of 1.0, be periodic, return finite values only, and accept a float as input and return a float. Custom functions are scaled by ampAngles_Wcsp_to_Wcs_ixyz, shifted horizontally and vertically by phaseAngles_Wcsp_to_Wcs_ixyz and the base value, and have a period set by periodAngles_Wcsp_to_Wcs_ixyz. The default is (“sine”, “sine”, “sine”).

  • phaseAngles_Wcsp_to_Wcs_ixyz – An array-like object of numbers (int or float) with shape (3,) representing the phase offsets of the elements in the first time step’s WingCrossSection’s angles_Wcsp_to_Wcs_ixyz parameter relative to the base WingCrossSection’s angles_Wcsp_to_Wcs_ixyz parameter. Can be a tuple, list, or ndarray. Elements must lie in the range (-180.0, 180.0]. Each element must be 0.0 if the corresponding element in ampAngles_Wcsp_to_Wcs_ixyz is 0.0 and non zero if not. Values are converted to floats internally. The units are in degrees. The default is (0.0, 0.0, 0.0).

Returns:

None

generate_wing_cross_section_at_time_step(step: int, delta_time: float | int, deformation_angles_ixyz: numpy.ndarray | None = None) pterasoftware.geometry.wing_cross_section.WingCrossSection[source]

Creates the WingCrossSection at a single time step, optionally applying structural deformation.

Computes the prescribed WingCrossSection using the inherited oscillation logic, then adds the deformation angles to the prescribed angles_Wcsp_to_Wcs_ixyz. This is the integration point where the aeroelastic solver’s structural response modifies the wing cross section geometry.

Parameters:
  • step – The time step index. Must be a non negative int.

  • delta_time – The time between each time step in seconds. Must be a positive number (int or float).

  • deformation_angles_ixyz – A (3,) ndarray of floats representing the structural deformation angles to add to the prescribed angles_Wcsp_to_Wcs_ixyz, using an intrinsic xy’z” sequence. The units are in degrees. When None, no deformation is applied and the result is identical to the prescribed WingCrossSection. The default is None.

Returns:

The WingCrossSection at this time step, with structural deformation applied if provided.

property all_periods: tuple[float, Ellipsis]

All unique non zero periods of this WingCrossSection’s motion.

Returns:

A tuple of all unique non zero periods in seconds. If the motion is static, this will be an empty tuple.

property max_period: float

The longest period of this WingCrossSection’s motion.

Returns:

The longest period in seconds. If the motion is static, this will be 0.0.

generate_wing_cross_sections(num_steps: int, delta_time: float | int) list[pterasoftware.geometry.wing_cross_section.WingCrossSection]

Creates the WingCrossSection at each time step, and returns them in a list.

Parameters:
  • num_steps – The number of time steps in this movement. It must be a positive int.

  • delta_time – The time between each time step. It must be a positive number (int or float), and will be converted internally to a float. The units are in seconds.

Returns:

The list of WingCrossSections associated with this CoreWingCrossSectionMovement.