Skip to content

Commit

Permalink
KEFF in ALEPH in NPS (#245)
Browse files Browse the repository at this point in the history
This closes #244
  • Loading branch information
luca-fiorito-11 committed Dec 19, 2022
1 parent 9695780 commit ac55810
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sandy/aleph2/output_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
PATTERN_TIMEKEFF = re.compile("\s+Global neutronics parameters\n\s+\-+\n\s+Time\s+\((?P<unit>[a-z]+)\)\s+(?P<data>.*?)\n")
PATTERN_BURNUP = re.compile("^\sFuel burnup \(MWd/kg HM\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_KEFF = re.compile("^\s+Keff eff. mult. factor\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_KEFF_NPS = re.compile("^\s+Keff estimate NPS problem\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_DKEFF = re.compile("^\s+Relative std. deviation\s+(?P<data>.*?)$", flags=re.MULTILINE)

PATTERN_MAT_BEGIN = re.compile("\s+Irradiated materials\n\s+\-{20}")
Expand Down Expand Up @@ -198,6 +199,8 @@ def get_keff(self):
"""
summary = self.summary
match = PATTERN_KEFF.search(summary)
if not match:
match = PATTERN_KEFF_NPS.search(summary)
data = match.group("data")
keff = np.array([float(x) for x in data.split()])
match = PATTERN_DKEFF.search(summary)
Expand Down

0 comments on commit ac55810

Please sign in to comment.