Updated gh-pages with new user input description.

This commit is contained in:
Paul Romano 2011-12-10 11:15:18 -05:00
parent a55f53e875
commit b77c957dcb
42 changed files with 1551 additions and 236 deletions

View file

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

View file

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 305 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -26,3 +26,93 @@ where :math:`\hat{\mathbf{n}}` is a unit vector normal to the surface at the
point of the surface crossing. The direction of the surface normal will be the
gradient to the surface at the point of crossing, i.e. :math:`\mathbf{n} =
\nabla f(x,y,z)`.
------------------------------
Free Gas Scattering Kinematics
------------------------------
When a neutron scatters off of a nucleus, many times it is assumed that the
target nucleus is at rest. However, if the material is at a temperature greater
than 0 K, it will have motion associated with the thermal vibration. Thus, the
velocity of the neutrno relative to the target nucleus is in general not the
same as the velocity of the neutron entering the collision.
The affect of the thermal motion on the interaction probability can be written
as
.. math::
:label: freegas1
v_n \sigma (v_n, T) = \int_0^\infty d\mathbf{v}_T \sigma(v_r, 0)
\mathbf{v}_r p(\mathbf{v}_T)
One assumption we can make here is that the velocity distribution for the
thermal motion is isotropic, i.e.
.. math::
:label: freegas2
p(\mathbf{v}_T) d\mathbf{v}_T = \frac{1}{4\pi} p(v_T) dv_T d\mu d\phi
With this assumption, we can now rewrite equation :eq:`freegas1` as
.. math::
:label: freegas3
v_n \sigma (v_n, T) = \frac{1}{2} \int_{-1}^1 d\mu \int\limits_{v_r > 0}
v_r \sigma (v_r, 0) p(v_T) dv_T
To change the outer variable of integration from :math:`\mu` to :math:`v_r`, we
can establish a relation between these variables based on the law of cosines.
.. math::
:label: lawcosine
2 v_n v_T \mu = v_n^2 + v_T^2 - v_r^2
The probability distribution for the magnitude of the velocity of the target
nucleus and the angle between the neutron and target velocity is
.. math::
:label: freegas4
P(v_T, \mu) = \frac{\sigma (v_r, 0) v_r P(v_T)}{2 \sigma (v_n, T) v_n}
It is normally assumed that :math:`\sigma (v_r, 0)` is constant over the range
of relative velocities of interest. This is a good assumption for almost all
cases since the elastic scattering cross section varies slowly with velocity for
light nuclei, and for heavy nuclei where large variations can occur due to
resonance scattering, the moderating effect is rather small. Nonetheless, this
assumption can cause incorrect answers in systems with U-238 where the low-lying
resonances can cause a significant amount of upscatter that would be ignored by
this assumption.
With this (sometimes incorrect) assumption, we see that the probability
distribution is proportional to
.. math::
:label: freegas5
P(v_T, \mu) \propto v_r P(v_T) = | v_n - v_T | P(v_T)
We can divide this probability distribution into two parts as such:
.. math::
:label: freegas6
P(v_T, \mu) &= f_1(v_T, \mu) f_2(v_T) \\
f_1(v_T, \mu) &= \frac{| v_n - v_T |}{\hat{f_1} (v_n + v_T)} \\
f_2(v_T) &= (v_n + v_T) P(v_T)
In general, any probability distribution function of the form :math:`p(x) =
f_1(x) f_2(x)` with :math:`f_1(x)` bounded can be sampled by sampling
:math:`x_s` from the distribution
.. math:: \frac{f_2(x)}{\int f_2(x) dx}
and accepting it with probability
.. math:: \frac{f_1(x_s)}{\max f_1(x)}
It is normally assumed that the velocity distribution of the target nucleus
assumes a Maxwellian distribution in velocity.

View file

@ -64,14 +64,14 @@ number of cells, surfaces, and lattices. Let us look at the following example::
<!-- This is a comment -->
<surface>
<uid>1</uid>
<id>1</id>
<type>sphere</type>
<coeffs>0.0 0.0 0.0 5.0</coeffs>
<boundary>vacuum</boundary>
<surface>
<cell>
<uid>1</uid>
<id>1</id>
<universe>0</universe>
<material>1</material>
<surfaces>-1</surfaces>
@ -89,14 +89,17 @@ could be written as::
<geometry>
<!-- This is a comment -->
<surface uid="1" type="sphere" coeffs="0.0 0.0 0.0 5.0" boundary="vacuum" />
<cell uid="1" universe="0" material="1" surfaces="-1" />
<surface id="1" type="sphere" coeffs="0.0 0.0 0.0 5.0" boundary="vacuum" />
<cell id="1" universe="0" material="1" surfaces="-1" />
</geometry>
``surface`` Element
-------------------
Each ``surface`` element can have the following attributes or sub-elements:
:uid:
:id:
A unique integer that can be used to identify the surface.
*Default*: None
@ -118,75 +121,116 @@ Each ``surface`` element can have the following attributes or sub-elements:
*Default*: ``reflective``
The following quadratic surfaces can be modeled:
:x-plane:
A plane perpendicular to the x axis, i.e. a surface of the form :math:`x -
x_0 = 0`. The coefficients specified are ":math:`x_0`".
:y-plane:
A plane perpendicular to the y axis, i.e. a surface of the form :math:`y -
y_0 = 0`. The coefficients specified are ":math:`y_0`".
:z-plane:
A plane perpendicular to the z axis, i.e. a surface of the form :math:`z -
z_0 = 0`. The coefficients specified are ":math:`z_0`".
:plane:
An arbitrary plane of the form :math:`Ax + By + Cz = D`. The coefficients
specified are ":math:`A \: B \: C \: D`".
:x-cylinder:
An infinite cylinder whose length is paralle to the x-axis. This is a
quadratic surface of the form :math:`(y - y_0)^2 + (z - z_0)^2 = R^2`. The
coefficients specified are ":math:`y_0 \: z_0 \: R`".
:y-cylinder:
An infinite cylinder whose length is paralle to the y-axis. This is a
quadratic surface of the form :math:`(x - x_0)^2 + (z - z_0)^2 = R^2`. The
coefficients specified are ":math:`x_0 \: z_0 \: R`".
:z-cylinder:
An infinite cylinder whose length is paralle to the z-axis. This is a
quadratic surface of the form :math:`(x - x_0)^2 + (y - y_0)^2 = R^2`. The
coefficients specified are ":math:`x_0 \: y_0 \: R`".
:sphere:
A sphere of the form :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
R^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 \: R`".
``cell`` Element
----------------
Each ``cell`` element can have the following attributes or sub-elements:
:uid:
:id:
A unique integer that can be used to identify the surface.
*Default*: None
:universe:
The ``uid`` of the universe that this cell is contained in.
The ``id`` of the universe that this cell is contained in.
*Default*: 0
:fill:
The ``uid`` of the universe that fills this cell.
The ``id`` of the universe that fills this cell.
.. note:: If a fill is specified, no material should be given.
*Default*: None
:material:
The ``uid`` of the material that this cell contains.
The ``id`` of the material that this cell contains.
.. note:: If a material is specified, no fill should be given.
*Default*: None
:surfaces:
A list of the ``uids`` for surfaces that bound this cell, e.g. if the cell
A list of the ``ids`` for surfaces that bound this cell, e.g. if the cell
is on the negative side of surface 3 and the positive side of surface 5, the
bounding surfaces would be given as "-3 5".
*Default*: None
The following quadratic surfaces can be modeled:
``lattice`` Element
-------------------
:x-plane:
A plane perpendicular to the x axis, i.e. a surface of the form :math:`x - x_0
= 0`. The coefficients specified are ":math:`x_0`".
The ``lattice`` can be used to represent repeating structures (e.g. fuel pins in
an assembly) or other geometry which naturally fits into a two-dimensional
structured mesh. Each cell within the lattice is filled with a specified
universe. A ``lattice`` accepts the following attributes or sub-elements:
:y-plane:
A plane perpendicular to the y axis, i.e. a surface of the form :math:`y - y_0
= 0`. The coefficients specified are ":math:`y_0`".
:id:
A unique integer that can be used to identify the surface.
:z-plane:
A plane perpendicular to the z axis, i.e. a surface of the form :math:`z - z_0
= 0`. The coefficients specified are ":math:`z_0`".
:type:
A string indicating the arrangement of lattice cells. Accepted options are
"rectangular" and "hexagonal".
:plane:
An arbitrary plane of the form :math:`Ax + By + Cz = D`. The coefficients
specified are ":math:`A \: B \: C \: D`".
*Default*: rectangular
:x-cylinder:
An infinite cylinder whose length is paralle to the x-axis. This is a
quadratic surface of the form :math:`(y - y_0)^2 + (z - z_0)^2 = R^2`. The
coefficients specified are ":math:`y_0 \: z_0 \: R`".
:dimension:
Two integers representing the number of lattice cells in the x- and y-
directions, respectively.
:y-cylinder:
An infinite cylinder whose length is paralle to the y-axis. This is a
quadratic surface of the form :math:`(x - x_0)^2 + (z - z_0)^2 = R^2`. The
coefficients specified are ":math:`x_0 \: z_0 \: R`".
*Default*: None
:z-cylinder:
An infinite cylinder whose length is paralle to the z-axis. This is a
quadratic surface of the form :math:`(x - x_0)^2 + (y - y_0)^2 = R^2`. The
coefficients specified are ":math:`x_0 \: y_0 \: R`".
:origin:
The coordinates of the lower-left corner of the lattice.
:sphere:
A sphere of the form :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
R^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 \: R`".
*Default*: None
:width:
The width of the lattice cell in the x- and y- directions.
*Default*: None
:universes:
A list of the universe numbers that fill each cell of the lattice.
*Default*: None
.. _constructive solid geometry: http://en.wikipedia.org/wiki/Constructive_solid_geometry
@ -196,8 +240,14 @@ The following quadratic surfaces can be modeled:
Materials Specification -- materials.xml
----------------------------------------
``material`` Element
--------------------
Each ``material`` element can have the following attributes or sub-elements:
:id:
A unique integer that can be used to identify the material.
:density:
An element with attributes/sub-elements called ``value`` and ``units``. The
``value`` attribute is the numeric value of the density while the ``units``
@ -209,7 +259,6 @@ Each ``material`` element can have the following attributes or sub-elements:
*Default*: None
:nuclide:
An element with attributes/sub-elements called ``name``, ``xs``, and ``ao``
or ``wo``. The ``name`` attribute is the name of the cross-section for a
desired nuclide while the ``xs`` attribute is the cross-section
@ -225,25 +274,35 @@ Each ``material`` element can have the following attributes or sub-elements:
*Default*: None
:sab:
Associates an S(a,b) table with the material. This element has
attributes/sub-elements called ``name`` and ``xs``. The ``name`` attribute
is the name of the S(a,b) table that should be associated with the material,
and ``xs`` is the cross-section identifier for the table.
*Default*: None
``default_xs`` Element
----------------------
In some circumstances, the cross-section identifier may be the same for many or
all nuclides in a given problem. In this case, rather than specifying the
``xs=...`` attribute on every nuclide, a ``default_xs`` element can be used to
set the default cross-section identifier for any nuclide without an identifier
explicitly listed. This element has no attributes and accepts a 3-letter string
that indicates the default cross-section identifier, e.g. "70c".
*Default*: None
--------------------------------------
Settings Specification -- settings.xml
--------------------------------------
All simulation parameters and miscellaneous options are specified in the
settings.xml file. The following elements can be specified:
settings.xml file.
- ``xslibrary``
- ``criticality``
- ``verbosity``
- ``source``
The ``xslibrary`` element has the following attributes:
:path:
The absolute or relative path of the xsdata file which lists cross sections
to be used in the simulation.
*Default*: None
``criticality`` Element
-----------------------
The ``criticality`` element indicates that a criticality calculation should be
performed. It has the following attributes/sub-elements:
@ -266,14 +325,25 @@ performed. It has the following attributes/sub-elements:
*Default*: None
The ``verbosity`` element tells the code how much information to display to the
standard output. A higher verbosity corresponds to more information being
displayed. This element takes the following attributes:
``cross_sections`` Element
--------------------------
:value:
The specified verbosity between 1 and 10.
The ``cross_sections`` element has no attributes and simply indicates the path
to an XML cross section listing file (usually named cross_sections.xml). If this
element is absent from the settings.xml file, the environment variable
``CROSS_SECTIONS`` will be used to find the path to the XML cross section
listing.
*Default*: 5
``cutoff`` Element
------------------
The ``cutoff`` element has no attributes and indicates the weight cutoff used
below which particles undergo Russian roulette.
*Default*: 0.25
``source`` Element
------------------
The ``source`` element gives information on an initial source guess for
criticality calculations. It takes the following attributes:
@ -288,6 +358,27 @@ criticality calculations. It takes the following attributes:
and the last three of which specify the upper-right corner. Source sites are
sampled uniformly through that parallelepiped.
``survival_biasing`` Element
----------------------------
The ``survival_biasing`` element has no attributes and assumes wither the
value ``on`` or ``off``. If turned on, this option will enable the use of
survival biasing, otherwise known as implicit capture or absorption.
*Default*: off
``verbosity`` Element
---------------------
The ``verbosity`` element tells the code how much information to display to the
standard output. A higher verbosity corresponds to more information being
displayed. This element takes the following attributes:
:value:
The specified verbosity between 1 and 10.
*Default*: 5
------------------------------------
Tallies Specification -- tallies.xml
------------------------------------
@ -306,8 +397,12 @@ filters can be used for a tally. The following types of filter are available:
cell, universe, material, surface, birth region, pre-collision energy,
post-collision energy, and an arbitrary structured mesh.
The two valid elements in the tallies.xml file are ``tally`` and ``mesh``. The
``tally`` element accepts the following sub-elements:
The two valid elements in the tallies.xml file are ``tally`` and ``mesh``.
``tally`` Element
-----------------
The ``tally`` element accepts the following sub-elements:
:filters:
A list of filters to specify what region of phase space should contribute to
@ -387,6 +482,9 @@ The following responses can be tallied.
:nu-fission:
Total production of neutrons due to fission
``mesh`` Element
----------------
If a structured mesh is desired as a filter for a tally, it must be specified in
a separate element with the tag name ``mesh``. This element has the following
attributes/sub-elements:
@ -404,3 +502,47 @@ attributes/sub-elements:
:width:
The width of mesh cells in each direction.
-------------------------------------------
Geometry Plotting Specification -- plot.xml
-------------------------------------------
A rudimentary plotting capability is available in OpenMC by specifying a
plot.xml file and subsequently running with the command-line flag ``-plot``. The
root element of the plot.xml is simply ``<plot>`` and four sub-elements can be
defined to configure the plotting range and resolution.
``origin`` Element
------------------
The ``origin`` element has no attributes/sub-elements and indicates the
Cartesian coordinates of the center of the plot.
*Default*: None
``width`` Element
-----------------
The ``width`` element has no attributes/sub-elements and indicates the width of
the plot in each of the basis directions.
*Default*: None
``basis`` Element
-----------------
The ``basis`` element has no attributes/sub-elements and indicates the specified
basis for plotting.
.. note:: The only accepted option currently is "xy"
*Default*: xy
``pixel`` Element
-----------------
The ``pixel`` element has no attributes/sub-elements and indicates the distance
between horizontal rays sent through the geometry to record surface crossings. A
smaller ``pixel`` will result in a higher-resolution plot.
*Default*: 0.01

