{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# The ARMI Material Library\n", "\n", "While *nuclides* are the microscopic building blocks of nature, their collection into *materials* is what we interact with at the engineering scale. The ARMI Framework provides a `Material` class, which has a composition (how many of each nuclide are in the material), and a variety of thermomechanical properties (many of which are temperature dependent), such as:\n", "\n", "* Mass density \n", "* Heat capacity\n", "* Linear or volumetric thermal expansion\n", "* Thermal conductivity\n", "* Solidus/liquidus temperature\n", "\n", "and so on. \n", "\n", "Many of these properties are widely available in the literature for fresh materials. As materials are irradiated, the properties tend to change in complex ways. Material objects can be extended to account for such changes. \n", "\n", "The ARMI Framework comes with a small set of example material definitions. These are generally quite incomplete (often missing temperature dependence), and are of academic quality at best. To do engineering design calculations, users of ARMI are expected to make or otherwise prepare materials. As the ecosystem grows, we hope the material library will mature.\n", "\n", "In any case, here we will explore the use of `Material`s. Let's get an instance of the Uranium Oxide material." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from armi.materials import uraniumOxide\n", "uo2 = uraniumOxide.UO2()\n", "density500 = uo2.density(Tc=500)\n", "print(f\"The density of UO2 @ T = 500C is {density500:.2f} g/cc\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Taking a look at the composition" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(uo2.p.massFrac)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The mass fractions of a material, plus its mass density, fully define the composition. Conversions between number density/fraction and mass density/fraction are handled on the next level up (on `Component`s), which we will explore soon.\n", "\n", "ARMI automatically thermally-expands materials based on their coefficients of linear expansion. For instance, a piece of Uranium Oxide that's 10 cm at room temperature would be longer at 500 C according to the formula:\n", "\n", "\\begin{equation}\n", "\\frac{\\Delta L}{L_0} = \\alpha \\Delta T\n", "\\end{equation}\n", "\n", "On the reactor model, this all happens behind the scenes. But here at the material library level, we can see it in detail. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "L0 = 10.0\n", "dLL = uo2.linearExpansionFactor(500,25)\n", "L = L0 * (1+dLL)\n", "print(f\"Hot length is {L:.4f} cm\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's plot the heat capacity as a function of temperature in K." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "Tk = np.linspace(300,2000)\n", "heatCapacity = [uo2.heatCapacity(Tk=ti) for ti in Tk]\n", "plt.plot(Tk, heatCapacity)\n", "plt.title(\"$UO_2$ heat capacity vs. temperature\")\n", "plt.xlabel(\"Temperature (K)\")\n", "plt.ylabel(\"Heat capacity (J/kg-K)\")\n", "plt.grid(ls='--',alpha=0.3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Different physics plugins require different properties to be defined. For pure neutronics runs, mass density and composition is enough. But for thermal/hydraulics runs, heat capacity and thermal conductivity is needed for solids, and more is needed for coolants. As irradiation models are investigated, creep, corrosion, porosity, swelling, and other factors will be necessary. " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.3" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }