optimus.source.bowl

Bowl sources.

Module Contents

Classes

_Bowl

Functions

create_bowl(frequency, outer_radius, radius_of_curvature)

Create a spherical section bowl source.

optimus.source.bowl.create_bowl(frequency, outer_radius, radius_of_curvature, source_axis=(1, 0, 0), number_of_point_sources_per_wavelength=6, location=(0, 0, 0), velocity=1.0, inner_radius=None)

Create a spherical section bowl source.

Parameters
frequencyfloat

The frequency of the acoustic field.

outer_radiusfloat

The outer radius of the spherical section bowl.

radius_of_curvaturefloat

The radius of curvature of the bowl.

source_axistuple float

The axis of the bowl. Default: positive x direction

number_of_point_sources_per_wavelengthinteger

The number of point sources per wavelength used to discretise the bowl source. Default: 6

locationtuple float

The location of the centroid of the bowl. Default: global origin

velocitycomplex

Normal velocity of the bowl. Default : 1 m/s

inner_radiusfloat, None

The radius of the bowl aperture. Default: None

class optimus.source.bowl._Bowl(frequency, outer_radius, radius_of_curvature, source_axis, number_of_point_sources_per_wavelength, location, velocity, inner_radius)

Bases: optimus.source.common.Source

pressure_field(medium, locations)

Calculate the pressure field in the specified locations.

Parameters
mediumoptimus.material.Material

The propagating medium.

locationsnumpy.ndarray

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

Returns
pressurenumpy.ndarray

Array of size (N,) with the pressure in the locations.

normal_pressure_gradient(locations, normals, medium)

Calculate the normal gradient of the pressure field in the specified locations.

Parameters
mediumoptimus.material.Material

The propagating medium.

locationsnumpy.ndarray

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

normalsnumpy.ndarray

Array of size (3,N) with the unit normal vectors at the locations on which to evaluate the pressure field.

Returns
gradientnumpy.ndarray

Array of size (3,N) with the normal gradient of the pressure in the locations.

pressure_field_and_normal_gradient(medium, locations, normals)

Calculate the pressure field and the normal gradient of the pressure field in the specified locations.

Parameters
mediumoptimus.material.Material

The propagating medium.

locationsnumpy.ndarray

An array of size (3,N) with the locations on which to evaluate the pressure field.

normalsnumpy.ndarray

An array of size (3,N) with the unit normal vectors at the locations on which to evaluate the pressure field.

Returns
pressurenumpy.ndarray

An array of size (N,) with the pressure in the locations.

gradientnumpy.ndarray

An array of size (3,N) with the normal gradient of the pressure in the locations.

calc_surface_traces(medium, space_dirichlet=None, space_neumann=None, dirichlet_trace=True, neumann_trace=True)

Calculate the surface traces of the source field on the mesh.

Parameters
mediumoptimus.material.Material

The propagating medium.

space_dirichlet, space_neumannbempp.api.FunctionSpace

The discrete spaces on the surface grid.

dirichlet_trace, neumann_tracebool

Calculate the Dirichlet or Neumann trace of the field.

Returns
tracebempp.api.GridFunctions

The surface traces.