File:Fermi Gas.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Fermi_Gas.gif(480 × 297 pixels, file size: 2.29 MB, MIME type: image/gif, looped, 303 frames, 15 s)

Captions

Captions

Fermi function as a function of the temperature

Summary[edit]

Description
English: Fermions can't occupy the same energy state, so (at zero temperature) they just pile up until the last one has an energy known as the "Fermi energy". At nonzero temperature the lower energy fermions can't do anything because there is no free state to excite them too, but the ones close to the Fermi energy can be excited, and thus (e.g.) contribute to conductivity.
Date
Source https://mathstodon.xyz/@j_bertolotti/112365117189864463
Author Berto
Permission
(Reusing this file)
https://mathstodon.xyz/@j_bertolotti/111363365323269417

Mathematica 14.0 code[edit]

pfd[\[CapitalEpsilon]_, \[Mu]_, T_] := 1/(Exp[(\[CapitalEpsilon] - \[Mu])/(T)] + 1);
nparticles = 100;

plot[T_] := Module[{occupation, excited, j, n},
  occupation = Boole[RandomReal[] <= #] & /@ Table[pfd[en, nparticles, T], {en, 1, nparticles}];
  dim = Dimensions[occupation][[1]];
  excited = {};
  If[Dimensions[Position[occupation, 0]][[1]] > 0,
   For[i = 1, i <= Dimensions[Position[occupation, 0]][[1]], i++,
    j = 0;
    Until[n == 1 && (Not@MemberQ[excited, j]),
     j++;
     If[j > 3*T, Break[];];
     n = Boole[RandomReal[] <= Exp[-(nparticles + j - Position[occupation, 0][[i, 1]])/T] ];
     ];
    AppendTo[excited, j];
    ];
   occupation = 
    Join[occupation, Table[If[MemberQ[excited, j], 1, 0], {j, 1, Max[excited]}]];
   ];
  Plot[pfd[e, nparticles, T], {e, 0, 1.7*nparticles}, PlotStyle -> Directive[Thickness[0.01], Purple], Axes -> False, PlotRange -> {{-10, 1.9*nparticles}, {-0.1, 1.1}},
   Prolog -> {Orange, Rectangle[{nparticles - T, 0}, {nparticles + T, 1}], Black, Arrow[{{0, 0}, {1.9*nparticles, 0}}], Arrow[{{0, 0}, {0, 1.1}}], Text[Style["Fermi Energy", Medium, Bold], {nparticles, 1.05}], Text[Style["\!\(\*SubscriptBox[\(k\), \(B\)]\)T", Medium, Bold, Orange], {nparticles + T + 10, 0.8}]},
   Epilog -> {Table[ Disk[{j, 0}, 1*occupation[[j]]*{1, 1/nparticles}], {j, 1, Dimensions[occupation][[1]]}], Thick, Dashed, Line[{{nparticles, 0}, {nparticles, 1}}], Rotate[Text[Style["Fermi Function", Medium, Bold], {-5, 0.5}], \[Pi]/2], Text[Style["Energy", Medium, Bold], {0.8*nparticles, -0.06}]}]
  ]

sinstep[t_] := Sin[\[Pi]/2 t]^2;
frames = Flatten@Table[Table[plot[20*sinstep[t] + 0.001], {3}], {t, 0, 1, 0.01}];
ListAnimate[frames]

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current14:13, 2 May 2024Thumbnail for version as of 14:13, 2 May 2024480 × 297 (2.29 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.