Commit graph

641 commits

Author SHA1 Message Date
Paul Romano
1b177634f4 Changes in data/decay.py from PullRequest Inc. review 2020-03-31 17:41:12 -05:00
Paul Romano
6ab702400f Make sure output_dir gets set for ThermalScattering.from_njoy 2020-03-26 07:07:00 -05:00
Paul Romano
cf6b67c05d Remove explicit inheritance from object for Python classes 2020-03-23 12:12:31 -05:00
Paul Romano
c109a205e4 Fix output directory for xsdir in make_ace_thermal 2020-03-20 06:51:50 -05:00
Paul Romano
3a79748ec3 Fix for Python 3.5 2020-03-17 20:40:54 -05:00
Paul Romano
5b7929b6ef Ensure NJOY output for multiple temperatures goes to specified output dir 2020-03-17 10:40:53 -05:00
Paul Romano
3fc25be950
Merge pull request #1503 from Mikolaj-A-Kowalski/develop
Enrichment of 2-Isotope Elements
2020-03-04 07:38:24 -06:00
ChasingNeutrons
30c5167fb6
Merge pull request #4 from ChasingNeutrons/element_name
Changes to be consistent with PEP8 style
2020-02-28 12:33:26 +00:00
Paul Cosgrove
abd8175a15 Changes to be consistent with PEP8 style 2020-02-28 12:36:57 +00:00
ChasingNeutrons
a01e37b503
Merge pull request #3 from ChasingNeutrons/element_name
Element name
2020-02-27 12:49:31 +00:00
Paul Cosgrove
d9b2c4dccc Requested changes for PR
Modified data.py to align with OpenMC Python convention,
added more elegant check for element names
2020-02-27 12:44:58 +00:00
ChasingNeutrons
eba6a6e4c8
Merge pull request #2 from openmc-dev/develop
Update alongside openmc-dev
2020-02-26 13:28:49 +00:00
Mikolaj Adam Kowalski
c679f8e8e1 Merge branch 'develop' into cam_WP7_task3 2020-02-26 11:23:48 +00:00
Paul Cosgrove
01fc85ed9a Allowed adding element by name
Added an ELEMENT_SYMBOL dictionary to data.py
with various spellings. Modified add_element to
include checks for element names as well as symbols
2020-02-22 16:14:31 +00:00
Sam Powell-Gill
dd74b2f43f Fixed bug which prevents creating photon data with no atomic relax 2020-02-19 09:26:13 +00:00
Mikolaj Adam Kowalski
8fc788d0b2 Change interface of Element.expand function
-> Adds new optional argument enrichment_target to Element.expand
-> expand uses old Uranium Enrichment method if enrichment is given
without enrichment target
-> Adds a comment to openmc.data to clarify that NATURAL_ABUNDANCE
contains atomic fractions
2020-02-02 17:46:58 +01:00
Patrick Shriwise
c94e3d2705
Merge pull request #1466 from paulromano/pullrequestinc-part1
Address review from Pullrequest Inc. (Part 1)
2020-01-29 09:54:25 -06:00
Paul Romano
6587413bd1 Some PEP8 fixes in photon.py 2020-01-28 15:51:43 -06:00
Paul Romano
8c43907378 Remove AtomicRelaxation.energy_fluorescence method 2020-01-28 15:48:38 -06:00
Paul Romano
97a3ecfd0b Respond to @pshriwise comments on #1466 2020-01-28 14:49:56 -06:00
Paul Romano
04308b7677 Rewrite of openmc-ace-to-hdf5, moving some functionality to ace.py 2020-01-27 09:46:50 -06:00
Paul Romano
840749070d Remove photon heating calculation from Python and use on C++ side 2020-01-21 17:18:39 -06:00
Paul Romano
d0d1b1db12 Make sure isotropic angular distribution gets created from ACE files 2020-01-14 07:45:09 -06:00
Ethan Peterson
2b1380519d Adding data_type kwarg to DataLibrary.get_by_material
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>

Update tests/unit_tests/test_data_misc.py

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2020-01-03 10:16:50 -05:00
Paul Romano
4013675cde
Merge pull request #1424 from PullRequestOpen/pullrequest-cosmetic-fixes
PullRequest Cosmetic Fixes [2019-12-05]
2019-12-09 17:07:49 -06:00
PullRequestOpen
181158a21a
Update openmc/data/grid.py
`Returns` -> `Return`

Co-Authored-By: Sterling Harper <sterlingmharper@gmail.com>
2019-12-06 10:22:25 -06:00
Paul Romano
b79d97d6dd Fix a number of problems related to photoatomic data
- OpenMC segfaulted when subshell cross sections were missing in HDF5 files
- IncidentPhoton.from_ace shouldn't work with mcplib84 and before
- Properly set threshold for subshell cross sections from eprdata12/14
- Make sure IncidentPhoton.from_endf works with only photoatomic data
2019-12-06 06:10:49 -06:00
PullRequestOpen
6d0aa86cef Cosmetic fixes from PullRequest [2019-12-05] 2019-12-05 22:22:43 -06:00
amandalund
aaa741ed7f Remove blank lines 2019-11-13 20:09:35 -06:00
amandalund
4e3d12cb1e Clean up Unresolved.from_endf() 2019-11-13 20:06:08 -06:00
amandalund
d3eb2086e2 Store energies for URR case C 2019-11-13 13:03:30 -06:00
amandalund
ee3138dc52 Add DOF, channel radius, scattering radius to URR 2019-11-13 13:03:30 -06:00
Jingang Liang
bb7b9e570b create redundant xs upon requested 2019-10-23 13:31:59 +08: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
60f17ea466 Make sure from_ace classmethods get correct type of ACE table 2019-09-25 12:36:47 -05: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
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
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
Sterling Harper
35c9f406b4 Address #1333 comment 2019-09-06 09:52:49 -04: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
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
Andrew Johnson
c7a8b6606e
Better collection of fission heating at temperatures
Use openmc.data.endf.get_evaluations to read in potentially
many 318 evaluations from the heatr file. The evaluated
temperatures are pulled using the target attribute, rounded
to the nearest integer for consistency, e.g. 293.6K -> 294K.
2019-09-04 14:46:32 -05:00
Andrew Johnson
6b23c21327
Pass output_dir to make_ace to collect files
The user can now pass a single argument indicating where output
tapes for each njoy module should be written. The default argument
is the current working directory, useful for removing any temporary
files created during testing.

 The pendf, broadr, heatr, gaspr, and purr arguments can either
be booleans or strings. A boolean value indicates the module output
should be written into a file named after the module, e.g. heatr output
written to <output_dir>/heatr.

ace and xsdir can be None or strings. A value of None means the
final ace and xsdir files will be written to
<output_dir>/ace and <output_dir>/xsdir, respectively. The temporary
temperature-dependent ace and xsdir files are now always named
"ace_<temp>" and "xsdir_<temp>", as the ace and xsdir arguments can
be more than "ace" and "xsdir".

openmc.data.IncidentNeutron.from_njoy knows to use this output_dir
argument to ensure all created tape files are written into the
temporary directory or the user requested directory, if applicable.
This commit was written because simply writing the broadr, gaspr,
and purr output files to "broadr", "gaspr", and "purr" resulted
in left over files after running tests.
2019-09-04 14:31:06 -05:00
Andrew Johnson
a0bac56ebd
Add fission-heating and non-fission-heating to reactions
MT318 and MT999 for fission heating and non-fission heating
have been added to the reactions supported in
openmc/data/reaction.py and src/reaction.cpp

Changed internal language from fission-less heating to
non-fission heating
2019-09-04 14:29:24 -05:00