Parameter Specifications
Every TRINITY simulation is driven by a plain-text parameter file. This chapter describes how such files are formatted and enumerates the keywords TRINITY recognises, grouped by physical role: cloud and environment, density profile, termination, stellar feedback, feedback corrections, the numerical solver, cooling, and physical constants. For each keyword the default value, unit, and short description are given.
Source of truth
The parameter schema — the complete set of keys, defaults, units, and
descriptions — is defined by the ParamSpec registry at
trinity/_input/registry.py. Everything else is derived from it:
trinity/_input/default.paramis generated from the registry (runpython -m tools.gen_default_param --writeafter editing the registry) and is whatread_paramloads as the default layer.Which keys are written to
metadata.jsonversus repeated in every snapshot is projected from per-spec flags (see Running TRINITY, Output data model).The per-key
infostrings andori_unitslabels surfaced by the reader (output.info(verbose=True)) come straight from the registry.
The tables below mirror the registry; when in doubt, the registry
wins. Worked example files live under param/ (e.g.
param/simple_cluster.param or param/cloud_example_PL.param).
File format
A parameter file contains one keyword value entry per line. A
# starts a comment, either as a whole line or after a value.
Keyword names are case-sensitive and may appear in any order.
Keywords with a default (listed below) are optional; those without a
default are required. A value written as a bracketed list
(mCloud [1e5, 1e6]) or through a tuple(...) directive turns the
file into a sweep — see Running TRINITY for the sweep syntax.
Supported value types
TRINITY parses values in the following order of precedence:
Type |
Example |
Notes |
|---|---|---|
Boolean |
|
Case-sensitive |
Scientific |
|
Standard notation |
Fraction |
|
Converted to float (1.6667) |
Number |
|
Integer or decimal |
String |
|
Fallback for text values |
Unit system
Inputs in the parameter file are CGS, extended by \(M_\odot\)
(mass) and Myr (time). Common per-quantity units: pc for length,
cm\(^{-3}\) for number density, km/s for velocity, K for
temperature. Internally TRINITY works in [Msun, pc, Myr];
conversion is automatic, driven by the # UNIT: annotations in
default.param.
Administrative parameters
Parameter |
Default |
Description |
|---|---|---|
|
|
Prefix for output naming. Use alphanumerics and underscores only. |
|
|
Output directory. The sentinel |
|
|
Output format. Currently only JSON (JSONL) is supported. |
|
|
Target number of points retained for the downsampled profile
arrays written into each snapshot ( |
|
|
Verbosity: |
|
|
Enable terminal output for log messages. |
|
|
Write log messages to |
|
|
Colour-code terminal output by severity. |
Physical parameters
Core parameters defining the molecular cloud and star formation.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
|
\(M_\odot\) |
Total mass of the molecular cloud. |
|
|
– |
Star formation efficiency (0 < sfe < 1). Fraction of cloud mass converted to stars. |
|
|
\(Z_\odot\) |
Cloud metallicity. Currently only solar (1) is supported. |
|
|
– |
Include HII pressure (from Strömgren ionization balance in the
shell) in the driving pressure. When |
|
|
– |
Closed fraction \(C_f\) of the bubble wall (geometry-set
energy leak). Hot gas vents through the open area
\((1-C_f)\,4\pi R_2^2\) at the interior sound speed, draining
bubble energy. |
|
|
cm\(^{-3}\) |
Core hydrogen-nuclei number density. For homogeneous clouds
( |
|
|
cm\(^{-3}\) |
Ambient ISM number density. |
|
|
pc |
Core radius. Not used for homogeneous clouds. |
|
|
pc |
Maximum plausible cloud radius for the pre-run GMC validation. If
the computed |
Derived quantities:
Cluster mass: \(M_{\rm cluster} = M_{\rm cloud} \times {\rm sfe}\)
Remaining cloud mass: \(M_{\rm cloud,after} = M_{\rm cloud} - M_{\rm cluster}\)
Density profile parameters
Parameter |
Default |
Description |
|---|---|---|
|
|
Density profile type: |
Power-law profile (densPL)
When dens_profile = densPL, the density follows a flat core, a
power-law envelope, and the ambient ISM beyond the cloud edge:
Parameter |
Default |
Description |
|---|---|---|
|
|
Power-law exponent (\(-2 \leq \alpha \leq 0\)). Special cases:
|
Bonnor-Ebert profile (densBE)
When dens_profile = densBE, the cloud is an isothermal,
self-gravitating Bonnor-Ebert sphere (Ebert 1955;
Bonnor 1956).
Parameter |
Default |
Description |
|---|---|---|
|
|
Density contrast \(\Omega = \rho_{\rm core}/\rho_{\rm edge}\). Values above the critical \(\Omega \approx 14.04\) are gravitationally unstable. |
Note
densPL_alpha is ignored when using densBE, and
densBE_Omega is ignored when using densPL. If you set
dens_profile explicitly in a .param file, you must also set
the matching companion (densPL_alpha or densBE_Omega) — the
defaults are only assumed when dens_profile is left at its
default too.
Termination parameters
Conditions that end the simulation.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
|
– |
Allow shell dissolution to terminate the simulation. If |
|
|
Myr |
Duration |
|
|
pc |
Maximum shell radius. Set to |
|
|
Myr |
Maximum simulation duration. Set to |
|
|
– |
Terminate after the shell crosses the cloud edge (R2 > rCloud).
|
|
|
pc |
Radius below which the cloud is considered fully collapsed. |
Stellar feedback (SPS)
TRINITY reads time-evolving stellar feedback (ionizing photon rate, bolometric and mechanical luminosities, wind and SN momentum injection, …) from a stellar-population-synthesis (SPS) table.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
|
– |
Path to an SPS data file. |
|
|
\(M_\odot\) |
Reference cluster mass for the feedback scaling
\(f_{\rm mass} = M_{\rm cluster} / {\rm sps\_refmass}\).
|
|
|
– |
Keys the non-CIE cooling-table selection (rot vs norot). Only rot
tables ship with the repo, so |
When sps_path = def_path, TRINITY loads the bundled file
lib/default/sps/starburst99/1e6cluster_default.csv (solar
metallicity, rotation on, \(10^6\,M_\odot\) reference cluster) using
the built-in 7-column SB99 preset. The default fallback only accepts
ZCloud = 1.0 and SB99_rotation = 1, because the bundled non-CIE
cooling tables are rot-only.
Custom SPS files (sps_col_* declarations)
The canonical column model is defined in trinity/sps/sps_columns.py
(the single source of truth for the SPS loader). When sps_path is
an explicit file, describe its layout with one
sps_col_<canonical> line per mapped column:
sps_col_<canonical> <file_column> <units> <log|linear>
where:
<canonical>is one of the canonical names in the table below.<file_column>is either a 0-based integer column index (works on any file), or a header-row name (the file must have a header).<units>is the declared unit of the column. The aliascgsis accepted as shorthand for each canonical’s default cgs unit.<log|linear>declares whether file values are stored as \(\log_{10}\) of the linear value.
The file may be .txt (whitespace-separated) or .csv; the
delimiter is sniffed from the first data row. # lines and blank
lines are comments.
Required canonicals (loader will not start without them):
t,Qi,Lbol,Lmech_W,pdot_Weither
fior bothLiandLn(the latter bypasses the hardcoded 13.6 eV ionizing-fraction split)either
Lmech_totalorLmech_SNto drive the SN pipeline
Optional canonicals (the loader derives them when absent):
Lmech_total, Lmech_SN, pdot_SN, Mdot_SN, v_SN,
Li, Ln.
Per-canonical recognised units and the AU unit each lands in:
Canonical |
|
Other accepted |
AU target |
|---|---|---|---|
|
|
|
Myr |
|
|
|
1/Myr |
|
|
– |
dimensionless |
|
|
|
\(M_\odot\,{\rm pc}^2/{\rm Myr}^3\) |
|
|
– |
\(M_\odot\,{\rm pc}/{\rm Myr}^2\) |
|
|
|
\(M_\odot/{\rm Myr}\) |
|
|
|
pc/Myr |
Mass-scaled canonicals (everything except t, fi, v_SN) are
multiplied by \(f_{\rm mass}\) after unit conversion.
Example — headered file with the ``cgs`` alias. A custom file
my_sps.txt whose first line is
time Qi fi Lbol Lmech_total pdot_W Lmech_W with data in
\(\log_{10}\) cgs (except time linear yr and fi linear):
sps_path /absolute/path/to/my_sps.txt
sps_refmass 1e6
sps_col_t time yr linear
sps_col_Qi Qi cgs log
sps_col_fi fi dimensionless linear
sps_col_Lbol Lbol cgs log
sps_col_Lmech_total Lmech_total cgs log
sps_col_pdot_W pdot_W cgs log
sps_col_Lmech_W Lmech_W cgs log
The same columns can be mapped by 0-based integer index instead of
header name (sps_col_t 0 yr linear …); indices and names may be
mixed across lines. If sps_col_* declarations are missing or
inconsistent while sps_path is set, the loader hard-errors at
startup with a fillable template listing exactly which canonicals are
missing.
Feedback corrections
Control mass injection and energy thermalization from stellar feedback.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
|
– |
Fraction of cold material entrained by stellar winds. |
|
|
– |
Fraction of cold material entrained in supernova ejecta. |
|
|
– |
Thermalization efficiency for stellar-wind kinetic energy. |
|
|
– |
Thermalization efficiency for supernova ejecta. |
|
|
km/s |
Supernova ejecta velocity. |
Solver parameters
Parameter |
Default |
Description |
|---|---|---|
|
|
Threshold for \((L_{\rm gain} - L_{\rm loss})/L_{\rm gain}\) below which the implicit energy phase hands off to the transition phase. |
|
|
Relative radius \(\xi = r/R_2\) at which the bubble temperature is measured. |
|
|
Cooling parameter \(\alpha = v_2 t_{\rm now}/R_2\). |
|
|
Cooling parameter \(\beta = -dP_b/dt\). |
|
|
Cooling parameter \(\delta = dT/dt\). |
Cooling tables
Parameter |
Default |
Description |
|---|---|---|
|
|
Selects the CIE (T > 105.5 K) cooling table. Integer
presets bundled under
|
|
|
Folder of non-CIE (T < 105.5 K) OPIATE/CLOUDY cubes.
|
Physical constants
Standard physical constants. Typically not modified. Defaults are shown as they appear in the registry (fractions where exact).
Gas composition. The helium fraction x_He (\(=n_{\rm He}/n_{\rm H}\))
and the helium ionisation states Z_He (hot bubble) and Z_He_shell
(\(\sim10^4\)K shell / HII region) are the single source of truth: the mean
masses per particle and electron factors below are all derived from them at
load. All number densities \(n\) in TRINITY are hydrogen-nuclei
densities \(n_{\rm H}\), with mass density \(\rho=\mu_{\rm H}\,n_{\rm H}\).
Parameter |
Default |
Description |
|---|---|---|
|
|
Helium-to-hydrogen number ratio \(n_{\rm He}/n_{\rm H}\). |
|
|
He ionisation in the hot bubble (2 = doubly ionised, He\(^{2+}\)). |
|
|
He ionisation in the \(\sim10^4\)K shell (1 = singly ionised, He\(^{+}\)). |
Derived mean masses per particle (units of \(m_{\rm H}\)) and electron factors \(\chi_e=n_e/n_{\rm H}\):
Parameter |
Default |
Description |
|---|---|---|
|
|
\(\mu_{\rm H}=(1+4x_{\rm He})\), mass per H nucleus; use for \(\rho=\mu_{\rm H}n_{\rm H}\) (ionisation-independent). |
|
|
Neutral atomic gas, \(\mu_{\rm H}/(1+x_{\rm He})\approx1.273\). |
|
|
Molecular gas, \(\mu_{\rm H}/(0.5+x_{\rm He})\approx2.333\). |
|
|
Hot bubble (He\(^{2+}\)), \(\mu_{\rm H}/(2+x_{\rm He}(1+Z_{\rm He}))\approx0.609\). |
|
(derived) |
\(\sim10^4\)K shell (He\(^{+}\)), \(=14/22\approx0.636\). |
|
(derived) |
Bubble electron factor \(1+Z_{\rm He}\,x_{\rm He}=1.2\). |
|
(derived) |
Shell electron factor \(1+Z_{\rm He,shell}\,x_{\rm He}=1.1\). |
Temperatures, dust, and fundamental constants:
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
|
K |
Neutral shell temperature. |
|
|
K |
Ionised shell / HII-region temperature (He singly ionised; see
|
|
|
cm\(^2\) |
Dust cross-section at solar metallicity. |
|
|
\(Z_\odot\) |
Metallicity below which dust is negligible. |
|
|
cm\(^2\)/g |
Rosseland mean dust opacity \(\kappa_{\rm IR}\). |
|
|
– |
Adiabatic index. |
|
|
cm\(^3\)/s |
Case B recombination coefficient. |
|
|
erg/(s cm K7/2) |
Thermal conduction coefficient. |
|
|
cm/s |
Speed of light. |
|
|
cm\(^3\)/(g s\(^2\)) |
Gravitational constant. |
|
|
erg/K |
Boltzmann constant. |
|
|
K cm\(^{-3}\) |
ISM pressure \(P/k_B\). |
Examples
Minimal parameter file
model_name my_simulation
mCloud 1e6
sfe 0.01
Power-law cloud
model_name powerlaw_test
path2output outputs/powerlaw
mCloud 1e7
sfe 0.05
ZCloud 1
dens_profile densPL
densPL_alpha -1.5
nCore 1e4
rCore 0.5
nISM 1
stop_t 20
stop_r 300
Bonnor-Ebert sphere
model_name BE_sphere
path2output outputs/BE
mCloud 1e5
sfe 0.02
dens_profile densBE
densBE_Omega 14.1
nCore 1e5
rCore 0.1
For sweep-style parameter files (list values and tuple(...)
directives), see Running TRINITY.