optimus.postprocess.plot
Module Contents
Functions
|
2D contour plotting of pressure fields of an optimus post process object. |
|
2D surface plotting of a mesh grid quantity. |
|
|
|
- optimus.postprocess.plot.plot_pressure_field(postprocess_obj, field='total', unit='Pa', display_edges=True, clim=None)
2D contour plotting of pressure fields of an optimus post process object.
- Parameters
- postprocess_objoptimus.postprocess.PostProcess
Optimus postprocess object that includes the visualisation pressure fields
- fieldstring
The pressure field to be plotted. The options are: 1. total, total_field, or total_pressure; 2. scattered, scattered_pressure, or scattered_field. 3. incident, incident_pressure, or incident_field.
- unitstring
Pressure unit. the pressure fields are scaled accordingly - options are: Pa, kPa, MPa and GPa.
- display_edgesboolean
Display domains edges, i.e. domains and plane interfaces.
- climtuple (float, int)
The color limits: (clim_min, clim_max). Must be of the same units as pressure fields.
- Returns
- fig_p_real, fig_p_totmatplotlib.Figure
Contour plots of the real and absolute value of the pressure field.
- optimus.postprocess.plot.surface_plot(quantity, axes_lims, axes_labels, colormap, colormap_lims, colorbar_unit, domains_edges=None)
2D surface plotting of a mesh grid quantity.
- Parameters
- quantitynp.ndarray
the quantity to be plotted
- axes_limslist float, tuple float
List of minima and maxima of h-axis and v-axis of the 2D contour plot, in the form of (h_axis_min, h_axis_max, v_axis_min, v_axis_max).
- axes_labelslist str, tuple str
the labels for h-axis and v-axis of the plot.
- colormapstring
the name of colormap. all the matplotlib colormaps are supported.
- colormap_limslist float, tuple float
The limit values of the colormap.
- colorbar_unitstring
the label for colorbar
- domains_edgesNone, list numpy.ndarray
if the intersection points of the domains and the visualisation plane is passed as a list, they are overlaid to the field plot.
- Returns
- figmatplotlib.Figure
A Matplotlib figure.
- optimus.postprocess.plot._set_pressure_plane(plane_axes)
- optimus.postprocess.plot._convert_pressure_unit(pressure_unit)