Calculations/Dipolar-Gas-Simulator/+VariationalSolver2D/@DipolarGas/setupWavefunction.m

20 lines
566 B
Mathematica
Raw Permalink Normal View History

function [psi] = setupWavefunction(~,Params,Transf)
2024-11-22 00:04:27 +01:00
format long
X = Transf.X;
Y = Transf.Y;
ellx = sqrt(Params.hbar/(Params.m*Params.wx))/Params.l0;
2024-11-18 18:06:14 +01:00
elly = sqrt(Params.hbar/(Params.m*Params.wy))/Params.l0;
Rx = 8*sqrt(2)*ellx;
Ry = 8*sqrt(2)*elly;
X0 = 0.0*Transf.Xmax;
Y0 = 0.0*Transf.Ymax;
2024-11-18 18:06:14 +01:00
psi = exp(-(X-X0).^2/Rx^2-(Y-Y0).^2/Ry^2);
Norm = sum(abs(psi(:)).^2)*Transf.dx*Transf.dy;
2024-11-18 18:06:14 +01:00
psi = sqrt(Params.N)*psi/sqrt(Norm);
end