appendixb.rst 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
.. _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.**