-
-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from ssim/temp
Fix for the issue #84 Pull request for fixes / documentation edits related to the profiles
- Loading branch information
Showing
9 changed files
with
364 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
*********************************************** | ||
Model with exponential density profile and uniform abundances | ||
*********************************************** | ||
|
||
TARDIS can be used to compute a synthetic spectrum for a model with a | ||
user-specified density and chosen set of abundances. One simple (but | ||
flexible) class of model is when the density is parameterised as an | ||
exponential function of velocity, as described below. | ||
|
||
|
||
Exponential density profile | ||
========================= | ||
|
||
In this mode, the density profile (function of velocity and time since | ||
explosion) is assumed to follow a functional form: | ||
|
||
.. math:: | ||
\rho (v, t_{exp}) = \rho_0 (t_{0} / t_{exp})^{3} \exp( -v / v_0) | ||
defined by reference density, velocity and time parameters. These | ||
parameters are set in the input yaml file, specifically in the "structure" | ||
subsection of the "model" section, under the "density" heading (see | ||
example below). | ||
|
||
|
||
Uniform abundances | ||
============================ | ||
|
||
For a model with an exponential density profile, a set of | ||
uniform abundances can be supplied directly in the input (yaml) | ||
file. Elemental abundances are set in the "abundances" subsection of the "model" | ||
section, following the "type: uniform" specifier (see example input | ||
file below). They are specified as mass fractions. E.g. | ||
|
||
.. code-block:: none | ||
Si: 0.6 | ||
S: 0.4 | ||
will set the mass fraction of silicon (Z=14) to 0.6 and sulphur (Z=16) to 0.4. | ||
|
||
.. note:: | ||
|
||
The mass fractions must sum to one. If mass fractions are supplied that do not sum to one, TARDIS will | ||
renormalise all the supplied abundances and print a "WARNING" message. | ||
|
||
|
||
TARDIS input file | ||
================= | ||
|
||
Here is an example of an input file that sets up an exponential density | ||
profile with a uniform set of | ||
abundances: | ||
|
||
.. literalinclude:: tardis_configv1_density_exponential_test.yml | ||
:language: yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
*********************************************** | ||
Model with power law density profile and uniform abundances | ||
*********************************************** | ||
|
||
TARDIS can be used to compute a synthetic spectrum for a model with a | ||
user-specified density and chosen set of abundances. One simple (but | ||
flexible) class of model is when the density is parameterised as an | ||
power law function of velocity, as described below. | ||
|
||
|
||
Exponential density profile | ||
========================= | ||
|
||
In this mode, the density profile (function of velocity and time since | ||
explosion) is assumed to follow a functional form: | ||
|
||
.. math:: | ||
\rho (v, t_{exp}) = \rho_0 (t_{0} / t_{exp})^{3} ( -v / v_{0})^{\rm exponent} | ||
This form is defined by reference density, velocity and time parameters, and the | ||
"exponent", each of which is set in the input file ("structure" | ||
subsection of the "model" section, under the "density" heading; see | ||
example below). | ||
|
||
|
||
Uniform abundances | ||
============================ | ||
|
||
For a model with an power law density profile, a set of | ||
uniform abundances can be supplied directly in the input (yaml) | ||
file. Elemental abundances are set in the "abundances" subsection of the "model" | ||
section, following the "type: uniform" specifier (see example input | ||
file below). They are specified as mass fractions. E.g. | ||
|
||
.. code-block:: none | ||
Si: 0.6 | ||
S: 0.4 | ||
will set the mass fraction of silicon (Z=14) to 0.6 and sulphur (Z=16) to 0.4. | ||
|
||
.. note:: | ||
|
||
The mass fractions must sum to one. If mass fractions are supplied that do not sum to one, TARDIS will | ||
renormalise all the supplied abundances and print a "WARNING" message. | ||
|
||
|
||
TARDIS input file | ||
================= | ||
|
||
Here is an example of an input file that sets up a power law density | ||
profile with a uniform set of | ||
abundances: | ||
|
||
.. literalinclude:: tardis_configv1_density_power_law_test.yml | ||
:language: yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../tardis/io/tests/data/tardis_configv1_density_exponential_test.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../tardis/io/tests/data/tardis_configv1_density_power_law_test.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
tardis/io/tests/data/tardis_configv1_density_exponential_test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
tardis_config_version: v1.0 | ||
|
||
supernova: | ||
luminosity_requested: 9.44 log_lsun | ||
time_explosion: 13 day | ||
|
||
atom_data: kurucz_atom_pure.h5 | ||
|
||
model: | ||
structure: | ||
type: specific | ||
|
||
|
||
velocity: | ||
start : 1.1e4 km/s | ||
stop : 20000 km/s | ||
num: 20 | ||
|
||
|
||
density: | ||
type : exponential | ||
time_0: 2. day | ||
rho_0: 6.e-10 g/cm^3 | ||
v_0: 3000. km/s | ||
|
||
|
||
abundances: | ||
type: uniform | ||
O: 0.19 | ||
Mg: 0.03 | ||
Si: 0.52 | ||
S: 0.19 | ||
Ar: 0.04 | ||
Ca: 0.03 | ||
|
||
plasma: | ||
ionization: nebular | ||
excitation: dilute-lte | ||
radiative_rates_type: dilute-blackbody | ||
line_interaction_type: scatter | ||
|
||
montecarlo: | ||
seed: 23111963 | ||
no_of_packets : 2.0e+5 | ||
iterations: 30 | ||
last_no_of_packets: 5.0e+5 | ||
no_of_virtual_packets: 5 | ||
|
||
spectrum: | ||
start: 500 angstrom | ||
stop: 20000 angstrom | ||
num: 10000 |
Oops, something went wrong.