Spectrum solver for 2D Helmholtz quantum billiard problems with Dirichlet boundary conditions. Implements a Nyström-based Boundary Element Method (BEM) to construct boundary data, assemble boundary integral operators, and scan wavenumbers to approximate resonant modes. Includes wavefunction visualisation and spectral analysis tools.
This is a refined version of code originally developed for my master's project (text found in rsc/docs/). It's still a good companion to this repo as the methods are identical, and it provides a comprehensive introduction to the theory involved.
Quantum billiards describe particles confined in a 2D region with perfectly reflecting walls. The dynamics of these systems are described by the Helmholtz equation under Dirichlet boundary conditions
This equation gives rise to resonant eigenfrequencies
where
is the 2D free-space Green’s function. This equation is approximated to a matrix equation of the form
- ✅ Boundary element discretisation of the 2D Helmholtz equation
- ✅ Multithreaded BEM matrix assembly
- ✅ Optimised Kernel function via Hankel function tabulation
- ✅ Iterative hot-loop Krylov method for fast resonance scanning via singular value analysis
- ✅ Visualisation of wavefunctions inside the billiard
- ✅ Spectrum unfolding using Weyl’s law
- ✅ Spacing distribution and spectral statistics analysis
- ✅ Support for circle, square, rectangle, cardioid, and Bunimovitch stadium geometries
- BEM/
- Mesh/ -- boundary and mesh data construction
- Kernel.jl -- kernel function
- Matrix.jl -- matrix operator constuction
- Resonances.jl -- resonant mode detection
- Solver. jl -- boundary data and wavefunction solver
- Optimisations/
- Hankel.jl -- Hankel function tabulation
- SingularValues.jl -- Krylov iteration-based min svg finder
- Spectral/
- Weyl.jl -- spectrum unfolding and counting function
- WignerDyson.jl -- level spacing statistics
- Visualisation/
- BilliardVis.jl -- stationary solutions
- SpacingVis.jl -- level spacing statistics
- WeylComp.jl -- comparison to weyl prediction
- BoundaryVis.jl -- boundary data
This package can be installed from Github using the the command:
using Pkg
Pkg.add(url="https://github.com/MatthewScargill/QuantumBilliards.jl")using QuantumBilliards
# Set the number of boundary discretization points
N = 700
# Extract nodes, normals, weights, and billiard geometry data using a _info function
xs, ns, w, geom_data = QuantumBilliards.cardioid_info(N)
# Find resonant modes between 1 and 15, evaluated at 2000 interim points
spectrum = QuantumBilliards.resonant_modes(1.0, 15.0, 2000, xs, ns, w)
# Isolate a resonant mode and produce the associated bound state solution on the billiard
test_res = spectrum[7] # picking the seventh mode
QuantumBilliards.plot_billiard(xs, ns, w, test_res)(a markdown document showing a complete example workflow as well as an optimisation history for the project can be found in rsc/docs/)
Questions, extensions, and research discussions are welcome.