Commit graph

9978 commits

Author SHA1 Message Date
Paul Romano
85f80f6b33 Make sure Nuclide::reaction_index_ is big enough for MT=901 2019-09-16 10:59:03 -05:00
Sterling Harper
c76b75ce33
Merge pull request #1345 from paulromano/capi-to-lib
Rename openmc.capi to openmc.lib
2019-09-16 09:28:02 -04:00
Jiankai Yu
46367e8369 add more details in documentation of geometry 2019-09-15 16:57:07 -04:00
Jiankai Yu
849524d4dc add draft description to methodology on white boundary condition 2019-09-15 15:45:58 -04:00
Jiankai Yu
37df7e6a3c add regression test for white boundary condition 2019-09-15 15:29:01 -04:00
Jiankai Yu
c377231d8d add regression test for white boundary condition 2019-09-15 15:27:45 -04:00
Jiankai Yu
c36f19a56f revise codes related to white boundary condition 2019-09-15 14:11:59 -04:00
Jiankai Yu
723153db5c revise codes related to white boundary condition 2019-09-15 14:09:17 -04:00
Paul Romano
dc3ab07ced Make sure no heating adjustments are made if HEATR is not run 2019-09-13 10:59:18 -05:00
Paul Romano
8a58028469 Mention openmc.capi -> openmc.lib name change in release notes 2019-09-13 10:38:30 -05:00
Paul Romano
67de50e4fc Rename two tests 2019-09-13 10:38:30 -05:00
Paul Romano
bbb0b78383 Rename openmc.capi -> openmc.lib 2019-09-13 10:38:26 -05:00
Paul Romano
7b8709e1a1
Merge pull request #1343 from drewejohnson/default-dict-weighted-yields
Use defaultdict when weighting fission yields
2019-09-13 09:54:19 -05:00
Paul Romano
fe731b7f19 Fix bug with IncidentNeutron.temperatures for ENDF files 2019-09-13 09:31:12 -05:00
Paul Romano
d84c379007 Fix up heating tally scores 2019-09-13 09:31:08 -05:00
Paul Romano
fe7a968819 Run HEATR twice to get kermas including local photon energy deposition 2019-09-13 07:10:43 -05:00
Paul Romano
d630047f4c Allow IncidentNeutron.from_endf to work on heatr output files 2019-09-13 07:10:43 -05:00
Amanda Lund
251ecba60b
Merge pull request #1336 from paulromano/incoherent-elastic-fix
Fix reading of Debye-Waller for incoherent elastic
2019-09-12 17:37:46 -05:00
Amanda Lund
5968db8cdd
Merge pull request #1335 from paulromano/openmpi-fix2
Better conditional for call to MPI_Type_free
2019-09-11 16:17:20 -05:00
Andrew Johnson
99dfa1f053
Return defaultdict(dict) from Chain.get_default_fission_yields 2019-09-11 10:42:16 -05:00
Andrew Johnson
1a4bbb9068
Chain.get_thermal_fission_yields -> Chain.get_default_fission_yields 2019-09-11 10:41:58 -05:00
Paul Romano
0a14a5b7d8
Merge pull request #1341 from drewejohnson/fission-heating-bug
Fission heating fixes - mark redundant, consistent energy grid
2019-09-11 10:41:23 -05:00
Andrew Johnson
2c965ef7f8
Use defaultdict(dict) when weighting fission yields
The Chain.form_matrix method looks for information and
fission yields for all isotopes with a fission reaction.
However, the AveragedFissionYieldHelper and FissionYieldCutoffHelper
are not guaranteed to return yields to all isotopes with
fission reactions. Instead, the union on two sets of yields
are returned:
1) yields from isotopes with a single set of fission yields
2) weighted yields computed for isotopes with both multiple sets of
   fission yields **and** non-zero densities.

This later item can cause some isotopes that the Chain anticipates
having fission yields, since they have a fission reaction, to not
exist in the yields library. An isotope with multiple sets of
yields but that is not physically present in the problem will not
have reaction rates and also not have fission yields computed
by these helpers. This will cause a KeyError during Chain.form_matrix
when fission yields for these isotopes are requested.

This commit changes the return type from weighted_yields on
ConstantFissionYieldHelper, AveragedFissionYieldHelper, and
FissionYieldCutoffHelper to be defaultdict(dict). This resolves
the above issue by returning an "empty" set of yields for isotopes
that potentially *should* have fission yields, but have zero density
across the problem, and therefore do not have tallied reaction
rates nor fission yields.

Documentation for the changes to these classes have been updated
2019-09-11 10:31:12 -05:00
Andrew Johnson
3df4f94fbf
Merge pull request #1330 from paulromano/surface-coeffs-first
Change order of arguments for surface classes
2019-09-10 16:41:41 -05:00
Andrew Johnson
e0d4a80f9a
Use same energy grid for fission heating as total heating
The fission heating data generated with IncidentNeutron.from_njoy
does not have the same energy grid as other reactions. Previously,
the energy grid was maintained and the non-fission heating was generated
by evaluating total heating at each point in the fission heating grid
and taking total_xs(fission_h.x) - fission_h.y

This led to the crash in #1340 where openmc expected cross
sections to use the same grid, or at least same number of grid
points when computing the total cross section. While fission heating
is not included in the total cross section [since 71825fb35],
a consistent energy grid is helpful.

Both fission heating and non-fission heating now use the energy
grid from the total heating.
2019-09-10 12:00:11 -05:00
Andrew Johnson
71825fb35a
Mark fission heating as redundant cross section
Fission heating should not contribute to total cross section,
and marking the reaction as redundant ensures this. MT=318 for
fission heating is already included in the redundant reactions
to keep when exported to HDF5

