appendixb.rst.txt 57.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
.. _appendixb:

MAVRIC Appendix B: MAVRIC Utilities
===================================

Introduction
------------

Several utilities are provided to aid users in dealing with some of the
output files produced by Monaco and MAVRIC. These utilities were
developed at ORNL for specific projects and have been added to SCALE so
that all users can benefit. More utilities have been added that deal
with Denovo, including the older \*.varscl files for flux output used in
SCALE 6.1 and the current binary \*.dff file for flux output used in
SCALE 6.2. These tools do not have the modern block/keyword input
structure but instead have a fixed format, which is fairly simple since
each utility is made for a very specific function.

Each is described in the following sections. Five sample problems,
``mavricUtilities1.inp``, ````mavricUtilities2.inp``, ``mavricUtilities3.inp``,
``mavricUtilities4.inp`` and ``mavricUtilities5.inp`` demonstrate the use of
some of these. For all of these utilities, filenames should be enclosed
in quotes.

Utilities working with Monaco mesh tally (\*.3DMAP) files
---------------------------------------------------------

+-----------------+-----------------+
| mt2ascii        | Convert a mesh  |
|                 | tally into an   |
|                 | ASCII text      |
|                 | file.           |
+-----------------+-----------------+
| mt2msl          | Convert a mesh  |
|                 | tally into a    |
|                 | mesh source     |
|                 | lite.           |
+-----------------+-----------------+
| mt2msm          | Convert a mesh  |
|                 | tally into a    |
|                 | mesh source.    |
| mt2silo         | Convert a mesh  |
|                 | tally file into |
|                 | a Silo file for |
|                 | VisIt.          |
+-----------------+-----------------+
| mt2vtk          | Convert one     |
|                 | dataset of one  |
|                 | family in a     |
|                 | mesh tally to   |
|                 | VTK format.     |
+-----------------+-----------------+
| mtAdder         | Add several     |
|                 | Monaco mesh     |
|                 | tally files     |
|                 | together into   |
|                 | one mesh tally. |
+-----------------+-----------------+
| mtAverager      | Average several |
|                 | Monaco mesh     |
|                 | tally files     |
|                 | into one mesh   |
|                 | tally.          |
+-----------------+-----------------+
| mtBinOp         | Binary          |
|                 | operation of    |
|                 | mesh tally      |
|                 | files: sum,     |
|                 | difference,     |
|                 | product, and    |
|                 | ratio.          |
+-----------------+-----------------+
| mtDisp          | Display the     |
|                 | basics of a     |
|                 | mesh tally      |
|                 | file.           |
+-----------------+-----------------+
| mtExpand        | Expand a        |
|                 | space-only mesh |
|                 | from a mesh     |
|                 | tally with an   |
|                 | energy          |
|                 | function.       |
+-----------------+-----------------+
| mtFilter        | Perform various |
|                 | filters on a    |
|                 | mesh tally      |
|                 | file.           |
+-----------------+-----------------+
| mtInv           | Invert all of   |
|                 | the values in a |
|                 | mesh tally.     |
+-----------------+-----------------+
| mtMask          | Keep only or    |
|                 | remove          |
|                 | specified       |
|                 | voxels of a     |
|                 | mesh tally      |
|                 | based on        |
|                 | geometry.       |
+-----------------+-----------------+
| mtMinMax        | Find the        |
|                 | location/value  |
|                 | of the min or   |
|                 | max of each     |
|                 | real mesh in a  |
|                 | mesh tally.     |
+-----------------+-----------------+
| mtMultiply      | Multiply a mesh |
|                 | tally by a      |
|                 | constant        |
|                 | factor.         |
+-----------------+-----------------+
| mtPull          | Pull values     |
|                 | from certain    |
|                 | voxels out of a |
|                 | mesh tally      |
|                 | file.           |
+-----------------+-----------------+
| mtRefine        | Subdivide the   |
|                 | mesh into       |
|                 | smaller meshes  |
|                 | for better      |
|                 | visualization.  |
+-----------------+-----------------+
| mtResp          | Apply a         |
|                 | response        |
|                 | function to one |
|                 | family of a     |
|                 | mesh tally      |
|                 | file.           |
+-----------------+-----------------+
| mtSplit         | Split off part  |
|                 | of a mesh tally |
|                 | file into a     |
|                 | separate mesh   |
|                 | tally file.     |
+-----------------+-----------------+

**mt2ascii - Convert a mesh tally into an ASCII text file.**

Intended use: Since mesh tally files are in binary, the viewer can be
used to list mesh values. To get the values from the entire file, this
utility can be used to create an ASCII text version.

Input: The mesh tally file name and the filename for the resulting ASCII
file

Output: An ASCII formatted file

Example:

.. highlight:: scale 

::

    =mt2ascii
    “/optional/path/meshTallyFilename.3dmap”  ! the mesh tally
    “/optional/path/outputFilename.txt”       ! output file name
    end

**mt2msl - Convert a mesh tally into a mesh source lite.**

Intended use: Convert a fissionSource.3dmap mesh tally computed by KENO
into a meshSoureLite (\*.msl) file that can be used by a subsequent KENO
run using starting source type nst=9.

Input: Name of mesh tally (\*.3dmap) file

Output: A mesh source lite (\*.msl) file

Example:

::

    =mt2msl
    "input.3dmap"    ! mesh file (*.3dmap) name
    1                ! family
    14               ! group, or 0 for family total
    "result.msl"     ! mesh source lite (*.msl) file name
    end

**mt2msm - Convert a mesh tally into a mesh source.**

Intended use: Turn a tally of fission rate data into a mesh source file.
Mesh tallies are stored in a generic \*.3dmap format, which consist of
several families, each with one or more datasets. A typical mesh tally
(without the “noGroupFluxes” keyword) contains three families: the
neutron fluxes with each energy group as a dataset, the photon fluxes
with each energy group as a data set, and the responses with each
response as a dataset. This program uses the spatial information of the
mesh tally and combines a user-given energy distribution for all voxels.
A second way to use this program is to use a whole family (all the
energy groups) without a user-given energy distribution.

Input:

Line 1: filename of mesh tally

Line 2: which family of tally

Line 3: which dataset of that family (or 0 for sum of family)

Line 4: source type: 1-neutron, 2-photon

Line 5: number of bins for mesh source

Lines : energy (eV) and pdf values

Lines : energy (eV) and pdf values

... ...

Lines : energy (eV) and pdf values

Line : energy (eV)

Line last: desired output name

Input:

Line 1: filename of mesh tally

Line 2: which family of tally

Line 3: -1 (meaning use the whole family)

Line 4: source type: 1-neutron, 2-photon

Line 5: desired output name

