Commit graph

9978 commits

Author SHA1 Message Date
Sterling Harper
89de2ce035 Allow tests to run when OPENMC_ENDF_DATA is unset 2019-09-18 18:34:02 -04:00
Paul Romano
30efbcc6a8 Add a missing virtual destructor on Mesh 2019-09-18 13:37:04 -05:00
Paul Romano
7fe2055b43
Merge pull request #1339 from rockfool/white
White Boundary Condition Implementation
2019-09-18 13:21:53 -05:00
Paul Romano
8f2b0a01b6
Merge pull request #1332 from drewejohnson/depletion-example-notebook
Depletion example notebook
2019-09-18 13:21:34 -05:00
Jiankai
2f9e6fd557
Merge pull request #1 from paulromano/white
Make some fixes/edits in white boundary condition documentation
2019-09-18 13:06:23 -04:00
Paul Romano
3e12e363eb Make some fixes/edits in white boundary condition documentation 2019-09-18 09:39:59 -05:00
Andrew Johnson
cb92f73b18
Add link to openmc.org/depletion-chains in example notebook 2019-09-18 09:24:39 -05:00
Paul Romano
14d947971c
Merge pull request #1350 from drewejohnson/energy-dep-local-heating
Use MT301,901 for energy deposition for depletion
2019-09-18 06:40:49 -05:00
Andrew Johnson
b3c5d98454
Cleaner openmc.deplete namespace with __all__
Provide explicit __all__ lists for files in openmc/deplete
containing classes that should be brought into the "primary"
API. This prevents cluttering the openmc.deplete namespace
caused by the wildcard imports
```
from .nuclide import *
...
```

The abc, cram, and helpers modules are imported simply as
```
from . import abc
from . import cram
from . import helpers
```
2019-09-17 16:24:54 -05:00
rockfool
747e87d31a bug fixed in geometry.rst 2019-09-17 16:34:11 -04:00
Andrew Johnson
72471d249f
Expand openmc.deplete documentation: minimal example and ABCs
Slight reformatting of the depletion documentation. The "Primary API"
is presented at the top, including integrators and the Operator.
This section is followed by a "Minimal Example" that demonstrates
how one might instantiate an Operator, and use it for depletion.
The comm communicator is moved into the "Internal Classes and Functions"
section, as the end-user is less likely to interact with this directly.
Lastly, a section on "Abstract Base Classes" is provided and expanded,
documenting the purpose of specific ABCs.
2019-09-17 14:56:31 -05:00
Andrew Johnson
2428702fb6
Improved documentation for depletion module
* __call__ methods for Operator documented
* CRAM16 and CRAM48 are closer to the top of the page
* Document deplete and timed_deplete functions
* Abstract integrators documented as part of abc submodule
* Abstract operator helpers documented as part of abc submodule
2019-09-17 13:38:23 -05:00
Andrew Johnson
17ded50443
Improve energy deposition methodology 2019-09-17 13:01:50 -05:00
Andrew Johnson
2ab3ad7b78
Minor tweaks to Operator, EnergyScoreHelper
Per reviewer comments
2019-09-17 12:18:51 -05:00
Andrew Johnson
cfbd4f2fd6
Operator aborts in unpacking, not call, if no energy produced 2019-09-17 12:17:49 -05:00
rockfool
06ebf7dbad fix math equation in geometry.rst 2019-09-17 12:41:48 -04:00
rockfool
7bf455d722 add white boundary in surface.py 2019-09-17 12:36:43 -04:00
Andrew Johnson
6b386f8447
Use string score names for EnergyScoreHelper
Operator defaults to using "heating-local" if not running
in coupled photon transport.
2019-09-17 11:34:20 -05:00
rockfool
bfba0e6b1b Merge remote-tracking branch 'upstream/develop' into white 2019-09-17 11:30:58 -04:00
Paul Romano
5b132d05bf
Merge pull request #1346 from pshriwise/complex_cell_fix
Complex Cell Bounding Box Fix
2019-09-17 07:11:22 -05:00
Patrick Shriwise
c0e32b751b Addressing comments from @paulromano. 2019-09-16 23:48:52 -05:00
Andrew Johnson
952cd2a3cf
Doc fix for ResultsList.get_depletion_time 2019-09-16 16:49:23 -05:00
Andrew Johnson
452ad5ac7d
Avoid zero division when normalizing reaction rates
If the system energy is found to be zero, then
Operator.__call__ will exit the simulation using
comm.Abort / sys.exit if no mpi4py. Without this, the
reaction rates will be scaled by power / 0, causing errors
downstream in setting material compositions.
2019-09-16 16:41:51 -05:00
Patrick Shriwise
db2cf9eea6 Updating bounding box to a stack-based traversal of the RPN for complex cells. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
8ebfdc3eb7 Improving documentation. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
ec266e3e0b Updating comments and a variable name 2019-09-16 15:45:54 -05:00
Patrick Shriwise
962f3d46f1 Adding documentation for some of these new methods. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
36fb89dead Making analagous function for finding the right parenthesis. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
25df513a77 Renaming function. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
5bb3d582c9 Consolidating increment operators. Using iterator to setup the subrpn to avoid eating memory if something goes wrong. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
3dfc2da2a5 Removing unused bounding box method. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
c7471af7bf Clenaing and comments. No longer need to address the special case of a complement at the back of the RPN. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
789d55a35a Removing complement operator in a separate step. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
0d02f8b2d2 Working now. Needs cleanup. 2019-09-16 15:45:54 -05:00
Patrick Shriwise
85fa32150a Still needs work 2019-09-16 15:45:53 -05:00
Patrick Shriwise
26fbbb6874 Moving to iterator-based method for advancing through the RPN. 2019-09-16 15:45:53 -05:00
Patrick Shriwise
0f730d213e Added is_valid method to BoundingBox. 2019-09-16 15:45:53 -05:00
Andrew Johnson
74e48521a8
Pass MT301 or MT901 to EnergyHelper from Operator
Depending on settings.photon_transport, obtain the total
system energy from the 301 [heating] or 901 [heating-local]
scores. The former is used in coupled neutron-photon transport,
as this does not include any energy from neutrons or
photons, assuming these particles deposit their energy along
their life. MT901 is used for neutron transport and is the default,
e.g. if scores is None. This score includes energy from
prompt and delayed photons taken from MT458 data.