BIN
_static/ajax-loader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View file

@ -79,6 +79,14 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar input[type="text"] {
width: 170px;
}
div.sphinxsidebar input[type="submit"] {
width: 30px;
}
img {
border: 0;
}
@ -236,7 +244,6 @@ img.align-center, .figure.align-center, object.align-center {
}
.align-center {
clear: both;
text-align: center;
}
@ -440,6 +447,11 @@ dl.glossary dt {
font-style: oblique;
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
@ -525,4 +537,4 @@ span.eqno {
#top-link {
display: none;
}
}
}

BIN
_static/comment-bright.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
_static/comment-close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
_static/comment.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -2,7 +2,7 @@
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilties for all documentation.
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
@ -185,9 +185,9 @@ var Documentation = {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<li class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
.appendTo($('.sidebar .this-page-menu'));
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
@ -213,7 +213,7 @@ var Documentation = {
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},

BIN
_static/down-pressed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

BIN
_static/down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

View file

@ -1,6 +1,6 @@
/*
* searchtools.js
* ~~~~~~~~~~~~~~
* searchtools.js_t
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
*
@ -36,10 +36,11 @@ jQuery.makeSearchSummary = function(text, keywords, hlwords) {
return rv;
}
/**
* Porter Stemmer
*/
var PorterStemmer = function() {
var Stemmer = function() {
var step2list = {
ational: 'ate',
@ -300,20 +301,20 @@ var Search = {
},
query : function(query) {
var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
'if', 'for', 'no', 'there', 'their', 'was', 'is',
'be', 'to', 'that', 'but', 'they', 'not', 'such',
'with', 'by', 'a', 'on', 'these', 'of', 'will',
'this', 'near', 'the', 'or', 'at'];
var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
// stem the searchterms and add them to the correct list
var stemmer = new PorterStemmer();
// Stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
var objectterms = [];
for (var i = 0; i < tmp.length; i++) {
if (tmp[i] != "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] == "") {
// skip this "word"
@ -344,9 +345,6 @@ var Search = {
var filenames = this._index.filenames;
var titles = this._index.titles;
var terms = this._index.terms;
var objects = this._index.objects;
var objtypes = this._index.objtypes;
var objnames = this._index.objnames;
var fileMap = {};
var files = null;
// different result priorities
@ -357,40 +355,19 @@ var Search = {
$('#search-progress').empty();
// lookup as object
if (object != null) {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
match = objects[prefix][name];
descr = objnames[match[1]] + _(', in ') + titles[match[0]];
// XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
}
}
}
for (var i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0,i),
objectterms.slice(i+1, objectterms.length))
var results = this.performObjectSearch(objectterms[i], others);
// Assume first word is most likely to be the object,
// other words more likely to be in description.
// Therefore put matches for earlier words first.
// (Results are eventually used in reverse order).
objectResults = results[0].concat(objectResults);
importantResults = results[1].concat(importantResults);
unimportantResults = results[2].concat(unimportantResults);
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
// perform the search on the required terms
for (var i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
@ -489,7 +466,7 @@ var Search = {
listItem.slideDown(5, function() {
displayNextItem();
});
});
}, "text");
} else {
// no source available, just display title
Search.output.append(listItem);
@ -510,9 +487,74 @@ var Search = {
}
}
displayNextItem();
},
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
var importantResults = [];
var objectResults = [];
var unimportantResults = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase();
var allfound = true;
for (var i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
anchor = match[3];
if (anchor == '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
result = [filenames[match[0]], fullname, '#'+anchor, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
}
}
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
return [importantResults, objectResults, unimportantResults]
}
}
$(document).ready(function() {
Search.init();
});
});

View file