Output: The resulting mesh source stored with the desired filename

Notes: Statistics of mesh tally are discarded.

Example:

::

    =shell
       cp ${RTNDIR}/barrel1.mt1.3dmap .
    end

    =mt2msm
    “barrel1.mt1.3dmap”    ! mesh tally
    3                      ! mesh tally family (1-n, 2-p, 3-responses)
    1                      ! real mesh in that family (0 means total of family)
    1                      ! mesh source particle type  1-neutron, 2-photon
    143                    ! number of bins in binned histogram distribution
    1.9640E+07 1.29403E-08 ! E_1  pdf_1
    1.7332E+07 4.60970E-07 ! E_2  pdf_2
    1.6905E+07 2.56619E-06 ! E_3  pdf_3
       ...        ...
    1.2341E+03 5.28408E-06 ! E_142  pdf_142
    9.6112E+02 1.77756E-06 ! E_143  pdf_143
    7.4852E+02             ! E_144
    “barrel.fission.msm”   ! output filename
    end

    =shell
       cp barrel.fission.msm ${RTNDIR}
    end

Example:

::

  =mt2msm
  “fissionSource.3dmap”
  1                       ! neutron flux (for KENO 3dmap files there is only one family)
  -1                      ! use the whole family (keep all the energy groups)
  1                       ! particle type (neutron)
  “caas.kenovi.fissionSource.msm”
  end

In SCALE 6.1, the fission source distribution mesh tally produced by
KENO contained data representing the number of fissions in each mesh
cell in each energy group. In SCALE 6.2, the data stored was changed to
be the fissions per unit volume – the fission density. This is more
consistent with other mesh tallies from Monaco which store flux or dose
rates that represent averages over the mesh cells. This change also
allows the MeshFileViewer to display the KENO fission source
distribution better. The mt2msm utility program also changed from SCALE
6.1 to SCALE 6.2 to account for the change in what is stored in the KENO
mesh tally file. Therefore, **KENO-produced fission source mesh tallies
and the mt2msm utility should not be mixed-and-matched across versions
of SCALE.** Doing so would result in the final Monaco mesh source file
being improperly normalized, which would not properly represent the KENO
fission source distribution and would give incorrect results in
subsequent MAVRIC calculations. Because there is not a specific ‘version
flag’ in a mesh tally file or mesh source map file, the user must ensure
that they have used the same version of SCALE for both the CSAS6 and
MAVRIC sequences any time the CAAS capability is used.

**mt2silo - Convert a mesh tally file into a Silo file for VisIt.**

Input: Name of mesh file (\*.3dmap), name of a Silo file, and a format

Output: A new Silo file

Notes: For format, use either 2 (PDB) or 7 (HDF5).

Example:

::

    =mt2silo
    "perfect.3dmap"        ! the existing mesh tally
    "perfect.silo"         ! the new silo file
    7                      ! format - HDF5
    end

**mt2vtk - Convert one dataset of one family in a mesh tally to VTK
format.**

Intended use: This is a way to transfer Monaco mesh tally data into a
common format that can be used by many data visualization packages,
including VisIt. Mesh tallies are stored in a generic \*.3dmap format,
which consist of several families, each with one or more datasets. A
typical mesh tally contains three families: the neutron fluxes with each
energy group as a dataset, the photon fluxes with each energy group as a
data set, and the responses with each response as a dataset. This
program selects one dataset of one family and saves the data (and
optionally the absolute uncertainties) in an ASCII file using a VTK file
format.

Input: The mesh file name, which family, which dataset of that family,
whether or not to include absolute uncertainties and the filename for
the resulting VTK file

Output: An ASCII VTK-formatted file

Example:

::

    =mt2vtk
    “/optional/path/meshTallyFilename.3dmap”  ! the mesh tally
    1                                         ! neutron flux family
    5                                         ! energy group 5
    true                                      ! include uncertainties
    “/optional/path/outputFilename.vtk”       ! output file name
    end

Example:

::

    =mt2vtk
    “/optional/path/meshTallyFilename.3dmap”  ! the mesh tally
    3                                         ! the response family
    1                                         ! first response
    false                                     ! do not include uncertainties
    “/optional/path/outputFilename.vtk”       ! output file name
    end

**mtAdder - Add several Monaco mesh tally files together into one mesh
tally.**

Intended use: Add mesh tally results from different sources into one
tally. The resulting mesh tally is the sum of all the components in the
several mesh tallies—fluxes are added and responses are added. For
example, two runs of MAVRIC from two different sources can be made. The
mesh tally results can then be added together, getting the total fluxes
and total responses from each.

Input: The number of files, followed by the list of mesh tally filenames
to add, then the name of the total mesh tally

::

    =mtAdder
    n
    “filename_1”
    “filename_2”
    ...
    “filename_n”
    “resultFilename”
  end


Output: A new mesh tally file

Notes: All of the mesh tally files must be the same size and shape
(number of families, x cells, y cells, z cells, and energy groups in
each family) and have the same number of responses. Responses (if any)
must be consistent to calculate meaningful results.

Example:

::

    =mtAdder
    3
    “meshFilename_1.3dmap”
    “meshFilename_2.3dmap”
    “meshFilename_3.3dmap”
    “meshFilenameTotal.3dmap”
    end

**mtAverager - Average several Monaco mesh tally files into one mesh
tally.**

Intended use: Combine (average) separate runs of the same problem with
different random number seeds into one tally. For example, if a user
does 10 separate runs of the same problem (poor man’s parallel) and
wants to combine the results as if they were from one run, an average is
needed. The average and uncertainties are weighted by the number of
histories in each run, to maintain proper statistics.

Input: The number of files, each filename and how many histories, then
the name of the total mesh tally

::

    =mtAverager
    n
    “filename_1”   histories_1
    “filename_2”   histories_2
    ...           ...
    “filename_n”   histories_n
    “resultFilename”
    end

Output: A new mesh tally file

Notes: All of the mesh tally files must be the same size and shape
(number of families, x cells, y cells, z cells, and energy groups in
each family) and have the same number of responses. Responses (if any)
must be consistent to calculate meaningful results.

Example:

::

    =mtAverager
    3
    “meshFilename_1.3dmap”   800000
    “meshFilename_2.3dmap”   900000
    “meshFilename_3.3dmap”   800000
    “/home/area/meshFilename.ave.3dmap”
    end

**mtBinOp - Binary operation of mesh tally files: sum, difference,
product, and ratio.**

Intended use: Apply simple math to the results stored in mesh tally
files

Input: The first mesh tally, the operator: add (or sum, +), subtract (or
difference, -), multiply (or product, x, \*) and divide (or ratio, ÷,”
/”), the second mesh tally name and then name of the resulting mesh
tally file.

