config-options.md 31.5 KB
Newer Older
Rainer Weinberger's avatar
Rainer Weinberger committed
1
2
3
4
5
6
Code Configuration
*************************

Basic operation mode
============================

Volker Springel's avatar
Volker Springel committed
7
8
9
The default running mode (without any of the flags active) is 3d with
6 particle types; type 0 is always gas; types >0 are only
gravitationally interacting.
Rainer Weinberger's avatar
Rainer Weinberger committed
10
11
12
13


**NTYPES=6**

14
The number of particle types used. Minimum: 6.
Rainer Weinberger's avatar
Rainer Weinberger committed
15
16
17
18
19

-----

**TWODIMS**

Volker Springel's avatar
Volker Springel committed
20
21
Simulation in 2d. Z coordinates and velocities are set to zero after
reading in initial conditions.
Rainer Weinberger's avatar
Rainer Weinberger committed
22
23
24
25
26

-----

**ONEDIMS**

Volker Springel's avatar
Volker Springel committed
27
28
Simulation in 1d. Y and Z coordinates and velocities are set to zero
after reading in initial conditions.
Rainer Weinberger's avatar
Rainer Weinberger committed
29
30
31
32
33
34
35
36
37
38
39
40
41

-----

**ONEDIMS_SPHERICAL**

Spherically symmetric 1d simulation. Use together with ``ONEDIMS``.
The first dimension is used as the radial coordinate.

-----

Computational box
================================

Volker Springel's avatar
Volker Springel committed
42
43
The default running mode (without any of the flags active) is a cubic
box with periodic boundary conditions
Rainer Weinberger's avatar
Rainer Weinberger committed
44
45
46

**LONG_X=10.0**

Volker Springel's avatar
Volker Springel committed
47
48
49
50
51
52
These options can be used to distort the simulation cube along the
given direction with the given factor into a parallelepiped of
arbitrary aspect ratio. The box size in the given direction increases
by the factor given (e.g. if ``Boxsize`` is set to 100 and
``LONG_X=4`` is set the simulation domain extends from 0 to 400 along
X and from 0 to 100 along Y and Z.)
Rainer Weinberger's avatar
Rainer Weinberger committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

-----

**LONG_Y=2.0**

Stretches the y extent of the computational box by a given factor.

-----

**LONG_Z=10.0**

Stretches the z extent of the computational box by a given factor.

-----

**REFLECTIVE_X=1**

Volker Springel's avatar
Volker Springel committed
70
71
Boundary conditions in the x direction. 1: Reflective, 2:
Inflow/Outflow; not set: periodic
Rainer Weinberger's avatar
Rainer Weinberger committed
72
73
74
75
76

-----

**REFLECTIVE_Y=1**

Volker Springel's avatar
Volker Springel committed
77
78
Boundary conditions in y direction. 1: Reflective, 2: Inflow/Outflow;
not set: periodic
Rainer Weinberger's avatar
Rainer Weinberger committed
79
80
81
82
83

-----

**REFLECTIVE_Z=1**

Volker Springel's avatar
Volker Springel committed
84
85
Boundary conditions in z direction. 1: Reflective, 2: Inflow/Outflow;
not set: periodic
Rainer Weinberger's avatar
Rainer Weinberger committed
86
87
88
89
90
91
92
93
94
95

-----

Hydrodynamics
=============

The default mode is: ``GAMMA=5/3`` ideal hydrodynamics

**NOHYDRO**

Volker Springel's avatar
Volker Springel committed
96
97
No hydrodynamics calculation. Note that simply not including any type
0 particles has the same effect.
Rainer Weinberger's avatar
Rainer Weinberger committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

-----

**GAMMA=1.4**

Adiabatic index of gas. 5/3 if not set.

-----

**ISOTHERM_EQS**

Isothermal gas. Code uses an isothermal Riemann-solver.

-----

**PASSIVE_SCALARS=3**

Number of passive scalar fields advected with fluid (default: 0).

-----

**NO_SCALAR_GRADIENTS**

Volker Springel's avatar
Volker Springel committed
121
122
Disables time and spatial extrapolation for passive scalar fields. Use
only if you know why you are doing this.
Rainer Weinberger's avatar
Rainer Weinberger committed
123
124
125
126
127
128

-----

Magnetohydrodynamics
====================

Volker Springel's avatar
Volker Springel committed
129
130
131
132
133
By default, code only computes hydrodynamics. Note that for comparison
of MHD and hydrodynamical runs, it is sometimes useful to keep the MHD
settings active and to initialize the magnetic field to zero
everywhere. The equations of ideal MHD ensure that the magnetic field
stays exactly zero throughout the calculation.
Rainer Weinberger's avatar
Rainer Weinberger committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

**MHD**

Master switch for magnetohydrodynamics.

-----

**MHD_POWELL**

Powell div(B) cleaning scheme for magnetohydrodynamics.

-----

**MHD_POWELL_LIMIT_TIMESTEP**

Additional timestep constraint due to Powell cleaning scheme.

-----

**MHD_SEEDFIELD**

Volker Springel's avatar
Volker Springel committed
155
156
Uniform magnetic seed field of specified orientation and strength set
up after reading in IC.
Rainer Weinberger's avatar
Rainer Weinberger committed
157
158
159
160
161
162

-----

Riemann solver
==============

Volker Springel's avatar
Volker Springel committed
163
164
165
By default, an iterative, exact (hydrodynamics) Riemann solver is
used. If one of the flags below is active, this is changed. Only one
Riemann solver can be active.
Rainer Weinberger's avatar
Rainer Weinberger committed
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185

**RIEMANN_HLLC**

HLLC approximate Riemann solver.

-----

**RIEMANN_HLLD**

HLLD approximate Riemann solver (required for MHD).

-----

Mesh motion 
==============================

The default mode is a moving mesh.

**VORONOI_STATIC_MESH**

