Inputs

The Nyx executable reads run-time information from an “inputs” file which you put on the command line. This section describes the inputs which can be specified either in the inputs file or on the command line. If a value is specified on the command line, that value will override a value specified in the inputs file.

Problem Geometry

List of Parameters

Parameter

Definition

Acceptable Values

Default

geometry.prob_lo

physical location of low corner of the domain

Real

must be set

geometry.prob_hi

physical location of high corner of the domain

Real

must be set

geometry.coord_sys

coordinate system

0 = Cartesian, 1 = r-z, 2 = spherical

must be set

geometry.is_periodic

is the domain periodic in this direction

0 if false, 1 if true

0 0 0

Examples of Usage

  • geometry.prob_lo = 0 0 0 defines the low corner of the domain at (0,0,0) in physical space.

  • geometry.prob_hi = 1.e8 2.e8 2.e8 defines the high corner of the domain at (1.e8,2.e8,2.e8) in physical space.

  • geometry.coord_sys = 0 defines the coordinate system as Cartesian

  • geometry.is_periodic = 0 1 0 says the domain is periodic in the y-direction only.

Domain Boundary Conditions

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.lo_bc

boundary type of each low face

0,1,2,3,4,5

must be set

nyx.hi_bc

boundary type of each high face

0,1,2,3,4,5

must be set

[Table:BC]

Notes

Boundary types are:

0 – Interior / Periodic

3 – Symmetry

1 – Inflow

4 – Slip Wall

2 – Outflow

5 – No Slip Wall

Note – nyx.lo_bc and nyx.hi_bc must be consistent with geometry.is_periodic – if the domain is periodic in a particular direction then the low and high bc’s must be set to 0 for that direction.

Examples of Usage

  • nyx.lo_bc = 1 4 0

  • nyx.hi_bc = 2 4 0

  • geometry.is_periodic = 0 0 1

would define a problem with inflow (1) in the low-x direction, outflow(2) in the high-x direction, slip wall (4) on the low and high y-faces, and periodic in the z-direction.

Resolution

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.n_cell

number of cells in each direction at the coarsest level

Integer > 0

must be set

amr.max_level

number of levels of refinement above the coarsest level

Integer >= 0

must be set

amr.ref_ratio

ratio of coarse to fine grid spacing between subsequent levels

2 or 4

must be set

amr.regrid_int

how often to regrid

Integer > 0

must be set

amr.regrid_on_restart

should we regrid immediately after restarting

0 or 1

0

[Table:ResInputs]

Note: if amr.max_level = 0 then you do not need to set amr.ref_ratio or amr.regrid_int.

Examples of Usage

  • amr.n_cell = 32 64 64

    would define the domain to have 32 cells in the x-direction, 64 cells in the y-direction, and 64 cells in the z-direction at the coarsest level. (If this line appears in a 2D inputs file then the final number will be ignored.)

  • amr.max_level = 2
    would allow a maximum of 2 refined levels in addition to the coarse level. Note that these additional levels will only be created only if the tagging criteria are such that cells are flagged as needing refinement. The number of refined levels in a calculation must be \(\leq\) amr.max_level, but can change in time and need not always be equal to amr.max_level.
  • amr.ref_ratio = 2 4
    would set factor 2 refinement between levels 0 and 1, and factor 4 refinement between levels 1 and 2. Note that you must have at least amr.>ax_level values of amr.ref_ratio (Additional values may appear in that line and they will be ignored).
  • amr.regrid_int = 2 2
    tells the code to regrid every 2 steps. Thus in this example, new level-1 grids will be created every 2 level-0 time steps, and new level-2 grids will be created every 2 level-1 time steps.

Regridding

Overview

The details of the regridding strategy are described in Section 5.5, but first we cover how the input parameters can control the gridding.

As described later, the user defines Fortran subroutines which tag individual cells at a given level if they need refinement. This list of tagged cells is sent to a grid generation routine, which uses the Berger–Rigoutsos algorithm to create rectangular grids that contain the tagged cells.

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.regrid_file

name of file from which to read the grids

text

no file

amr.grid_eff

grid efficiency at coarse level at which grids are created

Real > 0, < 1

0.7

amr.n_error_buf

radius of additional tagging around already tagged cells

Integer >= 0

1

amr.max_grid_size

maximum size of a grid in any direction

Integer > 0

128 in 2D, 32 in 3D

amr.max_grid_size

maximum size

Integer

128 in 2D, 32

amr.blocking_factor

grid size must be a multiple of this

Integer > 0

2

amr.refine_grid_layout

refine grids more if # of processors \(>\) # of grids

0 if false, 1 if true

1

[Table:GriddingInputs]

Notes

  • amr.n_error_buf, amr.max_grid_size and amr.blocking_factor can be read in as a single value which is assigned to every level, or as multiple values, one for each level

  • amr.max_grid_size at every level must be even

  • amr.blocking_factor at every level must be a power of 2

  • the domain size amr.n_cell must be a multiple of amr.blocking_factor at level 0

  • amr.max_grid_size must be a multiple of amr.blocking_factor at every level

Examples of Usage

  • amr.regrid_file = fixed_grids
    In this case the list of grids at each fine level are contained in the file fixed_grids, which will be read during the gridding procedure. These grids must not violate the amr.max_grid_size criterion. The rest of the gridding procedure described below will not occur if amr.regrid_file is set.
  • amr.grid_eff = 0.9
    During the grid creation process, at least 90% of the cells in each grid at the level at which the grid creation occurs must be tagged cells. Note that this is applied at the coarsened level at which the grids are actually made, and before amr.max_grid_size is imposed.
  • amr.max_grid_size = 64
    The final grids will be no longer than 64 cells on a side at every level.
  • amr.max_grid_size = 64 32 16
    The final grids will be no longer than 64 cells on a side at level 0, 32 cells on a side at level 1, and 16 cells on a side at level 2.
  • amr.blocking_factor = 32
    The dimensions of all the final grids will be multiples of 32 at all levels.
  • amr.blocking_factor = 32 16 8
    The dimensions of all the final grids will be multiples of 32 at level 0, multiples of 16 at level 1, and multiples of 8 at level 2.

    Having grids that are large enough to coarsen multiple levels in a V-cycle is essential for good multigrid performance in simulations that use self-gravity.

How Grids are Created

The gridding algorithm proceeds in this order:

  1. If at level 0, the domain is initially defined by n_cell as specified in the inputs file. If at level greater than 0, grids are created using the Berger–Rigoutsis clustering algorithm applied to the tagged cells, modified to ensure that the lengths of all new fine grids are divisible by blocking_factor.

  2. Next, the grid list is chopped up if any grids have length longer than max_grid_size. Note that because max_grid_size is a multiple of blocking_factor (as long as max_grid_size is greater than blocking_factor), the blocking_factor criterion is still satisfied.

  3. Next, if refine_grid_layout = 1 and there are more processors than grids at this level, then the grids at this level are further divided in order to ensure that no processor has fewer than one grid (at each level).

    • if max_grid_size / 2 in the BL_SPACEDIM direction is a multiple of blocking_factor, then chop the grids in the BL_SPACEDIM direction so that none of the grids are longer in that direction than max_grid_size / 2

    • If there are still fewer grids than processes, repeat the procedure in the BL_SPACEDIM-1 direction, and again in the BL_SPACEDIM-2 direction if necessary

    • If after completing a sweep in all coordinate directions with max_grid_size / 2, there are still fewer grids than processes, repeat the steps above with max_grid_size / 4.

Simulation Time

List of Parameters

Parameter

Definition

Acceptable Values

Default

max_step

maximum number of level 0 time steps

Integer >= 0

-1

stop_time

final simulation time

Real >= 0

-1.0

nyx.final_a

final value of a

Real > 0

-1.0

nyx.final_z

final value of z

Real > 0

-1.0

[Table:TimeInputs]

Notes

To control the number of time steps, you can limit by the maximum number of level-0 time steps (max_step), or the final simulation time (stop_time), or both. The code will stop at whichever criterion comes first. Note that if the code reaches stop_time then the final time step will be shortened so as to end exactly at stop_time, not pass it.

