5. Description of the parameters in PION parameter files

PION is controlled mainly by a parameter file that sets what kind of initial conditions to set up, what equations to use, the properties of the computational grid, source terms such as stellar wind, and numerical parameters specifying the integration scheme. There are described here.

5.1. Initial Conditions Generator

There are a number of different problems that can be set up with PION, with source files located in source/ics/:

Problem

Location of source file

Brief description

1Dto2D

read_1Dto2D.cpp

Read 1D snapshot and map to 2D or 3D grid

Advection

basic_tests.cpp

Sets up advection of an overdense clump

BlastWave

blast_wave.cpp

Set up supernova blastwave problems

DivBPeak

basic_tests.cpp

Sets up a uniform medium with a peak in \(\nabla\cdot\mathbf{B}\)

DoubleMachRef

basic_tests.cpp

The Double Mach-Reflection test

FieldLoop

basic_tests.cpp

Advection of a magnetic field loop

Jet

jet.cpp

Sets up 2D axisymmetric jet or 3D jet

KelvinHelmholtz

basic_tests.cpp

Set up Kelvin-Helmholtz instability test

LaserAblationAxi

laser_ablation.cpp

Set up a HEDP laser ablation test calc

LiskaWendroffImplosion

basic_tests.cpp

The Liska and Wendroff implosion test

OrszagTang

basic_tests.cpp

The 2D Orszag-Tang Vortex test

PE_MC_FN or PE_MC_FM

photoevaporating_multiclumps.cpp

Set up photoevaporation of dense clouds

PhotoEvaporatingClump

photoevaporating_clump.cpp

Sets up photoevaporation of dense cloud

PhotEvap_RandomClumps

photoevaporating_random_clumps.cpp

Set up photoevaporation of randomly placed dense clouds

RadiativeShock

radiative_shock.cpp

Sets up 1D or 2D radiative shock test

ShockCloud

shock_cloud.cpp

Set up shock-cloud interaction problems

Uniform

basic_tests.cpp

Sets up a uniform medium

5.2. Equations

There are three different types of equations that can be set up:

  • Euler equations: the inviscid equations of hydrodynamics.

  • Ideal MHD equations: magnetohydrodynamics, only usable in 1D because there is no scheme for dealing with DivB errors.

  • GLM-MHD equations: magnetohydrodynamics plus the Dedner et al. (2002) divergence cleaning mechanism for mitigating DivB errors.

There are a number of different flux solvers that can be used, with different levels of robustness and accuracy:

  • List of solvers

Parameter

Type

Units

Description

eqn

string

none

System of equations to solve: euler, mhd, glm-mhd

GAMMA

double

none

adiabatic index of the gas (usually 5/3=1.66666666666667)

solver

integer

none

Which flux solver to use (see above for options)

OrderOfAccSpace

integer

none

spatial order of accuracy: 1 = piecewise constant; 2 = piecewise linear

OrderOfAccTime

integer

none

temporal order of accurasy: 1 = 1st order piecewise constant; 2 = 2nd order, piecewise linear

CFL

double

none

Courant-Friedrichs-Lewy number (<1 1D, <0.5 2D, <0.33 3D)

ArtificialViscosity

integer

none

0=no AV, 1=Falle+(1998) AV, 3=Sanders+(1998) H-correction H-correction only works with some solvers.

EtaViscosity

double

none

Viscosity parameter for Falle+(1998) AV, in range [0,1], default value is 0.15.

5.3. Computational Grid

The PION computational grid is a uniform rectilinear grid in 1, 2 or 3 spatial dimensions. Static mesh-refinement (nested grids) is implemented for the case where each refinement level has the same shape and number of cells as the coarser level above it, but the spatial resolution is a factor of 2 higher and so the grid covers 1/2 of the domain of the coarser grid in each dimension. The focus of the nested grid can be at the centre of the domain, the negative boundary or the positive boundary for each dimension. The number of refinement levels is in principle unlimited, but snapshots can only be written every coarse timestep and this imposes a practical limit: for 10 grid levels there are 512 finest-level timesteps per coarsest-level step, and one probably wants to save a snapshot at least this often. The coarsest level is denoted level 0, and each refined level has a higher level number.

The parameters are:

Parameter

Type

Units

Description

ndim

integer

none

Number of spatial dimensions to simulate

coordinates

string

none

Geometry. 1D: spherical, 2D: cylindrical/cartesian, 3D: cartesian

NGridX

integer

none

Number of grid points in \(\hat{x}\)-direction

NGridY

integer

none

Number of grid points in \(\hat{y}\)-direction

NGridZ

integer

none

Number of grid points in \(\hat{z}\)-direction

Xmin

double

cm

negative boundary in \(\hat{x}\)-direction (level 0)

Ymin

double

cm

negative boundary in \(\hat{y}\)-direction (level 0)

Zmin

double

cm

negative boundary in \(\hat{z}\)-direction (level 0)

Xmax

double

cm

positive boundary in \(\hat{x}\)-direction (level 0)

Ymax

double

cm

positive boundary in \(\hat{y}\)-direction (level 0)

Zmax

double

cm

positive boundary in \(\hat{z}\)-direction (level 0)

5.4. Source terms

5.4.1. Stellar Winds

Stellar winds in PION are implemented in 3 modules: a constant wind, an evolving wind, and a latitude-dependent wind. The parameter file for a constant wind has a number of parameters that should be set, quoted below with the expected units. They are stored in these units in the SWP struct of type stellarwind_params.

Parameter

Description

Units/values

WIND_[i]_pos[n]

Star position \(n\in[0,1,2]\)

cm

WIND_[i]_velocity[n]

Star velocity \(n\in[0,1,2]\)

cm/s (if moving) default is 0

WIND_[i]_radius

Radius of wind injection region

cm

WIND_[i]_type

[Constant, evolving, latitude dependent]

[0,1,2]

WIND_[i]_mdot

Mass-loss rate from star (dot{M})

\(\mathrm{M_{\odot}\,yr}^{-1}\)

WIND_[i]_vinf

Terminal velocity of wind

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

WIND_[i]_vrot

Equatorial rotation velocity

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

WIND_[i]_temp

Effective Temperature of star, \(T_\mathrm{eff}\)

K

WIND_[i]_Rstr

Radius of star

cm

WIND_[i]_Bstr

Strength of surface magnetic field

Gauss

WIND_[i]_TR[n]

Value of tracer \(n\) in wind

Usually \(\in [0,1]\)

WIND_[i]_evofile

Text file with data for evolving wind

Default is NOFILE

WIND_[i]_t_offset

offset of sim time from evolution time

Default is 0.0

WIND_[i]_t_scalefac

scaling simulation time to evolution time

Default is 1.0

WIND_[i]_updatefreq

How often to update the wind

seconds

WIND_[i]_enhance_mdot

ad-hoc flag to increase \(\dot{M}\)

Default is 0

WIND_[i]_moving

is star moving? yes==1, no==0

Default is 0

WIND_[i]_acceleration

is wind accelerated? yes==1, no==0

Default is 0 (inject at v_inf)

For constant winds, these data are stored in the global struct SWP, defined in pion/source/constants.h, using these units. In simulation snapshots they also have the same units. The evolving wind file should have all units in CGS.