Volker Springel's avatar
Volker Springel committed
186
187
188
Assumes the mesh to be static, i.e. to not change with time. The
vertex velocities of all mesh-generating points is set to zero and
domain decomposition is disabled.
Rainer Weinberger's avatar
Rainer Weinberger committed
189
190
191
192
193

-----

**VORONOI_STATIC_MESH_DO_DOMAIN_DECOMPOSITION**

Volker Springel's avatar
Volker Springel committed
194
195
196
197
198
199
200
201
Enables domain decomposition together with ``VORONOI_STATIC_MESH``
(which is otherwise then disabled), in case non-gas particle types
exist and the use of domain decompositions is desired. Note that on
one hand it may be advantageous in case the non-gas particles mix well
or cluster strongly, but on the other hand the mesh construction that
follows the domain decomposition is slow for a static mesh, so whether
or not using this new flag is overall advantageous depends on the
problem.
Rainer Weinberger's avatar
Rainer Weinberger committed
202
203
204
205
206

-----

**REGULARIZE_MESH_CM_DRIFT**

Volker Springel's avatar
Volker Springel committed
207
208
Mesh regularization. Move mesh generating point towards center of mass
to make cells rounder.
Rainer Weinberger's avatar
Rainer Weinberger committed
209
210
211
212
213

-----

**REGULARIZE_MESH_CM_DRIFT_USE_SOUNDSPEED**

Volker Springel's avatar
Volker Springel committed
214
Limits mesh regularization speed by local sound speed.
Rainer Weinberger's avatar
Rainer Weinberger committed
215
216
217
218
219
220
221
222
223
224
225
226

------

**REGULARIZE_MESH_FACE_ANGLE**

Uses maximum face angle as roundness criterion in mesh regularization.

-----

Refinement 
===========================

Volker Springel's avatar
Volker Springel committed
227
228
229
By default, there is no refinement and derefinement. But if enabled,
and unless set otherwise, the criterion for refinement/derefinement is
to maintain a cell target mass.
Rainer Weinberger's avatar
Rainer Weinberger committed
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244

**REFINEMENT_SPLIT_CELLS**

Allows refinement.

-----

**REFINEMENT_MERGE_CELLS**

Allows derefinement.

-----

**REFINEMENT_VOLUME_LIMIT**

Volker Springel's avatar
Volker Springel committed
245
246
Limits the volume of cells and the maximum volume difference between
neighboring cells.
Rainer Weinberger's avatar
Rainer Weinberger committed
247
248
249
250
251
252
253
254
255
256
257

-----

**JEANS_REFINEMENT**

Refinement criterion to ensure resolving the Jeans length of cells.

-----

**REFINEMENT_HIGH_RES_GAS**

Volker Springel's avatar
Volker Springel committed
258
259
260
261
262
263
264
265
266
267
Limits the dynamical (de-)refinements of cells to cells which are
either already present in the ICs or are created with
``GENERATE_GAS_IN_ICS`` from type 1 particles. This adds an additional
integer quantity ``AllowRefinement`` to PartType0 in the snapshots
indicating if a gas cell is allowed to be refined and if it is, how
often this cell has already been split: if 0, no splitting allowed. If
odd (starting at 1), the cell was already present in the ICs. If even
(starting at 2), the cell was generated from a type 1 particle.  For
values of 3 or more, ``floor((AllowRefinement-1)/2.0)`` gives the
number of times the cell was split.
Rainer Weinberger's avatar
Rainer Weinberger committed
268
269
270
271
272

-----

**NODEREFINE_BACKGROUND_GRID**

Volker Springel's avatar
Volker Springel committed
273
274
275
276
The background grid will be prevented from derefining, when refinement
is used. In practice, enabling this option requires an input parameter
``MeanVolume``. Derefinement is then disallowed during the run for all
cells with ``Volume > 0.1 * MeanVolume``.
Rainer Weinberger's avatar
Rainer Weinberger committed
277
278
279
280
281

-----

**OPTIMIZE_MESH_MEMORY_FOR_REFINEMENT**

Volker Springel's avatar
Volker Springel committed
282
283
284
285
If activated some grid structures not needed for mesh refinement or
derefinement are freed before the function for refinement and
derefinement is called. The remaining mesh structures are freed after
this step as usual.
Rainer Weinberger's avatar
Rainer Weinberger committed
286
287
288

-----

Rainer Weinberger's avatar
Rainer Weinberger committed
289
Non-standard physics
Rainer Weinberger's avatar
Rainer Weinberger committed
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
====================

**COOLING**

Simple primordial cooling routine.

-----

**ENFORCE_JEANS_STABILITY_OF_CELLS**

This imposes an adaptive floor for the temperature.

-----

**USE_SFR**

Volker Springel's avatar
Volker Springel committed
306
307
Star formation model, turning dense gas into collisionless
particles. See Springel & Hernquist, (2003, MNRAS, 339, 289)
Rainer Weinberger's avatar
Rainer Weinberger committed
308
309
310
311
312

-----

**SFR_KEEP_CELLS**

Rainer Weinberger's avatar
Rainer Weinberger committed
313
Do not destroy cell out of which a star has formed.
Rainer Weinberger's avatar
Rainer Weinberger committed
314
315
316
317
318
319

-----

Gravity 
=================

Volker Springel's avatar
Volker Springel committed
320
If nothing is actived in this section, gravity is not included.
Rainer Weinberger's avatar
Rainer Weinberger committed
321
322
323

**SELFGRAVITY**

Volker Springel's avatar
Volker Springel committed
324
325
Computes gravitational interactions between simulation particles and
cells.
Rainer Weinberger's avatar
Rainer Weinberger committed
326
327
328
329
330
331
332
333
334
335
336

-----

**HIERARCHICAL_GRAVITY**

Uses hierarchical splitting of the time integration of the gravity.

-----

**CELL_CENTER_GRAVITY**

Volker Springel's avatar
Volker Springel committed
337
338
339
Uses geometric centers (instead of mesh-generating points) to
calculate gravity of cells, only possible with
``HIERARCHICAL_GRAVITY``.
Rainer Weinberger's avatar
Rainer Weinberger committed
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

