tardis.model.matter.composition module¶
- class tardis.model.matter.composition.Composition(density, nuclide_mass_fraction, raw_isotope_abundance, element_masses, element_masses_unit=Unit('g'))[source]¶
Bases:
object
Holds information about model composition
- Parameters:
- densityastropy.units.quantity.Quantity
An array of densities for each shell.
- isotopic_mass_fractionpd.DataFrame
- raw_isotope_abundancepd.DataFrame
- atomic_masspd.DataFrame
- atomic_mass_unit: astropy.units.Unit
- Attributes:
- atomic_masspd.DataFrame
Atomic mass of elements calculated for each shell.
elemental_number_density
pd.DataFrameElemental Number Density computed using the formula: (elemental_mass_fraction * density) / atomic mass
- calculate_cell_masses(volume)[source]¶
Calculate the cell masses.
- Parameters:
- volumeastropy.units.quantity.Quantity
- The volume of the cell.
- Returns:
- astropy.units.quantity.Quantity
- An array of cell masses.
Examples
>>> composition.calculate_cell_masses(10 * u.cm**3)
- calculate_elemental_cell_masses(volume)[source]¶
Calculate the elemental cell masses.
- Parameters:
- volumeastropy.units.quantity.Quantity
- The volume of the cell.
- Returns:
- numpy.ndarray
- An array of elemental cell masses.
Examples
>>> composition.calculate_cell_masses(10 * u.cm**3)
- calculate_mass_fraction_at_time(time_explosion)[source]¶
Calculate the mass fraction at a given time using the radioactive decay from the IsotopicMassFraction.
- Parameters:
- time_explosionastropy.units.quantity.Quantity
The time of the explosion.
- Returns:
- None
Examples
>>> composition.calculate_mass_fraction_at_time(10 * u.s)
- property effective_element_masses¶
- property element_masses¶
Atomic mass of elements in each shell
- property elemental_mass_fraction¶
- property elemental_number_density¶
Elemental Number Density computed using the formula: (elemental_mass_fraction * density) / atomic mass
- property isotopic_mass_fraction¶
- property isotopic_number_density¶
Isotopic Number Density computed using the formula: (isotopic_mass_fraction * density) / atomic mass