Modifications to save different runs submitted via a single file to cluster in different folders, parameters changed to look deep in the phase diagram for the different phases.
This commit is contained in:
parent
1d8514c867
commit
b0b82ae5de
@ -48,20 +48,33 @@ Plotter.visualizeWavefunction(psi,Params,Transf)
|
|||||||
%% - Plot GS wavefunction
|
%% - Plot GS wavefunction
|
||||||
Plotter.visualizeGSWavefunction(Params.njob)
|
Plotter.visualizeGSWavefunction(Params.njob)
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
% To reproduce results from the Blair Blakie paper:
|
||||||
|
|
||||||
|
% Critical point: (0.0978, 0.784); Triangular phase: (0.0959, 0.750); Stripe phase: (0.144, 0.765); Honeycomb phase: (0.192, 0.780)
|
||||||
|
|
||||||
|
% N = ((nadd^2)/Params.add^2) * (Params.Lx *1E-6)^2
|
||||||
|
% Critical point: N = 2.0427e+07; Triangular phase: N = 2.0030e+07; Stripe phase: N = 3.0077e+07; Honeycomb phase: N = 4.0102e+07 for dimensions fixed to 100
|
||||||
|
|
||||||
|
% as = ((as/add)*Params.add)/Params.a0
|
||||||
|
% Critical point: 102.5133; Triangular phase: 98.0676; Stripe phase: 100.0289; Honeycomb phase: 101.9903
|
||||||
|
|
||||||
|
|
||||||
%% - Create Variational2D and Calculator object with specified options
|
%% - Create Variational2D and Calculator object with specified options
|
||||||
|
|
||||||
OptionsStruct = struct;
|
OptionsStruct = struct;
|
||||||
|
|
||||||
OptionsStruct.NumberOfAtoms = 2.0573e+07;
|
OptionsStruct.NumberOfAtoms = 3.0077e+07;
|
||||||
OptionsStruct.DipolarPolarAngle = 0;
|
OptionsStruct.DipolarPolarAngle = 0;
|
||||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
OptionsStruct.ScatteringLength = 102.2518; % Critical point: 102.515; Triangular phase: 98.0676; Stripe phase: 102.2518; Honeycomb phase: 102.6441
|
OptionsStruct.ScatteringLength = 100.0289;
|
||||||
|
|
||||||
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
||||||
OptionsStruct.TrapPotentialType = 'None';
|
OptionsStruct.TrapPotentialType = 'None';
|
||||||
|
|
||||||
OptionsStruct.NumberOfGridPoints = [128, 128];
|
OptionsStruct.NumberOfGridPoints = [128, 128];
|
||||||
OptionsStruct.Dimensions = [100, 100]; % Critical point: 6.996; Triangular phase: 7.5; Stripe phase: 6.972; Honeycomb phase: 6.239 for both for Atom Number fixed to 1E5
|
OptionsStruct.Dimensions = [100, 100];
|
||||||
OptionsStruct.TimeStepSize = 100E-6; % in s
|
OptionsStruct.TimeStepSize = 100E-6; % in s
|
||||||
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||||
OptionsStruct.TimeCutOff = 2E6; % in s
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||||
@ -72,14 +85,14 @@ OptionsStruct.NoiseScaleFactor = 4;
|
|||||||
OptionsStruct.MaxIterations = 20;
|
OptionsStruct.MaxIterations = 20;
|
||||||
OptionsStruct.VariationalWidth = 5.7;
|
OptionsStruct.VariationalWidth = 5.7;
|
||||||
OptionsStruct.WidthLowerBound = 0.2;
|
OptionsStruct.WidthLowerBound = 0.2;
|
||||||
OptionsStruct.WidthUpperBound = 12;
|
OptionsStruct.WidthUpperBound = 20;
|
||||||
OptionsStruct.WidthCutoff = 1e-2;
|
OptionsStruct.WidthCutoff = 1e-2;
|
||||||
|
|
||||||
OptionsStruct.PlotLive = true;
|
OptionsStruct.PlotLive = true;
|
||||||
OptionsStruct.JobNumber = 1;
|
OptionsStruct.JobNumber = 1;
|
||||||
OptionsStruct.RunOnGPU = false;
|
OptionsStruct.RunOnGPU = false;
|
||||||
OptionsStruct.SaveData = true;
|
OptionsStruct.SaveData = true;
|
||||||
OptionsStruct.SaveDirectory = './Data';
|
OptionsStruct.SaveDirectory = './Data_StripePhase';
|
||||||
options = Helper.convertstruct2cell(OptionsStruct);
|
options = Helper.convertstruct2cell(OptionsStruct);
|
||||||
clear OptionsStruct
|
clear OptionsStruct
|
||||||
|
|
||||||
@ -97,5 +110,5 @@ solver.Potential = pot.trap();
|
|||||||
%% - Plot initial wavefunction
|
%% - Plot initial wavefunction
|
||||||
Plotter.visualizeWavefunction2D(psi,Params,Transf)
|
Plotter.visualizeWavefunction2D(psi,Params,Transf)
|
||||||
%% - Plot GS wavefunction
|
%% - Plot GS wavefunction
|
||||||
% Plotter.visualizeGSWavefunction2D(Params.njob)
|
Plotter.visualizeGSWavefunction2D(Params.njob)
|
||||||
Plotter.visualizeGSWavefunction2D(1)
|
|
||||||
|
@ -1,17 +1,30 @@
|
|||||||
|
%%
|
||||||
|
|
||||||
|
% To reproduce results from the Blair Blakie paper:
|
||||||
|
|
||||||
|
% Critical point: (0.0978, 0.784); Triangular phase: (0.0959, 0.750); Stripe phase: (0.144, 0.765); Honeycomb phase: (0.192, 0.780)
|
||||||
|
|
||||||
|
% N = ((nadd^2)/Params.add^2) * (Params.Lx *1E-6)^2
|
||||||
|
% Critical point: N = 2.0427e+07; Triangular phase: N = 2.0030e+07; Stripe phase: N = 3.0077e+07; Honeycomb phase: N = 4.0102e+07 for dimensions fixed to 100
|
||||||
|
|
||||||
|
% as = ((as/add)*Params.add)/Params.a0
|
||||||
|
% Critical point: 102.5133; Triangular phase: 98.0676; Stripe phase: 100.0289; Honeycomb phase: 101.9903
|
||||||
|
|
||||||
|
|
||||||
%% - Create Variational2D and Calculator object with specified options
|
%% - Create Variational2D and Calculator object with specified options
|
||||||
|
|
||||||
OptionsStruct = struct;
|
OptionsStruct = struct;
|
||||||
|
|
||||||
OptionsStruct.NumberOfAtoms = 2.0573e+07;
|
OptionsStruct.NumberOfAtoms = 2.0030e+07;
|
||||||
OptionsStruct.DipolarPolarAngle = 0;
|
OptionsStruct.DipolarPolarAngle = 0;
|
||||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
OptionsStruct.ScatteringLength = 102.2518; % Critical point: 102.515; Triangular phase: 98.0676; Stripe phase: 102.2518; Honeycomb phase: 102.6441
|
OptionsStruct.ScatteringLength = 98.0676;
|
||||||
|
|
||||||
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
||||||
OptionsStruct.TrapPotentialType = 'None';
|
OptionsStruct.TrapPotentialType = 'None';
|
||||||
|
|
||||||
OptionsStruct.NumberOfGridPoints = [128, 128];
|
OptionsStruct.NumberOfGridPoints = [256, 256];
|
||||||
OptionsStruct.Dimensions = [100, 100]; % Critical point: 6.996; Triangular phase: 7.5; Stripe phase: 6.972; Honeycomb phase: 6.239 for both for Atom Number fixed to 1E5
|
OptionsStruct.Dimensions = [100, 100];
|
||||||
OptionsStruct.TimeStepSize = 100E-6; % in s
|
OptionsStruct.TimeStepSize = 100E-6; % in s
|
||||||
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||||
OptionsStruct.TimeCutOff = 2E6; % in s
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||||
@ -22,14 +35,98 @@ OptionsStruct.NoiseScaleFactor = 4;
|
|||||||
OptionsStruct.MaxIterations = 20;
|
OptionsStruct.MaxIterations = 20;
|
||||||
OptionsStruct.VariationalWidth = 5.7;
|
OptionsStruct.VariationalWidth = 5.7;
|
||||||
OptionsStruct.WidthLowerBound = 0.2;
|
OptionsStruct.WidthLowerBound = 0.2;
|
||||||
OptionsStruct.WidthUpperBound = 12;
|
OptionsStruct.WidthUpperBound = 20;
|
||||||
OptionsStruct.WidthCutoff = 1e-2;
|
OptionsStruct.WidthCutoff = 1e-2;
|
||||||
|
|
||||||
OptionsStruct.PlotLive = false;
|
OptionsStruct.PlotLive = false;
|
||||||
OptionsStruct.JobNumber = 1;
|
OptionsStruct.JobNumber = 1;
|
||||||
OptionsStruct.RunOnGPU = true;
|
OptionsStruct.RunOnGPU = true;
|
||||||
OptionsStruct.SaveData = true;
|
OptionsStruct.SaveData = true;
|
||||||
OptionsStruct.SaveDirectory = './Data';
|
OptionsStruct.SaveDirectory = './Data_TriangularPhase';
|
||||||
|
options = Helper.convertstruct2cell(OptionsStruct);
|
||||||
|
clear OptionsStruct
|
||||||
|
|
||||||
|
solver = VariationalSolver2D.DipolarGas(options{:});
|
||||||
|
pot = VariationalSolver2D.Potentials(options{:});
|
||||||
|
solver.Potential = pot.trap();
|
||||||
|
|
||||||
|
%-% Run Solver %-%
|
||||||
|
[Params, Transf, psi, V, VDk] = solver.run();
|
||||||
|
|
||||||
|
%% - Create Variational2D and Calculator object with specified options
|
||||||
|
|
||||||
|
OptionsStruct = struct;
|
||||||
|
|
||||||
|
OptionsStruct.NumberOfAtoms = 3.0077e+07;
|
||||||
|
OptionsStruct.DipolarPolarAngle = 0;
|
||||||
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
|
OptionsStruct.ScatteringLength = 100.0289;
|
||||||
|
|
||||||
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
||||||
|
OptionsStruct.TrapPotentialType = 'None';
|
||||||
|
|
||||||
|
OptionsStruct.NumberOfGridPoints = [256, 256];
|
||||||
|
OptionsStruct.Dimensions = [100, 100];
|
||||||
|
OptionsStruct.TimeStepSize = 100E-6; % in s
|
||||||
|
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||||
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||||
|
OptionsStruct.EnergyTolerance = 5E-10;
|
||||||
|
OptionsStruct.ResidualTolerance = 1E-04;
|
||||||
|
OptionsStruct.NoiseScaleFactor = 4;
|
||||||
|
|
||||||
|
OptionsStruct.MaxIterations = 20;
|
||||||
|
OptionsStruct.VariationalWidth = 5.7;
|
||||||
|
OptionsStruct.WidthLowerBound = 0.2;
|
||||||
|
OptionsStruct.WidthUpperBound = 20;
|
||||||
|
OptionsStruct.WidthCutoff = 1e-2;
|
||||||
|
|
||||||
|
OptionsStruct.PlotLive = false;
|
||||||
|
OptionsStruct.JobNumber = 1;
|
||||||
|
OptionsStruct.RunOnGPU = true;
|
||||||
|
OptionsStruct.SaveData = true;
|
||||||
|
OptionsStruct.SaveDirectory = './Data_StripePhase';
|
||||||
|
options = Helper.convertstruct2cell(OptionsStruct);
|
||||||
|
clear OptionsStruct
|
||||||
|
|
||||||
|
solver = VariationalSolver2D.DipolarGas(options{:});
|
||||||
|
pot = VariationalSolver2D.Potentials(options{:});
|
||||||
|
solver.Potential = pot.trap();
|
||||||
|
|
||||||
|
%-% Run Solver %-%
|
||||||
|
[Params, Transf, psi, V, VDk] = solver.run();
|
||||||
|
|
||||||
|
%% - Create Variational2D and Calculator object with specified options
|
||||||
|
|
||||||
|
OptionsStruct = struct;
|
||||||
|
|
||||||
|
OptionsStruct.NumberOfAtoms = 4.0102e+07;
|
||||||
|
OptionsStruct.DipolarPolarAngle = 0;
|
||||||
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
|
OptionsStruct.ScatteringLength = 101.9903;
|
||||||
|
|
||||||
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
||||||
|
OptionsStruct.TrapPotentialType = 'None';
|
||||||
|
|
||||||
|
OptionsStruct.NumberOfGridPoints = [256, 256];
|
||||||
|
OptionsStruct.Dimensions = [100, 100];
|
||||||
|
OptionsStruct.TimeStepSize = 100E-6; % in s
|
||||||
|
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||||
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||||
|
OptionsStruct.EnergyTolerance = 5E-10;
|
||||||
|
OptionsStruct.ResidualTolerance = 1E-04;
|
||||||
|
OptionsStruct.NoiseScaleFactor = 4;
|
||||||
|
|
||||||
|
OptionsStruct.MaxIterations = 20;
|
||||||
|
OptionsStruct.VariationalWidth = 5.7;
|
||||||
|
OptionsStruct.WidthLowerBound = 0.2;
|
||||||
|
OptionsStruct.WidthUpperBound = 20;
|
||||||
|
OptionsStruct.WidthCutoff = 1e-2;
|
||||||
|
|
||||||
|
OptionsStruct.PlotLive = false;
|
||||||
|
OptionsStruct.JobNumber = 1;
|
||||||
|
OptionsStruct.RunOnGPU = true;
|
||||||
|
OptionsStruct.SaveData = true;
|
||||||
|
OptionsStruct.SaveDirectory = './Data_HoneycombPhase';
|
||||||
options = Helper.convertstruct2cell(OptionsStruct);
|
options = Helper.convertstruct2cell(OptionsStruct);
|
||||||
clear OptionsStruct
|
clear OptionsStruct
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ function [Params, Transf, psi, V, VDk] = run(this)
|
|||||||
|
|
||||||
% --- Initialize ---
|
% --- Initialize ---
|
||||||
mkdir(sprintf(this.SaveDirectory))
|
mkdir(sprintf(this.SaveDirectory))
|
||||||
mkdir(sprintf('./Data/Run_%03i',Params.njob))
|
mkdir(sprintf(strcat(this.SaveDirectory, '/Run_%03i'),Params.njob))
|
||||||
fminconoptions = optimoptions('fmincon','Display','off','StepTolerance',1e-8);
|
fminconoptions = optimoptions('fmincon','Display','off','StepTolerance',1e-8);
|
||||||
|
|
||||||
[psi,V,VDk] = this.initialize(Params,VParams,Transf);
|
[psi,V,VDk] = this.initialize(Params,VParams,Transf);
|
||||||
@ -60,7 +60,7 @@ function [Params, Transf, psi, V, VDk] = run(this)
|
|||||||
relelldiff = abs(ells(nn+1)-ells(nn))/ells(nn);
|
relelldiff = abs(ells(nn+1)-ells(nn))/ells(nn);
|
||||||
E_vs_iter = [E_vs_iter E_Var(VParams.ell)];
|
E_vs_iter = [E_vs_iter E_Var(VParams.ell)];
|
||||||
|
|
||||||
save(sprintf('./Data/Run_%03i/psi_gs_%i.mat',Params.njob),'psi','Observ','Transf','Params','VDk','V','VParams');
|
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs_%i.mat'),Params.njob),'psi','Observ','Transf','Params','VDk','V','VParams');
|
||||||
|
|
||||||
%Plotting
|
%Plotting
|
||||||
if this.PlotLive
|
if this.PlotLive
|
||||||
@ -78,8 +78,8 @@ function [Params, Transf, psi, V, VDk] = run(this)
|
|||||||
end
|
end
|
||||||
fprintf('\n')
|
fprintf('\n')
|
||||||
disp('Saving data...');
|
disp('Saving data...');
|
||||||
save(sprintf('./Data/Run_%03i/psi_gs.mat',Params.njob),'psi','Observ','Transf','Params','VDk','V','VParams');
|
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','Observ','Transf','Params','VDk','V','VParams');
|
||||||
disp('Save complete!');
|
disp('Save complete!');
|
||||||
delete(sprintf('./Data/Run_%03i/psi_gs_*.mat',Params.njob))
|
delete(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs_*.mat'),Params.njob))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user