mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Instruct njoy interface to retain heatr output
HEATR contains the 318 fission heating data needed to construct the energy deposition tally. Until now, the output tape was left in the njoy temporary directory with the other output tapes. This commit instructs openmc.data.njoy to move the heatr output from the running directory used in njoy.run to the working directory used in njoy.make_ace Removed unused imports argparse and sys
This commit is contained in:
parent
81c6259289
commit
7badc48c22
2 changed files with 6 additions and 7 deletions
|
|
@ -813,9 +813,8 @@ class IncidentNeutron(EqualityMixin):
|
|||
"""
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
# Run NJOY to create an ACE library
|
||||
kwargs.setdefault('ace', os.path.join(tmpdir, 'ace'))
|
||||
kwargs.setdefault('xsdir', os.path.join(tmpdir, 'xsdir'))
|
||||
kwargs.setdefault('pendf', os.path.join(tmpdir, 'pendf'))
|
||||
for key in ["ace", "xsdir", "pendf", "heatr"]:
|
||||
kwargs.setdefault(key, os.path.join(tmpdir, key))
|
||||
kwargs['evaluation'] = evaluation
|
||||
make_ace(filename, temperatures, **kwargs)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import argparse
|
||||
from collections import namedtuple
|
||||
from io import StringIO
|
||||
import os
|
||||
import shutil
|
||||
from subprocess import Popen, PIPE, STDOUT, CalledProcessError
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from . import endf
|
||||
|
|
@ -237,8 +235,9 @@ def make_ace(filename, temperatures=None, ace='ace', xsdir='xsdir', pendf=None,
|
|||
Fractional error tolerance for NJOY processing
|
||||
broadr : bool, optional
|
||||
Indicating whether to Doppler broaden XS when running NJOY
|
||||
heatr : bool, optional
|
||||
Indicating whether to add heating kerma when running NJOY
|
||||
heatr : bool or str, optional
|
||||
Indicating whether to add heating kerma when running NJOY. If string,
|
||||
write the output tape to this file
|
||||
gaspr : bool, optional
|
||||
Indicating whether to add gas production data when running NJOY
|
||||
purr : bool, optional
|
||||
|
|
@ -292,6 +291,7 @@ def make_ace(filename, temperatures=None, ace='ace', xsdir='xsdir', pendf=None,
|
|||
if heatr:
|
||||
nheatr_in = nlast
|
||||
nheatr = nheatr_in + 1
|
||||
tapeout[nheatr] = "heatr" if heatr is True else heatr
|
||||
commands += _TEMPLATE_HEATR
|
||||
nlast = nheatr
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue