Minor mods
This commit is contained in:
parent
f972dbe0e1
commit
1e5e41e042
@ -1,4 +1,4 @@
|
|||||||
function [Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, ExtractedTrapFrequencies] = computeTrapPotential(w_x, w_z, Power, options)
|
function [Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, ExtractedTrapFrequencies] = computeTrapPotential(options)
|
||||||
|
|
||||||
alpha = options.Polarizability;
|
alpha = options.Polarizability;
|
||||||
|
|
||||||
@ -9,6 +9,10 @@ function [Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelv
|
|||||||
astigmatism = options.Astigmatism;
|
astigmatism = options.Astigmatism;
|
||||||
modulation = options.Modulation;
|
modulation = options.Modulation;
|
||||||
crossed = options.Crossed;
|
crossed = options.Crossed;
|
||||||
|
|
||||||
|
Power = options.Power;
|
||||||
|
w_x = options.w_x;
|
||||||
|
w_z = options.w_z;
|
||||||
|
|
||||||
% Apply modulation if necessary
|
% Apply modulation if necessary
|
||||||
if modulation
|
if modulation
|
||||||
|
@ -1,64 +1,59 @@
|
|||||||
%% Physical constants
|
%% Physical constants
|
||||||
PlanckConstant = 6.62607015E-34;
|
PlanckConstant = 6.62607015E-34;
|
||||||
PlanckConstantReduced = 6.62607015E-34/(2*pi);
|
PlanckConstantReduced = 6.62607015E-34/(2*pi);
|
||||||
FineStructureConstant = 7.2973525698E-3;
|
FineStructureConstant = 7.2973525698E-3;
|
||||||
ElectronMass = 9.10938291E-31;
|
ElectronMass = 9.10938291E-31;
|
||||||
GravitationalConstant = 6.67384E-11;
|
GravitationalConstant = 6.67384E-11;
|
||||||
ProtonMass = 1.672621777E-27;
|
ProtonMass = 1.672621777E-27;
|
||||||
AtomicMassUnit = 1.660539066E-27;
|
AtomicMassUnit = 1.660539066E-27;
|
||||||
BohrRadius = 5.2917721067E-11;
|
BohrRadius = 5.2917721067E-11;
|
||||||
BohrMagneton = 9.274009994E-24;
|
BohrMagneton = 9.274009994E-24;
|
||||||
BoltzmannConstant = 1.38064852E-23;
|
BoltzmannConstant = 1.38064852E-23;
|
||||||
StandardGravityAcceleration = 9.80665;
|
StandardGravityAcceleration = 9.80665;
|
||||||
SpeedOfLight = 299792458;
|
SpeedOfLight = 299792458;
|
||||||
StefanBoltzmannConstant = 5.670373E-8;
|
StefanBoltzmannConstant = 5.670373E-8;
|
||||||
ElectronCharge = 1.602176634E-19;
|
ElectronCharge = 1.602176634E-19;
|
||||||
VacuumPermeability = 1.25663706212E-6;
|
VacuumPermeability = 1.25663706212E-6;
|
||||||
DielectricConstant = 8.8541878128E-12;
|
DielectricConstant = 8.8541878128E-12;
|
||||||
ElectronGyromagneticFactor = -2.00231930436153;
|
ElectronGyromagneticFactor = -2.00231930436153;
|
||||||
AvogadroConstant = 6.02214076E23;
|
AvogadroConstant = 6.02214076E23;
|
||||||
ZeroKelvin = 273.15;
|
ZeroKelvin = 273.15;
|
||||||
GravitationalAcceleration = 9.80553;
|
GravitationalAcceleration = 9.80553;
|
||||||
VacuumPermittivity = 1 / (SpeedOfLight^2 * VacuumPermeability);
|
VacuumPermittivity = 1 / (SpeedOfLight^2 * VacuumPermeability);
|
||||||
HartreeEnergy = ElectronCharge^2 / (4 * pi * VacuumPermittivity * BohrRadius);
|
HartreeEnergy = ElectronCharge^2 / (4 * pi * VacuumPermittivity * BohrRadius);
|
||||||
AtomicUnitOfPolarizability = (ElectronCharge^2 * BohrRadius^2) / HartreeEnergy; % Or simply 4*pi*VacuumPermittivity*BohrRadius^3
|
AtomicUnitOfPolarizability = (ElectronCharge^2 * BohrRadius^2) / HartreeEnergy; % Or simply 4*pi*VacuumPermittivity*BohrRadius^3
|
||||||
|
|
||||||
% Dy specific constants
|
% Dy specific constants
|
||||||
Dy164Mass = 163.929174751*AtomicMassUnit;
|
Dy164Mass = 163.929174751*AtomicMassUnit;
|
||||||
Dy164IsotopicAbundance = 0.2826;
|
Dy164IsotopicAbundance = 0.2826;
|
||||||
DyMagneticMoment = 9.93*BohrMagneton;
|
DyMagneticMoment = 9.93*BohrMagneton;
|
||||||
|
|
||||||
% Parameters
|
|
||||||
Power = 40;
|
|
||||||
w_x = 30 * 1e-6; % Beam waist in X direction in meters
|
|
||||||
w_z = 30 * 1e-6; % Beam waist in Z direction in meters
|
|
||||||
|
|
||||||
|
%% Parameters
|
||||||
options = struct;
|
options = struct;
|
||||||
|
|
||||||
options.Axis = 3; % axis referenced to the beam along which you want the dipole trap potential
|
options.Axis = 3; % axis referenced to the beam along which you want the dipole trap potential
|
||||||
options.Extent = 1E2; % range of spatial coordinates in one direction to calculate trap potential over
|
options.Extent = 1E2; % range of spatial coordinates in one direction to calculate trap potential over
|
||||||
|
|
||||||
options.Crossed = false; % angle between arms in degrees
|
options.Crossed = false; % angle between arms in degrees
|
||||||
options.Delta = 70;
|
options.Delta = 70;
|
||||||
|
options.Modulation = false; % required aspect ratio of modulated arm
|
||||||
options.Modulation = false; % required aspect ratio of modulated arm
|
|
||||||
options.ModulationFunction = 'arccos';
|
options.ModulationFunction = 'arccos';
|
||||||
options.ModulationAmplitude = 2.16;
|
options.ModulationAmplitude = 2.16;
|
||||||
options.AspectRatio = 4;
|
options.AspectRatio = 4;
|
||||||
|
|
||||||
options.Gravity = false;
|
options.Gravity = false;
|
||||||
options.TiltGravity = false;
|
options.TiltGravity = false;
|
||||||
options.Theta = 0.75; % gravity tilt angle in degrees
|
options.Theta = 0.75; % gravity tilt angle in degrees
|
||||||
options.TiltAxis = [1, 0, 0]; % lab space coordinates are rotated about x-axis in reference frame of beam
|
options.TiltAxis = [1, 0, 0]; % lab space coordinates are rotated about x-axis in reference frame of beam
|
||||||
|
|
||||||
options.Astigmatism = false;
|
options.Astigmatism = false;
|
||||||
options.DisplacementFoci = 2.5 * 1e-3; % difference in position of the foci along the propagation direction in meters
|
options.DisplacementFoci = 2.5 * 1e-3; % difference in position of the foci along the propagation direction in meters
|
||||||
options.ExtractTrapFrequencies = false;
|
options.ExtractTrapFrequencies = false;
|
||||||
|
|
||||||
options.Mass = Dy164Mass;
|
options.Mass = Dy164Mass;
|
||||||
options.MagneticMoment = DyMagneticMoment;
|
options.MagneticMoment = DyMagneticMoment;
|
||||||
|
|
||||||
|
options.Power = 40;
|
||||||
|
options.w_x = 30 * 1e-6; % Beam waist in X direction in meters
|
||||||
|
options.w_z = 30 * 1e-6; % Beam waist in Z direction in meters
|
||||||
options.Polarizability = 180;
|
options.Polarizability = 180;
|
||||||
options.Wavelength = 532E-9;
|
options.Wavelength = 1064E-9;
|
||||||
|
|
||||||
% Initialize variables
|
% Initialize variables
|
||||||
|
|
||||||
@ -66,12 +61,14 @@ ComputedPotentials = {};
|
|||||||
Params = {};
|
Params = {};
|
||||||
|
|
||||||
% Call the function to compute trap potential
|
% Call the function to compute trap potential
|
||||||
[Positions, IdealTrappingPotential, TrappingPotential, TrapDepthsInKelvin, ExtractedTrapFrequencies] = Calculator.computeTrapPotential(w_x, w_z, Power, options);
|
[Positions, IdealTrappingPotential, ...
|
||||||
|
TrappingPotential, TrapDepthsInKelvin, ...
|
||||||
|
ExtractedTrapFrequencies] = Calculator.computeTrapPotential(options);
|
||||||
|
|
||||||
% Store computed potentials and parameters
|
% Store computed potentials and parameters
|
||||||
ComputedPotentials{end+1} = IdealTrappingPotential;
|
ComputedPotentials{end+1} = IdealTrappingPotential;
|
||||||
ComputedPotentials{end+1} = TrappingPotential;
|
ComputedPotentials{end+1} = TrappingPotential;
|
||||||
Params{end+1} = {TrapDepthsInKelvin, ExtractedTrapFrequencies};
|
Params{end+1} = {TrapDepthsInKelvin, ExtractedTrapFrequencies};
|
||||||
|
|
||||||
% Call plot function to visualize the potentials
|
% Call plot function to visualize the potentials
|
||||||
Plotter.plotPotential(Positions, ComputedPotentials, options, Params, [], false);
|
Plotter.plotPotential(Positions, ComputedPotentials, options, Params, [], false);
|
||||||
|
Loading…
Reference in New Issue
Block a user