• Aucun résultat trouvé

Chaotic dynamics

Dans le document CONDENSED MATTER PHYSICS (Page 99-103)

Hard disks and spheres 2

2.1 Newtonian deterministic mechanics

2.1.2 Chaotic dynamics

Algorithm 2.1 (event-disks)solves the hard-sphere equations of mo-tionon the assumption that the calculationof collision times, positions, velocity changes, etc. is done with infinite precision. This cannot re-ally be achieved on a computer, but the question arisesof whether it matters that numbers are truncated after 8 or 16 decimal digits. It is easiest to answer thisquestion bypitting differentversionsof the same event-driven algorithm against each other, starting from identical ini-tialconditions, butwith allcalculations performed at different precision levels: in one case in short format (single precision), and in the other case inlong format(double precision). The standard encodingof32-bit floating-point numbers ±a×10b usesone bit for the sign, eight bits for the exponentb, and 23bits for the fractiona, sothat the precision—the ratio of neighboring numbers that can be representedon the computer—

is approximately=2231.2×107. For a64-bitfloating point num-ber, the precision is about= 1×1016. Most computerlanguages allow one toswitch precisionlevelswithout anysignificant rewritingof code.

The two versions of the four-disk molecular dynamics calculation, started off from identical initial conditions (as in Fig. 2.1), get out of step after as fewas 25 pair collisions (see Fig. 2.5), an extremelysmall number comparedwith the millionor socollisionswhichwe can handle per secondon ayear 2005 laptop computer.

This situation isquiteuncomfortable:our computational results, for

(64-bit prec)

... t = 31.76 t = 32.80 t = 33.25 t = 33.32 t = 34.94

(32-bit prec)

... t = 32.34 t = 33.16 t = 33.42 t = 33.87 t = 33.93 Fig. 2.5Calculations starting from the initial configuration of Fig. 2.1, performed with 64-bit precision (top) and with 32-bit precision (bottom).

computing times beyond a few microseconds, are clearly uncontrolled.

We may driveup the precisionofour calculation with special number formats that are available in manycomputer languages. However, this strategy cannot defeat the onset of chaos, that is, cure the extreme sensitivitytothe detailsof the calculation. Itwillbe impossible tocontrol a hard-sphere molecular dynamics simulation for a fewbillion events.

(stat.)

Fig. 2.6Magnification of a difference in trajectories through a pair collision, in the reference frame of a stationary disk.

The chaos in the hard-sphere model has its origin in the negative curvature of the spheres’ surfaces, which magnifies tiny differences in the trajectory at each pair collision and causes serious rounding er-rors in computations and humbling experiences at the billiard table(see Fig. 2.6). On the other hand, this sensitivity to initial conditions en-sures that even finite systemsof disks and spheres can be described by statisticalmechanics, aswillbe discussedlater in this chapter.

2.1.3 Observables

In the previous subsections,we have integrated the equationsof motion for hard spheres in a box, but have only looked at the configurations, without evaluating any observables. We shall do the latter now. For simplicity,we consider a projected densityηy(a), essentiallythe fraction of time for which the y-coordinateof any particle is equal to a. More precisely,{ηy(a)da}is the fractionof time that they-coordinateof a disk center spends betweena anda+da(seeFig.2.7). It can be computed exactlyfor given particle trajectories between times t= 0andt=T:

y-density aty=a

y(a) = 1 T

intersectionsi with gray strip

in Fig. 2.7

1

|vy(i)|. (2.3)

In Fig. 2.7, there are five intersections (the other particles must also be considered). At each intersection, 1/|vy|must be added, to take into account the fact that faster particles spend less time in the interval [a, a+da], and thus contributeless to the densityata.

t = 0 a

0 t T t = T

Fig. 2.7y-coordinate vs. time for one disk. They-densityηy(a) is com-puted from the time spent betweenaanda+ da(see eqn (2.3)).

They-densityat a corresponds to theobservableO(t) =δ[y(t)−a]

(wherewe have used the Dirac δ-function), and can also be obtained from the time average

O(t)T = 1 T

T 0

dt O(t), sothat

ηTy(a) = 1 T

T 0

dt δ[y(t)−a]. (2.4) Seasoned theorists can derive the formula for they-densityin eqn(2.3) in a split second from eqn (2.4) via the transformation rules for the δ-function. Algorithm 2.1 (event-disks)numericallysolves the equations of motion for hard diskswithout discretization errorsorother imperfec-tions. In addition to this best possible method of data acquisition, we may analyze the data using eqn (2.3), without losing information. In principle,we arelimitedonlybythe finite totalsimulation time.

t = 0 t = 1 t = 2 t = 3 t = 4 t = 5

t = 6 t = 7 t = 8 t = 9 t = 10 t = 11

Fig. 2.8Stroboscopic snapshots of the simulation shown in Fig. 2.1.

It is possible to implement data analysis as in eqn (2.3), but this approach is somewhatoverambitious:we can certainly obtain exact run averages, but because the numberof runs is finite and the runs are not infinitely long, statisticalerrorswould stillcreep intothe calculation. It is thus justified to take a moreleisurelyapproach to data analysis and

simplydiscretize the time average(2.4):

O(t)T 1 M

M i=1

O(ti).

We thus interrupt the calculation in Alg. 2.1 (event-disks)at fixed, regular time intervals and take stroboscopic snapshots(seeFig.2.8 and Alg. 2.4 (event-disks(patch))). The snapshots can then be

incorpo-procedure event-disks(patch) . . .

imin←Int(t/∆t) + 1 imax←Int(tnext/∆t) fori=imin, . . . , imax do

t←i∆t−t

output{x1+tv1, . . . ,xN +tvN},{v1, . . . ,vN} . . .

——

Algorithm 2.4event-disks(patch). Alg. 2.1 (event-disks), modified to output stroboscopic snapshots (with a time interval ∆t).

rated into histograms of observables, and give results identical to an analysis of eqn (2.3)in the limit of vanishing width of the time slices or forlarge run times. The densityat pointy then converges toavalue independentof the initialconfiguration, a true time average:

ηy(a) = lim

T→∞

1 T

k

T 0

dt δ[yk(t)−a], wherek= 1, . . . , N represent the disks in the box.

η

0

Ly 0

proj. dens. ηy (hist.)

y−coordinate a

η

0

Ly 0

proj. dens. ηy (hist.)

y−coordinate a

Fig. 2.9 Projected density in a square box at densityη = 0.18. Left:

N= 4.Right:N= 64 (from Alg. 2.4 (event-disks(patch))).

Some dataobtained from Alg.2.4 (event-disks(patch)), for hard-disk systems in a square box, are shown inFig.2.9. In the twographs,

the covering densityis identical, but systems areof different size. Itoften surprises people that the density in these systems is far from uniform, even though the disks do not interact, other than through their hard-core. In particular, the boundaries, especiallythe corners, seem toattract disks. Systemswithlarger{N, Lx, Ly}clearlyseparate intoa bulk region (the inner part)and a boundary.

Dans le document CONDENSED MATTER PHYSICS (Page 99-103)