Commit graph

9978 commits

Author SHA1 Message Date
Amanda Lund
a7d4dc0d5c
Merge pull request #1289 from paulromano/cylinder-fix-again
Fix cylinder_from_points (again)
2019-07-11 10:08:40 -05:00
Paul Romano
daf90d9db7 Fix documentation of source_bank 2019-07-11 06:31:12 -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
a47dfedcc2 Allow from_njoy calls to use ace/xsdir keyword arguments 2019-07-10 21:46:15 -05:00
Amanda Lund
a9bd3c3841
Merge pull request #1285 from paulromano/cylinder-points-fix
Fix cylinder_from_points function
2019-07-10 16:55:40 -05:00
Paul Romano
0db41d2281 Update cylinder_from_points test based on @amandalund feedback 2019-07-10 14:50:42 -05:00
Andrew Johnson
cd444510cf
Demonstrate Integrator class with cecm
New abstract class openmc.deplete.integrate.Integrator
and concrete CECMIntegrator for performing depletion
analysis. Concrete classes only have to implement the
__call__ method responsible for performing the time
integration across a time interval. The abstract base class
is responsible for iterating through all time steps, collecting
and writing results to file, and executing intermediate transport
solutions.
2019-07-10 14:18:22 -05:00
Andrew Johnson
87fea93714
Add opemc.model.pin to python api documentation 2019-07-09 20:25:34 -05:00
Andrew Johnson
044ac4ce2a
Option to divide material volumes by pin divisions 2019-07-09 20:23:54 -05:00
Andrew Johnson
05ce0e9f51
Add depletion_chain element to cross_sections format 2019-07-09 08:45:01 -05:00
Andrew Johnson
8b96356304
Update materials.xml format doc: temperature as attribute 2019-07-09 08:35:00 -05:00
Andrew Johnson
76f3ddc597
Update source regression test true input
pytest --update tests/regression/source

Temperature is written as an attribute for a material,
not a new subelement
2019-07-09 08:15:36 -05:00
Andrew Johnson
fde8a86729
Reset ff13e98a0: write Material temperatures as attribute 2019-07-09 08:14:32 -05:00
Paul Romano
5b0d8ed80c Add temperature interface for Cell 2019-07-09 06:43:16 -05:00
Paul Romano
9632630c0a Make all filter data members private or protected 2019-07-09 06:43:16 -05:00
Paul Romano
26a0d7d972 Add comments in filter headers 2019-07-09 06:43:16 -05:00
Paul Romano
6984b695c0 Make data members of filter protected/private 2019-07-09 06:43:16 -05:00
Paul Romano
c68052da6b Reorder declarations in Tally, Filter, and Material classes 2019-07-09 06:43:16 -05:00
Paul Romano
6e9c731b0c Move tally creating logic into Tally::Tally(pugi::xml_node) 2019-07-09 06:43:16 -05:00
Paul Romano
7db1511f00 Add destructors that remove key-value pairs from maps 2019-07-09 06:43:16 -05:00
Paul Romano
0c32470551 Finish improving Material interface 2019-07-09 06:43:16 -05:00
Paul Romano
bbf529bef0 Add Material::volume() accessor function 2019-07-09 06:43:16 -05:00
Paul Romano
1c97438be0 Remove return value on Material::set_density 2019-07-09 06:43:16 -05:00
Paul Romano
5d3afc1110 Add accessors for Material.density_ and density_gpcc_ 2019-07-09 06:43:16 -05:00
Paul Romano
4815cfebac Move openmc_material_add_nuclide into Material::add_nuclide 2019-07-09 06:43:16 -05:00
Paul Romano
0e15cb58d3 Add getter for MaterialFilter::materials_ 2019-07-09 06:43:16 -05:00
Paul Romano
b0704a674f Add Tally::set_active method 2019-07-09 06:43:16 -05:00
Paul Romano
9553f2908a Improvements in Tally interfaces 2019-07-09 06:43:16 -05:00
Paul Romano
13c2c837b1 Major cleanup of tally filter interfaces 2019-07-09 06:43:16 -05:00
Paul Romano
40f89caa22 Fix cylinder_from_points function 2019-07-08 23:24:19 -05:00
Amanda Lund
e05dec4234
Merge pull request #1277 from paulromano/download-as-browser
Add option in download() to appear as browser
2019-07-08 15:29:03 -05:00
Paul Romano
5a1c2a5608
Merge pull request #1270 from drewejohnson/dep-timings
Store time required to deplete materials in depletion results
2019-07-08 14:54:12 -05:00
Paul Romano
7c1a5dbf11
Merge pull request #1261 from smharper/geometry_partitioning
Fix complex cell geometry partitioning bug
2019-07-08 14:50:59 -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
5440edd637
Check that all capture parents and products exist before adding to Chain
Before modifying the existing Chain, ensure that all desired
products exist. Otherwise, the Chain will be unable to build
a depletion matrix in Chain.form_matrix

Added an optional argument, strict, that controls the error/print
control. If strict, then an KeyError will be raised at the first
parent or product that does not exist in the chain. Otherwise,
messages will be printed at the end.
2019-07-08 13:51:11 -05:00
Andrew Johnson
220f12c2a7
Add set/get capture branching ratios method for Chain
Related to #1237.

openmc.deplete.Chain.set_capture_branches takes in
a dictionary of parent nuclide names to {daughter: ratio}, e.g.
{"Am241": {"Am242": 0.9, "Am242_m1": 0.1}}
that will be used to overwrite existing capture
reactions with new branching ratios.

openmc.deplete.Chain.get_capture_branches returns a
similar dictionary of capture reactions with multiple targets
and their branching ratios.
2019-07-08 11:00:23 -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
9cbbc6e6b9
Document abstract and concrete operator helpers 2019-07-05 13:37:12 -05:00
Andrew Johnson
4832708ad7
Apply new reaction rate, fission energy helpers to Operator
rate_helper responsible for passing reaction rates
onto the operator, while energy_helper is responsible
for computing the actual fission energy produced in each
material
2019-07-05 13:36:49 -05:00
Andrew Johnson
e70c5d539f
Refactor tally_helpers to Rates and Energy Helpers
The TallyHelperBase class has been split into two
abstract classes: ReactionRateHelper and FissionEnergyHelper.
The former is responsible for creating reaction rates
for all materials, given nuclides with non-zero densities from
the Operator.
The latter is responsible for producing recoverable fission
energy for each nuclide in each material tracked.

Two concrete classes are included to make the Operator functional.
These can be imported from openmc/deplete/helpers.py.
First, the DirectRxnRateHelper preserves the old mode for
directly tallying one-group reaction rates using the OpenMC C API.
The second, ChainFissHelper, generates the fission energy
vector from the chain data from before.
2019-07-05 13:23:02 -05:00
Andrew Johnson
b2f1eef449
Merge branch 'develop' into feat-dep-tally-op 2019-07-05 09:35:13 -05:00
Andrew Johnson
6732f5908d
Add depletion time to io formats 2019-07-05 08:02:32 -05:00
Andrew Johnson
2f78001166
Merge branch 'develop' into dep-timings 2019-07-05 08:00:30 -05:00
Paul Romano
448b2ff82c
Merge pull request #1279 from drewejohnson/enh-dep-eig-unc
Store uncertainty on k through depletion
2019-07-03 20:55:50 -05:00
Andrew Johnson
15d9e050ca
Update depletion_results documented format with k uncertainties 2019-07-03 16:29:45 -05:00
Andrew Johnson
9da2852031
Update ResultsList.get_eigenvalues docstring
Add mention of the returned uncertainties
2019-07-03 08:02:03 -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