88 lines
3.8 KiB
Matlab
88 lines
3.8 KiB
Matlab
%% Scaled parameters
|
|
|
|
ScalingFactor = (4/5)^2;
|
|
|
|
OptionsStruct = struct;
|
|
|
|
OptionsStruct.NumberOfAtoms = sqrt(ScalingFactor) * 5E5;
|
|
OptionsStruct.DipolarPolarAngle = deg2rad(0);
|
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
|
OptionsStruct.ScatteringLength = 75;
|
|
|
|
AspectRatio = 2.8;
|
|
HorizontalTrapFrequency = 125/ScalingFactor;
|
|
VerticalTrapFrequency = AspectRatio * HorizontalTrapFrequency;
|
|
OptionsStruct.TrapFrequencies = [HorizontalTrapFrequency, HorizontalTrapFrequency, VerticalTrapFrequency];
|
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
|
|
|
OptionsStruct.NumberOfGridPoints = [128, 128, 64];
|
|
OptionsStruct.Dimensions = [18, 18, 18];
|
|
OptionsStruct.UseApproximationForLHY = true;
|
|
OptionsStruct.IncludeDDICutOff = true;
|
|
OptionsStruct.CutoffType = 'Cylindrical';
|
|
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
|
OptionsStruct.TimeStepSize = 1E-4; % in s
|
|
OptionsStruct.MinimumTimeStepSize = 2E-6; % in s
|
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
|
OptionsStruct.EnergyTolerance = 5E-10;
|
|
OptionsStruct.ResidualTolerance = 1E-08;
|
|
OptionsStruct.NoiseScaleFactor = 0.01;
|
|
|
|
OptionsStruct.PlotLive = false;
|
|
OptionsStruct.JobNumber = 2;
|
|
OptionsStruct.RunOnGPU = true;
|
|
OptionsStruct.SaveData = true;
|
|
OptionsStruct.SaveDirectory = sprintf('./Results/Data_3D/ApproximateLHY/AspectRatio%s', strrep(num2str(AspectRatio), '.', '_'));
|
|
options = Helper.convertstruct2cell(OptionsStruct);
|
|
clear OptionsStruct
|
|
|
|
sim = Simulator.DipolarGas(options{:});
|
|
pot = Simulator.Potentials(options{:});
|
|
sim.Potential = pot.trap();
|
|
|
|
%-% Run Simulation %-%
|
|
[Params, Transf, psi, V, VDk] = sim.run();
|
|
|
|
|
|
%{
|
|
%% - Gradient Descent Test
|
|
|
|
OptionsStruct = struct;
|
|
|
|
OptionsStruct.NumberOfAtoms = 8E4;
|
|
OptionsStruct.DipolarPolarAngle = deg2rad(0);
|
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
|
OptionsStruct.ScatteringLength = 95;
|
|
|
|
OptionsStruct.TrapFrequencies = [30, 60, 90];
|
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
|
|
|
OptionsStruct.NumberOfGridPoints = [256, 128, 128];
|
|
OptionsStruct.Dimensions = [30, 20, 20];
|
|
OptionsStruct.UseApproximationForLHY = true;
|
|
OptionsStruct.IncludeDDICutOff = true;
|
|
OptionsStruct.CutoffType = 'Cylindrical';
|
|
OptionsStruct.SimulationMode = 'EnergyMinimization'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' | 'EnergyMinimization'
|
|
OptionsStruct.MaxIterationsForGD = 2E4;
|
|
% OptionsStruct.TimeStepSize = 1E-4; % in s
|
|
% OptionsStruct.MinimumTimeStepSize = 2E-10; % in s
|
|
% OptionsStruct.TimeCutOff = 2E6; % in s
|
|
% OptionsStruct.EnergyTolerance = 5E-10;
|
|
% OptionsStruct.ResidualTolerance = 1E-08;
|
|
OptionsStruct.NoiseScaleFactor = 0.01;
|
|
|
|
OptionsStruct.PlotLive = true;
|
|
OptionsStruct.JobNumber = 0;
|
|
OptionsStruct.RunOnGPU = false;
|
|
OptionsStruct.SaveData = true;
|
|
OptionsStruct.SaveDirectory = './Results/Data_3D/GradientDescent';
|
|
options = Helper.convertstruct2cell(OptionsStruct);
|
|
clear OptionsStruct
|
|
|
|
sim = Simulator.DipolarGas(options{:});
|
|
pot = Simulator.Potentials(options{:});
|
|
sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
|
|
|
|
%-% Run Simulation %-%
|
|
[Params, Transf, psi, V, VDk] = sim.run();
|
|
%} |