This package provides methods to calculate energy spectra of compressible quantum fluids described by a wavefunction, including dilute-gas Bose-Einstein condensates, polariton BEC, and quantum fluids of light.
Fast, accurate, and flexible spectral analysis provides a wealth of information about nonlinear quantum fluid dynamics.
We rely on Fourier spectral methods throughout. The user provides a wavefunction and minimal information about the spatial domain.
julia> ]add QuantumFluidSpectraThe setup is described below.
Create Field
# Create arrays including `x` and `k` grids
n = 100
L = (1,1)
N = (n,n)
X,K,dX,dK = xk_arrays(L,N) # setup domain# make a test field
ktest = K[1][2] # pick one of the `k` values
ψ = @. exp(im*ktest*X[1]*one.(X[2]'))
psi = Psi(ψ,X,K) # make field object with required arrays.Power spectra and correlations
To evaluate the incompressible power spectral density on a particular k grid:k = LinRange(0.05,10,300) # can be anything
εki = incompressible_spectrum(k,psi)The (angle-averaged) two-point correlator of the incompressible velocity field may then be calculated by
r = LinRange(0,10,300) # can be anything
gi = gv(r,k,εki) # pass k vals on which εki is definedSee the citation below for details.
Radial k grids for transfer and flux
Angle-integrated spectra in this package are evaluated on a user-chosen radial k grid, independent of the Cartesian FFT grid. For transfer or flux diagnostics, a dense uniform radial grid is often helpful:
k = radial_kgrid(psi, 4000)
T = gpe_particle_transfer(k, psi; g=1.0)
Π = gpe_particle_flux(k, psi; g=1.0)This is especially useful for conservation checks, since the radial quadrature can be refined without changing the underlying field data.
For creation script, see /example_figure/test_2Dtrap_vortex.jl.
to reproduce Figure 3(a) of https://arxiv.org/abs/2112.04012.
For a direct-flux diagnostic example that compares trapped Gaussian states across domain sizes and saves a plot of Π(k), see /example_figure/gpe_flux_gaussian_diagnostic.jl.
If you use QuantumFluidSpectra.jl please cite the paper
@article{PhysRevA.106.043322,
title = {Spectral analysis for compressible quantum fluids},
author = {Bradley, Ashton S. and Kumar, R. Kishor and Pal, Sukla and Yu, Xiaoquan},
journal = {Phys. Rev. A},
volume = {106},
issue = {4},
pages = {043322},
numpages = {15},
year = {2022},
month = {Oct},
publisher = {American Physical Society},
doi = {10.1103/PhysRevA.106.043322},
url = {https://link.aps.org/doi/10.1103/PhysRevA.106.043322}
}