diff --git a/NUCE_2100/.ipynb_checkpoints/NUCE 2100 Midterm 1-checkpoint.ipynb b/NUCE_2100/.ipynb_checkpoints/NUCE 2100 Midterm 1-checkpoint.ipynb index 4d0e095..4c5ad95 100644 --- a/NUCE_2100/.ipynb_checkpoints/NUCE 2100 Midterm 1-checkpoint.ipynb +++ b/NUCE_2100/.ipynb_checkpoints/NUCE 2100 Midterm 1-checkpoint.ipynb @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 1, "id": "af61cdf6-cb10-43e3-81b5-703acbc893a0", "metadata": {}, "outputs": [], @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 2, "id": "275ae694-977a-41fa-a75c-c221f1b0d653", "metadata": {}, "outputs": [ @@ -106,7 +106,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 3, "id": "1c22a513-0351-4d2c-82c4-504f077b900d", "metadata": {}, "outputs": [ @@ -143,7 +143,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 4, "id": "2eded1a4-ad36-47f4-b634-037c157c20d1", "metadata": {}, "outputs": [ @@ -168,7 +168,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 5, "id": "12612512-63c0-468f-941e-209d21827ee9", "metadata": {}, "outputs": [ @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 6, "id": "2f9c5cdb-d0ca-4eb9-9b6f-a1c6617db5d1", "metadata": {}, "outputs": [ @@ -290,7 +290,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 7, "id": "8d9faf3b-aac3-4a1f-9d07-464ea77d3290", "metadata": {}, "outputs": [ @@ -356,7 +356,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 8, "id": "2612afc1-e0dc-4078-a792-b83e946af822", "metadata": {}, "outputs": [ @@ -422,7 +422,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 10, "id": "efab76fa-fbc8-4ea4-9d4f-f5790b0cfeb1", "metadata": {}, "outputs": [ @@ -445,7 +445,7 @@ "E_r = 200 * 1.60218e-13 #J\n", "#According to INL: https://mooseframework.inl.gov/bison/theory/power_burnup.html\n", "P_local = F_dot * E_r\n", - "answer_print('Question 6a', f'{P:4e} J')\n", + "answer_print('Question 6a', f'{P_local:4e} J')\n", "\n", "# Part B\n" ] @@ -463,6 +463,50 @@ "![Screenshot from 2024-10-07 10-42-09.png](attachment:35549a7a-ac6d-402c-bce6-1fb29f3a0e9e.png)" ] }, + { + "cell_type": "code", + "execution_count": 27, + "id": "e669dab3-ef9a-460e-8fbc-9a99bbad623b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sodium-22 Activty: 4.183e+10 decay/s\n", + "Strontium-90 Activty: 3.928e+08 decay/s\n", + "\n", + "=========FINAL ANSWER=========\n", + "Question 7:\n", + "The sodium sample has higher activity.\n", + "It has 4.183e+10 decays/second compared to the Strontium sample's 3.928e+08 decays/second.\n", + "=========FINAL ANSWER=========\n", + "\n" + ] + } + ], + "source": [ + "\"\"\"\n", + "Data pulled from https://www-nds.iaea.org/relnsd/vcharthtml/VChartHTML.html\n", + "\"\"\"\n", + "Na22_mass = 18.1 #g\n", + "Na22_half_life = 8_210_481_069_425 #s, beta decay\n", + "Na22_lambda = 0.693/Na22_half_life #decay/nuclei/s\n", + "Na22_N = Na22_mass*6.022141e23 / 21994437.55e-6 #nuclei\n", + "Na22_activity = Na22_lambda * Na22_N #decay/s\n", + "\n", + "Sr90_mass = 77.2 #g\n", + "Sr90_half_life = 912_310_730_946_708 #s, beta decay\n", + "Sr90_lambda = 0.693/Sr90_half_life #decay/nuclei/s\n", + "Sr90_N = Sr90_mass*6.022141e23 / 89907727e-6 #nuclei\n", + "Sr90_activity = Sr90_lambda * Sr90_N #decay/s\n", + "\n", + "print(f'Sodium-22 Activty: {Na22_activity:.3e} decay/s')\n", + "print(f'Strontium-90 Activty: {Sr90_activity:.3e} decay/s')\n", + "\n", + "answer_print('Question 7',f'The sodium sample has higher activity.\\nIt has {Na22_activity:.3e} decays/second compared to the Strontium sample\\'s {Sr90_activity:.3e} decays/second.')" + ] + }, { "attachments": { "cded4647-fbb4-409b-8c3b-f070b55060f3.png": { @@ -476,6 +520,37 @@ "![Screenshot from 2024-10-07 10-42-23.png](attachment:cded4647-fbb4-409b-8c3b-f070b55060f3.png)" ] }, + { + "cell_type": "code", + "execution_count": 29, + "id": "f3570a43-0a14-44c4-9237-e3e1f595535d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "=========FINAL ANSWER=========\n", + "Question 8a:\n", + "The atomic density of Pu239 in this reactor is 3.3757e+22 atoms/cm^3.\n", + "=========FINAL ANSWER=========\n", + "\n" + ] + } + ], + "source": [ + "Pu239_density = 13.4 #g/cm^3\n", + "v = 2.88\n", + "Sigma_f = 1.8 #barns\n", + "Sigma_a = 2.1 #barns\n", + "D = 1.5 #cm\n", + "\n", + "# Part A\n", + "N_Pu239 = 100/100*Pu239_density*6.0221409e23/Pu239_mass\n", + "answer_print('Question 8a', f'The atomic density of Pu239 in this reactor is {N_Pu239:.4e} atoms/cm^3.')\n" + ] + }, { "attachments": { "c4932019-fecd-47c5-a7e3-54150a2f6d67.png": { @@ -491,30 +566,45 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 18, "id": "c0c96c53-4ef8-4367-9d7c-0d9688aff15d", "metadata": {}, "outputs": [ { - "ename": "TypeError", - "evalue": "array() missing required argument 'object' (pos 0)", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[64], line 5\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;03mI know wikipedia is not a fantastic source... but they have a convenient table listing isotopes of tin with their abundance.\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;03mhttps://en.wikipedia.org/wiki/Isotopes_of_tin\u001b[39;00m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m----> 5\u001b[0m tin_stats \u001b[38;5;241m=\u001b[39m \u001b[43mnp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43marray\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m)\u001b[49m\n", - "\u001b[0;31mTypeError\u001b[0m: array() missing required argument 'object' (pos 0)" + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "=========FINAL ANSWER=========\n", + "Question 9:\n", + "My calculated value for elemental mass of tin is 118.71011.\n", + "The periodic table value is 118.71000.\n", + "That is a 0.00010% error.\n", + "=========FINAL ANSWER=========\n", + "\n" ] } ], "source": [ "\"\"\"\n", - "I know wikipedia is not a fantastic source... but they have a convenient table listing isotopes of tin with their abundance.\n", + "Here is where I found a list of isotope abuncance and masses:\n", "https://en.wikipedia.org/wiki/Isotopes_of_tin\n", "\"\"\"\n", - "tin_stats = np.array(\n", - ")\n", - "\n" + "tin_stats = np.array([\n", + " [112, 114, 115, 116, 117, 118, 119, 120, 122, 124], #Number\n", + " [111.9048249, 113.90278013, 114.903344695, 115.90174283, 116.90295404, 117.90160663, 118.90331127, 119.90220256, 121.9034455, 123.9052796], # atomic mass (amu)\n", + " [0.0097, 0.0066, 0.0034, 0.1454, 0.0768, 0.2422, 0.0859, 0.3258, 0.0463, 0.0579] # Abundance\n", + "])\n", + "\n", + "tin_elemental_mass = np.sum(tin_stats[1,:]*tin_stats[2,:])\n", + "\n", + "\"\"\"\n", + "For a periodic table, I am using the result when you just Google 'Periodic table'.\n", + "https://www.google.com/search?kgmid=%2Fm%2F05rbs&hl=en-US&q=Periodic%20table&shndl=17&source=sh%2Fx%2Fkp%2Fosrp%2Fm5%2F1&kgs=91de64a89fb9bd4b\n", + "\"\"\"\n", + "tin_perioic_table = 118.71 #amu\n", + "\n", + "answer_print('Question 9', f'My calculated value for elemental mass of tin is {tin_elemental_mass:.5f}.\\nThe periodic table value is {tin_perioic_table:.5f}.\\nThat is a {(tin_elemental_mass-tin_perioic_table)/tin_perioic_table*100:.5f}% error.')" ] }, { @@ -529,6 +619,25 @@ "source": [ "![Screenshot from 2024-10-07 10-42-48.png](attachment:4746ba32-86ce-4623-8715-3aae365e20d8.png)" ] + }, + { + "cell_type": "markdown", + "id": "481593ef-6dee-4507-a8ba-c902b56cbad7", + "metadata": {}, + "source": [ + "| Question | True / False |\n", + "| ------- | -------|\n", + "| 10A | False |\n", + "| 10B | True |\n", + "| 10C | False |\n", + "| 10D | True |\n", + "| 10E | True |\n", + "| 10F | True |\n", + "| 10G | True |\n", + "| 10H | False |\n", + "| 10I | True |\n", + "| 10J | True |" + ] } ], "metadata": { diff --git a/NUCE_2100/NUCE 2100 Midterm 1.ipynb b/NUCE_2100/NUCE 2100 Midterm 1.ipynb index 4d0e095..4c5ad95 100644 --- a/NUCE_2100/NUCE 2100 Midterm 1.ipynb +++ b/NUCE_2100/NUCE 2100 Midterm 1.ipynb @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 1, "id": "af61cdf6-cb10-43e3-81b5-703acbc893a0", "metadata": {}, "outputs": [], @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 2, "id": "275ae694-977a-41fa-a75c-c221f1b0d653", "metadata": {}, "outputs": [ @@ -106,7 +106,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 3, "id": "1c22a513-0351-4d2c-82c4-504f077b900d", "metadata": {}, "outputs": [ @@ -143,7 +143,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 4, "id": "2eded1a4-ad36-47f4-b634-037c157c20d1", "metadata": {}, "outputs": [ @@ -168,7 +168,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 5, "id": "12612512-63c0-468f-941e-209d21827ee9", "metadata": {}, "outputs": [ @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 6, "id": "2f9c5cdb-d0ca-4eb9-9b6f-a1c6617db5d1", "metadata": {}, "outputs": [ @@ -290,7 +290,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 7, "id": "8d9faf3b-aac3-4a1f-9d07-464ea77d3290", "metadata": {}, "outputs": [ @@ -356,7 +356,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 8, "id": "2612afc1-e0dc-4078-a792-b83e946af822", "metadata": {}, "outputs": [ @@ -422,7 +422,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 10, "id": "efab76fa-fbc8-4ea4-9d4f-f5790b0cfeb1", "metadata": {}, "outputs": [ @@ -445,7 +445,7 @@ "E_r = 200 * 1.60218e-13 #J\n", "#According to INL: https://mooseframework.inl.gov/bison/theory/power_burnup.html\n", "P_local = F_dot * E_r\n", - "answer_print('Question 6a', f'{P:4e} J')\n", + "answer_print('Question 6a', f'{P_local:4e} J')\n", "\n", "# Part B\n" ] @@ -463,6 +463,50 @@ "![Screenshot from 2024-10-07 10-42-09.png](attachment:35549a7a-ac6d-402c-bce6-1fb29f3a0e9e.png)" ] }, + { + "cell_type": "code", + "execution_count": 27, + "id": "e669dab3-ef9a-460e-8fbc-9a99bbad623b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sodium-22 Activty: 4.183e+10 decay/s\n", + "Strontium-90 Activty: 3.928e+08 decay/s\n", + "\n", + "=========FINAL ANSWER=========\n", + "Question 7:\n", + "The sodium sample has higher activity.\n", + "It has 4.183e+10 decays/second compared to the Strontium sample's 3.928e+08 decays/second.\n", + "=========FINAL ANSWER=========\n", + "\n" + ] + } + ], + "source": [ + "\"\"\"\n", + "Data pulled from https://www-nds.iaea.org/relnsd/vcharthtml/VChartHTML.html\n", + "\"\"\"\n", + "Na22_mass = 18.1 #g\n", + "Na22_half_life = 8_210_481_069_425 #s, beta decay\n", + "Na22_lambda = 0.693/Na22_half_life #decay/nuclei/s\n", + "Na22_N = Na22_mass*6.022141e23 / 21994437.55e-6 #nuclei\n", + "Na22_activity = Na22_lambda * Na22_N #decay/s\n", + "\n", + "Sr90_mass = 77.2 #g\n", + "Sr90_half_life = 912_310_730_946_708 #s, beta decay\n", + "Sr90_lambda = 0.693/Sr90_half_life #decay/nuclei/s\n", + "Sr90_N = Sr90_mass*6.022141e23 / 89907727e-6 #nuclei\n", + "Sr90_activity = Sr90_lambda * Sr90_N #decay/s\n", + "\n", + "print(f'Sodium-22 Activty: {Na22_activity:.3e} decay/s')\n", + "print(f'Strontium-90 Activty: {Sr90_activity:.3e} decay/s')\n", + "\n", + "answer_print('Question 7',f'The sodium sample has higher activity.\\nIt has {Na22_activity:.3e} decays/second compared to the Strontium sample\\'s {Sr90_activity:.3e} decays/second.')" + ] + }, { "attachments": { "cded4647-fbb4-409b-8c3b-f070b55060f3.png": { @@ -476,6 +520,37 @@ "![Screenshot from 2024-10-07 10-42-23.png](attachment:cded4647-fbb4-409b-8c3b-f070b55060f3.png)" ] }, + { + "cell_type": "code", + "execution_count": 29, + "id": "f3570a43-0a14-44c4-9237-e3e1f595535d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "=========FINAL ANSWER=========\n", + "Question 8a:\n", + "The atomic density of Pu239 in this reactor is 3.3757e+22 atoms/cm^3.\n", + "=========FINAL ANSWER=========\n", + "\n" + ] + } + ], + "source": [ + "Pu239_density = 13.4 #g/cm^3\n", + "v = 2.88\n", + "Sigma_f = 1.8 #barns\n", + "Sigma_a = 2.1 #barns\n", + "D = 1.5 #cm\n", + "\n", + "# Part A\n", + "N_Pu239 = 100/100*Pu239_density*6.0221409e23/Pu239_mass\n", + "answer_print('Question 8a', f'The atomic density of Pu239 in this reactor is {N_Pu239:.4e} atoms/cm^3.')\n" + ] + }, { "attachments": { "c4932019-fecd-47c5-a7e3-54150a2f6d67.png": { @@ -491,30 +566,45 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 18, "id": "c0c96c53-4ef8-4367-9d7c-0d9688aff15d", "metadata": {}, "outputs": [ { - "ename": "TypeError", - "evalue": "array() missing required argument 'object' (pos 0)", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[64], line 5\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;03mI know wikipedia is not a fantastic source... but they have a convenient table listing isotopes of tin with their abundance.\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;03mhttps://en.wikipedia.org/wiki/Isotopes_of_tin\u001b[39;00m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m----> 5\u001b[0m tin_stats \u001b[38;5;241m=\u001b[39m \u001b[43mnp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43marray\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m)\u001b[49m\n", - "\u001b[0;31mTypeError\u001b[0m: array() missing required argument 'object' (pos 0)" + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "=========FINAL ANSWER=========\n", + "Question 9:\n", + "My calculated value for elemental mass of tin is 118.71011.\n", + "The periodic table value is 118.71000.\n", + "That is a 0.00010% error.\n", + "=========FINAL ANSWER=========\n", + "\n" ] } ], "source": [ "\"\"\"\n", - "I know wikipedia is not a fantastic source... but they have a convenient table listing isotopes of tin with their abundance.\n", + "Here is where I found a list of isotope abuncance and masses:\n", "https://en.wikipedia.org/wiki/Isotopes_of_tin\n", "\"\"\"\n", - "tin_stats = np.array(\n", - ")\n", - "\n" + "tin_stats = np.array([\n", + " [112, 114, 115, 116, 117, 118, 119, 120, 122, 124], #Number\n", + " [111.9048249, 113.90278013, 114.903344695, 115.90174283, 116.90295404, 117.90160663, 118.90331127, 119.90220256, 121.9034455, 123.9052796], # atomic mass (amu)\n", + " [0.0097, 0.0066, 0.0034, 0.1454, 0.0768, 0.2422, 0.0859, 0.3258, 0.0463, 0.0579] # Abundance\n", + "])\n", + "\n", + "tin_elemental_mass = np.sum(tin_stats[1,:]*tin_stats[2,:])\n", + "\n", + "\"\"\"\n", + "For a periodic table, I am using the result when you just Google 'Periodic table'.\n", + "https://www.google.com/search?kgmid=%2Fm%2F05rbs&hl=en-US&q=Periodic%20table&shndl=17&source=sh%2Fx%2Fkp%2Fosrp%2Fm5%2F1&kgs=91de64a89fb9bd4b\n", + "\"\"\"\n", + "tin_perioic_table = 118.71 #amu\n", + "\n", + "answer_print('Question 9', f'My calculated value for elemental mass of tin is {tin_elemental_mass:.5f}.\\nThe periodic table value is {tin_perioic_table:.5f}.\\nThat is a {(tin_elemental_mass-tin_perioic_table)/tin_perioic_table*100:.5f}% error.')" ] }, { @@ -529,6 +619,25 @@ "source": [ "![Screenshot from 2024-10-07 10-42-48.png](attachment:4746ba32-86ce-4623-8715-3aae365e20d8.png)" ] + }, + { + "cell_type": "markdown", + "id": "481593ef-6dee-4507-a8ba-c902b56cbad7", + "metadata": {}, + "source": [ + "| Question | True / False |\n", + "| ------- | -------|\n", + "| 10A | False |\n", + "| 10B | True |\n", + "| 10C | False |\n", + "| 10D | True |\n", + "| 10E | True |\n", + "| 10F | True |\n", + "| 10G | True |\n", + "| 10H | False |\n", + "| 10I | True |\n", + "| 10J | True |" + ] } ], "metadata": {