If running in comoving coordinates you can also set a final value of \(a\) by setting nyx.final_a, or a final value of \(z\) by setting nyx.final_z. You may only specify one or the other of these. Once this value of \(a\) or \(z\) is reached in a time step, the code will stop at the end of this full coarse time step. (Note it does not stop at \(a\) (or \(z\)) exactly equal to the final value, rather it stops once \(a\) is greater than (or \(z\) is less than) this value.)

Examples of Usage

  • max_step = 1000

  • stop_time = 1.0

will end the calculation when either the simulation time reaches 1.0 or the number of level-0 steps taken equals 1000, whichever comes first.

Time Step

  • If nyx.do_hydro\(= 1\), then typically the code chooses a time step based on the CFL number (dt = cfl * dx / max(u+c) ).

  • If nyx.do_hydro\(= 0\) and we are running with dark matter particles, then we use a time step based on the velocity of the particles, i.e., we set \(\Delta t\) so that the particle goes no further than \(f \Delta t\) in a coordinate direction where \(0 \leq f \leq 1.\) The value for \(f\) is currently hard-wired in Particles.H, but it will become an inputs parameter.

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.cfl

CFL number for hydro

Real > 0 and <= 1

0.8

particles.cfl

CFL number for particles

Real > 0 and <= 1

0.5

nyx.init_shrink

factor by which to shrink the initial time step

Real > 0 and <= 1

1.0

nyx.change_max

factor by which the time step can grow in subsequent steps

Real >= 1

1.1

nyx.fixed_dt

level-0 time step regardless of cfl or other settings

Real > 0

unused if not set

nyx.initial_dt

initial level-0 time step regardless of other settings

Real > 0

unused if not set

nyx.dt_cutoff

time step below which calculation will abort

Real > 0

0.0

nyx.dt_binpow

time step chosen to be a power of a half times the comoving time step

Real >= 0

-1.0

nyx.relative_max _change_a

max da/dt

Real > 0

0.01

nyx.absolute_max _change_a

a_new-a_old

Real > 0

-1.0

[Table:TimeStepInputs]

Examples of Usage

  • nyx.cfl = 0.9
    defines the timestep as dt = cfl * dx / umax_hydro.
  • particles.cfl = 0.9
    defines the timestep as dt = cfl * dx / umax_particles where umax_particles is the maximum velocity of any particle in the domain.
  • nyx.init_shrink = 0.01
    sets the initial time step to 1% of what it would be otherwise.
  • nyx.change_max = 1.1
    allows the time step to increase by no more than 10% in this case. Note that the time step can shrink by any factor; this only controls the extent to which it can grow.
  • nyx.fixed_dt = 1.e-4
    sets the level-0 time step to be 1.e-4 for the entire simulation, ignoring the other timestep controls. Note that if nyx.init_shrink \(\neq 1\) then the first time step will in fact be nyx.init_shrink * nyx.fixed_dt.
  • nyx.initial_dt = 1.e-4
    sets the initial level-0 time step to be 1.e-4 regardless of nyx.cfl or nyx.fixed_dt. The time step can grow in subsequent steps by a factor of nyx.change_max each step.
  • nyx.dt_cutoff = 1.e-20
    tells the code to abort if the time step ever gets below 1.e-20. This is a safety mechanism so that if things go nuts you don’t burn through your entire computer allocation because you don’t realize the code is misbehaving.
  • nyx.dt_binpow = 1.0
    sets \(\mathrm{dt}=\left(\frac{1}{2}\right)^{n}\mathrm{dt}_{\mathrm{a}}|n:\mathrm{dt}_{\mathrm{cfl}}>\left(\frac{1}{2}\right)^{n}\mathrm{dt_{a}}\) where \(\mathrm{dt}_{\mathrm{cfl}}\) is determined by the more restrictive timestep of nyx.cfl and particles.cfl, and where \(\mathrm{dt}_{\mathrm{a}}\) is determined by the relative_max_change_a, absolute_max_change_a, and the evolution of \(\frac{da}{dt}\)

