Commit graph

229 commits

Author SHA1 Message Date
Jonathan Shimwell
90ff8fcb4a added checks and tests for cases in add_element 2021-05-19 13:31:45 +01:00
Jonathan Shimwell
21dc58bff1 changing element to element.title to catch lowercase entries 2021-05-17 17:50:08 +01:00
Yue JIN
ccd76516f1
Using python's any function to inherit involved materials' attr
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-09-10 10:50:17 +08:00
Yue JIN
b7a4beff5c Make mix_materials() inherit "depletable" attribute of involved materials 2020-09-09 13:36:43 +08:00
Paul Romano
46f322fe0f Fix use of enrichment with Material.add_elements_from_formula 2020-07-10 07:20:50 -05:00
Paul Romano
16d7ec0641 Sort XML attributes to preserve pre-Python 3.8 XML writing behavior 2020-06-17 22:08:09 -05:00
Paul Romano
5547ecf88f Add versionadded directive for new arguments/functions in 0.12 2020-04-10 21:52:43 -05:00
Paul Romano
4943ae9307 Alphabetize import ordering (and use relative imports in a few places) 2020-04-06 15:16:09 -05:00
Paul Romano
e34a71b448 Remove unused imports across entire Python API 2020-03-31 18:11:31 -05:00
Andrew Johnson
b7871bdc85
Merge pull request #1534 from billingsley-john/feature_add_get_elements
added get_elements function and tests
2020-03-26 17:36:06 -04:00
billingsley-john
1c3373ce61
Sorted returned element list and updated tests
Returned element list is now sorted alphabetically.
Tests updated to check list elements instead of list length.

Co-Authored-By: Jonathan Shimwell <jonathan.shimwell@ukaea.uk>
2020-03-26 12:59:12 +00:00
billingsley-john
ed36017015 added get_elements function and tests 2020-03-26 10:22:56 +00:00
Paul Romano
e7f4413415 Merge branch 'develop' into pullrequestinc-part2 2020-03-25 14:48:28 -05:00
Paul Romano
a294172342
Merge pull request #1530 from Shimwell/develop
adding elements to a material from formula
2020-03-25 14:27:45 -05:00
Jonathan Shimwell
4234fe45e7
Apply suggestions from code review
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2020-03-25 14:58:02 +00:00
Paul Romano
86351747e7 Ensure remove_nuclide removes all matching nuclides. Closes #1532 2020-03-25 09:37:00 -05:00
Paul Romano
d15e404ac3 Address remaining comments from @drewejohnson 2020-03-25 07:10:35 -05:00
Paul Romano
175347bbb9 Better use of NuclideTuple namedtuple in material.py 2020-03-25 06:53:14 -05:00
Paul Romano
4ad2ad3ab8
Apply suggestions from @drewejohnson code review
Co-Authored-By: Andrew Johnson <drewej@protonmail.com>
2020-03-25 06:45:03 -05:00
=shimwell
430b426098 added check for decimal points in formula 2020-03-24 12:06:56 +00:00
Jonathan Shimwell
605b3eade1
code review imporements
Co-Authored-By: Andrew Johnson <drewej@protonmail.com>
2020-03-24 11:34:20 +00:00
Paul Romano
34e57d4ba3 Changes in material.py from PullRequest Inc. review 2020-03-23 20:55:01 -05:00
=shimwell
4e22c6a936 removed unused argument description 2020-03-23 20:47:43 +00:00
=shimwell
8ba369d6cc added elements from formula 2020-03-23 20:15:59 +00:00
Sterling Harper
a6bd9a86c5 Improve Materials.export_to_xml comment 2020-03-11 23:30:14 -04:00
Sterling Harper
b083e35f2e Fix write speed degradation 2020-03-08 19:49:03 -04:00
Sterling Harper
40ec4a20f1 Fix UTF-8 handling 2020-03-08 19:01:26 -04:00
Sterling Harper
39cd31c7b6 Reduce memory usage of Materials.export_to_xml 2020-03-08 17:58:08 -04: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
Mikolaj Adam Kowalski
adcb9347a7 Address comments by @paulromano
Use default rel_tol in pytest.approx in test_element.py
Add info that default enrichment for U is in wo%
2020-03-04 11:58:46 +00:00
Mikolaj-A-Kowalski
bcc4a52eb9
Apply suggestions from code review
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2020-03-04 11:41:52 +00:00
Mikolaj Adam Kowalski
196c4a0735 Add exception for U enrichment with type 'ao'
Remove a confusing comment.
2020-02-29 20:34:05 +00:00
Paul Cosgrove
abd8175a15 Changes to be consistent with PEP8 style 2020-02-28 12:36:57 +00:00
Paul Cosgrove
70b2f968f8 Even more elegant error check on element names 2020-02-27 12:50:44 +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
Mikolaj Adam Kowalski
9078010d88 Address comments by @simondrichards
Also remove spaces between Raises entries in docstring of Element.expand
2020-02-26 12:18:19 +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
Mikolaj Adam Kowalski
d5f9a962e5 Adds general element enrichment to Material
Adds an option to specify an enrichment of an element composed of two
isotopes to Material.add_element
2020-02-14 18:55:50 +00:00
Ethan Peterson
8afa5ded10 Adding mix_materials method to Material class 2020-01-22 19:53:45 -05:00
Andrew Johnson
60d92f89d2
Add temperatures to statepoints, Material.from_hdf5
Also include material attributes to summary format documentation
2019-07-12 14:23:55 -05:00
Andrew Johnson
fde8a86729
Reset ff13e98a0: write Material temperatures as attribute 2019-07-09 08:14:32 -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
Paul Romano
2efd58a694 Use dataset[()] instead of deprecated dataset.value 2019-03-27 06:47:22 -05:00
Paul Romano
17d778e57f Allow export_to_xml methods to take a directory 2019-03-12 11:42:51 -05:00
Paul Romano
5c6633c2c3 Make sure temperatures/volumes are read correctly in Material.from_xml 2019-02-26 10:37:24 -06:00
liangjg
3846168e70 revert the function calulcating fissionable mass 2019-01-02 10:39:23 -05:00
liangjg
2d613aab54 remove heavy_metal_mass as we already have material.fissionable_mass 2018-12-20 09:41:37 -05:00
liangjg
6e1114dcab address review comments 2018-12-20 09:10:02 -05:00
liangjg
493341dbe1 heavy metal: atomic number >= 90 2018-12-18 10:46:25 -05:00
liangjg
86600e6c4a power density can be speicifed in depletion 2018-12-17 23:21:31 -05:00