Merge pull request #1023 from amandalund/photon-new

Photon Transport
This commit is contained in:
Paul Romano 2018-08-05 16:04:36 -05:00 committed by GitHub
commit 9fa0ca2b06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 33696 additions and 442 deletions

View file

@ -1,8 +1,8 @@
.. _io_nuclear_data:
========================
Nuclear Data File Format
========================
=========================
Nuclear Data File Formats
=========================
---------------------
Incident Neutron Data
@ -10,7 +10,7 @@ Incident Neutron Data
**/**
:Attributes:
:Attributes: - **filetype** (*char[]*) -- String indicating the type of file
- **version** (*int[2]*) -- Major and minor version of the data
**/<nuclide name>/**
@ -22,7 +22,9 @@ Incident Neutron Data
- **atomic_weight_ratio** (*double*) -- Mass in units of neutron masses
- **n_reaction** (*int*) -- Number of reactions
:Datasets: - **energy** (*double[]*) -- Energy points at which cross sections are tabulated
:Datasets:
- **energy** (*double[]*) -- Energies in [eV] at which cross sections
are tabulated
**/<nuclide name>/kTs/**
@ -31,7 +33,7 @@ temperature-dependent data set. For example, the data set corresponding to
300 Kelvin would be located at `300K`.
:Datasets:
- **<TTT>K** (*double*) -- kT values (in eV) for each temperature
- **<TTT>K** (*double*) -- kT values in [eV] for each temperature
TTT (in Kelvin)
**/<nuclide name>/reactions/reaction_<mt>/**
@ -113,6 +115,92 @@ temperature-dependent data set. For example, the data set corresponding to
:ref:`tabulated <1d_tabulated>`) -- The recoverable fission Q-value
(Q_prompt + delayed neutrons + delayed photons + betas)
--------------------
Incident Photon Data
--------------------
**/**
:Attributes: - **filetype** (*char[]*) -- String indicating the type of file
- **version** (*int[2]*) -- Major and minor version of the data
**/<element>/**
:Attributes: - **Z** (*int*) -- Atomic number
:Datasets:
- **energy** (*double[]*) -- Energies in [eV] at which cross sections
are tabulated
**/<element>/bremsstrahlung/**
:Datasets: - **electron_energy** (*double[]*) -- Incident electron energy in [eV]
- **photon_energy** (*double[]*) -- Outgoing photon energy as
fraction of incident electron energy
- **dcs** (*double[][]*) -- Bremsstrahlung differential cross section
at each incident energy in [mb/eV]
**/<element>/coherent/**
:Datasets: - **xs** (*double[]*) -- Coherent scattering cross section in [b]
- **integrated_scattering_factor** (:ref:`tabulated <1d_tabulated>`)
-- Integrated coherent scattering form factor
- **anomalous_real** (:ref:`tabulated <1d_tabulated>`) -- Real part
of the anomalous scattering factor
- **anomalous_imag** (:ref:`tabulated <1d_tabulated>`) -- Imaginary
part of the anomalous scattering factor
**/<element>/compton_profiles/**
:Datasets: - **binding_energy** (*double[]*) -- Binding energy for each subshell in [eV]
- **num_electrons** (*double[]*) -- Number of electrons in each subshell
- **pz** (*double[]*) -- Projection of the electron momentum on the
scattering vector in units of :math:`me^2 / \hbar` where :math:`m`
is the electron rest mass and :math:`e` is the electron charge
- **J** (*double[][]*) -- Compton profile for each subshell in units
of :math:`\hbar / (me^2)`
**/<element>/incoherent/**
:Datasets: - **xs** (*double[]*) -- Incoherent scattering cross section in [b]
- **scattering_factor** (:ref:`tabulated <1d_tabulated>`) --
**/<element>/pair_production_electron/**
:Datasets: - **xs** (*double[]*) -- Pair production (electron field) cross section in [b]
**/<element>/pair_production_nuclear/**
:Datasets: - **xs** (*double[]*) -- Pair production (nuclear field) cross section in [b]
**/<element>/photoelectric/**
:Datasets: - **xs** (*double[]*) -- Total photoionization cross section in [b]
**/<element>/stopping_powers/**
:Datasets: - **I** (*double*) -- Mean excitation energy in [eV]
- **energy** (*double[]*) -- Energies in [eV]
- **s_collision** (*double[]*) -- Collision stopping power in [eV-cm\ :sup:`2`\ /g]
- **s_radiative** (*double[]*) -- Radiative stopping power in [eV-cm\ :sup:`2`\ /g]
**/<element>/subshells/**
:Attributes: - **designators** (*char[][]*) -- Designator for each shell, e.g. 'M2'
**/<element>/subshells/<designator>/**
:Attributes: - **binding_energy** (*double*) -- Binding energy of the subshell in [eV]
- **num_electrons** (*double*) -- Number of electrons in the subshell
:Datasets: - **transitions** (*double[][]*) -- Atomic relaxation data
- **xs** (*double[]*) -- Photoionization cross section for subshell
in [b] tabulated against the main energy grid
:Attributes:
- **threshold_idx** (*int*) -- Index on the energy
grid of the reaction threshold
-------------------------------
Thermal Neutron Scattering Data
-------------------------------

View file

@ -32,6 +32,19 @@ standard deviation.
*Default*: false
-------------------------------------
``<create_fission_neutrons>`` Element
-------------------------------------
The ``<create_fission_neutrons>`` element indicates whether fission neutrons
should be created or not. If this element is set to "true", fission neutrons
will be created; otherwise the fission is treated as capture and no fission
neutron will be created. Note that this option is only applied to fixed source
calculation. For eigenvalue calculation, fission will always be treated as real
fission.
*Default*: true
--------------------
``<cutoff>`` Element
--------------------
@ -55,31 +68,35 @@ you care. This element has the following attributes/sub-elements:
*Default*: 1.0
:energy:
The energy under which particles will be killed.
:energy_neutron:
The energy under which neutrons will be killed.
*Default*: 0.0
-------------------------
``<energy_grid>`` Element
-------------------------
:energy_photon:
The energy under which photons will be killed.
The ``<energy_grid>`` element determines the treatment of the energy grid during
a simulation. The valid options are "nuclide", "logarithm", and
"material-union". Setting this element to "nuclide" will cause OpenMC to use a
nuclide's energy grid when determining what points to interpolate between for
determining cross sections (i.e. non-unionized energy grid). Setting this
element to "logarithm" causes OpenMC to use a logarithmic mapping technique
described in LA-UR-14-24530_. Setting this element to "material-union" will
cause OpenMC to create energy grids that are unionized material-by-material and
use these grids when determining the energy-cross section pairs to interpolate
cross section values between.
*Default*: 1000.0
*Default*: logarithm
:energy_electron:
The energy under which electrons will be killed.
.. note:: This element is not used in the multi-group :ref:`energy_mode`.
*Default*: 0.0
.. _LA-UR-14-24530: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-14-24530.pdf
:energy_positron:
The energy under which positrons will be killed.
*Default*: 0.0
--------------------------------
``<electron_treatment>`` Element
--------------------------------
When photon transport is enabled, the ``<electron_treatment>`` element tells
OpenMC whether to deposit all energy from electrons locally (``led``) or create
secondary bremsstrahlung photons (``ttb``).
*Default*: ttb
.. _energy_mode:
@ -153,8 +170,7 @@ the estimated eigenvalue. It has the following attributes/sub-elements:
*Default*: None
.. note:: See section on the :ref:`trigger` for more information.
.. note:: See section on the :ref:`trigger` for more information.
---------------------------
``<log_grid_bins>`` Element
@ -169,6 +185,8 @@ based on the recommended value in LA-UR-14-24530_.
.. note:: This element is not used in the multi-group :ref:`energy_mode`.
.. _LA-UR-14-24530: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-14-24530.pdf
---------------------------
``<max_order>`` Element
---------------------------
@ -259,11 +277,21 @@ out the file and "false" will not.
-----------------------
This element indicates the number of neutrons to simulate per fission source
iteration when a k-eigenvalue calculation is performed or the number of neutrons
per batch for a fixed source simulation.
iteration when a k-eigenvalue calculation is performed or the number of
particles per batch for a fixed source simulation.
*Default*: None
------------------------------
``<photon_transport>`` Element
------------------------------
The ``<photon_transport>`` element determines whether photon transport is
enabled. This element has no attributes or sub-elements and can be set to
either "false" or "true".
*Default*: false
---------------------
``<ptables>`` Element
---------------------
@ -379,6 +407,11 @@ attributes/sub-elements:
*Default*: 1.0
:particle:
The source particle type, either ``neutron`` or ``photon``.
*Default*: neutron
:file:
If this attribute is given, it indicates that the source is to be read from
a binary source file whose path is given by the value of this element. Note,
@ -812,20 +845,6 @@ and 10. The verbosity levels are defined as follows:
*Default*: 7
-------------------------------------
``<create_fission_neutrons>`` Element
-------------------------------------
The ``<create_fission_neutrons>`` element indicates whether fission neutrons
should be created or not. If this element is set to "true", fission neutrons
will be created; otherwise the fission is treated as capture and no fission
neutron will be created. Note that this option is only applied to fixed source
calculation. For eigenvalue calculation, fission will always be treated as real
fission.
*Default*: true
-------------------------
``<volume_calc>`` Element
-------------------------

View file

@ -125,8 +125,8 @@ attributes/sub-elements:
:type:
The type of the filter. Accepted options are "cell", "cellfrom",
"cellborn", "surface", "material", "universe", "energy", "energyout", "mu",
"polar", "azimuthal", "mesh", "distribcell", "delayedgroup", and
"energyfunction".
"polar", "azimuthal", "mesh", "distribcell", "delayedgroup",
"energyfunction", and "particle".
:bins:
A description of the bins for each type of filter can be found in
@ -299,6 +299,9 @@ should be set to:
``energyfunction`` filters do not use the ``bins`` entry. Instead
they use ``energy`` and ``y``.
:particle:
A list of integers indicating the type of particles to tally ('neutron' = 1,
'photon' = 2, 'electron' = 3, 'positron' = 4).
------------------
``<mesh>`` Element

View file

@ -12,7 +12,8 @@ Theory and Methodology
geometry
cross_sections
random_numbers
physics
neutron_physics
photon_physics
tallies
eigenvalue
parallelization

View file

@ -1,8 +1,8 @@
.. _methods_physics:
.. _methods_neutron_physics:
=======
Physics
=======
===============
Neutron Physics
===============
There are limited differences between physics treatments used in the
continuous-energy and multi-group modes. If distinctions are necessary, each

View file

@ -0,0 +1,275 @@
.. _methods_photon_physics:
==============
Photon Physics
==============
Photons, being neutral particles, behave much in the same manner as neutrons,
traveling in straight lines and experiencing occasional collisions which change
their energy and direction. Photons undergo four basic interactions as they pass
through matter: coherent (Rayleigh) scattering, incoherent (Compton) scattering,
photoelectric effect, and pair/triplet production. Photons with energy in the
MeV range may also undergo photonuclear reactions with an atomic nucleus. In
addition to these primary interaction mechanisms, all processes other than
coherent scattering can result in the excitation/ionization of atoms. The
de-excitation of these atoms can result in the emission of electrons and
photons. Electrons themselves also can produce photons by means of
bremsstrahlung radiation.
-------------------
Photon Interactions
-------------------
Coherent (Rayleigh) Scattering
------------------------------
The elastic scattering of a photon off a free charged particle is known as
Thomson scattering. The differential cross section is independent of the energy
of the incident photon. For scattering off a free electron, the differential
cross section is
.. math::
:label: thomson
\frac{d\sigma}{d\mu} = \pi r_e^2 ( 1 + \mu^2 )
where :math:`\mu` is the cosine of the scattering angle and :math:`r_e` is the
classical electron radius. Thomson scattering can generally occur when the
photon energy is much less than the rest mass energy of the particle.
In practice, most elastic scattering of photons off electrons happens not with
free electrons but those bound in atoms. This process is known as Rayleigh
scattering. The radiation scattered off of individual bound electrons combines
coherently, and thus Rayleigh scattering is also known as coherent
scattering. Even though conceptually we think of the photon interacting with a
single electron, because the wave functions combine constructively it is really
as though the photon is interacting with the entire atom.
The differential cross section for Rayleigh scattering is given by
.. math::
:label: coherent-xs
\frac{d\sigma(E,E',\mu)}{d\mu} &= \pi r_e^2 ( 1 + \mu^2 )~\left| F(x,Z)
+ F' + iF'' \right|^2 \\
&= \pi r_e^2 ( 1 + \mu^2 ) \left [ ( F(x,Z)
+ F'(E) )^2 + F''(E)^2 \right ]
where :math:`F(x,Z)` is a form factor as a function of the momentum transfer
:math:`x` and the atomic number :math:`Z` and the term :math:`F' + iF''`
accounts for `anomalous scattering`_ which can occur near absorption edges. In
a Monte Carlo simulation, when coherent scattering occurs, we only need to
sample the scattering angle using the differential cross section in
:eq:`coherent-xs` since the energy of the photon does not change. In OpenMC,
anomalous scattering is ignored such that the differential cross section
becomes
.. math::
:label: coherent-xs-openmc
\frac{d\sigma(E,E',\mu)}{d\mu} = \pi r_e^2 ( 1 + \mu^2 ) F(x, Z)^2
To construct a proper probability density, we need to normalize the
differential cross section in :eq:`coherent-xs-openmc` by the integrated
coherent scattering cross section:
.. math::
:label: coherent-pdf-1
p(\mu) d\mu = \frac{\pi r_e^2}{\sigma(E)} ( 1 + \mu^2 ) F(x, Z)^2 d\mu.
Since the form factor is given in terms of the momentum transfer, it is more
convenient to change variables of the probability density to :math:`x^2`. The
momentum transfer is traditionally expressed as
.. math::
:label: momentum-transfer
x = \kappa \alpha \sqrt{1 - \mu}
where :math:`\alpha` is the ratio of the photon energy to the electron rest
mass, and the coefficient :math:`\kappa` can be shown to be
.. math::
:label: kappa
\kappa = \frac{m_e c^2}{\sqrt{2}hc} \approx 29.14329,
where :math:`m_e` is the mass of the electron, :math:`c` is the speed of light
in a vacuum, and :math:`h` is Planck's constant. Using :eq:`momentum-transfer`,
we have :math:`\mu = 1 - [x/(\kappa\alpha)]^2` and :math:`d\mu/dx^2 =
-1/(\kappa\alpha)^2`. The probability density in :math:`x^2` is
.. math::
:label: coherent-pdf-x2
p(x^2) dx^2 = p(\mu) \left | \frac{d\mu}{dx^2} \right | dx^2 = \frac{2\pi
r_e^2 A(\bar{x}^2,Z)}{(\kappa\alpha)^2 \sigma(E)} \left (
\frac{1 + \mu^2}{2} \right ) \left ( \frac{F(x, Z)^2}{A(\bar{x}^2, Z)} \right ) dx^2
where :math:`\bar{x}` is the maximum value of :math:`x` that occurs for
:math:`\mu=-1`,
.. math::
:label: xmax
\bar{x} = \kappa \alpha \sqrt{2} = \frac{m_e c^2}{hc} \alpha,
and :math:`A(x^2, Z)` is the integral of the square of the form factor:
.. math::
:label: coherent-int-ff
A(x^2, Z) = \int_0^{x^2} F(x,Z)^2 dx^2.
As you see, we have multiplied and divided the probability density by the
integral of the squared form factor so that the density in :eq:`coherent-pdf-x2`
is expressed as the product of two separate densities in parentheses. In OpenMC,
a table of :math:`A(x^2, Z)` versus :math:`x^2` is pre-generated and used at
run-time to do a table search on the cumulative distribution function:
.. math::
:label: coherent-form-factor-cdf
\frac{\int_0^{x^2} F(x,Z)^2 dx^2}{\int_0^{\bar{x}^2} F(x,Z)^2 dx^2}
Once a trial :math:`x^2` value has been selected, we can calculate :math:`\mu`
and perform rejection sampling using the Thomson scattering differential cross
section. The complete algorithm is as follows:
1. Determine :math:`\bar{x}^2` using :eq:`xmax`.
2. Determine :math:`A_{max} = A(\bar{x}^2, Z)` using the pre-generated
tabulated data.
3. Sample the cumulative density by calculating :math:`A' = \xi_1 A_{max}` where
:math:`\xi_1` is a uniformly distributed random number.
4. Perform a binary search to determine the value of :math:`x^2` which satisfies
:math:`A(x^2, Z) = A'`.
5. By combining :eq:`momentum-transfer` and :eq:`xmax`, calculate :math:`\mu =
1 - 2x^2/\bar{x}^2`.
6. If :math:`\xi_2 < (1 + \mu^2)/2`, accept :math:`\mu`. Otherwise, repeat the
sampling at step 3.
Incoherent (Compton) Scattering
-------------------------------
Before we noted that the Thomson cross section gives the behavior for photons
scattering off of free electrons valid at low energies. The formula for photon
scattering off of free electrons that is valid for all energies can be found
using quantum electrodynamics and is known as the Klein-Nishina_ formula after
the two authors who discovered it:
.. math::
:label: klein-nishina
\frac{d\sigma_{KN}}{d\mu} = \pi r_e^2 \left ( \frac{\alpha'}{\alpha} \right
)^2 \left [ \frac{\alpha'}{\alpha} + \frac{\alpha}{\alpha'} + \mu^2 - 1
\right ]
where :math:`\alpha` and :math:`\alpha'` are the ratios of the incoming and
exiting photon energies to the electron rest mass energy equivalent (0.511 MeV),
respectively. Although it appears that the outgoing energy and angle are
separate, there is actually a one-to-one relationship between them such that
only one needs to be sampled:
.. math::
:label: compton-energy-angle
\alpha' = \frac{\alpha}{1 + \alpha(1 - \mu)}.
Note that when :math:`\alpha'/\alpha` goes to one, i.e., scattering is elastic,
the Klein-Nishina cross section becomes identical to the Thomson cross
section. In general though, the scattering is inelastic and is known as Compton
scattering. When a photon interacts with a bound electron in an atom, the
Klein-Nishina formula must be modified to account for the binding effects. As in
the case of coherent scattering, this is done by means of a form factor. The
differential cross section for incoherent scattering is given by
.. math::
:label: incoherent-xs
\frac{d\sigma}{d\mu} = \frac{d\sigma_{KN}}{d\mu} S(x,Z) = \pi r_e^2 \left (
\frac{\alpha'}{\alpha} \right )^2 \left [ \frac{\alpha'}{\alpha} +
\frac{\alpha}{\alpha'} + \mu^2 - 1 \right ] S(x,Z)
where :math:`S(x,Z)` is the form factor. The approach in OpenMC is to first
sample the Klein-Nishina cross section and then perform rejection sampling on
the form factor. As in other codes, `Kahn's rejection method`_ is used for
:math:`\alpha < 3` and a direct method by Koblinger_ is used for :math:`\alpha
\ge 3`. The complete algorithm is as follows:
1. If :math:`\alpha < 3`, sample :math:`\mu` from the Klein-Nishina cross
section using Kahn's rejection method. Otherwise, use Koblinger's direct
method.
2. Calculate :math:`x` and :math:`\bar{x}` using :eq:`momentum-transfer` and
:eq:`xmax`, respectively.
3. If :math:`\xi < S(x, Z)/S(\bar{x}, Z)`, accept :math:`\mu`. Otherwise repeat
from step 1.
Doppler Energy Broadening
+++++++++++++++++++++++++
LA-UR-04-0487_ and LA-UR-04-0488_
Compton Electrons
+++++++++++++++++
Photoelectric Effect
--------------------
Pair Production
---------------
-------------------
Secondary Processes
-------------------
New photons may be produced in secondary processes related to the main photon
interactions discussed above. A Compton-scattered photon transfers a portion of
its energy to the kinetic energy of the recoil electron, which in turn may lose
the energy as bremsstrahlung radiation. The vacancy left in the shell by the
ejected electron is filled through atomic relaxation, creating a shower of
electrons and fluorescence photons. Similarly, the vacancy left by the electron
emitted in the photoelectric effect is filled through atomic relaxation. Pair
production generates an electron and a positron, both of which can emit
bremsstrahlung radiation before the positron eventually collides with an
electron, resulting in annihilation of the pair and the creation of two
additional photons.
Atomic Relaxation
-----------------
Electron-Positron Annihilation
------------------------------
Bremsstrahlung
--------------
.. _ttb:
Thick-Target Bremsstrahlung Approximation
+++++++++++++++++++++++++++++++++++++++++
.. _Koblinger: https://doi.org/10.13182/NSE75-A26663
.. _anomalous scattering: http://pd.chem.ucl.ac.uk/pdnn/diff1/anomscat.htm
.. _Kahn's rejection method: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/aecu-3259_kahn.pdf
.. _Klein-Nishina: https://en.wikipedia.org/wiki/Klein%E2%80%93Nishina_formula
.. _LA-UR-04-0487: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-04-0487.pdf
.. _LA-UR-04-0488: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-04-0488.pdf

View file

@ -122,6 +122,7 @@ Constructing Tallies
openmc.SpatialLegendreFilter
openmc.SphericalHarmonicsFilter
openmc.ZernikeFilter
openmc.ParticleFilter
openmc.Mesh
openmc.Trigger
openmc.TallyDerivative

View file

@ -19,6 +19,9 @@ Core Classes
openmc.data.CoherentElastic
openmc.data.FissionEnergyRelease
openmc.data.DataLibrary
openmc.data.IncidentPhoton
openmc.data.PhotonReaction
openmc.data.AtomicRelaxation
openmc.data.Decay
openmc.data.FissionProductYields
openmc.data.WindowedMultipole

View file

@ -8,19 +8,19 @@ A Beginner's Guide to OpenMC
What does OpenMC do?
--------------------
In a nutshell, OpenMC simulates neutral particles (presently only neutrons)
moving stochastically through an arbitrarily defined model that represents an
real-world experimental setup. The experiment could be as simple as a sphere of
metal or as complicated as a full-scale `nuclear reactor`_. This is what's known
as `Monte Carlo`_ simulation. In the case of a nuclear reactor model, neutrons
are especially important because they are the particles that induce `fission`_
in isotopes of uranium and other elements. Knowing the behavior of neutrons
allows one to determine how often and where fission occurs. The amount of energy
released is then directly proportional to the fission reaction rate since most
heat is produced by fission. By simulating many neutrons (millions or billions),
it is possible to determine the average behavior of these neutrons (or the
behavior of the energy produced, or any other quantity one is interested in)
very accurately.
In a nutshell, OpenMC simulates neutral particles (presently neutrons and
photons) moving stochastically through an arbitrarily defined model that
represents an real-world experimental setup. The experiment could be as simple
as a sphere of metal or as complicated as a full-scale `nuclear reactor`_. This
is what's known as `Monte Carlo`_ simulation. In the case of a nuclear reactor
model, neutrons are especially important because they are the particles that
induce `fission`_ in isotopes of uranium and other elements. Knowing the
behavior of neutrons allows one to determine how often and where fission
occurs. The amount of energy released is then directly proportional to the
fission reaction rate since most heat is produced by fission. By simulating
many neutrons (millions or billions), it is possible to determine the average
behavior of these neutrons (or the behavior of the energy produced, or any
other quantity one is interested in) very accurately.
Using Monte Carlo methods to determine the average behavior of various physical
quantities in a system is quite different from other means of solving the same

View file

@ -258,6 +258,49 @@ method using :attr:`Settings.resonance_scattering`.
running the :meth:`IncidentNeutron.add_elastic_0K_from_endf` method
may take several minutes to complete.
Photon Cross Sections
---------------------
Photon interaction data is needed to run OpenMC with photon transport enabled.
Some of this data, namely bremsstrahlung cross sections from `Seltzer and
Berger`_, stopping powers from the `NIST ESTAR database`_, and Compton profiles
calculated by `Biggs et al.`_ and available in the Geant4 G4EMLOW data file, is
distributed with OpenMC. The rest is available from the NNDC, which provides
ENDF data from the photo-atomic and atomic relaxation sublibraries of the
ENDF/B-VII.1 library. By default, the :ref:`scripts_nndc` script will download
the ENDF data in addition to the neutron and thermal scattering data, extract
it, combine it with the data from other sources, and convert it to an HDF5
library. Alternatively, the :ref:`scripts_photon` script can be used to
download the photon data on its own and create the HDF5 library:
.. code-block:: sh
openmc-get-photon-data
As with neutrons and thermal scattering, it is possible to use the Python API
directly to convert photon interaction data from an ENDF or ACE file to an HDF5
file. The :class:`openmc.data.IncidentPhoton` class contains an
:meth:`IncidentPhoton.from_ace` method that will generate photon data from an
ACE table and an :meth:`IncidentPhoton.export_to_hdf5` method that writes the
data to an HDF5 file:
::
u = openmc.data.IncidentPhoton.from_ace('92000.12p')
u.export_to_hdf5('U.h5')
Similarly, the :meth:`IncidentPhoton.from_endf` method can be used to read
photon data from an ENDF file. In the case, both the photo-atomic and atomic
relaxation sublibrary files are required:
::
u = openmc.data.IncidentPhoton.from_endf('photoat-092_U_000.endf',
'atom-092_U_000.endf')
Once the HDF5 files have been generated, a library can be created using the
:class:`DataLibrary` class as described in :ref:`create_xs_library`.
-----------------------
Windowed Multipole Data
-----------------------
@ -291,3 +334,6 @@ For an example of how to create a multi-group library, see
.. _MCNP: http://mcnp.lanl.gov
.. _Serpent: http://montecarlo.vtt.fi
.. _TENDL: https://tendl.web.psi.ch/tendl_2015/tendl2015.html
.. _Seltzer and Berger: https://www.sciencedirect.com/science/article/pii/0092640X86900148?via%3Dihub
.. _NIST ESTAR database: https://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html
.. _Biggs et al.: https://www.sciencedirect.com/science/article/pii/0092640X75900303

View file

@ -166,12 +166,57 @@ ENDF/B-VII.1. It has the following optional arguments:
``openmc-get-nndc-data``
------------------------
This script downloads `ENDF/B-VII.1 ACE data
<http://www.nndc.bnl.gov/endf/b7.1/acefiles.html>`_ from NNDC and converts it to
an HDF5 library for use with OpenMC. This script has the following optional
arguments:
This script downloads `ENDF/B-VII.1
<http://www.nndc.bnl.gov/endf/b7.1/acefiles.html>`_ incident neutron ACE data
and incident photon ENDF data from NNDC and converts it to an HDF5 library for
use with OpenMC. This script has the following optional arguments:
-b, --batch Suppress standard in
-b, --batch
Suppress standard in
-n, --neutron_only
Whether to exclude photon interaction/atomic data
.. _scripts_photon:
--------------------------
``openmc-get-photon-data``
--------------------------
This script downloads `ENDF data <http://www.nndc.bnl.gov/endf/b7.1/zips/>`_
from NNDC for photo-atomic and atomic relaxation sublibraries and converts it
to an HDF5 library for use with photon transport in OpenMC. This script has the
following optional arguments:
-b, --batch
Suppress standard in
-c, --cross-sections
cross_sections.xml file to append libraries to
.. _scripts_compton:
-----------------------
``openmc-make-compton``
-----------------------
This script generates an HDF5 file called ``compton_profiles.h5`` that contains
Compton profile data using an existing data library from `Geant4
<http://geant4.cern.ch/>`_. Note that OpenMC includes this data file by default
so it should not be necessary in practice to generate it yourself.
.. _scripts_stopping:
-------------------------------
``openmc-make-stopping-powers``
-------------------------------
This script generates an HDF5 file called ``stopping_power.h5`` that contains
radiative and collision stopping powers and mean excitation energy pulled from
the `NIST ESTAR database
<https://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html>`_. Note that OpenMC
includes this data file by default so it should not be necessary in practice to
generate it yourself.
.. _scripts_plot:

View file

@ -151,10 +151,19 @@ time and another that should be sampled 30% of the time::
settings.source = [src1, src2]
Finally, the :attr:`Source.particle` attribute can be used to indicate the
source should be composed of particles other than neutrons. For example, the
following would generate a photon source::
source = openmc.Source()
source.particle = 'photon'
...
settings.source = source
For a full list of all classes related to statistical distributions, see
:ref:`pythonapi_stats`.
---------------
Shannon Entropy
---------------
@ -190,6 +199,52 @@ property::
settings.entropy_mesh = m
----------------
Photon Transport
----------------
In addition to neutrons, OpenMC is also capable of simulating the passage of
photons through matter. This allows the modeling of photon production from
neutrons as well as pure photon calculations. The
:attr:`Settings.photon_transport` attribute can be used to enable photon
transport::
settings.photon_transport = True
The way in which OpenMC handles secondary charged particles can be specified
with the :attr:`Settings.electron_treatment` attribute. By default, the
:ref:`thick-target bremsstrahlung <ttb>` (TTB) approximation is used to generate
bremsstrahlung radiation emitted by electrons and positrons created in photon
interactions. To neglect secondary bremsstrahlung photons and instead deposit
all energy from electrons locally, the local energy deposition option can be
selected::
settings.electron_treatment = 'led'
.. warning::
Currently, collision stopping powers used in the TTB approximation come from
the `NIST ESTAR database`_, which provides data for each element calculated
using by default the material density at standard temperature and pressure.
In OpenMC, stopping powers for compounds are calculated from this elemental
data using Bragg's additivity rule. However, this is not a good
approximation --- the collision stopping power is a function of certain
quantities, such as the mean excitation energy and particularly the density
effect correction, that depend on material properties. Data for constituent
elements in a compound cannot simply be summed together, but rather these
quantities should be calculated for the material. This treatment will be
especially poor when the density of a material is different from the
densities used in the NIST data.
.. note::
Some features related to photon transport are not currently implemented,
including:
* Tallying photon energy deposition.
* Properly accounting for energy deposition in coupled n-p calculations.
* Generating a photon source from a neutron calculation that can be used
for a later fixed source photon calculation.
* Photoneutron reactions.
--------------------------
Generation of Output Files
--------------------------
@ -224,3 +279,5 @@ As an example, to write a statepoint file every five batches::
settings.batches = n
settings.statepoint = {'batches': range(5, n + 5, 5)}
.. _NIST ESTAR database: https://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html