@ -1,3 +1,10 @@
// Underscore.js 0.5.5
// (c) 2009 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the terms of the MIT license.
// Portions of Underscore are inspired by or borrowed from Prototype.js,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore/
(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!=="undefined"?StopIteration:"__break__",b=j._=function(a){return new i(a)};if(typeof exports!=="undefined")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION="0.5.5";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,
a[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);
var f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,

BIN
_static/up-pressed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
_static/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

808
_static/websupport.js Normal file
View file

@ -0,0 +1,808 @@
/*
* websupport.js
* ~~~~~~~~~~~~~
*
* sphinx.websupport utilties for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
(function($) {
$.fn.autogrow = function() {
return this.each(function() {
var textarea = this;
$.fn.autogrow.resize(textarea);
$(textarea)
.focus(function() {
textarea.interval = setInterval(function() {
$.fn.autogrow.resize(textarea);
}, 500);
})
.blur(function() {
clearInterval(textarea.interval);
});
});
};
$.fn.autogrow.resize = function(textarea) {
var lineHeight = parseInt($(textarea).css('line-height'), 10);
var lines = textarea.value.split('\n');
var columns = textarea.cols;
var lineCount = 0;
$.each(lines, function() {
lineCount += Math.ceil(this.length / columns) || 1;
});
var height = lineHeight * (lineCount + 1);
$(textarea).css('height', height);
};
})(jQuery);
(function($) {
var comp, by;
function init() {
initEvents();
initComparator();
}
function initEvents() {
$('a.comment-close').live("click", function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
$('a.vote').live("click", function(event) {
event.preventDefault();
handleVote($(this));
});
$('a.reply').live("click", function(event) {
event.preventDefault();
openReply($(this).attr('id').substring(2));
});
$('a.close-reply').live("click", function(event) {
event.preventDefault();
closeReply($(this).attr('id').substring(2));
});
$('a.sort-option').live("click", function(event) {
event.preventDefault();
handleReSort($(this));
});
$('a.show-proposal').live("click", function(event) {
event.preventDefault();
showProposal($(this).attr('id').substring(2));
});
$('a.hide-proposal').live("click", function(event) {
event.preventDefault();
hideProposal($(this).attr('id').substring(2));
});
$('a.show-propose-change').live("click", function(event) {
event.preventDefault();
showProposeChange($(this).attr('id').substring(2));
});
$('a.hide-propose-change').live("click", function(event) {
event.preventDefault();
hideProposeChange($(this).attr('id').substring(2));
});
$('a.accept-comment').live("click", function(event) {
event.preventDefault();
acceptComment($(this).attr('id').substring(2));
});
$('a.delete-comment').live("click", function(event) {
event.preventDefault();
deleteComment($(this).attr('id').substring(2));
});
$('a.comment-markup').live("click", function(event) {
event.preventDefault();
toggleCommentMarkupBox($(this).attr('id').substring(2));
});
}
/**
* Set comp, which is a comparator function used for sorting and
* inserting comments into the list.
*/
function setComparator() {
// If the first three letters are "asc", sort in ascending order
// and remove the prefix.
if (by.substring(0,3) == 'asc') {
var i = by.substring(3);
comp = function(a, b) { return a[i] - b[i]; };
} else {
// Otherwise sort in descending order.
comp = function(a, b) { return b[by] - a[by]; };
}
// Reset link styles and format the selected sort option.
$('a.sel').attr('href', '#').removeClass('sel');
$('a.by' + by).removeAttr('href').addClass('sel');
}
/**
* Create a comp function. If the user has preferences stored in
* the sortBy cookie, use those, otherwise use the default.
*/
function initComparator() {
by = 'rating'; // Default to sort by rating.
// If the sortBy cookie is set, use that instead.
if (document.cookie.length > 0) {
var start = document.cookie.indexOf('sortBy=');
if (start != -1) {
start = start + 7;
var end = document.cookie.indexOf(";", start);
if (end == -1) {
end = document.cookie.length;
by = unescape(document.cookie.substring(start, end));
}
}
}
setComparator();
}
/**
* Show a comment div.
*/
function show(id) {
$('#ao' + id).hide();
$('#ah' + id).show();
var context = $.extend({id: id}, opts);
var popup = $(renderTemplate(popupTemplate, context)).hide();
popup.find('textarea[name="proposal"]').hide();
popup.find('a.by' + by).addClass('sel');
var form = popup.find('#cf' + id);
form.submit(function(event) {
event.preventDefault();
addComment(form);
});
$('#s' + id).after(popup);
popup.slideDown('fast', function() {
getComments(id);
});
}
/**
* Hide a comment div.
*/
function hide(id) {
$('#ah' + id).hide();
$('#ao' + id).show();
var div = $('#sc' + id);
div.slideUp('fast', function() {
div.remove();
});
}
/**
* Perform an ajax request to get comments for a node
* and insert the comments into the comments tree.
*/
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
success: function(data, textStatus, request) {
var ul = $('#cl' + id);
var speed = 100;
$('#cf' + id)
.find('textarea[name="proposal"]')
.data('source', data.source);
if (data.comments.length === 0) {
ul.html('<li>No comments yet.</li>');
ul.data('empty', true);
} else {
// If there are comments, sort them and put them in the list.
var comments = sortComments(data.comments);
speed = data.comments.length * 100;
appendComments(comments, ul);
ul.data('empty', false);
}
$('#cn' + id).slideUp(speed + 200);
ul.slideDown(speed);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem retrieving the comments.');
},
dataType: 'json'
});
}
/**
* Add a comment via ajax and insert the comment into the comment tree.
*/
function addComment(form) {
var node_id = form.find('input[name="node"]').val();
var parent_id = form.find('input[name="parent"]').val();
var text = form.find('textarea[name="comment"]').val();
var proposal = form.find('textarea[name="proposal"]').val();
if (text == '') {
showError('Please enter a comment.');
return;
}
// Disable the form that is being submitted.
form.find('textarea,input').attr('disabled', 'disabled');
// Send the comment to the server.
$.ajax({
type: "POST",
url: opts.addCommentURL,
dataType: 'json',
data: {
node: node_id,
parent: parent_id,
text: text,
proposal: proposal
},
success: function(data, textStatus, error) {
// Reset the form.
if (node_id) {
hideProposeChange(node_id);
}
form.find('textarea')
.val('')
.add(form.find('input'))
.removeAttr('disabled');
var ul = $('#cl' + (node_id || parent_id));
if (ul.data('empty')) {
$(ul).empty();
ul.data('empty', false);
}
insertComment(data.comment);
var ao = $('#ao' + node_id);
ao.find('img').attr({'src': opts.commentBrightImage});
if (node_id) {
// if this was a "root" comment, remove the commenting box
// (the user can get it back by reopening the comment popup)
$('#ca' + node_id).slideUp();
}
},
error: function(request, textStatus, error) {
form.find('textarea,input').removeAttr('disabled');
showError('Oops, there was a problem adding the comment.');
}
});
}
/**
* Recursively append comments to the main comment list and children
* lists, creating the comment tree.
*/
function appendComments(comments, ul) {
$.each(comments, function() {
var div = createCommentDiv(this);
ul.append($(document.createElement('li')).html(div));
appendComments(this.children, div.find('ul.comment-children'));
// To avoid stagnating data, don't store the comments children in data.
this.children = null;
div.data('comment', this);
});
}
/**
* After adding a new comment, it must be inserted in the correct
* location in the comment tree.
*/
function insertComment(comment) {
var div = createCommentDiv(comment);
// To avoid stagnating data, don't store the comments children in data.
comment.children = null;
div.data('comment', comment);
var ul = $('#cl' + (comment.node || comment.parent));
var siblings = getChildren(ul);
var li = $(document.createElement('li'));
li.hide();
// Determine where in the parents children list to insert this comment.
for(i=0; i < siblings.length; i++) {
if (comp(comment, siblings[i]) <= 0) {
$('#cd' + siblings[i].id)
.parent()
.before(li.html(div));
li.slideDown('fast');
return;
}
}
// If we get here, this comment rates lower than all the others,
// or it is the only comment in the list.
ul.append(li.html(div));
li.slideDown('fast');
}
function acceptComment(id) {
$.ajax({
type: 'POST',
url: opts.acceptCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
$('#cm' + id).fadeOut('fast');
$('#cd' + id).removeClass('moderate');
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem accepting the comment.');
}
});
}
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
success: function(data, textStatus, request) {
var div = $('#cd' + id);
if (data == 'delete') {
// Moderator mode: remove the comment and all children immediately
div.slideUp('fast', function() {
div.remove();
});
return;
}
// User mode: only mark the comment as deleted
div
.find('span.user-id:first')
.text('[deleted]').end()
.find('div.comment-text:first')
.text('[deleted]').end()
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
.remove();
var comment = div.data('comment');
comment.username = '[deleted]';
comment.text = '[deleted]';
div.data('comment', comment);
},
error: function(request, textStatus, error) {
showError('Oops, there was a problem deleting the comment.');
}
});
}
function showProposal(id) {
$('#sp' + id).hide();
$('#hp' + id).show();
$('#pr' + id).slideDown('fast');
}
function hideProposal(id) {
$('#hp' + id).hide();
$('#sp' + id).show();
$('#pr' + id).slideUp('fast');
}
function showProposeChange(id) {
$('#pc' + id).hide();
$('#hc' + id).show();
var textarea = $('#pt' + id);
textarea.val(textarea.data('source'));
$.fn.autogrow.resize(textarea[0]);
textarea.slideDown('fast');
}
function hideProposeChange(id) {
$('#hc' + id).hide();
$('#pc' + id).show();
var textarea = $('#pt' + id);
textarea.val('').removeAttr('disabled');
textarea.slideUp('fast');
}
function toggleCommentMarkupBox(id) {
$('#mb' + id).toggle();
}
/** Handle when the user clicks on a sort by link. */
function handleReSort(link) {
var classes = link.attr('class').split(/\s+/);
for (var i=0; i<classes.length; i++) {
if (classes[i] != 'sort-option') {
by = classes[i].substring(2);
}
}
setComparator();
// Save/update the sortBy cookie.
var expiration = new Date();
expiration.setDate(expiration.getDate() + 365);
document.cookie= 'sortBy=' + escape(by) +
';expires=' + expiration.toUTCString();
$('ul.comment-ul').each(function(index, ul) {
var comments = getChildren($(ul), true);
comments = sortComments(comments);
appendComments(comments, $(ul).empty());
});
}
/**
* Function to process a vote when a user clicks an arrow.
*/
function handleVote(link) {
if (!opts.voting) {
showError("You'll need to login to vote.");
return;
}
var id = link.attr('id');
if (!id) {
// Didn't click on one of the voting arrows.
return;
}
// If it is an unvote, the new vote value is 0,
// Otherwise it's 1 for an upvote, or -1 for a downvote.
var value = 0;
if (id.charAt(1) != 'u') {
value = id.charAt(0) == 'u' ? 1 : -1;
}
// The data to be sent to the server.
var d = {
comment_id: id.substring(2),
value: value
};
// Swap the vote and unvote links.
link.hide();
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
.show();
// The div the comment is displayed in.
var div = $('div#cd' + d.comment_id);
var data = div.data('comment');
// If this is not an unvote, and the other vote arrow has
// already been pressed, unpress it.
if ((d.value !== 0) && (data.vote === d.value * -1)) {
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
}
// Update the comments rating in the local data.
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
data.vote = d.value;
div.data('comment', data);
// Change the rating text.
div.find('.rating:first')
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
// Send the vote information to the server.
$.ajax({
type: "POST",
url: opts.processVoteURL,
data: d,
error: function(request, textStatus, error) {
showError('Oops, there was a problem casting that vote.');
}
});
}
/**
* Open a reply form used to reply to an existing comment.
*/
function openReply(id) {
// Swap out the reply link for the hide link
$('#rl' + id).hide();
$('#cr' + id).show();
// Add the reply li to the children ul.
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
$('#cl' + id)
.prepend(div)
// Setup the submit handler for the reply form.
.find('#rf' + id)
.submit(function(event) {
event.preventDefault();
addComment($('#rf' + id));
closeReply(id);
})
.find('input[type=button]')
.click(function() {
closeReply(id);
});
div.slideDown('fast', function() {
$('#rf' + id).find('textarea').focus();
});
}
/**
* Close the reply form opened with openReply.
*/
function closeReply(id) {
// Remove the reply div from the DOM.
$('#rd' + id).slideUp('fast', function() {
$(this).remove();
});
// Swap out the hide link for the reply link
$('#cr' + id).hide();
$('#rl' + id).show();
}
/**
* Recursively sort a tree of comments using the comp comparator.
*/
function sortComments(comments) {
comments.sort(comp);
$.each(comments, function() {
this.children = sortComments(this.children);
});
return comments;
}
/**
* Get the children comments from a ul. If recursive is true,
* recursively include childrens' children.
*/
function getChildren(ul, recursive) {
var children = [];
ul.children().children("[id^='cd']")
.each(function() {
var comment = $(this).data('comment');
if (recursive)
comment.children = getChildren($(this).find('#cl' + comment.id), true);
children.push(comment);
});
return children;
}
/** Create a div to display a comment in. */
function createCommentDiv(comment) {
if (!comment.displayed && !opts.moderator) {
return $('<div class="moderate">Thank you! Your comment will show up '
+ 'once it is has been approved by a moderator.</div>');
}
// Prettify the comment rating.
comment.pretty_rating = comment.rating + ' point' +
(comment.rating == 1 ? '' : 's');
// Make a class (for displaying not yet moderated comments differently)
comment.css_class = comment.displayed ? '' : ' moderate';
// Create a div for this comment.
var context = $.extend({}, opts, comment);
var div = $(renderTemplate(commentTemplate, context));
// If the user has voted on this comment, highlight the correct arrow.
if (comment.vote) {
var direction = (comment.vote == 1) ? 'u' : 'd';
div.find('#' + direction + 'v' + comment.id).hide();
div.find('#' + direction + 'u' + comment.id).show();
}
if (opts.moderator || comment.text != '[deleted]') {
div.find('a.reply').show();
if (comment.proposal_diff)
div.find('#sp' + comment.id).show();
if (opts.moderator && !comment.displayed)
div.find('#cm' + comment.id).show();
if (opts.moderator || (opts.username == comment.username))
div.find('#dc' + comment.id).show();
}
return div;
}
/**
* A simple template renderer. Placeholders such as <%id%> are replaced
* by context['id'] with items being escaped. Placeholders such as <#id#>
* are not escaped.
*/
function renderTemplate(template, context) {
var esc = $(document.createElement('div'));
function handle(ph, escape) {
var cur = context;
$.each(ph.split('.'), function() {
cur = cur[this];
});
return escape ? esc.text(cur || "").html() : cur;
}
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
return handle(arguments[2], arguments[1] == '%' ? true : false);
});
}
/** Flash an error message briefly. */
function showError(message) {
$(document.createElement('div')).attr({'class': 'popup-error'})
.append($(document.createElement('div'))
.attr({'class': 'error-message'}).text(message))
.appendTo('body')
.fadeIn("slow")
.delay(2000)
.fadeOut("slow");
}
/** Add a link the user uses to open the comments popup. */
$.fn.comment = function() {
return this.each(function() {
var id = $(this).attr('id').substring(1);
var count = COMMENT_METADATA[id];
var title = count + ' comment' + (count == 1 ? '' : 's');
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
var addcls = count == 0 ? ' nocomment' : '';
$(this)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-open' + addcls,
id: 'ao' + id
})
.append($(document.createElement('img')).attr({
src: image,
alt: 'comment',
title: title
}))
.click(function(event) {
event.preventDefault();
show($(this).attr('id').substring(2));
})
)
.append(
$(document.createElement('a')).attr({
href: '#',
'class': 'sphinx-comment-close hidden',
id: 'ah' + id
})
.append($(document.createElement('img')).attr({
src: opts.closeCommentImage,
alt: 'close',
title: 'close'
}))
.click(function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
})
);
});
};
var opts = {
processVoteURL: '/_process_vote',
addCommentURL: '/_add_comment',
getCommentsURL: '/_get_comments',
acceptCommentURL: '/_accept_comment',
deleteCommentURL: '/_delete_comment',
commentImage: '/static/_static/comment.png',
closeCommentImage: '/static/_static/comment-close.png',
loadingImage: '/static/_static/ajax-loader.gif',
commentBrightImage: '/static/_static/comment-bright.png',
upArrow: '/static/_static/up.png',
downArrow: '/static/_static/down.png',
upArrowPressed: '/static/_static/up-pressed.png',
downArrowPressed: '/static/_static/down-pressed.png',
voting: false,
moderator: false
};
if (typeof COMMENT_OPTIONS != "undefined") {
opts = jQuery.extend(opts, COMMENT_OPTIONS);
}
var popupTemplate = '\
<div class="sphinx-comments" id="sc<%id%>">\
<p class="sort-options">\
Sort by:\
<a href="#" class="sort-option byrating">best rated</a>\
<a href="#" class="sort-option byascage">newest</a>\
<a href="#" class="sort-option byage">oldest</a>\
</p>\
<div class="comment-header">Comments</div>\
<div class="comment-loading" id="cn<%id%>">\
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
<ul id="cl<%id%>" class="comment-ul"></ul>\
<div id="ca<%id%>">\
<p class="add-a-comment">Add a comment\
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
<div class="comment-markup-box" id="mb<%id%>">\
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
<tt>``code``</tt>, \
code blocks: <tt>::</tt> and an indented block after blank line</div>\
<form method="post" id="cf<%id%>" class="comment-form" action="">\
<textarea name="comment" cols="80"></textarea>\
<p class="propose-button">\
<a href="#" id="pc<%id%>" class="show-propose-change">\
Propose a change &#9657;\
</a>\
<a href="#" id="hc<%id%>" class="hide-propose-change">\
Propose a change &#9663;\
</a>\
</p>\
<textarea name="proposal" id="pt<%id%>" cols="80"\
spellcheck="false"></textarea>\
<input type="submit" value="Add comment" />\
<input type="hidden" name="node" value="<%id%>" />\
<input type="hidden" name="parent" value="" />\
</form>\
</div>\
</div>';
var commentTemplate = '\
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
<div class="vote">\
<div class="arrow">\
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
<img src="<%upArrow%>" />\
</a>\
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
<img src="<%upArrowPressed%>" />\
</a>\
</div>\
<div class="arrow">\
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
<img src="<%downArrow%>" id="da<%id%>" />\
</a>\
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
<img src="<%downArrowPressed%>" />\
</a>\
</div>\
</div>\
<div class="comment-content">\
<p class="tagline comment">\
<span class="user-id"><%username%></span>\
<span class="rating"><%pretty_rating%></span>\
<span class="delta"><%time.delta%></span>\
</p>\
<div class="comment-text comment"><#text#></div>\
<p class="comment-opts comment">\
<a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
<a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
<a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
<a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
<span id="cm<%id%>" class="moderation hidden">\
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
</span>\
</p>\
<pre class="proposal" id="pr<%id%>">\
<#proposal_diff#>\
</pre>\
<ul class="comment-children" id="cl<%id%>"></ul>\
</div>\
<div class="clearleft"></div>\
</div>\
</div>';
var replyTemplate = '\
<li>\
<div class="reply-div" id="rd<%id%>">\
<form id="rf<%id%>">\
<textarea name="comment" cols="80"></textarea>\
<input type="submit" value="Add reply" />\
<input type="button" value="Cancel" />\
<input type="hidden" name="parent" value="<%id%>" />\
<input type="hidden" name="node" value="" />\
</form>\
</div>\
</li>';
$(document).ready(function() {
init();
});
})(jQuery);
$(document).ready(function() {
// add comment anchors for all paragraphs that are commentable
$('.sphinx-has-comment').comment();
// highlight search words in search results
$("div.context").each(function() {
var params = $.getQueryParameters();
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
var result = $(this);
$.each(terms, function() {
result.highlightText(this.toLowerCase(), 'highlighted');
});
});
// directly open comment window if requested
var anchor = document.location.hash;
if (anchor.substring(0, 9) == '#comment-') {
$('#ao' + anchor.substring(9)).click();
document.location.hash = '#s' + anchor.substring(9);
}
});

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Development Team &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
@ -73,7 +76,7 @@
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -1,16 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
@ -43,11 +48,11 @@
<h1 id="index">Index</h1>
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
</div>
<div class="genindex-jumpbox">
</div>
</div>
@ -61,7 +66,7 @@
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The OpenMC Monte Carlo Code &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
@ -82,7 +85,7 @@ within the <a class="reference external" href="http://crpg.mit.edu">Computationa
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
@ -140,7 +143,7 @@ make</pre>
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Methodology &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
@ -61,12 +64,68 @@ surface of the above form, it can be shown that the velocity vector will then
become</p>
<div class="math">
<p><img src="../_images/math/ec1573ce905ac3e6758c191cd5c52441ed093cf8.png" alt="\mathbf{v'} = \mathbf{v} - 2 (\mathbf{v} \cdot \hat{\mathbf{n}})
\hat{\mathbf{n}}" /></p>
\hat{\mathbf{n}}"/></p>
</div><p>where <img class="math" src="../_images/math/c784dcc2598753df9d694c4439b2320311b94dca.png" alt="\hat{\mathbf{n}}"/> is a unit vector normal to the surface at the
point of the surface crossing. The direction of the surface normal will be the
gradient to the surface at the point of crossing, i.e. <img class="math" src="../_images/math/c4301d4bf1894216758b926b70a378c73b059d9a.png" alt="\mathbf{n} =
\nabla f(x,y,z)"/>.</p>
</div>
<div class="section" id="free-gas-scattering-kinematics">
<h2>Free Gas Scattering Kinematics<a class="headerlink" href="#free-gas-scattering-kinematics" title="Permalink to this headline"></a></h2>
<p>When a neutron scatters off of a nucleus, many times it is assumed that the
target nucleus is at rest. However, if the material is at a temperature greater
than 0 K, it will have motion associated with the thermal vibration. Thus, the
velocity of the neutrno relative to the target nucleus is in general not the
same as the velocity of the neutron entering the collision.</p>
<p>The affect of the thermal motion on the interaction probability can be written
as</p>
<div class="math" id="equation-freegas1">
<p><span class="eqno">(1)</span><img src="../_images/math/db25952de85aad3ab2e5021f9bef21af86c4412b.png" alt="v_n \sigma (v_n, T) = \int_0^\infty d\mathbf{v}_T \sigma(v_r, 0)
\mathbf{v}_r p(\mathbf{v}_T)"/></p>
</div><p>One assumption we can make here is that the velocity distribution for the
thermal motion is isotropic, i.e.</p>
<div class="math" id="equation-freegas2">
<p><span class="eqno">(2)</span><img src="../_images/math/24b2a39a312faab1a8bdb1f47c259f55fa7ce423.png" alt="p(\mathbf{v}_T) d\mathbf{v}_T = \frac{1}{4\pi} p(v_T) dv_T d\mu d\phi"/></p>
</div><p>With this assumption, we can now rewrite equation <a href="#equation-freegas1">(1)</a> as</p>
<div class="math" id="equation-freegas3">
<p><span class="eqno">(3)</span><img src="../_images/math/8b08005bd89e764367f2bc021edb8a49adb05939.png" alt="v_n \sigma (v_n, T) = \frac{1}{2} \int_{-1}^1 d\mu \int\limits_{v_r &gt; 0}
v_r \sigma (v_r, 0) p(v_T) dv_T"/></p>
</div><p>To change the outer variable of integration from <img class="math" src="../_images/math/2d8c833ed800824727cd7bd2fb9de1a12ad7e674.png" alt="\mu"/> to <img class="math" src="../_images/math/d7894ae3288ad5bc502fe262d7a4da6475d65284.png" alt="v_r"/>, we
can establish a relation between these variables based on the law of cosines.</p>
<div class="math" id="equation-lawcosine">
<p><span class="eqno">(4)</span><img src="../_images/math/22894185a4626c5744e7def1ebf1a8cce3b4b75b.png" alt="2 v_n v_T \mu = v_n^2 + v_T^2 - v_r^2"/></p>
</div><p>The probability distribution for the magnitude of the velocity of the target
nucleus and the angle between the neutron and target velocity is</p>
<div class="math" id="equation-freegas4">
<p><span class="eqno">(5)</span><img src="../_images/math/14c6609efaa364753fa5a4e4107b712efc452d4f.png" alt="P(v_T, \mu) = \frac{\sigma (v_r, 0) v_r P(v_T)}{2 \sigma (v_n, T) v_n}"/></p>
</div><p>It is normally assumed that <img class="math" src="../_images/math/721e7751ac40592f56d87682fdfbeb87c369d639.png" alt="\sigma (v_r, 0)"/> is constant over the range
of relative velocities of interest. This is a good assumption for almost all
cases since the elastic scattering cross section varies slowly with velocity for
light nuclei, and for heavy nuclei where large variations can occur due to
resonance scattering, the moderating effect is rather small. Nonetheless, this
assumption can cause incorrect answers in systems with U-238 where the low-lying
resonances can cause a significant amount of upscatter that would be ignored by
this assumption.</p>
<p>With this (sometimes incorrect) assumption, we see that the probability
distribution is proportional to</p>
<div class="math" id="equation-freegas5">
<p><span class="eqno">(6)</span><img src="../_images/math/5789c1d317eacdee5178a4952472f30929d8712d.png" alt="P(v_T, \mu) \propto v_r P(v_T) = | v_n - v_T | P(v_T)"/></p>
</div><p>We can divide this probability distribution into two parts as such:</p>
<div class="math" id="equation-freegas6">
<p><span class="eqno">(7)</span><img src="../_images/math/e65fa53d0a31b171a144bb7486bd94fb2451165e.png" alt="P(v_T, \mu) &amp;= f_1(v_T, \mu) f_2(v_T) \\
f_1(v_T, \mu) &amp;= \frac{| v_n - v_T |}{\hat{f_1} (v_n + v_T)} \\
f_2(v_T) &amp;= (v_n + v_T) P(v_T)"/></p>
</div><p>In general, any probability distribution function of the form <img class="math" src="../_images/math/18b2137a12545c12040053d62af1f6a009747f7b.png" alt="p(x) =
f_1(x) f_2(x)"/> with <img class="math" src="../_images/math/81060fd5c50bb0771dc33e40b10a02530402154a.png" alt="f_1(x)"/> bounded can be sampled by sampling
<img class="math" src="../_images/math/548e5a87f82147560af3911d5fa37e1102c698ca.png" alt="x_s"/> from the distribution</p>
<div class="math">
<p><img src="../_images/math/85c312cfda33ddfaf27195ac27959dfdd00b170c.png" alt="\frac{f_2(x)}{\int f_2(x) dx}"/></p>
</div><p>and accepting it with probability</p>
<div class="math">
<p><img src="../_images/math/b28a4c74d4d8125ccf305eae582fd770bfa0dbd6.png" alt="\frac{f_1(x_s)}{\max f_1(x)}"/></p>
</div><p>It is normally assumed that the velocity distribution of the target nucleus
assumes a Maxwellian distribution in velocity.</p>
</div>
</div>
@ -85,7 +144,7 @@ gradient to the surface at the point of crossing, i.e. <img class="math" src="..
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
@ -83,7 +86,7 @@
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Users Guide &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
@ -60,6 +63,7 @@ essential aspects of using OpenMC to perform neutronic simulations.</p>
<li class="toctree-l2"><a class="reference internal" href="input.html#materials-specification-materials-xml">Materials Specification &#8211; materials.xml</a></li>
<li class="toctree-l2"><a class="reference internal" href="input.html#settings-specification-settings-xml">Settings Specification &#8211; settings.xml</a></li>
<li class="toctree-l2"><a class="reference internal" href="input.html#tallies-specification-tallies-xml">Tallies Specification &#8211; tallies.xml</a></li>
<li class="toctree-l2"><a class="reference internal" href="input.html#geometry-plotting-specification-plot-xml">Geometry Plotting Specification &#8211; plot.xml</a></li>
</ul>
</li>
</ul>
@ -82,7 +86,7 @@ essential aspects of using OpenMC to perform neutronic simulations.</p>
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>

