Commit graph

9978 commits

Author SHA1 Message Date
Andrew Johnson
7885146482
Fix bug when reaction rate nuclides change through depletion
The size of the Operator.reaction_rates does not change through
depletion, but the number of tallied nuclides for reaction
rates may or may not. The DirectReactionRateHelper returns
reaction rates according to the number of nuclides tallied,
a potential subset of all nuclides designated as burnable
by the Operator. This causes IndexErrors if a nuclide is not
tallied at a later step.

Example: 10 nuclides [0-9] are originally tracked by the Operator
and tallied by DirectReactionRateHelper. The Operator.reaction_rates
array will be of shape (n_mat, 10, n_react). Initially, the
DirectReactionRateHelper returns an array of size (10, n_react)
for each material. Then, if nuclide 5 is not in the list of nuclides
passed to the DirectReactionRateHelper at the next step, [decayed to
zero], DirectReactionRateHelper will return an array (9, n_react) and
try to pass tally data for nuclide 9 into row 9 of the reaction rate
array, causing an IndexError.

This commit instructs requires two integers, n_nucs and n_react, to be
passed to the initialization of any ReactionRateHelper, allocating
a single array for storing material-reaction rates. The method
get_material_rates uses this directly and does not re-allocate storage
if len(nuc_index) has changed [like if nuclide 9 has dropped out].
2019-07-25 09:32:13 -05:00
Andrew Johnson
918340a3af
Allow user control over Operator.dilute_initial
Users can now pass dilute_initial as an input
argument into the Operator, and directly set
Operator.dilute_initial. Documentation was updated to
include units on the initial default concentration, which
is 1000 atoms per cubic centimeter. The user is allowed
to set this value to zero.

Notes have been added to ResultsList.get_atoms
and get_reaction_rate methods, indicating why there may
be non-zero values when pulling data for isotopes not
initially present.
A similar note was added to the depletion_results.h5
io format file.

Closes #1288
2019-07-25 08:43:09 -05:00
Paul Romano
a3d34b5b64
Merge pull request #1299 from pshriwise/dagmc_mat_temps
DagMC Material Temperatures
2019-07-24 22:35:52 -05:00
Paul Romano
5178272ca8
Merge pull request #1295 from pshriwise/bounding_boxes
Bounding box updates
2019-07-24 22:34:36 -05:00
Patrick Shriwise
d5eaa3b5b7 Converting double max to np.inf on the Python side for bounding boxes. 2019-07-24 14:36:55 -05:00
Patrick Shriwise
90db1ab38a Removing limit on number of jobs for MOAB CI build. Updates to dagmc unit test file. 2019-07-24 13:17:13 -05:00
Patrick Shriwise
5ad4f94f3a Removing CAPI function for bounding box of any type. Moving to a cell-only function. Tests are adjusted as needed. 2019-07-24 13:10:03 -05:00
Patrick Shriwise
3be6520671 Removing print statement. 2019-07-24 12:49:02 -05:00
Paul Romano
0a85ed41fd
Merge pull request #12 from pshriwise/update-jupyter-notebooks
Typo fix.
2019-07-24 11:01:31 -05:00
Paul Romano
b4b063482e
Merge pull request #1278 from drewejohnson/feat-dep-tally-op
Tally and Q value helper for depletion Operators
2019-07-24 10:54:33 -05:00
Adam Nelson
b7a7277b94
Merge pull request #1300 from paulromano/mg-delayedgroup-fix
Fix bug in Mgxs::get_xs
2019-07-24 08:53:54 -05:00
Patrick Shriwise
3439797e32 Update for case where the entire region is a complement. Addition of a cell and redefinition of another to test more robustly. 2019-07-24 03:02:10 -05:00
Patrick Shriwise
d820e6777a
Apply suggestions from code review
Accessing cell/material names through accessor. Returning a const reference from `name()` accessor in both cases.

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-07-23 14:33:35 -05:00
Patrick Shriwise
67575b3369 Limit number of jobs in MOAB build. 2019-07-23 14:25:33 -05:00
Patrick Shriwise
3183c86bd7 Typo fix. 2019-07-23 12:45:40 -05:00
Patrick Shriwise
173bea7072 No longer run MOAB tests in CI. 2019-07-23 11:43:42 -05:00
Andrew Johnson
6ae45931a6
Re-document number parameter in ReactionRateHelper.divide_by_adens 2019-07-23 11:38:20 -05:00
Andrew Johnson
9f41dce1d2
Return energy in J/s/source neutron for EnergyHelper
Addressing comments in review for #1278

- Documentation cleanup
- Better naming convention regarding ReactionRateHelper
  results cache
- The power in Operator tally unpacking and normalizing is
  no longer converted to eV/s, since the EnergyHelper.energy
  property is now returned in J/s/source neutron