Subcycling

 supports a number of different modes for subcycling in time.

  • If amr.subcycling_mode\(=\)Auto (default), then the code will run with equal refinement in space and time. In other words, if level \(n+1\) is a factor of 2 refinement above level \(n\), then \(n+1\) will take 2 steps of half the duration for every level \(n\) step.

  • If amr.subcycling_mode\(=\)None, then the code will not refine in time. All levels will advance together with a timestep dictated by the level with the strictest \(dt\). Note that this is identical to the deprecated command amr.nosub = 1.

  • If amr.subcycling_mode\(=\)Manual, then the code will subcycle according to the values supplied by subcycling_iterations.

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.sub cycling_mode

How shall we subcycle

Auto, None or Manual

Auto

amr.subcycli g_iterations

Number of cycles at each level

1 or ref_ratio

must be set in Manual mode

Examples of Usage

  • amr.subcycling_mode\(=\)Manual
    Subcycle in manual mode with largest allowable timestep.
  • amr.subcycling_iterations = 1 2 1 2
    Take 1 level-0 timestep at a time (required). Take 2 level-1 timesteps for each level-0 step, 1 timestep at level 2 for each level-1 step, and take 2 timesteps at level 3 for each level 2 step.
  • amr.subcycling_iterations = 2
    Alternative form. Subcycle twice at every level (except level 0).

Restart Capability

 has a standard sort of checkpointing and restarting capability. In the inputs file, the following options control the generation of checkpoint files (which are really directories):

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.check_file

prefix for restart files

String

“chk”

amr.check_int

how often (by level-0 time steps) to write restart files

Integer \(> 0\)

-1

amr.check_per

how often (by simulation time) to write restart files

Real \(> 0\)

-1.0

amr.restart

name of the file (directory) from which to restart

String

not used if not set

amr.checkpoint_files_output

should we write checkpoint files

0 or 1

1

amr.check_nfiles

how parallel is the writing of the checkpoint files

Integer \(\geq 1\)

64

amr.checkpoint_on_restart

should we write a checkpoint immediately after restarting

0 or 1

0

nyx.checkpoint_z_values

The redshift values at which checkpoint file should be written in addition to what is specified using check_int

list of redshift values

NONE

Notes

  • You should specify either amr.check_int or amr.check_per. Do not try to specify both.

  • Note that if amr.check_per is used then in order to hit that exact time the code may modify the time step slightly, which will change your results ever so slightly than if you didn’t set this flag.

  • Note that amr.plotfile_on_restart and amr.checkpoint_on_restart only take effect if amr.regrid_on_restart is in effect.

  • See the Software Section for more details on parallel I/O and the amr.check_nfiles parameter.

  • If you are doing a scaling study then set amr.checkpoint_files_output = 0 so you can test scaling of the algorithm without I/O.

Examples of Usage

  • amr.check_file = chk_run

  • amr.check_int = 10

    means that restart files (really directories) starting with the prefix “chk_run” will be generated every 10 level-0 time steps. The directory names will be chk_run00000, chk_run00010, chk_run00020, etc.

If instead you specify

  • amr.check_file = chk_run

  • amr.check_per = 0.5

    then restart files (really directories) starting with the prefix “chk_run” will be generated every 0.1 units of simulation time. The directory names will be chk_run00000, chk_run00043, chk_run00061, etc, where \(t = 0.1\) after 43 level-0 steps, \(t = 0.2\) after 61 level-0 steps, etc.

To restart from chk_run00061,for example, then set

  • amr.restart = chk_run00061

Controlling PlotFile and Generation

The main output from  is in the form of plotfiles (which are really directories). The following options in the inputs file control the generation of plotfiles

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.plot_file

prefix for plotfiles

String

“plt”

amr.plot_int

how often (by level-0 time steps) to write plot files

Integer \(> 0\)

-1

amr.plot_per

how often (by simulation time) to write plot files

Real \(> 0\)

-1.0

amr.plot_vars

name of state variables to include in plotfiles

ALL, NONE or list

ALL

amr.derive_plot_vars

name of derived variables to include in plotfiles

ALL, NONE or list

NONE

amr.plot_files_output

should we write plot files

0 or 1

1

