Standard Map

From Tom Stix (1992, 2nd Edition) p. 467
For Plasma Physics II

SetDirectory[NotebookDirectory[]]

Trig

Sum[Cos[x - n t], {n, -N, N}]

%//Simplify

Plot[{Sin[(1/2 + N)t]/Sin[t/2] /. N -> 5,Sin[(1/2 + N)t]/Sin[t/2] /. N -> 10}, {t, -π, π}, PlotRange -> All]

Map

sMap[κ_][{x_,v_}] := {Mod[x + v,2π,-π], Mod[v - κ Sin[x+v],2π,-π]}

Example: Trapped

m1 = NestList[sMap[0.3][#]&, {0.1,0.3}, 1000];

ListPlot[m1]

Dimensions[m1]

ListPlot[{m1[[1;;100,1]],m1[[1;;100,2]]}, Joined -> True]

Example: Not Trapped

m1 = NestList[sMap[0.3][#]&, {0.1,1.3}, 1000];

ListPlot[m1]

Dimensions[m1]

ListPlot[{m1[[1;;100,1]],m1[[1;;100,2]]}, Joined -> True]

kMap = 0.3

kMap = 0.3;

mOrbits = ParallelTable[NestList[sMap[kMap][#]&, {0.1 + d,0.3 + d}, 2000], {d,-π, π, 0.1}];

ListPlot[mOrbits, Frame -> True, FrameLabel -> {"x","v"}, PlotLabel -> "Standard Map κ = "<>ToString[kMap],LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}]

kMap = 1.05

kMap = 1.05;

mOrbits = ParallelTable[NestList[sMap[kMap][#]&, {0.1 + d,0.3 + d}, 2000], {d,-π, π, 0.1}];

ListPlot[mOrbits, Frame -> True, FrameLabel -> {"x","v"}, PlotLabel -> "Standard Map κ = "<>ToString[kMap],LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}]

Export["StandardMap_"<>ToString[kMap]<>".jpg",%, ImageResolution-> 288]

kMap = 1.75

kMap = 1.75;

mOrbits = ParallelTable[NestList[sMap[kMap][#]&, {0.1 + d,0.3 + d}, 2000], {d,-π, π, 0.1}];

ListPlot[mOrbits, Frame -> True, FrameLabel -> {"x","v"}, PlotLabel -> "Standard Map κ = "<>ToString[kMap],LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}]

Velocity Space Diffusion

numParticles = 1000;

initParticles = Table[{RandomReal[{2.5,2.6}],RandomReal[{1.0,1.1}]},numParticles];

Mean[initParticles[[All,2]]]

StandardDeviation[initParticles[[All,2]]]

Histogram[initParticles[[All,2]],{0.0, 3.0, 0.1} , PlotRange -> All, Frame -> True]

kMap = 0.3;

Nest[sMap[kMap][#]&,initParticles[[1]],1000]

(finalParticles = ParallelTable[Nest[sMap[kMap][#]&,initParticles[[i]],500],{i, numParticles}];) // Timing

Mean[finalParticles[[All,2]]]

StandardDeviation[finalParticles[[All,2]]]

Dimensions[finalParticles]

vDiffusion[k_] := Module[{final},
final= ParallelTable[Nest[sMap[k][#]&,initParticles[[i]],500],{i, numParticles}];
StandardDeviation[final[[All,2]]]]

vDiffData = Table[{k,vDiffusion[k]}, {k, 0.1, 1.8, 0.1}];

ListPlot[vDiffData,Frame -> True, FrameLabel -> {"κ","Δv"}, PlotLabel -> "Standard Map Velocity Diffusion",LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}];
ListPlot[vDiffData,Frame -> True, Joined -> True,FrameLabel -> {"κ","Δv"}, PlotLabel -> "Standard Map Velocity Diffusion",LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}];
Show[%,%%]

Trajectories

kMap = 0.3

kMap = 0.3;

(finalOrbits = ParallelTable[NestList[sMap[kMap][#]&,initParticles[[i]],500],{i, numParticles}];) // Timing

Dimensions[finalOrbits]

Histogram[finalOrbits[[All,1,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True]

Histogram[finalOrbits[[All,500,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ]

ListAnimate[Table[Histogram[finalOrbits[[All,n,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ], {n, 1, 200, 1}],AnimationRunning->False]

ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}]]

Fit[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}], {Sqrt[n]}, n]

Plot[%, {n, 0, 200}];
ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}]];
Show[%,%%]

kMap = 0.7

kMap = 0.7;

(finalOrbits = ParallelTable[NestList[sMap[kMap][#]&,initParticles[[i]],500],{i, numParticles}];) // Timing

Dimensions[finalOrbits]

Histogram[finalOrbits[[All,1,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True]

Histogram[finalOrbits[[All,500,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ]

ListAnimate[Table[Histogram[finalOrbits[[All,n,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ], {n, 1, 200, 1}],AnimationRunning->False]

ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}]]

Fit[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}], {Sqrt[n]}, n]

Plot[%, {n, 0, 200}];
ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}]];
Show[%,%%]

kMap = 1.1

kMap = 1.1;

(finalOrbits = ParallelTable[NestList[sMap[kMap][#]&,initParticles[[i]],500],{i, numParticles}];) // Timing

Dimensions[finalOrbits]

Histogram[finalOrbits[[All,1,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True]

Histogram[finalOrbits[[All,500,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ]

ListAnimate[Table[Histogram[finalOrbits[[All,n,2]],{0.0, 3.0, 0.1} , PlotRange -> {0, 1000}, Frame -> True ], {n, 1, 200, 1}],AnimationRunning->False]

ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}]]

Fit[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}], {Sqrt[n]}, n]

Plot[%, {n, 0, 200}, PlotStyle -> Red];
ListPlot[Table[{n,StandardDeviation[finalOrbits[[All,n,2]]]}, {n, 1, 200}],FrameLabel -> {"n","Δv"}, Frame -> True,PlotLabel -> "Standard Map Velocity Diffusion κ = "<>ToString[kMap],LabelStyle->{FontSize -> 14,Directive[Black,FontFamily->"Helvetica"]}];
Show[%,%%]

Export["StandardMap_Diffusion.jpg",%, ImageResolution-> 288]