Allen CDNE

Computational Design in Nuclear Engineering · Allen

Download the PDF

Computational Design in Nuclear Engineering, second edition, by Kenneth S. Allen, Ph.D., P.E.

Download the PDF

Chapter 5 · Introduction to MCNP 6.2

Plotting in MCNP

On this page

Chapter 5 · 6 / 84 min readPDF page 158

One continuous section of the book; read it straight through.

The most effective method to visualize the geometry for a MCNP model and to check for errors is to plot it. There are two plotting programs available in the MCNP package. The first we will discuss is the Visual Editor or VISED. The VISED program was distributed with the MCNPX package and is still available from many older users who have legacy versions of the code, but is no longer supported or distributed with MCNP. To use VISED for plotting, double-click the VISED icon and the program window will open.

Figure 5.8. The VISED window when initially opened.
Figure 5.8. The VISED window when initially opened.

Use the “File” “Open” command to load the input file. As it loads, the program will search for errors and will notify you if there are any fatal errors – those errors that will cause the model not to run. You can choose to ignore the fatal errors and continue to load the model. Of course, you will have to correct them in order to run the model in MCNP. Once the model is loaded, click on the “Update” button on the upper left corner of each of the plot windows. For the input file we created in Example 5.1 named picalc we get two views of the model – XZ and XY. The default views show solid black lines for the outside of the cells. If any of the lines are red dashed lines, we would have an error in our geometry. We can then use the radio buttons to zoom in and change the orientation of the origin and viewpoint to look at the model from all sides. Just because there are no errors presented on one view does not mean that there are no geometry errors in the model. We can click on the color button and view the geometry in the XZ orientation to get the view in Figure 5.9.

Figure 5.9. VISED plot of the picalc model in an XZ orientation. The three colors represent materials 1, 2, and 3 which all happen to be air.
Figure 5.9. VISED plot of the picalc model in an XZ orientation. The three colors represent materials 1, 2, and 3 which all happen to be air.

After we are satisfied with the model boundaries, we can select the XY view and use the radio buttons to turn on the color by material and the surface numbers. When we move the origin to 2.5 7.0 1.0 and update the plot, we get the view in Figure 5.10. By looking closely at the top of the model, we see there are two surfaces each pointing towards the positive y-axis where our source beam is centered. The center of the disk source is at 2.5 7.0 0.0 and has a radius of 10 cm. The orientation of the disk source is towards the negative y and strikes the two surfaces identified on the plot as 1.3 and 2.2. This is how we know which two surfaces we want to use in our tally line for our input.

Figure 5.10. VISED plot of the picalc model in the XY view. The + is located with the origin which we placed at (2.5 7.0 1.0) which is at the XY position of the center of the source. The source is directed in the negative Y (down) and the beam strikes surfaces 1.3 and 2.3.
Figure 5.10. VISED plot of the picalc model in the XY view. The + is located with the origin which we placed at (2.5 7.0 1.0) which is at the XY position of the center of the source. The source is directed in the negative Y (down) and the beam strikes surfaces 1.3 and 2.3.

The other program for plotting in MCNP has many of the same features and options as VISED. It is the integrated plotting function in MCNP6.1. The plotting function relies on a UNIX-based window to plot the model. For it to work on a Windows PC, we must use an X11 display server to make the plotter work. In this text, we use Xming which is a free download as our server.

To plot our picalc model using the integral plotter, first double-click the Xming icon to activate the server. The default server ID is 0.0. There is a line in our MCNP environmental batch file, which opens when we open the MCNP command prompt that recognizes a local server with the identification of 0.0. Once we have started Xming, we will double click the MCNP command prompt and enter the command,

Input
C:\ MCNPIO\> mcnp6 ip i=picalc o= picalc.out

This command tells the program to run mcnp6, use the plotter to plot and check for errors (ip) with the input filename of picalc and output filename of picalc.out. When we hit enter, the plot window pops up and tells us to click for the default plot which is presented in Figure 5.11.

Figure 5.11. Default orientation plot for picalc in the integrated plotter for MCNP.
Figure 5.11. Default orientation plot for picalc in the integrated plotter for MCNP.

With some inspection and selection of options, we can get the same information for errors, materials, and surfaces that we got with the VISED program. For example, the plot in Figure 5.12 is the same orientation as the VISED plot in Figure 5.9 for the same model.

Figure 5.12. Integrated plotter plot of the picalc model in XZ orientation.
Figure 5.12. Integrated plotter plot of the picalc model in XZ orientation.

Computational Design in Nuclear Engineering, second edition, by Kenneth S. Allen, Ph.D., P.E. — the complete book as a 394-page PDF.

Download the PDF