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

26 lines
1.0 KiB
Matlab

%% 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;
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
OptionsStruct.ErrorEstimationMethod = 'bootstrap'; % 'jackknife' | 'bootstrap'
OptionsStruct.NumberOfAtoms = 5000;
OptionsStruct.TimeStep = 50e-06; % in s
OptionsStruct.SimulationTime = 4e-03; % in s
OptionsStruct.CutoffType = true;
OptionsStruct.SaveData = true;
OptionsStruct.SaveDirectory = './Data';
options = Helper.convertstruct2cell(OptionsStruct);
clear OptionsStruct
sim = Simulator.DipolarGas(options{:});
calc = Simulator.Calculator(options{:});
%-% Run Simulation %-%
[Params, Transf, psi, V, VDk] = sim.runSimulation(calc);
%% - Plot results
Plotter.visualizeSpace(Transf)