The Helmholtz module

Exported functionality:

WavesAndEigenvalues.HelmholtzModule

Module providing functionality to numerically discretize the (thermoacoustic) Helmholtz equation by first, second, and hermitian-order finite elements.

source
WavesAndEigenvalues.Helmholtz.discrete_adjoint_shape_sensitivityMethod
sens=discrete_adjoint_shape_sensitivity(mesh::Mesh,dscrp,C,surface_points,tri_mask,tet_mask,L,sol;h=1E-9,output=true)

Compute shape sensitivity of mesh mesh

#Arguments

  • mesh::Mesh: Mesh
  • ...

#Notes The method is based on a discrete adjoint approach. The derivative of the operator with respect to a point displacement is, however, computed by central finite differences.

source
WavesAndEigenvalues.Helmholtz.discretizeMethod
L=discretize(mesh, dscrp, C; order=:lin, b=:__none__, mass_weighting=true,source=false, output=true)

Discretize the Helmholtz equation using the mesh mesh.

Arguments

  • mesh::Mesh: tetrahedral mesh
  • dscrp::Dict: dictionary containing information on where to apply physical constraints. Such as standard wave propagation, boundary conditions, flame responses, etc.
  • C:Array: array defining the speed of sound. If length(C)==length(mesh.tetrahedra) the speed of sound is constant along one tetrahedron. If length(C)==size(mesh.points,2) the speed of sound is linearly interpolated between the vertices of the mesh.
  • order::Symbol = :lin: optional paramater to select between first (order==:lin the default), second (order==:quad),or hermitian-order (order==:herm) finite elements.
  • b::Symbol=:__none__: optional parameter defining the Bloch wave number. If b=:__none__ (the default) no Blochwave formalism is applied.
  • mass_weighting=true: optional parameter if true mass matrix is used as weighting matrix for householder, otherwise this matrix is not set.
  • source::Bool=false: optional parameter to toggle the return of a source vector (experimental)
  • `output::Bool=false': optional parameter to toggle live progress report.

Returns

  • L::LinearOperatorFamily: parametereized discretization of the specified Helmholtz equation.
  • rhs::LinearOperatorFamily: parameterized discretization of the source vector. Only returned if source==true. (experimental)
source

Private functionality:

WavesAndEigenvalues.Helmholtz.aggregate_elementsFunction
triangles, tetrahedra, dim = aggregate_elements(mesh,el_type)

Agregate lists (triangles and tetrahedra) of lists of indexed degrees of freedom for unstructured tetrahedral meshes. dim is the total number of DoF in the mesh featured by the requested element-type (el_type). Available element types are :lin for first order elements (the default), :quad for second order elements, and :herm for Hermitian elements.

source
WavesAndEigenvalues.Helmholtz.get_n_grad_pFunction
get_n_grad_p(mesh::Mesh,v,point,n,tet_idx::Int=0)

Get directional derivative dp of teh pressure w.r.t. the direction n at point pointin solution vector v. The optional argument tet_idx accelarates finding the tetrahedron enclosing the point.

source
WavesAndEigenvalues.Helmholtz.get_pFunction
p=get_p(mesh,v,point,tet_idx=0)

Get pressure value p at point pointin solution vector v. The optional argument tet_idx accelarates finding the tetrahedron enclosing the point.

source