Output: A new mesh tally file

Notes: Uncertainties are propagated assuming the two mesh tallies are
uncorrelated, which may not always be a good assumption. Mesh tallies
need to have the same grid structure and number of families and groups.
Dataset names in the results are inherited from the first mesh tally and
may not make sense after the operation. When using the / (slash) for
division, enclose it in quotes (“/”).

::

    =mtBinOp
    “neutron.3dmap”     ! first operand
    divide              ! operation
    “total.3dmap”       ! second operand
    “ratio.3dmap”       ! output file name
    end

**mtDisp - Display the basics of a mesh tally file.**

Input: A mesh tally (\*.3dmap) file

Output: Some of the basic details of mesh file

Example:

::

    =mtDisp
    "simulation.mt2.dff"    ! existing mesh file
    end

**mtExpand - Expand a space-only mesh from a mesh tally with an energy
function**

Input: A mesh tally (\*.3dmap) file and some parameters

Output: A mesh file similar to a mesh source but with uncertainty

Example:

::

    =mtExpand
    'activate.mt1.3dmap'
    2 1  ! response family, first response - cobalt activate rate
    true ! multiply by voxel volumes
    2    ! make photon source
    19   ! groups
    2.00E+07 0
    1.00E+07 0
    8.00E+06 0
    6.50E+06 0
    5.00E+06 0
    4.00E+06 0
    3.00E+06 0
    2.50E+06 0
    2.00E+06 0
    1.66E+06 0.5
    1.33E+06 1.5
    1.00E+06 0
    8.00E+05 0
    6.00E+05 0
    4.00E+05 0
    3.00E+05 0
    2.00E+05 0
    1.00E+05 0
    4.50E+04 0
    1.00E+04
    'photonSource.3dmap'
    end

**mtFilter - Perform various filters on a mesh tally file.**

Input: A \*.3dmap mesh tally file and a group-wise response function

Output: A \*.3dmap mesh tally file

Notes: Three basics types of filters: 0) flattening filter, 1) high-pass
filter, 2) low-pass filter. For types 1 and 2, the values plus a given
number of standard deviations will be compared to the criteria. The
input list depends on filter type. Types 1 and 2 require a value and a
number of standard deviations (n_sigma). A flattening filter turns any
positive value into the value of “1.0”.

Filtering performed based on following comparisons;

value + n_sigmas*abs_unc > minValue (high-pass)

or

value + n_sigmas*abs_unc < maxValue (low-pass)

The number of sigmas can be positive or negative.

Examples:

::

    =mtFilter
    "doseRates.3dmap"     ! existing mesh tally file
    1                     ! high-pass filter:
    0.150                 !    keep dose rates above 0.150
    -3.0                  ! add -3.0 standard deviations to values before comparing
    "above.3dmap"         ! new mesh tally file
    end

    =mtFilter
    "above.3dmap"         ! existing mesh tally file
    0                     ! flattening filter
    "boolean.3dmap"       ! new mesh tally file
    end

**mtInv - Invert all of the values in a mesh tally.**

Intended use: Invert non-zero values in a mesh tally to be used in
further processing.

Input: The original mesh tally, the name of the resulting mesh tally
file

Output: A new mesh tally file

Notes: Uncertainties are propagated (the relative uncertainty of the
reciprocal of a value is the same as the relative uncertainty of the
value).

Example:

::

    =mtInv
    'someTally.3dmap'      ! existing mesh tally file
    'inverted.3dmap'       ! new mesh tally file
    end

**mtMask - Keep only or remove specified voxels of a mesh tally based on
geometry.**

Intended use: Only keep or remove certain portions of a mesh tally based
on the unit, media, or mixture at the center of the voxel.

Input: A mesh tally file, an action (keeponly or remove), an operation
(intersection or union) of the unit=u, media=r and mixture=m, a
replacement value for voxels not kept and the file name of the resulting
mesh tally file. User can specify things such as 1) keep only the voxels
that have unit=2 and mixture=5, 2) keep only the voxels that have
media=3 or mixture=4, 3) remove voxels that have unit=2 and mixture=5,
4) remove voxels that have media=3 or mixture=4. To not include the
unit, media, or mixture in the specification, use a value of -1.

Output: A new mesh tally file.

Notes: When processing a file before finding the maximum, make the
replacement value something very low. If mtMask is being used before
finding the minimum, then set the replacement value high. Media is the
SGGP media number within the unit.

::

    =mtMask
    "theTally.3dmap"       ! existing mesh tally file
    keeponly               ! use 'keeponly' or 'remove'
    intersection           ! use 'intersection' or 'union'
    2 -1 5                 ! unit=2 AND mixture=5
    0.0                    ! replacement value for voxels not kept
    'new.3dmap'            ! new mesh tally file
    end

    =mtMask
    "theTally.3dmap"       ! existing mesh tally file
    remove                 ! use 'keeponly' or 'remove'
    union                  ! use 'intersection' or 'union'
    -1 3 4                 ! media=3 OR mixture=4
    0.0                    ! replacement value for voxels removed
    'new.3dmap'            ! new mesh tally file
    end

**mtMinMax - Find the location/value of the min or max of each real mesh
in a mesh tally.**

Intended use: Determine the minimum or maximum values in a mesh tally.

Input: The mesh tally, what to find (minimums or maximums), how many
mins/maxs for each real mesh in the mesh tally, and the name of the text
output file to store the results

Output: A text output containing the values and locations of the
minimums or maximums of each real mesh in a tally file

Notes: The same information is also in the main SCALE output file.

Example:

::

    =mtMinMax
    'bigOleMeshTally.3dmap'   ! existing mesh tally file
    maximum                   ! find either minimums or maximums
    5                         ! list top 5 maximum values in each real mesh
    'theList.txt'             ! file name to store all of the results
    end

**mtMultiply - Multiply a mesh tally by a constant factor.**

Intended use: Multiply every group of every family in a mesh tally for
either a change in source strength or a change in units.

Input: The original mesh tally, the multiplier, and the name of the
resulting mesh tally file

Output: A new mesh tally file

Example:

::

    =mtMultiply
    “simulation.mt1.3dmap”       ! the mesh tally
    25.0                         ! source strength increase of 25
    “simulation.bigger.3dmap”    ! output file name
    end

**mtPull - Pull values from certain voxels out of a mesh tally file.**

Intended use: Get energy-dependent fluxes for certain locations from a
mesh file.

Input: A mesh file (\*.3dmap) file and a list of positions and/or voxels

Output: Listing of energy-dependent fluxes from each desired location to
an ASCII text file

