Mesh Tally Data
Mesh tally data is written to mdata files by MCNPX and to meshtal files by MCNP5. These files are imported with the Read Mdata (MCNPX Mesh Tally) and Read Meshtal (MCNP&5 Mesh Tally) items in the Read submenu of the File menu. When reading a data file with mesh tallies already loaded, the existing tallies are retained. The new mesh numbers are changed to avoid conflicts; an attempt is made to retain the last digits of the changed mesh number (for example, 21 is changed to 121).
The Mesh Tally Source property page shows the full path name of the data file, the comment line from the file, and the number of histories used in the calculation. To replace existing mesh tallies with another data file, used Change File on the Mesh Tally Source property page. That page also contains an Add Data button that retains existing tallies
Meshtal and mdata files must be in ASCII format. MCNP5 writes ASCII meshtal files directly. The gridconv program (supplied with the MCNPX distribution) must be used to convert from the binary mdata files as written by MCNPX to ASCII format. MCNPX writes ASCII mesh tally files directly if the 3rd argument to PRDMP is -1 (
PRDMP J J -1).
MCNPX includes mesh tally data in the MCTAL file. Moritz can read mesh tallies from the MCTAL files. The file does not specify the type of data, such as Flux or Dose and does not include any energy bounds specified by ERGSH.
When reading mesh tally lines in an MCNPX input file, the tally number, particle, and most data items on the RMESH/CMESH lines are remembered and included when writing an MCNPX file. Arguments to DOSE, MFACT, ERGSH, MSHMF are parsed and included when writing an MCNP input file. Mesh tally data on a continuation line is not read. MCNP5 mesh tally input items that are similarly read and written include the tally number, particle, transformation (TR), output format (OUT), and tally multiplier (FACTOR).
An MCNP FCn (tally comment) command may be used to define a string that will appear as a comment before the first mesh command for mesh tally n when an input file is written.
Moritz colors the tally mesh cells according to the selected tally type. This Figure shows a 2D plot of mesh tally data; this Figure shows a 3D plot. (These 2 simple examples are from one of the MCNPX test problems.)
Combining Tallies. A new mesh tally can be defined from the linear combination, product, or quotient of two tallies using the Mesh Tally Combination property page. One may wish, for example, to define a total dose from the addition of neutron and photon dose tallies. Division is useful for comparing two mesh tallies such as the same tally from different versions of the Monte Carlo code. The Blend operation selects the data cells with the lowest relative error to be written to the new mesh tally. It is useful when a model is calculated again with different variance reduction options
The particle name field is changed for the new combined mesh. When the combination is addition of 2 original (such as neutron) mesh tallies, the name is Sum2. Sum3 results from the addition of a Sum2 and an original, and so on. For operators other than addition, the name is Combination.
A command file can be used to speed the creation of frequently used combinations. If mesh tallies 21, 31, and 41 show the proton, neutron, and photon doses, the following commands define the total dose in mesh tally 61:
MD Add 1. 21 1. 31 51
MD Add 1. 41 1. 51 61
MD Delete 51
The last line gets rid of the intermediate mesh tally. All multipliers here are unity (1.). A file containing such commands (expected suffix
.sab) is read with Read Sabrina on the File menu after the mesh tallies are loaded.
Mesh Matching. After a data file is read, Moritz either uses an existing mesh or creates meshes from the specifications in the file. An existing mesh would most usually be from the MCNP/MCNPX input file used to create mesh tally. The mesh matching algorithm compares all mesh lines in sequence, ignoring the distinction between coarse and fine mesh lines. A transformation may be applied to the tally mesh in the MCNPX/MCNP5 input file. The transformation information is lacking in both the mdata and meshtal files. If an existing mesh is the same as an mdata mesh and it carries a transformation, it is used for the mesh tally data if it has the same tally number. If the numbers are not the same, Moritz asks the user whether or not to use the existing mesh.
When displaying both the geometry and mesh tally data, the MCNPX/MCNP input file should be read before the data file when the input file contains the mesh definitions.
Internally, Moritz handles cylindrical tally meshes as aligned with the Z axis; a transformation is applied to the mesh to accommodate other axis directions. This treatment follows the MCNPX mesh tally specification where a transformation must be supplied for non Z aligned meshes. The MCNP5 input allows specification of both the mesh axis vector and a transformation. If a cylindrical mesh from an MCNP5 input file is not aligned with the Z axis and also carries an explicit transformation, the matching algorithm ignores the axis orientations and origins and only considers the mesh values. When writing MCNP5 FMESH specifications, cylindrical meshes are always oriented along the Z axis and the appropriate transformation is supplied even if the original mesh as read from an MCNP5 input carried a different axis vector.
Data Selection and Scaling. After a data file is read, the data is displayed if Show when Loaded is checked on the Mesh Tally Options property page; there are separate Show when Loaded options for 2D and 3D. A ratio can be entered on the Options page. If the maximum divided by the minimum of the positive data is greater than the ratio, logarithmic scaling is used.
If an input file with matching meshes had been read previously and one or more of those meshes are visible, the data is displayed for those visible meshes. Otherwise, if only a single visible mesh is permitted, the first data set for the last mesh read is displayed. If multiple meshes are permitted, the first data set in all meshes are displayed; in this case, the initial color coding may not be correct. Various settings on the Mesh property sheet can affect these actions. The Only 1 Mesh Visible at a Time checkbox on the Mesh Style property page controls multiple mesh visibility.
The data can be shown in 2D, 3D, or both. The Mesh Tally property page shows the types of data available for the selected mesh. For MCNPX mesh tallies, this data may include flux, population, dose, etc. MCNP5 data consists of flux and, optionally, flux multiplied by mesh cell volume. MCNP5 permits multiple energy bins for a mesh; a pull down menu permits selection of which energy bin to display. More than one mesh may be selected for display. If so, the same data type must be selected for each visible MCNPX tally mesh. Moritz does not check if consistent energy bins are chosen for visible MCNP5 tally meshes or if the flux or flux times volume choices are the same. The property page also has a choice for display of the data or its relative error. The data/error choice must be the same for all visible meshes. Visibility can be set by particle type.
The Data Limits fields show the minimum and maximum of the data values for the chosen data set or all visible data sets. Mesh cells with values less than the minimum or greater than the maximum take the color of the respective extreme. When Logarithmic Scaling is in effect, the minimum value does not include data <= 0. The color coding of the data is determined by the values in the Plot Limitsfield. These values are initially set from the Data Limits, but do not change as different meshes or data sets are chosen. The Copy button copies the Data Limits to the Plot Limits. The Copybutton is useful to set the color scaling when changing meshes in the one mesh at a time mode.
The user can choose to apply the color coding to the data values or the logarithm of the values. Cells with a data value £ 0 can be either not shown or colored black (when Logarithmic Scaling is used) or the minimum color (Linear scaling). Nonpositive data is not shown in This Figure , resulting in the notch at the top, the blank lower left corner resulting from a void, and in a few mesh cells colored gray in the shield at the center of the mesh. The same mesh is shown in 3D in This Figure . This Figure shows cells with nonpositive data in the cylindrical void surrounding the model.
On the Mesh Tally Options property page, the user can choose to not show mesh cells with values less than the minimum, greater than the maximum, and/or greater than or less than user defined values. These choices, along with the treatment for values £ 0, can be applied to the 2D and 3D plots separately or together.
A multiplier can be set on the Mesh Tally Legend property page. It multiplies all mesh tally data, including the 2D and 3D plots and values extracted from the data. The display limits do not change when the multiplier changes. Because the multiplier remains in effect, warnings are given when switching to plotting the relative error and loading new data if the multiplier is not = 1.
Data Visibility. The Mesh Tally property page controls the visibility of the mesh data and its mesh. For a data set to be visible, the data must be marked visible in the Show Data box. Separate visibility choices exist for 2D and 3D. Checking a checkbox in the Show Data also marks the data’s mesh as visible.When only one mesh is visible at a time, checking a Show Mesh checkbox hides any other visible mesh. Whether the mesh is shown together with the data is controlled by the Show Mesh with Data checkboxes on the Mesh Tally Style property page.
White Rock Science
505 672 1105