pterasoftware.output¶
Contains functions for visualizing geometry and results.
Functions¶
Draws a solver’s Airplane(s). |
|
Animates an UnsteadyRingVortexLatticeMethodSolver’s Airplane(s). |
|
Plots an UnsteadyRingVortexLatticeMethodSolver’s loads and load coefficients 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).
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.
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 RingVortices. 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 an UnsteadyRingVortexLatticeMethodSolver’s Airplane(s).
- Parameters:
unsteady_solver – The UnsteadyRingVortexLatticeMethodSolver whose Airplane(s) will be animated.
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 RingVortices. 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 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 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 an UnsteadyRingVortexLatticeMethodSolver’s loads and load coefficients as a function of time.
- Parameters:
unsteady_solver – The UnsteadyRingVortexLatticeMethodSolver whose loads and load coefficients will be plotted.
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.
- Returns:
None