Notes: Can pull fluxes either by a physical coordinate position or by
voxel indices. Positions should be entered as a set of x, y, z for
Cartesian coordinate system and r, θ, z for cylindrical coordinate
system.

Example:

::

    =mtPull
    "duh.mt2.3dmap"    ! existing mesh file
    n                  ! number of x,y,z points to pull
    x_1 y_1 z_1        ! coordinates of point 1
    x_1 y_2 z_2        ! coordinates of point 2
    ...
    x_n y_n z_n        ! coordinates of point n
    m                  ! number of i,j,k voxels to pull
    i_1 j_1 k_1        ! indices of voxel 1
    i_2 j_2 k_2        ! indices of voxel 2
    ...
    i_m j_m k_m        ! indices of voxel m
    "outputName.txt"   ! name of output text file
    =end

**mtRefine - Subdivide the mesh into smaller meshes.**

Input: A \*.3dmap mesh tally file with geometry mesh size (I,J,K) and
three integers describing how many subdivisions of each voxel to create
in each dimension

Output: A \*.3dmap mesh tally file with geometry mesh size
(I*nx,J*ny,K*nz)

Example:

::

    =mtRefine
    "fluxes.3dmap"        ! existing *.3dmap mesh tally file (I,J,K)
    nx ny nz              ! how to subdivide each
    "refined.3dmap"       ! new (largerer) *.3dmap mesh tally file (I*nx,J*ny,K*nz)
    end

**mtResp - Apply a response function to one family of a mesh tally
file.**

Intended use: Compute group-wise dose or reaction rates by combining a
response function with the scalar fluxes.

Input: A \*.3dmap mesh tally file and a group-wise response function

Output: A \*.3dmap mesh tally file containing one family

Example:

::

    =mtResp
    "fluxes.3dmap"        ! existing *.3dmap mesh tally file
    200                   ! number of bins in response
    1                     ! which family
    2.2675480E-04         ! response group 1
    2.2283355E-04         ! response group 2
    2.1878259E-04         ! response group 3
    ...
    3.6748440E-06         ! response group nbins-2
    3.6748443E-06         ! response group nbins-1
    3.6748436E-06         ! response group nbins
    "doseByGroup.3dmap"   ! new (smaller) *.3dmap mesh tally file
    end

**mtSplit - Split off part of a mesh tally file into a separate mesh
tally file.**

Intended use: Some mesh tallies may become so large that the
MeshFileViewer cannot load the entire file to view. This utility allows
users to split off one family or just one group of one family into a
separate mesh tally file.

Input: The original mesh tally, which family (neutron, photon, or
responses), and which dataset (usually a group). Instead of a dataset,
users may specify 0 to get the total of a family or -1 to get all
datasets for that family. The name of the resulting mesh tally also
needs to be given.

Output: A new, smaller, mesh tally file

Example:

::

    =mtSplit
    “mavricUtilities3.mt1.3dmap”       ! the mesh tally
    1                                  ! the family of neutron fluxes
    5                                  ! fifth neutron flux group
    “mavricUtilities3.nfluxg5.3dmap”   ! output file name
    end

Utilities for working with DENOVO binary flux (\*.dff) files
------------------------------------------------------------

These utilities include the following:

+-----------------------------------+-----------------------------------+
| dff2dso                           | Convert a Denovo flux file into a |
|                                   | Denovo spatial output file.       |
+-----------------------------------+-----------------------------------+
| dff2mai                           | Convert a Denovo flux file into a |
|                                   | mesh angular information file.    |
+-----------------------------------+-----------------------------------+
| dff2mim                           | Invert a Denovo flux file and     |
|                                   | store as a mesh importance map.   |
+-----------------------------------+-----------------------------------+
| dff2msl                           | Convert a Denovo flux file into a |
|                                   | mesh source lite.                 |
+-----------------------------------+-----------------------------------+
| dffBinOp                          | Binary operation of Denovo flux   |
|                                   | files: sum, difference, product,  |
|                                   | and ratio.                        |
+-----------------------------------+-----------------------------------+
| dffDisp                           | Display the basics of a Denovo    |
|                                   | flux file.                        |
+-----------------------------------+-----------------------------------+
| dffExpand                         | Expand a space-only Denovo flux   |
|                                   | file by an energy function.       |
+-----------------------------------+-----------------------------------+
| dffFilter                         | Perform various filters on a      |
|                                   | Denovo flux file.                 |
+-----------------------------------+-----------------------------------+
| dffFix                            | Fix the zero and negative values  |
|                                   | in a Denovo flux file.            |
+-----------------------------------+-----------------------------------+
| dffInt                            | Integrate a single particle type  |
|                                   | from a Denovo flux file.          |
+-----------------------------------+-----------------------------------+
| dffInv                            | Invert the values in a Denovo     |
|                                   | flux file.                        |
+-----------------------------------+-----------------------------------+
| dffMult                           | Multiply a Denovo flux file by a  |
|                                   | constant factor.                  |
+-----------------------------------+-----------------------------------+
| dffPull                           | Pull fluxes from certain voxels   |
|                                   | out of a Denovo flux file.        |
+-----------------------------------+-----------------------------------+
| dffResp                           | Apply a response function to      |
|                                   | scalar fluxes in a Denovo flux    |
|                                   | file.                             |
+-----------------------------------+-----------------------------------+
| dffSplit                          | Split off a single particle type  |
|                                   | from a Denovo flux file.          |
+-----------------------------------+-----------------------------------+

**dff2dso - Convert a Denovo flux file into a Denovo spatial output
file.**

Input: A binary (stream) Denovo flux file and which particle types to
convert

Output: A binary (stream) Denovo Spatial Output file

Notes: For particle type, use 1 for neutron, 2 for photon, and 0 for all
types.

Example:

::

    =dff2dso
    "neatStuff.dff"       ! existing Denovo flux file
    1                     ! keep only neutron information
    "neatStuff.dso"       ! new Denovo spatial output file
    end

**dff2mai - Convert a Denovo flux file into a mesh angular information
file.**

Intended use: Take the optional net current information from a Denovo
flux file and create the adjoint current unit vectors and lambda
parameters required for directional CADIS. This is stored in a mesh
angular information (\*.mai) file.

Input: A binary (stream) denovoFluxFile

Output: A binary (stream) meshAngularInfoFile, a mesh angular
information file

Example:

::

    =dff2mai
    "mavricUtilities3.adjoint.dff"           ! new denovoFluxFile
    "mavricUtilities3.mai"                   ! mesh angular info file
    end

**dff2mim - Invert a Denovo flux file and store as a mesh importance
map.**

Intended use: Make weight targets without a consistent biased mesh
source.

Input: A Denovo flux (\*.dff) file, a scalar constant, and the name of
Monaco mesh importance map (\*.mim) file.