-----

**NO_GAS_SELFGRAVITY**

Switches off gas self-gravity in tree.

-----

**GRAVITY_NOT_PERIODIC**

Gravity is not treated periodically.

-----

**ALLOW_DIRECT_SUMMATION**

Volker Springel's avatar
Volker Springel committed
357
358
359
Performs direct summation instead of tree-based gravity if number of
active particles < ``DIRECT_SUMMATION_THRESHOLD`` (= 3000 unless
specified differently)
Rainer Weinberger's avatar
Rainer Weinberger committed
360
361
362
363
364

-----

**DIRECT_SUMMATION_THRESHOLD=1000**

Volker Springel's avatar
Volker Springel committed
365
366
Overrides maximum number of active particles for which direct
summation is performed instead of a tree based calculation.
Rainer Weinberger's avatar
Rainer Weinberger committed
367
368
369
370
371

-----

**EXACT_GRAVITY_FOR_PARTICLE_TYPE=4**

Volker Springel's avatar
Volker Springel committed
372
373
Enables direct summation gravity calculation for the given particle
type.
Rainer Weinberger's avatar
Rainer Weinberger committed
374
375
376
377
378

-----

**EVALPOTENTIAL**

Volker Springel's avatar
Volker Springel committed
379
380
381
When this option is set, the code will compute the gravitational
potential energy each time a global statistics is computed. This can
be useful for testing global energy conservation.
Rainer Weinberger's avatar
Rainer Weinberger committed
382
383
384
385
386
387
388

-----


TreePM 
==============

Volker Springel's avatar
Volker Springel committed
389
If no option is actived here: no Particle-Mesh calculation is done.
Rainer Weinberger's avatar
Rainer Weinberger committed
390
391
392

**PMGRID=512**

Volker Springel's avatar
Volker Springel committed
393
394
395
396
397
398
399
400
401
402
403
Dimension of particle-mesh grid covering the domain.  This enables the
TreePM method, i.e. the long-range force is computed with a
PM-algorithm, and the short range force with the tree.  The parameter
has to be set to the size of the mesh that should be used, e.g. 256,
512, 1024 etc. The mesh dimensions need not necessarily be a power of
two, but the FFT is fastest for such a choice.  Note: If the
simulation is not in a periodic box, then a FFT method for vacuum
boundaries is employed, using a mesh with dimension twice that
specified by ``PMGRID``. Should not be used with a mesh much smaller
than 256, because the TreePM approximation is only valid if the range
of the tree calculation is small compared to the box size.
Rainer Weinberger's avatar
Rainer Weinberger committed
404
405
406
407
408

-----

**ASMTH=1.25**

Volker Springel's avatar
Volker Springel committed
409
410
411
412
This factor expressed the adopted force split scale in the TreePM
approach in units of the grid cell size. Setting this value overrides
the default value of 1.25, in mesh-cells, which defines the
long-range/short-range force split.
Rainer Weinberger's avatar
Rainer Weinberger committed
413
414
415
416
417

-----

**RCUT=6.0**

Volker Springel's avatar
Volker Springel committed
418
419
420
421
This determines the maximum radius, in units of the force split scale,
out to which the tree calculation in TreePM mode considers tree
nodes. If a tree node is more distant, the corresponding branch is
discarded. The default value is
Rainer Weinberger's avatar
Rainer Weinberger committed
422
423
424
425
426
427
4.5, given in mesh-cells.

-----

**PM_ZOOM_OPTIMIZED**

Volker Springel's avatar
Volker Springel committed
428
429
430
431
432
433
434
This option enables a different communication algorithm in the PM
calculations which works well independent of the data layout, in
particular it can cope well with highly clustered particle
distributions that occupy only a small subset of the total simulated
volume. However, this method is a bit slower than the default approach
(used when the option is disabled), which is best matched for
homogeneously sampled periodic boxes.
Rainer Weinberger's avatar
Rainer Weinberger committed
435
436
437
438
439

-----

**PLACEHIGHRESREGION=2**

Volker Springel's avatar
Volker Springel committed
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
If this option is set (will only work together with ``PMGRID``), then
the long range force is computed in two stages: One Fourier-grid is
used to cover the whole simulation volume, allowing the computation of
the large-scale force.  A second Fourier mesh is placed on the region
occupied by "high-resolution" particles, allowing the computation of
an intermediate-scale force. Finally, the force on very small scales
is computed by the tree. This procedure can be useful for
"zoom-simulations", where the majority of particles (the high-res
particles) are occupying only a small fraction of the volume. To
activate this option, the parameter needs to be set to an integer that
encodes the particle type(s) that make up the high-res particles in
the form of a bit mask. For example, if types 0, 1, and 4 are the
high-res particles, then the parameter should be set to
``PLACEHIGHRESREGION=1+2+16``, i.e. to the sum 2^0 + 2^1 + 2^4. The
spatial region covered by the high-res grid is determined
automatically from the initial conditions. The region is recalculated
if one of the selected particles is falling outside of the
high-resolution region. Note: If a periodic box is used, the high-res
zone is not allowed to intersect the box boundaries.
Rainer Weinberger's avatar
Rainer Weinberger committed
459
460
461
462
463

-----

**ENLARGEREGION=1.1**

Volker Springel's avatar
Volker Springel committed
464
465
466
467
468
469
470
471
472
473
474
This is only relevant when ``PLACEHIGHRESREGION`` is activated. The
size of the high resolution box will be automatically determined as
the minimum size required to contain the selected particle type(s), in
a "shrink-wrap" fashion.  This region is expanded on the fly, if
needed (see above). However, in order to prevent a situation where
this size needs to be enlarged frequently, such as when the particle
set is (slowly) expanding, the minimum size is multiplied by the
factor ``ENLARGEREGION`` (if defined). Then even if the set is
expanding, this will only rarely trigger a recalculation of the high
resolution mesh geometry, which is in general also associated with a
change of the force split scale.
Rainer Weinberger's avatar
Rainer Weinberger committed
475
476
477
478
479

