Commit graph

1359 commits

Author SHA1 Message Date
Paul Romano
ff4c70c477
Merge pull request #1284 from drewejohnson/feat-capture-branch
Chain get/set capture branching ratios
2019-07-15 12:52:30 -05:00
Paul Romano
1f0fde281c
Merge pull request #1281 from drewejohnson/fix-material-get-temp
Read in material temperatures from xml subelement
2019-07-15 08:10:10 -05:00
Paul Romano
a55ff7539a
Merge pull request #1276 from drewejohnson/feat-pin
Add openmc.model.pin convenience function
2019-07-15 07:21:35 -05:00
Andrew Johnson
768949a972
Add support for non-Materials to be used in pin function
Anything that can be filled by a cell can be passed to
openmc.model.pin, including Universes and lattices.
Checks are included for the volume division, as not
all supported items, like Lattice instances, have volume
attributes.

A test was added to check this capability, where a universe
is used as one of the interior elements for the pin.

Various cosmetic changes to address reviewer comments.
2019-07-12 17:08:47 -05:00
Andrew Johnson
0cebc507a9
Add support for Universe kwargs to openmc.model.pin 2019-07-12 16:45:48 -05:00
Paul Romano
9a248ad6fb Fix bug in cylinder_from_points (for real this time) 2019-07-11 06:14:53 -05:00
Paul Romano
0db41d2281 Update cylinder_from_points test based on @amandalund feedback 2019-07-10 14:50:42 -05:00
Andrew Johnson
044ac4ce2a
Option to divide material volumes by pin divisions 2019-07-09 20:23:54 -05:00
Paul Romano
0c32470551 Finish improving Material interface 2019-07-09 06:43:16 -05:00
Paul Romano
40f89caa22 Fix cylinder_from_points function 2019-07-08 23:24:19 -05:00
Andrew Johnson
a7b6737069
Test failure modes for Chain.set_capture_branches
Remove one validation check, that the passed item is a
dict of strings. The check is covered when every key is
inspected to ensure all parents exist in the chain
2019-07-08 14:01:57 -05:00
Andrew Johnson
5b7253bca0
Add tests for getting, setting capture branching ratios
Work with the test chain with isotopes A, B, C to make
minor modifications to a depletion chain.

Work with the "reference chain" at tests/chain_simple.xml to
check inference of ground state, non-construction of
reactions that dont' exist.
2019-07-08 13:54:05 -05:00
Andrew Johnson
50ea1ed02a
Function based pin construction
Function openmc.model.funcs.pin has replaced the class-based
openmc.model.pin.Pin

Subdivision functionality is maintained by passing a dictionary
of integer ring indexes -> number of divisions to the function

Tests have been updated accordingly and are parametrized
against surface type: X, Y, and Z cylinders
2019-07-05 16:52:24 -05:00
Andrew Johnson
ff13e98a09
Read in material temperatures from xml subelement
Closes #1280 by reading the temperature from an xml
subelement as it is written, not an attribute.

Added loading of temperature and volume material attributes
from xml in unit test
2019-07-05 14:44:21 -05:00
Andrew Johnson
6d1b6fc230
Return vector from ResultsList.get_depletion_time 2019-07-05 13:45:26 -05:00
Andrew Johnson
2f78001166
Merge branch 'develop' into dep-timings 2019-07-05 08:00:30 -05:00
Andrew Johnson
c6e65061d1
Update depletion tests for eigenvalue uncertainties
Update results list unit test to ensure that the
correct uncertainties are pulled from the depletion_results file

Update basic integrator unit test to test writing and retrieving
eigenvalues and associated uncertainties
2019-07-02 14:52:10 -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
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
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
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
32cb3ddcf2
Merge branch 'develop' into dep-timings 2019-06-26 17:53:12 -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
228392eee5 Fix existing unit tests for thermal scattering 2019-06-25 07:31:53 -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
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
e291725b6b
Modify deplete.integrator.predictor to store, write process time
Use new timed_deplete wrapper func to obtain process time.
Pass process time to modifed openmc.deplete.Results.save
to be reduced and written to depletion file.

test_deplete_predictor is modified to ensure that the
shape of the resulting "depletion time" vector is correct
2019-06-21 09:47:36 -05:00
Paul Romano
da5f7440b1 Remove get_ from get_hexagonal_prism, get_rectangular_prism 2019-06-18 06:17:54 -05:00
Sterling Harper
2c0b16e73d
Merge pull request #1216 from dryuri92/newhex
Support different orientations for hexagonal lattices
2019-06-17 15:21:49 -04:00
Sterling Harper
f29be35a2c
Merge pull request #1258 from paulromano/gsl
Add guidelines support library and fix a bug
2019-06-17 11:03:17 -04:00
Paul Romano
7ca97676aa
Merge pull request #1260 from pshriwise/overlap_plotting
Overlap plotting
2019-06-17 07:08:12 -05:00
Paul Romano
ca608653e3
Merge pull request #1247 from drewejohnson/dep-chain-file
Read depletion_chain information from main cross section file
2019-06-14 14:43:09 -05:00
Patrick Shriwise
42ff5a4c85 Adding show_overlaps and overlap_color to Python API. 2019-06-14 11:15:16 -05:00
Andrew Johnson
e702b5186c
Add test for working with depletion_chains in DataLibrary
Load the system default cross section file, register a
depletion chain, and inspect the results. Should
have one additional library, with an empty list
of materials.

Export and create a new library from this exported xml.
Examine the contents of the new depletion chain library
2019-06-13 19:35:15 -04:00
Paul Romano
433e6a4dfd Fix bug in openmc_material_add_nuclide 2019-06-13 14:43:23 -05:00
Paul Romano
c0512b3213
Merge pull request #1246 from smharper/rect_mesh
Add rectilinear tally meshes
2019-06-12 22:40:46 -05:00
Andrew Johnson
0c0e591cb7
Simple changes to address reviewer comments
Re-organize some imports, use run_in_tmpdir fixture,
use FutureWarning over DeprecationWarning
2019-06-11 13:54:13 -04:00
Paul Romano
e7f3e34088 Fix from_hdf5 for hex lattice with x orientation. Assorted other fixes. 2019-06-10 13:13:52 -05:00
aprilnovak
be7022aff7 Added method to get total material density. Refs #1253 2019-06-09 21:44:18 -07:00
Sterling Harper
6a22a246d8 Merge remote-tracking branch 'upstream/develop' into rect_mesh 2019-06-07 09:29:13 -04:00
Sterling Harper
9ddd8b3067 Change Python Mesh class to RegularMesh 2019-06-07 08:51:09 -04:00
Andrew Johnson
f700861646
Add test for the instantiation of deplete.Operator
Construct a minimal cross sections xml file that only
contains the depletion_chain node required by
the Operator. The path to this file is set to the
OPENMC_CROSS_SECTIONS file, and reverted after the test.

The depletion_chain points towards the chain_simple.xml
files, and a reference Chain is produced in the test.
The test involves creating a bare Operator instance, that
constructs a chain based on the temporary
OPENMC_CROSS_SECTIONS file. This chain is compared to
that produced by reading the chain_simple.xml file stored
in the test directory.
2019-05-30 18:01:33 -04:00
amandalund
2f09b7ca85 Fixed some univariate/multivariate from_xml_element issues and updated unit tests 2019-05-22 19:26:15 -06:00
amandalund
74c4b4936a Merge branch 'develop' into settings_from_xml 2019-05-09 09:28:43 -05:00