mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #891 from johnnyliu27/develop
Fix typos and links in example notebooks and userguide/geometry
This commit is contained in:
commit
db3e6b7734
6 changed files with 384 additions and 380 deletions
|
|
@ -19,7 +19,7 @@ surface is a locus of zeros of a function of Cartesian coordinates
|
|||
:math:`x,y,z`, e.g.
|
||||
|
||||
- A plane perpendicular to the :math:`x` axis: :math:`x - x_0 = 0`
|
||||
- A cylinder perpendicular to the :math:`z` axis: :math:`(x - x_0)^2 + (y -
|
||||
- A cylinder parallel to the :math:`z` axis: :math:`(x - x_0)^2 + (y -
|
||||
y_0)^2 - R^2 = 0`
|
||||
- A sphere: :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 - R^2 = 0`
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -240,7 +240,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"So far you've seen the \"hard\" way to create a material. The \"easy\" way is to just pass strings to `add_nuclide()` and `add_element()` -- they are implicitly coverted to `Nuclide` and `Element` objects. For example, we could have created our UO2 material as follows:"
|
||||
"So far you've seen the \"hard\" way to create a material. The \"easy\" way is to just pass strings to `add_nuclide()` and `add_element()` -- they are implicitly converted to `Nuclide` and `Element` objects. For example, we could have created our UO2 material as follows:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -509,12 +509,12 @@
|
|||
"At this point, we have three materials defined, exported to XML, and ready to be used in our model. To finish our model, we need to define the geometric arrangement of materials. OpenMC represents physical volumes using constructive solid geometry (CSG), also known as combinatorial geometry. The object that allows us to assign a material to a region of space is called a `Cell` (same concept in MCNP, for those familiar). In order to define a region that we can assign to a cell, we must first define surfaces which bound the region. A *surface* is a locus of zeros of a function of Cartesian coordinates $x$, $y$, and $z$, e.g.\n",
|
||||
"\n",
|
||||
"- A plane perpendicular to the x axis: $x - x_0 = 0$\n",
|
||||
"- A cylinder perpendicular to the z axis: $(x - x_0)^2 + (y - y_0)^2 - R^2 = 0$\n",
|
||||
"- A cylinder parallel to the z axis: $(x - x_0)^2 + (y - y_0)^2 - R^2 = 0$\n",
|
||||
"- A sphere: $(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 - R^2 = 0$\n",
|
||||
"\n",
|
||||
"Between those three classes of surfaces (planes, cylinders, spheres), one can construct a wide variety of models. It is also possible to define cones and general second-order surfaces (torii are not currently supported).\n",
|
||||
"Between those three classes of surfaces (planes, cylinders, spheres), one can construct a wide variety of models. It is also possible to define cones and general second-order surfaces (tori are not currently supported).\n",
|
||||
"\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",
|
||||
"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 or 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 what we've told you is true."
|
||||
]
|
||||
|
|
@ -792,7 +792,7 @@
|
|||
"\n",
|
||||
"We now have enough knowledge to create our pin-cell. We need three surfaces to define the fuel and clad:\n",
|
||||
"\n",
|
||||
"1. The outer surface of the fuel -- a cylinder perpendicular to the z axis\n",
|
||||
"1. The outer surface of the fuel -- a cylinder parallel to the z axis\n",
|
||||
"2. The inner surface of the clad -- same as above\n",
|
||||
"3. The outer surface of the clad -- same as above\n",
|
||||
"\n",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@
|
|||
"clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, R=0.45720)\n",
|
||||
"\n",
|
||||
"# Create boundary planes to surround the geometry\n",
|
||||
"# Use both reflective and vacuum boundaries to make life interesting\n",
|
||||
"min_x = openmc.XPlane(x0=-0.63, boundary_type='reflective')\n",
|
||||
"max_x = openmc.XPlane(x0=+0.63, boundary_type='reflective')\n",
|
||||
"min_y = openmc.YPlane(y0=-0.63, boundary_type='reflective')\n",
|
||||
|
|
@ -292,7 +291,7 @@
|
|||
"plot.origin = [0, 0, 0]\n",
|
||||
"plot.width = [1.26, 1.26]\n",
|
||||
"plot.pixels = [250, 250]\n",
|
||||
"plot.color = 'mat'\n",
|
||||
"plot.color_by = 'material'\n",
|
||||
"\n",
|
||||
"# Instantiate a Plots collection and export to \"plots.xml\"\n",
|
||||
"plot_file = openmc.Plots([plot])\n",
|
||||
|
|
@ -686,8 +685,7 @@
|
|||
"Tally\n",
|
||||
"\tID =\t10000\n",
|
||||
"\tName =\tflux\n",
|
||||
"\tFilters =\t\n",
|
||||
" \t\tMeshFilter\t[10000]\n",
|
||||
"\tFilters =\tMeshFilter\t[10000]\n",
|
||||
"\tNuclides =\ttotal \n",
|
||||
"\tScores =\t['flux', 'fission']\n",
|
||||
"\tEstimator =\ttracklength\n",
|
||||
|
|
@ -704,7 +702,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The statepoint file actually stores the sum and sum-of-squares for each tally bin from which the mean and variance can be calculated as described [here](http://mit-crpg.github.io/openmc/methods/tallies.html#variance). The sum and sum-of-squares can be accessed using the ``sum`` and ``sum_sq`` properties:"
|
||||
"The statepoint file actually stores the sum and sum-of-squares for each tally bin from which the mean and variance can be calculated as described [here](http://openmc.readthedocs.io/en/latest/methods/tallies.html#variance). The sum and sum-of-squares can be accessed using the ``sum`` and ``sum_sq`` properties:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -821,8 +819,7 @@
|
|||
"Tally\n",
|
||||
"\tID =\t10001\n",
|
||||
"\tName =\tflux\n",
|
||||
"\tFilters =\t\n",
|
||||
" \t\tMeshFilter\t[10000]\n",
|
||||
"\tFilters =\tMeshFilter\t[10000]\n",
|
||||
"\tNuclides =\ttotal \n",
|
||||
"\tScores =\t['flux']\n",
|
||||
"\tEstimator =\ttracklength\n",
|
||||
|
|
@ -1043,7 +1040,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"# Create log-spaced energy bins from 1 keV to 100 MeV\n",
|
||||
"# Create log-spaced energy bins from 1 keV to 10 MeV\n",
|
||||
"energy_bins = np.logspace(3,7)\n",
|
||||
"\n",
|
||||
"# Calculate pdf for source energies\n",
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"\n",
|
||||
"To perform the search we will use the `openmc.search_for_keff` function. This function requires a different function be defined which creates an parametrized model to analyze. This model is required to be stored in an `openmc.model.Model` object. The first parameter of this function will be modified during the search process for our critical eigenvalue.\n",
|
||||
"\n",
|
||||
"Our model will be a pin-cell from the [Multi-Group Mode Part II](./mg-mode-part-ii.rst) assembly, except this time the entire model building process will be contained within a function, and the Boron concentration will be parametrized."
|
||||
"Our model will be a pin-cell from the [Multi-Group Mode Part II](http://openmc.readthedocs.io/en/latest/examples/mg-mode-part-ii.html) assembly, except this time the entire model building process will be contained within a function, and the Boron concentration will be parametrized."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now let's move on to the geometry. Our problem will have three regions for the fuel, the clad, and the surrounding coolant. The first step is to create the bounding surfaces -- in this case two cylinders and six reflective planes."
|
||||
"Now let's move on to the geometry. Our problem will have three regions for the fuel, the clad, and the surrounding coolant. The first step is to create the bounding surfaces -- in this case two cylinders and six planes."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -293,7 +293,7 @@
|
|||
"plot.origin = [0, 0, 0]\n",
|
||||
"plot.width = [1.26, 1.26]\n",
|
||||
"plot.pixels = [250, 250]\n",
|
||||
"plot.color = 'mat'\n",
|
||||
"plot.color_by = 'material'\n",
|
||||
"\n",
|
||||
"# Instantiate a Plots collection and export to \"plots.xml\"\n",
|
||||
"plot_file = openmc.Plots([plot])\n",
|
||||
|
|
@ -412,7 +412,7 @@
|
|||
"tally.nuclides = [o16, h1]\n",
|
||||
"tallies_file.append(tally)\n",
|
||||
"\n",
|
||||
"# Instantiate a tally mesh \n",
|
||||
"# Instantiate a tally mesh\n",
|
||||
"mesh = openmc.Mesh(mesh_id=1)\n",
|
||||
"mesh.type = 'regular'\n",
|
||||
"mesh.dimension = [1, 1, 1]\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue