mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
allowing materials.xml to be specified
This commit is contained in:
parent
3f5b90042c
commit
2dbb0c7523
1 changed files with 5 additions and 2 deletions
|
|
@ -375,7 +375,8 @@ class Results(list):
|
|||
def export_to_materials(
|
||||
self,
|
||||
burnup_index: int,
|
||||
nuc_with_data: Optional[Iterable[str]] = None
|
||||
nuc_with_data: Optional[Iterable[str]] = None,
|
||||
path: PathLike = 'materials.xml'
|
||||
) -> Materials:
|
||||
"""Return openmc.Materials object based on results at a given step
|
||||
|
||||
|
|
@ -394,6 +395,8 @@ class Results(list):
|
|||
If not provided, nuclides from the cross_sections element of
|
||||
materials.xml will be used. If that element is not present,
|
||||
nuclides from openmc.config['cross_sections'] will be used.
|
||||
path : PathLike
|
||||
Path to file to write. Defaults to 'materials.xml'.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
|
@ -407,7 +410,7 @@ class Results(list):
|
|||
# updated. If for some reason you have modified OpenMC to produce
|
||||
# new materials as depletion takes place, this method will not
|
||||
# work as expected and leave out that material.
|
||||
mat_file = Materials.from_xml("materials.xml")
|
||||
mat_file = Materials.from_xml(path)
|
||||
|
||||
# Only nuclides with valid transport data will be written to
|
||||
# the new materials XML file. The precedence of nuclides to select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue