Latest scripts for the Dipolar Gas Simulator.
This commit is contained in:
parent
a1b57c64fc
commit
8994dd76f8
@ -24,7 +24,11 @@ function MinEnergyDataArray = analyzeGSWavefunction_optimal_system_size(folder_p
|
||||
Ly = Data.Params.Ly;
|
||||
|
||||
% Extract the minimum energy from VParams.E_vs_iter
|
||||
minEnergy = min(gather(Data.VParams.E_vs_iter));
|
||||
try
|
||||
minEnergy = min(gather(Data.VParams.E_vs_iter));
|
||||
catch
|
||||
minEnergy = NaN;
|
||||
end
|
||||
|
||||
% Append [Lx, Ly, minEnergy] to the results array
|
||||
MinEnergyDataArray(end + 1, :) = [Lx, Ly, minEnergy];
|
||||
@ -43,9 +47,11 @@ function MinEnergyDataArray = analyzeGSWavefunction_optimal_system_size(folder_p
|
||||
Ly = MinEnergyDataArray(i, 2);
|
||||
energy = MinEnergyDataArray(i, 3);
|
||||
|
||||
% Find indices in the padded matrix corresponding to Lx and Ly
|
||||
Lx_idx = find(Lx_Range == Lx);
|
||||
Ly_idx = find(Ly_Range == Ly);
|
||||
tolerance = 1e-10; % Define a small tolerance
|
||||
|
||||
% Find indices in the padded matrix corresponding to Lx and Ly with tolerance
|
||||
Lx_idx = find(abs(Lx_Range - Lx) < tolerance);
|
||||
Ly_idx = find(abs(Ly_Range - Ly) < tolerance);
|
||||
|
||||
% Assign the energy value to the appropriate position in the matrix
|
||||
paddedMatrix(Lx_idx, Ly_idx) = energy;
|
||||
|
@ -304,26 +304,40 @@ JobNumber = 0;
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz500';
|
||||
JobNumber = 0;
|
||||
% Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
||||
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz750';
|
||||
JobNumber = 0;
|
||||
JobNumber = 1;
|
||||
% Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
||||
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz1000';
|
||||
JobNumber = 0;
|
||||
JobNumber = 1;
|
||||
% Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
||||
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz2000';
|
||||
JobNumber = 0;
|
||||
JobNumber = 1;
|
||||
% Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
||||
|
||||
%%
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/TransitionAngle/OptimalSystemSize/Hz500/Degree5';
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/TransitionAngle/OptimalSystemSize/Hz500/Degree0';
|
||||
% Define the desired range for Lx and Ly
|
||||
Lx_Range = 5:10; % Extend Lx from 5 to 10
|
||||
Ly_Range = 5:10; % Extend Ly from 5 to 10
|
||||
MinEnergyDataArray = Scripts.analyzeGSWavefunction_optimal_system_size(SaveDirectory, Lx_Range, Ly_Range);
|
||||
Lx_Range = 2:0.4:6; % Extend Lx from 5 to 10
|
||||
Ly_Range = 2:0.4:6; % Extend Ly from 5 to 10
|
||||
MinEnergyDataArray = Scripts.analyzeGSWavefunction_optimal_system_size(SaveDirectory, Lx_Range, Ly_Range);
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/AspectRatio/AR2_8';
|
||||
JobNumber = 0;
|
||||
Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
||||
%% - Analysis
|
||||
SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/AspectRatio/AR4_0';
|
||||
JobNumber = 0;
|
||||
Plotter.visualizeGSWavefunction2D(SaveDirectory, JobNumber)
|
||||
[contrast, period_X, period_Y] = Scripts.analyzeGSWavefunction_in_plane_trap(SaveDirectory, JobNumber);
|
@ -1,38 +1,38 @@
|
||||
%% Tilting of the dipoles
|
||||
% With an in-plane harmonic trap
|
||||
|
||||
%% v_z = 1000, theta = 0
|
||||
%% AR = 2.8
|
||||
|
||||
OptionsStruct = struct;
|
||||
|
||||
OptionsStruct.NumberOfAtoms = 45000;
|
||||
OptionsStruct.NumberOfAtoms = 5E5;
|
||||
OptionsStruct.DipolarPolarAngle = 0;
|
||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||
OptionsStruct.ScatteringLength = 50.0;
|
||||
OptionsStruct.ScatteringLength = 81.0;
|
||||
|
||||
OptionsStruct.TrapFrequencies = [100, 100, 1000];
|
||||
AspectRatio = 2.8;
|
||||
HorizontalTrapFrequency = 125;
|
||||
VerticalTrapFrequency = HorizontalTrapFrequency * AspectRatio;
|
||||
OptionsStruct.TrapFrequencies = [HorizontalTrapFrequency, HorizontalTrapFrequency, VerticalTrapFrequency];
|
||||
OptionsStruct.TrapPotentialType = 'Harmonic';
|
||||
|
||||
OptionsStruct.NumberOfGridPoints = [256, 256];
|
||||
OptionsStruct.Dimensions = [35, 35];
|
||||
OptionsStruct.TimeStepSize = 0.005; % in s
|
||||
OptionsStruct.Dimensions = [18, 18];
|
||||
OptionsStruct.TimeStepSize = 0.001; % in s
|
||||
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||
OptionsStruct.TimeCutOff = 1E6; % in s
|
||||
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||
OptionsStruct.EnergyTolerance = 5E-10;
|
||||
OptionsStruct.ResidualTolerance = 1E-05;
|
||||
OptionsStruct.ResidualTolerance = 1E-04;
|
||||
OptionsStruct.NoiseScaleFactor = 0.05;
|
||||
|
||||
OptionsStruct.MaxIterations = 10;
|
||||
OptionsStruct.VariationalWidth = 0.7;
|
||||
OptionsStruct.VariationalWidth = 1.8;
|
||||
OptionsStruct.WidthLowerBound = 0.01;
|
||||
OptionsStruct.WidthUpperBound = 12;
|
||||
OptionsStruct.WidthCutoff = 5e-3;
|
||||
OptionsStruct.WidthCutoff = 1e-2;
|
||||
|
||||
OptionsStruct.PlotLive = false;
|
||||
OptionsStruct.JobNumber = 0;
|
||||
OptionsStruct.RunOnGPU = true;
|
||||
OptionsStruct.SaveData = true;
|
||||
OptionsStruct.SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz1000';
|
||||
OptionsStruct.SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/AspectRatio/AR2_8';
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
clear OptionsStruct
|
||||
|
||||
@ -43,38 +43,41 @@ solver.Potential = pot.trap();
|
||||
%-% Run Solver %-%
|
||||
[Params, Transf, psi, V, VDk] = solver.run();
|
||||
|
||||
%% v_z = 1000, theta = 15
|
||||
%% AR = 4
|
||||
|
||||
OptionsStruct = struct;
|
||||
|
||||
OptionsStruct.NumberOfAtoms = 45000;
|
||||
OptionsStruct.DipolarPolarAngle = deg2rad(15);
|
||||
OptionsStruct.NumberOfAtoms = 5E5;
|
||||
OptionsStruct.DipolarPolarAngle = 0;
|
||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||
OptionsStruct.ScatteringLength = 50.0;
|
||||
OptionsStruct.ScatteringLength = 81.0;
|
||||
|
||||
OptionsStruct.TrapFrequencies = [100, 100, 1000];
|
||||
AspectRatio = 4.0;
|
||||
HorizontalTrapFrequency = 125;
|
||||
VerticalTrapFrequency = HorizontalTrapFrequency * AspectRatio;
|
||||
OptionsStruct.TrapFrequencies = [HorizontalTrapFrequency, HorizontalTrapFrequency, VerticalTrapFrequency];
|
||||
OptionsStruct.TrapPotentialType = 'Harmonic';
|
||||
|
||||
OptionsStruct.NumberOfGridPoints = [256, 256];
|
||||
OptionsStruct.Dimensions = [35, 35];
|
||||
OptionsStruct.TimeStepSize = 0.005; % in s
|
||||
OptionsStruct.Dimensions = [18, 18];
|
||||
OptionsStruct.TimeStepSize = 0.001; % in s
|
||||
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||
OptionsStruct.TimeCutOff = 1E6; % in s
|
||||
OptionsStruct.TimeCutOff = 2E6; % in s
|
||||
OptionsStruct.EnergyTolerance = 5E-10;
|
||||
OptionsStruct.ResidualTolerance = 1E-05;
|
||||
OptionsStruct.ResidualTolerance = 1E-04;
|
||||
OptionsStruct.NoiseScaleFactor = 0.05;
|
||||
|
||||
OptionsStruct.MaxIterations = 10;
|
||||
OptionsStruct.VariationalWidth = 0.7;
|
||||
OptionsStruct.VariationalWidth = 1.5;
|
||||
OptionsStruct.WidthLowerBound = 0.01;
|
||||
OptionsStruct.WidthUpperBound = 12;
|
||||
OptionsStruct.WidthCutoff = 5e-3;
|
||||
OptionsStruct.WidthCutoff = 1e-2;
|
||||
|
||||
OptionsStruct.PlotLive = false;
|
||||
OptionsStruct.JobNumber = 1;
|
||||
OptionsStruct.JobNumber = 0;
|
||||
OptionsStruct.RunOnGPU = true;
|
||||
OptionsStruct.SaveData = true;
|
||||
OptionsStruct.SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/Hz1000';
|
||||
OptionsStruct.SaveDirectory = './Results/Data_TiltingOfDipoles/HarmonicTrap/AspectRatio/AR4_0';
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
clear OptionsStruct
|
||||
|
||||
|
@ -1,17 +1,22 @@
|
||||
%% Tilting of the dipoles
|
||||
% Atom Number Density <= 1250 ppum
|
||||
% Atom Number Density = 1250 ppum
|
||||
|
||||
%% v_z = 500
|
||||
ppum = 1250;
|
||||
|
||||
%% theta = 0
|
||||
|
||||
idx = 0;
|
||||
|
||||
% Loop over Lx and Ly values
|
||||
for Lx = 5:1:10
|
||||
for Ly = 5:1:10
|
||||
for Lx = 2:0.4:6
|
||||
for Ly = 2:0.4:6
|
||||
|
||||
% Initialize OptionsStruct
|
||||
OptionsStruct = struct;
|
||||
|
||||
% Assign values to OptionsStruct
|
||||
OptionsStruct.NumberOfAtoms = 101250;
|
||||
OptionsStruct.DipolarPolarAngle = deg2rad(5);
|
||||
OptionsStruct.NumberOfAtoms = ppum * (Lx*Ly);
|
||||
OptionsStruct.DipolarPolarAngle = 0;
|
||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||
OptionsStruct.ScatteringLength = 75.00;
|
||||
|
||||
@ -20,25 +25,25 @@ for Lx = 5:1:10
|
||||
|
||||
OptionsStruct.NumberOfGridPoints = [128, 128];
|
||||
OptionsStruct.Dimensions = [Lx, Ly];
|
||||
OptionsStruct.TimeStepSize = 0.005; % in s
|
||||
OptionsStruct.TimeStepSize = 1E-4; % in s
|
||||
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
||||
OptionsStruct.TimeCutOff = 1E5; % in s
|
||||
OptionsStruct.TimeCutOff = 1E6; % in s
|
||||
OptionsStruct.EnergyTolerance = 5E-10;
|
||||
OptionsStruct.ResidualTolerance = 1E-05;
|
||||
OptionsStruct.NoiseScaleFactor = 0.05;
|
||||
|
||||
|
||||
OptionsStruct.MaxIterations = 10;
|
||||
OptionsStruct.VariationalWidth = 1.2;
|
||||
OptionsStruct.VariationalWidth = 1.00;
|
||||
OptionsStruct.WidthLowerBound = 0.01;
|
||||
OptionsStruct.WidthUpperBound = 12;
|
||||
OptionsStruct.WidthCutoff = 5e-3;
|
||||
OptionsStruct.WidthCutoff = 1e-2;
|
||||
|
||||
OptionsStruct.PlotLive = false;
|
||||
OptionsStruct.JobNumber = (Lx - 5) * (10 - 5 + 1) + (Ly - 4); % Unique JobNumber based on Lx and Ly
|
||||
OptionsStruct.JobNumber = idx;
|
||||
OptionsStruct.RunOnGPU = true;
|
||||
OptionsStruct.SaveData = true;
|
||||
OptionsStruct.SaveDirectory = './Results/Data_TiltingOfDipoles/TransitionAngle/OptimalSystemSize/Hz500/Degree';
|
||||
|
||||
OptionsStruct.SaveDirectory = sprintf('./Results/Data_TiltingOfDipoles/TransitionAngle/OptimalSystemSize/Hz500/Degree%i', rad2deg(OptionsStruct.DipolarPolarAngle));
|
||||
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
clear OptionsStruct
|
||||
|
||||
@ -48,5 +53,7 @@ for Lx = 5:1:10
|
||||
|
||||
% Run Solver
|
||||
[Params, Transf, psi, V, VDk] = solver.run();
|
||||
|
||||
idx = idx + 1;
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user