amr.plotfile_on_restart

should we write a plotfile immediately after restarting

0 or 1

0

amr.plot_nfiles

how parallel is the writing of the plotfiles

Integer \(\geq 1\)

64

nyx.plot_rank

should we plot the processor ID in the plotfiles

True / False

False

fab.format

Should we write the plotfile in double or single precision

NATIVE or IEEE32

NATIVE

nyx.plot_z_values

The redshift values at which plot files should be written in addition to what is specified using nyx.plot_int

list of redshift values

NONE

All the options for amr.derive_plot_vars are kept in derive_lst in Nyx_setup.cpp. Feel free to look at it and see what’s there.

Notes

  • You should specify either amr.plot_int or amr.plot_per. Do not try to specify both.

  • Note that if amr.plot_per is used then in order to hit that exact time the code may modify the time step slightly, which will change your results ever so slightly than if you didn’t set this flag.

  • See the Software Section for more details on parallel I/O and the amr.plot_nfiles parameter.

  • If you are doing a scaling study then set amr.plot_files_output = 0 so you can test scaling of the algorithm without I/O.

  • By default, plotfiles are written in double precision (NATIVE format). If you want to save space by writing them in single precision, set the fab.format flag to IEEE32.

Examples of Usage

  • amr.plot_file = plt_run

  • amr.plot_int = 10

    means that plot files (really directories) starting with the prefix “plt_run” will be generated every 10 level-0 time steps. The directory names will be plt_run00000, plt_run00010, plt_run00020, etc.

If instead you specify

  • amr.plot_file = plt_run

  • amr.plot_per = 0.5

    then restart files (really directories) starting with the prefix “plt_run” will be generated every 0.1 units of simulation time. The directory names will be plt_run00000, plt_run00043, plt_run00061, etc, where \(t = 0.1\) after 43 level-0 steps, \(t = 0.2\) after 61 level-0 steps, etc.

Plotfile Variables

Native variables

These variables come directly from the StateData, either the State_Type (for the hydrodynamic variables), DiagEOS_Type (for the nuclear energy generation quantities). PhiGrav_Type and Gravity_Type (for the gravity quantities)

variable name

description

units

density

Baryonic mass density, \(\rho\)

M\(_\odot\) / Mpc\(^3\)

xmom

x-momentum, \((\rho u)\)

\({\rm g~km^{-2}~s^{-1}}\)

ymom

y-momentum, \((\rho v)\)

\({\rm g~km^{-2}~s^{-1}}\)

zmom

z-momentum, \((\rho w)\)

\({\rm g~km^{-2}~s^{-1}}\)

rho_E

Total energy density

\({\rm erg~km^{-3}}\)

rho_e

Internal energy density

\({\rm erg~km^{-3}}\)

Temp

Temperature

\({\rm K}\)

Ne

Number density of electrons

dimensionless

rho_X (where X is H or He, the species defined in the network)

Mass density of species X (only valid for non- constant species)

dimensionless

phiGrav

Gravitational potential

\({\rm erg~g^{-1}}\)

grav_x, grav_y, grav_z

Gravitational acceleration

\({\rm km~s^{-2}}\)

Derived variables

variable name

description

derive routine

units

divu

\(\nabla \cdot \ub\)

derdivu

\({\rm s^{-1}}\)

eint_e

Specific internal energy computed from the conserved \((\rho e)\) state variable as \(e = (\rho e)/\rho\)

dereint2

\({\rm erg~g^{-1}}\)

eint_E

Specific internal energy computed from the total energy and momentum conserved state as \(e=[(\rho E)-\frac{1}{2}(\rho \ub^2)]/\rho\)

dereint1

\({\rm erg~g^{-1}}\)

kineng

Kinetic energy density, \(K = \frac{1}{2} |(\rho \ub)|^2\)

derkineng

\({\rm erg~km^{-3}}\)

logden

\(\log_{10} \rho\)

derlogden

M\(_\odot\) / Mpc\(^3\)

MachNumber

Fluid Mach number, \(|\ub|/c_s\)

dermachnumber

–

maggrav

Gravitational acceleration magnitude

dermaggrav