Output: A Monaco mesh importance map (\*.mim) file.

Example:

::

    =dff2mim
    "adjoint.dff"    ! existing adjoint denovoFluxFile
    3.0e-10          ! constant  targetWeight = constant/adjFlux
    "test.mim"       ! new Monaco mesh importance map
    end

**dff2msl - Convert a Denovo flux file into a mesh source lite.**

Intended use: Take Denovo fission source information stored in a \*.dff
file and convert it to a mesh source lite file (\*.msl) to be used as a
KENO starting source, nst=9.

Input: A Denovo flux (\*.dff) file

Output: A mesh source lite (\*.msl) file

Example:

::

    =dff2msl
    "wishfulThinking.dff"    ! existing Denovo flux file
    "startingSource.msl"     ! mesh source lite file
    end

**dffBinOp - Binary operation of Denovo flux files: sum, difference,
product and ratio.**

Intended use: Apply simple math to the results stored in Denovo flux
files.

Input: The first flux file, the operator: add (or sum, +), subtract (or
difference, -), multiply (or product, x, \*), or divide (or ratio, ÷,
"/"), the second flux file name, and the name of the resulting flux file

Output: A Denovo flux file

Notes: Flux files need to have the same grid structure and number of
groups. When using the / (slash) for division, enclose it in quotes
("/").

Example:

::

    =dffBinOp
    "neutron.dff"     ! first operand
    divide            ! operation
    "total.dff"       ! second operand
    "ratio.dff"       ! output file name
    end

**dffDisp - Display the basics of a Denovo flux file.**

Input: A Denovo flux (\*.dff) file

Output: Some of the basic details of the Denovo flux file

Example:

::

    =dffDisp
    "fluxes.dff"          ! existing Denovo flux file
    end

**dffExpand - Expand a space-only Denovo flux file by an energy
function.**

Input: A Denovo flux (\*.dff) file (with a single group - a space-only
function), one or more particle types, and an energy function for each

Output: A full space/energy Denovo flux file

Example:

::

    =dffExpand
    "spatialFluxes.dff"       ! existing Denovo flux file (single group)
    2                         ! number of particles
    1                         ! particle type (1-neutron, 2-photon)
    27                        ! number of bins in binned histogram distribution
    2.00000E+07 3.0658021E-09 ! E_1  amount_1
    6.37630E+06 6.9767163E-09 ! E_2  amount_2
    3.01190E+06 1.1495182E-08 ! E_3  amount_3
       ...        ...
    3.00000E-02 1.7127996E-04 ! E_26  amount_26
    1.00000E-02 3.0910611E-04 ! E_27  amount_27
    1.00000E-05               ! E_28
    2                         ! particle type (1-neutron, 2-photon)
    19                        ! number of bins in binned histogram distribution
    2.00E+07 0.0              ! E_1  amount_1
    1.00E+07 0.0              ! E_2  amount_2
    8.00E+06 0.0              ! E_3  amount_3
       ...        ...
    1.00E+05 0.0              ! E_17  amount_17
    4.50E+04 0.0              ! E_18  amount_18
    1.00E+04                  ! E_19
    "expanded.dff"            ! new Denovo flux file
    end

**dffFilter - Perform various filters on a Denovo flux file.**

Intended use: Keep fluxes in a \*.dff file where the flux or response
meets a specified criterion.

Input: A Denovo flux file name, filter type, filter options, the output
file name

Output: A Denovo flux file

Notes: There are three basics types of filters: 0) flattening filter, 1)
high-pass filter, 2) low-pass filter. For types 1 and 2, the criteria
could be a computed response. The input list changes depending on the
filter type and whether a response function is included. For no response
function, use 0 for the number of groups. A flattening filter turns any
positive value into a value of “1.0”.

Examples:

::

    =dffFilter
    "some.dff"               ! input Denovo flux filename
    0                        ! filter type
    "flattened.dff"          ! output Denovo flux filename
    end

    =dffFilter
    "some.dff"               ! input Denovo flux filename
    2                        ! filter type
    10.0                     ! maximum value
    0                        ! number of groups for response function
    "simpleFiltered.dff"     ! output Denovo flux filename
    end

    =dffFilter
    "some.dff"               ! input Denovo flux filename
    1                        ! filter type
    10.0                     ! minimum value
    19                       ! number of groups for response function
    1.1620022E-05            !   should match total groups in file
    8.7445696E-06
    7.4596655E-06
    6.3505804E-06
    5.3994922E-06
    4.6016462E-06
    3.9522688E-06
    3.4588520E-06
    3.0130868E-06
    2.6200121E-06
    2.1944491E-06
    1.8269592E-06
    1.5149031E-06
    1.1595382E-06
    8.7044964E-07
    6.2187445E-07
    3.7080767E-07
    2.6877788E-07
    5.9327226E-07
    "respFiltered.dff"       ! output Denovo flux filename
    end

**dffFix - Fix the zero and negative values in a Denovo flux file.**

Intended use: Replace zero or negative values with nearest good
neighboring value. Checks previous group, previous x voxel, previous y
voxel, then previous z voxel.

Input: A Denovo flux file

Output: A new Denovo flux file

Example:

::

    =dffFix
    "original.dff"    ! existing Denovo flux file
    "repaired.dff"    ! new Denovo flux file
    end

**dffInt - Integrate a single particle type from a Denovo flux file.**

Input: A Denovo flux file, which particle type to integrate (1-neutron,
2-photon), and the filename of the resulting integrated file

Output: A single-group Denovo flux file

Example:

::

    =dffInt
    "coupled.dff"       ! existing Denovo flux file
    2                   ! particle type
    "photonTotal.dff"   ! new Denovo flux file (single group)
    end

**dffInv - Invert the values in a Denovo flux file.**

Input: A Denovo flux file

Output: A Denovo flux file

Notes: Only non-zero values are inverted

Example:

::

    =dffInv
    "fluxes.dff"        ! existing Denovo flux file
    "inverted.dff"      ! new Denovo flux file
    end

**dffMult - Multiply a Denovo flux file by a constant factor.**

Intended use: source strength change, change in units, etc.

Input: A Denovo flux file and a constant factor

Output: A Denovo flux file

Example:

::

    =dffMult
    "fluxes.dff"        ! existing Denovo flux file
    10000.0             ! change units from (/cm^2/s) to (/m^2/s)
    "multiplied.dff"    ! new Denovo flux file
    end

**dffPull - Pull fluxes from certain voxels out of a Denovo flux file.**

Intended use: Get energy-dependent fluxes for certain locations from a
flux file.

Input: A Denovo flux file and a list of positions and/or voxels

