Latest scripts - included choice between using full Q5 to the approximation for the LHY correction.

This commit is contained in:
Karthik 2025-03-28 14:44:38 +01:00
parent bb9f4a78bf
commit 0f3eca6791
4 changed files with 39 additions and 21 deletions

View File

@ -19,6 +19,7 @@ OptionsStruct.TrapPotentialType = 'Harmonic';
OptionsStruct.NumberOfGridPoints = [64, 64, 32]; OptionsStruct.NumberOfGridPoints = [64, 64, 32];
OptionsStruct.Dimensions = [18, 18, 18]; OptionsStruct.Dimensions = [18, 18, 18];
OptionsStruct.UseApproximationForLHY = true;
OptionsStruct.IncludeDDICutOff = true; OptionsStruct.IncludeDDICutOff = true;
OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
@ -51,7 +52,15 @@ 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
% SaveDirectory = './Results/Data_3D/AspectRatio2_8';
SaveDirectory = './Results/Data_3D/AspectRatio3_7'; SaveDirectory = './Results/Data_3D/AspectRatio3_7';
% SaveDirectory = './Results/Data_3D/AspectRatio3_8';
JobNumber = 0;
Plotter.visualizeGSWavefunction(SaveDirectory, JobNumber)
%%
% SaveDirectory = './Results/Data_3D/BeyondSSD_SSD';
SaveDirectory = './Results/Data_3D/BeyondSSD_Labyrinth';
% SaveDirectory = './Results/Data_3D/BeyondSSD_Honeycomb';
JobNumber = 0; JobNumber = 0;
Plotter.visualizeGSWavefunction(SaveDirectory, JobNumber) Plotter.visualizeGSWavefunction(SaveDirectory, JobNumber)

View File

@ -18,7 +18,7 @@ OptionsStruct.Dimensions = [18, 18, 18];
OptionsStruct.IncludeDDICutOff = true; OptionsStruct.IncludeDDICutOff = true;
OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
OptionsStruct.TimeStepSize = 0.002; % in s OptionsStruct.TimeStepSize = 2E-3; % in s
OptionsStruct.MinimumTimeStepSize = 1E-6; % in s OptionsStruct.MinimumTimeStepSize = 1E-6; % in s
OptionsStruct.TimeCutOff = 2E6; % in s OptionsStruct.TimeCutOff = 2E6; % in s
OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.EnergyTolerance = 5E-10;
@ -60,7 +60,7 @@ OptionsStruct.Dimensions = [18, 18, 18];
OptionsStruct.IncludeDDICutOff = true; OptionsStruct.IncludeDDICutOff = true;
OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
OptionsStruct.TimeStepSize = 0.002; % in s OptionsStruct.TimeStepSize = 2E-3; % in s
OptionsStruct.MinimumTimeStepSize = 1E-6; % in s OptionsStruct.MinimumTimeStepSize = 1E-6; % in s
OptionsStruct.TimeCutOff = 2E6; % in s OptionsStruct.TimeCutOff = 2E6; % in s
OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.EnergyTolerance = 5E-10;

View File

@ -22,6 +22,7 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
SimulationParameters; SimulationParameters;
IncludeDDICutOff; IncludeDDICutOff;
UseApproximationForLHY;
PlotLive; PlotLive;
JobNumber; JobNumber;
RunOnGPU; RunOnGPU;
@ -69,7 +70,9 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
addParameter(p, 'NoiseScaleFactor', 4,... addParameter(p, 'NoiseScaleFactor', 4,...
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0))); @(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
addParameter(p, 'IncludeDDICutOff', true,... addParameter(p, 'IncludeDDICutOff', true,...
@islogical);
addParameter(p, 'UseApproximationForLHY', false,...
@islogical); @islogical);
addParameter(p, 'PlotLive', false,... addParameter(p, 'PlotLive', false,...
@islogical); @islogical);
@ -102,17 +105,18 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
this.ResidualTolerance = p.Results.ResidualTolerance; this.ResidualTolerance = p.Results.ResidualTolerance;
this.NoiseScaleFactor = p.Results.NoiseScaleFactor; this.NoiseScaleFactor = p.Results.NoiseScaleFactor;
this.IncludeDDICutOff = p.Results.IncludeDDICutOff; this.IncludeDDICutOff = p.Results.IncludeDDICutOff;
this.PlotLive = p.Results.PlotLive; this.UseApproximationForLHY = p.Results.UseApproximationForLHY;
this.JobNumber = p.Results.JobNumber; this.PlotLive = p.Results.PlotLive;
this.RunOnGPU = p.Results.RunOnGPU; this.JobNumber = p.Results.JobNumber;
this.DebugMode = p.Results.DebugMode; this.RunOnGPU = p.Results.RunOnGPU;
this.DoSave = p.Results.SaveData; this.DebugMode = p.Results.DebugMode;
this.SaveDirectory = p.Results.SaveDirectory; this.DoSave = p.Results.SaveData;
this.SaveDirectory = p.Results.SaveDirectory;
this.Calculator = Simulator.Calculator('CutOffType', p.Results.CutOffType); this.Calculator = Simulator.Calculator('CutOffType', p.Results.CutOffType);
this.SimulationParameters = this.setupParameters(); this.SimulationParameters = this.setupParameters();
end end
end end

View File

@ -72,18 +72,23 @@ function [Params] = setupParameters(this)
% == Calculate LHY correction == % % == Calculate LHY correction == %
eps_dd = Params.add/Params.as; eps_dd = Params.add/Params.as;
if eps_dd == 0
Q5 = 1; if this.UseApproximationForLHY
elseif eps_dd == 1 Q5 = 1 + ((3*eps_dd^2)/2);
Q5 = 3*sqrt(3)/2;
else else
yeps = (1-eps_dd)/(3*eps_dd); if eps_dd == 0
Q5 = (3*eps_dd)^(5/2)*( (8+26*yeps+33*yeps^2)*sqrt(1+yeps) + 15*yeps^3*log((1+sqrt(1+yeps))/sqrt(yeps)) )/48; Q5 = 1;
Q5 = real(Q5); elseif eps_dd == 1
Q5 = 3*sqrt(3)/2;
else
yeps = (1-eps_dd)/(3*eps_dd);
Q5 = (3*eps_dd)^(5/2)*( (8+26*yeps+33*yeps^2)*sqrt(1+yeps) + 15*yeps^3*log((1+sqrt(1+yeps))/sqrt(yeps)) )/48;
Q5 = real(Q5);
end
end end
Params.gammaQF = 128/3*sqrt(pi*(Params.as/l0)^5)*Q5; Params.gammaQF = 128/3*sqrt(pi*(Params.as/l0)^5)*Q5;
% Loading the rest into Params % Loading the rest into Params
Params.hbar = hbar; Params.hbar = hbar;
Params.kbol = kbol; Params.kbol = kbol;