File:NegativeTemperature.webm

Summary

Description
English: In classical statistical mechanics temperature tells you how likely it is to occupy a given energy level. At T=0 all particles occupy the ground state. For T>0 higher energy levels become accessible, with a probability given by the Boltzmann distribution, which is essentially en exponential, so states with energies higher than ~kB T (where "kB" is the Boltzmann constant) are unlikely to be occupied. For T=∞ all states are equiprobable. On the other hand there are cases where you have more population in higher energy levels than in the lower ones (e.g. in laser's population inversion). How to describe this case?

Enter negative temperatures.

If we use a negative temperature we "flip" the Boltzmann distribution, making higher energy levels more likely to be populated. Oddly, a large negative temperature lead to a distribution not too dissimilar from the one from a large positive temperature. But a small negative temperature means that almost all particles will populate the highest energy levels. In a sense a negative temperature is MUCH hotter than a positive one!
Date
Source https://twitter.com/j_bertolotti/status/1366420591247560707
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929


Mathematica 12.0 code

n = 1000;
Emax = 100;
kb = 1;
T = -(Emax/kb)*0.01;
\[Delta] = 1;
tsteps = Table[Emax/kb E^t, {t, Log[0.01], Log[5], (Log[5] - Log[0.01])/100}];
frames = Table[
   \[ScriptCapitalD] = ProbabilityDistribution[E^(-(x/(kb T)))/Sum[E^(-(j/(kb T))), {j, 0, Emax, 1}], {x, 0, Emax, 1}];
   occupation = Transpose[{Range[Emax], BinCounts[RandomVariate[\[ScriptCapitalD], n], {1, Emax + 1, 1} ]
      }];
   Graphics[{
     Blue, 
     Table[Line[{{0, j}, {Emax*\[Delta], j}}], {j, 0, Emax*\[Delta], \[Delta]}],
     Black, 
     Table[Disk[{(Emax*\[Delta]*j)/(occupation[[k, 2]] + 1) + RandomReal[{-5, 5}], occupation[[k, 1]]}, \[Delta]], {k, 1, Emax}, {j, 1, occupation[[k, 2]]}]
     ,
     Text[ Style["\!\(\*SubscriptBox[\(E\), \(0\)]\)", Black, Bold, FontSize -> 16], {-5, 0}],
     Text[ Style["\!\(\*SubscriptBox[\(E\), \(max\)]\)", Black, Bold, FontSize -> 16], {-5, Emax}],
     Text[ Style[StringForm["T=`` \!\(\*SubscriptBox[\(E\), \\(max\)]\)/\!\(\*SubscriptBox[\(k\), \(b\)]\)", NumberForm[T/Emax*kb, {3, 2}]], Black, Bold, FontSize -> 16], {Emax/2, Emax + 7}]
     }, PlotRange -> {{-(Emax/10), Emax + Emax/10}, {-(Emax/10), Emax + Emax/10}}]
   , {T, tsteps}];
(**)
occupation = Table[{j, n/Emax}, {j, 1, Emax}];
framesInf = Table[
   Graphics[{
     Blue, 
     Table[Line[{{0, j}, {Emax*\[Delta], j}}], {j, 0, Emax*\[Delta], \[Delta]}],
     Black, 
     Table[Disk[{(Emax*\[Delta]*j)/(occupation[[k, 2]] + 1) + RandomReal[{-5, 5}], occupation[[k, 1]]}, \[Delta]], {k, 1, Emax}, {j, 1, occupation[[k, 2]]}]
     ,
     Text[Style["\!\(\*SubscriptBox[\(E\), \(0\)]\)", Black, Bold, FontSize -> 16], {-5, 0}],
     Text[Style["\!\(\*SubscriptBox[\(E\), \(max\)]\)", Black, Bold, FontSize -> 16], {-5, Emax}],
     Text[Style[StringForm["T=\[Infinity] \!\(\*SubscriptBox[\(E\), \\(max\)]\)/\!\(\*SubscriptBox[\(k\), \(b\)]\)", NumberForm[T/Emax*kb, {3, 2}]], Black, Bold, FontSize -> 16], {Emax/2, Emax + 7}]
     }, PlotRange -> {{-(Emax/10), Emax + Emax/10}, {-(Emax/10), Emax + Emax/10}}]
   , {10}];
(**)
occupation = Table[{j, If[j == 1, n, 0]}, {j, 1, Emax}];
frames0 = Table[
   Graphics[{
     Blue, 
     Table[Line[{{0, j}, {Emax*\[Delta], j}}], {j, 0, Emax*\[Delta], \[Delta]}],
     Black, 
     Table[Disk[{(Emax*\[Delta]*j)/(occupation[[k, 2]] + 1), occupation[[k, 1]]}, \[Delta]], {k, 1, Emax}, {j, 1, occupation[[k, 2]]}]
     ,
     Text[Style["\!\(\*SubscriptBox[\(E\), \(0\)]\)", Black, Bold, FontSize -> 16], {-5, 0}],
     Text[Style["\!\(\*SubscriptBox[\(E\), \(max\)]\)", Black, Bold, FontSize -> 16], {-5, Emax}],
     Text[Style[StringForm["T=0 \!\(\*SubscriptBox[\(E\), \(max\)]\)/\!\(\*SubscriptBox[\\(k\), \(b\)]\)", NumberForm[T/Emax*kb, {3, 2}]], Black, Bold, FontSize -> 16], {Emax/2, Emax + 7}]
     }, PlotRange -> {{-(Emax/10), Emax + Emax/10}, {-(Emax/10), Emax + Emax/10}}]
   , {1}];
(**)
tsteps = Table[-(Emax/kb) E^t, {t, Log[0.01], Log[5], (Log[5] - Log[0.01])/100}];
framesNeg = Table[
   \[ScriptCapitalD] = ProbabilityDistribution[E^(-(x/(kb T)))/Sum[E^(-(j/(kb T))), {j, 0, Emax, 1}], {x, 0, Emax, 1}];
   occupation = Transpose[{Range[Emax], BinCounts[RandomVariate[\[ScriptCapitalD], n], {1, Emax + 1, 1} ]
      }];
   Graphics[{
     Blue, 
     Table[Line[{{0, j}, {Emax*\[Delta], j}}], {j, 0, Emax*\[Delta], \[Delta]}],
     Black, 
     Table[Disk[{(Emax*\[Delta]*j)/(occupation[[k, 2]] + 1) + RandomReal[{-5, 5}], occupation[[k, 1]]}, \[Delta]], {k, 1, Emax}, {j, 1, occupation[[k, 2]]}]
     ,
     Text[Style["\!\(\*SubscriptBox[\(E\), \(0\)]\)", Black, Bold, FontSize -> 16], {-5, 0}],
     Text[Style["\!\(\*SubscriptBox[\(E\), \(max\)]\)", Black, Bold, FontSize -> 16], {-5, Emax}],
     Text[Style[StringForm["T=`` \!\(\*SubscriptBox[\(E\), \\(max\)]\)/\!\(\*SubscriptBox[\(k\), \(b\)]\)", NumberForm[T/Emax*kb, {3, 2}]], Black, Bold, FontSize -> 16], {Emax/2, Emax + 7}]
     }, PlotRange -> {{-(Emax/10), Emax + Emax/10}, {-(Emax/10), Emax + Emax/10}}]
   , {T, tsteps}];

Licensing

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.

Category:CC-Zero#NegativeTemperature.webm
Category:Self-published work Category:Temperature Category:Images with Mathematica source code Category:Uploaded with video2commons
Category:CC-Zero Category:Images with Mathematica source code Category:Pages using deprecated source tags Category:Self-published work Category:Temperature Category:Uploaded with video2commons