diff --git a/docs/source/io_formats/settings.rst b/docs/source/io_formats/settings.rst index d2cb3b1253..f19a9e902d 100644 --- a/docs/source/io_formats/settings.rst +++ b/docs/source/io_formats/settings.rst @@ -32,6 +32,19 @@ standard deviation. *Default*: false +------------------------------------- +```` Element +------------------------------------- + +The ```` 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 + -------------------- ```` 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 -------------------------- -```` Element -------------------------- + :energy_photon: + The energy under which photons will be killed. -The ```` 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 + +-------------------------------- +```` Element +-------------------------------- + +When photon transport is enabled, the ```` 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. --------------------------- ```` 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 + --------------------------- ```` 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 +------------------------------ +```` Element +------------------------------ + +The ```` 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 + --------------------- ```` 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 -------------------------------------- -```` Element -------------------------------------- - -The ```` 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 - - ------------------------- ```` Element ------------------------- diff --git a/docs/source/io_formats/tallies.rst b/docs/source/io_formats/tallies.rst index 35a205a353..23a0201ca9 100644 --- a/docs/source/io_formats/tallies.rst +++ b/docs/source/io_formats/tallies.rst @@ -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). ------------------ ```` Element diff --git a/docs/source/methods/photon_physics.rst b/docs/source/methods/photon_physics.rst index ce2f9f89aa..4d58ee0db2 100644 --- a/docs/source/methods/photon_physics.rst +++ b/docs/source/methods/photon_physics.rst @@ -256,6 +256,7 @@ Electron-Positron Annihilation Bremsstrahlung -------------- +.. _ttb: Thick-Target Bremsstrahlung Approximation +++++++++++++++++++++++++++++++++++++++++ diff --git a/docs/source/usersguide/cross_sections.rst b/docs/source/usersguide/cross_sections.rst index 058daf23a4..7e596c72f2 100644 --- a/docs/source/usersguide/cross_sections.rst +++ b/docs/source/usersguide/cross_sections.rst @@ -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 diff --git a/docs/source/usersguide/scripts.rst b/docs/source/usersguide/scripts.rst index e815d2edd8..5ae28fac2c 100644 --- a/docs/source/usersguide/scripts.rst +++ b/docs/source/usersguide/scripts.rst @@ -177,6 +177,8 @@ use with OpenMC. This script has the following optional arguments: -n, --neutron_only Whether to exclude photon interaction/atomic data +.. _scripts_photon: + -------------------------- ``openmc-get-photon-data`` -------------------------- @@ -192,6 +194,8 @@ following optional arguments: -c, --cross-sections cross_sections.xml file to append libraries to +.. _scripts_compton: + ----------------------- ``openmc-make-compton`` ----------------------- @@ -201,6 +205,8 @@ Compton profile data using an existing data library from `Geant4 `_. 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`` ------------------------------- diff --git a/docs/source/usersguide/settings.rst b/docs/source/usersguide/settings.rst index 978649a2f5..496d18f7fb 100644 --- a/docs/source/usersguide/settings.rst +++ b/docs/source/usersguide/settings.rst @@ -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) 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 diff --git a/openmc/filter.py b/openmc/filter.py index 4e90993c73..d8e7584aaf 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -548,7 +548,8 @@ class ParticleFilter(Filter): ---------- bins : str, int, or iterable of Integral The Particles to tally. Either str with particle type or their - ID numbers can be used with IDs listed in _PARTICLE_IDS. + ID numbers can be used ('neutron' = 1, 'photon' = 2, 'electron' = 3, + 'positron' = 4). filter_id : int Unique identifier for the filter