Skip to content

Runtime Parameters: Gravity

hyschive edited this page Jan 7, 2025 · 1 revision

Parameters described on this page: OPT__BC_POT,   GFUNC_COEFF0,   NEWTON_G,   SOR_OMEGA,   SOR_MAX_ITER,   SOR_MIN_ITER,   MG_MAX_ITER,   MG_NPRE_SMOOTH,   MG_NPOST_SMOOTH,   MG_TOLERATED_ERROR,   OPT__GRA_P5_GRADIENT,   OPT__SELF_GRAVITY,   OPT__EXT_ACC,   OPT__EXT_POT,   EXT_POT_TABLE_NAME,   EXT_POT_TABLE_NPOINT_X,   EXT_POT_TABLE_NPOINT_Y,   EXT_POT_TABLE_NPOINT_Z,   EXT_POT_TABLE_DH,   EXT_POT_TABLE_EDGEL_X,   EXT_POT_TABLE_EDGEL_Y,   EXT_POT_TABLE_EDGEL_Z  

Parameters below are shown in the format:   Name   (Valid Values)   [Default Value]

  • GFUNC_COEFF0   (≥0.0; <0.0 → set to default)   [depend]

    • Description: Green's function coefficient for calculating the "self" gravitational potential of each cell (i.e., the gravitational potential contribution from the mass within the same cell). The default value depends on the particle interpolation scheme (PAR_INTERP). Set GFUNC_COEFF0=0.0 to exclude the self-potential.
    • Restriction: Only applicable to the isolated boundary condition.

  • NEWTON_G   (>0.0)   [conform to the unit system set by OPT__UNIT]

    • Description: Gravitational constant.
    • Restriction: It will be overwritten by the default value when OPT__UNIT is on; no default when OPT__UNIT is off.

  • SOR_OMEGA   (≥0.0; <0.0 → set to default)   [1.69]

    • Description: Parameter of the SOR Poisson solver for optimizing the convergence rate.
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=SOR.

  • SOR_MAX_ITER   (≥0; <0 → set to default)   [single precision=60, double precision=110]

    • Description: Maximum number of iterations in the SOR Poisson solver. The default value depends on the adopted floating-point accuracy (FLOAT8).
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=SOR.

  • SOR_MIN_ITER   (≥3; <0 → set to default)   [10]

    • Description: Minimum number of iterations in the SOR Poisson solver.
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=SOR.

  • MG_MAX_ITER   (≥0; <0 → set to default)   [single precision=10, double precision=20]

    • Description: Maximum number of iterations in the multigrid Poisson solver. The default value depends on the adopted floating-point accuracy (--double).
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=MG.

  • MG_NPRE_SMOOTH   (≥0; <0 → set to default)   [3]

    • Description: Number of pre-smoothing steps in the multigrid Poisson solver.
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=MG.

  • MG_NPOST_SMOOTH   (≥0; <0 → set to default)   [3]

    • Description: Number of post-smoothing steps in the multigrid Poisson solver.
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=MG.

  • MG_TOLERATED_ERROR   (≥0.0; <0.0 → set to default)   [single precision=1e-6, double precision=1e-15]

    • Description: Maximum tolerable error in the multigrid Poisson solver.
    • Restriction: Only applicable when adopting the compilation option --pot_scheme=MG.

  • OPT__GRA_P5_GRADIENT   (0=off, 1=on)   [0]

    • Description: Use 5-point instead of 3-point gradient for calculating the gravitational acceleration from potential. This functionality is only experimental.
    • Restriction: Must manually set #define GRA_GHOST_SIZE 2 (and #define USG_GHOST_SIZE 2 as well when adopting the compilation option --unsplit_gravity) in the header file Macro.h. Unsupported for particle update.

  • OPT__SELF_GRAVITY   (0=off, 1=on)   [1]

    • Description: Enable self-gravity.
    • Restriction:

  • OPT__EXT_ACC   (0=off, 1=on)   [0]

    • Description: Add external acceleration. See External Acceleration/Potential for how to specify external acceleration.
    • Restriction: Not applicable to the wave dark matter simulations (--model=ELBDM).

  • OPT__EXT_POT   (0=off, 1=function, 2=table)   [0]

  • EXT_POT_TABLE_NAME   (string)   [none]

  • EXT_POT_TABLE_NPOINT_X   (>1)   [none]

    • Description: For OPT__EXT_POT=2: table size (i.e., number of data points) along the x direction.
    • Restriction:

  • EXT_POT_TABLE_DH   (>0.0)   [none]

    • Description: For OPT__EXT_POT=2: spatial interval between adjacent tabular data.
    • Restriction:

  • EXT_POT_TABLE_EDGEL_X   (cover the simulation domain plus ghost zones)   [none]

    • Description: For OPT__EXT_POT=2: starting x coordinate of the tabular data.
    • Restriction: Must cover the simulation domain plus gravity ghost zones. Specifically, EXT_POT_TABLE_EDGEL_X must be smaller or equal to DomainLeftEdge - 1*RootLevelCell and EXT_POT_TABLE_EDGEL_X + (EXT_POT_TABLE_NPOINT_X-1)*EXT_POT_TABLE_DH must be larger or equal to DomainRightEdge + 1*RootLevelCell.

  • EXT_POT_TABLE_EDGEL_Y   (cover the simulation domain)   [none]

  • EXT_POT_TABLE_EDGEL_Z   (cover the simulation domain)   [none]

Remarks


Links

Clone this wiki locally