2019-07-23 08:32:31 -05:00
Patrick Shriwise
dc4646c241 Using existing function to run dagmc tests in a temporary directory. 2019-07-23 03:35:40 -05:00
Patrick Shriwise
cc3c516272 Moving local fixture into test file. 2019-07-23 03:11:06 -05:00
Patrick Shriwise
2287d3f418
Update src/dagmc.cpp
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-07-23 03:04:34 -05:00
Patrick Shriwise
20d5f4d9c0 Updating DAGMC filename. 2019-07-23 03:04:12 -05:00
Paul Romano
020c0c306f Fix bug in delayed group index in MG mode tallies 2019-07-22 10:10:53 -05:00
Amanda Lund
cca3012a53
Merge pull request #1298 from paulromano/particle-filter-str
Use strings instead of arbitrary numbers for particle filter
2019-07-22 11:04:09 -04:00
Paul Romano
91fdc10d46 Get rid of erroneous check in ParticleFilter.from_hdf5 2019-07-22 07:12:23 -05:00
Patrick Shriwise
8af8219252 Small change to wording in cad notebook. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
51efa1ef71 Some self review. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
98804f957a Parametrizing cell temperature test. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
d8f9bfdc30 Using map::at() for safety. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
978e7ba94a Adding a note about setting up tallies for DagMC models. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
347f4d7dd5 Separating dagmc cell temperature checks into unit tests. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
89c75a7b82 Sharing model between tests. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
da152b9b0f Updating DagMC s.t. their temperatures can be set using material temps. Also addressig a bug in closing an hdf5 dataset and adding tests. 2019-07-20 12:51:59 -05:00
Patrick Shriwise
71522fd310 Check for material temp and use if cell temp is not set on the .h5m file. 2019-07-20 12:51:59 -05:00
Andrew Johnson
a2545d7d7b
Provide Integrator get bos data from openmc|restart methods
All of the integrators pull the previous concentration and
operator results from a restart file in the same way, but vary
in how subsequent steps are handled. The predictor saves data
here, while the SIE-based methods scale and reset the particles
used. To this end, the _get_bos_data function has been broken into
two methods: one for calling the operator and one for pulling from
a restart file.
2019-07-19 16:43:31 -05:00
Patrick Shriwise
331e198617 Adding test for name setting and relying on std::string's char* constructor. 2019-07-19 10:03:22 -05:00
Patrick Shriwise
f2199af0eb Cleaning up error checking in bounding_box. Updating expected exceptions in the capi tests. 2019-07-19 09:46:47 -05:00
Patrick Shriwise
694bd0cf15 Chaning back to id in bounding_box for now. 2019-07-19 08:54:35 -05:00
Patrick Shriwise
dda5393c78 Improving error returns in bounding_box function. Appying parametrized tests. 2019-07-19 08:04:16 -05:00
Paul Romano
09be1f9293 Update devguide test suite section 2019-07-19 07:40:48 -05:00
Paul Romano
2616655325 Fix use of ENDF_FLOAT_RE in ace.py 2019-07-19 07:40:48 -05:00
Paul Romano
481361ae79 Use strings in representation of particle filter 2019-07-19 07:40:48 -05:00
Paul Romano
3be192cd23 Update many of the Jupyter notebooks 2019-07-19 07:15:36 -05:00
Patrick Shriwise
c1ca3028cb A few more small updates. 2019-07-18 22:43:21 -05:00
Patrick Shriwise
6850d4ce62
Apply suggestions from @paulromano
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-07-18 22:30:35 -05:00
Patrick Shriwise
5b9debe542
Update src/geometry.cpp
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-07-18 22:23:03 -05:00
Patrick Shriwise
933a5c4770 Updates based on suggestions from @paulromano. 2019-07-18 22:21:55 -05:00
Patrick Shriwise
72e92e9ad0 More updates. Adding complex cell test to unit tests. 2019-07-18 18:14:57 -05:00
Patrick Shriwise
c1d8f06ac1 Restoring initial universe bounding box. 2019-07-18 14:49:45 -05:00
Andrew Johnson
808a41b4e3
Improve energy calculation with EnergyHelper.update
EnergyHelper (was FissionEnergyHelper) has a new
``update`` method that replaces get_energy. This method
is no longer abstract and defaults to not performing any actions.
This works in conjunction with a new private ``_energy`` atribute
and ``reset`` method to streamline the energy normalization procedure.
For the current concrete ChainFissionHelper class, the reset method
sets _energy to zero, while the update method updates the energy
with the dot product fission_rates X fission_q_vector.
The total energy produced is made accessible, but not publically
writable with an energy property. After cycling through all
local materials on an operator, the total system energy is computed
by

        energy = comm.allreduce(self._energy_helper.energy)

For a concrete class where the system energy is computed via tallies
and not with Q-values, the update methods could continue to do
nothing. The total system energy could be stored either in the
reset method or returned directly from the energy attribute/property.
2019-07-18 14:35:39 -05:00