2024-06-18 19:01:35 +02:00
|
|
|
%% This script is testing the functionalities of the Dipolar Gas Simulator
|
|
|
|
%
|
|
|
|
% Important: Run only sectionwise!!
|
|
|
|
|
|
|
|
%% - Create Simulator, Potential and Calculator object with specified options
|
|
|
|
|
|
|
|
OptionsStruct = struct;
|
|
|
|
|
2024-11-15 19:54:26 +01:00
|
|
|
OptionsStruct.NumberOfAtoms = 1E5;
|
2024-06-20 13:15:56 +02:00
|
|
|
OptionsStruct.DipolarPolarAngle = 0;
|
2024-06-18 19:01:35 +02:00
|
|
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
2024-11-14 15:33:54 +01:00
|
|
|
OptionsStruct.ScatteringLength = 86;
|
2024-06-18 19:01:35 +02:00
|
|
|
|
2024-11-15 19:54:26 +01:00
|
|
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
2024-06-18 19:01:35 +02:00
|
|
|
OptionsStruct.TrapDepth = 5;
|
|
|
|
OptionsStruct.BoxSize = 15;
|
|
|
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
|
|
|
|
2024-11-14 15:33:54 +01:00
|
|
|
OptionsStruct.NumberOfGridPoints = [256, 512, 256];
|
2024-06-20 13:15:56 +02:00
|
|
|
OptionsStruct.Dimensions = [50, 120, 150];
|
2024-06-18 19:01:35 +02:00
|
|
|
OptionsStruct.CutoffType = 'Cylindrical';
|
|
|
|
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
2024-06-20 13:15:56 +02:00
|
|
|
OptionsStruct.TimeStepSize = 500E-6; % in s
|
2024-11-14 15:33:54 +01:00
|
|
|
OptionsStruct.NumberOfTimeSteps = 2E6; % in s
|
2024-06-18 19:01:35 +02:00
|
|
|
OptionsStruct.EnergyTolerance = 5E-10;
|
2024-06-20 12:16:42 +02:00
|
|
|
OptionsStruct.ResidualTolerance = 1E-05;
|
2024-06-18 19:01:35 +02:00
|
|
|
|
|
|
|
OptionsStruct.JobNumber = 1;
|
2024-06-20 13:15:56 +02:00
|
|
|
OptionsStruct.RunOnGPU = false;
|
2024-06-18 19:01:35 +02:00
|
|
|
OptionsStruct.SaveData = true;
|
|
|
|
OptionsStruct.SaveDirectory = './Data';
|
|
|
|
options = Helper.convertstruct2cell(OptionsStruct);
|
|
|
|
clear OptionsStruct
|
|
|
|
|
2024-11-14 12:16:37 +01:00
|
|
|
sim = Simulator.DipolarGas(options{:});
|
|
|
|
pot = Simulator.Potentials(options{:});
|
|
|
|
sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
|
2024-06-18 19:01:35 +02:00
|
|
|
|
|
|
|
%-% Run Simulation %-%
|
2024-11-14 12:16:37 +01:00
|
|
|
[Params, Transf, psi, V, VDk] = sim.run();
|
2024-06-18 19:01:35 +02:00
|
|
|
|
2024-11-14 11:13:07 +01:00
|
|
|
%% - Plot numerical grid
|
2024-11-14 15:33:54 +01:00
|
|
|
% Plotter.visualizeSpace(Transf)
|
2024-11-14 11:13:07 +01:00
|
|
|
%% - Plot trap potential
|
|
|
|
Plotter.visualizeTrapPotential(sim.Potential,Params,Transf)
|
|
|
|
%% - Plot initial wavefunction
|
|
|
|
Plotter.visualizeWavefunction(psi,Params,Transf)
|
|
|
|
%% - Plot GS wavefunction
|
|
|
|
Plotter.visualizeGSWavefunction(Params.njob)
|
|
|
|
|
|
|
|
%% - Create Variational2D and Calculator object with specified options
|
|
|
|
|
|
|
|
OptionsStruct = struct;
|
|
|
|
|
2024-11-18 23:50:08 +01:00
|
|
|
OptionsStruct.NumberOfAtoms = 2.0573e+07;
|
2024-11-14 11:13:07 +01:00
|
|
|
OptionsStruct.DipolarPolarAngle = 0;
|
|
|
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
2024-11-18 13:43:12 +01:00
|
|
|
OptionsStruct.ScatteringLength = 102.2518; % Critical point: 102.515; Triangular phase: 98.0676; Stripe phase: 102.2518; Honeycomb phase: 102.6441
|
2024-11-14 11:13:07 +01:00
|
|
|
|
2024-11-14 15:33:54 +01:00
|
|
|
OptionsStruct.TrapFrequencies = [10, 10, 72.4];
|
2024-11-15 22:09:15 +01:00
|
|
|
OptionsStruct.TrapPotentialType = 'None';
|
2024-11-14 11:13:07 +01:00
|
|
|
|
2024-11-18 18:06:14 +01:00
|
|
|
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
|
2024-11-18 23:50:08 +01:00
|
|
|
OptionsStruct.TimeStepSize = 500E-6; % in s
|
2024-11-18 18:06:14 +01:00
|
|
|
OptionsStruct.MinimumTimeStepSize = 1E-5; % in s
|
|
|
|
OptionsStruct.TimeCutOff = 2E6; % in s
|
2024-11-14 11:13:07 +01:00
|
|
|
OptionsStruct.EnergyTolerance = 5E-10;
|
2024-11-18 18:06:14 +01:00
|
|
|
OptionsStruct.ResidualTolerance = 1E-04;
|
2024-11-18 22:42:52 +01:00
|
|
|
OptionsStruct.NoiseScaleFactor = 4;
|
2024-11-14 11:13:07 +01:00
|
|
|
|
2024-11-17 13:49:53 +01:00
|
|
|
OptionsStruct.MaxIterations = 20;
|
|
|
|
OptionsStruct.VariationalWidth = 4;
|
2024-11-18 13:25:09 +01:00
|
|
|
OptionsStruct.WidthLowerBound = 0.2;
|
|
|
|
OptionsStruct.WidthUpperBound = 12;
|
2024-11-18 18:06:14 +01:00
|
|
|
OptionsStruct.WidthCutoff = 1e-2;
|
2024-11-17 13:49:53 +01:00
|
|
|
|
2024-11-18 11:14:56 +01:00
|
|
|
OptionsStruct.PlotLive = true;
|
2024-11-14 11:13:07 +01:00
|
|
|
OptionsStruct.JobNumber = 1;
|
|
|
|
OptionsStruct.RunOnGPU = false;
|
|
|
|
OptionsStruct.SaveData = true;
|
|
|
|
OptionsStruct.SaveDirectory = './Data';
|
|
|
|
options = Helper.convertstruct2cell(OptionsStruct);
|
|
|
|
clear OptionsStruct
|
|
|
|
|
2024-11-15 14:33:46 +01:00
|
|
|
solver = VariationalSolver2D.DipolarGas(options{:});
|
2024-11-15 22:09:15 +01:00
|
|
|
pot = VariationalSolver2D.Potentials(options{:});
|
|
|
|
solver.Potential = pot.trap();
|
2024-11-14 11:13:07 +01:00
|
|
|
|
|
|
|
%-% Run Solver %-%
|
2024-11-15 22:09:15 +01:00
|
|
|
[Params, Transf, psi, V, VDk] = solver.run();
|
2024-11-14 11:13:07 +01:00
|
|
|
|
2024-06-18 19:01:35 +02:00
|
|
|
%% - Plot numerical grid
|
2024-11-14 15:33:54 +01:00
|
|
|
% Plotter.visualizeSpace2D(Transf)
|
2024-11-18 18:06:14 +01:00
|
|
|
%% - Plot trap potential
|
|
|
|
% Plotter.visualizeTrapPotential2D(solver.Potential,Params,Transf)
|
2024-06-18 19:01:35 +02:00
|
|
|
%% - Plot initial wavefunction
|
2024-11-14 12:16:37 +01:00
|
|
|
Plotter.visualizeWavefunction2D(psi,Params,Transf)
|
2024-06-20 12:16:42 +02:00
|
|
|
%% - Plot GS wavefunction
|
2024-11-14 12:16:37 +01:00
|
|
|
Plotter.visualizeGSWavefunction2D(Params.njob)
|