\({\rm km~s^{-2}}\)

magmom

Momentum density magnitude, \(|\rho \ub|\)

dermagmom

\({\rm g~km^{-2}~s^{-1}}\)

magvel

Velocity magnitude, \(|\ub|\)

dermagvel

\(\mathrm{km~s^{-1}}\)

magvort

Vorticity magnitude, \(|\nabla\times\ub|\)

dermagvort

\({\rm s^{-1}}\)

pressure

Total pressure, including ions and electrons

derpres

\({\rm dyn~km^{-2}}\)

soundspeed

Sound speed

dersoundspeed

\(\mathrm{km~s^{-1}}\)

H or He

Mass fraction of species H or He

derspec

–

x_velocity, y_velocity, z_velocity

Fluid velocity, \(\ub = (\rho \ub)/\rho\)

dervel

\(\mathrm{km~s^{-1}}\)

Screen Output

List of Parameters

Parameter

Definition

Acceptable Values

Default

amr.v

verbosity of Amr.cpp

0 or 1

0

nyx.v

verbosity of Nyx.cpp

0 or 1

0

gravity.v

verbosity of Gravity.cpp

0 or 1

0

mg.v

verbosity of multigrid solver (for gravity)

0,1,2,3,4

0

particles.v

verbosity of particle-related processes

0,1,2,3,4

0

amr.grid_log

name of the file to which the grids are written

String

not used if not set

amr.run_log

name of the file to which certain output is written

String

not used if not set

amr.run_log_terse

name of the file to which certain (terser) output is written

String

not used if not set

amr.sum_interval

if \(> 0,\) how often (in level-0 time steps)

to compute and print integral quantities

Integer

-1

Examples of Usage

  • amr.grid_log = grdlog
    Every time the code regrids it prints a list of grids at all relevant levels. Here the code will write these grids lists into the file grdlog.
  • amr.run_log = runlog
    Every time step the code prints certain statements to the screen (if amr.v = 1), such as
    STEP = 1 TIME = 1.91717746 DT = 1.91717746
    PLOTFILE: file = plt00001
    Here these statements will be written into runlog as well.
  • amr.run_log_terse = runlogterse
    This file, runlogterse, differs from runlog in that it only contains lines of the form
    10 0.2 0.005
    in which “10” is the number of steps taken, “0.2” is the simulation time, and “0.005” is the level-0 time step. This file can be plotted very easily to monitor the time step.
  • nyx.sum_interval = 2
    if nyx.sum_interval \(> 0\) then the code computes and prints certain integral quantities, such as total mass, momentum and energy in the domain every nyx.sum_interval level-0 steps. In this example the code will print these quantities every two coarse time steps. The print statements have the form
    TIME= 1.91717746 MASS= 1.792410279e+34
    for example. If this line is commented out then it will not compute and print these quanitities.

Gravity

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.do_grav

Include gravity as a forcing term

0 if false 1 if true

must be set

gravity.no_sync

whether to perform the “sync solve”

0 if false 1 if true

0

gravity.no_composite

whether to perform a composite solve

0 if false 1 if true

0

Notes

  • To include gravity you must set nyx.do_grav = 1 in the inputs file

Physics

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.do_hydro

Time-advance the fluid dynamical equations

0 if false, 1 if true

must be set

nyx.ppm_type

Use PPM or PLM for hydro advance

0 for PLM 1 for PPM

1 (PPM)

nyx.enforce_min_density_type

how to enforce rho greater than small_dens

“floor” “cons”

“floor”

nyx.strang_split

Use strang splitting

0 if false, 1 if true

1

nyx.sdc_split

Use sdc splitting

0 if false, 1 if true

0

nyx.strang_grown_box

Use growntilebox to avoid comms

0 if false, 1 if true

1

nyx.add_ext_src

Include additional user-specified source term

0 if false, 1 if true

0

nyx.nghost_state

Set number of ghost cells for state variables

{1,2,3,4}

1

nyx.use_const_species

If 1 then read h_species and he_species

0 or 1

0

nyx.h_species

Concentration of H

0 \(<\) X \(<\) 1

0

