Modified to determine the distance between atom and the z-axis and checked to see if that is within the diameter of the beams - this makes sense since the beams are crossed and the condition that the distance be smaller than the beam diameter holds only along the y-axis.

This commit is contained in:
Karthik 2021-07-11 14:51:17 +02:00
parent 5b91c20246
commit f789a7ad6a

View File

@ -9,7 +9,7 @@ function T = computeTimeSpentInInteractionRegion(this, r)
T = 0; T = 0;
NumberOfTimeSteps = int64(this.SimulationTime/this.TimeStep); NumberOfTimeSteps = int64(this.SimulationTime/this.TimeStep);
for n = 1:(NumberOfTimeSteps - 1) for n = 1:(NumberOfTimeSteps - 1)
dr = Helper.calculateDistanceFromPointToLine(r(n+1, :), [0 0 0], [1 0 0]); dr = Helper.calculateDistanceFromPointToLine(r(n+1, :), [0 0 0], [0 0 1]);
if dr < this.CoolingBeamRadius if dr < this.CoolingBeamRadius
A = 1; A = 1;
else else