Commit graph

9978 commits

Author SHA1 Message Date
Paul Romano
ae28233110 deleting all files to prepare for review 2019-10-28 11:48:19 -05:00
Andrew Johnson
7a4c5b4734
Merge pull request #1373 from paulromano/release-0.11
Final changes for version 0.11
2019-10-08 17:09:41 -04:00
Paul Romano
e07fe06323 Remove -dev tag from version number. Small updates to release notes 2019-10-07 10:33:45 -05:00
Andrew Johnson
54b43a59da
Merge pull request #1371 from paulromano/doc-updates
Documentation fixes and updates
2019-10-07 09:50:46 -04:00
Paul Romano
1c1fca3d70 Respond to @drewejohnson comments on #1371 2019-10-07 07:40:56 -05:00
Paul Romano
5b195b6e9f Various fixes and updates in documentation 2019-10-04 14:00:22 -05:00
Paul Romano
86c081b28b Update MG mode part 3 notebook 2019-10-04 13:59:19 -05:00
Paul Romano
e869d8eef1 Fix documentation build (deplete module was causing issues) 2019-10-04 12:48:23 -05:00
Paul Romano
d32c2175ba Add symbolic link to chain_simple.xml in jupyter notebook directory 2019-10-04 11:26:20 -05:00
Paul Romano
c18f845712 Fix broken links in documentation 2019-10-04 09:33:20 -05:00
Andrew Johnson
a6e6f1d2b1
Merge pull request #1369 from paulromano/data-fixes
Two data-related fixes
2019-10-04 10:32:32 -04:00
Paul Romano
829f12b1b5 Move thermal scattering MAT number bug fixes into a dedicated function 2019-10-03 11:49:56 -05:00
Paul Romano
92d410ed77 Ensure all thermal scattering evals from ENDF/B-VIII.0 and JEFF 3.3 work 2019-10-02 21:35:51 -05:00
Paul Romano
e510064b9c Make sure heating is calculated correctly with threshold fission
When trying to process Pa233 from ENDF/B-VIII.0, which has a threshold fission
reaction, I discovered that calculating heating numbers crashed because we were
trying to do arithmetic on arrays of different sizes. Re-evaluting the fission
cross section on the proper energy grid does the trick here.
2019-10-02 21:35:51 -05:00
Paul Romano
87541e969c
Merge pull request #1363 from smharper/source_azimuth_fix
Rotate azimuthal distributions to match conventional coordinate systems
2019-10-02 21:35:26 -05:00
shikhar413
a4818ba921
Merge pull request #1368 from paulromano/entropy-without-dimension
Make sure Shannon entropy mesh without dimension can be assigned
2019-10-01 13:03:27 -04:00
Sterling Harper
4b19dc9ffc Add TODOs to rotate_angle for a change in azimuth 2019-10-01 11:43:49 -04:00
Paul Romano
9a78836d22 Make sure Shannon entropy mesh without dimension can be assigned 2019-10-01 10:31:29 -05:00
Paul Romano
ae1209e283
Merge pull request #1367 from pshriwise/initialize_mat_id
Correction to `id_` attribute in Material/Filter classes
2019-10-01 08:26:24 -05:00
Paul Romano
db8cdff1c5
Merge pull request #1357 from drewejohnson/internal-tally
Create and use internal tallies for depletion
2019-10-01 08:26:12 -05:00
Andrew Johnson
484bf70c86
Tally.get_writable() -> Tally.writable()
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-09-30 18:55:42 -04:00
Patrick Shriwise
e7b28ab8d9 Removing default values for set_id args as requested by @paulromano. 2019-09-30 14:31:26 -05:00
Paul Romano
ed7123f4e7
Merge pull request #1356 from drewejohnson/dep-solver-class
Provide class-based depletion solvers
2019-09-30 13:23:29 -05:00
Amanda Lund
a9c26c96ee
Merge pull request #1366 from paulromano/check-ace-suffix
Make sure from_ace classmethods get correct type of ACE table
2019-09-27 21:35:57 -05:00
Patrick Shriwise
1b8bc2d01d Correcting default values in set_id methods. Initializing material ids to match the initialization logic. 2019-09-27 10:43:36 -05:00
Andrew Johnson
801f18b357
Provide Tally writable_ setter and getters
New member functions openmc::Tally.set_writable and get_writable
act on the writable attribute. These are used in the external
API with openmc_tally_set_writable and openmc_tally_get_writable
functions.

