Paul Romano
85c963e223
Move 'import lxml' to third-party block of imports ( #2803 )
2023-12-13 14:11:32 +00:00
Jonathan Shimwell
457bea6f0b
replaced ordereddict with {} ( #2641 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-08-19 12:15:11 +00:00
Patrick Myers
1cb22075ef
Changed xml to lxml ( #2489 )
2023-05-09 10:41:04 -05:00
josh
5556b0cedc
order nuclides by increasing mass number
2023-02-22 18:24:50 +00:00
josh
0aba858f95
sort nuclides when adding by element
2023-02-17 02:15:50 +00:00
Paul Romano
a074e0a5cf
Use openmc.config['cross_sections'] instead of OPENMC_CROSS_SECTIONS
2022-09-07 16:46:10 -05:00
Jonathan
04b5f4bc97
fixed minor typo in docs
2022-02-10 00:20:58 +00:00
Jonathan
2453b04b62
corrected multiline f strings
2021-07-31 22:33:45 +01:00
Jonathan Shimwell
192f4436a0
replaced .format with f string
2021-07-29 18:25:37 +01:00
Paul Romano
a117694930
If some natural isos are missing when adding element, check '0' nuclide first
2020-11-11 11:17:35 -06:00
Paul Romano
6d90853d0b
Add function for getting naturally-occurring isotopes
2020-08-14 15:05:01 -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
Paul Romano
d347e4fdbd
Changes in element.py from PullRequest Inc. review
2020-03-23 20:44:34 -05: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
Mikolaj Adam Kowalski
d1f71f2328
Address further comments by @simondrichards
...
Corrects spelling and grammar.
2020-02-26 15:50:53 +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
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
Mikolaj Adam Kowalski
98253ab9b4
Implemented unit tests for Element.expand
2020-02-14 17:54:01 +00:00
Mikolaj Adam Kowalski
1e432863b1
Enrichment gives exceptions for non 2 isotopes
...
Following discussion in the issues the functionality to enrich mixtures
of more then 2 nuclides is block by an exception. The algorithim should
still support larger mixtures.
2020-02-14 16:12:44 +00:00
Mikolaj Adam Kowalski
a3ac3fb478
Fills gaps in docstring of Element
2020-02-02 21:12:16 +01:00
Mikolaj Adam Kowalski
77c147dd3d
Initial enrichment option in Element.expand
...
-> Implementation supports only wt% enrichment
-> Multiple unnecessary conversions from at% to wt% can happen
-> Can produce -ve fractions if enrichment > 100
2020-02-02 20:54:41 +01: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
PullRequestOpen
6d0aa86cef
Cosmetic fixes from PullRequest [2019-12-05]
2019-12-05 22:22:43 -06:00
Andrew Johnson
3e165c0d54
Iterate over all libraries, not children, in Element.expand
...
After PR #1247 , the cross section file is allowed to contain
the depletion chain file. This is present as a new tag, of
the form
```
<depletion_chain path="path.xml" type="depletion_chain" />
```
The Element.expand method looked for `material` attributes
in all children of the OPENMC_CROSS_SECTION file.
This caused an error for the depletion_chain element.
Now, only those children with the `library` tag are
iterated over.
2019-06-20 08:26:43 -05:00
Paul Romano
deab4b3d33
Use empty-argument form of super()
2018-02-05 23:14:30 -05:00
Paul Romano
c428cee667
Remove __future__ and six imports
2018-02-05 23:14:30 -05:00
Paul Romano
2b6cd880f1
Auto-expand elements at the time they are added to a material
2017-12-17 07:16:06 +07:00
Paul Romano
ee2f7e925f
Make Nuclide, Element, and Macroscopic subclasses of str
2017-12-17 07:16:06 +07:00
Paul Romano
f722d57ca3
Change input format for isotropic-in-lab scattering
2017-12-17 07:16:06 +07:00
Paul Romano
4d162335f9
Remove __eq__ and __hash__ on Element
2017-12-17 07:16:06 +07:00
Paul Romano
a41a4d1feb
Update correlation used for U weight fractions based on enrichment
2017-10-04 14:15:13 -05:00
Adam Nelson
995ba26694
Moved plotting and calculate_xs routines to plotter, condensed code as needed.
2016-11-11 21:58:31 -05:00
Adam Nelson
d4f4166ba7
resolved most of the comments from @samuelshaner
2016-11-11 20:37:03 -05:00
Adam Nelson
2a50aff588
Pre-PR cleanup and addition of ability to read MT in types
2016-11-11 15:20:40 -05:00
Adam Nelson
240028d13d
Added ability to provide an axis to the plot_xs routines, and added a type for slowing-down power so we can plot moderating ratios. Why not right?
2016-11-11 14:50:24 -05:00
Adam Nelson
4fe275b381
Code and resultant plot cleanup; also ensured every plot type explicitly included MT=2 so that S(a,b) data could properly be spliced in
2016-11-11 06:22:38 -05:00
Adam Nelson
7524637e23
Added kwargs to plots, switched to taking a file string for the cross_sections.xml file instead of an initialized DataLibrary, and avoided precision issues when calculating the inelastic xs
2016-11-11 05:20:38 -05:00
Adam Nelson
76991a223f
Extended plots to elements and nuclides
2016-11-09 18:10:41 -05:00
Sam Shaner
7a500d6bfb
removed catenation of element expand atomic amount
2016-10-30 17:33:31 -04:00
Sam Shaner
d278b861a3
changed element expand to use ordered dict
2016-10-30 17:25:16 -04:00
samuel shaner
68cabf713d
changed precision on element expand from 12 to 10
2016-10-28 15:07:16 +00:00
samuel shaner
dfdb77619e
reverted to old triso test with 12 digits of precision on element expansion
2016-10-28 13:24:35 +00:00
samuel shaner
bfc06a7341
limited precision of isotopes of expanded elements to 14 digits
2016-10-28 01:06:50 +00:00
Sam Shaner
8a02b76b96
fixed typo and moved a section of code in input_xml.F90
2016-10-25 21:13:14 -04:00
Sam Shaner
a042ff60ed
addressed PR comments
2016-10-25 20:54:56 -04:00
Sam Shaner
af29379f12
removed shortening of nuclide pct in element.expand()
2016-10-25 17:21:48 -04:00