pterasoftware.free_flight_unsteady_ring_vortex_lattice_method

Contains the FreeFlightUnsteadyRingVortexLatticeMethodSolver class.

Classes

FreeFlightUnsteadyRingVortexLatticeMethodSolver

A subclass of CoupledUnsteadyRingVortexLatticeMethodSolver that solves FreeFlightUnsteadyProblems.

Module Contents

class pterasoftware.free_flight_unsteady_ring_vortex_lattice_method.FreeFlightUnsteadyRingVortexLatticeMethodSolver(free_flight_unsteady_problem: pterasoftware.problems.FreeFlightUnsteadyProblem)[source]

A subclass of CoupledUnsteadyRingVortexLatticeMethodSolver that solves FreeFlightUnsteadyProblems.

In a FreeFlightUnsteadyProblem the body state at each time step comes from the coupled MuJoCo rigid-body dynamics (carried out in FreeFlightUnsteadyProblem’s initialize_next_problem), so each step’s OperatingPoint carries a body angular rate (omegas_BP1__E) that the standard solver assumes is zero. This solver contributes the apparent velocity from that body rate (omega cross r) at every collocation point and bound line vortex leg center by overriding _currentOmegasRad_GP1__E, which the inherited velocity calculations feed through _apply_body_rate.

Key additions over parent CoupledUnsteadyRingVortexLatticeMethodSolver: sets _models_body_rates to True so the inherited constructor permits non-zero body rates, and overrides _currentOmegasRad_GP1__E to supply the current OperatingPoint’s body angular rate (in the first Airplane’s geometry axes, in radians per second).

Parameters:

free_flight_unsteady_problem – The FreeFlightUnsteadyProblem to be solved.

Returns:

None

property steady_problems: tuple[pterasoftware.problems.SteadyProblem, Ellipsis]

The SteadyProblems for this solver’s UnsteadyProblem.

This read-only view always reflects the live state of the underlying UnsteadyProblem. For a standard UnsteadyProblem the tuple is fixed over the solver’s lifetime; for a coupled problem it grows as each step is initialized during the run, so successive reads can return different-length tuples.

Returns:

A tuple of the SteadyProblems, one per initialized time step.

run(prescribed_wake: bool | numpy.bool_ = True, calculate_streamlines: bool | numpy.bool_ = True, show_progress: bool | numpy.bool_ = True) None

Runs the solver on the UnsteadyProblem.

Parameters:
  • prescribed_wake – Set this to True to solve using a prescribed wake model. Set to False to use a free-wake, which may be more accurate but will make the fun method significantly slower. Can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

  • calculate_streamlines – Determines whether to calculate the streamlines emanating from the back of the wing after running the solver. Can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

  • show_progress – Set this to True to show the TQDM progress bar. For showing the progress bar and displaying log statements, set up logging using the setup_logging function. It can be a bool or a numpy bool and will be converted internally to a bool. The default is True.

Returns:

None

initialize_step_geometry(step: int) None

Initializes geometry for a specific step without solving.

Sets up bound ring vortices and wake ring vortices for the specified time step, but does not solve the aerodynamic system. Use this for geometry only analysis like delta_time optimization.

This method must be called sequentially for each step starting from 0, as wake vortices at step N depend on the geometry from step N - 1.

Parameters:

step – The time step to initialize geometry for. It is zero indexed. It must be a non negative int and be less than the total number of steps.

Returns:

None

calculate_solution_velocity(stackP_GP1_CgP1: numpy.ndarray | collections.abc.Sequence[collections.abc.Sequence[float | int]], bound_singularity_counts: numpy.ndarray | None = None, wake_singularity_counts: numpy.ndarray | None = None) numpy.ndarray

Finds the fluid velocity (in the first Airplane’s geometry axes, observed from the Earth frame) at one or more points (in the first Airplane’s geometry axes, relative to the first Airplane’s CG) due to the freestream velocity and the induced velocity from every ring vortex.

When an image surface is defined on the OperatingPoint, the returned velocity also includes the induced velocity from image bound and wake ring vortices reflected across that surface.

Notes:

This method assumes that the correct strengths for the ring vortices have already been calculated and set.

This method also does not include the velocity due to the Movement’s motion at any of the points provided, as it has no way of knowing if any of the points lie on panels.

Parameters:
  • stackP_GP1_CgP1 – An array-like object of numbers (int or float) with shape (N,3) representing the positions of the evaluation points (in the first Airplane’s geometry axes, relative to the first Airplane’s CG). Can be a tuple, list, or ndarray. Values are converted to floats internally. The units are in meters.

  • bound_singularity_counts – An optional (4,) ndarray of int64 for accumulating singularity event counts from bound ring vortices. If None, counts are discarded.

  • wake_singularity_counts – An optional (4,) ndarray of int64 for accumulating singularity event counts from wake ring vortices. If None, counts are discarded.

Returns:

A (N,3) ndarray of floats representing the velocity (in the first Airplane’s geometry axes, observed from the Earth frame) at each evaluation point due to the summed effects of the freestream velocity and the induced velocity from every ring vortex. The units are in meters per second.