sph.input
Every run is controlled by a Fortran namelist in sph.input. A minimal file
sets only what it needs, and anything omitted takes the default below. The file
begins with &input and ends with &end:
&input
tf=200,
n=20000,
&end
Note
The variables, defaults and descriptions on this page are read directly
from the namelist declaration and the default-initialisation block in
parallel_bleeding_edge/src/init.f. There are 76 settings.
Time and output
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
desired final time to stop simulation |
|
|
every run |
how often an out*.sph files should be dumped |
|
|
nothing, see below |
number of iterations between evaluation of the gravitational potential energy. |
|
|
every run |
time after which a wide orbit may be skipped rather than integrated. Only acts when tf is negative |
|
|
every run |
time that the scan of a binary starts. The separation is held at sep0 until then, which gives the stars time to settle into the shape the corotating frame asks for |
|
|
every run |
final separation for the scan of a binary, reached at min(tf,treloff). The scan is exponential in separation, so it changes by a fixed fraction per unit time. Set it equal to sep0 for a corotating run that does not scan |
|
|
every run |
when skipping ahead, discard unbound ejecta rather than keeping all mass as two components |
The particles
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
desired number of particles. if n<0 then |n|=number of particles *per solar mass*. used only if making a new star. |
|
|
every run |
controls neighbor number. leave it at 22 to get almost 40 neighbors. |
|
|
|
particle mass is proportional to rho^(1-equalmass), so equalmass=1 has equal mass particles and equalmass=0 is for constant number density. |
|
|
|
mass of the polytrope to build, in solar masses |
|
|
|
radius of the polytrope to build, in solar radii |
|
|
every run |
softening/smoothing length for compact object or core particle (<0 for auto-set) |
|
|
|
mass of compact object or core particle |
|
|
every run |
hp(i) = hptilde(i) + hfloor, where hp(i)=smoothing length and hptilde(i) is used in eq.(A1) of GLPZ 2010. |
Equation of state and physics
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
0 for polytropic equation of state (eos), 1 for ideal gas + radiation pressure, 2 for tabulated eos |
|
|
every run |
leave this set at a reasonable value even if using neos=1 or 2 (because the value of gam is used in estimating the local sound speed in balav3.f) |
|
|
every run |
artificial viscosity (av) flag. leave it at 3 to get a hybrid balsara-monaghan av. |
|
|
every run |
av coefficient for term linear in mu |
|
|
every run |
av coefficient for mu^2 term |
|
|
every run |
gravity flag. leave it at 3. if your want no gravity, ngr=0 might still work. |
|
|
every run |
0 if just do gravity to point particles, 1 if self-gravitating |
|
|
every run |
smoothing kernel: 0=cubic spline, 1=Wendland 3,3, 2=Wendland C4 |
|
|
every run |
0 if no cooling, otherwise radiative cooling |
|
|
every run |
background temperature the cooling relaxes towards, in K. Only used when ncooling>0 |
|
|
every run |
radius within which a point mass swallows SPH particles. Negative disables eating |
Relaxation
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
relaxation flag. 0=dynamical calculation, 1=relaxation of single star, 2=relaxation of binary in corotating frame with centrifugal force, 3=calculation rotating frame with centrifugal and coriolis forces |
|
|
every run |
drag timescale. 0 derives it from the model, a very large value disables the drag |
|
|
every run |
time the drag switches off and the run turns dynamical. It ends a scan as well, since a scan runs until min(tf,treloff). 0 asks for it to be derived as 10*trelax, which for a single star needs trelax=0 as well |
|
|
every run |
time to stop resplinting the mean molecular weight. leave this at 0. |
|
|
every run |
angular rotation rate of star, used in nrelax=1 relaxations to give a rigidly rotating model |
Orbit of the encounter
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
initial separation of two stars in a binary or collision calculation, and the separation a scan starts from and holds until tscanon |
|
|
every run |
separation at closest approach. Set any two of rp, vinf2, e0 and semimajoraxis and the rest follow |
|
|
|
impact parameter at infinity, an alternative to rp, converted to it using angular momentum |
|
|
|
orbital eccentricity: 1 is parabolic, above 1 hyperbolic, below 1 bound |
|
|
|
orbital semimajor axis. 0 means unset, so that it is deduced from the others |
|
|
|
square of the relative speed at infinity. 1d30 means unset, so it is deduced from the others |
Compact object and black hole
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
|
mass of the point mass used as the second object when startfile2 is absent |
|
|
|
first mass of a compact-object binary. Required, and only used, when bbh_m2 is positive |
|
|
|
second mass of a compact-object binary. Negative means unset, giving a single point mass of mass mbh |
|
|
|
separation at closest approach for the compact-object binary |
|
|
|
semimajor axis of the compact-object binary. 0 means unset |
|
|
|
square of the relative speed at infinity for the compact-object binary. 1d30 means unset |
|
|
|
eccentricity of the compact-object binary |
|
|
|
true anomaly of the compact-object binary, in degrees |
|
|
|
argument of periapsis of the compact-object binary, in degrees |
|
|
|
inclination of the compact-object binary, in degrees |
|
|
|
longitude of the ascending node of the compact-object binary, in degrees |
Timestep control
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
1=integrate entropic variable a, 2=integrate internal energy u, 12=a then u |
|
|
every run |
dt1=cn1*h/v_signal |
|
|
every run |
dt2=cn2*(h/|a-a_smoothed|)^0.5 |
|
|
every run |
dt3=cn3*u/|du/dt| |
|
|
every run |
dt4=cn4*v_signal/|a-a_smoothed| |
|
|
every run |
dt5=cn5*r_ij/v_ij (minimized over all other particles j) |
|
|
every run |
dt6=cn6*(r_ij/a_ij)^.5 (minimized over all other particles j) |
|
|
every run |
r_ij=(x_ij^2+y_ij^2+z_ij^2+cn7*h_i^2)^.5 |
Parallelism and GPUs
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
the number of gravity processors (must be <= min(nprocs,ngravprocsmax)) |
|
|
every run |
number of gpu threads per particle. typically set to 1, 2, 4, or 8. set to a negative value to optimize the number of threads by timing. set to 0 to guess the best number of threads without timing. |
|
|
every run |
cpu cores per node, used to spread the gravity processes over nodes |
|
|
every run |
set this to 1 if on machine like grapefree with gpus in compute exclusive mode; set this to 0 on supercomputers like lincoln |
|
|
every run |
set to 0 for g function from appendix of gaburov et al. (2010); set to 1 for a g function that works better when there are black holes |
Units
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
number of cm in the unit of length. use 6.957d10 if want MESA solar radius. |
|
|
every run |
number of g in unit of mass. use 1.9884098706980504E+033 if want MESA solar mass. |
Input files
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
|
first body of the encounter, in out*.sph format, usually the last snapshot of a relaxation |
|
|
|
second body, same format as startfile1. If absent, a single point mass of mass mbh is used |
|
|
|
third body of a triple, same format as startfile1 |
|
|
|
text file describing the binary, read by bps and 2cr |
|
|
|
text file describing the third body, read by bhe and tri |
|
|
|
text file giving the orientation angles and black hole mass, read by bph |
|
|
|
ASCII picture that txt turns into a particle layout |
|
|
|
per-particle passively advected quantities, read by hyp when present |
|
|
every run |
tabulated equation of state, read when neos selects a table |
|
|
every run |
tabulated opacities, read when cooling needs them |
|
|
|
stellar-evolution profile that erg builds its star from |
|
|
|
which code wrote profilefile, since the column layouts differ |
Other settings
Variable |
Default |
Applies to |
Meaning |
|---|---|---|---|
|
|
every run |
nintvar=12: time to hand over from a to u. <0 means use treloff. |