From 951c2e3935730ebfc7743778be70c7001226f18d Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Sun, 11 Jul 2021 14:38:37 +0200 Subject: [PATCH] Determines the distribution of times spent by atom in the MOT interaction volume to be used to compute the collision probability between the incoming hot atoms and the atoms slowed near the center of the MOT. --- .../computeTimeSpentInInteractionRegion.m | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 MOT Capture Process Simulation/@MOTSimulator/computeTimeSpentInInteractionRegion.m diff --git a/MOT Capture Process Simulation/@MOTSimulator/computeTimeSpentInInteractionRegion.m b/MOT Capture Process Simulation/@MOTSimulator/computeTimeSpentInInteractionRegion.m new file mode 100644 index 0000000..b7d9705 --- /dev/null +++ b/MOT Capture Process Simulation/@MOTSimulator/computeTimeSpentInInteractionRegion.m @@ -0,0 +1,20 @@ +function T = computeTimeSpentInInteractionRegion(this, r) +% INPUT: +% r : N x 3 array. N is the number of time steps +% OUTPUT +% T : gives the distribution of time spent in the interaction region +% USAGE: +% T = this.computeTimeSpentInInteractionRegion(r) + + T = 0; + NumberOfTimeSteps = int64(this.SimulationTime/this.TimeStep); + for n = 1:(NumberOfTimeSteps - 1) + dr = Helper.calculateDistanceFromPointToLine(r(n+1, :), [0 0 0], [1 0 0]); + if dr < this.CoolingBeamRadius + A = 1; + else + A = 0; + end + T = T + A * this.TimeStep; + end +end \ No newline at end of file