Related PR: #1344 - Ability to generate KERMAs assuming local
photon energy deposition
2019-09-16 15:24:06 -05:00
Andrew Johnson
ca410a82fe
Ensure strings when setting openmc.lib.Tally.scores
In using lists of containing integer reactions as
the scores, e.g.
```
t = openmc.lib.Tally()
t.scores = [901]
```
The setter would fail as the integers do not have an
encode method. This converts all incoming scores
to strings prior to passing values to the shared library.
2019-09-16 15:12:42 -05:00
Andrew Johnson
016fc0e43e
Use energy deposition score for depletion
Introduce a new subclass of EnergyHelper, EnergyScoreHelper,
that computes the system energy using the energy-deposition score.
This energy is fed back to the Operator to normalize reaction rates.

The energy from the tally is only stored on the helper on the
MPI process 0 as to avoid scaling the system energy by the number
of processes. During the Operator unpacking, the energy reported
by each process is reduced, as the previous implementations took
fission reaction rates from the "local materials", e.g. the
materials each process is responsible for depleting.
The tally results are shared across all processes and only
contains a single quantity, the tallied energy deposition across
all materials.

This mode is controlled by passing the "energy_mode" argument passed
to the Operator. The two options are "fission-q" [default and previous
behavior] and "energy-deposition" [new features]. If energy_mode indicates using
the energy deposition score, the user-supplied fission-q dictionary is not used.

(cherry picked from commit d566f3080f)
2019-09-16 14:04:12 -05:00
Andrew Johnson
0c02e58b78
Documentation for modifications to total heating 2019-09-16 14:01:48 -05:00
rockfool
c88f013795 add white in surface.py 2019-09-16 14:23:31 -04:00
rockfool
d0eb84dd4e fix the conflict in surface.py 2019-09-16 14:12:54 -04:00
Andrew Johnson
3dc0d1ad5d
Merge pull request #1344 from paulromano/local-photon-heating
Ability to generate KERMAs assuming local photon energy deposition
2019-09-16 13:12:26 -05:00
rockfool
fbaa780731 remove the surface.py first 2019-09-16 14:03:05 -04:00
rockfool
781cb0eef7 documentation issues fixed 2019-09-16 13:46:51 -04:00
rockfool
4987f5aea0 modify geometry.rst 2019-09-16 13:36:18 -04:00
rockfool
acc157ad30 remove the example file for white boundary 2019-09-16 12:14:05 -04:00
rockfool
dd9bff40a1 optimize the switch of white boundary 2019-09-16 12:00:47 -04:00
Paul Romano
348dd74dcc Merge branch 'develop' into local-photon-heating 2019-09-16 11:00:33 -05:00