From 9bf5d7a39f6482b233c5d3d793f7396593c28bbd Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Thu, 14 Nov 2024 15:33:54 +0100 Subject: [PATCH] Updated the files used to execute the simulator/solver locally or on the cluster. --- Dipolar-Gas-Simulator/+Scripts/run_locally.m | 18 +++++----- .../+Scripts/run_on_cluster.m | 35 +++++++------------ 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/Dipolar-Gas-Simulator/+Scripts/run_locally.m b/Dipolar-Gas-Simulator/+Scripts/run_locally.m index 286dbe3..08b22f9 100644 --- a/Dipolar-Gas-Simulator/+Scripts/run_locally.m +++ b/Dipolar-Gas-Simulator/+Scripts/run_locally.m @@ -9,19 +9,19 @@ OptionsStruct = struct; OptionsStruct.NumberOfAtoms = 1.24E5; OptionsStruct.DipolarPolarAngle = 0; OptionsStruct.DipolarAzimuthAngle = 0; -OptionsStruct.ScatteringLength = 90; +OptionsStruct.ScatteringLength = 86; OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3]; OptionsStruct.TrapDepth = 5; OptionsStruct.BoxSize = 15; OptionsStruct.TrapPotentialType = 'Harmonic'; -OptionsStruct.NumberOfGridPoints = [128, 256, 128]; +OptionsStruct.NumberOfGridPoints = [256, 512, 256]; OptionsStruct.Dimensions = [50, 120, 150]; OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.TimeStepSize = 500E-6; % in s -OptionsStruct.NumberOfTimeSteps = 100; % in s +OptionsStruct.NumberOfTimeSteps = 2E6; % in s OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.ResidualTolerance = 1E-05; @@ -40,7 +40,7 @@ sim.Potential = pot.trap(); % + pot.repulsive_chopstick( [Params, Transf, psi, V, VDk] = sim.run(); %% - Plot numerical grid -Plotter.visualizeSpace(Transf) +% Plotter.visualizeSpace(Transf) %% - Plot trap potential Plotter.visualizeTrapPotential(sim.Potential,Params,Transf) %% - Plot initial wavefunction @@ -52,14 +52,14 @@ Plotter.visualizeGSWavefunction(Params.njob) OptionsStruct = struct; -OptionsStruct.NumberOfAtoms = 1.24E5; +OptionsStruct.NumberOfAtoms = 1E5; OptionsStruct.DipolarPolarAngle = 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.TimeStepSize = 1E-3; % in s OptionsStruct.TimeCutOff = 2E6; % in s @@ -79,7 +79,7 @@ solver = Variational2D.DipolarGas(options{:}); [Params, Transf, psi, V, VDk] = solver.run(); %% - Plot numerical grid -Plotter.visualizeSpace2D(Transf) +% Plotter.visualizeSpace2D(Transf) %% - Plot initial wavefunction Plotter.visualizeWavefunction2D(psi,Params,Transf) %% - Plot GS wavefunction diff --git a/Dipolar-Gas-Simulator/+Scripts/run_on_cluster.m b/Dipolar-Gas-Simulator/+Scripts/run_on_cluster.m index 2b4150e..f11f7e1 100644 --- a/Dipolar-Gas-Simulator/+Scripts/run_on_cluster.m +++ b/Dipolar-Gas-Simulator/+Scripts/run_on_cluster.m @@ -1,29 +1,20 @@ -%% This script is testing the functionalities of the Dipolar Gas Simulator -% -% Important: Run only sectionwise!! - -%% - Create Simulator, Potential and Calculator object with specified options +%% - Create Variational2D and Calculator object with specified options OptionsStruct = struct; -OptionsStruct.NumberOfAtoms = 1.24E5; +OptionsStruct.NumberOfAtoms = 1E5; OptionsStruct.DipolarPolarAngle = 0; OptionsStruct.DipolarAzimuthAngle = 0; -OptionsStruct.ScatteringLength = 86; +OptionsStruct.ScatteringLength = 102.515; -OptionsStruct.TrapFrequencies = [44.97, 10.4, 126.3]; -OptionsStruct.TrapDepth = 5; -OptionsStruct.BoxSize = 15; -OptionsStruct.TrapPotentialType = 'Harmonic'; +OptionsStruct.TrapFrequencies = [10, 10, 72.4]; -OptionsStruct.NumberOfGridPoints = [256, 512, 256]; -OptionsStruct.Dimensions = [50, 120, 150]; -OptionsStruct.CutoffType = 'Cylindrical'; -OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' -OptionsStruct.TimeStepSize = 500E-6; % in s -OptionsStruct.NumberOfTimeSteps = 2E6; % in s +OptionsStruct.NumberOfGridPoints = [1024, 1024]; +OptionsStruct.Dimensions = [100, 100]; +OptionsStruct.TimeStepSize = 1E-3; % in s +OptionsStruct.TimeCutOff = 2E6; % in s OptionsStruct.EnergyTolerance = 5E-10; -OptionsStruct.ResidualTolerance = 1E-05; +OptionsStruct.ResidualTolerance = 1E-04; OptionsStruct.JobNumber = 1; OptionsStruct.RunOnGPU = true; @@ -32,9 +23,7 @@ OptionsStruct.SaveDirectory = './Data'; options = Helper.convertstruct2cell(OptionsStruct); clear OptionsStruct -sim = Simulator.DipolarGas(options{:}); -pot = Simulator.Potentials(options{:}); -sim.Potential = pot.trap(); % + pot.repulsive_chopstick(); +solver = Variational2D.DipolarGas(options{:}); -%-% Run Simulation %-% -[Params, Transf, psi, V, VDk] = sim.run(); \ No newline at end of file +%-% Run Solver %-% +[Params, Transf, psi, V, VDk] = solver.run(); \ No newline at end of file