Respond to comments on #850

This commit is contained in:
Paul Romano 2017-04-05 07:11:57 -05:00
parent 973b66c1d0
commit 5c74b85713
28 changed files with 985 additions and 758 deletions

View file

@ -139,14 +139,7 @@
}
],
"source": [
"plot_args = {\n",
" 'width': (2*calendria_or, 2*calendria_or),\n",
" 'colors': {\n",
" fuel: 'black',\n",
" clad: 'silver',\n",
" heavy_water: 'blue'\n",
" }\n",
" }\n",
"plot_args = {'width': (2*calendria_or, 2*calendria_or)}\n",
"bundle_universe = openmc.Universe(cells=water_cells)\n",
"bundle_universe.plot(**plot_args)"
]
@ -325,7 +318,11 @@
"source": [
"p = openmc.Plot.from_geometry(geom)\n",
"p.color_by = 'material'\n",
"p.colors = plot_args['colors']\n",
"p.colors = {\n",
" fuel: 'black',\n",
" clad: 'silver',\n",
" heavy_water: 'blue'\n",
"}\n",
"openmc.plot_inline(p)"
]
},

View file

@ -411,7 +411,7 @@
}
],
"source": [
"water.remove_nuclide(openmc.Nuclide('O16'))\n",
"water.remove_nuclide('O16')\n",
"water.add_element('O', 1.0)\n",
"\n",
"mats.export_to_xml()\n",
@ -516,7 +516,7 @@
"\n",
"Note that defining a surface is not sufficient to specify a volume -- in order to define an actual volume, one must reference the half-space of a surface. A surface *half-space* is the region whose points satisfy a positive of negative inequality of the surface equation. For example, for a sphere of radius one centered at the origin, the surface equation is $f(x,y,z) = x^2 + y^2 + z^2 - 1 = 0$. Thus, we say that the negative half-space of the sphere, is defined as the collection of points satisfying $f(x,y,z) < 0$, which one can reason is the inside of the sphere. Conversely, the positive half-space of the sphere would correspond to all points outside of the sphere.\n",
"\n",
"Let's go ahead and create a sphere and confirm that we've told you is true."
"Let's go ahead and create a sphere and confirm that what we've told you is true."
]
},
{
@ -1417,7 +1417,7 @@
"source": [
"## Geometry plotting\n",
"\n",
"We saw before that we could call the `Universe.plot()` method to show a universe while we were creating out geometry. There is also a built-in plotter in the Fortran codebase that is much faster than the Python plotter and has more options. The interface looks somewhat similar to the `Universe.plot()` method. Instead though, we create `Plot` instances, assign them to a `Plots` collection, export it to XML, and then run OpenMC in geometry plotting mode. As an example, let's specify that we want the plot to be colored by material (rather than by cell) and we assign yellow to fuel and blue to water."
"We saw before that we could call the `Universe.plot()` method to show a universe while we were creating our geometry. There is also a built-in plotter in the Fortran codebase that is much faster than the Python plotter and has more options. The interface looks somewhat similar to the `Universe.plot()` method. Instead though, we create `Plot` instances, assign them to a `Plots` collection, export it to XML, and then run OpenMC in geometry plotting mode. As an example, let's specify that we want the plot to be colored by material (rather than by cell) and we assign yellow to fuel and blue to water."
]
},
{

View file

@ -75,7 +75,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To actually create individual TRISO particles, we first need to create a universe that will be used within each particle. The reason we use the same universe for each TRISO particle is to reduce the total number of cells/surfaces needed which can improve performance by a factor of two over using unique cells/surfaces in each."
"To actually create individual TRISO particles, we first need to create a universe that will be used within each particle. The reason we use the same universe for each TRISO particle is to reduce the total number of cells/surfaces needed which can substantially improve performance over using unique cells/surfaces in each."
]
},
{
@ -101,7 +101,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we have a universe that can be used for each TRISO particle, we need to randomly select locations. In this example, we will select locations at random within in a 1 cm x 1 cm x 1 cm box centered at the origin with a packing fraction of 30%. Note that `pack_trisos` can handle up to the theoretical maximum of 60% (it will just be slow)."
"Now that we have a universe that can be used for each TRISO particle, we need to randomly select locations. In this example, we will select locations at random within a 1 cm x 1 cm x 1 cm box centered at the origin with a packing fraction of 30%. Note that `pack_trisos` can handle up to the theoretical maximum of 60% (it will just be slow)."
]
},
{