Cleaned up some other writeable -> writable typos as well
2019-09-26 21:09:13 -04:00
Andrew Johnson
7a1a424d0f
Tally.writeable -> Tally.writable
Oops

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-09-26 20:34:11 -04:00
Andrew Johnson
d112eddbc3
openmc.deplete.cram.IPFCramSolver accepts coefficients at init
Moved from deplete.abc into openmc.deplete.cram. CRAM16 and CRAM48
are aliases to __call__ methods for two instances of
IPFCramSolver: Cram16Solver and Cram48Solver, created using
16th and 48th order coefficients
2019-09-26 20:31:04 -04:00
Paul Romano
60f17ea466 Make sure from_ace classmethods get correct type of ACE table 2019-09-25 12:36:47 -05:00
Paul Romano
a8d90844a3
Merge pull request #1361 from pshriwise/io_fixes
I/O Fixes
2019-09-25 10:19:52 -05:00
Sterling Harper
45aeb35aa9 Rotate azimuthal distributions by pi/2 2019-09-24 15:15:30 -04:00
Patrick Shriwise
c1d746164f Writing empty groups for nuclides/atoms in volume calc if no entries are found. 2019-09-23 12:00:24 -05:00
Paul Romano
684bc7ef1b
Merge pull request #1355 from drewejohnson/depletion-caveats
Add discussion in user's guide on depletion caveats
2019-09-23 06:53:40 -05:00
Patrick Shriwise
0055ecbb3a Read materials from summary.h5 if using DagMC geometry. 2019-09-20 14:22:28 -05:00
Andrew Johnson
1d08279c02
Respond to reviewer comments on depletion caveats 2019-09-20 13:29:46 -05:00
Andrew Johnson
72212f60a2
Use internal tallies to compute quantities for depletion
Tallies created by internal depletion helpers are marked
as internal using the openmc.lib.Tally.writeable property.
This is done to resolve issue #1327 where statepoint files could
grow to be quite large after tallying reaction rates across many
burnable materials for all nuclides of interest.

A check is added in the depletion regression test to ensure that
no additional tallies are loaded to the StatePoint.
2019-09-20 10:50:38 -05:00
Andrew Johnson
4b688e5efa
Teach openmc.StatePoint about internal tallies
When reading tally data from the statepoint file,
tallies that are marked as internal are not created nor added
to the StatePoint.tallies property
2019-09-20 10:31:56 -05:00
Andrew Johnson
a83f4d2bb2
Rename capi_* fixtures to lib_* in test_lib.py 2019-09-20 10:17:52 -05:00
Andrew Johnson
66593fd7e1
Expose tally.writeable_ through openmc.lib
Add two functions to capi.h:
openmc_tally_set_writeable and openmc_tally_get_writeable
which are exposed to the Python API through the
openmc.lib.Tally.writeable property. These functions are very
similar to the set/get active counterparts as both act on a boolean
Tally attribute

A new unit test test_tally_writeable has been added that toggles
the writeable state of a tally. It is important to note that the
writeable state must be reset, otherwise tallies in subsequent
tests will be skewed. This is because the test_tally_writeable
function requires the capi_simulation_init fixture and the tallies
are shared by those functions that use the capi_run fixture
2019-09-20 10:13:26 -05:00
Andrew Johnson
1300ca2678
Teach load_state_point about internal tallies
When reading in tally data from a statepoint file, a check
is performed on the "internal" attribute of the tally group.
If the attribute doesn't exist (previous statepoint files), then
it is assumed that the tally is writeable / not internal. Otherwise,
the internal attribute is read from the dataset.

