{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "091e0856-5344-4a86-9bf3-38f40a48ab7d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d7a1ec8b-6233-4725-87de-c521a3b7239e",
   "metadata": {},
   "outputs": [],
   "source": [
    "Homework 3 - NUCE 2100\n",
    "\n",
    "**Dane Sabo**\n",
    "\n",
    "*September 16th, 2024*"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "af78d786-0cff-4ca4-a1eb-f42cfba588d0",
   "metadata": {},
   "source": [
    "# Question 1\n",
    "A monoenergetic beam of neutrons, Φ = 4 x 10^10 neutrons/cm2-sec, impinges on a target 1 cm2 in area and 0.1 cm thick. There are 0.048 x 10^24 atoms per cm3 in the target, and the total cross-\n",
    "section at the energy of the beam is 4.5 b.\n",
    "\n",
    "## Part A\n",
    "What is the macroscopic total cross section?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "906871c1-8db1-481e-8ac2-fc01eba82970",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The macroscopic total cross section is 2.160e-01 cm^-1.\n"
     ]
    }
   ],
   "source": [
    "neutron_flux = 4e10 #neutrons/cm^2-s\n",
    "area = 1 #cm^2\n",
    "thickness = 0.1 #cm\n",
    "atom_density = 0.048e24 #atoms/cm^3\n",
    "beam_section = 4.5 #b\n",
    "\n",
    "##Converting units\n",
    "beam_section = 4.5*1e-24 #cm^2\n",
    "\n",
    "Sigma_t = atom_density * beam_section #1/cm\n",
    "\n",
    "print(f\"The macroscopic total cross section is {Sigma_t:.3e} cm^-1.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d50329c9-9a1d-40ee-b0c2-b0b06562c56f",
   "metadata": {},
   "source": [
    "## Part B\n",
    "How many neutron interactions per second occur in the target?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d5f667fb-4fc1-4cab-8aea-d78b38dc2a75",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "There are 8.640e+09 neutron interactions per second in the target.\n"
     ]
    }
   ],
   "source": [
    "rxn_rate = neutron_flux * Sigma_t\n",
    "\n",
    "print(f\"There are {rxn_rate:.3e} neutron interactions per second in the target.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e208f67b-5fb7-44dd-8e1a-ff148912c666",
   "metadata": {},
   "source": [
    "## Part C\n",
    "What is the collision density?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8ba3f4f3-139c-48fb-b856-9aac2bee096d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The collision density is 4.147e+32 collisions/cm^3/s.\n"
     ]
    }
   ],
   "source": [
    "collision_density = atom_density * rxn_rate\n",
    "\n",
    "print(f\"The collision density is {collision_density:.3e} collisions/cm^3/s.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ec3b9f50-950e-4e76-8d31-25bbe52505cb",
   "metadata": {},
   "source": [
    "#  Question 2\n",
    "A beam of 2 MeV neutrons is incident on a slab of heavy water (D2O). The total cross sections of deuterium and oxygen at this energy are 2.6 b and 1.6 b, respectively.\n",
    "\n",
    "## Part A\n",
    "What is the macroscopic total cross section of D2O at 2 MeV?\n",
    "\n",
    "[Heavy water properties](https://srd.nist.gov/jpcrdreprint/1.555714.pdf)\n",
    "\n",
    "[Heavy water molar mass](https://www.acs.org/molecule-of-the-week/archive/d/deuterium-oxide.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "adc08334-42a5-4b84-8d91-c28a877d1ee5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The macroscopic total cross section of D2O is 2.270e-01 cm^-1\n"
     ]
    }
   ],
   "source": [
    "d2o_cross_section = (2*2.6+1.6)*1e-24 #cm^2\n",
    "d2o_rho = 1.11 #g/cm^3\n",
    "d2o_mass = 20.03 #g/mol\n",
    "avo_no = 6.023e23 #atoms / mol\n",
    "\n",
    "N = avo_no * d2o_rho / d2o_mass\n",
    "\n",
    "d2o_sigma = N * d2o_cross_section\n",
    "print(f\"The macroscopic total cross section of D2O is {d2o_sigma:.3e} cm^-1\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1a846a7a-39c8-4580-8ce9-f02f850f001c",
   "metadata": {},
   "source": [
    "## Part B\n",
    "How thick must the slab be to reduce the intensity of the uncollided beam by a factor of 10?\n",
    "$$\\frac{I}{I_o} = e^{-\\mu t} $$\n",
    "$$\\frac{I}{I_o}:= 0.1 \\rightarrow 0.1 = e^{-\\mu t} $$\n",
    "$$\\ln(0.1) = -\\mu t $$\n",
    "$$t = -\\frac{\\ln(0.1)}{\\mu}$$\n",
    "\n",
    "and because we're dealing with high energy neutrons, [$\\mu = \\Sigma_{D_2O}$](https://theory.labster.com/neutron_beam_attenuation/)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0500bb0c-0d82-4615-b6b6-9167e936f9d8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The tenth thickness of heavy water is 1.014e+01 cm\n"
     ]
    }
   ],
   "source": [
    "t = -np.log(0.1)/d2o_sigma\n",
    "print(f\"The tenth thickness of heavy water is {t:.3e} cm\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "baf341b4-c1e1-4e67-af93-097685c7e5df",
   "metadata": {},
   "source": [
    "## Part C\n",
    "If an incident neutron has a collision in the slab, what is the relative probability that it collides with deuterium?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "ca5a75d6-2839-436c-9112-274941818b66",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The probability of striking a deuterium atom given a collision is 76.5%\n"
     ]
    }
   ],
   "source": [
    "prob_d = 2*2.6/(2*2.6+1.6)\n",
    "print(f\"The probability of striking a deuterium atom given a collision is {prob_d*100:.1f}%\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "135e061f-b32d-48c1-b1e2-93f0982532b3",
   "metadata": {},
   "source": [
    "# Question 3\n",
    "What is the equivalent dose (in rem) from 0.75 Gray of alpha particle radiation? What is the dose (in Sievert) from 30 rad of beta particle (max energy 0.05 MeV) of radiation?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "18bf0f85-0d27-4a1c-ba99-3fb828759d9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The equivalent dose (in rem) is 7.500e+02 rem.\n"
     ]
    }
   ],
   "source": [
    "### First question\n",
    "absorbed_dose_1 = 0.75*100 #Gy->rad\n",
    "qf_1 = 10\n",
    "eq_dose = absorbed_dose_1 * qf_1 #rem\n",
    "print(f\"The equivalent dose (in rem) is {eq_dose:.3e} rem.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "d0e4a099-7d58-48a5-9341-89a311c0f142",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The equivalent dose (in Sievert) is 3.000e-01 Sv.\n"
     ]
    }
   ],
   "source": [
    "### Second Question\n",
    "absorbed_dose = 30 / 100 #rad->Gy\n",
    "qf_2 = 1\n",
    "eq_dose = absorbed_dose * qf_2\n",
    "print(f\"The equivalent dose (in Sievert) is {eq_dose:.3e} Sv.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ec53d400-858e-4f4d-a700-e564e59e4e3d",
   "metadata": {},
   "source": [
    "# Question 4\n",
    "How much shielding is necessary to cut dose from 1 MeV gamma radiation by three orders of magnitude if the shield is made of:\n",
    "\n",
    "**Tenth Thickness Algebra**\n",
    "$$\\frac{I}{I_o} = \\left( \\frac{1}{10} \\right)^{\\left( \\frac{X}{X_{1/10}}\\right) }$$\n",
    "$$\\frac{I_o}{I} = \\left( 10 \\right)^{- \\left( \\frac{X}{X_{1/10}}\\right) }$$\n",
    "$$\\log_{10}\\left(\\frac{I_o}{I}\\right) = - \\frac{X}{X_{1/10}} $$\n",
    "$$ X = - X_{1/10} \\log_{10}\\left(\\frac{I_o}{I}\\right)$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bb55a71f-bd5c-496d-babf-c519ee57067e",
   "metadata": {},
   "outputs": [],
   "source": [
    "def tenth_thickness(x_tenth,reduction):\n",
    "    x = -x_tenth * np.log10(1/reduction)\n",
    "    return x"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b62d3de0-c6b8-40da-8240-c2f137036cf2",
   "metadata": {},
   "source": [
    "## Water"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "a67ba5db-4f34-47ea-b38e-f35b05e110aa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "102.00 cm of water required\n"
     ]
    }
   ],
   "source": [
    "print(f\"{tenth_thickness(34, 1e3):.2f} cm of water required\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1d607af0-7d49-4ac6-91bc-3e4fc5d7f42a",
   "metadata": {},
   "source": [
    "## Lead"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "17431bc1-5964-4c53-9c2b-c29905eae636",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "8.70 cm of lead required\n"
     ]
    }
   ],
   "source": [
    "print(f\"{tenth_thickness(2.9, 1e3):.2f} cm of lead required\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "538bbb72-6e15-4435-b225-1a9a114bbc32",
   "metadata": {},
   "source": [
    "## Concrete"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "95fa897d-2ce5-4c0d-b405-9d3097c8318f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9.00 cm of average concrete required\n"
     ]
    }
   ],
   "source": [
    "print(f\"{tenth_thickness((17-11)/2, 1e3):.2f} cm of average concrete required\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "90930e5b-56b9-4e9a-ad5d-cb24fc597459",
   "metadata": {
    "jp-MarkdownHeadingCollapsed": true
   },
   "source": [
    "# Question 5\n",
    "Please mark the following statements as true or false:\n",
    "\n",
    "Question | Answer\n",
    "--- | ---\n",
    "Given a material emitting alpha or beta radiation the absorbed dose due to radiation is independent of the activity of the sample. | **True** Absorbed dose is the deposited energy per unit mass, and does not depend on time. Absorbed dose over time depends on activity, but absorbed dose alone does not.\n",
    "Absorbed gamma dose decreases as the linear attenuation coefficient increases | **True:** Attenuation decreases as $\\mu$ increases, and therefore absorbed dose decreases with all else constant.\n",
    "\n",
    "# Question 6\n",
    "When entering radiation areas workers often don \"clean suits\". Given that these are not sufficient protection against neutron/photon dose what do you think the purpose of these suits is? What would be the danger assosciated with not using them?\n",
    "\n",
    "**Answer:**\n",
    "Radiation workers still have to be concered about two other forms of radiation: alpha and beta particles. These particles have little penetrating power, but the real danger of them comes from accidental ingestion. Clean suits act to prevent penetration of alpha and beta particles, as well as keeping radioactive contamination on the suit instead of the person and their clothing. This way, the worker can do whatever job they need to in a radioactive area, without bringing the contamination home with them on their clothes or skin. Shedding these clean suits after the job is done keeps the contaminants at the plant, and away from accidental ingestion opportunities at home. \n",
    "\n",
    "# Question 7\n",
    "When purchasing a home in this part of the country it is often recommended to perform radon testing. Briefly describe the origin of radon, how it might enter a house, what type of radiation it emits, and whether you think the issue seems to be genuinely dangerous or a way to scare potential homewoners into paying for testing.\n",
    "\n",
    "Radon is a radioactive gas biproduct of (usually) uranium degredation. Radon rises through the soil where radioactive ores exist and enters homes through foundation cracks and water sources. Notably, homes can accumulate radon as the gas is unable to disperse once inside the home. Radon is naturally found as $^{222}Rn$, which decays with alpha particle radiation. If radon wasn't a gas I wouldn't be as concerned about its effects since alpha particles can't penetrate skin, but radon IS a gas, and can give off alpha particles inside your lungs. For this reason, several health agencies such as the NIH and EPA say that radon is the most common cause of lung cancer in non-smokers. Radon testing is extremely cheap -- [I was able to find a test for $16 with lab fees included on Amazon](\"https://a.co/d/gAbjMoK\"). It seems like a good call to check radon levels. A \\$16 dollar test is quite cheap compared to a home, and pennies compared to the cost of lung cancer. \n",
    "\n",
    "# Question 8\n",
    "Research the radiation hormesis theory and summarize the current status of the hypothesis. Please provide at least two sources that you consulted. Based on your research state whether you think that this is accepted science, pro-nuclear propaganda, or ther is not sufficient evidence to decide. Do you think that nuclear power advocates who use radiation hormesis to support their stance help or hurt their cause? Why?\n",
    "\n",
    "Radiation hormesis is the theory that low doses of radiation actually make the body healthier, as this radiation prompts healing. \n",
    "\n",
    "Sources:\n",
    "\n",
    "https://www.nature.com/articles/nrc2677\n",
    "\n",
    "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2477686/\n",
    "\n",
    "The two sources I identified take different stances on radiation hormesis. The first one, published in *Nature*, takes a softer stance saying that it does seem like an effect happens from low dose radiation, but doesn't necessarily say that it is beneficial. Instead, they say that there really isn't enough evidence to support either the hormesis or Linear No-Threshhold theory. Notably, they do a good job identifying where certain papers might have blindspots, such as possible faulty measurement techniques or ambitious deductions.\n",
    "\n",
    "The other source from *Dose Response* is very enthusiastic that hormesis is in fact beneficial: it can increase lifespans, reduce cancer risk, and fertility. The author, T.D. Luckey, is adamant that radiation hormeses is a thing. He writes three sections about the theory: the good, the bad, and the ugly. The good is what you'd expect. Benefits. The bad and the ugly, however, are people who don't believe in radiation hormesis. The first sentence of each of those sections sounds borderline conspiratorial. I noticed several times he cited himeslf as a convincing source.\n",
    "\n",
    "I wanted to look into further who T.D. Luckey is. He is also a sir, and a samurai.\n",
    "\n",
    "[Samurai Luckey](https://www.researchgate.net/publication/51422247/figure/fig2/AS:11431281209552777@1701798412569/Sir-Samurai-T-D-Luckey-PhD-a-writer-at-his-home-in-Kansas-20055.tif)\n",
    "\n",
    "Apparently his book, *Radiation Hormesis* was translated and published in Japan. [According to him, his work was positively received and he became an honorary Samurai after a symposium. Two organizers of that event traveled to Kansas to give him his Samurai outfit and sword.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2477726/)\n",
    "\n",
    "I'm more inclined to trust the publication in *Nature* which says there is evidence that low-dose radiation does something, but we don't really know if that thing is beneficial. I certainly don't think radiation hormesis is accepted science.\n",
    "\n",
    "I think in general people want to believe the power plants don't affect their health at all. The average person will not investigate radiation hormesis, but they will know about Chernobyl, Three Mile Island, and Fukushima. When you tell them you would like to increase their radiation dose, they may think less about hormesis and more about nuclear disasters. "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