Related to #1340
2019-09-10 09:01:18 -05:00
rockfool
5f394b2816 add white boundary condition 2019-09-09 16:22:25 -04:00
rockfool
3040d4d3bb add example for white boundary 2019-09-09 15:08:38 -04:00
Paul Romano
d572379399 Fix reading of Debye-Waller for incoherent elastic 2019-09-06 16:26:44 -05:00
Paul Romano
3aedd6a337 Better conditional for call to MPI_Type_free (thanks Cliff Dugal) 2019-09-06 14:08:24 -05:00
Paul Romano
a09b17e933
Merge pull request #1333 from smharper/minor_fixes
Bug fix for Material.add_nuclide with unrecognized nuclides
2019-09-06 13:04:07 -05:00
Sterling Harper
35c9f406b4 Address #1333 comment 2019-09-06 09:52:49 -04:00
Andrew Johnson
7bb16adc56
Document units for operator.heavy_metal
Attribute contains the initial heavy metal inventory in grams
2019-09-06 08:46:43 -05:00
Andrew Johnson
a9b63e0158
Address reviewer comments in depletion example notebook
PR #1332
2019-09-06 08:44:31 -05:00
Paul Romano
9036e79c10
Merge pull request #1329 from drewejohnson/breakout-heating-fission-q-scores
Breakout neutron heating and fission-q scoring into functions
2019-09-06 06:52:33 -05:00
Paul Romano
8f76becf28
Merge pull request #1331 from drewejohnson/remove-cram-wrapper
Remove cram wrapper with maps of depletion matrices
2019-09-06 06:16:33 -05:00
Sterling Harper
862524c26a Fix Material try/catch and unit test assertion 2019-09-05 22:39:24 -04:00
Sterling Harper
bafdbf8e8b
Merge pull request #1326 from paulromano/openmpi-fixes
Get test suite to work with OpenMPI
2019-09-05 21:52:43 -04:00
Andrew Johnson
8ca0d35ad6
Add pincell depletion jupyter notebook
The basic structure is borrowed from examples/python/pincell_depletion/
and builds a single pin cell to be depleted. The model building is
expedited, as this assumes the user has read through the
basic user guide on model building. The new openmc.model.pin
function is highlighted, both for building a plain pin
and for subdividing regions for depletion.

The Chain and Operator classes are the focuses of the example,
and the PredictorIntegrator is used to deplete the pin out to
6 months using 30 day depletion steps with 174 W power.
The openmc-make-depletion-chain scripts are introduced as methods
for building initial depletion chains. Use of
openmc.data.DataLibrary.register_file is included, as this allows
the user to not pass the chain_file argument if the depletion chain
is included in OPENMC_CROSS_SECTIONS.

The jupyter notebook is included in the documentation similar
to other examples.
2019-09-05 16:50:17 -05:00
Andrew Johnson
269b3bf2d1
Update user's guide on depletion
Indicate class-based integration, and pull results from file
using `ResultsList.from_hdf5`
2019-09-05 16:50:16 -05:00
Andrew Johnson
20ce641eb3
Upgrade pincell depletion python examples
Relied on function-based depletion rather than the new
classes. Now uses ResultsList.from_hdf5 to obtain the
results information
2019-09-05 16:50:16 -05:00
Paul Romano
f9f5187c04
Merge pull request #1322 from drewejohnson/heating-less-fission
Process non-fission heating from njoy
2019-09-05 16:33:18 -05:00
Paul Romano
cb73c87d9c Respond to comments on #1330 2019-09-05 16:30:42 -05:00
Andrew Johnson
76adfb231c
Combine acer, ace arguments to openmc.data.make_ace
Passing ace to make_ace is not supported. Use acer instead.

The acer argument now signals if the acer njoy module should
be run and where to save the output file. xsdir defaults to
None now, rather than "xsdir". This change allows the xsdir
file to be written to the same directory as acer, or a user
supplied location potentially separate from ace file.
2019-09-05 10:57:02 -05:00
Andrew Johnson
c0566e0a2d
Remove cram wrapper with maps of depletion matrices
openmc.deplete.cram.deplete now pre-generates a map object
that produces depletion matrices given the chain, rates,
and matrix_func. The internal cram wrapper function has
been removed, as the full inputs to CRAM48 are now known,
in zipped and mapped objects.

Some basic timing comparisons indicate that this approach
is at least as fast, if not marginally faster, for a
quarter PWR assembly and an SFR assembly.
2019-09-05 10:02:27 -05:00
Andrew Johnson
05f33849f5
Remove breakpoints, interpolation for non-fission heating
NJOY handles linearization of the cross sections in RECONR:
Section 3.2 NJOY2016 Manual, LA-UR-17-20093
2019-09-05 08:35:52 -05:00
Paul Romano
a3e78915cf Fix __version__ in Python API 2019-09-05 07:00:38 -05:00
Paul Romano
5f7bf87631 Update release notes for 0.11.0 2019-09-05 06:50:22 -05:00
Andrew Johnson
390953050b
Pull out neutron heating scoring to standalone function
Neutron heating logic has been pulled out from the main
score_general_ce function into a single helper function
score_neutron_heating. This function returns a double that is
the neutron heating, using analog, collision, or track-length
estimators, incorporating survival biasing, and the possiblity
of scoring across all nuclides in a given material.

The functionality is identical to the original implementation,
just condensed into two functions to reduce repeated code. The second
helper function digs through neutron data to obtain and interpolate
kerma coefficients for a given nuclide and reaction.
2019-09-04 16:00:28 -05:00
Paul Romano
d85df13ae7 Make surfaces take coefficients as first arguments 2019-09-04 15:10:53 -05:00