If the tally is determined to be internal, the value of
tally.writeable_ is set to false and no tally data
is read
2019-09-20 10:12:55 -05:00
Andrew Johnson
2ead24e172
Teach openmc_statepoint_write about internal tallies
If a tally is marked as not writeable, a tally group
will still be added to the statepoint file. However,
no filter, score, nuclide, or results data will be written to
this tally group. A new attribute is introduced to this tally
group "internal" that is an integer flag: 0 if the tally
is not internal (i.e. is writeable) and 1 if the tally is
internal (i.e. is not writeable).

The internal attribute has been added to the statepoint
io format in the documentation.

Other changes: use
```
const auto& tally : model::tallies

  tally->X
```
to iterate over tallies during the writing process
2019-09-20 10:02:38 -05:00
Andrew Johnson
df387e87dc
Document concrete and abstract depletion solvers 2019-09-19 16:51:38 -05:00
Andrew Johnson
07d3207d88
Provide class-based CRAM solvers
CRAM16 and CRAM48 are now aliases for __call__ methods
on two new classes: openmc.deplete.cram.Cram16Solver
and Cram48Solver. These are two concrete subclasses of
openmc.deplete.abc.IPFCramSolver and
openmc.deplete.abc.DepSystemSolver abstract classes.

The primary benefit of the class based approach is that the
16th and 48th order have nearly identical implementations. The only
differences are the alpha, theta, and alpha_0 coefficients used.
This allows both the Cram16Solver and Cram48Solver to have unique
sets of coefficient vectors, while relying on the IPFSolver base
class implementation.

The implementation of IPF CRAM has been cleaned up. The NxN identity
matrix is not re-created each iteration. Given the alpha and
theta attributes on the IPFCramSolver instances, one can
iterate through the orders using a zip command. By forcing concrete
classes to declared alpha and theta vectors, the need to re-declare
the vectors at each entrance into CRAM48 is also removed.

Using these classes, a 10% speedup is observed depleting up to 500
materials on a single MPI process. The function-based approach
took 62s, while the new classes required 52s.
2019-09-19 16:44:13 -05:00
Andrew Johnson
12201f7361
Add discussion in user's guide on depletion caveats
Potential over-depletion using the fission-q
energy deposition mode and some remedies.

Repeated burnable materials are depleted as a single material
unless diff_burnable_mats=True is given to the Operator
2019-09-19 16:37:26 -05:00
Andrew Johnson
0fc57b207b
Teach output write_tallies about writeable tallies
The tally header will still be written, but no summary,
scores, or filters will be written. Instead, the output
will indicate the tally is internal.
2019-09-19 10:06:58 -05:00
Paul Romano
384954b099
Merge pull request #1352 from drewejohnson/dep-namespace-cleanup
Cleaner depletion module documentation and namespace
2019-09-19 09:42:12 -05:00
Andrew Johnson
e17687d457
Add openmc::Tally.writeable_ attribute
Boolean flag that indicates if a tally should be written to
output files. This has no effect on tally scoring, but instead
will be used to skip writing Tally data for those not marked
as writeable.

Related to #1327 as the depletion interface will use this flag
to reduce time spent writing reaction rate tallies and also
reducing the size of the final statepoint files
2019-09-19 09:18:26 -05:00
Patrick Shriwise
d5136c8cb0
Merge pull request #1354 from paulromano/mesh-virtual-dtr
Add a missing virtual destructor on Mesh
2019-09-19 09:07:05 -05:00
Andrew Johnson
7a2b52dd84
Apply suggestions from code review
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-09-19 08:05:30 -05:00
Paul Romano
90ce9723ca
Merge pull request #1353 from smharper/tests_endf_data
Allow tests to run when OPENMC_ENDF_DATA is not set
2019-09-19 07:02:15 -05:00