Running MCNP and Understanding Output

Running MCNP

MCNP can be run in various modes with different command-line options. Understanding these options is crucial for efficient use of the code.

Basic Commands

bash
# Basic run
mcnp6 i=input n=output

# Interactive plotter
mcnp6 ip i=input

# Multiple tasks
mcnp6 i=input n=output tasks 4

# Continue run
mcnp6 c i=input n=output

Common Options

  • i= - Input file
  • n= - Output file name
  • r= - RUNTPE file
  • tasks - Number of threads
  • c - Continue previous run

Output File Structure

Header Information

text
          Code Name & Version = MCNP6, 1.0
     
                               _/      _/        _/_/_/       _/      _/       _/_/_/
                              _/_/  _/_/      _/             _/_/    _/       _/    _/
                             _/  _/  _/      _/             _/  _/  _/       _/_/_/
                            _/      _/      _/             _/    _/_/       _/
                           _/      _/        _/_/_/       _/      _/       _/

          Input File: example_input
          Number of histories: 1000000
          Random number generator seed: 19073486523876

          Cross-section tables: .80c from ENDF/B-VII.1
The header contains version information, input file details, and cross-section data used.

Problem Summary

text
1cells and surfaces                                                                     print table 60

        cell        mat        atom density   gram density     volume       mass            pieces    importance
     1     1          1       4.79853E-02   1.12000E+00   1.00000E+03   1.12000E+03           1     1.0000E+00
     2     2          2       1.00309E-01   1.00000E+00   2.00000E+03   2.00000E+03           1     1.0000E+00
     3     3          0       0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00           0     0.0000E+00

Important Output Tables

Key Tables

  • Table 60: Problem summary
  • Table 110: Source information
  • Table 126: Activity table
  • Table 128: Nuclide activity
  • Table 130: Tally bins
  • Table 160: TFC bin summary

Print Control

mcnp
c Print specific tables
PRINT 60 110 126 128

c Suppress some tables
PRINT -85 -86 -130

Common Output Issues

  • Lost particles indicate geometry errors
  • Zero tallies may indicate source/geometry mismatch
  • High relative errors suggest insufficient histories
  • Missing cross sections need XSDIR updates
  • Negative importances indicate cell numbering issues

Tally Results

Understanding Tally Output

text
1tally        4        nps =     1000000
           tally type 4    track length estimate of particle flux.
           particle(s): neutrons 
           this tally is modified by standard dose function 1.

 cell  1                                                                                                               
         energy   
    1.0000E-03   4.32106E-03 0.0021
    1.0000E-02   1.89234E-02 0.0018
    1.0000E-01   5.67891E-02 0.0015
    1.0000E+00   3.45678E-02 0.0019
    1.0000E+01   1.23456E-02 0.0023
      total      1.26543E-01 0.0012
Tally results include the mean value, relative error, and often energy/time bins. The relative error should be below 0.1 for reliable results.

Statistical Tests

text
statistical checks for tally fluctuation chart bin:   1
 
 tfc bin     --mean--      ---------relative error---------      ----variance of the variance----      --figure of merit--     -pdf-
 behavior    behavior      value   decrease   decrease rate      value   decrease   decrease rate       value     behavior     slope
 
 desired      random       <0.10      yes      1/sqrt(nps)       <0.10      yes        1/nps           constant    random      >3.00
 observed     random        0.02      yes          yes            0.04      yes         yes            constant    random       5.12
 passed?        yes          yes      yes          yes             yes      yes         yes               yes        yes         yes

Output Analysis Tools

Built-in Tools

  • MCPLOT: Geometry plotting
  • COMOUT: Command file output
  • MESHTAL: Mesh tally viewer
  • MCTAL: Tally data extractor
  • PTRAC: Particle tracking

External Analysis

  • Excel/Python plotting
  • Statistical analysis
  • Custom post-processing
  • Visualization tools
  • Data comparison scripts

Troubleshooting Guide

Common Errors

  • Fatal Error: Check geometry, materials
  • Lost Particles: Verify cell definitions
  • Zero Tallies: Check source/geometry
  • Bad Truncation: Fix continuation lines
  • Missing XS: Update XSDIR path

Solutions

  • Use VOID card for geometry checks
  • Print cell volumes explicitly
  • Review warning messages
  • Check cross section availability
  • Verify material definitions

Key Points to Remember

  • Always check statistical convergence of results
  • Review all warning messages in the output
  • Verify material densities and compositions
  • Save RUNTPE files for long calculations
  • Document analysis procedures and parameters
  • Use appropriate number of histories for convergence