From f9146abeea0610a4c8cddea53ac031eeabd79d47 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Fri, 26 Feb 2016 04:57:12 -0500 Subject: [PATCH 1/8] Got the low hanging fruit for implementing MG theory in the theory manual. The majority of work will be in the physics.rst and cross_sections.rst files which I have not attacked yet. I also noticed that the theory wasnt updated for the new secondary particle bank (Ive only seen one place where it needed to be mentioned so far) and for the polar/azimuthal/mu filters. Both have been incorporated. --- docs/source/methods/introduction.rst | 34 ++++++++++++++++++++-------- docs/source/methods/tallies.rst | 18 ++++++++------- docs/source/usersguide/beginners.rst | 2 +- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/docs/source/methods/introduction.rst b/docs/source/methods/introduction.rst index 508ac9919..7e4f94633 100644 --- a/docs/source/methods/introduction.rst +++ b/docs/source/methods/introduction.rst @@ -8,7 +8,7 @@ The physical process by which a population of particles evolves over time is governed by a number of `probability distributions`_. For instance, given a particle traveling through some material, there is a probability distribution for the distance it will travel until its next collision (an exponential -distribution). Then, when it collides with a nucleus, there is associated +distribution). Then, when it collides with a nucleus, there is an associated probability of undergoing each possible reaction with that nucleus. While the behavior of any single particle is unpredictable, the average behavior of a large population of particles originating from the same source is well defined. @@ -45,10 +45,15 @@ following steps: - Initialize the pseudorandom number generator. - - Read ACE format cross sections specified in the problem. + - Read the contiuous-energy or multi-group cross section data specified in + the problem. - If using a special energy grid treatment such as a union energy grid or - lethargy bins, that must be initialized as well. + lethargy bins, that must be initialized as well in a continuous-energy + problem. + + - In a multi-group problem, individual nuclide cross section information is + combined to produce material-specific cross section data. - In a fixed source problem, source sites are sampled from the specified source. In an eigenvalue problem, source sites are sampled from some initial @@ -95,6 +100,10 @@ proceed. The life of a single particle will proceed as follows: P(i) = \frac{\Sigma_{t,i}}{\Sigma_t}. + Note that the above selection of collided nuclide only applies to + continuous-energy simulations as multi-group simulations use nuclide + data which has already been combined in to material-specific data. + 8. Once the specific nuclide is sampled, the random samples a reaction for that nuclide based on the microscopic cross sections. If the microscopic cross section for some reaction :math:`x` is :math:`\sigma_x` and the total @@ -105,13 +114,20 @@ proceed. The life of a single particle will proceed as follows: P(x) = \frac{\sigma_x}{\sigma_t}. + Since multi-group simulations use material-specific data, the above is + performed with those material multi-group cross sections (i.e., + macroscopic cross sections for the material) instead of microscopic + cross sections for the nuclide). + 9. If the sampled reaction is elastic or inelastic scattering, the outgoing - energy and angle is sampled from the appropriate distribution. Reactions - of type :math:`(n,xn)` are treated as scattering and the weight of the - particle is increased by the multiplicity of the reaction. The particle - then continues from step 3. If the reaction is absorption or fission, the - particle dies and if necessary, fission sites are created and stored in the - fission bank. + energy and angle is sampled from the appropriate distribution. In + continuous-energy simulation, reactions of type :math:`(n,xn)` are treated + as scattering and any additional particles which may be created are added + to a secondary particle bank to be tracked later. In a multi-group + simulation, this secondary bank is ont used but the particle weight is + increased accordingly. The original particle then continues from step 3. + If the reaction is absorption or fission, the particle dies and if + necessary, fission sites are created and stored in the fission bank. After all particles have been simulated, there are a few final tasks that must be performed before the run is finished. This include the following: diff --git a/docs/source/methods/tallies.rst b/docs/source/methods/tallies.rst index 65a0989ac..60a2b9a63 100644 --- a/docs/source/methods/tallies.rst +++ b/docs/source/methods/tallies.rst @@ -32,8 +32,9 @@ OpenMC: flux, total reaction rate, scattering reaction rate, neutron production from scattering, higher scattering moments, :math:`(n,xn)` reaction rates, absorption reaction rate, fission reaction rate, neutron production rate from fission, and surface currents. The following variables can be used as filters: -universe, material, cell, birth cell, surface, mesh, pre-collision energy, and -post-collision energy. +universe, material, cell, birth cell, surface, mesh, pre-collision energy, +post-collision energy, polar angle, azimuthal angle, and the cosine of the +change-in-angle due to a scattering event. With filters for pre- and post-collision energy and scoring functions for scattering and fission production, it is possible to use OpenMC to generate @@ -55,9 +56,9 @@ be scored to for each value of the filter variable. If a particle is in cell :math:`n`, the mapping would identify what tally/bin combinations specify cell :math:`n` for the cell filter variable. In this manner, it is not necessary to check the phase space variables against each tally. Note that this technique -only applies to discrete filter variables and cannot be applied to energy -bins. For energy filters, it is necessary to perform a binary search on the -specified energy grid. +only applies to discrete filter variables and cannot be applied to energy, +angle, or change-in-angle bins. For these filters, it is necessary to perform +a binary search on the specified energy grid. ----------------------------------------- Volume-Integrated Flux and Reaction Rates @@ -196,8 +197,9 @@ One important fact to take into consideration is that the use of a track-length estimator precludes us from using any filter that requires knowledge of the particle's state following a collision because by definition, it will not have had a collision at every event. Thus, for tallies with outgoing-energy filters -(which require the post-collision energy) or for tallies of scattering moments -(which require the scattering cosine), we must use an analog estimator. +(which require the post-collision energy), scattering change-in-angle filters, +or for tallies of scattering moments (which require the scattering cosine of +the change-in-angle), we must use an analog estimator. .. TODO: Add description of surface current tallies @@ -430,7 +432,7 @@ analytically. For one degree of freedom, the t-distribution becomes a standard .. math:: :label: cauchy-cdf - c(x) = \frac{1}{\pi} \arctan x + \frac{1}{2}. + c(x) = \frac{1}{\pi} \arctan x + \frac{1}{2}. Thus, inverting the cumulative distribution function, we find the :math:`x` percentile of the standard Cauchy distribution to be diff --git a/docs/source/usersguide/beginners.rst b/docs/source/usersguide/beginners.rst index 9ecffe3f6..2487e9c41 100644 --- a/docs/source/usersguide/beginners.rst +++ b/docs/source/usersguide/beginners.rst @@ -65,7 +65,7 @@ Now let's look at the pros and cons of Monte Carlo methods: - **Pro**: Running simulations in parallel is conceptually very simple. -- **Con**: Because they related on repeated random sampling, they are +- **Con**: Because they rely on repeated random sampling, they are computationally very expensive. - **Con**: A simulation doesn't automatically give you the global solution From 2fd10d1d53d11304de24bb162e39f931e325b527 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 11:36:37 -0400 Subject: [PATCH 2/8] Updated cross_sections.rst to include a description of the MG mode options --- docs/source/methods/cross_sections.rst | 122 ++++++++++++++++++++++--- docs/source/methods/introduction.rst | 6 +- 2 files changed, 112 insertions(+), 16 deletions(-) diff --git a/docs/source/methods/cross_sections.rst b/docs/source/methods/cross_sections.rst index 5126252cd..71caa07b8 100644 --- a/docs/source/methods/cross_sections.rst +++ b/docs/source/methods/cross_sections.rst @@ -1,16 +1,20 @@ .. _methods_cross_sections: -============================ -Cross Section Representation -============================ +============================= +Cross Section Representations +============================= -The data governing the interaction of neutrons with various nuclei are -represented using the ACE format which is used by MCNP_ and Serpent_. ACE-format -data can be generated with the NJOY_ nuclear data processing system which -converts raw `ENDF/B data`_ into linearly-interpolable data as required by most -Monte Carlo codes. The use of a standard cross section format allows for a -direct comparison of OpenMC with other codes since the same cross section -libraries can be used. +---------------------- +Continuous-Energy Data +---------------------- + +The data governing the interaction of neutrons with +various nuclei for continous-energy problems are represented using the ACE +format which is used by MCNP_ and Serpent_. ACE-format data can be generated +with the NJOY_ nuclear data processing system which converts raw +`ENDF/B data`_ into linearly-interpolable data as required by most Monte Carlo +codes. The use of a standard cross section format allows for a direct comparison +of OpenMC with other codes since the same cross section libraries can be used. The ACE format contains continuous-energy cross sections for the following types of reactions: elastic scattering, fission (or first-chance fission, @@ -24,7 +28,6 @@ accurate treatment of self-shielding in the unresolved resonance range. For bound scatterers, separate tables with :math:`S(\alpha,\beta,T)` scattering law data can be used. -------------------- Energy Grid Methods ------------------- @@ -48,7 +51,6 @@ implement a method of reducing the number of energy grid searches in order to speed up the calculation. Logarithmic Mapping -------------------- To speed up energy grid searches, OpenMC uses logarithmic mapping technique [Brown]_ to limit the range of energies that must be searched for each @@ -58,11 +60,102 @@ the nuclide energy grids. By default, OpenMC uses 8000 equal-lethargy segments as recommended by Brown. Other Methods -------------- A good survey of other energy grid techniques, including unionized energy grids, can be found in a paper by Leppanen_. +---------------- +Multi-Group Data +---------------- + +The data governing the interaction of neutrons with various nuclei or materials +are represented using a multi-group library format specific to the OpenMC code. +The format is described in the MGXS library specification_ +The data itself can be prepared via multiple paths including: generation via +NJOY_ and TRANSX_, or directly from a continuous-energy OpenMC calculation by +use of the Python API as is shown in the Python API example_ notebooks. This +multi-group library consists of library meta-data (such as the energy group +structure) and multiple `xsdata` objects which contains the required microscopic +or macroscopic multi-group data. + +At a minimum, the library must contain the absorption cross section +(:math:`\sigma_{a,g}`) and a scattering matrix. If the problem is an eigenvalue +problem then all fissionable materials must also contain either fission spectrum +data (:math:`\chi{g'}`) and a fission production cross section +(:math:`\nu\sigma_{f,g}`), or, a fission production matrix cross section +(:math:`\nu\sigma_{f,g\arrow\g'}`). If fission or energy release from fission +tallies are requested by the user, then the library must also contain the +fission cross section (:math:`\sigma_{f,g}`) or the fission energy release +cross section (:math:`\kappa\sigma_{f,g}`). + +After a scattering collision, the outgoing neutron experiences a change in both +energy and angle. The probability of a neutron resulting in a given outgoing +energy group (`g'`) given a certain incoming energy group (`g`) is provided +by the scattering matrix cross sections themselves. The angular information, +however, can be expressed either via Legendre expansion of the neutron's +change-in-angle (:math:`\mu`), a tabular representation of the probability of +a neutron experiencing a given :math:`\mu`, or a histogram representation of the +probability of a neutron experiencing a given :math:`\mu`. The formats used to +represent these are described in the library format specification_. + +Unlike the continuous-energy mode, the multi-group mode does not explicitly +track neutrons produced from scattering multiplication (i.e., :math:`(n,xn)`) +reactions. These are instead accounted for by adjusting the weight of the +neutron after the collision such that the correct total weight is maintained. +The information for how to adjust this weight is optionally provided by the +`multiplicity` data which exists as a group-wise matrix. This data represents +the average number of neutrons emitted from a scattering reaction, given a +scattering reaction has occurred: + +.. math:: + + multiplicity_{g \arrow g'} = \frac{\nu_{scatter}\sigma_{s,g \arrow g'}}{ + \sigma_{s,g \arrow g'}} + +This data is provided as a group-wise matrix since the probability of producing +multiple neutrons in a scattering reaction depends on both the incoming energy, +`g`, and the sampled outgoing energy, `g'`. + +If this scattering multiplication information is not provided in the library +then no weight adjustment will be performed. This is equivalent to neglecting +any additional neutrons produced in scattering multiplication reactions. +However, this assumption will result in a loss of accuracy since the total +neutron population would not be conserved. This reduction in accuracy due to +the loss in neutron conservation can be mitigated by reducing the absorption +cross section as needed to maintain neutron conservation. This adjustment can +be done when generating the library, or by OpenMC. To have OpenMC perform the +adjustment, the total cross section (:math:`\sigma_{t,g}`) must be provided. +With this information, OpenMC will then adjust the absorption cross section as +follows: + +.. math:: + + \sigma_{a,g} = \sigma_{t,g} - \sum_{g'}{\nu_{scatter}\sigma_{s,g \arrow g'}} + +The above method is the same as is typically done with most deterministic methods. +Note that this method is less accurate than using the scattering multiplication +weight adjustment since simply reducing the absorption cross section does not +include any information about the outgoing energy of the neutrons produced in +these reactions. + +All of the data discussed in this section can be provided to the code +independent of the neutron's direction of motion (i.e., isotropic), or the data +can be provided as a tabular distribution of the polar and azimuthal neutron +direction angles. The isotropic representation is the most commonly used, +however inaccuracies are to be expected especially near material interfaces +where a material has a very large cross sections relative to the other material +(as can be expected in the resonance range). The angular representation can be +used to minimize this error. + +Finally, the above options for representing the physics do not have to be +consistent across the problem. The number of groups and the structure, however, +does have to be consistent across the data sets. That is to say that each +microscopic or macroscopic data set does not have to apply the same scattering +expansion, treatment of multiplicity or angular representation of the cross +sections. This allows flexibility for the model to use highly anisotropic +scattering information in the water while the fuel can be simulated with linear +or even isotropic scattering. + .. only:: html .. rubric:: References @@ -75,3 +168,6 @@ can be found in a paper by Leppanen_. .. _NJOY: http://t2.lanl.gov/codes.shtml .. _ENDF/B data: http://www.nndc.bnl.gov/endf .. _Leppanen: http://dx.doi.org/10.1016/j.anucene.2009.03.019 +.. _specification: ENTER LINK +.. _TRANSX: ENTER LINK +.. _example: ENTER LINK diff --git a/docs/source/methods/introduction.rst b/docs/source/methods/introduction.rst index 7e4f94633..0bd067470 100644 --- a/docs/source/methods/introduction.rst +++ b/docs/source/methods/introduction.rst @@ -56,9 +56,9 @@ following steps: combined to produce material-specific cross section data. - In a fixed source problem, source sites are sampled from the specified - source. In an eigenvalue problem, source sites are sampled from some initial - source distribution or from a source file. The source sites consist of - coordinates, a direction, and an energy. + source. In an eigenvalue problem, source sites are sampled from some + initial source distribution or from a source file. The source sites + consist of coordinates, a direction, and an energy. Once initialization is complete, the actual transport simulation can proceed. The life of a single particle will proceed as follows: From 933fbb70d449fd8493995f507d74ef5d3b0595d8 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 12:19:42 -0400 Subject: [PATCH 3/8] Updated physics.rst in the methods manual --- docs/source/methods/cross_sections.rst | 36 +++++----- docs/source/methods/physics.rst | 91 +++++++++++++++++++++++++- 2 files changed, 109 insertions(+), 18 deletions(-) diff --git a/docs/source/methods/cross_sections.rst b/docs/source/methods/cross_sections.rst index 71caa07b8..bb72a9c75 100644 --- a/docs/source/methods/cross_sections.rst +++ b/docs/source/methods/cross_sections.rst @@ -51,6 +51,7 @@ implement a method of reducing the number of energy grid searches in order to speed up the calculation. Logarithmic Mapping ++++++++++++++++++++ To speed up energy grid searches, OpenMC uses logarithmic mapping technique [Brown]_ to limit the range of energies that must be searched for each @@ -60,6 +61,7 @@ the nuclide energy grids. By default, OpenMC uses 8000 equal-lethargy segments as recommended by Brown. Other Methods ++++++++++++++ A good survey of other energy grid techniques, including unionized energy grids, can be found in a paper by Leppanen_. @@ -68,7 +70,7 @@ can be found in a paper by Leppanen_. Multi-Group Data ---------------- -The data governing the interaction of neutrons with various nuclei or materials +The data governing the interaction of particles with various nuclei or materials are represented using a multi-group library format specific to the OpenMC code. The format is described in the MGXS library specification_ The data itself can be prepared via multiple paths including: generation via @@ -88,23 +90,23 @@ tallies are requested by the user, then the library must also contain the fission cross section (:math:`\sigma_{f,g}`) or the fission energy release cross section (:math:`\kappa\sigma_{f,g}`). -After a scattering collision, the outgoing neutron experiences a change in both -energy and angle. The probability of a neutron resulting in a given outgoing +After a scattering collision, the outgoing particle experiences a change in both +energy and angle. The probability of a particle resulting in a given outgoing energy group (`g'`) given a certain incoming energy group (`g`) is provided by the scattering matrix cross sections themselves. The angular information, -however, can be expressed either via Legendre expansion of the neutron's +however, can be expressed either via Legendre expansion of the particle's change-in-angle (:math:`\mu`), a tabular representation of the probability of -a neutron experiencing a given :math:`\mu`, or a histogram representation of the -probability of a neutron experiencing a given :math:`\mu`. The formats used to +a particle experiencing a given :math:`\mu`, or a histogram representation of the +probability of a particle experiencing a given :math:`\mu`. The formats used to represent these are described in the library format specification_. Unlike the continuous-energy mode, the multi-group mode does not explicitly -track neutrons produced from scattering multiplication (i.e., :math:`(n,xn)`) +track particles produced from scattering multiplication (i.e., :math:`(n,xn)`) reactions. These are instead accounted for by adjusting the weight of the -neutron after the collision such that the correct total weight is maintained. +particle after the collision such that the correct total weight is maintained. The information for how to adjust this weight is optionally provided by the `multiplicity` data which exists as a group-wise matrix. This data represents -the average number of neutrons emitted from a scattering reaction, given a +the average number of particles emitted from a scattering reaction, given a scattering reaction has occurred: .. math:: @@ -113,16 +115,16 @@ scattering reaction has occurred: \sigma_{s,g \arrow g'}} This data is provided as a group-wise matrix since the probability of producing -multiple neutrons in a scattering reaction depends on both the incoming energy, +multiple particles in a scattering reaction depends on both the incoming energy, `g`, and the sampled outgoing energy, `g'`. If this scattering multiplication information is not provided in the library then no weight adjustment will be performed. This is equivalent to neglecting -any additional neutrons produced in scattering multiplication reactions. +any additional particles produced in scattering multiplication reactions. However, this assumption will result in a loss of accuracy since the total -neutron population would not be conserved. This reduction in accuracy due to -the loss in neutron conservation can be mitigated by reducing the absorption -cross section as needed to maintain neutron conservation. This adjustment can +particle population would not be conserved. This reduction in accuracy due to +the loss in particle conservation can be mitigated by reducing the absorption +cross section as needed to maintain particle conservation. This adjustment can be done when generating the library, or by OpenMC. To have OpenMC perform the adjustment, the total cross section (:math:`\sigma_{t,g}`) must be provided. With this information, OpenMC will then adjust the absorption cross section as @@ -135,12 +137,12 @@ follows: The above method is the same as is typically done with most deterministic methods. Note that this method is less accurate than using the scattering multiplication weight adjustment since simply reducing the absorption cross section does not -include any information about the outgoing energy of the neutrons produced in +include any information about the outgoing energy of the particles produced in these reactions. All of the data discussed in this section can be provided to the code -independent of the neutron's direction of motion (i.e., isotropic), or the data -can be provided as a tabular distribution of the polar and azimuthal neutron +independent of the particle's direction of motion (i.e., isotropic), or the data +can be provided as a tabular distribution of the polar and azimuthal particle direction angles. The isotropic representation is the most commonly used, however inaccuracies are to be expected especially near material interfaces where a material has a very large cross sections relative to the other material diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index cc486ab67..7edd656d6 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -4,6 +4,12 @@ Physics ======= +There are limited differences between physics treatments used in the +continuous-energy and multi-group modes. If distinctions are necessary, each +of the following sections will provide an explanation of the differences. +Otherwise, replacing any references of the particle's energy (`E`) with +references to the particle's energy group (`g) will suffice. + ----------------------------------- Sampling Distance to Next Collision ----------------------------------- @@ -79,6 +85,10 @@ originating from :math:`(n,\gamma)` and other reactions. Elastic Scattering ------------------ +Note that the multi-group mode makes no distinction between elastic or +inelastic scattering reactions. The spceific multi-group scattering +implementation is discussed in the multi-group-scatter_ section. + Elastic scattering refers to the process by which a neutron scatters off a nucleus and does not leave it in an excited. It is referred to as "elastic" because in the center-of-mass system, the neutron does not actually lose @@ -170,6 +180,10 @@ final direction in the lab system. Inelastic Scattering -------------------- +Note that the multi-group mode makes no distinction between elastic or +inelastic scattering reactions. The spceific multi-group scattering +implementation is discussed in the multi-group-scatter_ section. + The major algorithms for inelastic scattering were described in previous sections. First, a scattering cosine is sampled using the algorithms in :ref:`sample-angle`. Then an outgoing energy is sampled using the algorithms in @@ -186,12 +200,67 @@ secondary photons from nuclear de-excitation are tracked in OpenMC. :math:`(n,xn)` Reactions ------------------------ +Note that the multi-group mode makes no distinction between elastic or +inelastic scattering reactions. The specific multi-group scattering +implementation is discussed in the multi-group-scatter_ section. + These types of reactions are just treated as inelastic scattering and as such are subject to the same procedure as described in :ref:`inelastic-scatter`. For reactions with integral multiplicity, e.g., :math:`(n,2n)`, an appropriate number of secondary neutrons are created. For reactions that have a multiplicity given as a function of the incoming neutron energy (which occasionally occurs -for MT=5), the weight of the outgoing neutron is multiplied by the multiplcity. +for MT=5), the weight of the outgoing neutron is multiplied by the multiplicity. + +.. _multi-group-scatter: + +---------------------- +Multi-Group Scattering +---------------------- + +In multi-group mode, a scattering collision requires that the outgoing energy +group of the simulated particle be selected from a probability distribution, +then the change-in-angle selected from a probability distribution according to +the outgoing energy group, and finally the particle's weight adjusted again +according to the outgoing energy group. + +The first step in selecting an outgoing energy group for a particle in a given +incoming energy group is to select a random number (:math:`\xi`) between 0 and +1. This number is then compared to the cumulative distribution function +produced from the outgoing group (`g'`) data for the given incoming group (`g`): + +.. math:: + CDF = \sum_{g'=0}^{h}\Sigma_{s,g \arrow g'} + +If the scattering data is represented as a Legendre expansion, then the +value of :math:`\Sigma_{s,g \arrow g'}` above is simply the 0th order. If the +data is provided as tabular or histogram data, then the value of +:math:`\Sigma_{s,g \arrow g'}` is the sum of all bins of data for a given `g` +and `g'` pair. + +Now that the outgoing energy is known the change-in-angle, :math:`\mu` can be +determined. If the data is provided as a Legendre expansion, this is done by +rejection sampling of the probability distribution represented by the Legendre +series. For efficiency, the selected values of the PDF (:math:`f(\mu)`) are +chosen to be between 0 and the maximum value of :math:`f(\mu)` in the domain of +-1 to 1. + +If the angular data is instead provided as a tabular representation, then the +value of :math:`\mu` is selected as described in the later angle-tabular_ +section with a linear-linear interpolation scheme. + +If the angular data is provided as a histogram representation, then +the value of :math:`\mu` is selected in a similar fashion to that described for +the selection of the outgoing energy (since the energy group representation is +simply a histogram representation) except the CDF is composed of the angular +bins and not the energy groups. However, since we are interested in a specific +value of :math:`\mu` instead of a group, then an angle selected from a uniform +distribution within from the chosen histogram bin. + +The final step in the scattering treatment is to adjust the weight of the +neutron to account for any production of neutrons due to :math:`(n,xn)` +reactions. This data is obtained from the multiplicity data provided in the +multi-group cross section library for the material of interest. +The scaled value will default to 1.0 if no value is provided in the library. .. _fission: @@ -271,10 +340,19 @@ position of the collision site are stored in an array called the fission bank. In a subsequent generation, these fission bank sites are used as starting source sites. +The above description is similar for the multi-group mode except the data are +provided as group-wise data instead of in a continuous-energy format. In this +case, the outgoing energy of the fission neutrons are represented as histograms +by way of either the nu-fission matrix or chi vector. + ----------------------------------------- Secondary Angles and Energy Distributions ----------------------------------------- +Note that this section is specific to continuous-energy mode since the +multi-group scattering process has already been described including the +secondary energy and angle sampling. + For any reactions with secondary neutrons, it is necessary to sample secondary angle and energy distributions. This includes elastic and inelastic scattering, fission, and :math:`(n,xn)` reactions. In some cases, the angle and energy @@ -890,6 +968,9 @@ space distribution at all, the :math:`(n,2n)` reaction with H-2. Transforming a Particle's Coordinates ------------------------------------- +Since all the multi-group data exists in the laboratory frame of reference, this +section does not apply to the multi-group mode. + Once the cosine of the scattering angle :math:`\mu` has been sampled either from a angle distribution or a correlated angle-energy distribution, we are still left with the task of transforming the particle's coordinates. If the outgoing @@ -941,6 +1022,9 @@ the post-collision direction is calculated as Effect of Thermal Motion on Cross Sections ------------------------------------------ +Since all the multi-group data should be generated with thermal scattering +treatments already, this section does not apply to the multi-group mode. + When a neutron scatters off of a nucleus, it may often be assumed that the target nucleus is at rest. However, the target nucleus will have motion associated with its thermal vibration, even at absolute zero (This is due to the @@ -1272,6 +1356,8 @@ described fully in `Walsh et al.`_ |sab| Tables ------------ +Note that |sab| tables are only applicable to continuous-energy transport. + For neutrons with thermal energies, generally less than 4 eV, the kinematics of scattering can be affected by chemical binding and crystalline effects of the target molecule. If these effects are not accounted for in a simulation, the @@ -1461,6 +1547,9 @@ actual algorithm utilized to sample the outgoing angle is shown in equation Unresolved Resonance Region Probability Tables ---------------------------------------------- +Note that unresolved resonance treatments are only applicable to +continuous-energy transport. + In the unresolved resonance energy range, resonances may be so closely spaced that it is not possible for experimental measurements to resolve all resonances. To properly account for self-shielding in this energy range, OpenMC From bbded7667d00b605db52d47b99d391104bc49935 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 12:27:24 -0400 Subject: [PATCH 4/8] Some minor comments in tallies and cmfd methods sections. Only need to add a few links and proof-read the compiled html! --- docs/source/methods/cmfd.rst | 4 ++++ docs/source/methods/tallies.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/source/methods/cmfd.rst b/docs/source/methods/cmfd.rst index 4181f1b37..9403933fd 100644 --- a/docs/source/methods/cmfd.rst +++ b/docs/source/methods/cmfd.rst @@ -8,6 +8,10 @@ This page section discusses how nonlinear diffusion acceleration (NDA) using coarse mesh finite difference (CMFD) is implemented into OpenMC. Before we get into the theory, general notation for this section is discussed. +Note that the methods discussed in this section are written specifically for +continuous-energy mode but equivalent apply to the multi-group mode if the +particle's energy is replaced with the particle's group + -------- Notation -------- diff --git a/docs/source/methods/tallies.rst b/docs/source/methods/tallies.rst index 60a2b9a63..3b01e03f3 100644 --- a/docs/source/methods/tallies.rst +++ b/docs/source/methods/tallies.rst @@ -4,6 +4,10 @@ Tallies ======= +Note that the methods discussed in this section are written specifically for +continuous-energy mode but equivalent apply to the multi-group mode if the +particle's energy is replaced with the particle's group + ------------------ Filters and Scores ------------------ From f828141b281489429fe2b024252e43badb7b07ae Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 14:43:45 -0400 Subject: [PATCH 5/8] fixed references and a few typos --- docs/source/methods/cross_sections.rst | 19 ++++++++----------- docs/source/methods/physics.rst | 2 +- docs/source/usersguide/mgxs_library.rst | 8 +++++--- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/source/methods/cross_sections.rst b/docs/source/methods/cross_sections.rst index bb72a9c75..7fc076f6d 100644 --- a/docs/source/methods/cross_sections.rst +++ b/docs/source/methods/cross_sections.rst @@ -72,13 +72,13 @@ Multi-Group Data The data governing the interaction of particles with various nuclei or materials are represented using a multi-group library format specific to the OpenMC code. -The format is described in the MGXS library specification_ -The data itself can be prepared via multiple paths including: generation via -NJOY_ and TRANSX_, or directly from a continuous-energy OpenMC calculation by -use of the Python API as is shown in the Python API example_ notebooks. This -multi-group library consists of library meta-data (such as the energy group -structure) and multiple `xsdata` objects which contains the required microscopic -or macroscopic multi-group data. +The format is described in the :ref:`mgxs_lib_spec`. +The data itself can be prepared via traditional paths or directly from a +continuous-energy OpenMC calculation by use of the Python API as is shown in the +Python API :ref:`_notebook_mgxs_part_iv` example notebook. This multi-group +library consists of library meta-data (such as the energy group structure) and +multiple `xsdata` objects which contains the required microscopic or macroscopic +multi-group data. At a minimum, the library must contain the absorption cross section (:math:`\sigma_{a,g}`) and a scattering matrix. If the problem is an eigenvalue @@ -98,7 +98,7 @@ however, can be expressed either via Legendre expansion of the particle's change-in-angle (:math:`\mu`), a tabular representation of the probability of a particle experiencing a given :math:`\mu`, or a histogram representation of the probability of a particle experiencing a given :math:`\mu`. The formats used to -represent these are described in the library format specification_. +represent these are described in the :ref:`mgxs_lib_spec`. Unlike the continuous-energy mode, the multi-group mode does not explicitly track particles produced from scattering multiplication (i.e., :math:`(n,xn)`) @@ -170,6 +170,3 @@ or even isotropic scattering. .. _NJOY: http://t2.lanl.gov/codes.shtml .. _ENDF/B data: http://www.nndc.bnl.gov/endf .. _Leppanen: http://dx.doi.org/10.1016/j.anucene.2009.03.019 -.. _specification: ENTER LINK -.. _TRANSX: ENTER LINK -.. _example: ENTER LINK diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index 7edd656d6..3a243f7e8 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -245,7 +245,7 @@ chosen to be between 0 and the maximum value of :math:`f(\mu)` in the domain of -1 to 1. If the angular data is instead provided as a tabular representation, then the -value of :math:`\mu` is selected as described in the later angle-tabular_ +value of :math:`\mu` is selected as described in the :ref:`angle-tabular` section with a linear-linear interpolation scheme. If the angular data is provided as a histogram representation, then diff --git a/docs/source/usersguide/mgxs_library.rst b/docs/source/usersguide/mgxs_library.rst index 11ccae43d..5284e4946 100644 --- a/docs/source/usersguide/mgxs_library.rst +++ b/docs/source/usersguide/mgxs_library.rst @@ -22,9 +22,11 @@ materials. .. _XML: http://www.w3.org/XML/ --------------------------------------- -MGXS Library Specification -- mgxs.xml --------------------------------------- +.. _mgxs_lib_spec: + +-------------------------- +MGXS Library Specification +-------------------------- The multi-group library meta-data is contained within the groups_, group_structure_, and inverse_velocities_ elements. From 6d5951635585382dd2e4ece33c6c7f8e22730d5f Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 14:55:46 -0400 Subject: [PATCH 6/8] proofreading changes --- docs/source/methods/cross_sections.rst | 44 ++++++++++++-------------- docs/source/methods/physics.rst | 16 ++++++---- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/source/methods/cross_sections.rst b/docs/source/methods/cross_sections.rst index 7fc076f6d..9c11d3626 100644 --- a/docs/source/methods/cross_sections.rst +++ b/docs/source/methods/cross_sections.rst @@ -76,48 +76,46 @@ The format is described in the :ref:`mgxs_lib_spec`. The data itself can be prepared via traditional paths or directly from a continuous-energy OpenMC calculation by use of the Python API as is shown in the Python API :ref:`_notebook_mgxs_part_iv` example notebook. This multi-group -library consists of library meta-data (such as the energy group structure) and -multiple `xsdata` objects which contains the required microscopic or macroscopic +library consists of meta-data (such as the energy group structure) and multiple +`xsdata` objects which contains the required microscopic or macroscopic multi-group data. At a minimum, the library must contain the absorption cross section (:math:`\sigma_{a,g}`) and a scattering matrix. If the problem is an eigenvalue -problem then all fissionable materials must also contain either fission spectrum -data (:math:`\chi{g'}`) and a fission production cross section -(:math:`\nu\sigma_{f,g}`), or, a fission production matrix cross section -(:math:`\nu\sigma_{f,g\arrow\g'}`). If fission or energy release from fission -tallies are requested by the user, then the library must also contain the -fission cross section (:math:`\sigma_{f,g}`) or the fission energy release -cross section (:math:`\kappa\sigma_{f,g}`). +problem then all fissionable materials must also contain either +a fission production matrix cross section (:math:`\nu\sigma_{f,g\arrow\g'}`), or +both the fission spectrum data (:math:`\chi{g'}`) and a fission production cross +section (:math:`\nu\sigma_{f,g}`), or, . The library must also contain +the fission cross section (:math:`\sigma_{f,g}`) or the fission energy release +cross section (:math:`\kappa\sigma_{f,g}`) if the associated tallies are +required by the model using the library. After a scattering collision, the outgoing particle experiences a change in both energy and angle. The probability of a particle resulting in a given outgoing energy group (`g'`) given a certain incoming energy group (`g`) is provided -by the scattering matrix cross sections themselves. The angular information, -however, can be expressed either via Legendre expansion of the particle's -change-in-angle (:math:`\mu`), a tabular representation of the probability of -a particle experiencing a given :math:`\mu`, or a histogram representation of the -probability of a particle experiencing a given :math:`\mu`. The formats used to +by the scattering matrix data. The angular information can be expressed either +via Legendre expansion of the particle's change-in-angle (:math:`\mu`), a +tabular representation of the probability distribution function of :math:`\mu`, +or a histogram representation of the same PDF. The formats used to represent these are described in the :ref:`mgxs_lib_spec`. Unlike the continuous-energy mode, the multi-group mode does not explicitly track particles produced from scattering multiplication (i.e., :math:`(n,xn)`) reactions. These are instead accounted for by adjusting the weight of the particle after the collision such that the correct total weight is maintained. -The information for how to adjust this weight is optionally provided by the -`multiplicity` data which exists as a group-wise matrix. This data represents -the average number of particles emitted from a scattering reaction, given a -scattering reaction has occurred: +The weight adjustment factor is optionally provided by the `multiplicity` data +which is required to be provided in the form of a group-wise matrix. +This data is provided as a group-wise matrix since the probability of producing +multiple particles in a scattering reaction depends on both the incoming energy, +`g`, and the sampled outgoing energy, `g'`. This data represents the average +number of particles emitted from a scattering reaction, given a scattering +reaction has occurred: .. math:: multiplicity_{g \arrow g'} = \frac{\nu_{scatter}\sigma_{s,g \arrow g'}}{ \sigma_{s,g \arrow g'}} -This data is provided as a group-wise matrix since the probability of producing -multiple particles in a scattering reaction depends on both the incoming energy, -`g`, and the sampled outgoing energy, `g'`. - If this scattering multiplication information is not provided in the library then no weight adjustment will be performed. This is equivalent to neglecting any additional particles produced in scattering multiplication reactions. @@ -134,7 +132,7 @@ follows: \sigma_{a,g} = \sigma_{t,g} - \sum_{g'}{\nu_{scatter}\sigma_{s,g \arrow g'}} -The above method is the same as is typically done with most deterministic methods. +The above method is the same as is usually done with most deterministic solvers. Note that this method is less accurate than using the scattering multiplication weight adjustment since simply reducing the absorption cross section does not include any information about the outgoing energy of the particles produced in diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index 3a243f7e8..e08965371 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -219,7 +219,7 @@ Multi-Group Scattering In multi-group mode, a scattering collision requires that the outgoing energy group of the simulated particle be selected from a probability distribution, -then the change-in-angle selected from a probability distribution according to +the change-in-angle selected from a probability distribution according to the outgoing energy group, and finally the particle's weight adjusted again according to the outgoing energy group. @@ -232,17 +232,19 @@ produced from the outgoing group (`g'`) data for the given incoming group (`g`): CDF = \sum_{g'=0}^{h}\Sigma_{s,g \arrow g'} If the scattering data is represented as a Legendre expansion, then the -value of :math:`\Sigma_{s,g \arrow g'}` above is simply the 0th order. If the -data is provided as tabular or histogram data, then the value of -:math:`\Sigma_{s,g \arrow g'}` is the sum of all bins of data for a given `g` -and `g'` pair. +value of :math:`\Sigma_{s,g \arrow g'}` above is simply the 0th order for the +given group transfer. If the data is provided as tabular or histogram data, then +the value of :math:`\Sigma_{s,g \arrow g'}` is the sum of all bins of data for a +given `g` and `g'` pair. Now that the outgoing energy is known the change-in-angle, :math:`\mu` can be determined. If the data is provided as a Legendre expansion, this is done by rejection sampling of the probability distribution represented by the Legendre series. For efficiency, the selected values of the PDF (:math:`f(\mu)`) are chosen to be between 0 and the maximum value of :math:`f(\mu)` in the domain of --1 to 1. +-1 to 1. Note that this sampling scheme automatically forces negative values of +the :math:`f(\mu)` probability distribution function to be treated as zero +probabilities. If the angular data is instead provided as a tabular representation, then the value of :math:`\mu` is selected as described in the :ref:`angle-tabular` @@ -254,7 +256,7 @@ the selection of the outgoing energy (since the energy group representation is simply a histogram representation) except the CDF is composed of the angular bins and not the energy groups. However, since we are interested in a specific value of :math:`\mu` instead of a group, then an angle selected from a uniform -distribution within from the chosen histogram bin. +distribution within from the chosen angular bin. The final step in the scattering treatment is to adjust the weight of the neutron to account for any production of neutrons due to :math:`(n,xn)` From 1f60c365a6b22f817fd26dcaf1d92d60e30a8bb9 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 15 Jun 2016 19:36:39 -0400 Subject: [PATCH 7/8] Fixed typos after building and looking at html --- docs/source/methods/cross_sections.rst | 15 ++++++++------- docs/source/methods/physics.rst | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/source/methods/cross_sections.rst b/docs/source/methods/cross_sections.rst index 9c11d3626..869040f5d 100644 --- a/docs/source/methods/cross_sections.rst +++ b/docs/source/methods/cross_sections.rst @@ -75,7 +75,7 @@ are represented using a multi-group library format specific to the OpenMC code. The format is described in the :ref:`mgxs_lib_spec`. The data itself can be prepared via traditional paths or directly from a continuous-energy OpenMC calculation by use of the Python API as is shown in the -Python API :ref:`_notebook_mgxs_part_iv` example notebook. This multi-group +:ref:`notebook_mgxs_part_iv` example notebook. This multi-group library consists of meta-data (such as the energy group structure) and multiple `xsdata` objects which contains the required microscopic or macroscopic multi-group data. @@ -83,9 +83,10 @@ multi-group data. At a minimum, the library must contain the absorption cross section (:math:`\sigma_{a,g}`) and a scattering matrix. If the problem is an eigenvalue problem then all fissionable materials must also contain either -a fission production matrix cross section (:math:`\nu\sigma_{f,g\arrow\g'}`), or -both the fission spectrum data (:math:`\chi{g'}`) and a fission production cross -section (:math:`\nu\sigma_{f,g}`), or, . The library must also contain +a fission production matrix cross section +(:math:`\nu\sigma_{f,g\rightarrow g'}`), or +both the fission spectrum data (:math:`\chi_{g'}`) and a fission production +cross section (:math:`\nu\sigma_{f,g}`), or, . The library must also contain the fission cross section (:math:`\sigma_{f,g}`) or the fission energy release cross section (:math:`\kappa\sigma_{f,g}`) if the associated tallies are required by the model using the library. @@ -113,8 +114,8 @@ reaction has occurred: .. math:: - multiplicity_{g \arrow g'} = \frac{\nu_{scatter}\sigma_{s,g \arrow g'}}{ - \sigma_{s,g \arrow g'}} + multiplicity_{g \rightarrow g'} = \frac{\nu_{scatter}\sigma_{s,g \rightarrow g'}}{ + \sigma_{s,g \rightarrow g'}} If this scattering multiplication information is not provided in the library then no weight adjustment will be performed. This is equivalent to neglecting @@ -130,7 +131,7 @@ follows: .. math:: - \sigma_{a,g} = \sigma_{t,g} - \sum_{g'}{\nu_{scatter}\sigma_{s,g \arrow g'}} + \sigma_{a,g} = \sigma_{t,g} - \sum_{g'}\nu_{scatter}\sigma_{s,g \rightarrow g'} The above method is the same as is usually done with most deterministic solvers. Note that this method is less accurate than using the scattering multiplication diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index e08965371..bb26ffec5 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -87,7 +87,7 @@ Elastic Scattering Note that the multi-group mode makes no distinction between elastic or inelastic scattering reactions. The spceific multi-group scattering -implementation is discussed in the multi-group-scatter_ section. +implementation is discussed in the :ref:`multi-group-scatter` section. Elastic scattering refers to the process by which a neutron scatters off a nucleus and does not leave it in an excited. It is referred to as "elastic" @@ -182,7 +182,7 @@ Inelastic Scattering Note that the multi-group mode makes no distinction between elastic or inelastic scattering reactions. The spceific multi-group scattering -implementation is discussed in the multi-group-scatter_ section. +implementation is discussed in the :ref:`multi-group-scatter` section. The major algorithms for inelastic scattering were described in previous sections. First, a scattering cosine is sampled using the algorithms in @@ -202,7 +202,7 @@ secondary photons from nuclear de-excitation are tracked in OpenMC. Note that the multi-group mode makes no distinction between elastic or inelastic scattering reactions. The specific multi-group scattering -implementation is discussed in the multi-group-scatter_ section. +implementation is discussed in the :ref:`multi-group-scatter` section. These types of reactions are just treated as inelastic scattering and as such are subject to the same procedure as described in :ref:`inelastic-scatter`. For @@ -229,13 +229,13 @@ incoming energy group is to select a random number (:math:`\xi`) between 0 and produced from the outgoing group (`g'`) data for the given incoming group (`g`): .. math:: - CDF = \sum_{g'=0}^{h}\Sigma_{s,g \arrow g'} + CDF = \sum_{g'=0}^{h}\Sigma_{s,g \rightarrow g'} If the scattering data is represented as a Legendre expansion, then the -value of :math:`\Sigma_{s,g \arrow g'}` above is simply the 0th order for the +value of :math:`\Sigma_{s,g \rightarrow g'}` above is the 0th order forthe given group transfer. If the data is provided as tabular or histogram data, then -the value of :math:`\Sigma_{s,g \arrow g'}` is the sum of all bins of data for a -given `g` and `g'` pair. +:math:`\Sigma_{s,g \rightarrow g'}` is the sum of all bins of data for a given +`g` and `g'` pair. Now that the outgoing energy is known the change-in-angle, :math:`\mu` can be determined. If the data is provided as a Legendre expansion, this is done by From 8ea1c5e023b26126eb519aa8aa7156c5c16751fd Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Thu, 16 Jun 2016 19:39:21 -0400 Subject: [PATCH 8/8] Fixed two typos --- docs/source/methods/introduction.rst | 2 +- docs/source/methods/physics.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/methods/introduction.rst b/docs/source/methods/introduction.rst index 0bd067470..dab1c544a 100644 --- a/docs/source/methods/introduction.rst +++ b/docs/source/methods/introduction.rst @@ -124,7 +124,7 @@ proceed. The life of a single particle will proceed as follows: continuous-energy simulation, reactions of type :math:`(n,xn)` are treated as scattering and any additional particles which may be created are added to a secondary particle bank to be tracked later. In a multi-group - simulation, this secondary bank is ont used but the particle weight is + simulation, this secondary bank is not used but the particle weight is increased accordingly. The original particle then continues from step 3. If the reaction is absorption or fission, the particle dies and if necessary, fission sites are created and stored in the fission bank. diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index bb26ffec5..b246584c8 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -8,7 +8,7 @@ There are limited differences between physics treatments used in the continuous-energy and multi-group modes. If distinctions are necessary, each of the following sections will provide an explanation of the differences. Otherwise, replacing any references of the particle's energy (`E`) with -references to the particle's energy group (`g) will suffice. +references to the particle's energy group (`g`) will suffice. ----------------------------------- Sampling Distance to Next Collision