optimus.postprocess.method

Module Contents

Classes

VisualisePlane

VisualiseCloudPoints

VisualisePlaneAndBoundary

class optimus.postprocess.method.VisualisePlane(model, verbose=False)

Bases: optimus.postprocess.common.PostProcess

create_computational_grid(resolution=(141, 141), plane_axes=(0, 1), plane_offset=0.0, bounding_box=None)

Create a planar grid to compute the pressure fields.

Parameters
resolutionlist[int], tuple[int]

Number of points along the two axes.

plane_axeslist[int], tuple[int]

The indices of the axes for the visualisation plane. Possible values are 0,1,2 denoting the x,y,z axes, respectively. Default: (0, 1).

plane_offsetfloat

Offset of the visualisation plane defined along the third axis. Default: 0.

bounding_boxlist[float], tuple[float]

Bounding box specifying the visualisation section along the plane’s axes: [axis1_min, axis1_max, axis2_min, axis2_max]

compute_fields()

Calculate the scattered and total pressure fields in the planar grid.

class optimus.postprocess.method.VisualiseCloudPoints(model, verbose=False)

Bases: optimus.postprocess.common.PostProcess

create_computational_grid(points)

Create a point cloud to compute the pressure fields.

Parameters
points: numpy.ndarray

Array of size (3,N) with points on which to calculate the pressure field.

compute_fields()

Calculate the scattered and total pressure fields in the postprocess grid.

class optimus.postprocess.method.VisualisePlaneAndBoundary(model, verbose=False)

Bases: optimus.postprocess.common.PostProcess

create_computational_grid(resolution=(141, 141), plane_axes=(0, 1), plane_offset=0.0, bounding_box=None)

Create a planar grid to compute the pressure fields.

Parameters
resolutionlist[int], tuple[int]

Number of points along the two axes.

plane_axeslist[int], tuple[int]

The indices of the axes for the visualisation plane. Possible values are 0,1,2 denoting the x,y,z axes, respectively. Default: (0, 1).

plane_offsetfloat

Offset of the visualisation plane defined along the third axis. Default: 0.

bounding_boxlist[float], tuple[float]

Bounding box specifying the visualisation section along the plane’s axes: [axis1_min, axis1_max, axis2_min, axis2_max]

compute_fields(file_name='planar_and_surface')

Calculate the scattered and total pressure fields in the planar grid created. Export the field values to gmsh files.

Parameters
file_namestr

The name for the output file. The results are saved as GMSH files. GMSH should be used for visualisation.