Commit graph

9978 commits

Author SHA1 Message Date
Andrew Johnson
f52593ac4a
Update depletion regression test data: store k uncertainties
Uncertainties are stored as of commit 141959dab
Regression test data updated with
pytest --update tests/regression_tests/deplete/test.py
2019-07-02 14:42:31 -05:00
Andrew Johnson
141959dab4
Store k and uncertainty through depletion
Useful for benchmarking and other code to code comparisons.
The data is pulled right from the C api but now the uncertainties
are preserved and written to the depletion results file
2019-07-02 14:33:46 -05:00
Andrew Johnson
e139310894
Add predictor-specific logic in get_depletion_time
The predictor saves BOS number densities, eigenvalues, and
other results before the depletion event, unlike all
other schemes, which have at least one depletion event between
the BOS transport solution and the depletion solve.
This causes the first value in the resulting depletion process
time vector to be zero, and the last value to be non-zero,
opposite to other schemes.
2019-07-02 14:25:38 -05:00
Andrew Johnson
975695b9bc
Merge branch 'develop' into dep-timings 2019-07-02 14:02:18 -05:00
Andrew Johnson
48b8b8b69a
Merge branch 'develop' into feat-pin 2019-07-01 10:43:48 -05:00
Andrew Johnson
cca338554f
Merge branch 'develop' into feat-dep-tally-op 2019-07-01 10:42:04 -05:00
Andrew Johnson
e67abde622
Use match argument in calls to pytest.raises when testing pin 2019-07-01 09:29:56 -05:00
Adam Nelson
fb54b035a7
Merge pull request #1271 from paulromano/thermal-refactor
Refactor thermal scattering data
2019-07-01 09:29:41 -05:00
Andrew Johnson
888086ac29
Add base class for TallyHelpers
Interface is designed such that one could make a tally
helper work with unique materials, mainly for pulling
fission Q values on a per material basis
2019-07-01 09:22:01 -05:00
Andrew Johnson
c44154b5f1
Tally helper for helping operator with tallies, q values
openmc.deplete.tally_helers.ChainFissTallyHelper is responsible
for populating the fission_q vector, building the reaction rate
tallies, and updating the energy produced by fission per material.

This abstraction will be helpful as more methods for pulling
fission q values are introduced, namely as issue #1238, indirect
energy release, gets resolved
2019-07-01 08:57:18 -05:00
Paul Romano
d28bf01241 Add option in download() to appear as browser 2019-07-01 07:28:47 -05:00
Paul Romano
d9b27cca53 Respond to @nelsonag comments on #1271 2019-07-01 07:09:10 -05:00
Andrew Johnson
1475e25bf3
Add Universe subclass openmc.model.Pin
Designed to facilitate building universe that represent
pins, or concentric cylinders of materials. Can be built
by passing surfaces and materials, or radii and materials.
Places last material spanning region out to infinity from
the last surface.

Supports subdividing rings into equal volume slices of
unique [cloned] materials, useful for depletion.

Unit tests added for failure modes as well as basic operation
2019-06-30 15:14:14 -05:00
Paul Romano
3952f5bba1
Merge pull request #1273 from drewejohnson/feat-op-qvalues
Option to pass fission q values to Chain, Operator, Model
2019-06-29 06:47:43 -05:00
Andrew Johnson
1e6f15236a
fiss_q_values -> fission_q for passing q values 2019-06-28 10:30:28 -05:00
Andrew Johnson
0e125b2548
Option to pass fission q values to Chain, Operator, Model
A dictionary of constant fission q values [eV] can be passed
into the initialization of deplete.Chain, deplete.Operator,
and model.Model objects. This can be used for direct
comparisons with other codes with readily available
constant Q-values.

Tests have been added on the Chain and Operator side.
The additional fiss_q_values passed into Model is forwarded
directly on to the Operator call.
2019-06-27 11:42:18 -05:00
Andrew Johnson
2efc7e8b71
Fix issue with vector proc_time in reading depletion_summary
Previous changes made proc_time a vector, not an (N, 1) array.
The reading of this data was not updated accordingly, until now
2019-06-27 10:29:56 -05:00
Andrew Johnson
32cb3ddcf2
Merge branch 'develop' into dep-timings 2019-06-26 17:53:12 -05:00
Andrew Johnson
544cbd0c39
Use unittest.Mock for MPI when collecting proc_time 2019-06-26 17:52:27 -05:00
Andrew Johnson
8deda73647
Update Results and ResultsList doc on proc_time
Process time that is stored in the dataset is the
average time spent depleting a material across
all materials and processes.
2019-06-26 17:50:40 -05:00
Andrew Johnson
875ba94825
Set proc_time argument in Results.save to default to None
Adjust final calls to integrator routines accordingly.