Output: Listing of energy-dependent fluxes from each desired location to
an ASCII text file

Notes: Can pull fluxes either by a physical coordinate position or by
voxel indices.

Example:

::

    =dffPull
    "fluxes.dff"       ! file with the scalar fluxes you want
    n                  ! number of x,y,z points to pull
    x_1 y_1 z_1        ! coordinates of point 1
    x_1 y_2 z_2        ! coordinates of point 2
    ...
    x_n y_n z_n        ! coordinates of point n
    m                  ! number of i,j,k voxels to pull
    i_1 j_1 k_1        ! indices of voxel 1
    i_2 j_2 k_2        ! indices of voxel 2
    ...
    i_m j_m k_m        ! indices of voxel m
    "outputName.txt"   ! name of output text file
    =end

**dffResp - Apply a response function to scalar fluxes in a Denovo flux
file.**

Intended use: Compute group-wise dose or reaction rates by combining a
response function with the scalar fluxes. This can be done for every
particle type in the flux file or a single specific particle type.

Input: A Denovo flux file, particle indicator and a group-wise response
function

Output: A Denovo flux file

Notes: 0-all particles, 1-neutron, 2-photon

Example:

::

    =dffResp
    "fluxes.dff"          ! existing coupled Denovo flux file
    1                     ! keep only neutron information
    200                   ! number of bins in response
    2.2675480E-04         ! response group 1
    2.2283355E-04         ! response group 2
    2.1878259E-04         ! response group 3
    ...
    3.6748440E-06         ! response group nbins-2
    3.6748443E-06         ! response group nbins-1
    3.6748436E-06         ! response group nbins
    "doses.dff"           ! new (smaller) Denovo flux fle
    end

or

::

    =dffResp
    "fluxes.dff"          ! existing Denovo flux file
    0                     ! keep all particles information
    46                    ! number of bins in response
    1.6151395E-04         ! response group 1, first neutron
    1.4451494E-04         ! response group 2
    1.2703618E-04         ! response group 3
    ...
    3.6748447E-06         ! response group 27, last neutron
    1.1620022E-05         ! response group 28, first photon
    8.7445696E-06         ! response group 29
    7.4596655E-06         ! response group 30
    ...
    5.9327226E-07         ! response group 46, last photon
    "doses.dff"           ! new Denovo flux file
    end

**dffSplit - Split off a single particle type from a Denovo flux file.**

Intended use: Make a flux file containing a single particle type from
another Denovo flux file.

Input: A Denovo flux file and a particle type

Output: A (smaller) Denovo flux file

Notes: 1-neutron, 2-photon

Example:

::

    =dffSplit
    "coupled.dff"     ! existing Denovo flux file
    2                 ! particle type
    "photons.dff"     ! new (smaller) Denovo flux file
    end

Utilities for working with DENOVO \*.varscl (a TORT format) files
-----------------------------------------------------------------

These utilities include the following:

+-----------------------------------+-----------------------------------+
| vs2dff                            | Convert a varscl file into a      |
|                                   | Denovo flux file.                 |
+-----------------------------------+-----------------------------------+
| vsAdder                           | Add two TORT \*.varscl files      |
|                                   | together into one \*.varscl file. |
+-----------------------------------+-----------------------------------+
| vsBinOp                           | Binary operation of TORT          |
|                                   | \*.varscl files: sum, difference, |
|                                   | product and ratio.                |
+-----------------------------------+-----------------------------------+
| vsDisp                            | Display the basic contents of a   |
|                                   | TORT \*.varscl file.              |
+-----------------------------------+-----------------------------------+
| vsFilter                          | Perform various filters on a TORT |
|                                   | \*.varscl file.                   |
+-----------------------------------+-----------------------------------+
| vsInt                             | Integrate a single particle type  |
|                                   | from a TORT \*.varscl file.       |
+-----------------------------------+-----------------------------------+
| vsInv                             | Invert the values in a TORT       |
|                                   | \*.varscl file.                   |
+-----------------------------------+-----------------------------------+
| vsMult                            | Multiply a TORT \*.varscl file by |
|                                   | a constant factor.                |
+-----------------------------------+-----------------------------------+
| vsPull                            | Pull fluxes from certain voxels   |
|                                   | out of a TORT \*.varscl file.     |
+-----------------------------------+-----------------------------------+
| vsReGrp                           | Regroup a TORT \*.varscl file.    |
+-----------------------------------+-----------------------------------+
| vsResp                            | Apply a response function to      |
|                                   | scalar fluxes in a TORT \*.varscl |
|                                   | file.                             |
+-----------------------------------+-----------------------------------+
| vsSplit                           | Split off part of a TORT          |
|                                   | \*.varscl file into a separate    |
|                                   | \*.varscl file.                   |
+-----------------------------------+-----------------------------------+

These utilities work with the \*.varscl files produced with SCALE 6 and
SCALE 6.1. The \*.varscl format (a TORT format) is a single precision,
binary format that has been replaced with the double precision, binary
\*.dff file (Denovo flux file) in SCALE 6.2. SCALE 6 and SCALE 6.1 users
can request the executable binaries for these utilities by sending an
email to scaleHelp@ornl.gov.

**vs2dff - Convert a varscl file into a Denovo flux file.**

Intended use: Convert a varscl file (used in previous versions of
MAVRIC) into a Denovo flux file (introduced in SCALE 6.2).

Input: The \*varscl file name, whether or not it is an adjoint flux, and
the filename for the resulting denovoFluxfile

Output: A binary (stream) denovoFluxFile

Example:

::

    =vs2dff
    "mavricUtilities3.adjoint.varscl"        ! the TORT varscl file
    true                                     ! it is an adjoint flux
    "mavricUtilities3.adjoint.dff"           ! new denovoFluxFile
    end

**vsAdder - Add two TORT \*.varscl files together into one \*.varscl
file.**

Intended use: Beta versions of MAVRIC used TORT and GRTUNC-3D and could
add the \*.varscl files from each together before using them to create
importance maps. MAVRIC now uses Denovo and no longer needs to add
separate GRTUNC/TORT files. This utility is designed for people wishing
to use the older files with the latest MAVRIC.

Input: Two \*.varscl file names, typically one from GRTUNC-3D and the
other from TORT, the filename of the added file, whether you want lots
of output displayed (“true” or “false”) and whether or not there is a
minimum value of flux to use. If so, it is then listed.

Output: A single \*.varscl with the specified name

Notes: Addition is commutative, but not all varscl files are created
equal. Do not mix up the GRTUNCL and the TORT files. GRTUNCL3D does not
fill in the header info quite right, so the added varscl file takes
header info only from the TORT varscl file.

Example:

::

    =vsAdder
    “/some/path/problem.gtunc.adjoint.varscl”
    “/some/path/problem.tort.adjoint.varscl”
    “total.varscl”
    f
    t
    1.0e-25
    end

    =shell
      cp total.varscl ${RTNDIR}/total.varscl
    end

**vsBinOp - Binary operation of TORT \*.varscl files: sum, difference,
product and ratio.**

Intended use: Apply simple math to the results stored in TORT \*.varscl
files.

Input: The first flux file, the operator: add (or sum, +), subtract (or
difference, -), multiply (or product, x, \*), and divide (or ratio, ÷,
"/"), the second flux file name, and the name of the resulting flux file

Output: A TORT \*.varscl file

Notes: Flux files need to have the same grid structure and number of
groups. When using the / (slash) for division, enclose it in quotes
("/").

Example:

::

    =vsBinOp
    "neutron.varscl"     ! first operand
    false                ! are these adjoint files?
    divide               ! operation
    "total.varscl"       ! second operand
    "ratio.varscl"       ! output file name
    end

**vsDisp - Display the basic contents of a TORT \*.varscl file.**

Input: A TORT \*.varscl file name and adjoint flag

Output: Text display

Examples:

::

    =vsDisp
    "some.varscl"            ! input TORT *.varscl filename
    false                    ! is this an adjoint varscl?
    end

    =vsDisp
    "some.varscl"            ! input TORT *.varscl filename
    adjoint                  ! is this an adjoint varscl?
    end

**vsFilter - Perform various filters on a TORT \*.varscl file.**

Intended use: Keep fluxes in a \*.varscl file where the flux or response
meets a specified criterion.

Input: A TORT \*.varscl file name, filter type, filter options, the
output file name

Output: A TORT \*.varscl file

Notes: There are three basics types of filters: 0) flattening filter, 1)
high-pass filter, 2) low-pass filter. For types 1 and 2, the criteria
could be a computed response. The input list changes depending on the
filter type and whether a response function is included. For no response
function, use 0 for the number of groups.

Examples:

::

    =vsFilter
    "some.varscl"            ! input TORT *.varscl filename
    false                    ! is this an adjoint varscl?
    0                        ! filter type
    "flattened.varscl"       ! output TORT *.varscl filename
    end

    =vsFilter
    "some.varscl"            ! input TORT *.varscl filename
    false                    ! is this an adjoint varscl?
    2                        ! filter type
    10.0                     ! maximum value
    0                        ! number of groups for response function
    "simpleFiltered.varscl"  ! output TORT *.varscl filename
    end

    =vsFilter
    "some.varscl"            ! input TORT *.varscl filename
    false                    ! is this an adjoint varscl?
    1                        ! filter type
    10.0                     ! minimum value
    19                       ! number of groups for response function
    1.1620022E-05            !   should match total groups in file
    8.7445696E-06
    7.4596655E-06
    6.3505804E-06
    5.3994922E-06
    4.6016462E-06
    3.9522688E-06
    3.4588520E-06
    3.0130868E-06
    2.6200121E-06
    2.1944491E-06
    1.8269592E-06
    1.5149031E-06
    1.1595382E-06
    8.7044964E-07
    6.2187445E-07
    3.7080767E-07
    2.6877788E-07
    5.9327226E-07
    "respFiltered.varscl"    ! output TORT *.varscl filename

**vsInt - Integrate a single particle type from a TORT \*.varscl file.**

Input: A TORT \*.varscl file

Output: A single-group TORT \*.varscl file

Example:

::

    =vsInt
    "coupled.varscl"       ! existing TORT *.varscl file
    false                  ! is this an adjoint file?
    2                      ! particle type (0-all, 1-neutron, 2-photon)
    "photonTotal.varscl"   ! new TORT *.varscl file (single group)
    end

**vsInv - Invert the values in a TORT \*.varscl file.**

Input: A TORT \*.varscl file

Output: A TORT \*.varscl file

Notes: Only non-zero values are inverted

Example:

::

    =vsInv
    "fluxes.varscl"        ! existing TORT *.varscl file
    false                  ! is this an adjoint file?
    "inverted.varscl"      ! new TORT *.varscl file
    end

**vsMult - Multiply a TORT \*.varscl file by a constant factor.**

Intended use: source strength change, change in units, etc.

Input: A TORT \*.varscl file and a constant factor

Output: A TORT \*.varscl file

Example:

::

    =vsMult
    "fluxes.varscl"        ! existing TORT *.varscl file
    false                  ! is this an adjoint file?
    10000.0                ! change units from (/cm^2/s) to (/m^2/s)
    "multiplied.varscl"    ! new TORT *.varscl file
    end

**vsPull - Pull fluxes from certain voxels out of a TORT \*.varscl
file.**

Intended use: Get energy-dependent fluxes for certain locations from a
flux file.

Input: A TORT \*.varscl file and a list of positions and/or voxels

Output: Listing of energy-dependent fluxes from each desired location to
an ASCII text file

Notes: Can pull fluxes either by a physical coordinate position or by
voxel indices.

Example:

::

    =vsPull
    "fluxes.varscl"    ! file with the scalar fluxes you want
    false              ! is this an adjoint file?
    n                  ! number of x,y,z points to pull
    x_1 y_1 z_1        ! coordinates of point 1
    x_1 y_2 z_2        ! coordinates of point 2
    ...
    x_n y_n z_n        ! coordinates of point n
    m                  ! number of i,j,k voxels to pull
    i_1 j_1 k_1        ! indices of voxel 1
    i_2 j_2 k_2        ! indices of voxel 2
    ...
    i_m j_m k_m        ! indices of voxel m
    "outputName.txt"   ! name of output text file
    end

**vsReGrp - Regroup a TORT \*.varscl file.**

Input: A TORT \*.varscl file and adjoint flag, then a list of how the
new groups should be formed from the old groups

Output: A smaller TORT \*.varscl file

Example:

::

    =vsReGrp
    "coupled.varscl"       ! existing TORT *.varscl file
    false                  ! is this an adjoint file?
    27                     ! number of neutron groups in file
    1                      ! new group assignment for each
    1                      !     existing neutron group
    1                      !   must start with one
    2                      !   each entry is same as last or
    ...                   !     increases by 1
    8                      ! new group assignment for neutron group 27
    19                     ! number of photon groups in file
    1                      ! new group assignment for each
    1                      !     existing photon group
    1                      !   must start with one
    2                      !   each entry is same as last or
    ...                   !     increases by 1
    4                      ! new group assignment for photon group 19
    "smaller.varscl"       ! new TORT *.varscl file name
    end

**vsResp - Apply a response function to scalar fluxes in a TORT
\*.varscl file.**

