Models¶
TARDIS requires a model of the homologously expanding ejecta in order to run a simulation (see Model of Supernova Domain). A model will include information like the velocity shell structure, abundances, density, etc. TARDIS offers two ways of specifying the model: either directly in the configuration YAML file or separately in a model.csvy file. See here for an explanation of the CSVY file format and here for a link to the csvy_model schema.
Note
We highly recommend using the cleaner CSVY format.
CSVY Model¶
TARDIS allows users to use a CSVY file to input information about the model:
type  | 
object  | 
||
properties  | 
|||
  | 
name of the model being run  | 
||
type  | 
string  | 
||
  | 
Initial time for the density in the model  | 
||
type  | 
quantity  | 
||
  | 
Initial time for isotope decay. Set to 0 for no isotopes.  | 
||
type  | 
quantity  | 
||
  | 
description of the model being run  | 
||
type  | 
string  | 
||
  | 
Version of the configuration file  | 
||
type  | 
string  | 
||
  | 
fields found in csv part of csvy file  | 
||
type  | 
object  | 
||
properties  | 
|||
  | 
type  | 
array  | 
|
additionalProperties  | 
False  | 
||
  | 
velocity of the inner boundary  | 
||
type  | 
quantity  | 
||
  | 
velocity of the outer boundary of the last shell  | 
||
type  | 
quantity  | 
||
  | 
type  | 
object  | 
|
properties  | 
|||
  | 
type  | 
quantity  | 
|
  | 
type  | 
quantity  | 
|
  | 
type  | 
number  | 
|
multipleOf  | 
1.0  | 
||
  | 
oneOf  | 
#/definitions/density/branch85_w7  | 
|
#/definitions/density/exponential  | 
|||
#/definitions/density/power_law  | 
|||
#/definitions/density/uniform  | 
|||
  | 
#/definitions/abundance/uniform  | 
||
additionalProperties  | 
False  | 
||
definitions  | 
|||
  | 
|||
  | 
|||
The TARDIS YAML delimiter for CSVY files is ---. This means that each CSVY model
file has the following structure: The first line of the file is the YAML delimiter,
followed by the YAML portion of the CSVY model. A line consisting of only the YAML
delimiter separates the YAML portion of the CSVY file from the CSV part. The YAML part
of the CSVY file is for setting model parameters like v_inner_boundary or
model_density_time_0, while the CSV part of the file is for setting profiles of
physical parameters of the model (e.g. abundances, radiative temperature, dilution factor, etc).
If you use the CSVY model, then you will need to specify the path to the CSVY model file
in the main TARDIS configuration file.
Example CSVY Model¶
We provide an example CSVY model file:
---
name: csvy_full
model_density_time_0: 1 day
model_isotope_time_0: 0 day
description: Example csvy config file for TARDIS.
tardis_model_config_version: v1.0
datatype:
  fields:
    -  name: velocity
       unit: km/s
       desc: velocities of shell outer bounderies.
    -  name: density
       unit: g/cm^3
       desc: density of shell.
    -  name: t_rad
       unit: K
       desc: radiative temperature.
    -  name: H
       desc: fractional H abundance
    -  name: He
       desc: fractional He abundance
    -  name: Ni56
       desc: fractional Ni56 abundance
v_inner_boundary: 9000 km/s
v_outer_boundary: 12000 km/s
---
velocity,density,t_rad,H,He,Ni56
9000, 5e-10, 7000, 1.0, 1.0, 1.0
10500, 2.0e-10, 7000, 0.0, 0.99, 0.01
12000, 9e-11, 7000, 0.4, 0.58, 0.02
Model Configuration¶
Although we strongly recommend using the CSVY Model, TARDIS also allows the user to define structure and abundance profiles in separate files and reference these files directly in the main TARDIS configuration file:
type  | 
object  | 
|
properties  | 
||
  | 
oneOf  | 
|
  | 
oneOf  | 
|
additionalProperties  | 
False  | 
|
For an example of this in use, see Tardis Example Configuration.
Structure, Density, and Abundance¶
Structure¶
All types of structure definitions have two keywords in common: v_inner_boundary and v_outer_boundary.
In the structure section, one can specify a file section containing a type parameter
(currently only artis is supported``) and a name parameter giving a path top a file.
If one doesn’t specify a file section, the code requires two sections (velocities and densities) and a
parameter no_of_shells. no_of_shells is the requested number of shells for a model. The velocity section
requires a type. Currently, only linear is supported.
File Structure¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
file  | 
  | 
