optimus.source.planewave
Plane wave sources.
Module Contents
Classes
Functions
|
Create a plane wave source. |
- optimus.source.planewave.create_planewave(frequency, direction=(1, 0, 0), amplitude=1.0)
Create a plane wave source.
- Parameters
- frequencyfloat
The frequency of the acoustic field.
- directionnumpy.ndarray, tuple float, list float
The direction of the plane wave. Default: positive x direction
- amplitudefloat
The amplitude of the plane wave. Default: 1 Pa
- class optimus.source.planewave._PlaneWave(frequency, direction, amplitude)
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
An array of size (3,N) with the locations on which to evaluate the pressure field.
- Returns
- pressurenp.ndarray
An array of size (N,) with the pressure in the locations.
- normal_pressure_gradient(medium, locations, normals)
Calculate 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
- 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.