142 lines
8.8 KiB
Matlab
142 lines
8.8 KiB
Matlab
function setInitialConditions(this, varargin)
|
|
|
|
p = inputParser;
|
|
p.KeepUnmatched = true;
|
|
addParameter(p, 'NumberOfAtoms', 5000,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'BluePower', 200e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'BlueDetuning', -1.5*Helper.PhysicsConstants.BlueLinewidth,...
|
|
@(x) assert(isnumeric(x) && isscalar(x)));
|
|
addParameter(p, 'BlueBeamWaist', 10e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'SidebandPower', 200e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'SidebandDetuning', 0,...
|
|
@(x) assert(isnumeric(x) && isscalar(x)));
|
|
addParameter(p, 'SidebandBeamWaist', 12e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'PushBeamPower', 10e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'PushBeamDetuning', 0,...
|
|
@(x) assert(isnumeric(x) && isscalar(x)));
|
|
addParameter(p, 'PushBeamWaist', 0.81e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'OrangePower', 70e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'OrangeDetuning', 12e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x)));
|
|
addParameter(p, 'OrangeBeamWaist', 12e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'ZeemanSlowerBeamPower', 200e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'ZeemanSlowerBeamDetuning', -7*Helper.PhysicsConstants.BlueLinewidth,...
|
|
@(x) assert(isnumeric(x) && isscalar(x)));
|
|
addParameter(p, 'ZeemanSlowerBeamWaist', 7e-3,...
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
addParameter(p, 'MagneticGradient', 0.425,... % T/m
|
|
@(x) assert(isnumeric(x) && isscalar(x) && (x > 0)));
|
|
|
|
p.parse(varargin{:});
|
|
|
|
this.NumberOfAtoms = p.Results.NumberOfAtoms;
|
|
this.BluePower = p.Results.BluePower;
|
|
this.BlueDetuning = p.Results.BlueDetuning;
|
|
this.BlueBeamWaist = p.Results.BlueBeamWaist;
|
|
this.SidebandPower = p.Results.SidebandPower;
|
|
this.SidebandDetuning = p.Results.SidebandDetuning;
|
|
this.SidebandBeamWaist = p.Results.SidebandBeamWaist;
|
|
this.PushBeamPower = p.Results.PushBeamPower;
|
|
this.PushBeamDetuning = p.Results.PushBeamDetuning;
|
|
this.PushBeamWaist = p.Results.PushBeamWaist;
|
|
this.OrangePower = p.Results.OrangePower;
|
|
this.OrangeDetuning = p.Results.OrangeDetuning;
|
|
this.OrangeBeamWaist = p.Results.OrangeBeamWaist;
|
|
this.ZeemanSlowerBeamPower = p.Results.ZeemanSlowerBeamPower;
|
|
this.ZeemanSlowerBeamDetuning = p.Results.ZeemanSlowerBeamDetuning;
|
|
this.ZeemanSlowerBeamWaist = p.Results.ZeemanSlowerBeamWaist;
|
|
this.MagneticGradient = p.Results.MagneticGradient;
|
|
|
|
%% Set general parameters according to simulation mode
|
|
switch this.SimulationMode
|
|
case "2D"
|
|
this.CoolingBeamPower = this.BluePower;
|
|
this.CoolingBeamWaist = this.BlueBeamWaist;
|
|
this.CoolingBeamLinewidth = Helper.PhysicsConstants.BlueLinewidth;
|
|
this.CoolingBeamWaveVector = this.BlueWaveVector;
|
|
this.CoolingBeamDetuning = this.BlueDetuning;
|
|
this.CoolingBeamRadius = this.BlueBeamRadius;
|
|
this.CoolingBeamWaist = this.BlueBeamWaist;
|
|
this.CoolingBeamSaturationIntensity = this.BlueSaturationIntensity;
|
|
this.SidebandBeamRadius = this.BlueBeamRadius;
|
|
this.SidebandBeamSaturationIntensity = this.BlueSaturationIntensity;
|
|
this.PushBeamLinewidth = Helper.PhysicsConstants.OrangeLinewidth;
|
|
this.PushBeamWaveVector = this.OrangeWaveVector;
|
|
this.PushBeamDetuning = this.OrangeDetuning;
|
|
this.PushBeamSaturationIntensity = this.OrangeSaturationIntensity;
|
|
this.LandegFactor = Helper.PhysicsConstants.BlueLandegFactor;
|
|
this.MagneticSubLevel = 1;
|
|
case "3D"
|
|
% Development In progress
|
|
end
|
|
|
|
|
|
%% - store in struct
|
|
this.SimulationParameters = struct;
|
|
this.SimulationParameters.SimulationMode = this.SimulationMode;
|
|
this.SimulationParameters.TimeStep = this.TimeStep;
|
|
this.SimulationParameters.SimulationTime = this.SimulationTime;
|
|
this.SimulationParameters.NumberOfAtoms = this.NumberOfAtoms;
|
|
this.SimulationParameters.NozzleLength = this.NozzleLength;
|
|
this.SimulationParameters.NozzleRadius = this.NozzleRadius;
|
|
this.SimulationParameters.Beta = this.Beta;
|
|
this.SimulationParameters.ApertureCut = this.ApertureCut;
|
|
this.SimulationParameters.OvenDistance = this.OvenDistance;
|
|
this.SimulationParameters.OvenTemperature = this.OvenTemperature;
|
|
this.SimulationParameters.MagneticGradient = this.MagneticGradient;
|
|
this.SimulationParameters.NozzleExitDivergence = this.NozzleExitDivergence;
|
|
this.SimulationParameters.MOTExitDivergence = this.MOTExitDivergence;
|
|
this.SimulationParameters.MOTDistance = this.MOTDistance;
|
|
this.SimulationParameters.BluePower = this.BluePower;
|
|
this.SimulationParameters.BlueDetuning = this.BlueDetuning;
|
|
this.SimulationParameters.BlueBeamRadius = this.BlueBeamRadius;
|
|
this.SimulationParameters.BlueBeamWaist = this.BlueBeamWaist;
|
|
this.SimulationParameters.BlueSaturationIntensity = this.BlueSaturationIntensity;
|
|
this.SimulationParameters.OrangePower = this.OrangePower;
|
|
this.SimulationParameters.OrangeDetuning = this.OrangeDetuning;
|
|
this.SimulationParameters.OrangeBeamRadius = this.OrangeBeamRadius;
|
|
this.SimulationParameters.OrangeBeamWaist = this.OrangeBeamWaist;
|
|
this.SimulationParameters.OrangeSaturationIntensity = this.OrangeSaturationIntensity;
|
|
this.SimulationParameters.SidebandPower = this.SidebandPower;
|
|
this.SimulationParameters.SidebandDetuning = this.SidebandDetuning;
|
|
this.SimulationParameters.SidebandBeamRadius = this.SidebandBeamRadius;
|
|
this.SimulationParameters.SidebandBeamWaist = this.SidebandBeamWaist;
|
|
this.SimulationParameters.SidebandBeamSaturationIntensity = this.SidebandBeamSaturationIntensity;
|
|
this.SimulationParameters.PushBeamPower = this.PushBeamPower;
|
|
this.SimulationParameters.PushBeamDetuning = this.PushBeamDetuning;
|
|
this.SimulationParameters.PushBeamRadius = this.PushBeamRadius;
|
|
this.SimulationParameters.PushBeamWaist = this.PushBeamWaist;
|
|
this.SimulationParameters.PushBeamDistance = this.PushBeamDistance;
|
|
this.SimulationParameters.DistanceBetweenPushBeamAnd3DMOTCenter = this.DistanceBetweenPushBeamAnd3DMOTCenter;
|
|
this.SimulationParameters.PushBeamSaturationIntensity = this.PushBeamSaturationIntensity;
|
|
this.SimulationParameters.TotalPower = this.TotalPower;
|
|
this.SimulationParameters.LandegFactor = this.LandegFactor;
|
|
this.SimulationParameters.MagneticSubLevel = this.MagneticSubLevel;
|
|
this.SimulationParameters.CoolingBeamSaturationParameter = this.CoolingBeamSaturationParameter;
|
|
this.SimulationParameters.SidebandSaturationParameter = this.SidebandSaturationParameter;
|
|
this.SimulationParameters.PushBeamSaturationParameter = this.PushBeamSaturationParameter;
|
|
this.SimulationParameters.OvenTemperatureinKelvin = this.OvenTemperatureinKelvin;
|
|
this.SimulationParameters.AverageVelocity = this.AverageVelocity;
|
|
this.SimulationParameters.AtomicBeamDensity = this.AtomicBeamDensity;
|
|
this.SimulationParameters.MeanFreePath = this.MeanFreePath;
|
|
this.SimulationParameters.CollisionTime = this.CollisionTime;
|
|
|
|
if strcmpi(this.SimulationMode, '3D')
|
|
this.SimulationParameters.ZeemanSlowerBeamPower = this.ZeemanSlowerBeamPower;
|
|
this.SimulationParameters.ZeemanSlowerBeamDetuning = this.ZeemanSlowerBeamDetuning;
|
|
this.SimulationParameters.ZeemanSlowerBeamRadius = this.ZeemanSlowerBeamRadius;
|
|
this.SimulationParameters.ZeemanSlowerBeamBeamWaist = this.ZeemanSlowerBeamWaist;
|
|
this.SimulationParameters.ZeemanSlowerBeamSaturationIntensity = this.ZeemanSlowerBeamSaturationIntensity;
|
|
this.SimulationParameters.ZeemanSlowerBeamSaturationParameter = this.ZeemanSlowerBeamSaturationParameter;
|
|
end
|
|
end |