Minor documentation changes
2019-06-26 17:47:02 -05:00
Paul Romano
d10265ac2c
Merge pull request #1268 from drewejohnson/operator-mpi-checks
Check that hdf5 has MPI if performing depletion with MPI
2019-06-26 13:53:22 -05:00
Andrew Johnson
830c0237a8
Clean up imports in openmc/deplete/__init__.py 2019-06-25 13:29:20 -05:00
Paul Romano
7c82e7c9bc
Merge pull request #1267 from gridley/fix_keff_trigger
stop division by zero in keff trigger if no trigger given
2019-06-25 13:03:47 -05:00
Paul Romano
97ea3287c2 Only replace incoherent elastic in ThermalScattering.from_njoy with ENDF data 2019-06-25 09:47:26 -05:00
Paul Romano
c2e612a503 Update HDF5 data version to 3.0 2019-06-25 07:31:53 -05:00
Paul Romano
7a1afc5869 Store 0-based threshold indices in HDF5 files 2019-06-25 07:31:53 -05:00
Paul Romano
adce57093d Add ability to use ENDF incoherent elastic data, update unit tests 2019-06-25 07:31:53 -05:00
Paul Romano
c8bf27af42 Add more thermal scattering unit tests and clean up some HDF5-related methods 2019-06-25 07:31:53 -05:00
Paul Romano
707eefbf65 Allow iwt to be specified on ACER runs for thermal scattering 2019-06-25 07:31:53 -05:00
Paul Romano
228392eee5 Fix existing unit tests for thermal scattering 2019-06-25 07:31:53 -05:00
Paul Romano
3cf937eaaa Update I/O format for thermal neutron scattering 2019-06-25 07:31:53 -05:00
Paul Romano
c48d5f07c4 Change how incoherent elastic data is written to HDF5 2019-06-25 07:31:53 -05:00
Paul Romano
c851030511 Refactor ThermalScattering::calculate_xs and add energy_max to class 2019-06-25 07:31:53 -05:00
Paul Romano
fd1f01a911 Move thermal scattering reaction data into ThermalData::Reaction type 2019-06-25 07:31:53 -05:00
Paul Romano
3e4fe61673 Start adding thermal angle-energy classes on C++ side 2019-06-25 07:31:53 -05:00
Paul Romano
c65366d7a0 Add IncoherentInelasticAEContinuous class stub 2019-06-25 07:31:53 -05:00
Paul Romano
8ea8206193 Move thermal angle-energy distributions into separate file 2019-06-25 07:31:53 -05:00
Paul Romano
51c8c2e0bc Refactor classes in openmc.data.ThermalScattering 2019-06-25 07:31:53 -05:00
Paul Romano
4ad1aeac3a Fix potential bug in Decay class 2019-06-25 07:31:53 -05:00
Paul Romano
3e5741e1bb Fix CoherentElastic.__call__ 2019-06-25 07:31:53 -05:00
Paul Romano
fbacfa0e5c Add a from_endf method to ThermalScattering that returns a dict 2019-06-25 07:31:53 -05:00
Patrick Shriwise
dccc9105cc
Merge pull request #1232 from paulromano/rotate-lattice
Allow cells filled with lattices to be translated/rotated
2019-06-24 15:47:47 -05:00
Andrew Johnson
71d31d6ea6
Update test_deplete_predictor to check depletion time
Due to where the results are saved for the predictor routine,
at the top of the for loop vs. the end, the positions
are incremented by one in the depletion time. This causes
a value of zero to be returned as the first item in the array
from get_depletion_time.

This save was moved in commit 87aed7a0b0
of PR #1014 to make the restart feature easier.
2019-06-21 14:39:22 -05:00
Andrew Johnson
bd0a9a18e4
Modify Results.from_hdf5 to support for files w/o depletion time
Needed because ./tests/regression_tests/deplete/test_reference.h5
does not contain this dataset. Now, a check is performed
to see if "depletion file" is present in the root of the hdf5 file.
Otherwise, the proc_time is set to the array of nans
2019-06-21 14:09:34 -05:00
Andrew Johnson
df07ecbcfa
Pass proc_time of None for test_deplete_integrator.py 2019-06-21 13:52:35 -05:00
Andrew Johnson
6583834bd4
Store depletion time for leqi, si_celi, si_leqi routines 2019-06-21 13:48:16 -05:00
Andrew Johnson
f1157e90d4
Store and test storage of process time for cecm, celi, epc_rk4 2019-06-21 12:08:33 -05:00
Andrew Johnson
3a963b4183
Modify depletion time matrix size; Remove index - 1 in Results.save
The index - 1 was causing values to be written in a correctly sized
matrix, but in an offset pattern, e.g. first value written
to last position, second value to first position, etc.
The ResultsList.get_depletion_time method will already
trim this array in the retrieval process.
2019-06-21 11:49:17 -05:00
Andrew Johnson
da23e4646d
Reduce in deplete.Results.save only if proc_time is not None 2019-06-21 10:25:10 -05:00