Cosmetic changes, added argument to allow setting of lower velocity limit.
This commit is contained in:
parent
cb354b9ac7
commit
d8a43ad153
@ -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');
|
f_h = Helper.getFigureByTag('Phase Space Plot');
|
||||||
set(groot,'CurrentFigure',f_h);
|
set(groot,'CurrentFigure',f_h);
|
||||||
@ -49,21 +49,21 @@ function plotPhaseSpaceWithAccelerationField(obj, MaximumVelocity, NumberOfBins,
|
|||||||
|
|
||||||
%-------------------------------------------------------------------------
|
%-------------------------------------------------------------------------
|
||||||
|
|
||||||
Y = linspace(0,MaximumVelocity,N);
|
Y = linspace(MinimumVelocity, MaximumVelocity,N);
|
||||||
ParticleDynamicalQuantities = zeros(length(Y),int64(T/tau),6);
|
DynamicalQuantities = zeros(length(Y),int64(T/tau),6);
|
||||||
for i=1:length(Y)
|
for i=1:length(Y)
|
||||||
x =-L/2;
|
x =-L/2;
|
||||||
vx = Y(i)*cos(Theta);
|
vx = Y(i)*cos(Theta);
|
||||||
vz = Y(i)*sin(Theta);
|
vz = Y(i)*sin(Theta);
|
||||||
r = [x,0,z];
|
r = [x,0,z];
|
||||||
v = [vx,0,vz];
|
v = [vx,0,vz];
|
||||||
ParticleDynamicalQuantities(i,:,:) = obj.solver(r, v);
|
DynamicalQuantities(i,:,:) = obj.solver(r, v);
|
||||||
end
|
end
|
||||||
|
|
||||||
hold on
|
hold on
|
||||||
|
|
||||||
for i=1:length(Y)
|
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
|
end
|
||||||
|
|
||||||
hold off
|
hold off
|
||||||
|
Loading…
Reference in New Issue
Block a user