1960 recipe
is exactly 1.0
- 1.
- Get random numbers between 0 and 1 (see ran_svh57(3NEMO) ).
- 2.
- Ensure positions and velocities are uniformly distributed in a sphere of radius 1 (in both x,y,z and vx,vy,vz)
- 3.
- Shift center of mass to exactly 0.0
- 4.
- Rescale velocities such that the virial (2Ek/Ep)
Note that the velocities would not be gaussian if my interpretation is correct (cf. his eq.(22) and (71)), thus the initial conditions are not in the final phase space configuration, yet the models are fun to play with.
Since the simulations were done on the Siemens 2002 computer, with about 2000 FLOPS, the number of particles was limited to 16 in his 1960 paper, though his followup paper in 1963 discussed the case nbody=25!
The seed is special in von Hoerner. It is a random number between 0.57 and 0.91, and uses is own 1957 method, implemented in ran_svh57(3NEMO) . By default this code will use NEMO’s default random numbers, set by seed=, however if seed57 is given, his code is used. See also xrandom(1NEMO) .
mkvh60 . 16 seed=123 ### nemo Debug Info: virial radius: 0.740663 v2=0.821627 ek=0.218607 ep=0.632879 K=1.44753 ### nemo Debug Info: snapvscale: 1.20313 mkvh60 . 16 seed57=0.580128 ### nemo Debug Info: SvH seed=0.580128 ### nemo Debug Info: von Hoerner seed57=0.580128 first ran=0.548496 ### nemo Debug Info: virial radius: 0.759762 v2=0.811234 ek=0.261934 ep=0.616969 K=1.17772 ### nemo Debug Info: snapvscale: 1.08523
x = seed57 # between 0.57 and 0.91 while True: x2 = x*x if x2 < xlo: xnew = x2 + 0.32 else: xnew = x2 ran = int((’%.12f’ % xnew)[5:])/1e9 # print out with 9 digits print(ran) x = xnew
Z.f.Astrophys. 50, 184, 1960 (1960ZA.....50..184V) 2001ASPC..228...11V How it all started Siemens 2002 computer: https://dl.acm.org/doi/10.1145/1458043.1458076
19-Apr-2021 V0.1 Created PJT