file name (with path) to structure model  | 
|
type  | 
string  | 
|
  | 
file type  | 
|
type  | 
string  | 
|
enum  | 
simple_ascii, artis, cmfgen_model  | 
|
  | 
location of the inner boundary chosen from the model  | 
|
type  | 
quantity  | 
|
default  | 
-1 km/s  | 
|
  | 
location of the inner boundary chosen from the model  | 
|
type  | 
quantity  | 
|
default  | 
-1 km/s  | 
|
additionalProperties  | 
False  | 
|
Specific Structure¶
type  | 
object  | 
||
properties  | 
|||
  | 
enum  | 
specific  | 
|
  | 
description of the boundaries of the shells  | 
||
type  | 
object  | 
||
properties  | 
|||
  | 
type  | 
quantity  | 
|
  | 
type  | 
quantity  | 
|
  | 
type  | 
number  | 
|
multipleOf  | 
1.0  | 
||
  | 
oneOf  | 
||
additionalProperties  | 
False  | 
||
Density¶
In the densities section the type parameter again decides on the parameters. The type uniform only needs a
value parameter with a density compatible quantity. The type branch85_w7 uses a seven-order polynomial fit to
the W7 model and is parametrised by time since explosion. The parameters time_0 and density_coefficient are set
to sensible defaults and should not be changed.
Branch85_w7 Density¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
branch85_w7  | 
  | 
This needs no change - DO NOT TOUCH  | 
|
type  | 
quantity  | 
|
default  | 
0.000231481 day  | 
|
  | 
This needs no change - DO NOT TOUCH  | 
|
type  | 
quantity  | 
|
default  | 
3e29 g/cm^3  | 
|
  | 
This needs no change - DO NOT TOUCH  | 
|
type  | 
quantity  | 
|
default  | 
1 km/s  | 
|
additionalProperties  | 
False  | 
|
Exponential Density¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
exponential  | 
  | 
Time at which the pure model densities are right  | 
|
type  | 
quantity  | 
|
  | 
density at time_0  | 
|
type  | 
quantity  | 
|
  | 
at what velocity the density rho_0 applies  | 
|
type  | 
quantity  | 
|
additionalProperties  | 
False  | 
|
Power_law Density¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
power_law  | 
  | 
Time at which the pure model densities are right  | 
|
type  | 
quantity  | 
|
  | 
density at time_0  | 
|
type  | 
quantity  | 
|
  | 
at what velocity the density rho_0 applies  | 
|
type  | 
quantity  | 
|
  | 
exponent for exponential density profile  | 
|
type  | 
number  | 
|
additionalProperties  | 
False  | 
|
Uniform Density¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
uniform  | 
  | 
Time at which the pure model densities are right  | 
|
type  | 
quantity  | 
|
  | 
value for uniform density  | 
|
type  | 
quantity  | 
|
additionalProperties  | 
False  | 
|
Abundance¶
The abundance section has a possible file parameter with type (currently only artis is allowed)
and a name parameter giving a path to a file containing the abundance information.
Warning
In contrast to the structure section, the abundance section will not ignore abundances set in the rest of
the section but merely will overwrite the abundances given in the file section.
The rest of the section can be used to configure uniform abundances for all shells, by giving the atom name and a relative abundance fraction. If it does not add up to 1., TARDIS will warn — but normalize the numbers.
File Abundance¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
file  | 
  | 
type of abundance file to read in  | 
|
type  | 
string  | 
|
  | 
filename  | 
|
type  | 
string  | 
|
additionalProperties  | 
False  | 
|
Uniform Abundance¶
type  | 
object  | 
|
properties  | 
||
  | 
enum  | 
uniform  | 
additionalProperties  | 
type  | 
number  | 
maximum  | 
1  | 
|
minimum  | 
0  | 
|
Tutorials¶
- How to run TARDIS with a custom ejecta model
- Your custom density file
 - Your custom abundance file
 - Running TARDIS with the custom files
 - Specifying boundary velocities in the config file
 - Example 1) v_inner_boundary lower than first velocity in density file
 - Example 2) v_outer_boundary larger than last velocity in density file
 - Example 3) v_boundaries in config file are within density file velocity range
 
 
Model Converters¶
There are a variety of formats for models from other codes (both hydro and radiative transfer) that can be converted to TARDIS input files. Here we aim to provide converters for the most commonly used file formats.