HTML automatically generated with rman
Table of Contents

Name

mkvh60 - create a uniform sphere of equal mass stars using von Hoerner’s 1960 recipe

Synopsis

mkvh60 [parameter=value]

Description

Sebastian von Hoerner (1960ZA.....50..184V) describes - in beautiful German - four steps how his equal mass virialized homogenous sphere was constructed. It also uses a random number generator he himself designed. Here’s my interpretation of these steps:
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)
is exactly 1.0

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) .

Parameters

The following parameters are recognized in any order if the keyword is also given:
out=
Output file name, in standard snapshot(5NEMO) format. No default.
nbody=
Number of particles [16]
seed57=
Von Hoerners 1957 seed, must be (0.57 - 0.91). Default: not used.
seed=
NEMO’s Random number seed, if used. [0]
zerocm=
Center c.o.m. ? [t]
headline=
Text headline for output. By default not used.

Examples

Here is a default n=16 sphere, first using the NEMO random number generator, and then the von Hoerner ran57 method:


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

Seed57

The seed57= keyword is the seed for the revived ran_svh57() Zufallzahl random number generator. My interpretation of eq.(44) in 1960ZA.....50..184V is : (code in python)


  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

See Also

mkhomsph(1NEMO) , firstn(1NEMO) , snapshot(1NEMO)


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

Files

src/nbody/init

Author

Sebastian von Hoerner (1960), Peter Teuben (NEMO re-implementation)

Update History


19-Apr-2021    V0.1 Created    PJT


Table of Contents