pytornado.plot package

Submodules

pytornado.plot.downwash module

Visualisation of the VLM downwash matrix

Developed at Airinnova AB, Stockholm, Sweden.

pytornado.plot.downwash.view_downwash(vlmdata, plt_settings)

Visualise matrix of downwash factors

Args:
vlmdata:(object) data structure for VLM analysis data
plt_settings:general plot settings

pytornado.plot.makeplots module

Main entry point for plotting

Developed at Airinnova AB, Stockholm, Sweden.

pytornado.plot.makeplots.make_all(settings, aircraft, cur_state, vlmdata, lattice)

Evaluate settings and create plots accordingly

Args:
settings:Settings instance
aircraft:Aircraft model
vlm_struct:VLM struct
cur_state:Current state
lattice:Lattice
pytornado.plot.makeplots.plot_geometry_aircraft(aircraft, plot_settings)

Generate 2D and 3D views of full aircraft geometry

Args:
aircraft:(object) data structure for aircraft model
plot_settings:Plot settings
pytornado.plot.makeplots.plot_lattice_aircraft(aircraft, lattice, plot_settings)

Generate 2D and 3D views of the lattice

Args:
aircraft:(object) data structure for aircraft model
plot_settings:Plot settings
pytornado.plot.makeplots.plot_results_aircraft(aircraft, lattice, state, vlmdata, plot_settings)

Generate results plot

Args:
aircraft:(object) data structure for aircraft model
plot_settings:Plot settings

pytornado.plot.plottools module

Plot tools and common plot operations

Developed at Airinnova AB, Stockholm, Sweden.

pytornado.plot.plottools.C

alias of pytornado.plot.plottools._Colors

pytornado.plot.plottools.PS

alias of pytornado.plot.plottools._PlotSettings

pytornado.plot.plottools.add_CG(axes_2d, axes_3d, aircraft)

Add a marker indicating the centre of gravity

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
aircraft:(object) data structure for aircraft model
pytornado.plot.plottools.add_controls(axes_2d, axes_3d, aircraft)

Add control surfaces to axes objects

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
aircraft:(object) data structure for aircraft model
pytornado.plot.plottools.add_deformation_field_points(axes_2d, axes_3d, aircraft)

Plot the deformation field points

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
aircraft:(obj) aircraft
pytornado.plot.plottools.add_freestream_vector(axes_2d, axes_3d, state, tip_pos=array([0, 0, 0]), vector_len=3)

Add a free stream vector

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
state:State model
pytornado.plot.plottools.add_lattice(axes_2d, axes_3d, lattice)

Add the VLM mesh

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
lattice:Lattice object
pytornado.plot.plottools.add_results(axes_2d, axes_3d, figure_3d, vlmdata, lattice, aircraft, key)

Add results

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
figure_3d:Figure object (matplotlib)
vlmdata:(object) data structure for VLM analysis data
lattice:Lattice object
aircraft:Aircraft model
key:Property to plot
pytornado.plot.plottools.add_wings(axes_2d, axes_3d, aircraft)

Add wings (segment vertices) to axes objects

Args:
axes_2d:2D axes object (matplotlib)
axes_3d:3D axes object (matplotlib)
aircraft:(object) data structure for aircraft model
pytornado.plot.plottools.interpolate_quad(a, b, c, d, size)

Bi-linear parametrisation of arbitrarily twisted quadrilateral

Args:
a, b, c, d:(numpy) Coordinates of corner vertices
nr, ns:(int) Number of chord- and span-wise points
Returns:
x, y, z:(numpy) Coordinates of NC x NS interpolated points
pytornado.plot.plottools.plot2d3d(aircraft, plot_name, plot_settings)

Context manager for 2D and 3D plots

Args:
aircraft:Aircraft model
plot_name:Name if file is to be saved
plot_settings:Dictionary with plot settings
Yields:
  • A tuple with (figure_2d, axes_2d, figure_3d, axes_3d)
Note:
  • ‘plot_name’ is used to generate a file name if plot are to be saved. A suffix ‘2D’ or ‘3D’ is added to ‘plot_name’
pytornado.plot.plottools.show_and_save(plot_settings, *figures)

Save and/or show plots

Args:
plot_settings:Plot settings
figures:Tuples with (figure_object, ‘name_of_plot’)

Module contents

The plot package contains the code dedicated to the visualisation of the aircraft geometry, the lattice, and a variety of results from the VLM calculations.