-----

**GRIDBOOST=2**

Volker Springel's avatar
Volker Springel committed
480
481
482
483
484
485
486
487
488
Normally, if ``PLACEHIGHRESREGION`` is enabled, the code will try to
employ an effective grid size for the high-resolution patch that is
equivalent to ``PMGRID``. Because zero-padding has to be used for the
high-res inset, this gives a total mesh twice as large, which
corresponds to ``GRIDBOOST=2``. This value can here be modified by
hand, to e.g. 1, 3, 4, etc., to decrease or increase the size of
the high-res PM grid relative to that covering the full box. The total
mesh size used for the high-resolution FFTs is given by
``GRIDBOOST*PMGRID``.
Rainer Weinberger's avatar
Rainer Weinberger committed
489
490
491
492
493
494


-----

**FFT_COLUMN_BASED**

Volker Springel's avatar
Volker Springel committed
495
496
497
498
499
500
When this is enabled, the FFT calculations are not parallelized in
terms of a slab-decomposition but rather through a column based
approach. This scales to larger number of MPI ranks but is slower in
absolute terms as twice as many transpose operations need to be
performed. It is hence only worthwhile to use this option for a very
large number of MPI ranks that exceeds the 1D mesh dimension.
Rainer Weinberger's avatar
Rainer Weinberger committed
501
502
503
504
505
506

-----

Gravity softening
=================

Volker Springel's avatar
Volker Springel committed
507
508
509
510
511
512
513
514
515
516
In the default configuration, the code uses a small table of possible
gravitational softening lengths, which are specified in the parameter
file through the ``SofteningComovingTypeX`` and
``SofteningMaxPhysTypeX`` options, where X is an integer that gives
the "softening type". Each particle type is mapped to one of these
softening types through the ``SofteningTypeOfPartTypeY`` parameters,
where ``Y`` gives the particle type.  The number of particle types and
the number of softening types do not necessarily have to be
equal. Several particle types can be mapped to the same softening if
desired.
Rainer Weinberger's avatar
Rainer Weinberger committed
517
518
519

**NSOFTTYPES=4**

Volker Springel's avatar
Volker Springel committed
520
521
522
523
This can be changed to modify the number of available softening
types. These must be explicitly input as SofteningComovingTypeX
parameters, and so the value of ``NSOFTTYPES`` must match the number
of these entries in the parameter file.
Rainer Weinberger's avatar
Rainer Weinberger committed
524
525
526
527
528

-----

**MULTIPLE_NODE_SOFTENING**

