Nbody6
Main Page
Files
File List
File Members
All
Files
Functions
Variables
define.f
Go to the documentation of this file.
1
SUBROUTINE
define
2
*
3
*
4
* Definition of input parameters, options & counters.
5
* ---------------------------------------------------
6
*
7
*
8
* Input parameters
9
* ****************
10
*
11
* ---------------------------------------------------------------------
12
***
13
* NBODY6:
14
*
15
* KSTART Control index (1: new run; >1: restart; 3, 4, 5: new params).
16
* TCOMP Maximum CPU time in minutes (saved in CPU).
17
***
18
* INPUT:
19
*
20
* N Number of objects (N_s + 2*N_b; singles + 3*NBIN0 < NMAX).
21
* NFIX Output frequency of data save or binaries (options 3 & 6).
22
* NCRIT Final particle number (alternative termination criterion).
23
* NRAND Random number sequence skip.
24
* NNBMAX Maximum number of neighbours (< LMAX - 5).
25
* NRUN Run identification index.
26
*
27
* ETAI Time-step parameter for irregular force polynomial.
28
* ETAR Time-step parameter for regular force polynomial.
29
* RS0 Initial radius of neighbour sphere (N-body units).
30
* DTADJ Time interval for parameter adjustment (N-body units).
31
* DELTAT Output time interval (N-body units).
32
* TCRIT Termination time (N-body units).
33
* QE Energy tolerance (restart if DE/E > 5*QE & KZ(2) > 1).
34
* RBAR Virial cluster radius in pc (set = 1 for isolated cluster).
35
* ZMBAR Mean mass in solar units (=1.0 if 0; final depends on #20).
36
*
37
* KZ(J) Non-zero options for alternative paths (see table).
38
*
39
* DTMIN Time-step criterion for regularization search.
40
* RMIN Distance criterion for regularization search.
41
* ETAU Regularized time-step parameter (6.28/ETAU steps/orbit).
42
* ECLOSE Binding energy per unit mass for hard binary (positive).
43
* GMIN Relative two-body perturbation for unperturbed motion.
44
* GMAX Secondary termination parameter for soft KS binaries.
45
***
46
* INPUT: if (kz(4).gt.0)
47
*
48
* DELTAS Output interval for binary search (in TCR; suppressed).
49
* ORBITS Minimum periods for binary output (level 1).
50
* GPRINT Perturbation thresholds for binary output (9 levels).
51
***
52
* DATA:
53
*
54
* ALPHAS Power-law index for initial mass function (used if #20 < 2).
55
* BODY1 Maximum particle mass before scaling (KZ(20): solar mass).
56
* BODYN Minimum particle mass before scaling.
57
* NBIN0 Number of primordial binaries (for IMF2 with KZ(20) > 1).
58
* NHI0 Primordial hierarchies (may be needed in IMF if > 0).
59
* ZMET Metal abundance (in range 0.03 - 0.0001).
60
* EPOCH0 Evolutionary epoch (in 10**6 yrs; NB! < 0 for PM evolution).
61
* DTPLOT Plotting interval for HRDIAG (N-body units; >= DELTAT).
62
***
63
* SETUP: if (kz(5).eq.2)
64
*
65
* APO Separation of two Plummer models (SEMI = APO/(1 + ECC).
66
* ECC Eccentricity of two-body orbit (ECC < 0.999).
67
* N2 Membership of second Plummer model (N2 <= N).
68
* SCALE Second scale factor (>= 0.2 for limiting minimum size).
69
*
70
* if (kz(5).eq.3)
71
*
72
* APO Separation between the perturber and Sun.
73
* ECC Eccentricity of orbit (=1 for parabolic encounter).
74
* DMIN Minimum distance of approach (pericentre).
75
* SCALE Perturber mass scale factor (=1 for Msun).
76
*
77
* if (kz(5).eq.4)
78
*
79
* SEMI Semi-major axis (slightly modified; ignore if ECC > 1).
80
* ECC Eccentricity (ECC > 1: NAME = 1 & 2 free-floating).
81
* M1 Mass of first member (in units of mean mass).
82
* M2 Mass of second member (rescaled total mass = 1).
83
*
84
* if (kz(5).ge.6) & (kz(24).lt.0)
85
*
86
* ZMH Mass of single BH (in N-body units).
87
* RCUT Radial cutoff in Zhao cusp distribution (MNRAS, 278, 488).
88
***
89
* SCALE:
90
*
91
* Q Virial ratio (Q = 0.5 for equilibrium).
92
* VXROT XY-velocity scaling factor (> 0 for solid-body rotation).
93
* VZROT Z-velocity scaling factor (not used if VXROT = 0).
94
* RTIDE Unscaled tidal radius (#14 >= 2; otherwise copied to RSPH2).
95
* SMAX Maximum time-step (factor of 2 commensurate with 1.0).
96
*
97
* if (kz(24).gt.0)
98
*
99
* M, X, V Initial subsystem (solar masses; membership = KZ(24)).
100
***
101
* XTRNL0: if (kz(14).eq.2)
102
*
103
* GMG Point-mass galaxy (solar masses, linearized circular orbit).
104
* RG0 Central distance (in kpc).
105
*
106
* if (kz(14).eq.3)
107
*
108
* GMG Point-mass galaxy (solar masses).
109
* DISK Mass of Miyamoto disk (solar masses).
110
* A Softening length in Miyamoto potential (in kpc).
111
* B Vertical softening length (kpc).
112
* VCIRC Galactic circular velocity (km/sec) at RCIRC (=0: no halo).
113
* RCIRC Central distance for VCIRC with logarithmic potential (kpc).
114
* GMB Central bulge mass (Msun).
115
* AR Scale radius in gamma/eta model (kpc, Dehnen 1993).
116
* GAM gamma (in the range 0 =< gamma < 3).
117
*
118
* RG Initial X,Y,Z; DISK+VCIRC=0, VG(3)=0: A(1+E)=RG(1), E=RG(2).
119
* VG Initial cluster velocity vector (km/sec).
120
*
121
* if (kz(14).eq.3.or.kz(14).eq.4)
122
*
123
* MP Total mass of Plummer sphere (in scaled units).
124
* AP Plummer scale factor (N-body units; square saved in AP2).
125
* MPDOT Decay time for gas expulsion (MP = MP0/(1 + MPDOT*(T-TD)).
126
* TDELAY Delay time for starting gas expulsion (T > TDELAY).
127
***
128
* HOTSYS: if (kz(29).gt.0)
129
*
130
* SIGMA0 Hot initial velocities in km/sec (CALL REFLCT suppressed).
131
***
132
* BINPOP: if (kz(8).eq.1.or.kz(8).gt.2)
133
*
134
* SEMI Max semi-major axis in model units (all equal if RANGE = 0).
135
* ECC Initial eccentricity (< 0 for thermal distribution).
136
* RATIO Mass ratio M1/(M1 + M2); (= 1.0: M1 = M2 = <M>; not #20 > 1).
137
* RANGE Range in SEMI for uniform logarithmic distribution (> 0).
138
* NSKIP Binary frequency of mass spectrum (#20 < 2; body #1 first).
139
* IDORM Indicator for dormant binaries (>0: merged components).
140
* ICIRC Eigenevolution (=1: Kroupa & Mardling; =2: Kroupa 1995).
141
***
142
* HIPOP: if (kz(8).gt.0.and.kz(18).gt.1)
143
*
144
* SEMI Max semi-major axis in model units (all equal if RANGE = 0).
145
* ECC Initial eccentricity (< 0 for thermal distribution).
146
* RATIO Mass ratio (= 1.0: M1 = M2; random in [0.5-0.9]).
147
* RANGE Range in SEMI for uniform logarithmic distribution (> 0).
148
* ICIRC Circularization & collision check (not implemented yet).
149
***
150
* INTIDE: if (kz(27).gt.0) (currently suppressed)
151
*
152
* RSTAR Size of typical star in A.U.
153
* IMS # idealized main-sequence stars.
154
* IEV # idealized evolved stars.
155
* RMS Scale factor for main-sequence radii (>0: fudge factor).
156
* REV Scale factor for evolved radii (initial size RSTAR).
157
***
158
* INSTAR: if (kz(12).eq.2) Input of stellar parameters on fort.12.
159
***
160
* CLOUD0: if (kz(13).gt.0)
161
*
162
* NCL Number of interstellar clouds.
163
* RB2 Radius of cloud boundary in pc (square is saved).
164
* VCL Mean cloud velocity in km/sec.
165
* SIGMA Velocity dispersion (#13 > 1: Gaussian).
166
* CLM Individual cloud masses in solar masses (maximum MCL).
167
* RCL2 Half-mass radii of clouds in pc (square is saved).
168
***
169
* CHAIN: if (kz(11).gt.0 with ARchain)
170
*
171
* CLIGHT Velocity of light in N-body units (e.g. 3.0D+05/VSTAR).
172
* NBH Number of BHs for special treatment (redundant but keep).
173
* IDIS Stellar disruption option (R_coll = (m/m_BH)^{1/3}*r^*).
174
* ---------------------------------------------------------------------
175
*
176
*
177
* Options KZ(J)
178
* *************
179
*
180
* ---------------------------------------------------------------------
181
* 1 COMMON save unit 1 (=1: 'touch STOP'; =2: every 100*NMAX steps).
182
* 2 COMMON save unit 2 (=1: at output; =2: restart if DE/E > 5*QE).
183
* 3 Basic data unit 3 at output time (unformatted, frequency NFIX;
184
* =1/2: standard /and tail; =3: tail only; >3: cluster + tail).
185
* 4 Binary diagnostics on unit 4 (# threshold levels = KZ(4) < 10).
186
* (currently suppressed in ksint.f.)
187
* 5 Initial conditions (#22 =0; =0: uniform & isotropic sphere);
188
* =1: Plummer; =2: two Plummer models in orbit, extra input;
189
* =3: massive perturber and planetesimal disk, extra input;
190
* =4: massive initial binary, extra input: A, E, M1, M2;
191
* =5: Jaffe model;
192
* >=6: Zhao BH cusp model, extra input if #24 < 0: ZMH, RCUT.
193
* 6 Significant & regularized binaries at main output (=1, 2, 3 & 4).
194
* 7 Lagrangian radii (>0: RSCALE; =2, 3, 4: output units 6, 7, 12);
195
* >=2: half-mass radii of 50% mass, also 1% heavies, unit 6;
196
* >=2: Lagrangian radii for two mass groups on unit 31 & 32;
197
* >=2: geometric radii for three mass groups on unit 6;
198
* =5: density, rms velocity & mean mass on unit 26, 27 & 36;
199
* =6: pairwise values of mean mass and radii on unit 28.
200
* 8 Primordial binaries (=1 & >=3; >0: BINOUT; >2: BINDAT; >3: HIDAT;
201
* =4: Kroupa 1995 period distribution;
202
* >4: standard setup using RANGE & SEMI0).
203
* 9 Individual bodies on unit 6 at main output (MIN(5**KZ9,NTOT)).
204
* 10 Diagnostic KS output (>0: begin KS; >1: end; >=3: each step).
205
* 11 Algorithmic Chain regularization and post-Newtonian (NBODY7).
206
* non-zero: PN for unpert KS or re-init ARchain (ksint.f);
207
* > 0: addition of initial BHs (binary/singles; scale.f);
208
* = -1: standard case of subsystem for ARchain (ksint.f);
209
* < -1: ARchain restricted to BH binary components (ksint.f).
210
* 12 HR diagnostics of evolving stars (> 0; interval DTPLOT);
211
* =2: input of stellar parameters on fort.12 (routine INSTAR).
212
* 13 Interstellar clouds (=1: constant velocity; >1: Gaussian).
213
* 14 External force (=1: standard tidal field; =2: point-mass galaxy;
214
* =3: point-mass + bulge + disk + halo + Plummer; =4: Plummer).
215
* 15 Triple, quad, chain (#30 > 0) or merger search (>1: more output).
216
* 16 Updating of regularization parameters (>0: RMIN, DTMIN & ECLOSE);
217
* >1: RMIN expression based on core radius (experimental);
218
* >2: modify RMIN for GPERT > 0.05 or < 0.002 in chain.
219
* 17 Modification of ETAI, ETAR (>=1) and ETAU (>1) by tolerance QE.
220
* 18 Hierarchical systems (=1: diagnostics; =2: primordial; =3: both).
221
* 19 Mass loss (=1: old supernova scheme; =3: Eggleton, Tout & Hurley;
222
* >3: extra diagnostics).
223
* 20 Initial mass function (=0: Salpeter type using ALPHAS; =1: Scalo;
224
* =2, 4, 6: Kroupa; =3, 5: Eggleton; > 1: primordial binaries;
225
* =7: binary correlated m1/m2 also for brown dwarf IMF;
226
* Note: Use PARAMETER (MAXM=1) for setting BODY(1) = BODY10).
227
* 21 Extra output (>0: MODEL #, TCOMP, DMIN, AMIN; >1: NESC by JACOBI).
228
* 22 Initial m, r, v on #10 (=1: output; >=2: input; >2: no scaling;
229
* =2: m, r, v on #10 in any units; scaled to standard units;
230
* Note: choose #20 = 0 to avoid Salpeter IMF with scaling;
231
* =3: no scaling of input read on fort.10;
232
* =4: input from mcluster.c (no scaling; binaries if NBIN0 >0);
233
* =-1: astrophysical input (M_sun, km/s, pc) on unit #10).
234
* 23 Escaper removal (>1: diagnostics in file ESC with V_inf in km/s);
235
* >=3: initialization & integration of tidal tail.
236
* 24 Initial conditions for subsystem (M,X,V routine SCALE; KZ(24)= #);
237
* <0: ZMH & RCUT (N-body units) Zhao model (#5>=6).
238
* 25 Velocity kicks for white dwarfs (=1: type 11 & 12; >1: all WDs).
239
* 25 Partial reflection of KS binary orbit (GAMMA < GMIN; suppressed).
240
* 26 Slow-down of two-body motion (>=1: KS; >=2: chain; =3: rectify).
241
* 27 Tidal effects (=1: sequential; =2: chaos; =3: GR energy loss);
242
* =-1: collision detector, no coalescence, #13 < 0.
243
* 28 GR radiation for NS & BH binaries (with #19 = 3; choice of #27);
244
* =4 and #27 = 3: neutron star capture (instar.f).
245
* 29 Boundary reflection for hot system (suppressed).
246
* 30 Multiple regularization (=1: all; >1: BEGIN/END; >2: each step);
247
* =-1: CHAIN only; =-2: TRIPLE & QUAD only.
248
* 31 Centre of mass correction after energy check.
249
* 32 Increase output intervals & SMAX based on single particle energy.
250
* 33 Histograms at main output (>=1: STEP; =2: STEPR, NBHIST & BINARY).
251
* 34 Roche-lobe overflow (=1: Roche & Synch; =2: Roche & BSE synch).
252
* 35 Time offset (global time from TTOT = TIME + TOFF; offset = 100).
253
* 36 Step reduction for hierarchical systems (suppressed).
254
* 37 Neighbour additions in CHECKL (>0: high-velocity; >1: all types).
255
* 38 Force polynomial corrections (=0: standard, no corrections;
256
* =1: all gains & losses included;
257
* =2: small FREG change skipped;
258
* =3: fast neighbour loss only).
259
* 39 No unique density centre (skips velocity modification of RS(I)).
260
* 40 Neighbour number control (=1: increase if <NNB> < NNBMAX/2);
261
* >=2: fine-tuning at NNBMAX/5; =3: reduction of NNBMAX.
262
* 41 Pre-mainsequence stellar evolution (only solar metallicity).
263
* 42 Kozai diagnostics on fort.42 (=1: frequency 100 & EMAX > 0.99).
264
* 43 Small velocity kick after GR coalescence (=1, =3; NBODY7 only),
265
* =2: BH accretion of disrupted star, KSTAR >= 10.
266
* 44 Plotting file for main cluster parameters on fort.56 (OUTPUT).
267
* 45 Plotting file for BH (NAME = 1 or 2) on unit 45 (routine BHPLOT);
268
* primordial BH defined by INSTAR; membership = KZ(24).
269
* 46 Reserved for data analysis project on NBODY6++.
270
* 47 Reserved for data analysis project on NBODY6++.
271
* 48 GPU initialization of neighbour lists and forces (FPOLY0).
272
* 49 Post-Newtonian perturbations included in KS (dir Block).
273
* ---------------------------------------------------------------------
274
*
275
* NBODY6: Restart from fort.1
276
*
277
* KSTART TCOMP (KSTART = 2, 3, 4, 5)
278
*
279
* DTADJ DELTAT TADJ TNEXT TCRIT QE J KZ(J) (if > 0 & KSTART = 3 or 5).
280
*
281
* ETAI ETAR ETAU DTMIN RMIN NCRIT (if > 0 & KSTART = 4 or 5).
282
*
283
* ---------------------------------------------------------------------
284
*
285
* Output counters
286
* ***************
287
*
288
* ---------------------------------------------------------------------
289
* NSTEPI Irregular integration steps.
290
* NSTEPR Regular integration steps.
291
* NSTEPU Regularized integration steps.
292
* NNPRED Coordinate & velocity predictions of all particles.
293
* NBPRED Coordinate & velocity prediction of neighbours (NNB counted).
294
* NBCORR Force polynomial corrections.
295
* NBFULL Too many neighbours with standard criterion.
296
* NBVOID No neighbours inside 1.26 times the basic sphere radius.
297
* NICONV Irregular step reduction (force convergence test).
298
* NBSMIN Retained neighbours inside 2*RS (STEP < SMIN).
299
* NLSMIN Small step neighbours selected from other neighbour lists.
300
* NBDIS Second component of recent KS pair added as neighbour (#18).
301
* NBDIS2 Second component of old KS pair added as neighbour (#18 > 1).
302
* NCMDER C.m. values for force derivatives of KS component.
303
* NBDER Large F3DOT corrections not included in D3 & D3R.
304
* NFAST Fast particles included in LISTV (option 37).
305
* NBFAST Fast particles included in neighbour list (option 37).
306
* NBLOCK Number of blocks (block-step version).
307
* NBLCKR Number of regular force blocks.
308
* NMDOT Mass loss events (option 19).
309
* NBSTAT Diagnostic data on binary interactions (option 4).
310
* NKSTRY Two-body regularization attempts.
311
* NKSREG Total KS regularizations.
312
* NEWKS Enforced KS regularization using wider criterion (~8 > 0).
313
* NKSHYP Hyperbolic KS regularizations.
314
* NKSPER Unperturbed KS binary orbits.
315
* NPRECT Initialization of NKSPER after exceeding 2*10**9.
316
* NKSREF Partial reflections of KS binary (option 25; suppressed).
317
* NKSMOD Slow KS motion restarts (option 26).
318
* NTTRY Search for triple, quad & chain regularization or mergers.
319
* NTRIP Three-body regularizations (option 15).
320
* NQUAD Four-body regularizations (option 15).
321
* NCHAIN Chain regularizations (options 15 & 30).
322
* NMERG Mergers of stable triples or quadruples (option 15).
323
* NEWHI New hierarchical systems (counted by routine HIARCH).
324
* NSTEPT Triple regularization integration steps (option 15).
325
* NSTEPQ Quadruple regularization integration steps (option 15).
326
* NSTEPC Chain regularization steps (# DIFSY calls).
327
* NDISS Tidal dissipations at pericentre (option 27).
328
* NTIDE Tidal captures from hyperbolic motion (option 27).
329
* NSYNC Number of synchronous binaries (option 27).
330
* NCOLL Stellar collisions (option 27).
331
* NSESC Escaped single particles (option 23).
332
* NBESC Escaped binaries (option 23).
333
* NMESC Escaped mergers (options 15 & 23).
334
* NRG Red giants.
335
* NHE Helium stars.
336
* NRS Red supergiants.
337
* NNH Naked Helium stars.
338
* NWD White dwarfs.
339
* NSN Neutron stars.
340
* NBH Black holes.
341
* NBS Blue stragglers.
342
* ---------------------------------------------------------------------
343
*
344
*
345
* Stellar evolution types
346
* ***********************
347
*
348
* ---------------------------------------------------------------------
349
* 0 Low main sequence (M < 0.7).
350
* 1 Main sequence.
351
* 2 Hertzsprung gap (HG).
352
* 3 Red giant.
353
* 4 Core Helium burning.
354
* 5 First AGB.
355
* 6 Second AGB.
356
* 7 Helium main sequence.
357
* 8 Helium HG.
358
* 9 Helium GB.
359
* 10 Helium white dwarf.
360
* 11 Carbon-Oxygen white dwarf.
361
* 12 Oxygen-Neon white dwarf.
362
* 13 Neutron star.
363
* 14 Black hole.
364
* 15 Massless supernova remnant.
365
* 19 Circularizing binary (c.m. value).
366
* 20 Circularized binary.
367
* 21 First Roche stage (inactive).
368
* 22 Second Roche stage.
369
* ---------------------------------------------------------------------
370
*
371
RETURN
372
*
373
END
Nbody6
Ncode
define.f
Generated on Sat Nov 30 2013 19:04:36 for Nbody6 by
1.8.2