Updated the files used to execute the simulator/solver locally or on the cluster.

This commit is contained in:
Karthik 2024-11-14 15:33:54 +01:00
parent e9a6908268
commit 9bf5d7a39f
2 changed files with 21 additions and 32 deletions

View File

@ -9,19 +9,19 @@ OptionsStruct = struct;
OptionsStruct.NumberOfAtoms = 1.24E5; OptionsStruct.NumberOfAtoms = 1.24E5;
OptionsStruct.DipolarPolarAngle = 0; OptionsStruct.DipolarPolarAngle = 0;
OptionsStruct.DipolarAzimuthAngle = 0; OptionsStruct.DipolarAzimuthAngle = 0;
OptionsStruct.ScatteringLength = 90; OptionsStruct.ScatteringLength = 86;
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3]; OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3];
OptionsStruct.TrapDepth = 5; OptionsStruct.TrapDepth = 5;
OptionsStruct.BoxSize = 15; OptionsStruct.BoxSize = 15;
OptionsStruct.TrapPotentialType = 'Harmonic'; OptionsStruct.TrapPotentialType = 'Harmonic';
OptionsStruct.NumberOfGridPoints = [128, 256, 128]; OptionsStruct.NumberOfGridPoints = [256, 512, 256];
OptionsStruct.Dimensions = [50, 120, 150]; OptionsStruct.Dimensions = [50, 120, 150];
OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.CutoffType = 'Cylindrical';
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
OptionsStruct.TimeStepSize = 500E-6; % in s OptionsStruct.TimeStepSize = 500E-6; % in s
OptionsStruct.NumberOfTimeSteps = 100; % in s OptionsStruct.NumberOfTimeSteps = 2E6; % in s
OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.EnergyTolerance = 5E-10;
OptionsStruct.ResidualTolerance = 1E-05; OptionsStruct.ResidualTolerance = 1E-05;
@ -40,7 +40,7 @@ sim.Potential = pot.trap(); % + pot.repulsive_chopstick(
[Params, Transf, psi, V, VDk] = sim.run(); [Params, Transf, psi, V, VDk] = sim.run();
%% - Plot numerical grid %% - Plot numerical grid
Plotter.visualizeSpace(Transf) % Plotter.visualizeSpace(Transf)
%% - Plot trap potential %% - Plot trap potential
Plotter.visualizeTrapPotential(sim.Potential,Params,Transf) Plotter.visualizeTrapPotential(sim.Potential,Params,Transf)
%% - Plot initial wavefunction %% - Plot initial wavefunction
@ -52,14 +52,14 @@ Plotter.visualizeGSWavefunction(Params.njob)
OptionsStruct = struct; OptionsStruct = struct;
OptionsStruct.NumberOfAtoms = 1.24E5; OptionsStruct.NumberOfAtoms = 1E5;
OptionsStruct.DipolarPolarAngle = 0; OptionsStruct.DipolarPolarAngle = 0;
OptionsStruct.DipolarAzimuthAngle = 0; OptionsStruct.DipolarAzimuthAngle = 0;
OptionsStruct.ScatteringLength = 90; OptionsStruct.ScatteringLength = 102.515;
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3]; OptionsStruct.TrapFrequencies = [10, 10, 72.4];
OptionsStruct.NumberOfGridPoints = [50, 50]; OptionsStruct.NumberOfGridPoints = [1024, 1024];
OptionsStruct.Dimensions = [100, 100]; OptionsStruct.Dimensions = [100, 100];
OptionsStruct.TimeStepSize = 1E-3; % in s OptionsStruct.TimeStepSize = 1E-3; % in s
OptionsStruct.TimeCutOff = 2E6; % in s OptionsStruct.TimeCutOff = 2E6; % in s
@ -79,7 +79,7 @@ solver = Variational2D.DipolarGas(options{:});
[Params, Transf, psi, V, VDk] = solver.run(); [Params, Transf, psi, V, VDk] = solver.run();
%% - Plot numerical grid %% - Plot numerical grid
Plotter.visualizeSpace2D(Transf) % Plotter.visualizeSpace2D(Transf)
%% - Plot initial wavefunction %% - Plot initial wavefunction
Plotter.visualizeWavefunction2D(psi,Params,Transf) Plotter.visualizeWavefunction2D(psi,Params,Transf)
%% - Plot GS wavefunction %% - Plot GS wavefunction

View File

@ -1,29 +1,20 @@
%% This script is testing the functionalities of the Dipolar Gas Simulator %% - Create Variational2D and Calculator object with specified options
%
% Important: Run only sectionwise!!
%% - Create Simulator, Potential and Calculator object with specified options
OptionsStruct = struct; OptionsStruct = struct;
OptionsStruct.NumberOfAtoms = 1.24E5; OptionsStruct.NumberOfAtoms = 1E5;
OptionsStruct.DipolarPolarAngle = 0; OptionsStruct.DipolarPolarAngle = 0;
OptionsStruct.DipolarAzimuthAngle = 0; OptionsStruct.DipolarAzimuthAngle = 0;
OptionsStruct.ScatteringLength = 86; OptionsStruct.ScatteringLength = 102.515;
OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3]; OptionsStruct.TrapFrequencies = [10, 10, 72.4];
OptionsStruct.TrapDepth = 5;
OptionsStruct.BoxSize = 15;
OptionsStruct.TrapPotentialType = 'Harmonic';
OptionsStruct.NumberOfGridPoints = [256, 512, 256]; OptionsStruct.NumberOfGridPoints = [1024, 1024];
OptionsStruct.Dimensions = [50, 120, 150]; OptionsStruct.Dimensions = [100, 100];
OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.TimeStepSize = 1E-3; % in s
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.TimeCutOff = 2E6; % in s
OptionsStruct.TimeStepSize = 500E-6; % in s
OptionsStruct.NumberOfTimeSteps = 2E6; % in s
OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.EnergyTolerance = 5E-10;
OptionsStruct.ResidualTolerance = 1E-05; OptionsStruct.ResidualTolerance = 1E-04;
OptionsStruct.JobNumber = 1; OptionsStruct.JobNumber = 1;
OptionsStruct.RunOnGPU = true; OptionsStruct.RunOnGPU = true;
@ -32,9 +23,7 @@ OptionsStruct.SaveDirectory = './Data';
options = Helper.convertstruct2cell(OptionsStruct); options = Helper.convertstruct2cell(OptionsStruct);
clear OptionsStruct clear OptionsStruct
sim = Simulator.DipolarGas(options{:}); solver = Variational2D.DipolarGas(options{:});
pot = Simulator.Potentials(options{:});
sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
%-% Run Simulation %-% %-% Run Solver %-%
[Params, Transf, psi, V, VDk] = sim.run(); [Params, Transf, psi, V, VDk] = solver.run();