Volker Springel's avatar
Volker Springel committed
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
If the tree walk wants to use a 'softened node' (i.e. where the
maximum gravitational softening of some particles in the node is
larger than the node distance and larger than the target particle's
softening), the node is opened by default (because there could be mass
components with a still smaller softening hidden in the node). This
can cause a substantial performance penalty in some cases. By setting
this option, this can be avoided. The code will then be allowed to use
softened nodes, but it does that by evaluating the node-particle
interaction for each mass component with different softening type
separately (but by neglecting possible shifts in their centers of
masses).  This also requires that each tree node computes and stores a
vector with these different masses. It is therefore desirable to not
make the table of softening types excessively large. This option can
be combined with adaptive hydro softening. In this case, particle type
0 needs to be mapped to softening type 0 in the parameter file, and no
other particle type may be mapped to softening type 0 (the code will
issue an error message if one doesn't obey to this).
Rainer Weinberger's avatar
Rainer Weinberger committed
546
547
548
549
550

-----

**INDIVIDUAL_GRAVITY_SOFTENING=2+4**

Volker Springel's avatar
Volker Springel committed
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
The code can also be asked to set the softening types of some of the
particle types automatically based on particle mass. The particle
types to which this is applied are set by this compile time option
through a bitmask encoding the types. The code by default assumes that
the softening of particle type 1 should be the reference. To this end,
the code determines the average mass of type 1 particles, and the
types selected through this option then compute a desired softening
length by scaling the type-1 softening with the cube root of the mass
ratio. Then, the softening type that is closest to this desired
softening is assigned to the particle (*choosing only from those
softening values explicitly input as a SofteningComovingTypeX
parameter*). This option is primarily useful for zoom simulations,
where one may for example lump all boundary dark matter particles
together into type 2 or 3, but yet provide a set of softening types
over which they are automatically distributed according to their
mass. If both ``ADAPTIVE_HYDRO_SOFTENING`` and
``MULTIPLE_NODE_SOFTENING`` are set, the softening types considered
for assignment exclude softening type 0. Note: particles that accrete
matter (black holes or sinks) get their softening updated if needed.
Rainer Weinberger's avatar
Rainer Weinberger committed
570
571
572
573
574

-----

**ADAPTIVE_HYDRO_SOFTENING**

Volker Springel's avatar
Volker Springel committed
575
576
577
578
579
580
581
582
583
When this is enabled, the gravitational softening lengths of hydro
cells are varied along with their radius. To this end, the radius of a
cell is multiplied by the parameter ``GasSoftFactor``. Then, the
closest softening from a logarithmically spaced table of possible
softenings is adopted for the cell. The minimum softening in the table
is specified by the parameter ``MinimumComovingHydroSoftening``, and
the larger ones are spaced a factor ``AdaptiveHydroSofteningSpacing``
apart. The resulting minimum and maximum softening values are reported
in the stdout log file.
Rainer Weinberger's avatar
Rainer Weinberger committed
584
585
586
587
588

-----

**NSOFTTYPES_HYDRO=64**

Volker Springel's avatar
Volker Springel committed
589
590
591
592
This is only relevant if ``ADAPTIVE_HYDRO_SOFTENING`` is enabled and
can be set to override the default value of 64 for the length of the
logarithmically spaced softening table. The sum of ``NSOFTTYPES`` and
``NSOFTTYPES_HYDRO`` may not exceed 254 (this is checked).
Rainer Weinberger's avatar
Rainer Weinberger committed
593
594
595
596
597
598

-----

External gravity
================

Volker Springel's avatar
Volker Springel committed
599
By default, there is no external gravitational potential.
Rainer Weinberger's avatar
Rainer Weinberger committed
600
601
602
603
604
605
606
607
608

**EXTERNALGRAVITY**

Master switch for external potential.

-----

**EXTERNALGY=0.0**

Volker Springel's avatar
Volker Springel committed
609
Constant external gravity in the y-direction
Rainer Weinberger's avatar
Rainer Weinberger committed
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641

-----

NFW Potential
--------------------

**STATICNFW**

Static gravitational Navarro-Frenk-White (NFW) potential.

-----

**NFW_C=12**

Concentration parameter of NFW potential.

-----

**NFW_M200=100.0**

Mass causing the NFW potential.

-----

**NFW_Eps=0.01**

Softening of NFW potential.

-----

**NFW_DARKFRACTION=0.87**

Volker Springel's avatar
Volker Springel committed
642
643
644
Fraction of dark matter in NFW potential. The potential will be
reduced by this factor (with the idea being that the complement is
respresented by gas mass included explicitly in the simulation).
Rainer Weinberger's avatar
Rainer Weinberger committed
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676

-----

Isothermal Sphere
----------------------------------

**STATICISO**

Static gravitational isothermal sphere potential.

-----

**ISO_M200=100.0**

Mass causing the isothermal sphere potential.

-----

**ISO_R200=160.0**

Radius of the isothermal sphere potential.

-----

**ISO_Eps=0.1**

Softening of isothermal sphere potential.

-----

**ISO_FRACTION=0.9**

Volker Springel's avatar
Volker Springel committed
677
678
Fraction in dark matter in isothermal sphere potential. Potential will
be reduced by this factor.
Rainer Weinberger's avatar
Rainer Weinberger committed
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704

-----

Hernquist Potential
--------------------------

**STATICHQ**

Static gravitational Hernquist potential.

-----

**HQ_M200=186.015773**

Mass causing the Hernquist potential.

-----

**HQ_C=10.0**

Concentration parameter of Hernquist potential.

-----

**HQ_DARKFRACTION=0.9**

Volker Springel's avatar
Volker Springel committed
705
706
Fraction in dark matter in Hernquist potential. Potential will be
reduced by this factor.
Rainer Weinberger's avatar
Rainer Weinberger committed
707
708
709
710
711
712
713
714

-----

Time integration
========================

**FORCE_EQUAL_TIMESTEPS**

Volker Springel's avatar
Volker Springel committed
715
716
717
Variable but global timestep. Here the tightest timestep criterion
evaluated for any of the particles determines the timestep of all
particles.
Rainer Weinberger's avatar
Rainer Weinberger committed
718
719
720
721
722

-----

**TREE_BASED_TIMESTEPS**

Volker Springel's avatar
Volker Springel committed
723
724
Non-local timestep criterion (which takes the 'signal speed' of
hydrodynamical waves arriving from any point into account).
Rainer Weinberger's avatar
Rainer Weinberger committed
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741

-----

**PM_TIMESTEP_BASED_ON_TYPES=2+4**

Particle types that should be considered in setting the PM timestep.

-----

**NO_PMFORCE_IN_SHORT_RANGE_TIMESTEP**

PM force is not included in short-range timestep criterion.

-----

**ENLARGE_DYNAMIC_RANGE_IN_TIME**

Volker Springel's avatar
Volker Springel committed
742
743
This extends the dynamic range of the integer timeline from 32 to 64
bits.
Rainer Weinberger's avatar
Rainer Weinberger committed
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766

-----

Message Passing Interface
========================================

**IMPOSE_PINNING**

Enforce pinning of MPI tasks to cores if MPI does not do it.

-----

**IMPOSE_PINNING_OVERRIDE_MODE**

Override MPI pinning, if present.

-----

Single/Double Precision 
=======================

**DOUBLEPRECISION=1**

Volker Springel's avatar
Volker Springel committed
767
768
769
Mode of numerical precision: not set: single; 1: full double precision
2: mixed, 3: mixed, fewer single precisions; unless extremely short of
memory, we recommend to always use 1.
Rainer Weinberger's avatar
Rainer Weinberger committed
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798

-----

**DOUBLEPRECISION_FFTW**

FFTW calculation in double precision.

-----

**OUTPUT_IN_DOUBLEPRECISION**

Snapshot files will be written in double precision.

-----

**INPUT_IN_DOUBLEPRECISION**

Initial conditions are in double precision.

-----

**OUTPUT_COORDINATES_IN_DOUBLEPRECISION**

Will always output coordinates in double precision.

-----

**NGB_TREE_DOUBLEPRECISION**

Volker Springel's avatar
Volker Springel committed
799
800
801
If this is enabled, double precision is aslo used for storing the
spatial neighbor node extension (the precision requirements for this
are less demanding than for other quantities).
Rainer Weinberger's avatar
Rainer Weinberger committed
802
803
804
805
806
807
808
809

-----

Groupfinder
========================================

**FOF**

Volker Springel's avatar
Volker Springel committed
810
811
812
813
Master switch to enable the friends-of-friends group finder in the
code. This will then usually be applied automatically before snapshot
files are written (unless disabled selectively for certain output
dumps).
Rainer Weinberger's avatar
Rainer Weinberger committed
814
815
816
817
818

-----

**FOF_PRIMARY_LINK_TYPES=2**

Volker Springel's avatar
Volker Springel committed
819
820
821
822
823
This option selects the particle types that are processed by the
friends-of-friends linking algorithm. A default linking length of 0.2
is assumed for this particle type unless specified otherwise.  The
specified value corresponds to Sum(2^type) for the primary dark matter
type(s).
Rainer Weinberger's avatar
Rainer Weinberger committed
824
825
826
827
828

-----

**FOF_SECONDARY_LINK_TYPES=1+16+32**

Volker Springel's avatar
Volker Springel committed
829
830
831
832
833
834
835
With this option, FOF groups can be augmented by particles/cells of
other particle types that they "enclose". To this end, for each
particle among the types selected by the bit mask specified with
``FOF_SECONDARY_LINK_TYPES``, the nearest among
``FOF_PRIMARY_LINK_TYPES`` is found and then the particle is attached
to whatever group this particle is in. The specified values
corresponds to sum(2^type) for the types linked to nearest primaries.
Rainer Weinberger's avatar
Rainer Weinberger committed
836
837
838
839
840

-----

**FOF_SECONDARY_LINK_TARGET_TYPES= 2**

Volker Springel's avatar
Volker Springel committed
841
842
843
844
845
An option to make the secondary linking work better in zoom runs
(after the FOF groups have been found, the tree is newly constructed
for all the secondary link targets). This should normally be set to
all dark matter particle types. If not set, it defaults to
``FOF_PRIMARY_LINK_TYPES``, which reproduces the old behavior.
Rainer Weinberger's avatar
Rainer Weinberger committed
846
847
848
849
850

-----

**FOF_GROUP_MIN_LEN=32**

Volker Springel's avatar
Volker Springel committed
851
852
Minimum number of particles (primary+secondary) in one group (default
is 32).
Rainer Weinberger's avatar
Rainer Weinberger committed
853
854
855
856
857

-----

**FOF_LINKLENGTH=0.16**

Volker Springel's avatar
Volker Springel committed
858
859
Linking length for FoF in units of the mean inter-particle separation
(default=0.2).
Rainer Weinberger's avatar
Rainer Weinberger committed
860
861
862
863
864

-----

**FOF_STOREIDS**

Volker Springel's avatar
Volker Springel committed
865
866
867
868
869
870
871
Normally, the snapshots produced with a FOF group catalogue are stored
in group order, such that the particle set making up a group can be
inferred as a contiguous block of particles in the snapshot file,
making it redundant to separately store the IDs of the particles
forming a group in the group catalogue. By activating this option, one
can nevertheless enforce the creation of the corresponding lists of
IDs as part of the group catalogue output.
Rainer Weinberger's avatar
Rainer Weinberger committed
872
873
874
875
876
877
878
879

-----

Subfind 
===========================

**SUBFIND**

Volker Springel's avatar
Volker Springel committed
880
881
882
When enabled, this automatically applies the Subfind subtructure
finder to all FOF groups after they have been found. Also, the
snapshot files are brought into subhalo order within each group.
Rainer Weinberger's avatar
Rainer Weinberger committed
883
884
885
886
887

-----

**SAVE_HSML_IN_SNAPSHOT**

Volker Springel's avatar
Volker Springel committed
888
889
890
891
When activated, this will store the smoothing kernel lengths used for
estimating the total matter density around every point, and the
corresponding densities, in the snapshot files associated with a run
of Subfind.
Rainer Weinberger's avatar
Rainer Weinberger committed
892
893
894
895
896

-----

**SUBFIND_CALC_MORE**

Volker Springel's avatar
Volker Springel committed
897
898
899
900
901
902
Additional calculations are carried out in the Subfind algorithm,
which are not always needed.
(i) The velocity dispersion in the kernel volume used for estimating
the local density.
(ii) The DM density around every particle is stored in the snapshot if
this is set together with ``SAVE_HSML_IN_SNAPSHOT``.
Rainer Weinberger's avatar
Rainer Weinberger committed
903
904
905
906
907

-----

**SUBFIND_EXTENDED_PROPERTIES**

Volker Springel's avatar
Volker Springel committed
908
909
910
911
912
Additional calculations are carried out in the Subfind algorithm,
which are not always needed and may be expensive.
(i) Further quantities related to the angular momentum in different
components.
(ii) The kinetic, thermal and potential binding energies for spherical
Rainer Weinberger's avatar
Rainer Weinberger committed
913
914
915
916
917
overdensity halos.


-----

Rainer Weinberger's avatar
Rainer Weinberger committed
918
Special behavior 
Rainer Weinberger's avatar
Rainer Weinberger committed
919
920
921
922
============================

**RUNNING_SAFETY_FILE**

Volker Springel's avatar
Volker Springel committed
923
924
If file './running' exists, do not start the run. Can be used to
prevent that a simulation is executed twice at the same time.
Rainer Weinberger's avatar
Rainer Weinberger committed
925
926
927
928
929

-----

**MULTIPLE_RESTARTS**

Volker Springel's avatar
Volker Springel committed
930
Keep several restart files instead of just last two copies.
Rainer Weinberger's avatar
Rainer Weinberger committed
931
932
933
934
935

-----

**EXTENDED_GHOST_SEARCH**

Volker Springel's avatar
Volker Springel committed
936
937
938
939
This extends the ghost search to the full 3x3 domain instead of the
principal domain. This can be needed for a successful mesh
construction if the box is sampled only with a couple of cells per
dimension.
Rainer Weinberger's avatar
Rainer Weinberger committed
940
941
942
943
944

-----

**DOUBLE_STENCIL**

Volker Springel's avatar
Volker Springel committed
945
946
947
948
This will ensure that the boundary region of the local mesh is deep
enough to have a valid double stencil for all local cells. This is not
needed for the default algorithms but can be useful for code
extensions.
Rainer Weinberger's avatar
Rainer Weinberger committed
949
950
951
952
953

-----

**TETRA_INDEX_IN_FACE**

Volker Springel's avatar
Volker Springel committed
954
955
956
Adds an extra index to each entry of VF[] and DC[] to one of the
tetrahedra that share this edge. This may be useful for code
extensions.
Rainer Weinberger's avatar
Rainer Weinberger committed
957
958
959
960
961

-----

**NOSTOP_WHEN_BELOW_MINTIMESTEP**

Volker Springel's avatar
Volker Springel committed
962
963
964
Simulation does not terminate when timestep drops below the specified
minimum timestep size, instead it continues with this timestep
floor. 
Rainer Weinberger's avatar
Rainer Weinberger committed
965
966
967
968
969

-----

**TIMESTEP_OUTPUT_LIMIT**

Volker Springel's avatar
Volker Springel committed
970
971
972
973
Limits timesteps such that the requested output times are honored even
if their spacing is finer than the smallest timestep the code makes,
i.e. the code uses the output spacing as an additional timestep
criterion.
Rainer Weinberger's avatar
Rainer Weinberger committed
974
975
976
977
978

-----

**ALLOWEXTRAPARAMS**

Volker Springel's avatar
Volker Springel committed
979
980
981
Tolerate extra parameters in the parameter file that are not
used. Normally, the code aborts with a complaint if such parameters
are encountered.
Rainer Weinberger's avatar
Rainer Weinberger committed
982
983
984
985
986

-----

**FIX_SPH_PARTICLES_AT_IDENTICAL_COORDINATES**

Volker Springel's avatar
Volker Springel committed
987
988
This can be used to load SPH ICs that contain particles at identical
coordinates.
Rainer Weinberger's avatar
Rainer Weinberger committed
989
990
991
992
993

-----

**RECOMPUTE_POTENTIAL_IN_SNAPSHOT**

Rainer Weinberger's avatar
Rainer Weinberger committed
994
Needed for post-processing option 18 that can be used to calculate potential 
Rainer Weinberger's avatar
Rainer Weinberger committed
995
996
997
998
999
1000
values for a snapshot.

-----

**ACTIVATE_MINIMUM_OPENING_ANGLE**

Volker Springel's avatar
Volker Springel committed
1001
1002
This does not open tree nodes under the relative opening criterion any
more if their opening angle has dropped below a minimum angle.
Rainer Weinberger's avatar
Rainer Weinberger committed
1003
1004
1005
1006
1007

-----

**USE_DIRECT_IO_FOR_RESTARTS**

Volker Springel's avatar
Volker Springel committed
1008
1009
Try to use O_DIRECT for low-level read/write operations of restart
files to circumvent linux kernel page caching.
Rainer Weinberger's avatar
Rainer Weinberger committed
1010
1011
1012
1013
1014

-----

**HUGEPAGES**

Volker Springel's avatar
Volker Springel committed
1015
1016
Use huge pages for memory allocation, through hugetlbfs library. Only
possible if the machine supports this.
Rainer Weinberger's avatar
Rainer Weinberger committed
1017
1018
1019
1020
1021

-----

**DETAILEDTIMINGS**

Volker Springel's avatar
Volker Springel committed
1022
1023
Creates individual timing entries for primary/secondary kernels to
help in diagnosing work-load balancing.
Rainer Weinberger's avatar
Rainer Weinberger committed
1024
1025
1026
1027
1028

-----

**BITS_PER_DIMENSION=42**

Volker Springel's avatar
Volker Springel committed
1029
Bits per dimension used for computing Peano-Hilbert keys. (default: 42)
Rainer Weinberger's avatar
Rainer Weinberger committed
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056

-----


Input options 
=============

**COMBINETYPES**

Reads in the IC file types 4+5 as type 3.

-----

**LOAD_TYPES=1+2+4+16+32**

Load only specific types sum(2^type).

-----

**READ_COORDINATES_IN_DOUBLE**

Read coordinates in double precision.

-----

**LONGIDS**

Volker Springel's avatar
Volker Springel committed
1057
1058
1059
If this is set, the code stores particle-IDs as 64-bit long
integers. This is only really needed if you want to go beyond ~2
billion particles.
Rainer Weinberger's avatar
Rainer Weinberger committed
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103

-----

**OFFSET_FOR_NON_CONTIGUOUS_IDS**

Determines offset of IDs on startup instead of using fixed offset.

-----

**GENERATE_GAS_IN_ICS**

Generates gas from dark matter only ICs (using particle type 1 by default).

-----

**SPLIT_PARTICLE_TYPE=4+8**

Overrides splitting particle type 1 in ``GENERATE_GAS_IN_ICS`` use sum(2^type).

-----

**SHIFT_BY_HALF_BOX**

Shift all positions by half a box size after reading in.

-----

**NTYPES_ICS=6**

Number of particle types in ICs, if not ``NTYPES``.

-----

**READ_MASS_AS_DENSITY_IN_INPUT**

Reads the mass field in the IC as density.

-----

Special input options 
=====================

**IDS_OFFSET=1**

Volker Springel's avatar
Volker Springel committed
1104
1105
Override offset for gas cell IDs if created from dark matter
particles.
Rainer Weinberger's avatar
Rainer Weinberger committed
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116

-----

**READ_DM_AS_GAS**

Reads in dark matter particles as gas cells.

-----

**TILE_ICS**

Rainer Weinberger's avatar
Rainer Weinberger committed
1117
Tile ICs by TileICsFactor (specified as parameter) in each dimension.
Rainer Weinberger's avatar
Rainer Weinberger committed
1118
1119
1120
1121
1122
1123

-----

Output fields 
==========================

Rainer Weinberger's avatar
Rainer Weinberger committed
1124
Default output fields are: ``position``, ``velocity``, ``ID``, ``mass``, 
Rainer Weinberger's avatar
Rainer Weinberger committed
1125
1126
1127
1128
``specific internal energy`` (gas only), ``density`` (gas only)

**OUTPUT_TASK**

Volker Springel's avatar
Volker Springel committed
1129
Output of MPI rank on which a certainl cell or particle resides.
Rainer Weinberger's avatar
Rainer Weinberger committed
1130
1131
1132
1133
1134

-----

**OUTPUT_TIMEBIN_HYDRO**

Volker Springel's avatar
Volker Springel committed
1135
Output of hydrodynamical time-bin.
Rainer Weinberger's avatar
Rainer Weinberger committed
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170

-----

**OUTPUT_PRESSURE_GRADIENT**

Output of pressure gradient.

-----

**OUTPUT_DENSITY_GRADIENT**

Output of density gradient.

-----

**OUTPUT_VELOCITY_GRADIENT**

Output of velocity gradient.

-----

**OUTPUT_BFIELD_GRADIENT**

Output of magnetic field gradient.

-----

**OUTPUT_MESH_FACE_ANGLE**

Output of maximum face angle of cells.

-----

**OUTPUT_VERTEX_VELOCITY**

Volker Springel's avatar
Volker Springel committed
1171
Output of velocity of mesh-generating points.
Rainer Weinberger's avatar
Rainer Weinberger committed
1172
1173
1174
1175
1176

-----

**OUTPUT_VOLUME**

Volker Springel's avatar
Volker Springel committed
1177
1178
Output of volume of cells; note that this can always be computed from density 
and mass of cells, which are included by default in the output.
Rainer Weinberger's avatar
Rainer Weinberger committed
1179
1180
1181
1182
1183

-----

**OUTPUT_CENTER_OF_MASS**

Volker Springel's avatar
Volker Springel committed
1184
1185
Output of center of mass of cells (``Pos`` is the position of the
mesh-generating point).
Rainer Weinberger's avatar
Rainer Weinberger committed
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202

-----

**OUTPUT_SURFACE_AREA**

Output of surface area of cells as well as the number of faces.

-----

**OUTPUT_PRESSURE**

Output of pressure of gas.

-----

**OUTPUTPOTENTIAL**

Volker Springel's avatar
Volker Springel committed
1203
1204
1205
1206
This will force the code to compute gravitational potential values for
all particles and cells each time a snapshot file is generated. These
values are then included in the snapshot files. Note that the
computation of the values of the potential costs additional time.
Rainer Weinberger's avatar
Rainer Weinberger committed
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229

-----

**OUTPUTACCELERATION**

Output of gravitational acceleration.

-----

**OUTPUTTIMESTEP**

Output of timestep of particle.

-----

**OUTPUT_SOFTENINGS**

Output of particle softenings.

-----

**OUTPUTGRAVINTERACTIONS**

Volker Springel's avatar
Volker Springel committed
1230
1231
1232
Output of gravitational interaction count (from the gravitational
tree) of particles, which is used in the work-load balancing
algorithm.
Rainer Weinberger's avatar
Rainer Weinberger committed
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267

-----

**OUTPUTCOOLRATE**

Output of cooling rate.

-----

**OUTPUT_DIVVEL**

Output of velocity divergence.

-----

**OUTPUT_CURLVEL**

Output of velocity curl.

-----

**OUTPUT_COOLHEAT**

Output of actual energy loss/gain in cooling/heating routine.

-----

**OUTPUT_VORTICITY**

Output of vorticity of gas.

-----

**OUTPUT_CSND**

Volker Springel's avatar
Volker Springel committed
1268
Output of sound speed. This field is only used for tree-based timesteps. 
Rainer Weinberger's avatar
Rainer Weinberger committed
1269
Calculate from hydro quantities in post-processing if required for science 
Rainer Weinberger's avatar
Rainer Weinberger committed
1270
1271
1272
1273
1274
1275
1276
1277
1278
applications.

-----

Output options 
==============

**PROCESS_TIMES_OF_OUTPUTLIST**

Volker Springel's avatar
Volker Springel committed
1279
1280
1281
1282
Goes through times of output list prior to starting the simulation to
ensure that outputs are written as close to the desired time as
possible (i.e. also up to half a timestep size before it, as opposed
to always after at the next possible time if this flag is not active).
Rainer Weinberger's avatar
Rainer Weinberger committed
1283
1284
1285
1286
1287

-----

**REDUCE_FLUSH**

Volker Springel's avatar
Volker Springel committed
1288
1289
1290
If enabled, files and stdout are only flushed after a certain time
defined in the parameter file (standard behavior: everything is
flushed whenever something is written to it).
Rainer Weinberger's avatar
Rainer Weinberger committed
1291
1292
1293
1294
1295
1296

-----

**OUTPUT_EVERY_STEP**

Create snapshot on every (global) synchronization point, independent of 
Volker Springel's avatar
Volker Springel committed
1297
parameters chosen or output list. 
Rainer Weinberger's avatar
Rainer Weinberger committed
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308

-----

**OUTPUT_CPU_CSV**

Output of a cpu.csv file on top of cpu.txt.

-----

**HAVE_HDF5**

Volker Springel's avatar
Volker Springel committed
1309
1310
1311
1312
If this is set, the code will be compiled with support for input and
output in the HDF5 format. You need to have the HDF5 libraries and
headers installed on your computer for this option to work. The HDF5
format can then be selected as format "3" in Arepo's parameterfile.
Rainer Weinberger's avatar
Rainer Weinberger committed
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323

-----

**HDF5_FILTERS**

Activate snapshot compression and checksum for HDF5 output.

-----

**OUTPUT_XDMF**

Volker Springel's avatar
Volker Springel committed
1324
1325
1326
Writes an ``.xmf`` file for each snapshot, which can be read by the
visualization toolkit Visit (with the hdf5 snapshot). Note: so far
only working if the snapshot is stored in one file.
Rainer Weinberger's avatar
Rainer Weinberger committed
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347

-----

Testing and Debugging
=============================

**DEBUG**

Enables core-dumps.

-----

**VERBOSE**

Reports readjustments of buffer sizes.

-----

Re-gridding
============================

Volker Springel's avatar
Volker Springel committed
1348
1349
These options are auxiliary modes to prepare/convert/relax initial
conditions and will not carry out a simulation.
Rainer Weinberger's avatar
Rainer Weinberger committed
1350
1351
1352
1353
1354
1355
1356
1357
1358

**MESHRELAX**

This keeps the mass constant and only regularizes the mesh.

-----

**ADDBACKGROUNDGRID=16**

Volker Springel's avatar
Volker Springel committed
1359
1360
1361
Re-grid hydrodynamical quantities on an oct-tree AMR grid. This does
not perform a simulation. This "converts" an SPH initial condition
into a (moving) mesh initial condition.