pterasoftware.output¶
Contains functions for visualizing geometry and results.
Functions¶
Draws a solver’s Airplane(s). |
|
Animates the Airplane(s) of an UnsteadyRingVortexLatticeMethodSolver or one of its subclasses (the aeroelastic or free flight solver). |
|
Plots the loads and load coefficients of an UnsteadyRingVortexLatticeMethodSolver or one of its subclasses (the aeroelastic or free flight solver) as a function of time. |
|
Logs a solver’s load and load coefficients. |
Module Contents¶
- pterasoftware.output.draw(solver: pterasoftware.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver | pterasoftware.steady_ring_vortex_lattice_method.SteadyRingVortexLatticeMethodSolver | pterasoftware.unsteady_ring_vortex_lattice_method.UnsteadyRingVortexLatticeMethodSolver, scalar_type: str | None = None, show_streamlines: bool | numpy.bool_ = False, show_wake_vortices: bool | numpy.bool_ = False, save: bool | numpy.bool_ = False, testing: bool | numpy.bool_ = False) None[source]¶
Draws a solver’s Airplane(s).
For a FreeFlightUnsteadyRingVortexLatticeMethodSolver, the final time step’s geometry is rendered in Earth axes at its true position and orientation, so the body’s flight attitude is visible, rather than being drawn body-fixed in geometry axes.
Citation:
Adapted from: vlm3.draw in AeroSandbox
Author: Peter Sharpe
Date of retrieval: 03/28/2020
- Parameters:
solver – The solver whose Airplane(s) will be plotted. This can be a SteadyHorseshoeVortexLatticeMethodSolver, a SteadyRingVortexLatticeMethodSolver, or an UnsteadyRingVortexLatticeMethodSolver. The UnsteadyRingVortexLatticeMethodSolver’s subclasses, the AeroelasticUnsteadyRingVortexLatticeMethodSolver and the FreeFlightUnsteadyRingVortexLatticeMethodSolver, are also accepted.
scalar_type – Determines how to color the Panels. Setting this to None colors the Panels uniformly. If the solver has been run, it can also be “induced drag”, “side force”, or “lift”, which respectively use each Panel’s induced drag, side force, and lift coefficient. The default is None.
show_streamlines – Set this to True to show the streamlines emanating from the back of the Wings. If True, the solver’s streamlines must have already been calculated. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
show_wake_vortices – Set this to True to show any wake ring vortices. If True, the solver must be an UnsteadyRingVortexLatticeMethodSolver and must have already been run. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
save – Set this to True to save the image as a WebP. It can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
testing – Set this to True to close the image after one second, which is useful for running test suites. It can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
- Returns:
None
- pterasoftware.output.animate(unsteady_solver: pterasoftware.unsteady_ring_vortex_lattice_method.UnsteadyRingVortexLatticeMethodSolver, scalar_type: str | None = None, show_wake_vortices: bool | numpy.bool_ = False, save: bool | numpy.bool_ = False, testing: bool | numpy.bool_ = False) None[source]¶
Animates the Airplane(s) of an UnsteadyRingVortexLatticeMethodSolver or one of its subclasses (the aeroelastic or free flight solver).
For a FreeFlightUnsteadyRingVortexLatticeMethodSolver, each time step’s geometry is rendered in Earth axes at its true position and orientation, so the body flies through the scene along its trajectory rather than staying fixed while the wake streams behind it. The camera frames the whole trajectory.
- Parameters:
unsteady_solver – The UnsteadyRingVortexLatticeMethodSolver whose Airplane(s) will be animated. Its subclasses, the AeroelasticUnsteadyRingVortexLatticeMethodSolver and the FreeFlightUnsteadyRingVortexLatticeMethodSolver, are also accepted.
scalar_type – Determines how to color the Panels. Setting this to None colors the Panels uniformly. If the solver has been run, it can also be “induced drag”, “side force”, or “lift”, which respectively use each Panel’s induced drag, side force, and lift coefficient. The default is None.
show_wake_vortices – Set this to True to show any wake ring vortices. If True, the solver must have already been run. Can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
save – Set this to True to save the animation as an animated WebP. It can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
testing – Set this to True to start the animation after one second, which is useful for running test suites. It can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
- Returns:
None
- pterasoftware.output.plot_results_versus_time(unsteady_solver: pterasoftware.unsteady_ring_vortex_lattice_method.UnsteadyRingVortexLatticeMethodSolver, show: bool | numpy.bool_ = True, save: bool | numpy.bool_ = False) None[source]¶
Plots the loads and load coefficients of an UnsteadyRingVortexLatticeMethodSolver or one of its subclasses (the aeroelastic or free flight solver) as a function of time.
- Parameters:
unsteady_solver – The UnsteadyRingVortexLatticeMethodSolver whose loads and load coefficients will be plotted. Its subclasses, the AeroelasticUnsteadyRingVortexLatticeMethodSolver and the FreeFlightUnsteadyRingVortexLatticeMethodSolver, are also accepted.
show – Set this to True to show the plots. It can be a bool or a numpy bool and will be converted internally to a bool. The default is True.
save – Set this to True to save the plots as PNGs. It can be a bool or a numpy bool and will be converted internally to a bool. The default is False.
- Returns:
None
- pterasoftware.output.log_results(solver: pterasoftware.steady_horseshoe_vortex_lattice_method.SteadyHorseshoeVortexLatticeMethodSolver | pterasoftware.steady_ring_vortex_lattice_method.SteadyRingVortexLatticeMethodSolver | pterasoftware.unsteady_ring_vortex_lattice_method.UnsteadyRingVortexLatticeMethodSolver) None[source]¶
Logs a solver’s load and load coefficients.
The logging level must be set to INFO or lower in order to see results. See set_up_logging for details on configuring the logging level.
- Parameters:
solver – The solver whose load and load coefficients will be logged. This can be a SteadyHorseshoeVortexLatticeMethodSolver, a SteadyRingVortexLatticeMethodSolver, or an UnsteadyRingVortexLatticeMethodSolver. The UnsteadyRingVortexLatticeMethodSolver’s subclasses, the AeroelasticUnsteadyRingVortexLatticeMethodSolver and the FreeFlightUnsteadyRingVortexLatticeMethodSolver, are also accepted.
- Returns:
None