Intended use: Compute group-wise dose or reaction rates by combining a
response function with the scalar fluxes.

Input: A TORT \*.varscl file and a group-wise response function

Output: A TORT \*.varscl file

Example:

::

    =vsResp
    "fluxes.varscl"       ! existing coupled TORT *.varscl file
    false                 ! is this an adjoint file?
    200                   ! number of bins in response
    2.2675480E-04         ! response group 1
    2.2283355E-04         ! response group 2
    2.1878259E-04         ! response group 3
    ...
    3.6748440E-06         ! response group 198
    3.6748443E-06         ! response group 199
    3.6748436E-06         ! response group 200
    "doses.varscl"        ! new (smaller) Denovo flux fle
    end

**vsSplit - Split off part of a TORT \*.varscl file into a separate
\*.varscl file.**

Intended use: Make a flux file containing a single particle type from
another TORT \*.varscl file.

Input: A TORT \*.varscl file and a particle type

Output: A (smaller) TORT \*.varscl file

Example:

::

    =vsSplit
    "coupled.varscl"     ! existing TORT *.varscl file
    false                ! is this an adjoint file?
    2                    ! particle type (1-neutron, 2-photon)
    "photons.varscl"     ! new (smaller) TORT *.varscl file
    end

Miscellaneous utilities
-----------------------

These utilities include the following:

+-----------+----------------------------------------------------------------+
| dsi2asc   | Convert a Denovo simple input (\*.dsi) from binary to ASCII.   |
+===========+================================================================+
| dsiDisp   | Display the basics of a Denovo simple input file.              |
+-----------+----------------------------------------------------------------+
| dso2msl   | Use a Denovo spatial output to create a mesh source lite.      |
+-----------+----------------------------------------------------------------+
| dsoDisp   | Display the basics of a Denovo spatial output file.            |
+-----------+----------------------------------------------------------------+
| mim2wwinp | Convert a mesh importance map into an MCNP weight window file. |
+-----------+----------------------------------------------------------------+
| mimDisp   | Display the basics of a mesh importance map (\*.mim) file.     |
+-----------+----------------------------------------------------------------+
| mimNorm   | Normalize a mesh importance map to a given location/energy.    |
+-----------+----------------------------------------------------------------+
| msmDisp   | Display the basics of a mesh source map (\*.msm) file.         |
+-----------+----------------------------------------------------------------+

**dsi2asc - Convert a Denovo simple input (\*.dsi) from binary to ASCII**.

Intended use: Check a Denovo input file for correctness.

Input: Names of original binary Denovo simple input (\*.dsi) file and the desired ASCII text file

Output: Human-readable form of the Denovo input file

Example:

::

    =dsi2asc
    "input.dsi"    ! Denovo simple input file (binary)
    "ascii.txt"    ! new ascii text file
    end

**dsiDisp - Display the basics of a Denovo simple input file.**

Input:  A Denovo simple input (\*.dsi) file

Output:  Some of the basic details of the Denovo simple input file

Example:

::

    =dsiDisp
    "godiva.dsi"          ! existing Denovo simple input file
    end



**dso2msl - Use a Denovo spatial output to create a mesh source lite.**

Input: A \*.dso file is made of three-dimensional data sets called fields. Which field to convert? 1-n: convert that field    0: convert sum of all fields

Output: A mesh source lite (\*.msl) file for KENO-VI.

Example:

::

    =dso2msl
    "fisSource.dso"  ! Denovo spatial output file with many fields
    1                ! which field to use
    "test.msl"       ! new Monaco mesh source lite
    end


**dsoDisp - Display the basics of a Denovo spatial output file.**

Input: A Denovo spatial output (\*.dsi) file

Output: Some of the basic details of the Denovo spatial output file

Example:

::

    =dsoDisp
    "godiva.dso"          ! existing Denovo spatial output file
    end

**mim2wwinp - Convert a mesh importance map into an MCNP weight window
file.**

Intended Use: To create an MCNP weight window file from a Monaco mesh
importance map file outside of a MAVRIC calculation. Monaco mesh
importance map files store target weights, but MCNP wwinp files store
lower weight bounds. To convert, the user needs to supply the
windowRatio, *r* (the ratio of the upper weight bound for splitting to
the lower weight bound for roulette). Target weights, *t*, are the
average of the upper, *u*, and lower, *l*, weight window bounds, so
*l*\ =2\ *t*/(*r*\ +1). For example, for a Monaco target weight of 1.0
and a windowRatio of 10.0, the MCNP lower weight bound will be
*l*\ =2(1.0)/(10.0+1)=0.1818. To reduce the size of the map, the user
can specify which neutron and photon groups to store in the new file. If
the last group is less than the first group, no groups of that particle
will be stored.

Input:

Line 1: filename of the Monaco mesh importance map file

Line 2: windowRatio (>1.0)

Line 3: first_neutron_group last_neutron_group

Line 4: first_photon_group last_photon_group

Line 5: filename of the MCNP weight window input file

Output: The resulting weight window input file stored with the desired
filename

Notes: Geometry information in the Monaco mesh importance map file is
lost since the MCNP wwinp format does not support it.

Example:

::

      =mim2wwinp
    "/scale/smplprbs/mavric.graphiteCADIS.mim"  ! importance map
    19.0                                        ! window ratio
    5 22                                        ! save n groups 5-22
    19 1                                        ! save no p groups
    "/scale/test9/testmimww.wwinp"              ! new file
    end

**mimDisp - Display the basics of a mesh importance map file.**

Input: A mesh importance map (\*.mim) file

Output: Some of the basic details of mesh importance map file

Example:

::

    =mimDisp
    "the.mim"    ! existing mesh importance map file
    end

**mimNorm - Normalize a mesh importance map to a given
location/energy.**

Input: A mesh importance map (\*.mim) file, a location (x, y, z), a
particle type and energy, and a filename for the normalized map file.
Use 1 for neutron and 2 for photon. Energy should be in eV. The new
importance map file will be normalized such that the given
location/energy has a target weight of 1. If a particle type or energy
is 0, then the energy group with the minimum non-zero target value at
the given location will be the group that is set to 1.0 in the new file.
(This option is similar to the MCNP weight window generator.)

Output: A mesh importance map file

Example:

::

    =mimNorm
    "the.mim"       ! existing mesh importance map file
    27.5 -16.5 32.0 ! location
    1 1.0e6         ! neutron, 1 MeV
    "normed.mim"    ! new file that is normalized
    end

**msmDisp - Display the basics of a mesh source map file.**

Input: A mesh source map (\*.msm) file

Output: Some of the basic details of mesh source map file

Example:

::

    =msmDisp
    "the.msm"    ! existing mesh source map file