Tweaked parameters again and added exception handling for when the computed Vdk size is incommensurate with specified grid points.

This commit is contained in:
Karthik 2024-11-19 10:02:38 +01:00
parent 68f39c45c1
commit 869d2a4050
2 changed files with 11 additions and 4 deletions

View File

@ -60,9 +60,9 @@ OptionsStruct.ScatteringLength = 102.2518; % Critical point: 102.5
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
OptionsStruct.TrapPotentialType = 'None';
OptionsStruct.NumberOfGridPoints = [256, 256];
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.TimeStepSize = 500E-6; % in s
OptionsStruct.TimeStepSize = 100E-6; % in s
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
OptionsStruct.TimeCutOff = 2E6; % in s
OptionsStruct.EnergyTolerance = 5E-10;
@ -70,7 +70,7 @@ OptionsStruct.ResidualTolerance = 1E-04;
OptionsStruct.NoiseScaleFactor = 4;
OptionsStruct.MaxIterations = 20;
OptionsStruct.VariationalWidth = 4;
OptionsStruct.VariationalWidth = 5.7;
OptionsStruct.WidthLowerBound = 0.2;
OptionsStruct.WidthUpperBound = 12;
OptionsStruct.WidthCutoff = 1e-2;
@ -97,4 +97,5 @@ solver.Potential = pot.trap();
%% - Plot initial wavefunction
Plotter.visualizeWavefunction2D(psi,Params,Transf)
%% - Plot GS wavefunction
Plotter.visualizeGSWavefunction2D(Params.njob)
% Plotter.visualizeGSWavefunction2D(Params.njob)
Plotter.visualizeGSWavefunction2D(1)

View File

@ -8,6 +8,12 @@ function [psi,V,VDk] = initialize(this,Params,VParams,Transf)
if isfile(strcat(this.SaveDirectory, '/VDk_M.mat'))
VDk = load(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')));
VDk = VDk.VDk;
VDkSize = size(VDk);
if VDkSize(1) ~= Params.Nx && VDkSize(2) ~= Params.Ny
VDk = this.Calculator.calculateVDkWithCutoff(Transf, Params, VParams);
save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk');
fprintf('Saved VDk incomensurate with specified grid points: Computed and saved DDI potential for new grid size in Fourier space with cutoff.\n')
end
else
VDk = this.Calculator.calculateVDkWithCutoff(Transf, Params, VParams);
save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk');