.. _physics-stellarAstrophysics: Stellar Astrophysics ==================== Class providing individual stellar astrophysics---the properties of single stars as a function of initial mass and metallicity, including the stellar lifetime, the mass ejected (returned to the :term:`ISM`) at death, and the metal mass yielded. These per-star quantities are integrated over the :term:`IMF` and star formation history to compute the net recycling, yield, and energy input for a stellar population. Implementations are typically based on stellar evolution grids from e.g. :cite:t:`portinari_galactic_1998` or similar libraries and include inverse functions mapping lifetime to initial mass. **Default implementation:** ``stellarAstrophysicsFile`` Methods ------- ``massInitial`` → ``double precision`` Returns the initial mass of a star of given ``lifetime`` and ``metallicity``. * ``double precision, intent(in ) :: lifetime, metallicity`` ``massEjected`` → ``double precision`` Returns the mass ejected by a star of given ``massInitial`` and ``metallicity``. * ``double precision, intent(in ) :: massInitial,metallicity`` ``massYield`` → ``double precision`` Returns the metal mass yielded by a star of given ``massInitial`` and ``metallicity``. * ``double precision, intent(in ) :: massInitial, metallicity`` * ``integer , intent(in ), optional :: atomIndex`` ``lifetime`` → ``double precision`` Returns the lifetime of a star of given ``massInitial`` and ``metallicity``. * ``double precision, intent(in ) :: massInitial, metallicity`` .. _physics-stellarAstrophysicsFile: ``stellarAstrophysicsFile`` --------------------------- A stellar astrophysics class which reads properties of individual stars of different initial mass and metallicity from an XML file and interpolates in them. The stars can be irregularly spaced in the plane of initial mass and metallicity. The XML file should have the following structure: .. code-block:: none 0.6 28.19 0.0000 7.65 0.44435954 2.2017e-13 Table 2 of Tumlinson, Shull & Venkatesan (2003, ApJ, 584, 608) http://adsabs.harvard.edu/abs/2003ApJ...584..608T . . . . . . Each ``star`` element must contain the ``initialMass`` (given in :math:`\mathrm{M}_\odot`) and ``metallicity`` tags. Other tags are optional. ``lifetime`` gives the lifetime of such a star (in Gyr), ``ejectedMass`` gives the total mass (in :math:`\mathrm{M}_\odot`) ejected by such a star during its lifetime, ``metalYieldMass`` gives the total mass of metals yielded by the star during its lifetime while ``elementYieldMassX`` gives the mass of element ``X`` yielded by the star during its lifetime. The ``source`` and ``url`` tags are not used, but are strongly recommended to provide a reference to the origin of the stellar data. **(Default implementation)** **Methods** * ``readFile`` — Read the named power spectrum file. **Parameters** * ``[forceZeroMetallicity]`` (default ``.false.``) — Force the use of zero metallicity (or lowest metallicity available) for all stellar populations. * ``[fileName]`` — The path to the HDF5 file containing the tabulated stellar population spectra, with datasets for ages (Gyr), metallicities (log Solar), wavelengths (\AA), and spectra (:math:`L_\odot\,\mathrm{Hz}^{-1}`); see the ``scripts/ssps`` folder for conversion scripts. * ``[fileName]`` — The name of the file which contains fit coefficients for the time per tree fitting function. * ``[fileName]`` (default ``inputPath(pathTypeDataStatic)//'stellarAstrophysics/stellarPropertiesCompilationStandard.xml'``) — The name of the XML file from which to read stellar properties (ejected masses, yields, etc.). * ``[fileName]`` (default ``inputPath(pathTypeDataStatic)//'stellarAstrophysics/Stellar_Tracks_Padova.hdf5'``) — The name of the HDF5 file from which to read stellar tracks. * ``[fileName]`` — The name of the file from which to read intergalactic medium state data. * ``[fileName]`` — The name of the file from which to read intergalactic background light properties. * ``[fileName]`` — The name of a file from which to read tabulated spectra of accretion disks. * ``[fileName]`` — The name of the file from which to read a tabulated transfer function.