Latest working version.
This commit is contained in:
parent
7cab430c05
commit
cfe15aa13d
@ -50,6 +50,12 @@ function visualizeSpace(Transf)
|
|||||||
'FontWeight', 'normal', ...
|
'FontWeight', 'normal', ...
|
||||||
'FontAngle', 'normal')
|
'FontAngle', 'normal')
|
||||||
|
|
||||||
|
x = Transf.kx;
|
||||||
|
y = Transf.ky;
|
||||||
|
z = Transf.kz;
|
||||||
|
|
||||||
|
[X,Y] = meshgrid(x,y);
|
||||||
|
|
||||||
subplot(1,2,2)
|
subplot(1,2,2)
|
||||||
zlin = ones(size(X, 1)) * z(1); % Generate z data
|
zlin = ones(size(X, 1)) * z(1); % Generate z data
|
||||||
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
mesh(x, y, zlin, 'EdgeColor','b') % Plot the surface
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
function visualizeTrapPotential(V,Params,Transf)
|
function visualizeTrapPotential(V,Params,Transf)
|
||||||
|
|
||||||
set(0,'defaulttextInterpreter','latex')
|
set(0,'defaulttextInterpreter','latex')
|
||||||
set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex');
|
set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex');
|
||||||
|
|
||||||
@ -9,22 +8,26 @@ function visualizeTrapPotential(V,Params,Transf)
|
|||||||
z = Transf.z*Params.l0*1e6;
|
z = Transf.z*Params.l0*1e6;
|
||||||
|
|
||||||
dx = x(2)-x(1); dy = y(2)-y(1); dz = z(2)-z(1);
|
dx = x(2)-x(1); dy = y(2)-y(1); dz = z(2)-z(1);
|
||||||
|
|
||||||
%Plotting
|
%Plotting
|
||||||
height = 10;
|
height = 10;
|
||||||
width = 35;
|
width = 45;
|
||||||
figure(1)
|
figure(1)
|
||||||
clf
|
clf
|
||||||
set(gcf, 'Units', 'centimeters')
|
set(gcf, 'Units', 'centimeters')
|
||||||
set(gcf, 'Position', [2 4 width height])
|
set(gcf, 'Position', [2 8 width height])
|
||||||
set(gcf, 'PaperPositionMode', 'auto')
|
set(gcf, 'PaperPositionMode', 'auto')
|
||||||
|
|
||||||
subplot(1,3,1)
|
subplot(1,3,1)
|
||||||
n = V;
|
n = V;
|
||||||
nxz = squeeze(trapz(n*dy,2));
|
nxz = squeeze(trapz(n*dy,2));
|
||||||
nyz = squeeze(trapz(n*dx,1));
|
nyz = squeeze(trapz(n*dx,1));
|
||||||
nxy = squeeze(trapz(n*dz,3));
|
nxy = squeeze(trapz(n*dz,3));
|
||||||
|
|
||||||
|
nxz = nxz./max(nxz(:));
|
||||||
|
nyz = nyz./max(nyz(:));
|
||||||
|
nxy = nxy./max(nxy(:));
|
||||||
|
|
||||||
plotxz = pcolor(x,z,nxz');
|
plotxz = pcolor(x,z,nxz');
|
||||||
set(plotxz, 'EdgeColor', 'none');
|
set(plotxz, 'EdgeColor', 'none');
|
||||||
xlabel(gca, {'$x$ ($\mu$m)'}, ...
|
xlabel(gca, {'$x$ ($\mu$m)'}, ...
|
||||||
@ -46,7 +49,7 @@ function visualizeTrapPotential(V,Params,Transf)
|
|||||||
'FontWeight', 'normal', ...
|
'FontWeight', 'normal', ...
|
||||||
'FontAngle', 'normal')
|
'FontAngle', 'normal')
|
||||||
colorbar
|
colorbar
|
||||||
|
|
||||||
subplot(1,3,2)
|
subplot(1,3,2)
|
||||||
plotyz = pcolor(y,z,nyz');
|
plotyz = pcolor(y,z,nyz');
|
||||||
set(plotyz, 'EdgeColor', 'none');
|
set(plotyz, 'EdgeColor', 'none');
|
||||||
@ -69,7 +72,7 @@ function visualizeTrapPotential(V,Params,Transf)
|
|||||||
'FontWeight', 'normal', ...
|
'FontWeight', 'normal', ...
|
||||||
'FontAngle', 'normal')
|
'FontAngle', 'normal')
|
||||||
colorbar
|
colorbar
|
||||||
|
|
||||||
subplot(1,3,3)
|
subplot(1,3,3)
|
||||||
plotxy = pcolor(x,y,nxy');
|
plotxy = pcolor(x,y,nxy');
|
||||||
set(plotxy, 'EdgeColor', 'none');
|
set(plotxy, 'EdgeColor', 'none');
|
||||||
|
@ -12,11 +12,11 @@ function visualizeWavefunction(psi,Params,Transf)
|
|||||||
|
|
||||||
%Plotting
|
%Plotting
|
||||||
height = 10;
|
height = 10;
|
||||||
width = 35;
|
width = 45;
|
||||||
figure(1)
|
figure(1)
|
||||||
clf
|
clf
|
||||||
set(gcf, 'Units', 'centimeters')
|
set(gcf, 'Units', 'centimeters')
|
||||||
set(gcf, 'Position', [2 4 width height])
|
set(gcf, 'Position', [2 8 width height])
|
||||||
set(gcf, 'PaperPositionMode', 'auto')
|
set(gcf, 'PaperPositionMode', 'auto')
|
||||||
|
|
||||||
subplot(1,3,1)
|
subplot(1,3,1)
|
||||||
|
@ -7,13 +7,14 @@
|
|||||||
OptionsStruct = struct;
|
OptionsStruct = struct;
|
||||||
|
|
||||||
OptionsStruct.NumberOfAtoms = 1E6;
|
OptionsStruct.NumberOfAtoms = 1E6;
|
||||||
OptionsStruct.DipolarAngle = pi/2;
|
OptionsStruct.DipolarPolarAngle = pi/2;
|
||||||
|
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||||
OptionsStruct.ScatteringLength = 86;
|
OptionsStruct.ScatteringLength = 86;
|
||||||
OptionsStruct.TrapFrequencies = [125, 125, 250];
|
OptionsStruct.TrapFrequencies = [125, 125, 250];
|
||||||
OptionsStruct.NumberOfPoints = [64, 64, 48];
|
OptionsStruct.NumberOfGridPoints = [64, 64, 48];
|
||||||
OptionsStruct.Dimensions = [40, 40, 20];
|
OptionsStruct.Dimensions = [40, 40, 20];
|
||||||
OptionsStruct.CutoffType = 'Cylindrical';
|
OptionsStruct.CutoffType = 'Cylindrical';
|
||||||
OptionsStruct.PotentialType = 'Harmonic';
|
OptionsStruct.TrapPotentialType = 'Harmonic';
|
||||||
|
|
||||||
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
||||||
OptionsStruct.TimeStep = 50e-06; % in s
|
OptionsStruct.TimeStep = 50e-06; % in s
|
||||||
@ -32,9 +33,9 @@ pot = Simulator.Potentials(options{:});
|
|||||||
%-% Run Simulation %-%
|
%-% Run Simulation %-%
|
||||||
[Params, Transf, psi, V, VDk] = sim.runSimulation(calc);
|
[Params, Transf, psi, V, VDk] = sim.runSimulation(calc);
|
||||||
|
|
||||||
%% - Plot results
|
%% - Plot numerical grid
|
||||||
% Plotter.visualizeSpace(Transf)
|
Plotter.visualizeSpace(Transf)
|
||||||
|
%% - Plot trap potential
|
||||||
Plotter.visualizeTrapPotential(V,Params,Transf)
|
Plotter.visualizeTrapPotential(V,Params,Transf)
|
||||||
|
%% - Plot initial wavefunction
|
||||||
% Plotter.visualizeWavefunction(psi,Params,Transf)
|
Plotter.visualizeWavefunction(psi,Params,Transf)
|
@ -2,15 +2,23 @@ classdef Calculator < handle & matlab.mixin.Copyable
|
|||||||
|
|
||||||
properties (Access = private)
|
properties (Access = private)
|
||||||
|
|
||||||
CalculatorDefaults = struct('OrderParameter', 1, ...
|
CalculatorDefaults = struct('ChemicalPotential', 1, ...
|
||||||
|
'EnergyComponents', 1, ...
|
||||||
|
'NormalizedResiduals', 1, ...
|
||||||
|
'OrderParameter', 1, ...
|
||||||
'PhaseCoherence', 1, ...
|
'PhaseCoherence', 1, ...
|
||||||
|
'TotalEnergy', 1, ...
|
||||||
'CutoffType', 'Cylindrical');
|
'CutoffType', 'Cylindrical');
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
properties (Access = public)
|
properties (Access = public)
|
||||||
|
ChemicalPotential;
|
||||||
|
EnergyComponents;
|
||||||
|
NormalizedResiduals;
|
||||||
OrderParameter;
|
OrderParameter;
|
||||||
PhaseCoherence;
|
PhaseCoherence;
|
||||||
|
TotalEnergy;
|
||||||
CutoffType;
|
CutoffType;
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -19,14 +27,22 @@ classdef Calculator < handle & matlab.mixin.Copyable
|
|||||||
|
|
||||||
methods
|
methods
|
||||||
function this = Calculator(varargin)
|
function this = Calculator(varargin)
|
||||||
|
this.ChemicalPotential = this.CalculatorDefaults.ChemicalPotential;
|
||||||
|
this.EnergyComponents = this.CalculatorDefaults.EnergyComponents;
|
||||||
|
this.NormalizedResiduals = this.CalculatorDefaults.NormalizedResiduals;
|
||||||
this.OrderParameter = this.CalculatorDefaults.OrderParameter;
|
this.OrderParameter = this.CalculatorDefaults.OrderParameter;
|
||||||
this.PhaseCoherence = this.CalculatorDefaults.PhaseCoherence;
|
this.PhaseCoherence = this.CalculatorDefaults.PhaseCoherence;
|
||||||
|
this.TotalEnergy = this.CalculatorDefaults.TotalEnergy;
|
||||||
this.CutoffType = this.CalculatorDefaults.CutoffType;
|
this.CutoffType = this.CalculatorDefaults.CutoffType;
|
||||||
end
|
end
|
||||||
|
|
||||||
function restoreDefaults(this)
|
function restoreDefaults(this)
|
||||||
this.OrderParameter = this.PotentialDefaults.OrderParameter;
|
this.ChemicalPotential = this.CalculatorDefaults.ChemicalPotential;
|
||||||
|
this.EnergyComponents = this.CalculatorDefaults.EnergyComponents;
|
||||||
|
this.NormalizedResiduals = this.CalculatorDefaults.NormalizedResiduals;
|
||||||
|
this.OrderParameter = this.CalculatorDefaults.OrderParameter;
|
||||||
this.PhaseCoherence = this.CalculatorDefaults.PhaseCoherence;
|
this.PhaseCoherence = this.CalculatorDefaults.PhaseCoherence;
|
||||||
|
this.TotalEnergy = this.CalculatorDefaults.TotalEnergy;
|
||||||
this.CutoffType = this.CalculatorDefaults.CutoffType;
|
this.CutoffType = this.CalculatorDefaults.CutoffType;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,27 +4,61 @@ function VDk = calculateVDCutoff(this,Params,Transf,TransfRad)
|
|||||||
% VDk needs to be multiplied by Cdd
|
% VDk needs to be multiplied by Cdd
|
||||||
% approach is that of Lu, PRA 82, 023622 (2010)
|
% approach is that of Lu, PRA 82, 023622 (2010)
|
||||||
|
|
||||||
Zcutoff = Params.Lz/2;
|
% == Calulating the DDI potential in Fourier space with appropriate cutoff == %
|
||||||
alph = acos((Transf.KX*sin(Params.theta)*cos(Params.phi)+Transf.KY*sin(Params.theta)*sin(Params.phi)+Transf.KZ*cos(Params.theta))./sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2));
|
% Cylindrical (semianalytic)
|
||||||
alph(1) = pi/2;
|
% Cylindrical infinite Z, polarized along x (analytic)
|
||||||
|
% Spherical
|
||||||
|
|
||||||
% Analytic part of cutoff for slice 0<z<Zmax, 0<r<Inf Ronen, PRL 98, 030406 (2007)
|
switch this.CutoffType
|
||||||
cossq = cos(alph).^2;
|
case 'Cylindrical' %Cylindrical (semianalytic)
|
||||||
VDk = cossq-1/3;
|
Zcutoff = Params.Lz/2;
|
||||||
sinsq = 1 - cossq;
|
alph = acos((Transf.KX*sin(Params.theta)*cos(Params.phi)+Transf.KY*sin(Params.theta)*sin(Params.phi)+Transf.KZ*cos(Params.theta))./sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2));
|
||||||
VDk = VDk + exp(-Zcutoff*sqrt(Transf.KX.^2+Transf.KY.^2)).*( sinsq .* cos(Zcutoff * Transf.KZ) - sqrt(sinsq.*cossq).*sin(Zcutoff * Transf.KZ) );
|
alph(1) = pi/2;
|
||||||
|
|
||||||
% Nonanalytic part
|
% Analytic part of cutoff for slice 0<z<Zmax, 0<r<Inf Ronen, PRL 98, 030406 (2007)
|
||||||
% For a cylindrical cutoff, we need to construct a kr grid based on the 3D parameters using Bessel quadrature
|
cossq = cos(alph).^2;
|
||||||
VDkNon = this.calculateNumericalHankelTransform(TransfRad.kr, TransfRad.kz, TransfRad.Rmax, Zcutoff);
|
VDk = cossq-1/3;
|
||||||
|
sinsq = 1 - cossq;
|
||||||
% Interpolating the nonanalytic part onto 3D grid
|
VDk = VDk + exp(-Zcutoff*sqrt(Transf.KX.^2+Transf.KY.^2)).*( sinsq .* cos(Zcutoff * Transf.KZ) - sqrt(sinsq.*cossq).*sin(Zcutoff * Transf.KZ) );
|
||||||
fullkr = [-flip(TransfRad.kr)',TransfRad.kr'];
|
|
||||||
[KR,KZ] = ndgrid(fullkr,TransfRad.kz);
|
% Nonanalytic part
|
||||||
[KX3D,KY3D,KZ3D] = ndgrid(ifftshift(Transf.kx),ifftshift(Transf.ky),ifftshift(Transf.kz));
|
% For a cylindrical cutoff, we need to construct a kr grid based on the 3D parameters using Bessel quadrature
|
||||||
KR3D = sqrt(KX3D.^2 + KY3D.^2);
|
VDkNon = this.calculateNumericalHankelTransform(TransfRad.kr, TransfRad.kz, TransfRad.Rmax, Zcutoff);
|
||||||
fullVDK = [flip(VDkNon',2),VDkNon']';
|
|
||||||
VDkNon = interpn(KR,KZ,fullVDK,KR3D,KZ3D,'spline',0); %Last argument is -1/3 for full VDk. 0 for nonanalytic piece?
|
% Interpolating the nonanalytic part onto 3D grid
|
||||||
VDkNon = fftshift(VDkNon);
|
fullkr = [-flip(TransfRad.kr)',TransfRad.kr'];
|
||||||
|
[KR,KZ] = ndgrid(fullkr,TransfRad.kz);
|
||||||
VDk = VDk + VDkNon;
|
[KX3D,KY3D,KZ3D] = ndgrid(ifftshift(Transf.kx),ifftshift(Transf.ky),ifftshift(Transf.kz));
|
||||||
|
KR3D = sqrt(KX3D.^2 + KY3D.^2);
|
||||||
|
fullVDK = [flip(VDkNon',2),VDkNon']';
|
||||||
|
VDkNon = interpn(KR,KZ,fullVDK,KR3D,KZ3D,'spline',0); %Last argument is -1/3 for full VDk. 0 for nonanalytic piece?
|
||||||
|
VDkNon = fftshift(VDkNon);
|
||||||
|
|
||||||
|
VDk = VDk + VDkNon;
|
||||||
|
|
||||||
|
case 'CylindricalInfiniteZ' %Cylindrical infinite Z, polarized along x -- PRA 107, 033301 (2023)
|
||||||
|
alph = acos((Transf.KX*sin(Params.theta)*cos(Params.phi)+Transf.KY*sin(Params.theta)*sin(Params.phi)+Transf.KZ*cos(Params.theta))./sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2));
|
||||||
|
alph(1) = pi/2;
|
||||||
|
rhoc = max([abs(Transf.x),abs(Transf.y)]);
|
||||||
|
KR = sqrt(Transf.KX.^2+Transf.KY.^2);
|
||||||
|
func = @(n,u,v) v.^2./(u.^2+v.^2).*(v.*besselj(n,u).*besselk(n+1,v) - u.*besselj(n+1,u).*besselk(n,v));
|
||||||
|
VDk = -0.5*func(0,KR*rhoc,abs(Transf.KZ)*rhoc) + (Transf.KX.^2./KR.^2 - 0.5).*func(2,KR*rhoc,abs(Transf.KZ)*rhoc);
|
||||||
|
VDk = (1/3)*(3*(cos(alph).^2)-1) - VDk;
|
||||||
|
|
||||||
|
VDk(KR==0) = -1/3 + 1/2*abs(Transf.KZ(KR==0))*rhoc.*besselk(1,abs(Transf.KZ(KR==0))*rhoc);
|
||||||
|
VDk(Transf.KZ==0) = 1/6 + (Transf.KX(Transf.KZ==0).^2-Transf.KY(Transf.KZ==0).^2)./(KR(Transf.KZ==0).^2).*(1/2 - besselj(1,KR(Transf.KZ==0)*rhoc)./(KR(Transf.KZ==0)*rhoc));
|
||||||
|
VDk(1,1,1) = 1/6;
|
||||||
|
|
||||||
|
case 'Spherical' %Spherical
|
||||||
|
Rcut = min(Params.Lx/2,Params.Ly/2,Params.Lz/2);
|
||||||
|
alph = acos((Transf.KX*sin(Params.theta)*cos(Params.phi)+Transf.KY*sin(Params.theta)*sin(Params.phi)+Transf.KZ*cos(Params.theta))./sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2));
|
||||||
|
alph(1) = pi/2;
|
||||||
|
|
||||||
|
K = sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2);
|
||||||
|
VDk = (cos(alph).^2-1/3).*(1 + 3*cos(Rcut*K)./(Rcut^2.*K.^2) - 3*sin(Rcut*K)./(Rcut^3.*K.^3));
|
||||||
|
|
||||||
|
otherwise
|
||||||
|
disp('Choose a valid DDI cutoff type!')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
@ -2,13 +2,12 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
|
|||||||
|
|
||||||
properties (Access = public)
|
properties (Access = public)
|
||||||
NumberOfAtoms;
|
NumberOfAtoms;
|
||||||
DipolarAngle;
|
DipolarPolarAngle;
|
||||||
|
DipolarAzimuthAngle
|
||||||
ScatteringLength;
|
ScatteringLength;
|
||||||
TrapFrequencies;
|
TrapFrequencies;
|
||||||
NumberOfPoints;
|
NumberOfGridPoints;
|
||||||
Dimensions;
|
Dimensions;
|
||||||
CutoffType;
|
|
||||||
PotentialType;
|
|
||||||
|
|
||||||
SimulationMode;
|
SimulationMode;
|
||||||
TimeStep;
|
TimeStep;
|
||||||
@ -31,13 +30,15 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
|
|||||||
p.KeepUnmatched = true;
|
p.KeepUnmatched = true;
|
||||||
addParameter(p, 'NumberOfAtoms', 1E6,...
|
addParameter(p, 'NumberOfAtoms', 1E6,...
|
||||||
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
||||||
addParameter(p, 'DipolarAngle', pi/2,...
|
addParameter(p, 'DipolarPolarAngle', pi/2,...
|
||||||
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > -2*pi) && (x < 2*pi)));
|
||||||
|
addParameter(p, 'DipolarAzimuthAngle', pi/2,...
|
||||||
@(x) assert(isnumeric(x) && isscalar(x) && (x > -2*pi) && (x < 2*pi)));
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > -2*pi) && (x < 2*pi)));
|
||||||
addParameter(p, 'ScatteringLength', 120,...
|
addParameter(p, 'ScatteringLength', 120,...
|
||||||
@(x) assert(isnumeric(x) && isscalar(x) && (x > -150) && (x < 150)));
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > -150) && (x < 150)));
|
||||||
addParameter(p, 'TrapFrequencies', 100 * ones(1,3),...
|
addParameter(p, 'TrapFrequencies', 100 * ones(1,3),...
|
||||||
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
||||||
addParameter(p, 'NumberOfPoints', 128 * ones(1,3),...
|
addParameter(p, 'NumberOfGridPoints', 128 * ones(1,3),...
|
||||||
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
||||||
addParameter(p, 'Dimensions', 10 * ones(1,3),...
|
addParameter(p, 'Dimensions', 10 * ones(1,3),...
|
||||||
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
@(x) assert(isnumeric(x) && isvector(x) && all(x > 0)));
|
||||||
@ -57,10 +58,11 @@ classdef DipolarGas < handle & matlab.mixin.Copyable
|
|||||||
p.parse(varargin{:});
|
p.parse(varargin{:});
|
||||||
|
|
||||||
this.NumberOfAtoms = p.Results.NumberOfAtoms;
|
this.NumberOfAtoms = p.Results.NumberOfAtoms;
|
||||||
this.DipolarAngle = p.Results.DipolarAngle;
|
this.DipolarPolarAngle = p.Results.DipolarPolarAngle;
|
||||||
|
this.DipolarAzimuthAngle = p.Results.DipolarAzimuthAngle;
|
||||||
this.ScatteringLength = p.Results.ScatteringLength;
|
this.ScatteringLength = p.Results.ScatteringLength;
|
||||||
this.TrapFrequencies = p.Results.TrapFrequencies;
|
this.TrapFrequencies = p.Results.TrapFrequencies;
|
||||||
this.NumberOfPoints = p.Results.NumberOfPoints;
|
this.NumberOfGridPoints = p.Results.NumberOfGridPoints;
|
||||||
this.Dimensions = p.Results.Dimensions;
|
this.Dimensions = p.Results.Dimensions;
|
||||||
|
|
||||||
this.SimulationMode = p.Results.SimulationMode;
|
this.SimulationMode = p.Results.SimulationMode;
|
||||||
|
@ -14,7 +14,7 @@ else
|
|||||||
VDk = calcObj.calculateVDCutoff(Params,Transf,TransfRad);
|
VDk = calcObj.calculateVDCutoff(Params,Transf,TransfRad);
|
||||||
save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk');
|
save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk');
|
||||||
end
|
end
|
||||||
disp('Finished DDI')
|
fprintf('Computed and saved DDI potential in Fourier space with %s cutoff.', calcObj.CutoffType)
|
||||||
|
|
||||||
% == Setting up the initial wavefunction == %
|
% == Setting up the initial wavefunction == %
|
||||||
psi = this.setupWavefunction(Params,Transf);
|
psi = this.setupWavefunction(Params,Transf);
|
||||||
|
@ -11,9 +11,9 @@ w0 = 2*pi*100; % Angular frequency unit [s^-1]
|
|||||||
mu0factor = 0.3049584233607396; % =(m0/me)*pi*alpha^2 -- me=mass of electron, alpha=fine struct. const.
|
mu0factor = 0.3049584233607396; % =(m0/me)*pi*alpha^2 -- me=mass of electron, alpha=fine struct. const.
|
||||||
% mu0=mu0factor *hbar^2*a0/(m0*muB^2)
|
% mu0=mu0factor *hbar^2*a0/(m0*muB^2)
|
||||||
% Number of points in each direction
|
% Number of points in each direction
|
||||||
Params.Nx = this.NumberOfPoints(1);
|
Params.Nx = this.NumberOfGridPoints(1);
|
||||||
Params.Ny = this.NumberOfPoints(2);
|
Params.Ny = this.NumberOfGridPoints(2);
|
||||||
Params.Nz = this.NumberOfPoints(3);
|
Params.Nz = this.NumberOfGridPoints(3);
|
||||||
|
|
||||||
% Dimensions (in units of l0)
|
% Dimensions (in units of l0)
|
||||||
Params.Lx = this.Dimensions(1);
|
Params.Lx = this.Dimensions(1);
|
||||||
@ -28,8 +28,8 @@ l0 = sqrt(hbar/(Params.m*w0)); % Defining a harmonic oscillator length
|
|||||||
Params.N = this.NumberOfAtoms;
|
Params.N = this.NumberOfAtoms;
|
||||||
|
|
||||||
% Dipole angle
|
% Dipole angle
|
||||||
Params.theta = this.DipolarAngle; % pi/2 dipoles along x, theta=0 dipoles along z
|
Params.theta = this.DipolarPolarAngle; % pi/2 dipoles along x, theta=0 dipoles along z
|
||||||
Params.phi = 0;
|
Params.phi = this.DipolarAzimuthAngle;
|
||||||
|
|
||||||
% Dipole lengths (units of muB)
|
% Dipole lengths (units of muB)
|
||||||
Params.mu = CONSTANTS.DyMagneticMoment;
|
Params.mu = CONSTANTS.DyMagneticMoment;
|
||||||
|
@ -2,11 +2,12 @@ classdef Potentials < handle & matlab.mixin.Copyable
|
|||||||
|
|
||||||
properties (Access = private)
|
properties (Access = private)
|
||||||
|
|
||||||
PotentialDefaults = struct('TrapFrequency', 100e3);
|
PotentialDefaults = struct('TrapPotentialType', 'Harmonic', ...
|
||||||
|
'TrapFrequency', 100e3);
|
||||||
end
|
end
|
||||||
|
|
||||||
properties (Access = public)
|
properties (Access = public)
|
||||||
|
TrapPotentialType;
|
||||||
TrapFrequency;
|
TrapFrequency;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user