Visual Editor Banner
About Us Training Software Support
Main Page Visual Editor Training The Visual Editor Get the Visual Editor
Company Info Penelope/PenGUIn Workshops Nucwiz Help, Support, Known Bugs
Email Randy Schwarz MCNP6 Intermed. Workshops Penelope/PenGUIn Free Downloads
Vised Gallery Onsite Training Other Software C++ Tips and Tricks
Vised Video Demos. Consulting Gamma Spectroscopy Tools  

Reading MCNP data into Excel (2002).

Click to Enlarge

This figure is a frame from an animation showing a liquid carbon dioxide shield filling a cavity around a reactor. Unlike previous animations, this one used Excel instead of expensive graphics software. The MCNP data is read in from a "mctal" file generated by MCNP and then the data is plotted in Excel. Click to Enlarge
The figure above shows a simpler example of how to read and display MCNP data in Excel. The MCNP input file for this example is one that is created in the Visual Editor class. The input is run and a mctal file is generated. The mctal file is read in by Excel using the visual basic script shown here. This is done on sheet 1. Sheet2 (shown above) is used to manipulate the tally data read in on sheet1 and make a contour plot. To adapt this to your specific needs, you will need to modify the script to correspond to the type of tallies you ar using.

  • The sample input file (iuniv). Right click and select "Save Target As" to download.
  • The sample mctal file (muniv). Right click and select "Save Target As" to download.
  • The Excel spreadsheet that can read the mctal file (read_mctal.xls). Right click and select "Save Target As" to download.

    You should be able to generate the mctal file provided above on your own by running MCNP. To view the Visual Basic script in Excel you need to select View->Toolbars->Control Toolbox. Next select the "Design Mode" icon, then right click on the "read" button and select "View code".