Latest working version.

This commit is contained in:
Karthik 2024-06-22 23:36:13 +02:00
parent 115e0d4c24
commit c0e96006d7
5 changed files with 13 additions and 17 deletions

View File

@ -4,8 +4,6 @@ function visualizeSpace(Transf)
y = Transf.y;
z = Transf.z;
[X,Y] = meshgrid(x,y);
height = 20;
width = 45;
figure(1)
@ -15,12 +13,12 @@ function visualizeSpace(Transf)
set(gcf, 'PaperPositionMode', 'auto')
subplot(1,2,1)
zlin = ones(size(X, 1)) * z(1); % Generate z data
zlin = ones(size(y, 2), size(x, 2)) * z(1); % Generate z data
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
hold on
for idx = 2:length(z)
zlin = ones(size(X, 1))* z(idx); % Generate z data
zlin = ones(size(y, 2), size(x, 2)) * z(idx); % Generate z data
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
end
@ -54,15 +52,13 @@ function visualizeSpace(Transf)
y = Transf.ky;
z = Transf.kz;
[X,Y] = meshgrid(x,y);
subplot(1,2,2)
zlin = ones(size(X, 1)) * z(1); % Generate z data
zlin = ones(size(y, 2), size(x, 2)) * z(1); % Generate z data
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
hold on
for idx = 2:length(z)
zlin = ones(size(X, 1))* z(idx); % Generate z data
zlin = ones(size(y, 2), size(x, 2)) * z(idx); % Generate z data
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
end

View File

@ -9,14 +9,14 @@ OptionsStruct = struct;
OptionsStruct.NumberOfAtoms = 1.24E5;
OptionsStruct.DipolarPolarAngle = 0;
OptionsStruct.DipolarAzimuthAngle = 0;
OptionsStruct.ScatteringLength = 86;
OptionsStruct.ScatteringLength = 90;
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3];
OptionsStruct.TrapDepth = 5;
OptionsStruct.BoxSize = 15;
OptionsStruct.TrapPotentialType = 'Harmonic';
OptionsStruct.NumberOfGridPoints = [32, 64, 32];
OptionsStruct.NumberOfGridPoints = [128, 256, 128];
OptionsStruct.Dimensions = [50, 120, 150];
OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
@ -42,7 +42,7 @@ sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
%% - Plot numerical grid
Plotter.visualizeSpace(Transf)
%% - Plot trap potential
Plotter.visualizeTrapPotential(V,Params,Transf)
Plotter.visualizeTrapPotential(sim.Potential,Params,Transf)
%% - Plot initial wavefunction
Plotter.visualizeWavefunction(psi,Params,Transf)
%% - Plot GS wavefunction

View File

@ -6,7 +6,7 @@ function [psi] = setupWavefunction(~,Params,Transf)
elly = sqrt(Params.hbar/(Params.m*Params.wy))/Params.l0;
ellz = sqrt(Params.hbar/(Params.m*Params.wz))/Params.l0;
Rx = 8*ellx; Ry = 8*elly; Rz = 8*ellz;
Rx = 4*ellx; Ry = 4*elly; Rz = 4*ellz;
X0 = 0.0*Transf.Xmax; Y0 = 0.0*Transf.Ymax; Z0 = 0*Transf.Zmax;
psi = exp(-(X-X0).^2/Rx^2-(Y-Y0).^2/Ry^2-(Z-Z0).^2/Rz^2);

View File

@ -23,7 +23,7 @@ function [Params] = setupParameters(this)
Params.wz = 2*pi*this.TrapFrequencies(3);
% Trap depth and box size for box potentials
Params.boxdepth = this.TrapDepth/(Params.wz/w0); % The depth of the box
Params.boxdepth = this.TrapDepth; % The depth of the box
Params.boxsize = this.BoxSize; % The size of the box
% ================ Parameters defined by those above ================ %

View File

@ -4,11 +4,11 @@
#SBATCH --partition=single
# Request number of nodes and GPU for job
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=10
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:4
#SBATCH --mem=24G
# Estimated wallclock time for job
#SBATCH --time=12:00:00
#SBATCH --time=72:00:00
#SBATCH --job-name=simulation
#SBATCH --error=simulation.err
#SBATCH --output=simulation.out