Skip to content

Commit

Permalink
proton flux in aleph output (#241)
Browse files Browse the repository at this point in the history
Co-authored-by: Luca Fiorito <[email protected]>
  • Loading branch information
luca-fiorito-11 and Luca Fiorito committed Dec 12, 2022
1 parent 830142c commit 9695780
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sandy/aleph2/output_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
PATTERN_TEMPERATURE = re.compile("^\s+Temperature\s+\(K\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_SOURCE = re.compile("^\s+Source strength\s+\(part/s\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_NFLUX = re.compile("^\s+Neutron flux\s+\(n/\(cm2\*s\)\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_HFLUX = re.compile("^\s+Proton flux\s+\(h/\(cm2\*s\)\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_POWER = re.compile("^\s+Thermal power\s+\(MW\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_BURNUP = re.compile("^\s+Fuel burnup\s+\(MWd/kg HM\)\s+(?P<data>.*?)$", flags=re.MULTILINE)
PATTERN_TOTBURNUP = re.compile("^\s+Total burnup \(MWd/kg HM\):\s+(?P<data>.*?)$", flags=re.MULTILINE)
Expand Down Expand Up @@ -782,7 +783,17 @@ def parse_materials_output(text):
),
"total_fissions": total_fissions,
})
if PATTERN_HFLUX.search(v):
hflux = _search_pattern_flist(v, PATTERN_HFLUX)
material.update({
"proton_flux": pd.Series(
hflux,
index=time,
name="proton flux [h/cm2/s]",
),
})
materials[mat_number] = material

return AlephMaterials(materials)


Expand Down

0 comments on commit 9695780

Please sign in to comment.