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

tf

50000

every run

desired final time to stop simulation

dtout

100

every run

how often an out*.sph files should be dumped

nitpot

1

nothing, see below

number of iterations between evaluation of the gravitational potential energy.

tjumpahead

1d30

every run

time after which a wide orbit may be skipped rather than integrated. Only acts when tf is negative

tscanon

0

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

sepfinal

1.d30

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

throwaway

.false.

every run

when skipping ahead, discard unbound ejecta rather than keeping all mass as two components

The particles

Variable

Default

Applies to

Meaning

n

100000

every run

desired number of particles. if n<0 then |n|=number of particles *per solar mass*. used only if making a new star.

nnopt

22+gflag

every run

controls neighbor number. leave it at 22 to get almost 40 neighbors.

equalmass

0

1es 1mc erg meq

particle mass is proportional to rho^(1-equalmass), so equalmass=1 has equal mass particles and equalmass=0 is for constant number density.

starmass

1d0

1es 1mc

mass of the polytrope to build, in solar masses

starradius

1d0

1es 1mc

radius of the polytrope to build, in solar radii

hco

-1d30

every run

softening/smoothing length for compact object or core particle (<0 for auto-set)

mco

-1d30

erg

mass of compact object or core particle

hfloor

0d0

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

neos

1

every run

0 for polytropic equation of state (eos), 1 for ideal gas + radiation pressure, 2 for tabulated eos

gam

5.d0/3.d0

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)

nav

3

every run

artificial viscosity (av) flag. leave it at 3 to get a hybrid balsara-monaghan av.

alpha

1

every run

av coefficient for term linear in mu

beta

2

every run

av coefficient for mu^2 term

ngr

3

every run

gravity flag. leave it at 3. if your want no gravity, ngr=0 might still work.

nselfgravity

1

every run

0 if just do gravity to point particles, 1 if self-gravitating

nkernel

2

every run

smoothing kernel: 0=cubic spline, 1=Wendland 3,3, 2=Wendland C4

ncooling

0

every run

0 if no cooling, otherwise radiative cooling

teq

100d0

every run

background temperature the cooling relaxes towards, in K. Only used when ncooling>0

reat

-1.d0

every run

radius within which a point mass swallows SPH particles. Negative disables eating

Relaxation

Variable

Default

Applies to

Meaning

nrelax

1

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

trelax

1.d30

every run

drag timescale. 0 derives it from the model, a very large value disables the drag

treloff

0

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

tresplintmuoff

0.

every run

time to stop resplinting the mean molecular weight. leave this at 0.

omega_spin

0.d0

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

sep0

200

every run

initial separation of two stars in a binary or collision calculation, and the separation a scan starts from and holds until tscanon

rp

-1.d30

every run

separation at closest approach. Set any two of rp, vinf2, e0 and semimajoraxis and the rest follow

impactparameter

-1.d30

hbs hyp

impact parameter at infinity, an alternative to rp, converted to it using angular momentum

e0

-1.d30

bph hbs hyp

orbital eccentricity: 1 is parabolic, above 1 hyperbolic, below 1 bound

semimajoraxis

0.d0

bph hbs hyp

orbital semimajor axis. 0 means unset, so that it is deduced from the others

vinf2

1.d30

bph hbs hyp

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

mbh

10d0

2cr hbs hyp

mass of the point mass used as the second object when startfile2 is absent

bbh_m1

-1d0

hyp

first mass of a compact-object binary. Required, and only used, when bbh_m2 is positive

bbh_m2

-1d0

hyp

second mass of a compact-object binary. Negative means unset, giving a single point mass of mass mbh

bbh_rp

-1.d30

hyp

separation at closest approach for the compact-object binary

bbh_semimajoraxis

0.d0

hyp

semimajor axis of the compact-object binary. 0 means unset

bbh_vinf2

1.d30

hyp

square of the relative speed at infinity for the compact-object binary. 1d30 means unset

bbh_e0

-1.d30

hyp

eccentricity of the compact-object binary

bbh_trueanomaly

0d0

hyp

true anomaly of the compact-object binary, in degrees

bbh_argperi

0d0

hyp

argument of periapsis of the compact-object binary, in degrees

bbh_inclination

0d0

hyp

inclination of the compact-object binary, in degrees

bbh_longitude

0d0

hyp

longitude of the ascending node of the compact-object binary, in degrees

Timestep control

Variable

Default

Applies to

Meaning

nintvar

2

every run

1=integrate entropic variable a, 2=integrate internal energy u, 12=a then u

cn1

.3d0

every run

dt1=cn1*h/v_signal

cn2

1.d30

every run

dt2=cn2*(h/|a-a_smoothed|)^0.5

cn3

0.1d0

every run

dt3=cn3*u/|du/dt|

cn4

1.d30

every run

dt4=cn4*v_signal/|a-a_smoothed|

cn5

0.02d0

every run

dt5=cn5*r_ij/v_ij (minimized over all other particles j)

cn6

0.02d0

every run

dt6=cn6*(r_ij/a_ij)^.5 (minimized over all other particles j)

cn7

4.d0

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

ngravprocs

0

every run

the number of gravity processors (must be <= min(nprocs,ngravprocsmax))

qthreads

0

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.

ppn

16

every run

cpu cores per node, used to spread the gravity processes over nodes

computeexclusivemode

0

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

gflag

1

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

runit

6.957d10

every run

number of cm in the unit of length. use 6.957d10 if want MESA solar radius.

munit

1.9884098706980504d33

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

startfile1

'sph.start1u'

2cr bhe bph bps hbs hyp res tri

first body of the encounter, in out*.sph format, usually the last snapshot of a relaxation

startfile2

'sph.start2u'

2cr bhe bps hyp tri

second body, same format as startfile1. If absent, a single point mass of mass mbh is used

startfile3

'sph.start3u'

tri

third body of a triple, same format as startfile1

binaryfile

'input.bs'

2cr bps

text file describing the binary, read by bps and 2cr

triplefile

'input.3s'

bhe tri

text file describing the third body, read by bhe and tri

bpbhfile

'sph.bpbh'

bph

text file giving the orientation angles and black hole mass, read by bph

imagefile

'sph.image'

txt

ASCII picture that txt turns into a particle layout

advectedfile

'sph.passivelyAdvected'

hyp

per-particle passively advected quantities, read by hyp when present

eosfile

'sph.eos'

every run

tabulated equation of state, read when neos selects a table

opacityfile

'sph.opacity'

every run

tabulated opacities, read when cooling needs them

profilefile

'eg.last1.muse_s2mm'

erg

stellar-evolution profile that erg builds its star from

stellarevolutioncodetype

1

erg

which code wrote profilefile, since the column layouts differ

Other settings

Variable

Default

Applies to

Meaning

tswitchtou

-1.d0

every run

nintvar=12: time to hand over from a to u. <0 means use treloff.