|
10 | 10 |
|
11 | 11 |
|
12 | 12 | # For a given MAT number, give a name for the ACE table and a list of ZAID |
13 | | -# identifiers |
| 13 | +# identifiers. This is based on Appendix C in the ENDF manual. |
14 | 14 | ThermalTuple = namedtuple('ThermalTuple', ['name', 'zaids', 'nmix']) |
15 | 15 | _THERMAL_DATA = { |
16 | 16 | 1: ThermalTuple('hh2o', [1001], 1), |
|
23 | 23 | 11: ThermalTuple('dd2o', [1002], 1), |
24 | 24 | 12: ThermalTuple('parad', [1002], 1), |
25 | 25 | 13: ThermalTuple('orthod', [1002], 1), |
| 26 | + 14: ThermalTuple('dice', [1002], 1), |
26 | 27 | 26: ThermalTuple('be', [4009], 1), |
27 | 28 | 27: ThermalTuple('bebeo', [4009], 1), |
28 | | - 31: ThermalTuple('graph', [6000, 6012, 6013], 1), |
| 29 | + 28: ThermalTuple('bebe2c', [4009], 1), |
| 30 | + 30: ThermalTuple('graph', [6000, 6012, 6013], 1), |
| 31 | + 31: ThermalTuple('grph10', [6000, 6012, 6013], 1), |
| 32 | + 32: ThermalTuple('grph30', [6000, 6012, 6013], 1), |
29 | 33 | 33: ThermalTuple('lch4', [1001], 1), |
30 | 34 | 34: ThermalTuple('sch4', [1001], 1), |
| 35 | + 35: ThermalTuple('sch4p2', [1001], 1), |
31 | 36 | 37: ThermalTuple('hch2', [1001], 1), |
| 37 | + 38: ThermalTuple('mesi00', [1001], 1), |
32 | 38 | 39: ThermalTuple('lucite', [1001], 1), |
33 | 39 | 40: ThermalTuple('benz', [1001, 6000, 6012], 2), |
34 | | - 41: ThermalTuple('od2o', [8016, 8017, 8018], 1), |
| 40 | + 42: ThermalTuple('tol00', [1001], 1), |
35 | 41 | 43: ThermalTuple('sisic', [14028, 14029, 14030], 1), |
36 | 42 | 44: ThermalTuple('csic', [6000, 6012, 6013], 1), |
| 43 | + 45: ThermalTuple('ouo2', [8016, 8017, 8018], 1), |
37 | 44 | 46: ThermalTuple('obeo', [8016, 8017, 8018], 1), |
38 | 45 | 47: ThermalTuple('sio2-a', [8016, 8017, 8018, 14028, 14029, 14030], 3), |
39 | | - 48: ThermalTuple('uuo2', [92238], 1), |
| 46 | + 48: ThermalTuple('osap00', [92238], 1), |
40 | 47 | 49: ThermalTuple('sio2-b', [8016, 8017, 8018, 14028, 14029, 14030], 3), |
41 | 48 | 50: ThermalTuple('oice', [8016, 8017, 8018], 1), |
| 49 | + 51: ThermalTuple('od2o', [8016, 8017, 8018], 1), |
42 | 50 | 52: ThermalTuple('mg24', [12024], 1), |
43 | 51 | 53: ThermalTuple('al27', [13027], 1), |
44 | 52 | 55: ThermalTuple('yyh2', [39089], 1), |
45 | 53 | 56: ThermalTuple('fe56', [26056], 1), |
46 | 54 | 58: ThermalTuple('zrzrh', [40000, 40090, 40091, 40092, 40094, 40096], 1), |
47 | | - 59: ThermalTuple('cacah2', [20040, 20042, 20043, 20044, 20046, 20048], 1), |
48 | | - 75: ThermalTuple('ouo2', [8016, 8017, 8018], 1), |
| 55 | + 59: ThermalTuple('si00', [14028], 1), |
| 56 | + 60: ThermalTuple('asap00', [13027], 1), |
| 57 | + 71: ThermalTuple('n-un', [7014, 7015], 1), |
| 58 | + 72: ThermalTuple('u-un', [92238], 1), |
| 59 | + 75: ThermalTuple('uuo2', [8016, 8017, 8018], 1), |
49 | 60 | } |
50 | 61 |
|
| 62 | + |
| 63 | +def _get_thermal_data(ev, mat): |
| 64 | + """Return appropriate ThermalTuple, accounting for bugs.""" |
| 65 | + |
| 66 | + # JEFF assigns MAT=59 to Ca in CaH2 (which is supposed to be silicon). |
| 67 | + if ev.info['library'][0] == 'JEFF': |
| 68 | + if ev.material == 59: |
| 69 | + if 'CaH2' in ''.join(ev.info['description']): |
| 70 | + zaids = [20040, 20042, 20043, 20044, 20046, 20048] |
| 71 | + return ThermalTuple('cacah2', zaids, 1) |
| 72 | + |
| 73 | + # Before ENDF/B-VIII.0, crystalline graphite was MAT=31 |
| 74 | + if ev.info['library'] != ('ENDF/B', 8, 0): |
| 75 | + if ev.material == 31: |
| 76 | + return _THERMAL_DATA[30] |
| 77 | + |
| 78 | + # ENDF/B incorrectly assigns MAT numbers for UO2 |
| 79 | + # |
| 80 | + # Material | ENDF Manual | VII.0 | VII.1 | VIII.0 |
| 81 | + # ---------|-------------|-------|-------|------- |
| 82 | + # O in UO2 | 45 | 75 | 75 | 75 |
| 83 | + # U in UO2 | 75 | 76 | 48 | 48 |
| 84 | + if ev.info['library'][0] == 'ENDF/B': |
| 85 | + if ev.material == 75: |
| 86 | + return _THERMAL_DATA[45] |
| 87 | + version = ev.info['library'][1:] |
| 88 | + if version in ((7, 1), (8, 0)) and ev.material == 48: |
| 89 | + return _THERMAL_DATA[75] |
| 90 | + if version == (7, 0) and ev.material == 76: |
| 91 | + return _THERMAL_DATA[75] |
| 92 | + |
| 93 | + # If not a problematic material, use the dictionary as is |
| 94 | + return _THERMAL_DATA[mat] |
| 95 | + |
| 96 | + |
51 | 97 | _TEMPLATE_RECONR = """ |
52 | 98 | reconr / %%%%%%%%%%%%%%%%%%% Reconstruct XS for neutrons %%%%%%%%%%%%%%%%%%%%%%% |
53 | 99 | {nendf} {npendf} |
@@ -444,7 +490,8 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None, |
444 | 490 | mat_thermal = ev_thermal.material |
445 | 491 | zsymam_thermal = ev_thermal.target['zsymam'] |
446 | 492 |
|
447 | | - data = _THERMAL_DATA[mat_thermal] |
| 493 | + # Determine name, isotopes based on MAT number |
| 494 | + data = _get_thermal_data(ev_thermal, mat_thermal) |
448 | 495 | zaids = ' '.join(str(zaid) for zaid in data.zaids[:3]) |
449 | 496 |
|
450 | 497 | # Determine name of library |
|
0 commit comments