diff --git a/docs/source/io_formats/mgxs_library.rst b/docs/source/io_formats/mgxs_library.rst index 6ba748da9..b6708a88d 100644 --- a/docs/source/io_formats/mgxs_library.rst +++ b/docs/source/io_formats/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. 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/cross_sections.rst b/docs/source/methods/cross_sections.rst index ec8f8fe45..4ed777536 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,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 @@ -58,12 +61,11 @@ 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_. ---------------------------------- Windowed Multipole Representation --------------------------------- @@ -137,7 +139,98 @@ scattering does not occur in the resolved resonance region. This is usually, but not always the case. Future library versions may eliminate this issue. The data format used by OpenMC to represent windowed multipole data is specified -in :ref:`io_data_wmp` +in :ref:`io_data_wmp`. + +---------------- +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 :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 +: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. + +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\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. + +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 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 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 \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 +any additional particles produced in scattering multiplication reactions. +However, this assumption will result in a loss of accuracy since the total +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 +follows: + +.. math:: + + \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 +weight adjustment since simply reducing the absorption cross section does not +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 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 +(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 diff --git a/docs/source/methods/introduction.rst b/docs/source/methods/introduction.rst index 508ac9919..dab1c544a 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,15 +45,20 @@ 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 - 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: @@ -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 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. 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/physics.rst b/docs/source/methods/physics.rst index cc486ab67..b246584c8 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 :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" 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 :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 :ref:`sample-angle`. Then an outgoing energy is sampled using the algorithms in @@ -186,12 +200,69 @@ 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 :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 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, +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 \rightarrow g'} + +If the scattering data is represented as a Legendre expansion, then 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 +: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 +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. 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` +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 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)` +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 +342,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 +970,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 +1024,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 +1358,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 +1549,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 diff --git a/docs/source/methods/tallies.rst b/docs/source/methods/tallies.rst index 65a0989ac..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 ------------------ @@ -32,8 +36,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 +60,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 +201,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 +436,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