Cosmetic changes, added argument to allow setting of lower velocity limit.

This commit is contained in:
Karthik 2021-07-14 20:11:16 +02:00
parent cb354b9ac7
commit d8a43ad153

View File

@ -1,4 +1,4 @@
function plotPhaseSpaceWithAccelerationField(obj, MaximumVelocity, NumberOfBins, IncidentAtomDirection, IncidentAtomPosition)
function plotPhaseSpaceWithAccelerationField(obj, MinimumVelocity, MaximumVelocity, NumberOfBins, IncidentAtomDirection, IncidentAtomPosition)
f_h = Helper.getFigureByTag('Phase Space Plot');
set(groot,'CurrentFigure',f_h);
@ -49,21 +49,21 @@ function plotPhaseSpaceWithAccelerationField(obj, MaximumVelocity, NumberOfBins,
%-------------------------------------------------------------------------
Y = linspace(0,MaximumVelocity,N);
ParticleDynamicalQuantities = zeros(length(Y),int64(T/tau),6);
Y = linspace(MinimumVelocity, MaximumVelocity,N);
DynamicalQuantities = zeros(length(Y),int64(T/tau),6);
for i=1:length(Y)
x =-L/2;
vx = Y(i)*cos(Theta);
vz = Y(i)*sin(Theta);
r = [x,0,z];
v = [vx,0,vz];
ParticleDynamicalQuantities(i,:,:) = obj.solver(r, v);
DynamicalQuantities(i,:,:) = obj.solver(r, v);
end
hold on
for i=1:length(Y)
plot(ParticleDynamicalQuantities(i,:,1),ParticleDynamicalQuantities(i,:,4),'w','linewidth',1.3)
plot(DynamicalQuantities(i,:,1),DynamicalQuantities(i,:,4),'w','linewidth',1.3)
end
hold off