From 30697478cef74dbe0c49d27d9702534ca5f0fb33 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Sun, 27 Oct 2024 21:43:45 -0400 Subject: [PATCH 01/11] Created a file about radioacive decay energy --- docs/physics/tardisgamma/decayenergy.ipynb | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 docs/physics/tardisgamma/decayenergy.ipynb diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb new file mode 100644 index 00000000000..5b6e32c20bb --- /dev/null +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -0,0 +1,108 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Radioactive Decay Energy\n", + "\n", + "Within the ejecta of a supernova, the gammarays largely come from the decay of $^{56}Ni$ into $^{56}Co$.\n", + "This releases a large amount of energy. To understand how much energy is produced from this decay we look at the amount of energy 1 g of $^{56}Ni$ produces in 10 days" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "The equation for radioactive decay is \n", + "$$N(t) = N_\\mathrm{0} \\exp\\left(-\\lambda t \\right)$$\n", + "$N(t)$ is the number of atoms after time t, $N_\\mathrm{0}$ is the initial number of atoms, and $\\lambda$ is the half life." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Using the molar mass, we find that 1g of $^{56}Ni$ has $1.0767e22$ atoms. The half life of $^{56}Ni$ is 6.10 days. Plugging these numbers into the equation we can find the number of atoms that have decayed after 10 days." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "from astropy import units as u\n", + "from astropy import constants as const\n", + "\n", + "#initial number of atoms\n", + "n_0 = 1.0767e22\n", + "#half life\n", + "t_half = 6.10\n", + "#time in days\n", + "time = 10\n", + "\n", + "#number of atoms keft after 10 days\n", + "n_final = n_0 * np.exp(-t_half * time)\n", + "\n", + "#number of atoms that have decayed\n", + "n_decays = n_0 - n_final" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The gammarays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ (Nadyozhin 1994)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total energy released from radioactive decay of 1g of 56Ni after 10 days is: 1.884225e+28 eV\n" + ] + } + ], + "source": [ + "#energy per decay in eV\n", + "energy_per_decay = 1.75e6\n", + "\n", + "total_energy = n_decays * energy_per_decay\n", + "\n", + "print(\"The total energy released from radioactive decay of 1g of 56Ni after 10 days is:\", total_energy, \"eV\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "tardis", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 062364630fd2fb492c89d8a92194ff69986b3da9 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Sun, 27 Oct 2024 21:44:53 -0400 Subject: [PATCH 02/11] Added decay energy file to the index. --- docs/physics/tardisgamma/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/physics/tardisgamma/index.rst b/docs/physics/tardisgamma/index.rst index c9c091d2b5f..1de2a48d19c 100644 --- a/docs/physics/tardisgamma/index.rst +++ b/docs/physics/tardisgamma/index.rst @@ -5,3 +5,4 @@ TARDIS gamma :math:`\gamma` .. toctree:: packetinitialization + decayenergy \ No newline at end of file From e5be084d21c5c041d8ba13d86da94f4b98ba074b Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Sun, 27 Oct 2024 21:51:49 -0400 Subject: [PATCH 03/11] Added citation for Nadyozhin 1994 to tardis.bib --- docs/tardis.bib | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/tardis.bib b/docs/tardis.bib index c324fb30456..2f54a9550ee 100644 --- a/docs/tardis.bib +++ b/docs/tardis.bib @@ -348,3 +348,18 @@ @ARTICLE{Boyle2017 adsurl = {https://ui.adsabs.harvard.edu/abs/2017A&A...599A..46B}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } + +@ARTICLE{1994Nadyozhin, + author = {{Nadyozhin}, D.~K.}, + title = "{The Properties of NI CO Fe Decay}", + journal = {\apjs}, + keywords = {Cobalt Isotopes, Decay, Electron Capture, Gamma Rays, Nickel Isotopes, Nuclear Astrophysics, Nuclear Fusion, Half Life, Iron Isotopes, Neutrinos, Astronomy, ATOMIC DATA, NUCLEAR REACTIONS, NUCLEOSYNTHESIS, ABUNDANCES}, + year = 1994, + month = jun, + volume = {92}, + pages = {527}, + doi = {10.1086/192008}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1994ApJS...92..527N}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + From 54c42cb2f4967687b80af87bd4bf1d8000de7ef6 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Sun, 27 Oct 2024 21:54:42 -0400 Subject: [PATCH 04/11] Added citation to decay energy file. --- docs/physics/tardisgamma/decayenergy.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index 5b6e32c20bb..42b3eb49197 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -58,7 +58,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The gammarays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ (Nadyozhin 1994)." + "The gammarays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ []." ] }, { From f9d90ec692e8364e2996613f29511bf209f71baf Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Tue, 29 Oct 2024 09:31:51 -0400 Subject: [PATCH 05/11] Changed the words gamma to the symbol gamma. --- docs/physics/tardisgamma/decayenergy.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index 42b3eb49197..9670a0550ac 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -6,7 +6,7 @@ "source": [ "# Radioactive Decay Energy\n", "\n", - "Within the ejecta of a supernova, the gammarays largely come from the decay of $^{56}Ni$ into $^{56}Co$.\n", + "Within the ejecta of a supernova, the $\\gamma$-rays largely come from the decay of $^{56}Ni$ into $^{56}Co$.\n", "This releases a large amount of energy. To understand how much energy is produced from this decay we look at the amount of energy 1 g of $^{56}Ni$ produces in 10 days" ] }, @@ -58,7 +58,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The gammarays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ []." + "The $\\gamma$-rays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ []." ] }, { From 6589a23b19d8a2ce7bc960bca66979cc180a8791 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Thu, 31 Oct 2024 09:06:14 -0400 Subject: [PATCH 06/11] Added information on energy production rate. --- docs/physics/tardisgamma/decayenergy.ipynb | 49 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index 9670a0550ac..e68427eb559 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -32,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -82,6 +82,51 @@ "\n", "print(\"The total energy released from radioactive decay of 1g of 56Ni after 10 days is:\", total_energy, \"eV\")" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The $^{56}Co$ produced from the decay of $^{56}Ni$ is also radioactive and will decay into $^{56}Fe$ and release more $\\gamma$-rays. These decays also have a number of transitions with associated energies and probabilities which gives the total energy released per decay of 3.73MeV. The total rate of energy production for a mass of $^{56}Ni$ at a given time is given by the following equation:\n", + "\n", + "$$\\epsilon = \\frac{M_\\odot}{56m_{u}}\\frac{1}{\\tau_{\\text{Co}}-\\tau_{\\text{Ni}}}[[Q_{\\text{Ni}}(\\frac{\\tau_{\\text{Co}}}{\\tau_{\\text{Ni}}}-1)-Q_{\\text{Co}}]\\exp(-t/\\tau_{\\text{Ni}})+Q_{\\text{Co}}\\exp(-t/\\tau_{\\text{Co}})]\\frac{M_{Ni0}}{M_\\odot}$$\n", + "\n", + "$\\tau_{Ni}$ and $\\tau_{Co}$ are the lifetimes of Ni and Co respectively. $Q_{\\text{Ni}}$ and $Q_{\\text{Co}}$ are the energy per decay of $^{56}Ni$ and $^{56}Co$ respectively.\n", + "\n", + "If we plug these values into the equation we get the equation:\n", + "\n", + "$$\\epsilon = (6.45e43\\exp(-t/8.8)+1.45e43\\exp(-t/111.3))\\frac{M_{Ni0}}{M_\\odot} erg/s$$" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total energy production rate for 1 solar mass of 56Ni after 10 days is: 3.395750201245571e+43 erg/s\n" + ] + } + ], + "source": [ + "#time in days\n", + "time = 10\n", + "#mass of Ni56 in solar masses\n", + "m_Ni56 = 1 \n", + "\n", + "energy_production_rate = (6.45e43 * np.exp(-time/8.8) + 1.45e43 * np.exp(-time/111.3)) * (m_Ni56/ 1)\n", + "print(\"The total energy production rate for 1 solar mass of 56Ni after 10 days is:\", energy_production_rate, \"erg/s\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { From 1fdc29ea436a8d28939bc36e492a6709876e5e95 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Mon, 11 Nov 2024 22:10:31 -0500 Subject: [PATCH 07/11] Reorganized and added more detail to explanations. --- docs/physics/tardisgamma/decayenergy.ipynb | 118 ++++++++++----------- 1 file changed, 58 insertions(+), 60 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index e68427eb559..e40af164fff 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -6,92 +6,68 @@ "source": [ "# Radioactive Decay Energy\n", "\n", - "Within the ejecta of a supernova, the $\\gamma$-rays largely come from the decay of $^{56}Ni$ into $^{56}Co$.\n", - "This releases a large amount of energy. To understand how much energy is produced from this decay we look at the amount of energy 1 g of $^{56}Ni$ produces in 10 days" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "vscode": { - "languageId": "plaintext" - } - }, - "source": [ - "The equation for radioactive decay is \n", - "$$N(t) = N_\\mathrm{0} \\exp\\left(-\\lambda t \\right)$$\n", - "$N(t)$ is the number of atoms after time t, $N_\\mathrm{0}$ is the initial number of atoms, and $\\lambda$ is the half life." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Using the molar mass, we find that 1g of $^{56}Ni$ has $1.0767e22$ atoms. The half life of $^{56}Ni$ is 6.10 days. Plugging these numbers into the equation we can find the number of atoms that have decayed after 10 days." + "Within the ejecta of a supernova, the $\\gamma$-rays largely come from the decay of $^{56}Ni$ into $^{56}Co$, which releases a significant amount of energy. \n", + "\n", + "When $^{56}Ni$ decays into $^{56}Co$ it can release a $\\gamma$-ray at several different transition levels. Each transition level has an energy and an associated probability out of 100 decays. For example, the transition from Energy level 9 to Energy level 7 has an energy of 0.270 Mev and a probability of 36.5 out of 100 decays. To find the total energy per decay you multipliy each energy with its associated probability and add them all up." ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "1.7202000000000002" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import numpy as np\n", - "from astropy import units as u\n", - "from astropy import constants as const\n", "\n", - "#initial number of atoms\n", - "n_0 = 1.0767e22\n", - "#half life\n", - "t_half = 6.10\n", - "#time in days\n", - "time = 10\n", + "# energies of each transition in MeV\n", + "t_energies = np.array([0.270, 0.750, 0.480, 1.56, 0.812, 0.158])\n", + "# probabilities of each transition\n", + "t_prob = np.array([.365, .495, .366, .140, .860, 1.00])\n", "\n", - "#number of atoms keft after 10 days\n", - "n_final = n_0 * np.exp(-t_half * time)\n", - "\n", - "#number of atoms that have decayed\n", - "n_decays = n_0 - n_final" + "energy_per_decay = sum(t_energies * t_prob)\n", + "energy_per_decay" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "The $\\gamma$-rays that are released during this radiocative decay can be released from a number of energy level transitions. Each transition has an associated energy and a probability out of 100 decays. From the combination of all of these tranisitions and their probabilities, the total energy released per decay is $1.75 MeV$ []." + "From the above cell, we get the energy per transition of 1.72 MeV. Note that this comes from a simplified scheme of energies and the real total energy per $^{56}Ni$ decay we use is 1.75 MeV. [] " ] }, { - "cell_type": "code", - "execution_count": 3, + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The total energy released from radioactive decay of 1g of 56Ni after 10 days is: 1.884225e+28 eV\n" - ] - } - ], "source": [ - "#energy per decay in eV\n", - "energy_per_decay = 1.75e6\n", - "\n", - "total_energy = n_decays * energy_per_decay\n", + "The $^{56}Co$ produced from the decay of $^{56}Ni$ is also radioactive and will decay into $^{56}Fe$ and release more $\\gamma$-rays, however this decay is more complicated than the decay of $^{56}Ni$. Whereas $^{56}Ni$ only decays through electron capture, $^{56}Co$ can decay either by electron capture, which occurs for 81 out of 100 cases, or through positron decay, which occurs for 19 out of 100 cases.\n", "\n", - "print(\"The total energy released from radioactive decay of 1g of 56Ni after 10 days is:\", total_energy, \"eV\")" + "Positron decay produces positrons with a given kinetic energy, that will eventually annihilate with electrons to produce two 0.511 MeV $\\gamma$-rays. The scheme of decays for $^{56}Co$ is slightly more complicated than the $^{56}Ni$ scheme, but to find the total energy per decay, you follow the same process. The total energy per decay from $\\gamma$-rays is 3.61 MeV and the total kinetic energy of positrons is 0.12 MeV" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "The $^{56}Co$ produced from the decay of $^{56}Ni$ is also radioactive and will decay into $^{56}Fe$ and release more $\\gamma$-rays. These decays also have a number of transitions with associated energies and probabilities which gives the total energy released per decay of 3.73MeV. The total rate of energy production for a mass of $^{56}Ni$ at a given time is given by the following equation:\n", + " The total rate of energy production for a mass of $^{56}Ni$ at a given time is given by the following equation:\n", "\n", "$$\\epsilon = \\frac{M_\\odot}{56m_{u}}\\frac{1}{\\tau_{\\text{Co}}-\\tau_{\\text{Ni}}}[[Q_{\\text{Ni}}(\\frac{\\tau_{\\text{Co}}}{\\tau_{\\text{Ni}}}-1)-Q_{\\text{Co}}]\\exp(-t/\\tau_{\\text{Ni}})+Q_{\\text{Co}}\\exp(-t/\\tau_{\\text{Co}})]\\frac{M_{Ni0}}{M_\\odot}$$\n", "\n", - "$\\tau_{Ni}$ and $\\tau_{Co}$ are the lifetimes of Ni and Co respectively. $Q_{\\text{Ni}}$ and $Q_{\\text{Co}}$ are the energy per decay of $^{56}Ni$ and $^{56}Co$ respectively.\n", + "$M_\\odot$ is a solar mass. $56_{u}$ is 56 atomic mass units. \n", + "\n", + "$\\tau_{Ni}$ is the lifetime of $^{56}Ni$ which is 8.80 days and $\\tau_{Co}$ is the lifetime of $^{56}Co$ which is 111.3 days. \n", + "\n", + "$Q_{\\text{Ni}}$ is the energy per decay of $^{56}Ni$ which is 1.75 MeV and $Q_{\\text{Co}}$ is the sum of the energy per decay pf $^{56}Co$ from $\\gamma$-rays and the kinetic energy from positrons which is 3.73 MeV\n", "\n", "If we plug these values into the equation we get the equation:\n", "\n", @@ -100,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -121,12 +97,34 @@ "print(\"The total energy production rate for 1 solar mass of 56Ni after 10 days is:\", energy_production_rate, \"erg/s\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The equation for the time-integrated total energy production is:\n", + "\n", + "$$ E = E_{Ni} + E_{Co} = 1.885e50\\frac{M_{Ni0}}{M_\\odot}ergs$$\n", + "\n", + "Where $E_{Ni} = 6.22e49 \\frac{M_{Ni0}}{M_\\odot}$ ergs and $E_{Co} = 1.26e50 \\frac{M_{Ni0}}{M_\\odot}$ ergs." + ] + }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total energy production for 1 solar mass of 56Ni is: 1.885e+50\n" + ] + } + ], + "source": [ + "total_energy_production = 1.885e50 * (m_Ni56/1)\n", + "print(\"The total energy production for 1 solar mass of 56Ni is:\", total_energy_production)" + ] } ], "metadata": { From 15cfb8c04038aa151101ba81af45dd17d68bea38 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Tue, 19 Nov 2024 09:29:57 -0500 Subject: [PATCH 08/11] Made changes to address comments on pull request --- docs/physics/tardisgamma/decayenergy.ipynb | 47 ++++++++++++++-------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index e40af164fff..5205927a078 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -13,25 +13,37 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "from astropy import units as u\n", + "from astropy import constants as const" + ] + }, + { + "cell_type": "code", + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { + "text/latex": [ + "$1.7202 \\; \\mathrm{meV}$" + ], "text/plain": [ - "1.7202000000000002" + "" ] }, - "execution_count": 7, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "import numpy as np\n", - "\n", - "# energies of each transition in MeV\n", - "t_energies = np.array([0.270, 0.750, 0.480, 1.56, 0.812, 0.158])\n", + "# energies of each transition\n", + "t_energies = np.array([0.270, 0.750, 0.480, 1.56, 0.812, 0.158]) * u.meV\n", "# probabilities of each transition\n", "t_prob = np.array([.365, .495, .366, .140, .860, 1.00])\n", "\n", @@ -76,25 +88,26 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "The total energy production rate for 1 solar mass of 56Ni after 10 days is: 3.395750201245571e+43 erg/s\n" + "The total energy production rate for 1 solar mass of 56Ni after 10 days is: 3.40e+43 erg / s\n" ] } ], "source": [ "#time in days\n", - "time = 10\n", + "time = 10 * u.day\n", "#mass of Ni56 in solar masses\n", - "m_Ni56 = 1 \n", + "m_Ni56 = 1 * const.M_sun\n", + "\n", + "energy_production_rate = (6.45e43 * np.exp(-time.value/8.8) + 1.45e43 * np.exp(-time.value/111.3)) * (m_Ni56/ const.M_sun).value * u.erg /u.s\n", "\n", - "energy_production_rate = (6.45e43 * np.exp(-time/8.8) + 1.45e43 * np.exp(-time/111.3)) * (m_Ni56/ 1)\n", - "print(\"The total energy production rate for 1 solar mass of 56Ni after 10 days is:\", energy_production_rate, \"erg/s\")" + "print(f\"The total energy production rate for 1 solar mass of 56Ni after 10 days is: {energy_production_rate:.2e}\")" ] }, { @@ -110,20 +123,20 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "The total energy production for 1 solar mass of 56Ni is: 1.885e+50\n" + "The total energy production for 1 solar mass of 56Ni is: 1.885e+50 erg\n" ] } ], "source": [ - "total_energy_production = 1.885e50 * (m_Ni56/1)\n", - "print(\"The total energy production for 1 solar mass of 56Ni is:\", total_energy_production)" + "total_energy_production = 1.885e50 * (m_Ni56/const.M_sun).value * u.erg\n", + "print(f\"The total energy production for 1 solar mass of 56Ni is: {total_energy_production}\")" ] } ], From 0fb6ab997339f2f88a133d92daab66b2c052d80f Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Mon, 25 Nov 2024 21:42:57 -0500 Subject: [PATCH 09/11] Removed .value from the calculations --- docs/physics/tardisgamma/decayenergy.ipynb | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index 5205927a078..719be39ff0f 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -36,7 +36,7 @@ "" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -88,7 +88,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -105,22 +105,11 @@ "#mass of Ni56 in solar masses\n", "m_Ni56 = 1 * const.M_sun\n", "\n", - "energy_production_rate = (6.45e43 * np.exp(-time.value/8.8) + 1.45e43 * np.exp(-time.value/111.3)) * (m_Ni56/ const.M_sun).value * u.erg /u.s\n", + "energy_production_rate = (6.45e43 * np.exp(-time/(8.8*u.day)) + 1.45e43 * np.exp(-time/(111.3*u.day))) * (m_Ni56/ const.M_sun).value * u.erg /u.s\n", "\n", "print(f\"The total energy production rate for 1 solar mass of 56Ni after 10 days is: {energy_production_rate:.2e}\")" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The equation for the time-integrated total energy production is:\n", - "\n", - "$$ E = E_{Ni} + E_{Co} = 1.885e50\\frac{M_{Ni0}}{M_\\odot}ergs$$\n", - "\n", - "Where $E_{Ni} = 6.22e49 \\frac{M_{Ni0}}{M_\\odot}$ ergs and $E_{Co} = 1.26e50 \\frac{M_{Ni0}}{M_\\odot}$ ergs." - ] - }, { "cell_type": "code", "execution_count": 11, @@ -135,9 +124,16 @@ } ], "source": [ - "total_energy_production = 1.885e50 * (m_Ni56/const.M_sun).value * u.erg\n", + "total_energy_production = 1.885e50 * (m_Ni56/const.M_sun) * u.erg\n", "print(f\"The total energy production for 1 solar mass of 56Ni is: {total_energy_production}\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { From 8f680fb2eb2f7ce38a95e619aa6b4de1256ea729 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Mon, 25 Nov 2024 21:44:21 -0500 Subject: [PATCH 10/11] Removed a .value I missed before --- docs/physics/tardisgamma/decayenergy.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index 719be39ff0f..e6aa189c275 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -88,7 +88,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -105,7 +105,7 @@ "#mass of Ni56 in solar masses\n", "m_Ni56 = 1 * const.M_sun\n", "\n", - "energy_production_rate = (6.45e43 * np.exp(-time/(8.8*u.day)) + 1.45e43 * np.exp(-time/(111.3*u.day))) * (m_Ni56/ const.M_sun).value * u.erg /u.s\n", + "energy_production_rate = (6.45e43 * np.exp(-time/(8.8*u.day)) + 1.45e43 * np.exp(-time/(111.3*u.day))) * (m_Ni56/ const.M_sun) * u.erg /u.s\n", "\n", "print(f\"The total energy production rate for 1 solar mass of 56Ni after 10 days is: {energy_production_rate:.2e}\")" ] From 1f1fbeb16e425c36ef5663a9382c1f63c8451a98 Mon Sep 17 00:00:00 2001 From: ceceliapowers Date: Mon, 2 Dec 2024 21:29:12 -0500 Subject: [PATCH 11/11] Changed meV to MeV --- docs/physics/tardisgamma/decayenergy.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/physics/tardisgamma/decayenergy.ipynb b/docs/physics/tardisgamma/decayenergy.ipynb index e6aa189c275..c1e1e0ff3b3 100644 --- a/docs/physics/tardisgamma/decayenergy.ipynb +++ b/docs/physics/tardisgamma/decayenergy.ipynb @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -24,26 +24,26 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "$1.7202 \\; \\mathrm{meV}$" + "$1.7202 \\; \\mathrm{MeV}$" ], "text/plain": [ - "" + "" ] }, - "execution_count": 2, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# energies of each transition\n", - "t_energies = np.array([0.270, 0.750, 0.480, 1.56, 0.812, 0.158]) * u.meV\n", + "t_energies = np.array([0.270, 0.750, 0.480, 1.56, 0.812, 0.158]) * u.MeV\n", "# probabilities of each transition\n", "t_prob = np.array([.365, .495, .366, .140, .860, 1.00])\n", "\n",