Calculations/Dipolar Gas Simulator/+Scripts/test.m

40 lines
1.4 KiB
Mathematica
Raw Normal View History

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;
OptionsStruct.DipolarAngle = pi/2;
OptionsStruct.ScatteringLength = 86;
OptionsStruct.TrapFrequencies = [125, 125, 250];
OptionsStruct.NumberOfPoints = [64, 64, 48];
OptionsStruct.Dimensions = [40, 40, 20];
2024-06-12 21:17:53 +02:00
OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.PotentialType = 'Harmonic';
2024-06-13 02:02:44 +02:00
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
2024-06-12 20:45:08 +02:00
OptionsStruct.TimeStep = 50e-06; % in s
OptionsStruct.SimulationTime = 4e-03; % in s
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-12 20:45:08 +02:00
%% - Plot results
2024-06-13 02:02:44 +02:00
% Plotter.visualizeSpace(Transf)
Plotter.visualizeTrapPotential(V,Params,Transf)
% Plotter.visualizeWavefunction(psi,Params,Transf)