2024-06-12 20:45:08 +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-06-13 02:02:44 +02:00
|
|
|
|
|
|
|
OptionsStruct.NumberOfAtoms = 1E6;
|
2024-06-13 11:30:12 +02:00
|
|
|
OptionsStruct.DipolarPolarAngle = pi/2;
|
|
|
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
2024-06-13 02:02:44 +02:00
|
|
|
OptionsStruct.ScatteringLength = 86;
|
|
|
|
OptionsStruct.TrapFrequencies = [125, 125, 250];
|
2024-06-13 11:30:12 +02:00
|
|
|
OptionsStruct.NumberOfGridPoints = [64, 64, 48];
|
2024-06-13 02:02:44 +02:00
|
|
|
OptionsStruct.Dimensions = [40, 40, 20];
|
2024-06-12 21:17:53 +02:00
|
|
|
OptionsStruct.CutoffType = 'Cylindrical';
|
2024-06-13 11:30:12 +02:00
|
|
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
2024-06-13 02:02:44 +02:00
|
|
|
|
|
|
|
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
2024-06-13 18:27:02 +02:00
|
|
|
OptionsStruct.TimeStep = 50E-6; % in s
|
|
|
|
OptionsStruct.SimulationTime = 2E6; % in s
|
|
|
|
OptionsStruct.EnergyTolerance = 5E-10;
|
2024-06-13 02:02:44 +02:00
|
|
|
|
2024-06-12 20:45:08 +02:00
|
|
|
OptionsStruct.SaveData = true;
|
|
|
|
OptionsStruct.SaveDirectory = './Data';
|
2024-06-13 02:02:44 +02:00
|
|
|
|
2024-06-12 20:45:08 +02:00
|
|
|
options = Helper.convertstruct2cell(OptionsStruct);
|
|
|
|
clear OptionsStruct
|
2024-06-12 20:05:27 +02:00
|
|
|
|
2024-06-12 20:45:08 +02:00
|
|
|
sim = Simulator.DipolarGas(options{:});
|
|
|
|
calc = Simulator.Calculator(options{:});
|
2024-06-12 21:17:53 +02:00
|
|
|
pot = Simulator.Potentials(options{:});
|
2024-06-12 20:45:08 +02:00
|
|
|
|
|
|
|
%-% Run Simulation %-%
|
2024-06-12 20:05:27 +02:00
|
|
|
[Params, Transf, psi, V, VDk] = sim.runSimulation(calc);
|
|
|
|
|
2024-06-13 11:30:12 +02:00
|
|
|
%% - Plot numerical grid
|
|
|
|
Plotter.visualizeSpace(Transf)
|
|
|
|
%% - Plot trap potential
|
2024-06-13 02:02:44 +02:00
|
|
|
Plotter.visualizeTrapPotential(V,Params,Transf)
|
2024-06-13 11:30:12 +02:00
|
|
|
%% - Plot initial wavefunction
|
|
|
|
Plotter.visualizeWavefunction(psi,Params,Transf)
|