nyx.he_species

Concentration of He

0 \(<\) X \(<\) 1

0

Cosmology

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.comoving_OmM

Relative (total) mass density

0 \(<\) X \(<\) 1

must be set

nyx.comoving_OmB

Relative baryon density

0 \(<\) X \(<\) 1

must be set

nyx.comoving_OmR

Relative radiation density

0 \(<\) X \(<\) 1

must be set

nyx.comoving_h

Dimensionless Hubble parameter

0 \(<\) X \(<\) 1

must be set

nyx.gamma

Dimensionless factor relating \(p, \rho, e\)

0 \(<\) X \(<\) 2

\(5/3\)

Examples of Usage

  • nyx.gamma This changes \(\gamma\) in the \(\gamma\) law gas: \(p = (\gamma - 1) \rho e.\)

Reionization models

List of Parameters

Parameter

Definition

Acceptable Values

Default

uvb_rates_file

Name of the UVB (TREECOOL) file

string

must be set

uvb_density_A

Density-dependent heating

real

1.0

uvb_density_B

Density dependent heating

real

0.0

reionization_zHI_flash

Redshift of “flash” H reion.

0 \(<\) X or -1 if off

-1.0

reionization_zHeII_flash

Redshift of “flash” He reion.

0 \(<\) X of -1 if off

-1.0

inhomo_reion

Inhomogeneous reionization

0 or 1

0

inhomo_zhi_file

File with reionization map

string

must be set (if used)

inhomo_grid

Size of the reionization grid

integer

must be set (if used)

reionization_T_zHI

H reionization heat input

real

2.0e4

reionization_T_zHeII

He reionization heat input

real

1.5e4

Dark matter halo output using Reeber

List of Parameters

Parameter

Definition

Acceptable Values

Default

reeber.min_halo_n_cells

Minimum number of cells required for a halo to be considered a valid structure

integer

10

reeber.halo_component_threshold

Threshold for identifying connected components within a halo

real

81.66

reeber.halo_extrema_threshold

Threshold for detecting local maxima or extrema in the density field

real

160.0

Multigrid Inputs

The following inputs can be set directly in the AMReX solver classes but we set them via the Nyx gravity routines.

These must be preceded by “gravity” in the inputs file:

Description

Type

Default

v

Verbosity of Gravity class

Int

0

ml_tol

Relative tolerance for multilevel solves

Real

1.e-12

sl_tol

Relative tolerance for single-level solves

Real

1.e-12

delta_tol

Relative tolerance for synchronization solves

Real

1.e-12

mlmg_agglomeration

Should we agglomerate deep in the V-cycle

Int

1

mlmg_consolidation

Should we consolidate deep in the V-cycle

Int

1

dirichlet_bcs

Should we use homogeneous Dirichlet bcs in the gravity solves (used for testing only)

Int

0

These must be preceded by “mg” in the inputs file:

Description

Type

Default

v

Verbosity of multigrid solver

Int

0

bottom_solver

What is the bottom solver? Options include “bicg”, “smoother”, “hypre”, etc

String

“bicg”

max_fmg_iter

Maximum number of F-cycles to do before continuing with V-cycles in a multigrid solve

Int

0

There are a number of additional inputs that can be used to control the multigrid solver.

See the AMReX Multigrid documentation for more details.

Memory Optimization

List of Parameters

Parameter

Definition

Acceptable Values

Default

nyx.shrink_to_fit

Shrink Particle vector to save memory

0 if false, 1 if true

nyx.minimize_memory

Use less temporary scratch memory in hydro

0 if false, 1 if true

nyx.load_balance_int

How often to load-balance particles

Int < 0 if never Int > 0

-1

nyx.load_balance_start_z

Redshift to start load-balancing particles

Real > 0

7.0

nyx.load_balance_wgt_stategy

Weight strategy to load-balance particles

{0, 1, 2}

0

nyx.load_balance_wgt_nmax

Max ranks to load-balance particles

0 < Int < Ranks

-1

nyx.load_balance_stategy

Dmap strategy type for particle load-balancing

{KNAPSACK,

SFC, ROUNDROBIN

SFC