Moritz Geometry Editor

Reading MCNP Input Files

The reading of an MCNP input file is initiated with the Read MCNP toolbar button or the corresponding item in the File menu. At present, the geometry specification, including TR (transformation) cards, is read. Specifications of a superimposed mesh and mesh tally meshes are recognized. MCNP data cards (as of version 4C) are read. Data types specific to MCNPX are ignored. The handling of data items is detailed here.  The & continuation syntax is not supported. A warning is given if the line length, excluding comments, is greater than 80 characters. Moritz will accept somewhat longer lines, but will produce an error and terminate input processing if the length exceeds its internal buffer size. Special syntax items such (nR, nJ, etc.) are not handled correctly in cell cards except in FILL and TR specifications.

Once a cell is defined, another MCNP input file cannot be loaded with the Read MCNP toolbar button or menu item. Additional files can be loaded with the Selective Read dialog. On that dialog, one can choose the types of input items to read, read only or exclude specified cells or materials, rename materials read in, and apply a translation or transformation to the imported geometry.

Moritz can capture comments in the MCNP input file and associate the comments to cells and surfaces. Comment capturing is controlled on the Input property page. How the comments are associated with cells and surfaces depends on which type of comment has precedence (set on the property page). If a C comment (a comment line with a c in column 1) takes precedence, the comment is assumed to apply to the following cell or surface. Because multiple $ comments (text following a $ anywhere on an input line) may occur if a definition is broken across multiple lines, precedence can be given to the first ($ First) or last ($ Last) occurrence of a $ comment within a definition. If a comment of the precedence type is not found, a comment of another type, if present, is captured.

When sticky comment capture is enabled, the last comment encountered applies to all subsequent cells or surfaces defined without comments.

In addition to appearing in the Cell property sheet and Surface dialogs, the comments also appear in the cell and surface submenu titles in the 2D and 3D context menus.

Moritz commands can be embedded in the input file with a c moritz comment, such as
c moritz universe 2 LA
There is only a single space following the comment character in column 1.  When the input is read a separate file, the comments can appear at any position in the file. The embedded comments are remembered and included (at the bottom) when a Moritz writes an MCNP/MCNPX input file.

The Error Popup Limit on the Input property page sets a limit on the number of error and warning messages that appear as popup dialogs during the processing of an MCNP input file. Messages beyond the limit appear only in the transcript window. (There are fields on the Options property page to suppress popups for error and warning messages.)

Parsing of the MCNP file may or may not terminate if an error is encountered. Whether or not to terminate is controlled by the Continue on Error option on the Input property page.

If the List MCNP box on the Input property page is checked, a listing of the input file appears in a Moritz file listing window. The file can be viewed but not edited.  Portions of the input file between the embedded comments
    c moritz echo off
    c moritz echo on
are not listed.

Moritz analyzes special (SQ) and general (GQ) quadratic surfaces to determine their type and convert SQ surfaces to ellipsoids or elliptical cylinders if possible. The List Surface Conversions checkbox gives a report of the types deduced and any conversions in the Moritz report window.

Once the MCNP input file is processed, Moritz attempts to polygonalize all cells for display in the 3D window. An option to Report Poly'n Failures on the 3D Options property page results in a list of cells, in the report window, for which polygonalization was not possible. The failures may be because the cell is too complicated to analyze or because it has a shape Moritz cannot yet handle.

White Rock Science
505 672 1105