View file

@ -3,14 +3,17 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Creating XML Input Files &mdash; OpenMC Documentation</title>
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/print.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
@ -100,14 +103,14 @@ number of cells, surfaces, and lattices. Let us look at the following example:</
&lt;!-- This is a comment --&gt;
&lt;surface&gt;
&lt;uid&gt;1&lt;/uid&gt;
&lt;id&gt;1&lt;/id&gt;
&lt;type&gt;sphere&lt;/type&gt;
&lt;coeffs&gt;0.0 0.0 0.0 5.0&lt;/coeffs&gt;
&lt;boundary&gt;vacuum&lt;/boundary&gt;
&lt;surface&gt;
&lt;cell&gt;
&lt;uid&gt;1&lt;/uid&gt;
&lt;id&gt;1&lt;/id&gt;
&lt;universe&gt;0&lt;/universe&gt;
&lt;material&gt;1&lt;/material&gt;
&lt;surfaces&gt;-1&lt;/surfaces&gt;
@ -124,53 +127,94 @@ could be written as:</p>
&lt;geometry&gt;
&lt;!-- This is a comment --&gt;
&lt;surface uid="1" type="sphere" coeffs="0.0 0.0 0.0 5.0" boundary="vacuum" /&gt;
&lt;cell uid="1" universe="0" material="1" surfaces="-1" /&gt;
&lt;surface id="1" type="sphere" coeffs="0.0 0.0 0.0 5.0" boundary="vacuum" /&gt;
&lt;cell id="1" universe="0" material="1" surfaces="-1" /&gt;
&lt;/geometry&gt;</pre>
</div>
<div class="section" id="surface-element">
<h3><tt class="docutils literal"><span class="pre">surface</span></tt> Element<a class="headerlink" href="#surface-element" title="Permalink to this headline"></a></h3>
<p>Each <tt class="docutils literal"><span class="pre">surface</span></tt> element can have the following attributes or sub-elements:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">uid:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the surface.</p>
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the surface.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">type:</th><td class="field-body"><p class="first">The type of the surfaces. This can be <tt class="docutils literal"><span class="pre">x-plane</span></tt>, <tt class="docutils literal"><span class="pre">y-plane</span></tt>, <tt class="docutils literal"><span class="pre">z-plane</span></tt>,
<tr class="field-even field"><th class="field-name">type:</th><td class="field-body"><p class="first">The type of the surfaces. This can be <tt class="docutils literal"><span class="pre">x-plane</span></tt>, <tt class="docutils literal"><span class="pre">y-plane</span></tt>, <tt class="docutils literal"><span class="pre">z-plane</span></tt>,
<tt class="docutils literal"><span class="pre">plane</span></tt>, <tt class="docutils literal"><span class="pre">x-cylinder</span></tt>, <tt class="docutils literal"><span class="pre">y-cylinder</span></tt>, <tt class="docutils literal"><span class="pre">z-cylinder</span></tt>, or <tt class="docutils literal"><span class="pre">sphere</span></tt>.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">coeffs:</th><td class="field-body"><p class="first">The corresponding coefficients for the given type of surface. See below for
<tr class="field-odd field"><th class="field-name">coeffs:</th><td class="field-body"><p class="first">The corresponding coefficients for the given type of surface. See below for
a list a what coefficients to specify for a given surface</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">boundary:</th><td class="field-body"><p class="first">The boundary condition for the surface. This can be <tt class="docutils literal"><span class="pre">vacuum</span></tt> or <tt class="docutils literal"><span class="pre">reflective</span></tt>.</p>
<tr class="field-even field"><th class="field-name">boundary:</th><td class="field-body"><p class="first">The boundary condition for the surface. This can be <tt class="docutils literal"><span class="pre">vacuum</span></tt> or <tt class="docutils literal"><span class="pre">reflective</span></tt>.</p>
<p class="last"><em>Default</em>: <tt class="docutils literal"><span class="pre">reflective</span></tt></p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>The following quadratic surfaces can be modeled:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">x-plane:</th><td class="field-body">A plane perpendicular to the x axis, i.e. a surface of the form <img class="math" src="../_images/math/0dab540990e85667cd0415d1805d6e3f65be986a.png" alt="x -
x_0 = 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/17f1249ad95b7682b8316ad21de8ce4ee9fdcf93.png" alt="x_0"/>&#8221;.</td>
</tr>
<tr class="field-even field"><th class="field-name">y-plane:</th><td class="field-body">A plane perpendicular to the y axis, i.e. a surface of the form <img class="math" src="../_images/math/8e5eed2beee65ae37c7422830ed72d18e4571fab.png" alt="y -
y_0 = 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/721e40b7e0ac4359611aebe48cfb63122a347798.png" alt="y_0"/>&#8221;.</td>
</tr>
<tr class="field-odd field"><th class="field-name">z-plane:</th><td class="field-body">A plane perpendicular to the z axis, i.e. a surface of the form <img class="math" src="../_images/math/cec8bbf54e84fba9217aeacb3d5e38d415a4ac7c.png" alt="z -
z_0 = 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/bab9abe98679312d2a3308c76188cf2cbc492f68.png" alt="z_0"/>&#8221;.</td>
</tr>
<tr class="field-even field"><th class="field-name">plane:</th><td class="field-body">An arbitrary plane of the form <img class="math" src="../_images/math/eb8661ea00d3e9e10ef23de03755960eec4b554f.png" alt="Ax + By + Cz = D"/>. The coefficients
specified are &#8220;<img class="math" src="../_images/math/5d687cb5bc98aa30d5460e4d0f34feaa8ec52008.png" alt="A \: B \: C \: D"/>&#8221;.</td>
</tr>
<tr class="field-odd field"><th class="field-name">x-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the x-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/c70e001674ec3ce487852ca76aab6d872c634cbf.png" alt="(y - y_0)^2 + (z - z_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/8f0dd3d5d7c73c87564b7aa9d05b3b933a107e6c.png" alt="y_0 \: z_0 \: R"/>&#8221;.</td>
</tr>
<tr class="field-even field"><th class="field-name">y-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the y-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/883b49d218bf8cf809fae9decb62b4231ecf964f.png" alt="(x - x_0)^2 + (z - z_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/c495d88c348c2f010641c13f26fdd9d841973a6b.png" alt="x_0 \: z_0 \: R"/>&#8221;.</td>
</tr>
<tr class="field-odd field"><th class="field-name">z-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the z-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/9486fcc643d149a10bc21b05ac1e123031f400da.png" alt="(x - x_0)^2 + (y - y_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/d9efe2f18fee6e45486f86bf704b28646bcc2867.png" alt="x_0 \: y_0 \: R"/>&#8221;.</td>
</tr>
<tr class="field-even field"><th class="field-name">sphere:</th><td class="field-body">A sphere of the form <img class="math" src="../_images/math/62a745995df775198e16354b6b1ed9887e88c8a2.png" alt="(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
R^2"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/e13d971231512283e81d8480a218782f7d68b585.png" alt="x_0 \: y_0 \: z_0 \: R"/>&#8221;.</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="cell-element">
<h3><tt class="docutils literal"><span class="pre">cell</span></tt> Element<a class="headerlink" href="#cell-element" title="Permalink to this headline"></a></h3>
<p>Each <tt class="docutils literal"><span class="pre">cell</span></tt> element can have the following attributes or sub-elements:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">uid:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the surface.</p>
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the surface.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">universe:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">uid</span></tt> of the universe that this cell is contained in.</p>
<tr class="field-even field"><th class="field-name">universe:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">id</span></tt> of the universe that this cell is contained in.</p>
<p><em>Default</em>: 0</p>
</td>
</tr>
<tr class="field"><th class="field-name">fill:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">uid</span></tt> of the universe that fills this cell.</p>
<tr class="field-odd field"><th class="field-name">fill:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">id</span></tt> of the universe that fills this cell.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If a fill is specified, no material should be given.</p>
@ -178,7 +222,7 @@ a list a what coefficients to specify for a given surface</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">material:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">uid</span></tt> of the material that this cell contains.</p>
<tr class="field-even field"><th class="field-name">material:</th><td class="field-body"><p class="first">The <tt class="docutils literal"><span class="pre">id</span></tt> of the material that this cell contains.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If a material is specified, no fill should be given.</p>
@ -186,7 +230,7 @@ a list a what coefficients to specify for a given surface</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">surfaces:</th><td class="field-body"><p class="first">A list of the <tt class="docutils literal"><span class="pre">uids</span></tt> for surfaces that bound this cell, e.g. if the cell
<tr class="field-odd field"><th class="field-name">surfaces:</th><td class="field-body"><p class="first">A list of the <tt class="docutils literal"><span class="pre">ids</span></tt> for surfaces that bound this cell, e.g. if the cell
is on the negative side of surface 3 and the positive side of surface 5, the
bounding surfaces would be given as &#8220;-3 5&#8221;.</p>
<p class="last"><em>Default</em>: None</p>
@ -195,50 +239,62 @@ bounding surfaces would be given as &#8220;-3 5&#8221;.</p>
</tbody>
</table>
</div></blockquote>
<p>The following quadratic surfaces can be modeled:</p>
<table class="docutils field-list" frame="void" rules="none">
</div>
<div class="section" id="lattice-element">
<h3><tt class="docutils literal"><span class="pre">lattice</span></tt> Element<a class="headerlink" href="#lattice-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">lattice</span></tt> can be used to represent repeating structures (e.g. fuel pins in
an assembly) or other geometry which naturally fits into a two-dimensional
structured mesh. Each cell within the lattice is filled with a specified
universe. A <tt class="docutils literal"><span class="pre">lattice</span></tt> accepts the following attributes or sub-elements:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">x-plane:</th><td class="field-body">A plane perpendicular to the x axis, i.e. a surface of the form <img class="math" src="../_images/math/c97be2c5d5ea73f3537be247c4cbb9d842dd0567.png" alt="x - x_0
= 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/17f1249ad95b7682b8316ad21de8ce4ee9fdcf93.png" alt="x_0"/>&#8221;.</td>
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the surface.</p>
</td>
</tr>
<tr class="field"><th class="field-name">y-plane:</th><td class="field-body">A plane perpendicular to the y axis, i.e. a surface of the form <img class="math" src="../_images/math/ce995bc4e617a85ac28c2d3c238d362a1f38bb34.png" alt="y - y_0
= 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/721e40b7e0ac4359611aebe48cfb63122a347798.png" alt="y_0"/>&#8221;.</td>
<tr class="field-even field"><th class="field-name">type:</th><td class="field-body"><p class="first">A string indicating the arrangement of lattice cells. Accepted options are
&#8220;rectangular&#8221; and &#8220;hexagonal&#8221;.</p>
<p><em>Default</em>: rectangular</p>
</td>
</tr>
<tr class="field"><th class="field-name">z-plane:</th><td class="field-body">A plane perpendicular to the z axis, i.e. a surface of the form <img class="math" src="../_images/math/309c87ef1ad84c2412670454fac9aea8f52c0481.png" alt="z - z_0
= 0"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/bab9abe98679312d2a3308c76188cf2cbc492f68.png" alt="z_0"/>&#8221;.</td>
<tr class="field-odd field"><th class="field-name">dimension:</th><td class="field-body"><p class="first">Two integers representing the number of lattice cells in the x- and y-
directions, respectively.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">plane:</th><td class="field-body">An arbitrary plane of the form <img class="math" src="../_images/math/eb8661ea00d3e9e10ef23de03755960eec4b554f.png" alt="Ax + By + Cz = D"/>. The coefficients
specified are &#8220;<img class="math" src="../_images/math/5d687cb5bc98aa30d5460e4d0f34feaa8ec52008.png" alt="A \: B \: C \: D"/>&#8221;.</td>
<tr class="field-even field"><th class="field-name">origin:</th><td class="field-body"><p class="first">The coordinates of the lower-left corner of the lattice.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">x-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the x-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/c70e001674ec3ce487852ca76aab6d872c634cbf.png" alt="(y - y_0)^2 + (z - z_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/8f0dd3d5d7c73c87564b7aa9d05b3b933a107e6c.png" alt="y_0 \: z_0 \: R"/>&#8221;.</td>
<tr class="field-odd field"><th class="field-name">width:</th><td class="field-body"><p class="first">The width of the lattice cell in the x- and y- directions.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">y-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the y-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/883b49d218bf8cf809fae9decb62b4231ecf964f.png" alt="(x - x_0)^2 + (z - z_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/c495d88c348c2f010641c13f26fdd9d841973a6b.png" alt="x_0 \: z_0 \: R"/>&#8221;.</td>
</tr>
<tr class="field"><th class="field-name">z-cylinder:</th><td class="field-body">An infinite cylinder whose length is paralle to the z-axis. This is a
quadratic surface of the form <img class="math" src="../_images/math/9486fcc643d149a10bc21b05ac1e123031f400da.png" alt="(x - x_0)^2 + (y - y_0)^2 = R^2"/>. The
coefficients specified are &#8220;<img class="math" src="../_images/math/d9efe2f18fee6e45486f86bf704b28646bcc2867.png" alt="x_0 \: y_0 \: R"/>&#8221;.</td>
</tr>
<tr class="field"><th class="field-name">sphere:</th><td class="field-body">A sphere of the form <img class="math" src="../_images/math/62a745995df775198e16354b6b1ed9887e88c8a2.png" alt="(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
R^2"/>. The coefficients specified are &#8220;<img class="math" src="../_images/math/e13d971231512283e81d8480a218782f7d68b585.png" alt="x_0 \: y_0 \: z_0 \: R"/>&#8221;.</td>
<tr class="field-even field"><th class="field-name">universes:</th><td class="field-body"><p class="first">A list of the universe numbers that fill each cell of the lattice.</p>
<p class="last"><em>Default</em>: None</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="materials-specification-materials-xml">
<h2>Materials Specification &#8211; materials.xml<a class="headerlink" href="#materials-specification-materials-xml" title="Permalink to this headline"></a></h2>
<div class="section" id="material-element">
<h3><tt class="docutils literal"><span class="pre">material</span></tt> Element<a class="headerlink" href="#material-element" title="Permalink to this headline"></a></h3>
<p>Each <tt class="docutils literal"><span class="pre">material</span></tt> element can have the following attributes or sub-elements:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">density:</th><td class="field-body"><p class="first">An element with attributes/sub-elements called <tt class="docutils literal"><span class="pre">value</span></tt> and <tt class="docutils literal"><span class="pre">units</span></tt>. The
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body"><p class="first">A unique integer that can be used to identify the material.</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">density:</th><td class="field-body"><p class="first">An element with attributes/sub-elements called <tt class="docutils literal"><span class="pre">value</span></tt> and <tt class="docutils literal"><span class="pre">units</span></tt>. The
<tt class="docutils literal"><span class="pre">value</span></tt> attribute is the numeric value of the density while the <tt class="docutils literal"><span class="pre">units</span></tt>
can be &#8220;g/cm3&#8221;, &#8220;kg/m3&#8221;, &#8220;atom/b-cm&#8221;, or &#8220;atom/cm3&#8221;. For example, this could
be specified as:</p>
@ -247,7 +303,7 @@ be specified as:</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">nuclide:</th><td class="field-body"><p class="first">An element with attributes/sub-elements called <tt class="docutils literal"><span class="pre">name</span></tt>, <tt class="docutils literal"><span class="pre">xs</span></tt>, and <tt class="docutils literal"><span class="pre">ao</span></tt>
<tr class="field-odd field"><th class="field-name">nuclide:</th><td class="field-body"><p class="first">An element with attributes/sub-elements called <tt class="docutils literal"><span class="pre">name</span></tt>, <tt class="docutils literal"><span class="pre">xs</span></tt>, and <tt class="docutils literal"><span class="pre">ao</span></tt>
or <tt class="docutils literal"><span class="pre">wo</span></tt>. The <tt class="docutils literal"><span class="pre">name</span></tt> attribute is the name of the cross-section for a
desired nuclide while the <tt class="docutils literal"><span class="pre">xs</span></tt> attribute is the cross-section
identifier. Finally, the <tt class="docutils literal"><span class="pre">ao</span></tt> and <tt class="docutils literal"><span class="pre">wo</span></tt> attributes specify the atom or
@ -261,6 +317,13 @@ example would be as follows:</p>
<p class="last">If one nuclide is specified in atom percent, all others must also
be given in atom percent. The same applies for weight percentages.</p>
</div>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">sab:</th><td class="field-body"><p class="first">Associates an S(a,b) table with the material. This element has
attributes/sub-elements called <tt class="docutils literal"><span class="pre">name</span></tt> and <tt class="docutils literal"><span class="pre">xs</span></tt>. The <tt class="docutils literal"><span class="pre">name</span></tt> attribute
is the name of the S(a,b) table that should be associated with the material,
and <tt class="docutils literal"><span class="pre">xs</span></tt> is the cross-section identifier for the table.</p>
<p class="last"><em>Default</em>: None</p>
</td>
</tr>
@ -268,30 +331,24 @@ be given in atom percent. The same applies for weight percentages.</p>
</table>
</div></blockquote>
</div>
<div class="section" id="default-xs-element">
<h3><tt class="docutils literal"><span class="pre">default_xs</span></tt> Element<a class="headerlink" href="#default-xs-element" title="Permalink to this headline"></a></h3>
<p>In some circumstances, the cross-section identifier may be the same for many or
all nuclides in a given problem. In this case, rather than specifying the
<tt class="docutils literal"><span class="pre">xs=...</span></tt> attribute on every nuclide, a <tt class="docutils literal"><span class="pre">default_xs</span></tt> element can be used to
set the default cross-section identifier for any nuclide without an identifier
explicitly listed. This element has no attributes and accepts a 3-letter string
that indicates the default cross-section identifier, e.g. &#8220;70c&#8221;.</p>
<blockquote>
<div><em>Default</em>: None</div></blockquote>
</div>
</div>
<div class="section" id="settings-specification-settings-xml">
<h2>Settings Specification &#8211; settings.xml<a class="headerlink" href="#settings-specification-settings-xml" title="Permalink to this headline"></a></h2>
<p>All simulation parameters and miscellaneous options are specified in the
settings.xml file. The following elements can be specified:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">xslibrary</span></tt></li>
<li><tt class="docutils literal"><span class="pre">criticality</span></tt></li>
<li><tt class="docutils literal"><span class="pre">verbosity</span></tt></li>
<li><tt class="docutils literal"><span class="pre">source</span></tt></li>
</ul>
<p>The <tt class="docutils literal"><span class="pre">xslibrary</span></tt> element has the following attributes:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">path:</th><td class="field-body"><p class="first">The absolute or relative path of the xsdata file which lists cross sections
to be used in the simulation.</p>
<p class="last"><em>Default</em>: None</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
settings.xml file.</p>
<div class="section" id="criticality-element">
<h3><tt class="docutils literal"><span class="pre">criticality</span></tt> Element<a class="headerlink" href="#criticality-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">criticality</span></tt> element indicates that a criticality calculation should be
performed. It has the following attributes/sub-elements:</p>
<blockquote>
@ -299,24 +356,71 @@ performed. It has the following attributes/sub-elements:</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">cycles:</th><td class="field-body"><p class="first">The number of total fission source iterations.</p>
<tr class="field-odd field"><th class="field-name">cycles:</th><td class="field-body"><p class="first">The number of total fission source iterations.</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">inactive:</th><td class="field-body"><p class="first">The number of inactive fission source iterations. In general, the starting
<tr class="field-even field"><th class="field-name">inactive:</th><td class="field-body"><p class="first">The number of inactive fission source iterations. In general, the starting
cycles in a criticality calculation can not be used to contribute to tallies
since the fission source distribution and eigenvalue are generally not
converged immediately</p>
<p><em>Default</em>: None</p>
</td>
</tr>
<tr class="field"><th class="field-name">particles:</th><td class="field-body"><p class="first">The number of neutrons to simulate per fission source iteration.</p>
<tr class="field-odd field"><th class="field-name">particles:</th><td class="field-body"><p class="first">The number of neutrons to simulate per fission source iteration.</p>
<p class="last"><em>Default</em>: None</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="cross-sections-element">
<h3><tt class="docutils literal"><span class="pre">cross_sections</span></tt> Element<a class="headerlink" href="#cross-sections-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">cross_sections</span></tt> element has no attributes and simply indicates the path
to an XML cross section listing file (usually named cross_sections.xml). If this
element is absent from the settings.xml file, the environment variable
<tt class="docutils literal"><span class="pre">CROSS_SECTIONS</span></tt> will be used to find the path to the XML cross section
listing.</p>
</div>
<div class="section" id="cutoff-element">
<h3><tt class="docutils literal"><span class="pre">cutoff</span></tt> Element<a class="headerlink" href="#cutoff-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">cutoff</span></tt> element has no attributes and indicates the weight cutoff used
below which particles undergo Russian roulette.</p>
<blockquote>
<div><em>Default</em>: 0.25</div></blockquote>
</div>
<div class="section" id="source-element">
<h3><tt class="docutils literal"><span class="pre">source</span></tt> Element<a class="headerlink" href="#source-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">source</span></tt> element gives information on an initial source guess for
criticality calculations. It takes the following attributes:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">type:</th><td class="field-body">The type of source distribution. Currently, the only accepted option is
&#8220;box&#8221;</td>
</tr>
<tr class="field-even field"><th class="field-name">coeffs:</th><td class="field-body">For a &#8220;box&#8221; source distribution, <tt class="docutils literal"><span class="pre">coeffs</span></tt> should be given as six integers,
the first three of which specify the lower-left corner of a parallelepiped
and the last three of which specify the upper-right corner. Source sites are
sampled uniformly through that parallelepiped.</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="survival-biasing-element">
<h3><tt class="docutils literal"><span class="pre">survival_biasing</span></tt> Element<a class="headerlink" href="#survival-biasing-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">survival_biasing</span></tt> element has no attributes and assumes wither the
value <tt class="docutils literal"><span class="pre">on</span></tt> or <tt class="docutils literal"><span class="pre">off</span></tt>. If turned on, this option will enable the use of
survival biasing, otherwise known as implicit capture or absorption.</p>
<blockquote>
<div><em>Default</em>: off</div></blockquote>
</div>
<div class="section" id="verbosity-element">
<h3><tt class="docutils literal"><span class="pre">verbosity</span></tt> Element<a class="headerlink" href="#verbosity-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">verbosity</span></tt> element tells the code how much information to display to the
standard output. A higher verbosity corresponds to more information being
displayed. This element takes the following attributes:</p>
@ -325,31 +429,14 @@ displayed. This element takes the following attributes:</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">value:</th><td class="field-body"><p class="first">The specified verbosity between 1 and 10.</p>
<tr class="field-odd field"><th class="field-name">value:</th><td class="field-body"><p class="first">The specified verbosity between 1 and 10.</p>
<p class="last"><em>Default</em>: 5</p>
</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>The <tt class="docutils literal"><span class="pre">source</span></tt> element gives information on an initial source guess for
criticality calculations. It takes the following attributes:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">type:</th><td class="field-body">The type of source distribution. Currently, the only accepted option is
&#8220;box&#8221;</td>
</tr>
<tr class="field"><th class="field-name">coeffs:</th><td class="field-body">For a &#8220;box&#8221; source distribution, <tt class="docutils literal"><span class="pre">coeffs</span></tt> should be given as six integers,
the first three of which specify the lower-left corner of a parallelepiped
and the last three of which specify the upper-right corner. Source sites are
sampled uniformly through that parallelepiped.</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="tallies-specification-tallies-xml">
<h2>Tallies Specification &#8211; tallies.xml<a class="headerlink" href="#tallies-specification-tallies-xml" title="Permalink to this headline"></a></h2>
@ -365,17 +452,19 @@ preventing others from scoring to the tally.</p>
filters can be used for a tally. The following types of filter are available:
cell, universe, material, surface, birth region, pre-collision energy,
post-collision energy, and an arbitrary structured mesh.</p>
<p>The two valid elements in the tallies.xml file are <tt class="docutils literal"><span class="pre">tally</span></tt> and <tt class="docutils literal"><span class="pre">mesh</span></tt>. The
<tt class="docutils literal"><span class="pre">tally</span></tt> element accepts the following sub-elements:</p>
<p>The two valid elements in the tallies.xml file are <tt class="docutils literal"><span class="pre">tally</span></tt> and <tt class="docutils literal"><span class="pre">mesh</span></tt>.</p>
<div class="section" id="tally-element">
<h3><tt class="docutils literal"><span class="pre">tally</span></tt> Element<a class="headerlink" href="#tally-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">tally</span></tt> element accepts the following sub-elements:</p>
<blockquote>
<div><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">filters:</th><td class="field-body">A list of filters to specify what region of phase space should contribute to
<tr class="field-odd field"><th class="field-name">filters:</th><td class="field-body">A list of filters to specify what region of phase space should contribute to
the tally. See below for full details on what filters are available.</td>
</tr>
<tr class="field"><th class="field-name">macros:</th><td class="field-body">The desired responses to be accumulated. See below for full details on what
<tr class="field-even field"><th class="field-name">macros:</th><td class="field-body">The desired responses to be accumulated. See below for full details on what
responses can be tallied.</td>
</tr>
</tbody>
@ -387,30 +476,30 @@ responses can be tallied.</td>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">cell:</th><td class="field-body">A list of cells in which the tally should be accumulated.</td>
<tr class="field-odd field"><th class="field-name">cell:</th><td class="field-body">A list of cells in which the tally should be accumulated.</td>
</tr>
<tr class="field"><th class="field-name">cellborn:</th><td class="field-body">This filter allows the tally to be scored to only when particles were
<tr class="field-even field"><th class="field-name">cellborn:</th><td class="field-body">This filter allows the tally to be scored to only when particles were
originally born in a specified cell.</td>
</tr>
<tr class="field"><th class="field-name">surface:</th><td class="field-body">A list of surfaces for which the tally should be accumulated.</td>
<tr class="field-odd field"><th class="field-name">surface:</th><td class="field-body">A list of surfaces for which the tally should be accumulated.</td>
</tr>
<tr class="field"><th class="field-name">material:</th><td class="field-body">A list of materials for which the tally should be accumulated.</td>
<tr class="field-even field"><th class="field-name">material:</th><td class="field-body">A list of materials for which the tally should be accumulated.</td>
</tr>
<tr class="field"><th class="field-name">universe:</th><td class="field-body">A list of universes for which the tally should be accumulated.</td>
<tr class="field-odd field"><th class="field-name">universe:</th><td class="field-body">A list of universes for which the tally should be accumulated.</td>
</tr>
<tr class="field"><th class="field-name">energy:</th><td class="field-body">A monotonically increasing list of bounding <strong>pre-collision</strong> energies for a
<tr class="field-even field"><th class="field-name">energy:</th><td class="field-body">A monotonically increasing list of bounding <strong>pre-collision</strong> energies for a
number of groups. For example, if the following energy filter is specified
as <tt class="docutils literal"><span class="pre">&lt;energy&gt;0.0</span> <span class="pre">1.0</span> <span class="pre">20.0&lt;/energy&gt;</span></tt>, then two energy bins will be created,
one with energies between 0 and 1 MeV and the other with energies between 1
and 20 MeV.</td>
</tr>
<tr class="field"><th class="field-name">energyout:</th><td class="field-body">A monotonically increasing list of bounding <strong>post-collision</strong> energies for
<tr class="field-odd field"><th class="field-name">energyout:</th><td class="field-body">A monotonically increasing list of bounding <strong>post-collision</strong> energies for
a number of groups. For example, if the following energy filter is specified
as <tt class="docutils literal"><span class="pre">&lt;energy&gt;0.0</span> <span class="pre">1.0</span> <span class="pre">20.0&lt;/energy&gt;</span></tt>, then two energy bins will be created,
one with energies between 0 and 1 MeV and the other with energies between 1
and 20 MeV.</td>
</tr>
<tr class="field"><th class="field-name">mesh:</th><td class="field-body">The <tt class="docutils literal"><span class="pre">id</span></tt> of a structured mesh to be tallied over.</td>
<tr class="field-even field"><th class="field-name">mesh:</th><td class="field-body">The <tt class="docutils literal"><span class="pre">id</span></tt> of a structured mesh to be tallied over.</td>
</tr>
</tbody>
</table>
@ -421,32 +510,35 @@ and 20 MeV.</td>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">flux:</th><td class="field-body">Total flux</td>
<tr class="field-odd field"><th class="field-name">flux:</th><td class="field-body">Total flux</td>
</tr>
<tr class="field"><th class="field-name">total:</th><td class="field-body">Total reaction rate</td>
<tr class="field-even field"><th class="field-name">total:</th><td class="field-body">Total reaction rate</td>
</tr>
<tr class="field"><th class="field-name">scatter:</th><td class="field-body">Total scattering rate</td>
<tr class="field-odd field"><th class="field-name">scatter:</th><td class="field-body">Total scattering rate</td>
</tr>
<tr class="field"><th class="field-name">nu-scatter:</th><td class="field-body">Total production of neutrons due to scattering. This accounts for
<tr class="field-even field"><th class="field-name">nu-scatter:</th><td class="field-body">Total production of neutrons due to scattering. This accounts for
multiplicity from (n,2n), (n,3n), and (n,4n) reactions and should be
slightly higher than the scattering rate.</td>
</tr>
<tr class="field"><th class="field-name">scatter-1:</th><td class="field-body">First scattering moment</td>
<tr class="field-odd field"><th class="field-name">scatter-1:</th><td class="field-body">First scattering moment</td>
</tr>
<tr class="field"><th class="field-name">scatter-2:</th><td class="field-body">Second scattering moment</td>
<tr class="field-even field"><th class="field-name">scatter-2:</th><td class="field-body">Second scattering moment</td>
</tr>
<tr class="field"><th class="field-name">scatter-3:</th><td class="field-body">Third scattering moment</td>
<tr class="field-odd field"><th class="field-name">scatter-3:</th><td class="field-body">Third scattering moment</td>
</tr>
<tr class="field"><th class="field-name">absorption:</th><td class="field-body">Total absorption rate. This accounts for all reactions which do not produce
<tr class="field-even field"><th class="field-name">absorption:</th><td class="field-body">Total absorption rate. This accounts for all reactions which do not produce
secondary neutrons.</td>
</tr>
<tr class="field"><th class="field-name">fission:</th><td class="field-body">Total fission rate</td>
<tr class="field-odd field"><th class="field-name">fission:</th><td class="field-body">Total fission rate</td>
</tr>
<tr class="field"><th class="field-name">nu-fission:</th><td class="field-body">Total production of neutrons due to fission</td>
<tr class="field-even field"><th class="field-name">nu-fission:</th><td class="field-body">Total production of neutrons due to fission</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
<div class="section" id="mesh-element">
<h3><tt class="docutils literal"><span class="pre">mesh</span></tt> Element<a class="headerlink" href="#mesh-element" title="Permalink to this headline"></a></h3>
<p>If a structured mesh is desired as a filter for a tally, it must be specified in
a separate element with the tag name <tt class="docutils literal"><span class="pre">mesh</span></tt>. This element has the following
attributes/sub-elements:</p>
@ -455,20 +547,62 @@ attributes/sub-elements:</p>
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">type:</th><td class="field-body">The type of structured mesh. Valid options include &#8220;rectangular&#8221; and
<tr class="field-odd field"><th class="field-name">type:</th><td class="field-body">The type of structured mesh. Valid options include &#8220;rectangular&#8221; and
&#8220;hexagonal&#8221;.</td>
</tr>
<tr class="field"><th class="field-name">origin:</th><td class="field-body">The lower-left corner of the structured mesh. If only two coordinate are
<tr class="field-even field"><th class="field-name">origin:</th><td class="field-body">The lower-left corner of the structured mesh. If only two coordinate are
given, it is assumed that the mesh is an x-y mesh.</td>
</tr>
<tr class="field"><th class="field-name">dimension:</th><td class="field-body">The number of mesh cells in each direction.</td>
<tr class="field-odd field"><th class="field-name">dimension:</th><td class="field-body">The number of mesh cells in each direction.</td>
</tr>
<tr class="field"><th class="field-name">width:</th><td class="field-body">The width of mesh cells in each direction.</td>
<tr class="field-even field"><th class="field-name">width:</th><td class="field-body">The width of mesh cells in each direction.</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
<div class="section" id="geometry-plotting-specification-plot-xml">
<h2>Geometry Plotting Specification &#8211; plot.xml<a class="headerlink" href="#geometry-plotting-specification-plot-xml" title="Permalink to this headline"></a></h2>
<p>A rudimentary plotting capability is available in OpenMC by specifying a
plot.xml file and subsequently running with the command-line flag <tt class="docutils literal"><span class="pre">-plot</span></tt>. The
root element of the plot.xml is simply <tt class="docutils literal"><span class="pre">&lt;plot&gt;</span></tt> and four sub-elements can be
defined to configure the plotting range and resolution.</p>
<div class="section" id="origin-element">
<h3><tt class="docutils literal"><span class="pre">origin</span></tt> Element<a class="headerlink" href="#origin-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">origin</span></tt> element has no attributes/sub-elements and indicates the
Cartesian coordinates of the center of the plot.</p>
<blockquote>
<div><em>Default</em>: None</div></blockquote>
</div>
<div class="section" id="width-element">
<h3><tt class="docutils literal"><span class="pre">width</span></tt> Element<a class="headerlink" href="#width-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">width</span></tt> element has no attributes/sub-elements and indicates the width of
the plot in each of the basis directions.</p>
<blockquote>
<div><em>Default</em>: None</div></blockquote>
</div>
<div class="section" id="basis-element">
<h3><tt class="docutils literal"><span class="pre">basis</span></tt> Element<a class="headerlink" href="#basis-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">basis</span></tt> element has no attributes/sub-elements and indicates the specified
basis for plotting.</p>
<blockquote>
<div><div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The only accepted option currently is &#8220;xy&#8221;</p>
</div>
<p><em>Default</em>: xy</p>
</div></blockquote>
</div>
<div class="section" id="pixel-element">
<h3><tt class="docutils literal"><span class="pre">pixel</span></tt> Element<a class="headerlink" href="#pixel-element" title="Permalink to this headline"></a></h3>
<p>The <tt class="docutils literal"><span class="pre">pixel</span></tt> element has no attributes/sub-elements and indicates the distance
between horizontal rays sent through the geometry to record surface crossings. A
smaller <tt class="docutils literal"><span class="pre">pixel</span></tt> will result in a higher-resolution plot.</p>
<blockquote>
<div><em>Default</em>: 0.01</div></blockquote>
</div>
</div>
</div>
@ -487,7 +621,7 @@ given, it is assumed that the mesh is an x-y mesh.</td>
<div class="footer">
&copy; Copyright 2011, Massachusetts Institute of Technology.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>