Latest working version.
This commit is contained in:
parent
115e0d4c24
commit
c0e96006d7
@ -4,8 +4,6 @@ function visualizeSpace(Transf)
|
|||||||
y = Transf.y;
|
y = Transf.y;
|
||||||
z = Transf.z;
|
z = Transf.z;
|
||||||
|
|
||||||
[X,Y] = meshgrid(x,y);
|
|
||||||
|
|
||||||
height = 20;
|
height = 20;
|
||||||
width = 45;
|
width = 45;
|
||||||
figure(1)
|
figure(1)
|
||||||
@ -15,13 +13,13 @@ function visualizeSpace(Transf)
|
|||||||
set(gcf, 'PaperPositionMode', 'auto')
|
set(gcf, 'PaperPositionMode', 'auto')
|
||||||
|
|
||||||
subplot(1,2,1)
|
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
|
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
||||||
hold on
|
hold on
|
||||||
|
|
||||||
for idx = 2:length(z)
|
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
|
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
||||||
end
|
end
|
||||||
|
|
||||||
% set the axes labels' properties
|
% set the axes labels' properties
|
||||||
@ -54,15 +52,13 @@ function visualizeSpace(Transf)
|
|||||||
y = Transf.ky;
|
y = Transf.ky;
|
||||||
z = Transf.kz;
|
z = Transf.kz;
|
||||||
|
|
||||||
[X,Y] = meshgrid(x,y);
|
|
||||||
|
|
||||||
subplot(1,2,2)
|
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
|
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
||||||
hold on
|
hold on
|
||||||
|
|
||||||
for idx = 2:length(z)
|
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
|
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@ OptionsStruct = struct;
|
|||||||
OptionsStruct.NumberOfAtoms = 1.24E5;
|
OptionsStruct.NumberOfAtoms = 1.24E5;
|
||||||
OptionsStruct.DipolarPolarAngle = 0;
|
OptionsStruct.DipolarPolarAngle = 0;
|
||||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
OptionsStruct.ScatteringLength = 86;
|
OptionsStruct.ScatteringLength = 90;
|
||||||
|
|
||||||
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3];
|
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3];
|
||||||
OptionsStruct.TrapDepth = 5;
|
OptionsStruct.TrapDepth = 5;
|
||||||
OptionsStruct.BoxSize = 15;
|
OptionsStruct.BoxSize = 15;
|
||||||
OptionsStruct.TrapPotentialType = 'Harmonic';
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
||||||
|
|
||||||
OptionsStruct.NumberOfGridPoints = [32, 64, 32];
|
OptionsStruct.NumberOfGridPoints = [128, 256, 128];
|
||||||
OptionsStruct.Dimensions = [50, 120, 150];
|
OptionsStruct.Dimensions = [50, 120, 150];
|
||||||
OptionsStruct.CutoffType = 'Cylindrical';
|
OptionsStruct.CutoffType = 'Cylindrical';
|
||||||
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
||||||
@ -42,7 +42,7 @@ sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
|
|||||||
%% - Plot numerical grid
|
%% - Plot numerical grid
|
||||||
Plotter.visualizeSpace(Transf)
|
Plotter.visualizeSpace(Transf)
|
||||||
%% - Plot trap potential
|
%% - Plot trap potential
|
||||||
Plotter.visualizeTrapPotential(V,Params,Transf)
|
Plotter.visualizeTrapPotential(sim.Potential,Params,Transf)
|
||||||
%% - Plot initial wavefunction
|
%% - Plot initial wavefunction
|
||||||
Plotter.visualizeWavefunction(psi,Params,Transf)
|
Plotter.visualizeWavefunction(psi,Params,Transf)
|
||||||
%% - Plot GS wavefunction
|
%% - Plot GS wavefunction
|
||||||
|
@ -6,7 +6,7 @@ function [psi] = setupWavefunction(~,Params,Transf)
|
|||||||
elly = sqrt(Params.hbar/(Params.m*Params.wy))/Params.l0;
|
elly = sqrt(Params.hbar/(Params.m*Params.wy))/Params.l0;
|
||||||
ellz = sqrt(Params.hbar/(Params.m*Params.wz))/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;
|
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);
|
psi = exp(-(X-X0).^2/Rx^2-(Y-Y0).^2/Ry^2-(Z-Z0).^2/Rz^2);
|
||||||
|
@ -23,8 +23,8 @@ function [Params] = setupParameters(this)
|
|||||||
Params.wz = 2*pi*this.TrapFrequencies(3);
|
Params.wz = 2*pi*this.TrapFrequencies(3);
|
||||||
|
|
||||||
% Trap depth and box size for box potentials
|
% 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
|
Params.boxsize = this.BoxSize; % The size of the box
|
||||||
|
|
||||||
% ================ Parameters defined by those above ================ %
|
% ================ Parameters defined by those above ================ %
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
#SBATCH --partition=single
|
#SBATCH --partition=single
|
||||||
# Request number of nodes and GPU for job
|
# Request number of nodes and GPU for job
|
||||||
#SBATCH --nodes=1
|
#SBATCH --nodes=1
|
||||||
#SBATCH --ntasks-per-node=10
|
#SBATCH --ntasks-per-node=1
|
||||||
#SBATCH --gres=gpu:4
|
#SBATCH --gres=gpu:4
|
||||||
#SBATCH --mem=24G
|
#SBATCH --mem=24G
|
||||||
# Estimated wallclock time for job
|
# Estimated wallclock time for job
|
||||||
#SBATCH --time=12:00:00
|
#SBATCH --time=72:00:00
|
||||||
#SBATCH --job-name=simulation
|
#SBATCH --job-name=simulation
|
||||||
#SBATCH --error=simulation.err
|
#SBATCH --error=simulation.err
|
||||||
#SBATCH --output=simulation.out
|
#SBATCH --output=simulation.out
|
||||||
|
Loading…
Reference in New Issue
Block a user