optimus.postprocess.plot
Module Contents
Functions
|
2D contour plotting of the real part and the magnitude of the pressure field. |
|
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, file_name=None)
2D contour plotting of the real part and the magnitude of the pressure field.
- Parameters
- postprocess_objoptimus.postprocess.PostProcess
Optimus postprocess object that includes the visualisation pressure fields
- fieldstring
The pressure field to be plotted. The options are:
total, total_field, or total_pressure;
scattered, scattered_pressure, or scattered_field.
incident, incident_pressure, or incident_field.
- unitstring
The pressure unit for the plot, where the data is assumed to be in Pa. The 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.
- file_nameNone, str
The file name to export the figure, if specified. The labels ‘real’ and ‘abs’ are prepended.
- 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, file_name=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.
- file_nameNone, str
The file name to export the figure, if specified.
- Returns
- figmatplotlib.Figure
A Matplotlib figure.
- optimus.postprocess.plot._set_pressure_plane(plane_axes)
- optimus.postprocess.plot._convert_pressure_unit(pressure_unit)