Velocity and Energy Distributions in Microcanonical Ensembles of Hard
arXiv:1207.3505v2 [cond-mat.stat-mech] 29 Aug 2015 itiuin h nydsrbto aifigtefunc- the joint satisfying the distribution equation of tional only invariance The rotational by and distribution. compo- velocity published three dis- of the velocity paper of nents the independence obtained a assuming Maxwell by in tribution [1]. 1860 discussed in was Maxwell spheres hard a atr fteform the of factors has α ho,acrigt hc h eoiiso w collid- their two of molecular independent of of and velocities of uncorrelated dynamics the are assumption molecules which the the ing to for introduced according solution and chaos, stationary gas a the as [3]. appear literature physical or the Maxwell’s in physics of earlier statistical generalizations appeared in but method [2], textbooks chemistry modern physical in found be ∗ § ‡ † [email protected];www.cs.ucl.ac.uk/staff/g.germano [email protected]; [email protected] [email protected] .clssse.cu;www.sussex.ac.uk/profiles/3303 [email protected]; h rbe ftevlct itiuini a of gas a in distribution velocity the of problem The n16,Mxel[]bcm wr htE.()should (2) Eq. that aware became [4] Maxwell 1867, In 1 = 5 ytmcRs ete odnSho fEooisadPoliti and Economics of School London Centre, Risk Systemic eoiyadeeg itiuin nmcoaoia ensem microcanonical in distributions energy and Velocity , 2 2 aqeCne o ple ahmtc,Aaead Mazarred de Alameda Mathematics, Applied for Center Basque , f 4 1 .Ti ipehuitcdrvto a still can derivation heuristic simple This 3. v eateto optrSine nvriyCleeLondon College University Science, Computer of Department colo ahmtcladPyia cecs nvriyo University Sciences, Physical and Mathematical of School ( x vrl etro asposition mass of center overall adshrsi a in spheres hard (constant ensemble d aetasomdbt itiuin ihdffrn argumen different with distributions beta transformed have ASnmes 25.r0.0N,0.0U,0.0-,05.1 05.10.-a, 02.70.Uu, 02.50.Ng, 02.50.-r numbers: PACS olso esrsmlduiomyo nthl peein sphere half unit a velocitie on on uniformly only acts sampled which versor bounda algorithm, collision periodic Carlo or Monte walls our reflecting simul with hard Carlo and Monte spheres and or dynamics disks molecular Boltzmann-G with or agree results Boltzmann correspo and parameters, scale Maxwell, distributio or Maxwell-Boltzmann, beta shape the and arguments limit different thermodynamic e the individual In of tribution. distribution joint the marginalizing shown perwt u oeua yaissmltosfrtesmal the for simulations dynamics molecular our with appear 3 , 1 eateto hmsr n ZW hlpsUiest Marb Philipps-University WZMW, and Chemistry of Department namcoaoia nebe(constant ensemble microcanonical a In x , nioScalas, Enrico N .INTRODUCTION I. f , 2 v x , E α ( h onaycniin,adpsil ymtisi h in the in symmetries possible and conditions, boundary the , 3 x Φ( = ) = ) = f A v 1 exp( x ( ,2, 1, 1 2 x d dmninlvolume -dimensional 1 + VE NV ) − f ∗ x v Bx 2 2 2 dinT Gabriel, T. Adrian ( + PG x 2 2 ) x ) , 3 2 f eidcbudr odtos ihanumber a with conditions) boundary periodic , ) G v 3 h niiulvlct opnns eoiymdl,and moduli, velocity components, velocity individual the , ( x 3 Dtd oebr1,2018) 10, November (Dated: (1) ) 03 V VE NV aigattlenergy total a having (2) 3, † adrflcigwls n namlclrdynamics molecular a in and walls) reflecting hard , da Martin, Edgar ae,Blzanotnqoe awl 1] n1873, 1872 [18]: In Tait his correspondent In [16]. his Maxwell to works. wrote quotes Maxwell respective often their Boltzmann of paper, aware were and 1:2. ratios molecular mass interlieved two with of species system one-dimensional simulations a Boltzmann computer of performing the by and equations H-theorem transport time-asymmetric Boltzmann’s obtain like to as- results chaos the of molecular role the of of sumption analysis recent a provided [17] Boozer nase oLoschmidt’s to answer an [10–12]. se- 1871 a and in 1868 the way between on obtained general Based published more who papers a of Boltzmann, in ries by distribution velocity equations. followed the kinetic was for to route [5–9] approach and This Refs. mathematical collisions see modern distribution; molecular a coincide original solutions led of Maxwell’s stationary It study with whose equations detailed kinetic Boltzmann. more to by a hypothesis called to number later collision was or concept This positions. o’ qain fmto a ffcieydsrydby destroyed effectively was by the of motion stated use Boltzmann’s of as New- of equations gas understood time-reversibility was ton’s microscopic a the it of that [16]: later entropy only 1872 the of H-theorem of Boltzmann’s increase the results time-irreversible like to lead time-reversible can how dynamics questions microscopic which [15], 1876 of paradox The chap- [14]. first book the Haar’s in are ter and of results [13] ter These book Tolman’s in stationary. summarized is distribution Maxwell’s a cec,Huho tet odnW2 A,UK 2AE, WC2A London Street, Houghton Science, cal otmn n awl eentwrigi isolation in working not were Maxwell and Boltzmann .n 07.05.Tp 0.Ln, ege,wihi ymti iihe dis- Dirichlet symmetric a is which nergies, scneg ogmadsrbtoswith distributions gamma to converge ns usx amr rgtnB19H UK 9RH, BN1 Brighton Falmer, Sussex, f dn epcieyt h asin i.e., Gaussian, the to respectively nding sadsaeprmtr eedn on depending parameters shape and ts ycniin.Teareeti perfect is agreement The conditions. ry 4 80 ibo aqeCuty Spain Country, Basque Bilbao, 48009 14, o oe tet odnW1 B,UK 6BT, WC1E London Street, Gower , d etvle of values lest neednl fpstoswt the with positions of independently s toswt ieetnmeso hard of numbers different with ations iesos hl lgtdeviations slight while dimensions, bsdsrbto.Teeanalytical These distribution. ibbs 3, E Stoßzahlansatz ‡ r,302Mrug Germany Marburg, 35032 urg, oa momentum total a , n ud Germano Guido and ta odtos hscnbe can This conditions. itial N Stoßzahlansatz . lso adspheres hard of bles N Umkehreinwand otmn ol rv that prove could Boltzmann , fsot elastic smooth of Stoßzahlansatz P n an and , energies ,5, 4, nhscalculations. his in § Stoßzahlansatz rreversibility or provides 2
By the study of Boltzmann I have been un- a consequence of the CLT. Unfortunately this argument able to understand him. He could not under- is only approximately true in the case of large systems stand me on account of my shortness, and his and false for smaller systems. length was and is an equal stumbling block to In Sec. II we obtain the theoretical probability den- me. sity functions of the individual energies, velocity moduli and velocity components, starting from the fundamental More details on the relationship between Maxwell and uniform distribution law in phase space. In Sec. III we Boltzmann and on the influence of Maxwell on Boltz- present the molecular dynamics method used to simulate mann’s thought have been collected by Uffink [19]. hard spheres. Interestingly, the same distributions can be Tolman’s analysis of classical binary collisions for hard reproduced by a simple Monte Carlo stochastic model in- spheres led to rate equations which can be interpreted as troduced in Sec. IV. The numerical results are presented transition probabilities for a Markov chain after proper in Sec. V together with some statistical goodness-of-fit normalization. The interested reader can consult chap- tests. Indeed, it turns out that an equilibrium distri- ter V of Tolman’s classic book [13], in particular the bution of the velocity components seems to be reached discussion around Eq. (45.3) on page 129. The connec- already for N = 2 particles and without using any coarse tion with Markov chains was made explicit by Costantini graining. When N grows the equilibrium distribution ap- and Garibaldi [20, 21], who used a model due to Bril- proaches the normal distribution, Eq. (2). A discussion louin [22]. Before Costantini and Garibaldi, Penrose sug- and a summary follow in Sec. VI. gested that a Markovian hypothesis could justify the use of standard statistical mechanical tools [23]. According to our interpretation of Penrose, due to the limits in hu- man knowledge naturally leading to coarse graining, sys- II. THEORY tems of many interacting particles effectively behave as Markov chains. Moreover, the possible number of states We consider a fluid of N hard spheres in d dimensions of such a chain is finite even if very large, therefore only with the same diameter σ and mass m in a cuboidal the theory of finite Markov chains is useful. Statistical box with sides L , α = 1,...,d. The positions r , equilibrium is reached when the system states obey the α i i = 1,...,N, are confined to a d-dimensional box with equilibrium distribution of the finite Markov chain; this d equilibrium distribution exists, is unique and coincides volume V = α=1 Lα, i.e., each position component riα can vary in the interval [ Lα/2,Lα/2]. Elastic collisions with the stationary distribution if the chain is irreducible Q − and aperiodic. This point of view is also known as Marko- transfer kinetic energy between the particles, while the vianism. Indeed, in a recent paper on the Ehrenfest urn, total energy of the system or dogs and fleas model, we showed that, after appropri- N ate coarse graining, a Markov chain well approximates 1 1 E = m v2 = mv2 (4) the behavior of a realistic model for a fluid [24]. 2 i i 2 i=1 Here, we study the velocity distribution in a system of X N smooth elastic hard spheres in d dimensions. Even if the evolution of the system is deterministic, we can con- does not change in time, i.e., it is a constant of the mo- v sider the velocity components of each particle as random tion. Therefore, the velocities i are confined to the sur- variables. We do not consider a finitary [25] version of face of a hypersphere with radius R = 2E/m given by the model by discretizing velocities, but keep them as real the constraint that the total energy is E, i.e., each ve- locity component v can vary in thep interval [ R, R] variables. Then a heuristic justification of Eq. (2) can be iα − based on the central limit theorem (CLT). Here is the ar- with the restriction on the sum of the squares given q gument. Following Maxwell’s idea, one can consider the by Eq. (4). In other words, the rescaled positions velocity components of each particle independent from with qiα = riα/Lα are confined to the unit hypercube each other. Further assuming that velocity jumps after in dN dimensions, while the rescaled velocity compo- u v collisions are independent and identically distributed ran- nents = /R are confined to the surface of the unit dom variables, one obtains for the velocity component α hypersphere in dN dimensions defined by the constraint u = √u u = 1. of a particle i at time t · The state of the system is specified by the phase space n(t) vector of all velocities and positions Γ = (v, r), i.e., by viα(t)= viα(0) + ∆viα,j , (3) 2dN variables: the velocity components viα and the po- j=1 sition components riα. However, these variables are not X independent because of constraints. For spheres with where n(t) is the number of collisions for that particle up random velocities and positions confined in a container to time t and ∆viα,j is the change in velocity at collision with hard reflecting walls, the total energy E is conserved j. If the hypotheses stated above are valid, Eq. (3) de- and thus the degrees of freedom are g = 2dN 1; this fines a continuous-time random walk and the distribution is the microcanonical ensemble (constant NV E−). Peri- fviα (x, t) approaches a normal distribution for large t as odic boundary conditions conserve also the total linear 3 momentum is convenient to study the relationship between Eq. (10)
N N and the symmetric Dirichlet distribution with parameter a. P = m v = m v (5) i i i The PDF of the n-dimensional Dirichlet distribution i=1 i=1 X X with parameter vector a is and the generator of Galilean transformations to other n inertial frames of reference def 1 f D(x; a) = xai−11 (x); (11) X B(a) i S N N i=1 G = Pt m r = m (v t r ), (6) Y − i i i − i i=1 i=1 it is zero outside the unit simplex X X n where the coordinates ri are not reboxed upon a crossing n N S = x R : i xi 0 xi =1 . (12) of the unit cell boundaries (if P = 0, G/ i=1 mi = ∈ ∀ ≥ ∧ − ( i=1 ) G/(Nm) is the position of the center of mass), and thus X the− number of independent variables drops to Pg =2d(N − The normalization factor is the multinomial beta func- 1) 1=2dN 2d 1; this is the molecular dynamics tion, which can be defined through the gamma function, ensemble− (constant− −NV EPG) [26–28]. Symmetries in the positions and velocities may reduce g further; e.g. if n Γ(a ) B(a)= i=1 i . (13) all components i of Γ are pairwise symmetric with respect Γ( n a ) to the origin, with both kinds of boundary conditions Q i=1 i this point symmetry will stay on forever and g = dN 1 The multinomial beta functionP is a generalization of the or g = 2d(N/2 1) 1 = dN 2d 1 respectively.− − − − − beta function or Euler integral of the first kind, B(x, y)= For the sake of simplicity, in presenting the theory we 1 x−1 y−1 0 t (1 t) dt, which can be expressed through the will treat explicitly only the microcanonical case without gamma function− or Euler integral of the second kind, symmetries. R ∞ −t z−1 Γ(z) = 0 e t dt, as B(x, y) = Γ(x)Γ(y)/Γ(x + y). Following Khinchin [29], one can assume as the starting In the symmetric Dirichlet distribution all elements of point of statistical mechanics that the distribution in the R the parameter vector a have the same value ai = a, accessible portion of phase space is uniform, although so far this has not been rigorously proved in general. In n D def Γ(na) a−1 our case, the measure of the accessible region of phase f (x; a) = x 1S(x). (14) X [Γ(a)]n i space is the product of the volume of the hypercube V N i=1 Y times the surface of the hypersphere with radius R in dN dimensions, Notice that a = 1 gives the uniform distribution on S. It is convenient to work with dimensionless variables. 2πdN/2 The rescaling uiα = viα/R introduced above gives the Ω= V N RdN−1. (7) Γ(dN/2) PDF Γ(dN/2) Then Khinchin’s Ansatz that the probability density x 1 x fu( )= dN/2 {x:x=1}( ). (15) function (PDF) for points (v, r) in the permitted region 2π of phase space is uniform leads to the joint PDF for ve- A second transformation locities and positions w = u2 (16) 1 iα iα fv,r(x, y)= 1{x:x=R}(x)1{y:−Lα/2≤yiα≤Lα/2}(y), (8) Ω leads to a set of dN random variables each one with sup- port in [0,1] and such that where 1A(x) is the indicator function of the set A,
N d def 1 if x A 1A(x) = ∈ . (9) wiα =1. (17) (0 if x / A i=1 α=1 ∈ X X As the energy does not depend on positions, one can inte- The Jacobian for this transformation is grate over the latter, yielding a uniform PDF for particle N d velocities on the surface of a hypersphere, ∂u 1 = w−1/2. (18) ∂w 2dN iα i=1 α=1 Γ(dN/2) 1−dN fv(x)= R 1 (x). (10) Y Y 2πdN/2 {x:x=R} Multiplying it by a factor 2dN because each u results ± iα The marginalization of this joint PDF leads to the distri- in the same wiα and by another factor 2 because of the butions of individual particle energies as well as of veloc- constraint given by Eq. (17) (for details see Song and ity moduli and velocity components. To this purpose, it Gupta [30]), and replacing √π = Γ(1/2), the joint PDF 4 of the variables wiα can be expressed through the sym- invoking the Dirichlet and beta distributions, by Shirts metric Dirichlet PDF with parameter a =1/2, et al. [28, Eq. (9)]. In the thermodynamic limit (N,V,E with D → ∞ fw(x)= fw (x;1/2) N/V = ρ = constant and E/N = E¯ = constant), N d Eq. (24) converges to a gamma distribution, as discussed Γ(dN/2) = x−1/21 (x). (19) by Garibaldi and Scalas [25, pages 121–122]. The gamma [Γ(1/2)]dN iα S i=1 α=1 PDF is Y Y xa−1 x Now the normalized energy per particle f γ (x; a,b) def= exp 1 (x). (25) X baΓ(a) − b [0,∞) 2 2 d Ei mv v ε = = i = i = w (20) A scale parameter b is usually included in the definition i E 2E R2 iα α=1 of the gamma distribution, but it can always be set to 1 X absorbing it into the argument, is the sum of d variables distributed according to Eq. (19). As a consequence of the aggregation law for Dirichlet x 1 x 1 f γ (x; a,b)= f γ ; a, 1 f γ ; a . (26) distributions, one finds that the joint PDF of all εi is X X b b ≡ X b b D fε(x)= fε (x; d/2) Coming back to the thermodynamic limit of Eq. (24) an- N ticipated above, this is a gamma distribution with shape Γ(dN/2) ¯ = xd/2−11 (x). (21) parameter a = d/2 and scale parameter b =2E/(dm)= [Γ(d/2)]N i S 2 i=1 R /(dN), Y ¯ It is interesting to notice that this is a uniform distribu- γ d 2E f i (x)= f x; , tion for d = 2; because of this, Boltzmann’s 1868 method E Ei 2 dm [10] works in d = 2 dimensions, but fails for d = 3. dm d/2 xd/2−1 dmx The PDF of the normalized energies of single parti- = exp 1 (x), (27) cles can be obtained by a further marginalization of the 2E¯ Γ(d/2) − 2E¯ [0,∞) symmetric Dirichlet distribution given by Eq. (21), using again the aggregation law. The result is a beta distribu- which is the familiar Boltzmann or Boltzmann-Gibbs dis- tion, whose PDF is tribution for d = 2. The PDF of the velocity moduli, or speeds, of in-
β def 1 a−1 b−1 dividual particles can be obtained from fEi (x) replac- fX (x; a,b) = x (1 x) 1[0,1](x), (22) 2 B(a,b) − ing Ei = mvi /2. The result is a transformed beta- Stacy distribution with the same exponents a = d/2 i.e. a Dirichlet distribution, Eq. (11), with n = 2. In and b = d(N 1)/2 as for the energies, but argument other words, the Dirichlet distribution is a multivariate mx2/(2E) = (x/R− )2, generalization of the beta distribution. Our case has the 2 2 exponents a = d/2 and b = d(N 1)/2, β x d d(N 1) d x − fvi (x)=f i ; , − , v R2 2 2 dx R2 β d d(N 1) d−1 f i (x)=f x; , − Γ(dN/2) 2x ε εi 2 2 = Γ(d/2)Γ(d(N 1)/2) Rd d Γ(dN/2) −1 d−(N−1) 2 −1 = x x2 2 Γ(d/2)Γ(d(N 1)/2) 1 1 (x) (28) d N−− 2 [0,R] ( 1) −1 × − R (1 x) 2 1 (x). (23) × − [0,1] for N > 1, and fvi (x) = δ(x R) for N = 1. Also The transformation of variables Ei = Eεi immediately this result has been obtained with− a different method leads to the beta-Stacy PDF of particle energies, [28, 31, 32]. In the thermodynamic limit, Eq. (28) converges to a β x d d(N 1) d x 2 f i (x)=f ; , − transformed gamma distribution with argument x /2, E Ei E 2 2 dx E shape parameter a = d/2 and scale parameter b = d −1 2 Γ(dN/2) x 2 R /(dN)=2E/¯ (dm), = Γ(d/2)Γ(d(N 1)/2) E − d(N−1) x2 d 2E¯ d x2 x 2 −1 1 γ fvi (x)= f ; , 1 1[0,E](x) (24) vi 2 2 dm dx 2 × − E E d dm 2 (x/2)d−1 dmx2 for N > 1, and fEi (x) = δ(x E) for N = 1. This = exp 1 (x), (29) − E¯ Γ(d/2) − 4E¯ [0,∞) result has been obtained with a different method, without 5 which is the familiar Maxwell distribution for d = 3. normal distribution for velocity components is recovered, The transformation from hyperspherical to as well as their independence. Finally, in the NV EPG 2 d 2 ensemble the constraint given by Eq. (5) leads to simi- cartesian coordinates vi = α=1 viα and d/2 d−1 d lar distributions with different parameter values for the (2π /Γ(d/2))v dvi = dviα leads from Eq. (28) i α=1 P relevant quantities introduced above. This will become to the PDF fvi (x) of the single-particle velocity vectors Q clearer in the following. d(N−1) 2 2 −1 Γ(dN/2) x 1{x:x=R}(x) fvi (x)= 1 , Γ(d(N 1)/2) − R2 (√πR)d − (30) III. MOLECULAR DYNAMICS SIMULATIONS an equation which has been obtained before too [28, 31]. The direct marginalization [30] of the joint PDF of all In molecular dynamics (MD) with continuous poten- velocities, Eq. (10), leads to the PDF fviα (x) of velocity tials, the equations of motion are integrated numerically components, a result obtained integrating over all i ex- using a constant time step; this approach is called time- cept one and over all α except one. This is the quantity driven. The larger the forces, the smaller the time step discussed by Maxwell [1], and its derivation for any N is necessary to ensure energy conservation. With step po- one of the main results in this paper. It turns out that the tentials there are no forces acting on a distance, only distribution of the velocity components is a transformed impulsive ones at the exact time of impact. Therefore an beta with argument 1/2+ x/(2R) and equal exponents event-driven approach is more appropriate: rather than a = b = (dN 1)/2, until a fixed time step, the system is propagated until − either the next collision or the next boundary crossing 1 [33–36]. fviα (x)= B (dN 1)/2, (dN 1)/2 The collision time t between two particles i, j can be − − ij dN−3 calculated from the mutual distance rij = ri rj and the 1 x 1 x 2 1[−R,R](x) − + relative velocity vij = vi vj . If bij = vij rij > 0 the × 2 2R 2 − 2R 2R − · particles are moving away from each other and will not dN−3 2 2 collide. Otherwise impact may happen at time tij when Γ(dN 1) x 1[−R,R](x) = − 1 their distance becomes equal to the sum of their radii, Γ2 (dN 1)/2 − R2 2dN−2R − i.e., rij + tij vij = σ. This is a second order problem 1 x dN 1 dN 1 withk solutions k =f β + ; − , − viα 2 2R 2 2 2 2 2 2 d 1 x bij bij vij (rij σ ) + . (31) t± = − ± − − . (34) × dx 2 2R ij q v2 ij In the thermodynamic limit Eq. (31) converges to a Gaus- If the solutions are complex, no collision occurs. If the 2 2 sian with average µ = 0 and variance σ = R /(dN) = solutions are real, the smaller one, t−, corresponds to dE/¯ (2m), i.e. the familiar Maxwell-Boltzmann distribu- ij when the particles first meet, while the larger one, t+, to tion ij when they leave each other assuming they are allowed to m mx2 interpenetrate. A negative collision time means that the f iα (x)= exp . (32) v dπE¯ − dE¯ event took place in the past. Because of the condition r + − bij < 0, at least tij > 0. If tij < 0 the particles overlap, This is again related to a gamma distribution, since the which indicates an error. So the collision time is given − positive half of a Gaussian can be expressed as by tij , provided it is a positive real number. For a system of N hard spheres, at impact, assuming 2 x2 x2 1 d x2 exp 1 (x)= f γ ; , σ2 . an elastic collision, the total kinetic energy E and the √ −2σ2 [0,∞) X 2 2 dx 2 total linear momentum P are conserved (usually one sets 2πσ (33) P = 0 at the beginning of the simulation by subtracting In summary, all the known results for the relevant dis- 1 N N i=1 vi from each vi). Assuming smooth surfaces, tributions of the NV E ensemble can be obtained observ- the impulse acts along the line of centers of the collision P ing that the normalized individual particle energies εi = partners i and j given by the unit vector ˆrij = rij /rij ; Ei/E follow a symmetric multivariate Dirichlet distribu- with equal masses, vi changes to vi +∆vi and vj changes tion with parameter a = 1/2 given by Eq. (19). This is to vj ∆vi with a direct consequence of the uniform-distribution assump- − tion in Eq. (8) via a simple change of variables. Only for b r ∆v = ij ij = (v ˆr ) ˆr = vk , (35) the velocity components it is necessary to marginalize the i − σ2 − ij · ij ij − ij uniform distribution directly on the surface of the hyper- sphere and not on the simplex. Maxwell’s Ansatz is vin- where rij and vij are evaluated at the instant of collision, dicated by the fact that, in the thermodynamic limit, a and thus rij = σ. 6
A few computational details for our event-driven and hard spheres (d = 3) from theory (Sec. II) as well molecular dynamics simulation of hard spheres are given as from MD (Sec. III) and MC simulations (Sec. IV) are in the appendix. shown in Fig. 1 for a microcanonical ensemble (constant NV E, hard reflecting walls) and in Fig. 2 for a molecular dynamics ensemble (constant NV EPG, periodic bound- IV. MONTE CARLO SIMULATIONS ary conditions). Simulations with N = 10000 were done too, but are not shown because the distributions over- Except for especially ordered initial conditions, in- lap perfectly with those where N = 1000. In reduced terparticle collisions computed by MD as explained in units [35] the particle mass is m = 1, the particle di- ameter is σ = 1, the energy per particle is E¯ = 1, the Sec. III have mutual distance versors at collision ˆrij uni- formly distributed on a unit half sphere in d dimensions Boltzmann constant is kB = 1, and the number density is ρ =2/3d. The density appears only in MD, and the re- such that, given relative velocities vij , the scalar prod- sults are largely independent of this parameter, as long as uct vij ˆrij is negative. Therefore the same distributions of velocities,· and thus of derived quantities like energies, it is not too large (in this case the particles cannot move as in MD with periodic boundaries can be obtained by freely) or too small (in this case the particles hardly ever Monte Carlo (MC): after initializing the velocities of all collide). The initial total momentum is P = 0, except hard spheres, the MC cycles consist in selecting a pair ij for N = 2 with hard reflecting walls, and the initial posi- and a random versor ˆr such that v ˆr < 0, and then tion of the center of mass is in the origin. The numerical ij ij ij 5 in updating the velocities according to· Eq. (35). Hard simulations were equilibrated over 5 10 collisions and 6 × reflecting walls can be included in the MC scheme by se- sampled over 10 collisions. lecting with a certain frequency a sphere i and inverting We did not do the case with d = 1 because then with equal masses Eq. (35) becomes ∆v = vk = v ; thus one of its velocity components viα. This scheme gives a i − ij − ij useful insight into the mechanism of energy and momen- after a collision vi becomes vj and vice versa, and with tum transfer. It is much easier to code and faster to run particles just exchanging their velocities, the velocity dis- than MD, especially for large numbers of particles N, be- tribution does not change with time, making equilibra- cause no event list management is necessary: on the same tion impossible. For this reason, one-dimensional models computer used for the MD benchmarks shown in Fig. 3, need systems of molecules with different masses [17]. the CPU time for 105 MC collisions with N = 10000 The agreement between theory, MD and MC is excel- spheres is 0.3 s. lent, with little systematic deviations only for MD at the For a given initial state, i.e. a set of particle veloci- smallest values of N. To check that these deviations are ties, the MC dynamics defined above provides the real- genuine, we tried with different starting configurations ization of a Markov chain with a symmetric transition and densities, and with both MD programs discussed in kernel, meaning that P (v′ v) = P (v v′), where v is the Sec. III, obtaining identical results. For further details old velocity vector before| the transition| and v′ is the on our MD simulations see Gabriel [39, Chapter 3]. new velocity vector after the transition. This Markov For d = 2 and N = 2 in the NV EPG ensemble fviα (x) chain is homogeneous, as the transition probability does is the arcsine PDF not depend on the time step. Invoking detailed balance, 1 ′ ′ ′ fviα (x)= , (36) P (v v)P (v)= P (v v )P (v ), the symmetry of the tran- π√R2 x2 sition| kernel implies| that the stationary distribution of − this chain is uniform over the set of accessible states. If which is bimodal. The name is due to its cumulative this set coincides with the surface of the velocity hyper- distribution function sphere, then the Markov chain is ergodic and one can 1 x 1 hope to prove that the uniform distribution over the Fviα (x)= arcsin + . (37) π R 2 hypershere is also the equilibrium distribution for the Markov chain; see Sigurgeirsson [37, Chapter 5] for the For d = 2 and N = 2 in the NV E ensemble and for discussion of a related problem, and Meyn and Tweedie d = 2 and N = 3 in the NV EPG ensemble, fviα (x) is [38] for general methods. The results of MC simulations the Wigner semicircle PDF [40] described below corroborate this conjecture and the al- 2 gorithm outlined above is indeed an effective way of sam- 2 2 fviα (x)= 2 R x . (38) pling the uniform distribution on the surface of a hyper- πR − p sphere. Its cumulative distribution function again contains an arcsine:
x 2 2 1 x 1 V. NUMERICAL RESULTS F iα (x)= R x + arcsin + . (39) v πR2 − π R 2 p Probability density functions fviα of the velocity com- For the same systems, fEi (x) is the uniform distribution ponents, fvi of the velocity modulus, and fEi of the en- on [0, R]. For d = 3 and N = 2 in the NV EPG ensem- ergy for N = 2, 3, 4, 10, 100, 1000 hard disks (d = 2) ble, f iα (x) is the uniform distribution on [ √R, √R]. v − 7