Calculations/Dipolar-Gas-Simulator/+Scripts/run_locally.m

49 lines
1.9 KiB
Mathematica
Raw Normal View History

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-06-20 13:15:56 +02:00
OptionsStruct.NumberOfAtoms = 1.24E5;
OptionsStruct.DipolarPolarAngle = 0;
2024-06-18 19:01:35 +02:00
OptionsStruct.DipolarAzimuthAngle = 0;
2024-06-20 13:15:56 +02:00
OptionsStruct.ScatteringLength = 86;
2024-06-18 19:01:35 +02:00
2024-06-20 13:15:56 +02:00
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3];
2024-06-18 19:01:35 +02:00
OptionsStruct.TrapDepth = 5;
OptionsStruct.BoxSize = 15;
OptionsStruct.TrapPotentialType = 'Harmonic';
2024-06-20 13:15:56 +02:00
OptionsStruct.NumberOfGridPoints = [32, 64, 32];
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
OptionsStruct.NumberOfTimeSteps = 100; % 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
sim = Simulator.DipolarGas(options{:});
pot = Simulator.Potentials(options{:});
sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
%-% Run Simulation %-%
[Params, Transf, psi, V, VDk] = sim.run();
%% - Plot numerical grid
Plotter.visualizeSpace(Transf)
%% - Plot trap potential
Plotter.visualizeTrapPotential(V,Params,Transf)
%% - Plot initial wavefunction
2024-06-20 12:16:42 +02:00
Plotter.visualizeWavefunction(psi,Params,Transf)
%% - Plot GS wavefunction
Plotter.visualizeGSWavefunction(Params.njob)