The Helmholtz module
Exported functionality:
WavesAndEigenvalues.Helmholtz — ModuleModule providing functionality to numerically discretize the (thermoacoustic) Helmholtz equation by first, second, and hermitian-order finite elements.
WavesAndEigenvalues.Helmholtz.bloch_expand — Functionv=bloch_expand(mesh::Mesh,sol::Solution,b=:b)Expand solution vector sol.v on mesh meshwith Bloch wave number sol.params[b] and return it as v.
WavesAndEigenvalues.Helmholtz.bound_mass_normalize — Methodnsens=bound_mass_normalize(surface_points,normal_vectors,tri_mask,sens)Normalize shape sensitivity with boundary mass matrix.
WavesAndEigenvalues.Helmholtz.discrete_adjoint_shape_sensitivity — Methodsens=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.
WavesAndEigenvalues.Helmholtz.discretize — MethodL=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 meshdscrp::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. Iflength(C)==length(mesh.tetrahedra)the speed of sound is constant along one tetrahedron. Iflength(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==:linthe default), second (order==:quad),or hermitian-order (order==:herm) finite elements.b::Symbol=:__none__: optional parameter defining the Bloch wave number. Ifb=:__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 ifsource==true. (experimental)
WavesAndEigenvalues.Helmholtz.normal_sensitivity — Methodnormal_sensitivity(normal_vectors, normed_sens)Convert surface normalized shapegradient `normedsens` to surface_normal shape sensitivity.
WavesAndEigenvalues.Helmholtz.normalize_sensitivity — Methodnormed_sens=normalize_sensitivity(surface_points,normal_vectors,tri_mask,sens)Normalize shape sensitivity with directed area of adjacent triangles.
Private functionality:
WavesAndEigenvalues.Helmholtz.aggregate_elements — Functiontriangles, 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.
WavesAndEigenvalues.Helmholtz.get_cylindrics — Methodhelper function to get local cylindric basis vectors
WavesAndEigenvalues.Helmholtz.get_n_grad_p — Functionget_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.
WavesAndEigenvalues.Helmholtz.get_p — Functionp=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.