hermitegauss_groundstate
Graham Dennis
Solve for the groundstate of the Gross-Pitaevskii equation using the hermite-Gauss basis.
const real omegaz = 2*M_PI*20; const real omegarho = 2*M_PI*200; const real hbar = 1.05457148e-34; const real M = 1.409539200000000e-25; const real g = 9.8; const real scatteringLength = 5.57e-9; const real transverseLength = 1e-5; const real Uint = 4.0*M_PI*hbar*hbar*scatteringLength/M/transverseLength/transverseLength; const real Nparticles = 5.0e5;
t
phi
real eta = sqrt(M*omegarho/hbar)*x; phi = sqrt(Nparticles) * pow(M*omegarho/(hbar*M_PI), 0.25) * exp(-0.5*eta*eta);
Ncalc
wavefunction
// Calculate the current normalisation of the wave function. Ncalc = mod2(phi);
100 100
wavefunction normalisation
// Correct normalisation of the wavefunction phi *= sqrt(Nparticles/Ncalc);
L
L = - (nx + 0.5)*omegarho;
wavefunction
dphi_dt = L[phi] - Uint/hbar*mod2(phi)*phi;
normalisation wavefunction
phi *= sqrt(Nparticles/Ncalc);
wavefunction
dens
wavefunction
dens = mod2(phi);
dens
wavefunction
dens = mod2(phi);