Professional Documents
Culture Documents
Manual 22S Rev2
Manual 22S Rev2
For Vised Version 22S Released February, 2008 (This manual applies to MCNPX version 2.6) A.L. Schwarz , R.A. Schwarz, and L.L. Carter
Table of Contents
1.0 1.1 1.2 1.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3.0 3.1 3.2 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 4.21 5.0 6.0 7.0 8.0 8.1 INTRODUCTION.........................................................................................................................................1 THE MCNP/MCNPX VISUAL EDITOR ........................................................................................................1 INSTALLATION NOTES .................................................................................................................................1 OPERATING SYSTEM REQUIREMENTS ..........................................................................................................2 A BRIEF OVERVIEW .................................................................................................................................3 USER RESOURCES........................................................................................................................................3 Utilizing this Manual ............................................................................................................................3 Online Help ..........................................................................................................................................4 The LANL MCNP Manual ....................................................................................................................4 The LANL MCNPX Manual..................................................................................................................5 The Visual Editor Website ....................................................................................................................5 CREATING GEOMETRIES ..............................................................................................................................5 THE INPUT WINDOW ...................................................................................................................................6 MODIFYING THE INPUT FILE USING AN EXTERNAL EDITOR ........................................................................6 READING AND WRITING INPUT FILES ..........................................................................................................7 SAVING FILES ..............................................................................................................................................8 AUTOMATIC BACKUPS AND ERROR HANDLING ...........................................................................................8 IMPORTANT FILES IN THE VISUAL EDITOR ..................................................................................................8 EXAMPLE: DISPLAYING AND PLOTTING AN EXISTING FILE .......................................................................10 EXAMPLE: CREATE SIMPLE GEOMETRIES USING THE VISUAL EDITOR ......................................................22 THE VISUAL EDITOR PLOT WINDOWS ............................................................................................37 UPDATE .....................................................................................................................................................38 NEXT AND LAST BUTTON ..........................................................................................................................39 ZOOM CHECK BOX ....................................................................................................................................39 ORIGIN CHECK BOX ..................................................................................................................................40 CHANGING THE EXTENTS ..........................................................................................................................43 REFRESH CHECK BOX ...............................................................................................................................44 THE SURFACE AND CELL CHECK BOX .......................................................................................................44 UNUSED ....................................................................................................................................................45 COLOR CHECK BOX ..................................................................................................................................45 FACETS CHECK BOX..................................................................................................................................45 WW MESH CHECK BOX ............................................................................................................................45 RECT CHECK BOX .....................................................................................................................................45 TAL MESH CHECK BOX .............................................................................................................................46 PLOT ROTATION OPTIONS .........................................................................................................................46 SCALES CHECK BOX..................................................................................................................................46 RES TEXT BOX ..........................................................................................................................................46 PSCRIPT CHECK BOX .................................................................................................................................46 CHANGING THE BASIS ...............................................................................................................................46 VIEWING GLOBAL/LOCAL COORDINATES .................................................................................................47 SETTING CELL LABELS ..............................................................................................................................47 LEVEL PULLDOWN MENU .........................................................................................................................47 THE MAIN MENU .....................................................................................................................................48 THE FILE MENU OPTION ......................................................................................................................50 THE INPUT WINDOW..............................................................................................................................51 THE SURFACE WINDOW .......................................................................................................................51 CREATING A SURFACE ...............................................................................................................................52
10.1 THE RECTANGULAR LATTICE PANELS.....................................................................................................109 10.1.1 Using the Lattice Fill Matrix ............................................................................................................110 10.2 CREATING A RECTANGULAR (HEXAHEDRA) LATTICE..............................................................................113 10.2.1 Example Creation of a Two Dimensional Rectangular Lattice ........................................................113 10.2.2 Example: A More Complex Rectangular Lattice. ............................................................................121 10.2.3 Modifying the Center of an Existing Lattice .....................................................................................135
ii
16.1 SDEF SOURCE PLOTTING AND PARTICLE TRACK PLOTTING ...................................................................191 16.1.1 Example SDEF Source Plotting.....................................................................................................193 16.1.2 Particle Track Plotting .....................................................................................................................194 16.1.3 Setting Point Color and Size.............................................................................................................194 16.1.4 Suggestions for more accurate Particle Track Plots ........................................................................194 16.1.5 Example: SDEF Particle Track Plotting ........................................................................................195 16.2 RUNNING KCODE ..................................................................................................................................197 16.3 KCODE SOURCE PLOTTING ....................................................................................................................199 16.3.1 Example: KCODE Source Plotting ..................................................................................................201 17.0 TALLY PLOTS .........................................................................................................................................204 17.1 THE TALLY PLOTTING PANEL .................................................................................................................204 17.1.1 2D Plot Tab ......................................................................................................................................206 17.1.2 The Mesh Plotting Tab (MCNPX Only)............................................................................................207 17.1.3 The Contour Plotting Tab.................................................................................................................208 17.1.4 The Fluctuation Tab .........................................................................................................................210 17.1.5 The KCODE Tab ..............................................................................................................................211 17.2 ENTERING TALLY CARDS ........................................................................................................................212 17.2.1 Tally Card Types ..............................................................................................................................212 17.2.2 Fna Card ..........................................................................................................................................212 17.2.3 En Card ............................................................................................................................................213 17.2.4 Example: Entering the Tally Cards .................................................................................................213
iii
19.1 3D COLOR PLOTS ....................................................................................................................................223 19.1.1 Preparing the Input File ...................................................................................................................224 19.1.2 Example: Creating a Normal 3D Plot ..............................................................................................225 19.1.3 Example: Setting Viewpoints ...........................................................................................................227 19.2 3UPDATE THE PLOT BASIS ......................................................................................................................236 19.3 COLOR BY CELL/SURFACE ......................................................................................................................236 19.4 DRAW LINES AROUND CELLS .................................................................................................................236 19.5 COLOR CELLS BY MATERIAL ..................................................................................................................236 19.6 3D SHADING............................................................................................................................................237 19.7 DISTANCE SHADING ................................................................................................................................237 19.8 POINT/PLANE SOURCE TYPE ...................................................................................................................237 19.9 SHOW THE PLOT PLANE...........................................................................................................................237 19.10 HIDE/SHOW COOKIE CUTTERS ................................................................................................................237 19.10.1 Example: Creating a Cookie Cutter Cell for a Sphere. ...................................................................237 19.10.2 Example: Creating a 3D Plot with a Cut-Away View......................................................................240 19.11 PLOT TO THE OUTSIDE WORLD/PLOT PLANE ..........................................................................................246 19.12 PLOT RESOLUTION ..................................................................................................................................246 19.13 3D RADIOGRAPHIC PLOTS .......................................................................................................................247 19.13.1 Example: Creating a Radiographic Plot. ........................................................................................248 19.14 3D TRANSPARENT PLOTS ........................................................................................................................252 19.14.1 Example: Creating a Transparent 3D Plot.......................................................................................253 20.0 20.1 21.0 21.1 21.2 21.3 21.4 21.5 21.6 21.7 21.8 21.9 21.10 22.0 23.0 24.0 25.0 26.0 DYNAMIC 3D DISPLAY.........................................................................................................................260 EXAMPLE: DYNAMIC 3D DISPLAY ..........................................................................................................263 CAD IMPORT...........................................................................................................................................266 2D CAD IMPORT .....................................................................................................................................267 3D CAD IMPORT .....................................................................................................................................269 CONSTRAINTS/RESTRICTIONS FOR 3D CAD CONVERSION ......................................................................271 USING CAD AS A GRAPHICAL USER INTERFACE FOR MCNP WITH PERIMETER MODELING ....................272 3D DISPLAY OF IMPORTED CAD FILES ...................................................................................................272 EXAMPLE: IMPORTING A CUBE ...............................................................................................................273 EXAMPLE: IMPORTING A MORE COMPLEX SAT FILE ..............................................................................275 EXAMPLE IMPORTING A VERY COMPLEX SAT FILE ................................................................................276 CONVERSION OF LARGE FILES ................................................................................................................282 EXAMPLE: IMPORTING 1000 SPHERES ....................................................................................................284 READ AGAIN ...........................................................................................................................................286 BACKUP INP ............................................................................................................................................287 PROBLEM REPORTING........................................................................................................................287 APPENDIX A ................................................................................................................................................2 APPENDIX B.................................................................................................................................................1
iv
List of Figures
FIGURE 2-1 THE INPUT WINDOW ...................................................................................................................................6 FIGURE 3-1 FINAL RESULT OF THE DISPLAY AND PLOTTING EXERCISE .......................................................................10 FIGURE 3-2 UNEXPECTED EOF MCNP FATAL ERROR .................................................................................................11 FIGURE 3-3 STARTUP CONFIGURATION FOR THE VISUAL EDITOR................................................................................12 FIGURE 3-4 USING ZOOM TO MAGNIFY THE IMAGE .....................................................................................................13 FIGURE 3-5 RESULT AFTER USING ZOOM.....................................................................................................................13 FIGURE 3-6 RESULT AFTER USING ZOOM TWICE ON BOTH WINDOWS .........................................................................14 FIGURE 3-7 RESULT AFTER ADJUSTING EXTENTS ........................................................................................................15 FIGURE 3-8 MODIFY THE ORIGIN TO CENTER THE PLOT ..............................................................................................16 FIGURE 3-9 MODIFY THE LEFT ORIGIN BASED ON THE RIGHT PLOT............................................................................17 FIGURE 3-10 MODIFY THE RIGHT ORIGIN BASED ON THE LEFT PLOT UPPER SLICE. ................................................18 FIGURE 3-11 MODIFY THE RIGHT ORIGIN BASED ON THE LEFT PLOT LOWER SLICE .................................................19 FIGURE 3-12 DYNAMIC 3D DISPLAY ...........................................................................................................................19 FIGURE 3-13 CREATING A DYNAMIC 3D PLOT ............................................................................................................20 FIGURE 3-14 DYNAMIC 3D PLOT OF CUBE GEOMETRY ...............................................................................................21 FIGURE 3-15 ROTATED CUBE GEOMETRY PLOT ..........................................................................................................21 FIGURE 3-16 FINAL RESULT OF GEOMETRY CREATION EXAMPLE...............................................................................22 FIGURE 3-17 STARTUP CONFIGURATION FOR THE VISUAL EDITOR..............................................................................23 FIGURE 3-18 CREATING THE SPHERE SURFACE ...........................................................................................................24 FIGURE 3-19 DISPLAY OF CREATED SPHERICAL SURFACE...........................................................................................25 FIGURE 3-20 SPHERE AND FIRST PX PLANE .................................................................................................................26 FIGURE 3-21 SPHERE AND SIX PLANE SURFACES ........................................................................................................27 FIGURE 3-22 SELECTING FIRST SURFACE IN CREATION OF CUBE CELL .......................................................................28 FIGURE 3-23 USING BOTH PLOT WINDOWS TO SELECT CUBE SURFACES.....................................................................29 FIGURE 3-24 DEFINE POINT, PASTE AND REGISTER ......................................................................................................30 FIGURE 3-25 DISPLAY OF CUBE CELL..........................................................................................................................31 FIGURE 3-26 CREATE SPHERE CELL ............................................................................................................................32 FIGURE 3-27 CUBE CELL AND OUTSIDE WORLD .........................................................................................................33 FIGURE 3-28 DEFINING THE POINT TO DETERMINE CELL SENSE .................................................................................34 FIGURE 3-29 PASTE INNER SPHERE .............................................................................................................................35 FIGURE 3-30 CUT CUBE FROM SPHERE ........................................................................................................................36 FIGURE 3-31 GEOMETRY WITH THREE CELLS CREATED ..............................................................................................37 FIGURE 4-1 PLOT WINDOW OPTIONS ...........................................................................................................................38 FIGURE 4-2 USING ZOOM ............................................................................................................................................39 FIGURE 4-3 USING THE ORIGIN ....................................................................................................................................40 FIGURE 4-4 Z COORDINATE ORIGIN OFF THE PLOT PLANE ...........................................................................................40 FIGURE 4-5 BUSS CASK INPUT FILE PLOTTED AT THE ORIGIN .....................................................................................41 FIGURE 4-6 BUSS CASK INPUT FILE PLOTTED AT (-1, 0, 33) ........................................................................................42 FIGURE 4-7 BUSS CASK INPUT FILE SHOWN WITH DEFAULT EXTENTS OF 100..............................................................43 FIGURE 4-8 LEFT PLOT WITH EXTENTS AT 50, RIGHT PLOT WITH EXTENTS AT 500 ....................................................44 FIGURE 4-9 RECTANGULAR DISPLAY WITH SCALES ....................................................................................................45 FIGURE 4-10 I3HEX INPUT FILE AT LEVEL 1 AND AT LEVEL 5 (ZOOMED).....................................................................48 FIGURE 5-1 THE VISUAL EDITOR MAIN MENU ............................................................................................................48 FIGURE 6-1 THE FILE MENU ........................................................................................................................................50 FIGURE 8-1 THE SURFACE WINDOW ............................................................................................................................52 FIGURE 8-2 CREATING A SPHERICAL SURFACE ............................................................................................................53 FIGURE 8-3 CREATING A PX PLANE ..............................................................................................................................56 FIGURE 8-4 CREATING ANOTHER PX PLANE ................................................................................................................57 FIGURE 8-5 SETTING THE DIAMETER USING THE MOUSE ............................................................................................58 FIGURE 8-6 DELETE A SURFACE ..................................................................................................................................59 FIGURE 8-7 USING SURFACE DELTA TO CREATE SURFACES........................................................................................60 FIGURE 8-8 DETERMINING THE DISTANCE BETWEEN TWO PLANES. .............................................................................61 FIGURE 8-9 CREATE A MACROBODY TRUNCATED RIGHT ANGLE CONE ......................................................................62 FIGURE 8-10 SHOW AND HIDE SURFACES....................................................................................................................63
vi
vii
viii
ix
10
1.0 Introduction
1.1 The MCNP/MCNPX Visual Editor
The Monte Carlo N-Particle (MCNP)/Monte Carlo N-Partical eXtended (MCNPX) computer code is a particle transport code with powerful three dimensional geometry and source modeling capabilities that can be applied to reactor physics, shielding, criticality, environmental nuclear waste cleanup, medical imaging, and numerous other related areas. Creating a MCNP/MCNPX input file with a line editor is both tedious and error prone as it entails arduous descriptions of geometry, tallies, sources, and optimization parameters. These input files may contain thousands of lines, and once the input file is created, substantial additional time is often required to plot and test the geometry and to correct any errors. The Visual Editor1 2 3 4 5 6 7 8 9 10 11 was developed to assist the user in easily displaying geometries and in the creation of MCNP input files. Work on the Visual Editor started around 1992. The first release to RSICC was in 1997. The Visual Editor code became part of the MCNP package with the release of version 5 of MCNP. In 2007, a grant allowed the Visual Editor to be adapted to work with MCNPX. The Visual Editor allows the user to easily set up and modify the view of the MCNP/MCNPX geometry and to determine model information directly from the plot window. The Visual Editor also allows the user to interactively create an input file with the help of two or more dynamic cross sectional views of the model. The input file can also be created in an external editor (such as WordPad or Microsoft Word) or by typing (editing) the file in the Input window in the Visual Editor. Additional powerful features include: Two side-by-side 2-D plots of the geometry. Capability to plot source points to verify the MCNP/MCNPX source. Optional 3-D views using either ray tracing or dynamic wire mesh displays. Capability to dynamically build a geometry while viewing it as it evolves. Optional manual editing of the input file and immediate re-initialization with the changes showing up in the plots. Dynamic input of materials, transformations, and importances (using the mouse). Dynamic displays of particle tracks, cross sections, and tallies. A surface wizard to optionally assist the user in creating surfaces while visually being able to see the surface types. A cell wizard to assist the user in creating cells. Optional import and conversions of a CAD file to an MCNP/MCNPX input file.
The current version of the Visual Editor runs on Windows. This manual for the Visual Editor was written for version 1.5 of MCNP5 and for MCNPX version 2.5.
Page 1 of 288
MCNP Visual Editor Manual If you want to do particle track plotting, cross section plotting, or run MCNP/MCNPX inside the Visual Editor, the xsdir file must be in the same directory as the Visual Editor executable or a path to xsdir must be specified on the system as required for running MCNP/MCNPX. If binary cross section files are involved, they must be compatible with the current version of the Visual Editor, or else you should switch to ASCII cross section files. To access the material libraries, the code will try to use the default environment variable to read the libraries from the installed location. If this fails, you need to create a vised.defaults file for the configuration of MCNP/MCNPX on your system. See the section on materials for more information on how to do this. The size of the fonts used by the windows is fixed and cannot be changed. The font used is called ariel 7. If the Visual Editor windows appear too large for your screen, it is recommended that you increase your screen resolution. The ideal screen resolution is 1280 x 1024. Because the Visual Editor creates several files for its own internal use that are stored in the same folder as the input file currently in use, it is generally preferable to create and read input files in a directory created for that purpose (i.e. c:\vis). If they are defaulted to the folder containing the Visual Editor executable, that folder will soon become cluttered with many internal files.
Page 2 of 288
Page 3 of 288
MCNP Visual Editor Manual ihexlat1 ihexlat2 ihexlat3 ikode isdef isense islab isqulat1 isqulat2 isqulat21 itally itransform itransparent iviewpoint Final result for an exercise that creates a simple 2D hexagonal lattice. See Section 10.2.1. Final result for an exercise that creates a simple 3D hexagonal lattice. See Section 10.2.2. An off-center hexagonal lattice. The exercise will move the hexagonal lattice to center it. See Section 10.4.3. A sphere of uranium with a KCODE source for KCODE source plotting. See Section 16.3.1. A sphere of uranium with a SDEF source for SDEF source plotting. See Section 16.1.1. A set of surfaces to form an L shaped cell. The exercise discusses the issues involved in selecting a point to determine cell sense. See Section 9.2.1. Three infinite slabs of lead between a ource and the outside world. The exercise illustrates setting importances. See Section 12.6. Final result for an exercise that creates a simple 2D square lattice. See Section 10.2.1. Final result for an exercise that creates a simple 2D square lattice. See Section 10.2.2 An off-center square lattice. The exercise will move the square lattice to center it. See Section 10.2.3. Create a Tally Plot of a sphere of Uranium. See Section 17.5.1. Create a second cube from and existing cube centered at the origin. The second cube will be created using a transform that will offset it by 60 cm along the X and Y axes. See Section 13.1. Four small spheres inside a sphere of concrete. The example will create a transparent plot of the geometry. See Section 19.14.1. Used for an exercise explaining how to choose a viewpoint for use in a 3D Ray Traced Plot. See Section19.1.3.
Page 4 of 288
Page 5 of 288
Figure 2-1 The Input Window The input window, shown in Figure 2-1, can be displayed by selecting Input from the main menu. This window will be blank, except for a starting comment, until a file has been read in using the FileOpen command. In the input window, a title card indicating the creation date is created by default when starting from scratch and not reading in an input file. If you want to add you own title, enter it above this card, then select Save-Update from the menu. If the Do Not Modify checkbox is checked, the file was read in using the Do Not Modify mode and must be edited by hand rather than using the Visual Editor graphical tools. (See Section 2.4) You can edit the file in the input window and then select the Save-Update menu option to update the plots to reflect the changes made. This gives you the freedom to work either in editor mode or use the graphical interface commands. If the file is modified by hand in such a way that it is no longer valid, it is possible when doing Save-Update, that the MCNP/MCNPX Fortran will generate a fatal error causing the Visual Editor to terminate.
MCNP Visual Editor Manual Open and modify the file in an external editor (for example, Microsoft WordPad or Microsoft Word). Save the file. In the Visual Editor Start the Visual Editor. Open the input file in the Visual Editor in the Do Not Modify mode. Click on FileOpen(do not modify input). Select the desired file name from the pop up directory menu. Click Update Plots. Subsequent Editing With both the Visual Editor and the External Editor open, the user may switch back and forth for additional edits. Switch to the Editor and make changes. Save the file. If the file is not saved, the Visual Editor can not pick up the changes. Switch back to the Visual Editor and Click Read_again. See Section 22.0 Read again for more information. Then click Update Plots. Additional Considerations Using the Do Not Modify mode prevents the user from utilizing several Visual Editor features. If the user wants to operate exclusively in this mode, several sections of this manual do not apply. It is recommended that users look at the sections listed in the Suggested Reading section, which are useful in Do Not Modify mode. Suggested Reading 3.1 Example: Displaying and Plotting an Existing File 4.0 The Visual Editor Plot Windows 16.0 Particle Display 17.4 Plotting the Tally File 17.5 Tally Plot Options 18.0 Cross Section Plots 21.0 CAD Import
MCNP Visual Editor Manual 3. blank line 4. Surface Cards 5. blank line 6. Mode 7. Source (only KCODE and ksrc if they exist) 8. Materials 9. Transformations 10. Importances 11. Other data [VOL, PWT, EXT, FCL, PD, DXC, NONU, WWN, TMP (in the order given)] 12. Data not recognized by the Visual Editor The editor does its best to keep the original comments in the proper locations. The "$" comments from the inp file for cell and surface cards are read into the Visual Editor, but only one "$" comment will be written out for a cell or surface card; i.e., if there are more than one "$" comments for a given cell or surface, only the first one will be written to the inpn file. The Visual Editor will print out an error message saying the $ comment is lost. There are a number of input data types that are still not individually recognized by the Visual Editor such as the source and tally cards. These are stored in memory and written back out to the input file when it is saved. All cards that are individually recognized by the Visual Editor will be formatted to its specific style. For example importances are written out in a special format that uses a "$" comment on each line to show the cell numbers involved for that line. The Visual Editor also does not currently allow the cell parameters to be specified on the cell card, it will strip off the cell card parameters and place them in a data block. To avoid this problem, the input file can be read in without modification with the FileOpen (do not modify input) option or by using the Read Again option
MCNP Visual Editor Manual inp Used by the Visual Editor as the default input file name. This file is overwritten each time the editor starts up. The Visual Editor will give unpredictable results if you try to read this file in as the input file. Inpn is the file that is created when doing a Save-Update command in the input window. The Visual Editor will give unpredictable results if you try to read this file in as the input file. By selecting backup from the main menu a new inpn? (inpn1, inpn2, inpn3, ) file is created representing the contents of the current file being worked on. The input file is backed up every 5 minutes to this file, so if the system crashes you will not lose more than 5 minutes of work. The Visual Editor will give unpredictable results if you try to read this file in as the input file. If MCNP generates a fatal error that results in a stop statement, a message is sent to the Visual Editor telling the user that the code is about to terminate. It then saves the current input file into a file called inpcrash. This will allow the user to get the file that was generated up to the point of the fatal error. The Visual Editor will give unpredictable results if you try to read this file in as the input file. In normal plotting mode, the outp file is overwritten and does not sequentially increase. In other modes, such as 3D plotting, particle track plotting, tally plotting and running, the outp file name increases sequentially just like when running MCNP outside the Visual Editor. If the Visual Editor crashes, always check this file to see if there are fatal MCNP errors not trapped by the Visual Editor. Temporary file used for 3D plotting and collision point plotting. Output file for 3D plotting. Contains MCNP output messages, normally written to standard out. If the Visual Editor crashes, always check this file to see if there are fatal MCNP errors not trapped by the Visual Editor. The file containing the location of xsdir and the material libraries. The Visual Editor tries to get this information from the MCNP environment variable. If this does not work, this file may be needed for using the material libraries and for selecting isotopes when creating materials. See Section 11.5. Standard material file containing neutron cross sections available for all users. Standard material file containing photon cross sections available for all users. User specific material file containing neutron cross sections for the individual user. User specific material file containing photon cross sections for the individual user.
inpn
inpcrash
outp, outq,
vised.defaults
Page 9 of 288
Figure 3-1 Final Result of the Display and Plotting Exercise Create the input file in an external program such as Notepad or Microsoft Word. The input file, iex1, is available on the Visual Editor Web Site (www.mcnpvised.com) on the Sample Examples page. This file may also be created by pasting the text below into Notepad and saving the file as iex1.
c 1 2 3 Created on: Monday, June 26, 2006 at 13:09 0 (-1 -2 -3 -4 -5 -6 -7 ) 0 (-1 -9 -10 -11 -12 -13 -14 ) 0 (1 -16 -17 -18 -19 -20 )
Page 10 of 288
Important Note! Be sure there is a blank line after the last line. If there is not a blank line at the end, you will get the error displayed in Figure 3-2 when you try to read the file in.:
Figure 3-2 Unexpected EOF MCNP Fatal Error This error occurs because it finds an unexpected end of file. To obtain more information about an MCNP fatal error, check the outp file.
Page 11 of 288
Figure 3-3 Startup Configuration for the Visual Editor Start the Visual Editor. Once the input file is obtained, use Windows Explorer to bring up the Visual Editor. Figure 3-3 shows a view of the initial screen. Notice that the main menu functions are shown across the top and that each plot window has its own set of plot commands. Read the input file into the Visual Editor. Click on FileOpen and use the browser to navigate to the iex1 text file that you just created. Click the Open button to open the file. Display the File The Visual Editor does not automatically display a file when it is read in. Some input files (e.g. large complex lattices) are so complex that adjustments must be made to the display or they take too long to show on the screen. This is a simple file so it can be displayed. Click Update Plots. Initially, the plots are displayed with an origin of (0,0,0) and extents of 100. The left plot is an XZ plot and the right plot is an XY plot. Zoom Click the Zoom Checkbox and drag a small square around the box at the center of the screen. This defines the region that will be expanded. Figure 3-4 Using Zoom to Magnify the Image illustrates this step.
Page 12 of 288
Figure 3-4 Using Zoom to Magnify the Image You should see a rectangle.
Page 13 of 288
MCNP Visual Editor Manual Repeat Zoom in the Right Plot Window. On the other screen, click the Zoom checkbox and draw a rectangles around the box and, subsequently, around the rectangle that appears until the object occupies a significant part of the screen. The final result should be similar to Figure 3-6 below.
Page 14 of 288
MCNP Visual Editor Manual Alter Extents If a perfect square is not drawn, the picture may become distorted because the vertical magnification is different from the horizontal magnification. To restore the aspect ratio, click on one of the squares by the Extent text box (see Figure 3-7 below). This will set the other extent to match the one you clicked on. Figure 3-7 shows the result. Notice the numbers in the extent boxes for each window now match. The desired extents for each plot can also be entered manually in these extent boxes.
Page 15 of 288
MCNP Visual Editor Manual Modify the Origin of a Plot To modify the origin of the left plot, click the origin check box and then click in the center of the square. Figure 3-8 shows the result. The desired origin for each plot can also be entered manually in these origin boxes.
Figure 3-8 Modify the Origin to Center the Plot Do the same with the right plot. Uncheck both Origin check boxes. Modify the Left Plot Origin based on the Right Plot. The images shown in Figure 3-7 are two dimensional slices of a three dimensional object. The object will look different depending on where the slice is taken. One of the simplest ways to set the 2D slice of an object is with the help of the other plot window. Once Origin is clicked on the left plot, the cursor may be clicked on the right plot to set the location of the 2D slice on the left plot relative to the right plot. Currently, the slice is in the center of both objects. Refer to Figure 3-1 and note that the object has three cubes attached to the center cube but they are not placed at the center of the cube. Altering the origin will show the attached cubes because it will move the 2D slice so it slices through the attached cubes.
Page 16 of 288
Figure 3-9 Modify the Left Origin Based on the Right Plot On the Left Plot Window, Click the Origin Box. On the Right Plot Window, Click in the top left corner of the square (approximately where the arrow from Click Here points in Figure 3-9 above). The X and Z coordinates in the top of the left plot window should read approximately -30 and 17 respectively. If the plot is too large (as in Figure 3-9), click on the Zoom slider bar to the left of the center to zoom out. The arrow from Click Here to Zoom Out points to the position in Figure 3-9. Click in the other three corners of the right plot and see how the left plot changes. Click the Origin box on the Left Plot Window to deselect it.
Page 17 of 288
Figure 3-10 Modify the Right Origin Based on the Left Plot Upper Slice. Modify the Right Plot Origin based on the Left Plot. Similarly, to view different slices on the right plot, alter its origin based on the left. Click Origin on the Right Plot Window. Click in the Left Plot Window slightly above the large square as indicated in Figure 3-10.
Page 18 of 288
Figure 3-11 Modify the Right Origin based on the Left Plot Lower Slice Similarly, click slightly below the large square on the Left Plot (as shown in Figure 3-11) and observe the change in the Right Plot Window. Click the Origin box to deselect it. Printing the Plot The plot may be printed by clicking FilePrint from the main menu at the top of the screen or by Right-Clicking with the mouse on the picture and selecting Send To Clipboard. Creating a 3D Plot
Figure 3-12 Dynamic 3D Display To create a 3D Plot For each plot window, Click on the Cell check box to turn on cell numbers. On the Main Menu, Click on 3D ViewDynamic 3D Display as shown in Figure 3-12.
Page 19 of 288
Figure 3-13 Creating a Dynamic 3D Plot Enter the cells to be plotted. For this example, entering 1-4 (there are only 5 cells and cell 5 is the outside world) will effectively plot all the cells. On the 3D Dynamic Plotting panel, Type 1-4 in the Cells to Display box as shown in Figure 3-13. On the 3D Dynamic Plotting panel, uncheck Display Cells with Materials. In later versions of the Visual Editor, this may not be necessary if numbers have been entered in the Cells to Display box. Those numbers override the requirement that cells have a material assigned to them. The final result should resemble the plot in Figure 3-14. To rotate the object, click the left mouse button on the object, hold the left mouse key down, and drag the object around. Figure 3-15 shows the rotated Cube geometry.
Page 20 of 288
Figure 3-15 Rotated Cube Geometry Plot When you are finished, exit the Visual Editor by clicking on FileExit
Page 21 of 288
Page 22 of 288
MCNP Visual Editor Manual Start the Visual Editor. Use Windows Explorer to bring up the Visual Editor. Figure 3-17 shows a view of the initial screen. Notice that the main menu functions are shown across the top and that each plot window has its own set of plot commands.
Page 23 of 288
Figure 3-18 Creating the Sphere Surface On the Visual Editor Main Menu, click on Surface. This will open the Surface Panel. Figure 3-18 shows the result. On the Surface Panel, note that the Surface Type is the default type which is a sphere centered at the origin (so). Type 50 in the 1st Coefficient Box (the Radius). Click on Register on the Surface Panel Menu.
Page 24 of 288
Figure 3-19 Display of Created Spherical Surface The Visual Editor will display a large red circle once Register is selected. Surfaces are red in the Visual Editor if they are not currently assigned to a cell. Figure 3-19 shows the circle displayed on both plots. Creating the Planes To create the cube inside the sphere, six plane surfaces must be created. Specifically, two px, two py, and two pz planes. A px plane is a plane normal to the X axis, intersecting it at a point on the axis. Similarly, a py plane is a plane normal to the Y axis and a pz plane is a plane normal to the Z axis. On the Surface Panel Menu Bar, click on SurfacePlanepx. Figure 3-19 illustrates this step. On the Surface Panel, Type 20 in the first coefficient box (as indicated in Figure 3-20) Click on Register.
Page 25 of 288
Figure 3-20 Sphere and First px Plane Create the other planes. Type -20 (note that it is negative 20) in the first coefficient box to set the distance D. Click Register Click on SurfacePlanepy. Click on Register. (using the previous value of -20) Type 20 (note that it is positive 20) in the first coefficient box to set the distance D. Click on Register. Click on SurfacePlanepz. Click on Register. (using the previous value of -20) Type -20 (note that it is negative 20) in the first coefficient box to set the distance D. Click on Register.
Page 26 of 288
MCNP Visual Editor Manual Figure 3-21 Sphere and Six Plane Surfaces shows the result.
Figure 3-21 Sphere and Six Plane Surfaces Click Close to close the Surface Panel.
Page 27 of 288
Figure 3-22 Selecting First Surface in Creation of Cube Cell A cell is defined by selecting surfaces to bound a region and then choosing a point that is entirely inside or entirely outside all the surfaces to set the sense for the surfaces. On the Main Menu, Click on Cell to open the Cell Panel. On the Left Plot Window, Drag the mouse across Surface 2 as indicated by the dashed line in Figure 3-22. Notice that the line showing Surface 2 becomes blue once it has been selected. Drag across the other three plane surfaces on the Left Plot window.
Page 28 of 288
Figure 3-23 Using Both Plot Windows to Select Cube Surfaces To specify a cube, six surfaces must be specified. Only four surfaces are visible from the Left Plot window. It is necessary to use the Right Plot window to specify the py surfaces. Figure 3-23 illustrates this concept. Drag across the two py surfaces in the Right Plot Window as indicated by the dashed lines in Figure 3-23. A point must be selected to indicate whether the cell will be inside these surfaces or outside them. For more information, see the discussion with Figure 3-28 Defining the Point to Determine Cell Sense. Click in the center of the square on either Plot Window. In the message box on the cell panel, it should say Point Accepted.
Page 29 of 288
Figure 3-24 Define Point, Paste and Register Once a region has been defined, it may be either added (with Paste) to the area that will be included in the cell or subtracted (with Cut) from it. In this case, the region that has been defined will be added to the cell so Paste is the correct choice. Click Paste on the Cell Panel menu to add this region to the cell definition. Click Register on the Cell Panel menu to create the cell. Figure 3-25 shows the cube cell as Cell 1. Click the Cell Number toggle to turn on Cell Numbers (as indicated in Figure 3-25) The lines on the square turn green when pasted and then return to red when registered. They are still red because a cell exists inside the surfaces but not outside them.
Page 30 of 288
Figure 3-25 Display of Cube Cell. Create the Outside World All space must be defined in a valid MCNP geometry so there must always be an Outside World. In this case, the outside world is all the space outside the sphere. Drag across the sphere surface. Click INSIDE the sphere as indicated in Figure 3-26. For more information, see the discussion with Figure 3-28 Defining the Point to Determine Cell Sense.
Page 31 of 288
Figure 3-26 Create Sphere Cell The outside world will consist of all area that is not inside the sphere. This may be defined by pasting all the area outside the sphere or by cutting out the area within the sphere. In this case, the area within the sphere will be cut out. Click Cut. Click Register. Figure 3-27 Cube Cell and Outside World shows the result.
Page 32 of 288
Figure 3-27 Cube Cell and Outside World Defining the Point to Determine Cell Sense. When creating cells, the point determines the cell sense. When the bounding surface is a sphere, defining the point within the center of the sphere means that the cell will include the area inside the sphere. Similarly, if the point is defined by clicking a location outside the sphere, the cell will include the area outside the sphere (but not inside). While this is fairly obvious for spheres, it is more complex with planes forming shapes such as a cube. In Figure 3-28, choosing Point 1 can specify the inside of the sphere. It does NOT specify the outside of the cube. Point 1 specifies an area that is: Right of Surface 2, Below Surface 6, Above Surface 7, and Right of Surface 3. Choosing Point 1 causes the sense (direction) of Surface 3 to incorrectly be defined as right of surface 3.
Page 33 of 288
Figure 3-28 Defining the Point to Determine Cell Sense Similarly, Point 2 can specify the inside of the sphere. It does NOT specify the outside of the cube. Choosing Point 2 to define the outside of the cube incorrectly causes the sense of Surface 6 to be defines as below surface 6. Point 3 can define the inside of the cube or the inside of the sphere. Point 4 can define the outside of the sphere but NOT the outside of the cube. To choose the area between the sphere and the cube, the user must first define a cell that includes the inside of the sphere (paste) and then subtract the area inside the cube (cut). Creating the Cell Inside the Sphere and Outside the Cube As discussed above, this cell will be created by first creating the region inside the sphere and then cutting out the region inside the cube.
Page 34 of 288
Figure 3-29 Paste Inner Sphere Drag the mouse across the sphere surface to select it. Click inside the sphere (it does not matter whether it is inside the cube or not). Click Paste on the Cell Panel. This will paste the interior of the sphere into the cell definition.
Page 35 of 288
Figure 3-30 Cut Cube from Sphere Drag the mouse across all six planes (use the right plot to get the py planes). This step is illustrated by the dashed lines in Figure 3-30. Click inside the cube to establish the sense as inside the cube. Click on Cut on the Cell Panel. This will cut away the area inside the cube from the area inside the sphere. Click on Register. Cell three has now been created and consists of the area inside the sphere but outside the cube.
Page 36 of 288
Figure 3-31 Geometry with Three Cells Created Figure 3-31 shows the completed cells. Valid MCNP cells are shown in black.
Page 37 of 288
4.1 Update
As it's name implies, the Update button is used to redraw the plot for that window. To update all plots, use the Update Plots main menu option. You typically use the Update Plots button to create the plots after reading in a new input file. This is not done automatically because there are times when you do not want the plot to be displayed because it would take too long to generate.
Page 38 of 288
MCNP Visual Editor Manual When you change the basis, origin, or extent parameters by hand, you need to select Update in the specific window or Update Plots from the main menu to redraw the plots with the new plot values.
Figure 4-2 Using Zoom The Zoom check box enables the user to magnify a portion of the plot. When the Zoom check box is selected, the user can drag the mouse across a portion of the geometry and that area will be magnified. This is useful for intricate work in small cells. The Visual Editor stays in zoom mode until you uncheck the Zoom check box. This allows for multiple zoom operations to be done in a row. Sometimes it is useful to click zoom on one plot and then drag the mouse across a region in a different plot. The identified area will then be shown in the original plot window as shown in Figure 4-2. Page 39 of 288
Figure 4-3 Using the Origin The origin is the center of the plot. The origin of the two plots automatically defaults to 0,0,0. These coordinates can be set by hand by entering the desired origin values in the three text boxes below the Origin check box. Once the new origin is ready to be implemented, select Update Plots. Figure 4-3 shows the ipig input file. The right plot shows the inner cylinder as only a half-circle. Cylinders often appear incorrectly as half-cylinders if the plot plane is exactly on the end of the cylinder. Changing the z coordinate in the right plot to 1 moves the view off the end of the cylinder and it correctly plots as a complete circle. Figure 4-4 shows the result.
Figure 4-4 Z Coordinate Origin off the Plot Plane Page 40 of 288
MCNP Visual Editor Manual Another way to adjust the origin involves selecting the Origin check box for the plot and then setting the origin by clicking in the plot to define the location for the new center of the plot. The origin can be set in either plot window. The plot will stay in origin mode until the origin check box is clicked again to turn it off. Figure 4-5 shows the cask geometry plotted at the origin which is the default.
Page 41 of 288
MCNP Visual Editor Manual Figure 4-6 shows the same file after the z coordinate has been modified. For this plot, the origin checkbox was clicked on the right plot and then the cursor was clicked on the left plot where indicated. This moved the z view on the right plot to the point indicated by clicking on the left plot.
Figure 4-6 Buss Cask Input File Plotted at (-1, 0, 33) The buttons to the left of the origin values, enable the user to change the origin x, y or z value by clicking on the coordinate to be changed and selecting its value with a click of the mouse from one of the plot windows. For example, if the right plot is an xy view and the left plot is an xz view, you can change the elevation of the xy view by clicking the z box for the right plot and then clicking the at a different z value on the left plot. The z for the right plot will change to that selected value, resulting in a different cross sectional view.
Page 42 of 288
Figure 4-7 Buss Cask Input File shown with default extents of 100 The horizontal extent is the distance from the center of the plot to a horizontal edge of the plot. The vertical extent is the distance from the center of the plot to the top/bottom of the plot. The extents for the plots automatically default to 100. Figure 4-7 shows a cask geometry with the default extents. The extents can be changed by typing in desired extents under the Extent label and selecting Update or by using the slider bar on top of the plot windows. This modifies the extent by a scale factor between 0.1 and 10. You can also click on the left/right side of the slider bar handle to increase/decrease the extents by about 10% for each click. Figure 4-8 shows the XZ plot on both the left and right plot window. On the left, the view has been zoomed in and now has extents of 50. On the right, the view has been zoomed out and now has extents of 500.
Page 43 of 288
Figure 4-8 Left Plot with Extents at 50, Right Plot with Extents at 500 The buttons to the left of the extent values, allow the user to square up the extents. This is often used after zooming in on a region. Both extents will be set to the value you click on making them equal.
Page 44 of 288
4.8 Unused
This check box displays surfaces that are not currently used as part of a cell.
Page 45 of 288
MCNP Visual Editor Manual Select the Rect check box to change the plot window to a rectangular plot instead of a square plot. A rectangular plot is needed to see the grid lines or the plot legend. Tally and cross section plots also look better in a rectangular plot instead of a square plot.
Those items with a ":" have a pull right menu to choose p, n, e. Items with an n in their name require that you enter the requested value at the top of the plot window in the n = text box.
Page 47 of 288
Figure 4-10 i3hex Input File at Level 1 and at Level 5 (Zoomed) By setting these level buttons, you can significantly decrease the amount of time it takes to make a plot of a lattice geometry by suppressing the plotting of lower universe information. Additionally, you can use the special lattice cell label options to plot useful information about the lattice geometry.
Figure 5-1 The Visual Editor Main Menu A brief overview of each of the menu options and their purpose is given in Table 5-1 below. Table 5-1 Overview of the Main Menu Options and Their Purpose Menu Option File Description Used to open and save MCNP input files. FileNew View is used to open additional plot windows into the geometry.
Page 48 of 288
MCNP Visual Editor Manual Input Used to bring up a simple text editor containing the complete contents of the input file, including cards not recognized by the Visual Editor. The input file can be edited by hand in this window. Update both plot windows. Bring up the surface window to scan, create or modify surfaces. Bring up the cell window to scan, create or modify cells. Menu for some data cards: materials, importances, transformations. Enable the running of MCNP input files. Bring up the source window that allows for source point display and particle track plotting. Allow the plotting of tallies from a runtpe or mctal files. This is the same capability that currently exists when requesting MCPLOT (mcnp inp=filename z options) Allow the plotting of MCNP cross sections. This is the same capability that currently exists when requesting MCPLOT (mcnp inp=filename ixz options) Allows the rendering of a 3D view of the geometry or a radiographic image using ray tracing, or select Dynamic 3D Display to obtain a dynamic wire mesh display in some current versions of the Visual Editor. Import a CAD 2D DXF or 3D sat file. Update the plots after the file that was read in or has been modified by an external text editor. This allows the user to edit the file outside the Visual Editor and only use the Visual Editor to plot the geometry. Creates a backup file that sequentially increases (inpn1, inpn2, ). Parameters to set plot, file open, and file generation options. Select the active plot window. Shows the version number, along with access to this manual in electronic form, including an index and search ability.
Update Plots Surface Cell Data Run Particle Display Tally Plots
Page 49 of 288
Figure 6-1 The File Menu The file menu has a number of typical options available in Windows applications, however, there are a few Visual Editor specific options. FileNew View will open up a new plot window with the plot parameters set to default values. FileOpen will bring up a file selection window that will allow a new MCNP input file to be read in. A file opened with this command will be re-formatted by the Visual Editor to enable the creation capabilities. FileOpen (do not modify input) will bring up a file selection window that will allow a new MCNP input file to be read in. A file opened with this command will not be modified and all creation capabilities (surface, cell, materials, etc.) will be turned off. However, all plotting capabilities will still be available including 2D plots, 3D plots and particle plots. The input can also be opened up in an external text editor and the plots can be updated by using the Read_again menu option, or changes can be made manually in the Input File window followed by Save-Update each time. Unused surfaces can also be displayed on a plot by right clicking on the plot and selecting SURFACE SHOW UNUSED. FileClear Input will clear the active input file, so the user can start over from scratch. This removes all surface, cell and MCNP data information.
Page 50 of 288
MCNP Visual Editor Manual FileSave and FileSave As must be used to save the current input file that is being generated. If you leave the Visual Editor before saving the file, all the information currently in memory will be lost.
Page 51 of 288
Page 52 of 288
Figure 8-2 Creating a Spherical Surface Start the Visual Editor. On the Main Menu, Click Surface. On the Surface Panel, Verify that the surface type is so, a sphere centered at the origin. In the R, radius, textbox enter 50 for a 50 centimeter radius. Click Register. The surface is shown with red dotted lines because it has not been assigned to a cell yet.
Page 53 of 288
8.8
The default is to represent all surface dimensions in centimeters. However, it is possible to enter surface dimensions in inches by selecting the Inches option. In this mode all dimensions are in inches, the plots will still be in cm and the surface dimensions will be converted to centimeters when creating the surface card for the input file. While in Inches mode, the dimensions of scanned surfaces will be in inches, the Surface delta will be calculated as inches, and the distance will also be calculated in inches.
MCNP Visual Editor Manual and the distance between the surfaces will be calculated. The Visual Editor will take the dimension of the first surface minus the dimension of the second surface, so it is possible for this value to be negative. This only works for surfaces of the same type. This value will be in inches if Inches is selected. It is possible to get a number of distances from a specific surface by getting the dimension for the first surface and then leaving the second check box checked and dragging across all surfaces for which you want the distance calculated relative to the first surface.
Page 55 of 288
8.12 Example: Using All the Visual Editor Surface Creation Tools
This exercise uses a variety of features in the Visual Editor to create and modify surfaces.
Figure 8-3 Creating a px plane Start the Visual Editor. On the Main Menu, Click on Surface. On the Surface Panel, Click on SurfacesPlanepx. In the D, distance, textbox, type 20 for 20 centimeters. On the Surface Panel, Click Register.
Page 56 of 288
Figure 8-4 Creating Another px Plane In the D, distance, text box, change the distance along the axis to 50. Click Register.
Page 57 of 288
Figure 8-5 Setting the Diameter Using the Mouse Click on the Left panel where indicated in Figure 8-5. Click Register.
Page 58 of 288
Figure 8-6 Delete a Surface On the Surface Panel, Click Scan. On the Left Plot window, drag across the surface as shown in Figure 8-6. The line will become blue to show it is active. On the Surface Panel Menu, Click Delete or press the delete button on the keyboard.
Page 59 of 288
Figure 8-7 Using Surface Delta to Create Surfaces. On the Surface Panel, Click Scan Drag across the surface on the right. On the Surface Panel, Click on Create Like Type 10 in the Surface Delta Box. Click the Surface Delta Button. The amount in the surface delta is added to the diameter. Click Register. This will be repeated twice more to create two additional surfaces. Click the Surface Delta Button. Click Register. Click the Surface Delta Button. Click Register.
Page 60 of 288
Figure 8-8 Determining the Distance between two planes. Click on Scan. Click to check the first distance box. Drag across the left-most surface as indicated by Figure 8-8. Click the second distance checkbox. Drag across the second surface as indicated by Figure 8-8. The distance between the two is displayed below in centimeters (-30). Click the inches box. The distance below and for each plane is displayed in inches. Click the centimeters box to return to the original measurements. Drag the mouse across the next plane to the right. The distance shows -40. Drag the mouse across the next plane to the right. The distance shows -50.
Page 61 of 288
Figure 8-9 Create a Macrobody Truncated Right Angle Cone On the Surface Panel, Click SurfaceMacroTRC. In the parameter boxes, enter the following values: Vx=0, Vy=0, Vz=-30, Hx=0, Hy=0, Hz=60, R1=40, R2=20. This is a truncated right angle cone with its base at 0, 0, -30 with a height of 60 centimeters. Its radius at the base is 40 and its radius at the top is 20. Click Register.
Page 62 of 288
Figure 8-10 Show and Hide Surfaces. On the Left Plot Window, right click. Select SURFACE_HIDE_ALL. The surfaces disappear. On the Left Plot Window, right click. Select SURFACE SHOW ALL. The surfaces reappear. Close the Surface Panel by clicking Close or clicking the X in the top right corner of that panel.
Page 63 of 288
Page 64 of 288
8.13.1
This example will create a rotated ellipsoid using the surface wizard. Figure 8-12 shows the result.
Figure 8-12 A Rotated GQ Ellipsoid Start the Visual Editor. On the Main Menu, Click Surface. On the Surface Panel Menu, Click Wizard.
Page 65 of 288
Figure 8-13 The Surface Wizard Panel 1 On the first Wizard panel, select Quadratic as indicated in Figure 8-13. Click Next.
Figure 8-14 The Surface Wizard Panel 2 On the second Wizard panel, select the GQ Ellipsoid as indicated in Figure 8-14. Click Next.
Page 66 of 288
Figure 8-15 The Surface Wizard Panel 3 On the third Wizard panel, enter the following data: The first axis vector: u1 = 0.57735 v1 = 0.57735 w1 = 0.57735 The second axis vector: u2 = 0.7071 v2 = 0.7071 w2 = 0 Click Next.
Page 67 of 288
Figure 8-16 The Surface Wizard Panel 3 Adjust Vector The message shown in Figure 8-16 will appear. The wizard will adjust the vectors if they are not perpendicular. Click OK.
Page 68 of 288
Figure 8-17 The Surface Wizard Panel 4 Note the adjusted values for the three axes. On the fourth Surface Wizard panel, enter the following values: The x coordinate of the center of the ellipsoid, x=50. The y coordinate of the center of the ellipsoid, y=70. The z coordinate of the center of the ellipsoid, z=90. The ellipse radius along the first axis, r1=60. The ellipse radius along the second axis, r2 = 30 The ellipse radius along the third axis, r3 = 30 Click Next. On the fifth Surface Wizard Panel (not shown in a figure), click Next. On the sixth Surface Wizard Panel (not shown in a figure), Click Finish. Page 69 of 288
Figure 8-18 Display Ellipsoid On the Main Menu, Click Input. On the Input Panel, Click Save-Update. On the Left Plot Window, change the origin to 50, 70, 90. On the Right Plot Window, change the origin to 50, 70, 90. On the Main Menu, Click Update Plots If the red lines do not display, right click on the plot window and select SURFACE SHOW ALL.
8.14.1
Planes
Page 70 of 288
MCNP Visual Editor Manual px plane: Normal to the X axis This surface requires the following parameters: D = the distance along the specified axis to the point where the plane intersects. Equation: xD=0 Example: D=5 Resultant input line.
1 px 5
py plane: Normal to the Y axis This surface requires the following parameters: D = the distance along the specified axis to the point where the plane intersects. Equation: yD=0 Example: D=5 Resultant input line.
1 py 5
This surface requires the following parameters: D = the distance along the specified axis to the point where the plane intersects. Equation: zD=0 Example: D=5 Resultant input line.
1 pz 5
Page 71 of 288
This surface requires the following parameters: x1, y1, z1 = x, y, and z coordinates for the first point x2, y2, z2 = x, y, and z coordinates for the second point x3, y3, z3 = x, y, and z coordinates for the third point Example: (x1, y1, z1) = (0, 40, 0) (x2, y2, z2) = (40, 0, 0) (x3, y3, z3) = (40, 40, 5) Resultant input line.
1 p 0 40 0 40 0 0 40 40 5
8.14.2
Spheres
sphere at the origin (so)
This surface requires the following parameters: R = radial distance from the origin Equation: x2 + y 2 + z 2 R2 = 0 Example: R=50 Resultant input line.
1 so 50
Page 72 of 288
This surface requires the following parameters: R = radial distance from the center. x = displacement distance along the x axis. Equation: (x x')2 + y 2 + z 2 R 2 = 0 Example: x=75 R=50 Resultant input line.
1 sx 75 50
This surface requires the following parameters: R = radial distance from the center. y = displacement distance along the y axis. Equation: 2 x 2 + ( y y ') + z 2 R 2 = 0 Example: y=75 R=50 Resultant input line.
1 sy 75 50
This surface requires the following parameters: R = radial distance from the center. z = displacement distance along the z axis. Equation: 2 x 2 + y 2 + ( z z ') R 2 = 0 Example: z=75 R=50 Resultant input line.
1 sz 75 50
Page 73 of 288
This surface requires the following parameters: R = radial distance from the center. x, y, z = center of the sphere. Equation: (x x')2 + ( y y')2 + (z z ')2 R 2 = 0 Example: (x, y, z) = (75, 65, 85) R=50 Resultant input line.
1 s 75 65 85 50
8.14.3
Cylinders
parallel to the x axis
This surface requires the following parameters: R = radius of cylinder. y, z = non-axis coordinates. Equation: ( y y')2 + (z z ')2 R 2 = 0 Example: (y, z) = (65, 85) R=50 Resultant input line.
1 c/x 65 85 50
This surface requires the following parameters: R = radius of cylinder. x, z = non-axis coordinates. Equation: (x x')2 + (z z ')2 R 2 = 0 Example: (x, z) = (65, 85) R=50 Resultant input line.
1 c/y 65 85 50
Page 74 of 288
This surface requires the following parameters: R = radius of cylinder. x, y = non-axis coordinates. Equation: (x x')2 + ( y y')2 R 2 = 0 Example: (x, y) = (65, 85) R=50 Resultant input line.
1 c/z 65 85 50
on the x axis
This surface requires the following parameters: R = radius of cylinder. Equation: y 2 + z 2 R2 = 0 Example: R=50 Resultant input line.
1 cx 50
on the y axis
This surface requires the following parameters: R = radius of cylinder. Equation: x2 + z 2 R2 = 0 Example: R=50 Resultant input line.
1 cy 50
Page 75 of 288
This surface requires the following parameters: R = radius of cylinder. Equation: x2 + y 2 R2 = 0 Example: R=50 Resultant input line.
1 cz 50
8.14.4
Cones
parallel to the x axis
This surface requires the following parameters: x, y, z = coordinates for the apex of the cone. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
This surface requires the following parameters: x, y, z = coordinates for the apex of the cone. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
Page 76 of 288
This surface requires the following parameters: x, y, z = coordinates for the apex of the cone. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
on the x axis
This surface requires the following parameters: x = displacement distance along the x axis for cone apex. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
( y )2 + (z )2 t (x x') = 0
Example: (Using the Wizard) x=10, =15, type=1 Resultant input line.
1 kx 10 0.071796769720193 1
on the y axis
This surface requires the following parameters: y = displacement distance along the y axis for cone apex. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
(x )2 + (z )2 t ( y y ') = 0
Example: (Using the Wizard) y=10, =15, type=1 Resultant input line.
1 ky 10 0.071796769720193 1
Page 77 of 288
This surface requires the following parameters: z = displacement distance along the z axis for cone apex. t2= tangent squared of the cone half angle (surface panel) = cone half angle (instead of t2 for surface wizard only) cone type: 0=two sheet cone, 1 or -1= 1 sheet cone Equation:
(x )2 + ( y )2 t (z z ') = 0
Example: (Using the Wizard) z=10, =15, type=1 Resultant input line.
1 kz 10 0.071796769720193 1
8.14.5
SQ Surfaces
non-rotated ellipsoid Surface Wizard Only
This surface requires the following parameters: x, y, z = coordinates for center. x radius, y radius, z radius Equation: Parameters calculated by the wizard Notes: Special form available in the Quadratic Wizard. This is an ellipsoid with axes along the x, y, and z axes, given a center point and three radii. Example: (Using the Wizard) (x, y, z) = (10, 20, 30) x radius = 50, y radius = 60, z radius = 70 Resultant input line.
1 sq 0.0004 0.00027777777777778 0.00020408163265306 0 0 0 -1 10 20 30
Page 78 of 288
This surface requires the following parameters: A, B, C, D, E, F, G = see equation x, y, z = center point for the object Equation: 2 A(x x') + B( y y ' ) 2 + C ( z z ' ) 2 + 2 D( x x' )
+ 2 E ( y y ') + 2 F ( z z ') + G = 0 Example: A=0.0004, B=0.002778, C=0.000204, D=0, E=0 F=0, G=-1, x=10, y=20, z=30 Resultant input line.
2 2
8.14.6
GQ Surfaces
GQ Rotated Ellipsoid Surface Wizard Only
This surface requires the following parameters: u1, v1, w1 = a vector along the first axis of the ellipsoid u2, v2, w2 = a vector along the second axis of the ellipsoid x, y, z = the center of the ellipsoid. r1, r2, r3 = the radii of the first, second, and third axes. The radius may be infinity for an elliptical cylinder, in which case, enter -1 for the radius and the center is not used. Equation: The wizard calculates the General GQ parameters as follows: A' ' = 1 2 B' ' = 1 2 C ' ' = 1 2 r1 r2 r3 D ' = 2( A' ' u1v1 + B' ' u2v2 + C ' ' u3v3 ) E ' = 2( A' ' v1w1 + B' ' v2 w2 + C ' ' v3 w3 ) F ' = 2( A' ' u1w1 + B' ' u2 w2 + C ' ' u3 w3 ) The GQ surface coefficients are: A = A' B = B' C = C ' D = D' E = E ' F = F ' G = 2 xA' D' y F ' z H = 2 yB D' x E ' z J = 2 zC ' E ' y F ' x K = 1 + A' x 2 + B' y 2 + C ' z 2 + D' xy + E ' yz + F ' xz Example (Surface Wizard Only): u1=0.57735, v1 = 0.57735, w1 = 0.57735 u2 = 0.7071, v2 = -0.7071, w2 = 0 x, y, z = 50, 70, 90 r1=60, r2=30, r3=30 Resultant input line.
C ' = A' ' w1 + B' ' w2 + C ' ' w3
2 2 2
gq 0.00083331883973211 0.00083331883973211
Page 79 of 288
This surface requires the following parameters: x, y, z = the center of the ellipsoid. u1, v1, w1 = a vector along the axis of the cylinder r = the radius of the cylinder. Equation: The wizard calculates the General GQ parameters as follows: A = 1 u 2 B = 1 v 2 C = 1 w2 D = 2uv E = 2vw F = 2uw G = uD zF 2 xA H = xD zE 2 yB J = xF yE 2 yB K = Ax 2 + By 2 + Cz 2 + Dxy + Eyz + Fxz r 2 Example (Surface Wizard Only): x=20, y=20, z=20, u=0.5, v=0, w=0.866025, r=30 Resultant input line.
1 gq 0.74999981260234 1 0.25000018739766 0 0 0.86602562017251 -29.999992504094 -40 17.32051240345 200.00007495906
Other GQ
This surface requires the following parameters: A, B, C, D, E, F, G, H, J, K = see equation Equation: Ax 2 + By 2 + Cz 2 + Dxy + Eyz + Fzx + Gz + Hy + Jz + K = 0 Example: A=0.7499, B=1, C=0.25, D=0, E=0 F=-0.86603, G=-30, H=-40, J=17.32, K=200 Resultant input line.
1 gq 0.7499 1 0.25 0 0 -0.86603 -30 -40 17.32 200.00007495906
Page 80 of 288
8.14.7
Torus
elliptical or circular torus parallel to the x axis
This surface requires the following parameters: x, y, z = coordinates for the center of the torus. A=The radius of the major axis which is distance from the (x, y, z) to the center of the donut portion of the torus B=The minor axis radius parallel to the center axis of the torus, from the outer circumference of the torus (top) to the center of the donut. C=The minor axis radius in the direction of the radius of the major axis. Equation:
2 2 ( x x ') + ( y y ' ) + ( z z ') A 1 = 0 2 2 B C Example: (x, y, z)=(50,0,0) A=40, B=20, C=10 Resultant input line. 2 2
tx 50 0 0 40 20 10
This surface requires the following parameters: x, y, z = coordinates for the center of the torus. A=See tx torus. Equation:
2 2 ( y y ') + ( x x ' ) + ( z z ') A 1 = 0 2 2 B C Example: (x, y, z)=(50,0,0) A=40, B=20, C=10 Resultant input line. 2 2
ty 50 0 0 40 20 10
Page 81 of 288
This surface requires the following parameters: x, y, z = coordinates for the center of the torus. A=See tx torus. Equation:
2 2 ( z z ' ) + ( x x ') + ( y y ') A 1 = 0 2 2 B C Example: (x, y, z)=(50,0,0) A=40, B=20, C=10 Resultant input line. 2 2
tz 50 0 0 40 20 10
8.14.8
Points
asymmetric surface defined by points about the x axis
This surface requires the following parameters: one to three coordinate pairs of x1 and r1 where
r1 = y1 + z1 For three points, the user would define x1, r1, x2, r2, x3, r3 Notes: If one coordinate pair is used, a plane (PX, PYx, or PZ) is defined. If two coordinate pairs are used, a linear surface (PX, PY, PZ, CX, CY, CZ, KX, KY, or KZ) is defined. If three coordinate pairs are used, a quadratic surface (PX, PY, PZ, SO, SX, SY, SZ, CX, CY, CZ, KX, KY, KZ, or SQ) is defined. When a cone is specified by two points, a cone of only one sheet is generated. Example: Create three surfaces to create the figure shown. 1st surface: x1 = 8, r1=2, x2=7, r2=1 2nd surface: x1=7, r1=3, x2=8, r2=3, x3=9, r3=2 3rd surface: x1=7, r1=1, x2=8, r2=1, x3=9, r3=2 Resultant input lines.
1 2 3 x 8 2 7 1 x 7 3 8 3 9 2 x 7 1 8 1 9 2
2 2
Page 82 of 288
8.14.9
Macrobodies
ARB - arbitrary polyhedron
This surface requires the following parameters: (ax, ay, az) to (hx, hy, hz) are eight triplets of (x,y,z) entries to describe each corner, although some may not be used (just use zero triplets of entries). N1 to N6 are six 4-digit integers describing each side of the ARB in terms of the corner numbers for that side. For example, the entry 1278 would define this plane surface to be bounded by the 1st, 2nd, 7th, and 8th of the above triplets for the corners. If the fourth digit is zero, the fourth corner is ignored for this side. If the fourth digit is not zero, the corners must all lie within a plane (to within an error criterion) or MCNP gives an error. For a four sided ARB, 4 non-zero 4-digit integers (last digit is zero for a four sided) are required to define the side. For a five sided ARB, 5 non-zero 4-digit integers are required, and 6 non-zero 4-digit integers are required for a six sided ARB. The last two integers are zero for a four sided ARB and the last integer is zero for a five sided ARB. MCNP gives an error message if there are not 30 total entries. Example: To create the figure shown at the left: -5, -10, -5, -5, -10, 5, 5, -10, -5, 5, -10, 5, 0, 12, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 1250, 1350, 2450, 3450, 0 Resultant input lines.
1 arb -5 -10 -5 -5 -10 5 5 -10 -5 5 -10 5 0 12 0 0 0 0 0 0 0 0 0 0 1234 1250 1350 2450 3450 0
Page 83 of 288
This surface requires the following parameters: Vx, Vy, Vz = the coordinates for a corner of the box. A1x, A1y, A1z = A vector along a side of the box. A2x, A2y, A2z = A vector along a side of the box. A3x, A3y, A3z = A vector along a side of the box. The magnitude of the vector is the length of the box. Example: To create a figure similar to the one shown at the left: -1, -1, -1, 3, 0, 0, 0, 2, 0, 0, 0, 2 Resultant input lines.
1 box -1 -1 -1 3 0 0 0 2 0 0 0 2
ELL - ellipsoid from center point and major axis radius vector
This surface requires the following parameters: V1x, V1y, V1z = center point for ellipsoid V2x, V2y, V2z = a vector along the major axis whose magnitude is the length of the major axis. Rm = radius of the minor axis Example: To create a figure similar to the one shown at the left: V1x, V1y, V1z = 0,0,0 V2x, V2y, V2z = 0,0,30 Rm = 20 (if not using the wizard, this must be -20) Resultant input lines.
1 ell 0 0 0 0 0 30 -20
This surface requires the following parameters: V1x, V1y, V1z = first foci coordinate. V2x, V2y, V2z = second foci coordinate. Rm = length of the major axis. Example: To create a figure similar to the one shown at the left: V1x, V1y, V1z = 0,0,-20 V2x, V2y, V2z = 0,0,20 Rm = 60 Resultant input lines.
1 ell 0 0 -20 0 0 20 60
Page 84 of 288
This surface requires the following parameters: V1, V2, V3 = the coordinates for the center of the base. H1, H2, H3 = a vector from bottom to top along the axis. R1, R2, R3 = a vector from the axis to the center of the first facet. Notes: The sense is negative inside the HEX Example: To create a figure similar to the one shown at the left: V1, V2, V3 = 0, 0, -4 H1, H2, H3 = 0, 0, 8 R1, R2, R3 = 0, 2, 0 This is a 8 cm-high hexagonal prism about the z-axis whose first facet is normal to the y-axis and is 2 cm from the axis(pitch=4). The bounding planes are z-planes at z=-4 and z=4, respectively. Resultant input lines.
1 rhp 0 0 -4 0 0 8 0 2 0
This surface requires the following parameters: Vx, Vy, Vz = coordinates of a corner of the box. A1x, A1y, A1z = a vector along one side with the length equal to the length of the side. A2x, A2y, A2z = second foci coordinate. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = -10,-10,0 A1x, A1y, A1z = 20, 0, 0 A2x, A2y, A2z = 0, 20, 0 Resultant input lines.
1 box -10 -10 0 20 0 0 0 20 0
Page 85 of 288
This surface requires the following parameters: Vx, Vy, Vz = coordinates of the center of the base Hx, Hy, Hz = a vector along the axis. R = radius of the cylinder. Notes: The sense is negative inside the cylinder. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = 0, -5, 0 Hx, Hy, Hz = 0, 10, 0 R= 4 Resultant input lines.
1 rcc 0 -5 0 0 10 0 4
This surface requires the following parameters: Vx, Vy, Vz = coordinates of the center of the base Hx, Hy, Hz = a vector along the axis. V1x, V1y, V1z = a vector along the major axis, perpendicular to H, whose magnitude is the major axis radius. V2x, V2y, V2z = a vector along the minor axis, perpendicular to H, whose magnitude is the minor axis radius. Notes: If there are 10 entries instead of 12, the 10th entry is the minor axis radius. The sense is defined to be negative inside the REC. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = 0, -5, 0 Hx, Hy, Hz = 0, 10, 0 V1x, V1y, V1z = 0, 40, 0 V2x, V2y, V2z = 20, 0, 0 This is a 10-cm high elliptical cylinder about the y-axis with the center of the base at (0,-5,0) and with the major axis radius 40 in the x-direction and the minor radius 20 in the z-direction. Resultant input lines.
1 rec 0 -5 0 0 10 0 0 0 40 20 0 0
Page 86 of 288
This surface requires the following parameters: V1, V2, V3 = coordinates of the center of the base H1, H2, H3 = a vector from bottom to top along the axis. R1, R2, R3 = a vector from the axis to the center point of the first facet. S1, S2, S3 = a vector from the axis to the center point of the second facet. T1, T2, T3 = a vector from the axis to the center point of the third facet. Notes: Use the macrobody HEX panel for a regular right hexagonal prism with only 9 entries. The sense is defined to be negative inside the RHP. Example: To create a figure similar to the one shown at the left: V1, V2, V3 = 0, 0, -4 H1, H2, H3 = 0, 0, 8 R1, R2, R3 = 0, 2, 0 S1, S2, S3 = 1.73205, 0.5, 0 T1, T2, T3 = 1.73205, -0.5, 0 This is an 8 cm-high regular hexagonal prism about the zaxis whose first facet is normal to the y-axis and is 2 cm from the center (pitch=4); i.e., equivalent to an HEX without the last six entries. The bounding planes are zplanes at z=-4 and z=4, respectively Resultant input lines.
4 rhp 0 0 -4 0 0 8 0 2 0 1.73205 0.5 0 1.73205 -0.5 0
Page 87 of 288
This surface requires the following parameters: Xmin, Xmax = minimum and maximum x values. Ymin, Ymax = minimum and maximum y values. Zmin, Zmax = minimum and maximum z values. Notes: The sense is defined to be negative inside the RPP. Example: To create a figure similar to the one shown at the left: Xmin, Xmax = -50, 50 Ymin, Ymax = -50, 50 Zmin, Zmax = -50, 50 This is a cube centered at the origin with 100 cm sides. Resultant input lines.
1 rpp -50 50 -50 50 -50 50
SPH sphere
This surface requires the following parameters: Vx, Vy, Vz, = coordinates for the center of the sphere. R = radius of the sphere Notes: This macrobody is equivalent to the general sphere and it is recommended that the general sphere be used instead. The sense is defined to be negative inside the SPH. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = 20, 20, 20 R = 40 This is a sphere centered at (20, 20, 20) with a radius of 40. Resultant input lines.
1 sph 20 20 20 40
Page 88 of 288
This surface requires the following parameters: Vx, Vy, Vz, = coordinates for the center of the base. Hx, Hy, Hz = a vector along the axis whose magnitude is the height R1 = radius of the base. R2 = radius of the top. Notes: The sense is defined to be negative inside the cone. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = -5, 0, 0 Hx, Hy, Hz = 50, 0, 0 R1 = 40 R2 = 20 This is a 50-cm high truncated cone about the x-axis with the center of the 40 cm radius base at (-5,0,0) and with the center of the 20 cm radius top at (45,0,0). Resultant input lines.
1 trc -5 0 0 50 0 0 40 20
Page 89 of 288
This surface requires the following parameters: Vx, Vy, Vz, = coordinates for the vertex of an edge. V1x, V1y, V1z = the vector of the first side of the triangular wedge. V2x, V2y, V2z = the vector of the second side of the triangular wedge. V3x, V3y, V3z = the vector of the third side of the triangular wedge. Notes: A right-angle wedge has a right triangle for the base defined by V1 and V2 and a height of V3, all orthogonal to each other. The V1 and V2 are the lengths of the two sides of the base. The sense is defined to be negative inside the wedge. Example: To create a figure similar to the one shown at the left: Vx, Vy, Vz = 0, 0, -6 V1x, V1y, V1z = 4, 0, 0 V1x, V1y, V1z = 0, 3, 0 V1x, V1y, V1z = 0, 0, 12 This is a right-angle wedge with vertex at (0,0,-6). The triangular base and top are a right triangle with sides of length 4 (x-direction) and 3 (y-direction) and a hypotenuse of length 5. Resultant input lines.
1 wed 0 0 -6 4 0 0 0 3 0 0 0 12
Page 90 of 288
Page 91 of 288
9.1.8 Register
Register the cell to create it, where the cell message box will give the message "CELL REGISTERED". The plots will also be updated to show the new cell, where dashed lines will be replaced with solid lines along the portions of surfaces where valid cells are defined on each side of the surface.
If you do not want to use the mouse operations described above to create the cell, you can enter the cell description in by hand and then select Register to create the cell.
Page 92 of 288
This needs to done with two paste operations because the sense for surfaces 4 and 2 changes depending on the location inside the cell. If you dragged across all six surfaces and then selected a point for the sense, the sense for surfaces 4 and 2 would change depending on where you clicked. Typically axial surfaces would also be involved in creating the cell with Paste or Cut operations, but they are not included here to simplify the discussion. The Paste operation creates a set of intersections, with the sense of the surfaces determined by the mouse location when the sense is entered. Paste allows the user to paste together a complex, even disjoint (although this is typically not desirable), cell from simple objects. The Paste operation adds the region (using the union : operator) to the cell being defined. The Cut operation creates a sequence of unions, using the opposite sense of the surfaces for the simple object. Cut allows the user to cut out simple objects one at a time. Typically the perimeter of the cell has been formed with Paste operations before the Cut operation, and the new cut will remove the defined region (using a cell intersection). There is a special case in the creation of the Outside World cell, or for cells on the outer portion of a universe, where Cut may be the only operation. Then the cut produces a number of unions describing the cell as the region beyond.
Page 93 of 288
On the Main Menu, Click on FileOpen and open the isense file. The input file is as follows: c 1 2 3 4 5 6 7 8 Created on: Monday, June 26, 2006 at 09:26 px -80 px -40 py 80 py 40 px 80 py -80 pz 40 pz -40
-0.53327
Page 94 of 288
On both the left and right plot windows, Click on the Surf, Cell, and Unused checkboxes.
Page 95 of 288
On the Right Plot Window, Drag across cells 1, 2, 3, and 6. On the Left Plot Window, Drag across cells 7 and 8. On the Right Plot Window, Click where indicated in Figure 9-5. On the cell panel, Click Paste.
Page 96 of 288
On the Right Plot Window, drag across surfaces 2, 3, 4, and 5. On the Left Plot Window, drag across surfaces 7 and 8. On the Right Plot Window, click were indicated in Figure 9-6 to establish the point. On the Cell Panel, Click Paste. On the Cell Panel, Click Material and choose Lead. On the Cell Panel, Enter a density of -11.35. On the Cell Panel, Click Register.
Page 97 of 288
If the cell had been created in one operation by selecting all eight surfaces, a point does not exist that appropriately establishes the sense for all cases. Point 1 incorrectly excludes the area right of surface 2 and above surface 4. This is wrong for the area that became the second paste in our example. Point 2 incorrectly includes the area below surface 4 and to the right of surface 2. Point 3 incorrectly excludes the area to the left of surface 2 and below surface 4. This is wrong for the area that became the first paste in our example.
Page 98 of 288
Page 99 of 288
MCNP Visual Editor Manual 2. Create the universe cells contained inside the fill cell. Remember that you do not include the outer bounding surfaces that are included on the fill cell created in step 1 above. In the cell window set the universe value equal to the fill value set in step 1 above for each cell, then register the cells. If a transformation is involved, return to the cell created in step 1 and modify it by using the cell scan-edit option. To scan the fill cell, you will need to enter the cell number by hand, since the fill cell will not show up in the plot windows. When the mode is set to edit set the transformation, by selecting the transformation button to select a transformation, or just enter the correct transformation number by hand in the cell window. The plots for this universe will shift to the appropriate transformed location. You must create all the transformations prior to using them in the cells.
3.
If you have a universe inside of a universe, it is recommended that you create these from the inside out. This will require a little backtracking as you set transformations and universe numbers, but it should be the easiest method. Create the inside fill cell first, then the inside cells that have the universe value set to this fill value. At this point you can go back and transform the fill cell if needed. Next create the outside fill cell and all the cells that compose the universe inside this fill cell. You will need to edit the inside universe fill cell at this time and set the universe value to the fill value of the outside universe. Finally, you can now transform the outside universe if needed.
9.6 Register
Register is the final step in the cell making process. Once the cell is registered it is officially incorporated into the geometry. All of the active plot windows with the Refresh button selected will be updated to show the newly created cell. After creating a number of cells, it is prudent to save the file using FileSave or backup the file by selecting the Backup menu option.
For a cell that will be split into n cells, possible geometry types for the splitting include: 1. 2. 3.
Sphere-in-Sphere where n-1 radial surfaces are inserted between the inner and outer spheres, where the inner sphere can have a radius of zero. Sphere where n-1 radial surfaces are inserted inside a sphere surface. Cylinder-in-Cylinder where the inner and outer cylinders can be divided either axially or radially -- in either case the inner cylinder radius can optionally be zero; or (2) the inner cylinder is completely inside the outer cylinder, and the region is divided into n cylinder-in-cylinder cells. Cylinder or Ring where the inner and outer cylinders for the ring are the same height and the ring can be split axially or radially, When the surface is just a cylinder, it also can be split axially or radially. Box-in-Box, where n-1 surfaces are inserted between the inner and outer box in each of the -x, +x, -y, +y, -z, and +z directions with uniform spacing between the inserted surfaces in each of the directions.
4.
5.
Once the split is registered the cell splitting window disappears, and the multiple cells that fill the original region appear in the geometry plots. The editor automatically creates the n new cells and all the surfaces that are needed.
Figure 9-14 Select the Option to Continue to Create the Second Region
Figure 9-18 Select the Option to Continue to Create the Third Region
Figure 10-1 shows examples of a rectangular and a hexagonal lattice card. The first number is the cell number which is 1 in this case. The second number is a zero which indicates the material. The material on a lattice cell card is ignored unless a fill entry in the fill matrix is the same as the universe number of the lattice, in which case this material is utilized for this fill.. In a rectangular lattice cell, the next six numbers are the surface numbers for the planes which are the sides of the rectangular shape. In the hexagonal lattice, the next eight numbers are the surface numbers for the planes which are the sides of the hexagonal prism. The next entry specifies which universe this lattice belongs to. In both cases, it is universe nine. The last entry (lat=) tells whether the lattice is rectangular or hexagonal. The number 1 indicates a rectangular lattice. The number 2 indicates a hexagonal lattice. The cell with a lat card where lat is 1 or 2 defines the (0,0,0) element of the lattice. The order of the surface entries on this cell card define which lattice element lies beyond each surface. While MCNP allows for complete generality, the rectangular lattice creation windows in the Visual Editor assumes that the surfaces are (px, py, pz) planes and that the surface order on this lattice cell card is ordered with the maximum plane occuring first in a given direction followed by the minimum plane in that direction with appropriate senses, followed by the same thing in the next direction, etc. If there are an odd number of elements in the lattice, the center element is often at the origin. When there is an even number of lattice elements in both directions the origin is chosen to be at the lower left hand corner of the (0,0,0) MCNP lattice element. Then the surfaces for the universes defined in the lattice must typically be transformed from the lower left hand corner to the center of the (0,0,0) lattice element. An example of this is shown in Section 10.2.3. Page 107 of 288
MCNP Visual Editor Manual All elements of a lattice must be filled with a universe. The fill= part of the lattice definition may be a single number or an array. If it is a single number, all elements of the lattice are filled with the same universe. If it is an array, the numbers indicate the number of lattice elements to either side of the (0,0,0) element. In the case of the rectangular lattice, there are five elements. Two are to the left of the center element (negative x) and two are to the right. Similarly, there are two below (negative y) and two above (positive y). There are three levels along the z axis with one below and one above the defined (0,0,0), center, element. The resulting statement is fill= -2:2 -2:2 -1:1 The array must then be filled with the number of the universe that fills it. For the example above, the right-most row is filled with universe 3 and the rest is universe 5. The center element, (0,0,0), which is defined in the lattice definition, is filled with universe 6.
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW $ROW 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 (-2,-2,-1) (-2,-1,-1) (-2,0,-1) (-2,1,-1) (-2,2,-1) (-2,-2,0) (-2,-1,0) (-2,0,0) (-2,1,0) (-2,2,0) (-2,-2,1) (-2,-1,1) (-2,0,1) (-2,1,1) (-2,2,1) (-1,-2,-1) (-1,-1,-1) (-1,0,-1) (-1,1,-1) (-1,2,-1) (-1,-2,0) (-1,-1,0) (-1,0,0) (-1,1,0) (-1,2,0) (-1,-2,1) (-1,-1,1) (-1,0,1) (-1,1,1) (-1,2,1) (0,-2,-1) (0,-1,-1) (0,0,-1) (0,1,-1) (0,2,-1) (0,-2,0) (0,-1,0) (0,0,0) (0,1,0) (0,2,0) (0,-2,1) (0,-1,1) (0,0,1) (0,1,1) (0,2,1) (1,-2,-1) (1,-1,-1) (1,0,-1) (1,1,-1) (1,2,-1) (1,-2,0) (1,-1,0) (1,0,0) (1,1,0) (1,2,0) (1,-2,1) (1,-1,1) (1,0,1) (1,1,1) (1,2,1) (2,-2,-1) $ROW 1 (2,-1,-1) $ROW 2 (2,0,-1) $ROW 3 (2,1,-1) $ROW 4 (2,2,-1) $ROW 5 (2,-2,0) $ROW 1 (2,-1,0) $ROW 2 (2,0,0) $ROW 3 (2,1,0) $ROW 4 (2,2,0) $ROW 5 (2,-2,1) $ROW 1 (2,-1,1) $ROW 2 (2,0,1) $ROW 3 (2,1,1) $ROW 4 (2,2,1) $ROW 5
The tables in Figure 10-2 show the universe fill values in the box on the left and the corresponding array index in the box on the right. For the fill matrix, the top-most, left-most element is (-2, -2, -1) and the bottom-most, right-most element is (2, 2, 1). There are several constraints governing lattices: Neither rectangular or hexagonal prisms are required to be regular.12 The prisms must fill all space which means that opposite sides must be identical and parallel. 12 A rectangular lattice may be infinite in one or two of its dimensions. 12 A hexagonal prism lattice cell may be infinite in the direction along the length of the prism. 12
A rectangular (hexahedral) lattice is created by selecting Rectangular Lattice from the Cell Panel. Figure 10-3 shows the cell panel with the rectangular lattice option selected.
Figure 10-4 shows the two panels for lattice creation. The first panel on the left and allows the user to choose the type of rectangular lattice and to select the center for the (0,0,0) element. The second panel further defines the lattice as follows.
The Cell Lattice Panel
Lattice surfaces: shows six blanks where the surfaces that bound the (0,0,0) element would be entered. The visual editor will create these automatically. Center-to-center pitch values: specifies the distance in centimeters from the center of the (0,0,0) element to the center of the next element in the x, y, and z direction respectively. Number of rows in each direction: specifies the number of rows in the x, y, and z direction respectively. The number of rows must be large enough to completely fill the cell that bounds
MCNP Visual Editor Manual the lattice. If there are lattice elements that are not filled, a run-time error will occur when MCNP is run. A grid of elements will appear below once these numbers are entered. Setting the Fill Matrix: see Section 10.1.1.
10.1.1
The lattice fill matrix commands allow the user to select portions of the lattice and assign the universe to several lattice elements at once. The different features can be combined. For example, the user could select axial index = 1 and row = 2 to get all elements in row 2 of axial row 1.
Fill Matrix Options
Note from the fill indices that the only valid axial values are -1 and 0. To select only the cells in the top axial index: Type -1 (axial indices are displayed from lowest to highest so -1 is above 0 but is the bottom of the lattice definition in the input file). Click on the Select Axial Index button. This will highlight all lattice elements that match the criteria. In this case, all elements with axial index -1. In the CHANGE THE UNIVERSE VALUE HERE box, type 2. This will set all elements that have an axial index of -1 to be filled with universe 2.
MCNP Visual Editor Manual Select Universe: selects all elements that have the same universe value as indicated in the box next to the button. This is especially useful for doing a find and replace operation such as selecting all elements that are filled with universe 0 and changing them to universe 5.
Select Rows: selects all elements in radial rows around the (0,0,0) element as shown in Figure 10-7 Select Row 1.
MCNP Visual Editor Manual Select I: select a column. For the 5x5 lattice shown in Figure 10-8, row 0 is the center and rows 1 and 2 are to the right. Rows -1 and -2 are to the left.
Select J: select a horizontal row. For the 5x5 lattice shown in Figure 10-9, row 0 is the center and rows 1 and 2 are below. Rows -1 and -2 are above.
10.2.1
In this example, a rectangular lattice will be placed in a sphere. The lattice elements will be filled with cylinders whose radius is slightly smaller than the size of the lattice.
Figure 10-10 Creating a Rectangular Lattice Start the Visual Editor. Create the Bounding Surface
On the Main Menu, Click on Surface. The default surface is a sphere at the origin. This is the desired surface type. Type 80 in the radius box to create a surface of radius 80. On the Surface Panel, Click Register.
Close the Surface Panel.
On the Left Plot Window, drag across the surface as indicated by the dashed line in Figure 10-11. On the Left Plot Window, click outside the sphere to establish the point. This will determine the sense for the surface for that cell. On the Cell Panel, Click Paste. On the Cell Panel, Click Register. Similarly, drag (again) across the surface as indicated by the dashed line in Figure 10-11. On the Left Plot Window, click INSIDE the sphere to establish the point. On the Cell Panel, Click Paste. The inside of the sphere will hold the lattice. The lattice will be Universe = 1. For the inside of the sphere to hold the lattice, it must be given a fill of one. On the Cell Panel, type 1 in the Fill text box. On the Cell Panel, Click Register.
Figure 10-12 Creating a Lattice Cell. Create the Third Cell that will Hold the Lattice Type 1 in the Universe text box. Choose Rectangular Lattice as indicated in Figure 10-12.
Figure 10-13 Choose a 2D Lattice in X and Y Choose a 2D Lattice with rows in the X direction and columns in the Y direction. Type 0 in the x location box.
Figure 10-14 Lattice Parameters Type 30 for the Horizontal Pitch. This will define the number of centimeters from the center of one element to the center of the next. Type 30 for the Vertical Pitch. Type 6 for Horizontal Rows. Type 6 for Vertical Rows. Click the Select Universe button to select all lattice entries with a zero universe. In this case, that is all the lattice entries.
In the CHANGE THE UNIVERSE VALUE HERE text box, type 2. This will fill the lattice with universe 2 which has not been created yet. On the Cell Lattice Panel, Click Register. Page 117 of 288
On the Main Menu, Click SurfaceCylindercz. In the radius box, type 13. On the Surface Panel, click Register.
Close the Surface Panel.
Create the cell that is the INSIDE of the cylinder. On the Main Menu, Click on Cell. On the Left Plot Window, drag across the surface of the cylinder as indicated in Figure 10-16.
Click INSIDE the cylindrical surface to set the point that will determine the sense of the cylindrical surface is inside the cylinder.
On the Cell Panel, in the Universe box, type 2. This will add this cells definition to universe 2. On the Cell Panel, Click on Paste. On the Cell Panel, Click on Register. Create the cell that is the OUTSIDE of the cylinder. On the Left Plot Window, drag across the surface of the cylinder as indicated in Figure 10-16.
Click INSIDE the cylindrical surface to set the point that will determine the sense of the cylindrical surface is inside the cylinder.
On the Cell Panel, in the Universe box, type 2. This will add this cells definition to universe 2. On the Cell Panel, Click on Cut. (Note that this is Cut and not Paste) This essentially creates an outside world for universe 2. The cell will be cut off at the boundaries of the lattice. On the Cell Panel, Click on Register. Page 119 of 288
10.2.2
The following discussion is for a specific lattice example and illustrates the use of the most common features in the window for creating a rectangular lattice. The example shown here is for a square lattice in the (x,y) plane with three axial lattice intervals along z. The center of the MCNP lattice element, element (0,0,0), is at the origin, which is often desired for an odd number of lattice elements in each direction along the (x,y) plane.
Figure 10-19 Creating Surfaces for the Cell that Holds the Lattice. Start the Visual Editor.
On the Main Menu, Click on Surface. On the Surface Panel, click on Surfacepx. In the D (distance) box, type 124.99. By choosing 124.99 rather than 125 we guarantee that the lattice boundary will not exactly match the surfaces of the cell that holds it.
Click Register.
On the Left Plot Window, click on the Surf checkbox to show Surface numbers. On the Right Plot Window, click on the Surf checkbox to show Surface numbers.
Drag across the surfaces as indicated in Figure 10-20. Click inside the box created by the surfaces to define the point that will determine the sense of the surfaces.
On the Cell Panel, Click on Cut. (the area inside the cube is cut away rather than pasted)
Click on Register.
On the Cell Panel, Change the Mode to Scan. On the left plot window, Click inside the cube. On the Cell Panel, Change the Mode to Edit.
Type 9 in the Fill box as indicated in Figure 10-21. The lattice will be assigned to universe 9 and typing 9 in the fill box will put the lattice inside this cell. Click Register.
Figure 10-22 Creating the Lattice Cell Create the Lattice Cell
On the Cell Panel, Type 9 in the Universe box. On the Cell Panel, Choose Rectangular Lattice.
MCNP Visual Editor Manual On the First Panel of the Lattice Wizard, Choose 3D Lattice with rows in the X direction and columns in the Y direction with an axial Z direction. For the center of the (0,0,0) Lattice element, enter 0 for the X location and 0 for the Y location and 0 for the Z location. This places the center of the center element at the origin. On the Rectangular Cell Lattice Panel, click Next.
Figure 10-23 Define Pitch and Number of Rows Type 50 for the Horizontal Pitch. Type 50 for the Vertical Pitch. Type 100 for the Axial Pitch.
On the Cell Lattice Panel, Click Register. The Visual Editor will be creating the six surfaces for the lattice of the cell in this example using the previously specified center and (+ or -) half the value of each of the three pitches. Also, after entering the row information, the fill matrix will appear at the bottom of the window initially containing all zeros with the appropriate number of elements in each direction. The Fill Indices values also are created giving the minimum and maximum indices in each direction of the lattice. The order in this MCNP fill matrix is with the first dimension varying most rapidly (first index across the window, which is x in the example), the second dimension varying next rapidly (second index going down the window, which is y in the example) and the axial dimension varying least rapidly (third index, which is z in the example). For this example, the first group of 25 elements at the top is for the minimum z dimension from z=-150 to z=-50, the second group of 25 elements is the middle z [-50 to 50] and the bottom group of 25 elements is for the maximum z dimension from z=50 to 150; i.e., the MCNP input of the fill matrix (and the Visual Editor fill matrix shown on the window) begins at the top with the minimum z, etc. The plot of the lattice will be inverted axially compared to the input file. The input file lists the axial lattice elements from bottom to top. The visual editor also lists axial lattice elements from bottom to top. Initially these three sets of 25 lattice elements in the fill matrix are displayed as 0s. Universe values can be set in the lattice by selecting different parameters using the various Select options and then setting the universe value using the Change Universe Value Here text box.
On the Cell Panel, Click Scan On the Cell Panel, Type 3 for the Cell Number On the Cell Panel, Click Edit The columns have indices from -2 to 2. To select the far right column, type 2 in the Select I Index box.
Click the Select I Index Button.
Notice that the far right row is selected in the display below.
Type 3 in the Change Universe Value Here box. Notice that the universe in those cells becomes 3. Deselect the Select I Index button.
Verify that the box by Select Universe is blank or has a zero in it. This will select all elements that have a zero as their universe.
Click the Select Universe button. Type 5 in the Change the Universe Value Here box. Verify that all the cells now have universe 5 assigned to them. Click Register.
On the Main Menu, Click Input. On the Input Window, Click SaveUpdate. The Visual Editor will warn you that cells with Universe = 3 and Universe = 5 do not exist yet. They will be created next. Close the Input Window. The Visual Editor creates the six surfaces required to create the lattice and will create the lattice cell with its fill matrix when register is selected. The Visual Editor defines the surface order pairs on the lattice cell card for each dimension to be surface with largest dimension first followed by surface with minimum dimension, where the average of these two dimensions is the input center value for that dimension. This order then defines the order of the fill matrix Page 128 of 288
MCNP Visual Editor Manual for that index to be from minimum to maximum along that dimension in the lattice. The first index (first pair of surfaces with default being x) is the most rapidly varying in the fill matrix, etc.
Add the Materials
On the Main Menu, Click on DataMaterials On the Materials Panel, Click on Library. On the Material Library, Click on Beryllium metal.
Click on Add.
On the Main Menu, Click Surface. On the Surface Panel, Click SurfacesSphereso.
Type 10 in the Radius (R) box. Click Register. Type 20 in the Radius (R) box. Click Register. Close the Surface Panel.
Figure 10-28 Creating Universe 3 Drag across the inner sphere as indicated in Figure 10-28.
On the Cell Panel, Click Paste. On the Cell Panel, type 3 in the universe box. On the Cell Panel, Click the Material button and select Beryllium.
Click Register.
Figure 10-29 Outside World for Universe 3 Drag across the sphere as indicated in Figure 10-29.
On the left plot window, click inside the sphere as shown in Figure 10-29. On the Cell Panel, Click on Cut. On the Cell Panel, Type 3 in the universe box to assign this cell to universe 3.
Click Register.
Similar to the creation of Universe 3, drag across the spherical surface as indicated in Figure 10-30. On the Left Plot window, Click inside the sphere to establish the point (surface sense). On the Cell Panel, Click Paste. On the Cell Panel, type 5 in the universe box. On the Cell Panel, Click the Material button and select Aluminum.
Click Register. Drag across the surface of one of the larger spheres.
On the left plot window, click inside the sphere. On the Cell Panel, Click Cut. On the Cell Panel, type 5 in the universe box.
Click Register. Close the Cell Panel.
On the Main Menu, Click Input. On the Input window, Click SaveUpdate.
MCNP Visual Editor Manual The cell 3 card with its fill matrix and the six surface cards that were created should appear in the Input window listing of the input file after register. You can also see the lattice displayed in the (x,z) and (x,y) plots. The input file as is shown below.
c 1 2 3 Created on: Wednesday, September 27, 2006 at 12:33 0 -5 2 -1 6 -3 4 fill=9 0 5 :-2 :1 :-6 :3 :-4 0 -7 8 -9 10 -11 12 u=9 lat=1 $ROW 1 fill=-2:2 -2:2 -1:1 5 5 5 5 3 $ROW 1 5 5 5 5 3 $ROW 2 5 5 5 5 3 $ROW 3 5 5 5 5 3 $ROW 4 5 5 5 5 3 $ROW 5 5 5 5 5 3 $ROW 1 5 5 5 5 3 $ROW 2 5 5 5 5 3 $ROW 3 5 5 5 5 3 $ROW 4 5 5 5 5 3 $ROW 5 5 5 5 5 3 $ROW 1 5 5 5 5 3 $ROW 2 5 5 5 5 3 $ROW 3 5 5 5 5 3 $ROW 4 5 5 5 5 3 $ROW 5 212 -1.85 -13 u=3 0 13 u=3 208 -2.699 -14 u=5 0 14 u=5 px px py py pz pz px px py py pz pz so so N 4009.60c 13027.60c 124.99 -124.99 124.99 -124.99 149.99 -149.99 25 -25 25 -25 50 -50 10 20 -1 -1 $beryllium metal $aluminum
To make this a file that can be run in MCNP, add the following lines after the mode line:
imp:n print sdef 1 0 1 1 1 1 1 1 x=15. y=0 z=0
On the Left Plot Window, click the Color checkbox to turn on color plots. On the Right Plot Window, click the Color checkbox to turn on color plots. Figure 10-31 shows the resulting file.
10.2.3
The example of Section 10.2.2 assumed the (0,0,0) lattice element was at the origin which simplifies the input file. There are many instances where that is not possible. A very common occurrence is when there are an even number of lattice elements as shown below.
Figure 10-32 shows a rectangular lattice with four elements in x and y and three elements in z. Because there is an odd number of elements, the lattice is not centered inside the bounding box. To be centered, the center of the (0,0,0) element must be moved to the top right corner.
Start the Visual Editor.
Click on FileOpen and select the isqulat21 input file. On the Main Menu, Click on Update Plots. On both plot windows, change both extents to 160. On the main menu, Click Input to display the input file. This input file is identical to the input file used in the exercise in Section 10.2.2 with the following exceptions:
MCNP Visual Editor Manual The dimensions of the lattice are 4x4x3 rather than 5x5x3. Because of this, the fill indices are now -1:2 rather than -2:2 in the x direction. The same is true in the y direction. The dimensions of the bounding box are changed from approximately 250x250x300 to approximately 200x200x300. This change was made so that a four element array would fill the box without adjusting the pitch. The spheres of beryllium and aluminum kept the same radius and center but are represented as an s surface with four parameters rather than a so surface. This was done to simplify moving the center point off the origin in the discussion to follow.
Created on: Tuesday, October 03, 2006 at 09:31 0 -5 2 -1 6 -3 4 fill=9 0 5 :-2 :1 :-6 :3 :-4 0 -7 8 -9 10 -11 12 u=9 lat=1 $ROW 1 fill=-1:2 -1:2 -1:1 5 5 5 3 $ROW 1 5 5 5 3 $ROW 2 5 5 5 3 $ROW 3 5 5 5 3 $ROW 4 5 5 5 3 $ROW 1 5 5 5 3 $ROW 2 5 5 5 3 $ROW 3 5 5 5 3 $ROW 4 5 5 5 3 $ROW 1 5 5 5 3 $ROW 2 5 5 5 3 $ROW 3 5 5 5 3 $ROW 4 212 -1.85 -13 u=3 0 13 u=3 208 -2.699 -14 u=5 0 14 u=5 px px py py pz pz px px py py pz pz s s 99.9 -99.9 99.9 -99.9 149.9 -149.9 25 -25 25 -25 50 -50 0 0 0 10 0 0 0 20 -1 -1 0 $beryllium metal $aluminum 1 4r $ 1, 7
4 5 6 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14
mode N m212 4009.60c m208 13027.60c imp:N 1 print sdef x=15 y=0 z=0 nps 1000
MCNP Visual Editor Manual For this lattice with an even number of elements, the center of the (0,0,0) element must be moved to the upper right corner (in x and y). To move the center of the (0,0,0) element after the lattice has already been created, the surfaces defining the lattice must be moved by half the width of the lattice element. In this case, because the pitch is 50, surfaces 7 through 10 must have 25 subtracted from them. Surfaces 11 and 12 do not need to be modified because the lattice is only being moved in x and y. In the Input window, make the following changes.
Change surface 7 to: px 0 Change surface 8 to: px -50 Change surface 9 to: py 0 Change surface 10 to: py -50
The lattice has moved but the inner spheres have not. They also need to be translated. To move the inner spheres, make the following changes:
Change surface 13 to: s -25 -25 0 10
This changes the center point for the sphere to a point at (-25, -25, 0) which is the new center of lattice element (0,0,0). On the Input Window, Click SaveUpdate
Figure 10-34 shows the lattice with the spheres properly repositioned.
MCNP Visual Editor Manual A hexagonal lattice is created by selecting Hexagonal Lattice from the Cell Panel. Figure 10-35 shows the cell panel with the hexagonal lattice option selected.
Figure 10-36 shows the two panels for lattice creation. The first panel is on the left and allows the user to choose the type of hexagonal lattice and to select the center for the (0,0,0) element. The second panel further defines the lattice as follows. Lattice surfaces: shows six blanks where the surfaces that bound the (0,0,0) element would be entered. The visual editor will create these automatically. Center-to-center pitch values: specifies the distance in centimeters from the center of the (0,0,0) element to the center of the next element in the hex and axial direction respectively. Number of rows in each direction: specifies the number of hex and axial rows respectively. The number of rows must be large enough to completely fill the cell that bounds the lattice. If there are lattice elements that are not filled, a run-time error will occur when MCNP is run. A grid of elements will appear below once these numbers are entered. Fill Indices (See Section 10.1.1)
MCNP Visual Editor Manual universe number of the lattice. In the example in Section 10.4.1, the lattice will be universe 1. The number 1 is entered in the Fill box. 3. Create the lattice cell. Choose the lattice type and enter the pitch, number of rows and columns. The example in Section 10.4.1, explains this in detail. 4. To place something inside the lattice cells, specify which universe will go inside the lattice elements. In the example in Section 10.4.1, they are all filled with universe 2 which is defined later to be a cylinder. 5. Create the universe that will go inside the lattice elements. In the example in Section 10.4.1, this involves creating a cylindrical surface and then creating cells that are the outside and the inside of the cylinder. This basically specifies a cylinder and an outside world. The outside world is truncated at the boundary of the lattice elements (the lattice walls cut it off). There is an optional calculation of the pitch of the hexagonal lattice under Calculators on the second lattice window assuming fuel rods in water and a specified water to fuel area ratio. There is also an optional calculation of the number of rows required in the hexagonal lattice for a specified cylinder boundary.
10.4.1
This example will create a two dimensional hexagonal lattice inside a sphere. Inside the lattice elements is a cylinder.
On the Main Menu, Click on Surface. The default surface is a sphere at the origin. This is the desired surface type. Type 80 in the radius box to create a surface of radius 80. On the Surface Panel, Click Register.
Close the Surface Panel.
On the Left Plot Window, drag across the surface as indicated by the dashed line in Figure 10-38. On the Left Plot Window, click outside the sphere to establish the point. This will determine the sense for the surface for that cell. On the Cell Panel, Click Paste. On the Cell Panel, Click Register. Similarly, drag (again) across the surface as indicated by the dashed line in Figure 10-38 Creating the Outer world.. On the Left Plot Window, click INSIDE the sphere to establish the point. On the Cell Panel, Click Paste. The inside of the sphere will hold the lattice. The lattice will be Universe = 1. For the inside of the sphere to hold the lattice, it must be given a fill of one. On the Cell Panel, type 1 in the Fill text box. On the Cell Panel, Click Register. Page 142 of 288
Figure 10-40 Choose a 2D XY Hex with two PX Planes Choose a 2D XY Hex lattice with two PX Planes. Type 0 in the x location box. Type 0 in the y location box. This will set the center of the center element at the origin. Choose Next from the menu at the top of the Hex Cell Lattice Panel.
Figure 10-41 Lattice Parameters Type 20 for the Hex Pitch. This will define the number of centimeters from the center of one element to the center of the next. Type 7 for Hex Rows. Click the Select Universe button to select all lattice entries with a zero universe. In this case, that is all the lattice entries.
In the CHANGE THE UNIVERSE VALUE HERE text box, type 2. This will fill the lattice with universe 2 which has not been created yet. On the Cell Lattice Panel, Click Register.
Close the Cell Lattice Panel if it does not close automatically.
On the Main Menu, Click SurfaceCylindercz. In the radius box, type 8. On the Surface Panel, click Register.
Close the Surface Panel.
Create the cell that is the INSIDE of the cylinder. Adjust the basis so the lattice is visible on the XZ plot. Type 0.001 in the y component for the second basis vector. See Figure 10-43. On the Main Menu, Click on Cell. On the Left Plot Window, drag across the surface of the cylinder as indicated in Figure 10-43.
Click INSIDE the cylindrical surface to set the point that will determine the sense of the cylindrical surface is inside the cylinder.
On the Cell Panel, in the Universe box, type 2. This will add this cells definition to universe 2. On the Cell Panel, Click on Paste. On the Cell Panel, Click on Register. Create the cell that is the OUTSIDE of the cylinder. On the Left Plot Window, drag across the surface of the cylinder as indicated in Figure 10-43.
Click INSIDE the cylindrical surface to set the point that will determine the sense of the cylindrical surface is inside the cylinder.
MCNP Visual Editor Manual On the Cell Panel, in the Universe box, type 2. This will add this cells definition to universe 2. On the Cell Panel, Click on Cut. (Note that this is Cut and not Paste) This essentially creates an outside world for universe 2. The cell will be cut off at the boundaries of the lattice. On the Cell Panel, Click on Register.
10.4.2
The following discussion is for a lattice example that illustrates the use of the most common features in the window for creating a hexagonal lattice. The example shown here is for a hexagonal lattice in the (x,y) plane with three axial lattice intervals along z. The center of the MCNP lattice element, element (0,0,0), is at the origin, which is often desired for an odd number of lattice elements in each direction along the (x,y) plane.
Figure 10-46 Creating Surfaces for the Cell that Holds the Lattice. Start the Visual Editor.
On the Main Menu, Click on Surface. On the Surface Panel, click on Surfacecz. In the R (radius) box, type 140.
Click Register.
On the Left Plot Window, click on the Surf checkbox to show Surface numbers. On the Right Plot Window, click on the Surf checkbox to show Surface numbers.
Drag across the surfaces as indicated in Figure 10-47. Click inside the box created by the surfaces to define the point that will determine the sense of the surfaces.
On the Cell Panel, Click on Cut. (the area inside the cube is cut away rather than pasted)
On the Cell Panel, Change the Mode to Scan. On the left plot window, Click inside the cylinder. On the Cell Panel, Change the Mode to Edit.
Type 9 in the Fill box as indicated in Figure 10-48. Click Register.
Figure 10-49 Creating the Lattice Cell Create the Lattice Cell
On the Cell Panel, Type 9 in the Universe box. On the Cell Panel, Choose Hexagonal Lattice. On the First Panel of the Lattice Wizard, Choose 3D XY Hex lattice with the axial direction in Z with two PX planes. For the center of the (0,0,0) Lattice element, enter 0 for the X location and 0 for the Y location and 0 for the Z location. This places the center of the center element at the origin. On the Hex Cell Lattice Panel, click Next.
Figure 10-50 Define Pitch and Number of Rows Type 50 for the Hex Pitch. Type 100 for the Axial Pitch. Type 4 for Hex Rows. Type 3 for Axial Rows.
MCNP Visual Editor Manual The Visual Editor will create the eight surfaces for the lattice of the cell in this example using the previously specified center and (+ or -) half the value of each of the three pitches. Also, after entering the row information, the fill matrix will appear at the bottom of the window initially containing all zeros with the appropriate number of elements in each direction. The Fill Indices values also are created giving the minimum and maximum indices in each direction of the lattice. The order in this MCNP fill matrix is with the first dimension varying most rapidly (first index across the window, which is x in the example), the second dimension varying next rapidly (second index going down the window, which is y in the example) and the axial dimension varying least rapidly (third index, which is z in the example). For this example, the first group of 49 elements at the top is for the minimum z dimension from z=-150 to z=-50, the second group of 49 elements is the middle z [-50 to 50] and the bottom group of 49 elements is for the maximum z dimension from z=50 to 150; i.e., the MCNP input of the fill matrix (and the Visual Editor fill matrix shown on the window) begins at the top with the minimum z, etc. The plot of the lattice will be inverted axially compared to the input file. The input file lists the axial lattice elements from bottom to top. The visual editor also lists axial lattice elements from bottom to top. Initially these three sets of 49 lattice elements in the fill matrix are displayed as 0s. Universe values can be set in the lattice by selecting different parameters using the various Select options and then setting the universe value using the Change Universe Value Here text box.
On the Cell Panel, Click Scan On the Cell Panel, Type 3 for the Cell Number On the Cell Panel, Click Edit
Type 1 3 (be sure to put a space between the 1 and the 3) in the Select Rows box. Click the Select Rows Button.
Notice that the center three rows have been selected in the display below.
Type 3 in the Change Universe Value Here box. Notice that the universe in those cells becomes 3. Deselect the Select Rows button.
Verify that the box by Select Universe is blank or has a zero in it. This will select all elements that have a zero as their universe.
Click the Select Universe button. Type 5 in the Change the Universe Value Here box. Verify that all the cells now have universe 5 assigned to them. Click Register.
The Visual Editor will warn you that cells with Universe = 3 and Universe = 5 do not exist yet. They will be created next. Close the Input Window.
Close the Cell Window.
The Visual Editor creates the eight surfaces required to create the lattice and will create the lattice cell with its fill matrix when Register is selected. To properly see the lattice displayed in the xz plot, it is necessary to tilt the basis slightly. At the top of the left plot window, adjust the y component of the z vector to be 0.001. At the top of the left plot window, adjust the z component of the z vector to be 0.9999. On the left plot window, click Update.
On the Main Menu, Click on DataMaterials On the Materials Panel, Click on Library. On the Material Library, Click on Beryllium metal.
Click on Add.
On the Main Menu, Click Surface. On the Surface Panel, Click SurfacesSphereso.
Type 10 in the Radius (R) box. Click Register. Type 20 in the Radius (R) box. Click Register. Close the Surface Panel.
Figure 10-56 Creating Universe 3 Drag across the inner sphere as indicated in Figure 10-56. Click inside the sphere to establish the point.
On the Cell Panel, Click Paste. On the Cell Panel, type 3 in the universe box. On the Cell Panel, Click the Material button and select Beryllium.
Click Register.
Figure 10-57 Outside World for Universe 3 Drag across the sphere as indicated in Figure 10-57.
On the left plot window, click inside the sphere as shown in Figure 10-57. On the Cell Panel, Click on Cut. On the Cell Panel, Type 3 in the universe box to assign this cell to universe 3.
Click Register.
Similar to the creation of Universe 3, drag across the spherical surface as indicated in Figure 10-58. On the Left Plot window, Click inside the sphere to establish the point (surface sense). On the Cell Panel, Click Paste. On the Cell Panel, type 5 in the universe box. On the Cell Panel, Click the Material button and select Aluminum.
Click Register. Drag across the surface of one of the larger spheres.
On the left plot window, click inside the sphere. On the Cell Panel, Click Cut. On the Cell Panel, type 5 in the universe box.
Click Register. Close the Cell Panel.
MCNP Visual Editor Manual On the Input window, Click SaveUpdate. The cell 3 card with its fill matrix and the eight surface cards that were created should appear in the Input window listing of the input file after register. You can also see the lattice displayed in the (x,z) and (x,y) plots. The input file as is shown below.
-c 1 2 3 Created on: Thursday, October 05, 2006 at 12:13 0 -2 -1 3 fill=9 0 2 :1 :-3 0 -4 5 -6 7 -8 9 -10 11 u=9 lat=2 $ROW 1 fill=-3:3 -3:3 -1:1 5 5 5 5 5 5 5 $ROW 1 5 5 5 3 3 3 5 $ROW 2 5 5 3 3 3 3 5 $ROW 3 5 3 3 3 3 3 5 $ROW 4 5 3 3 3 3 5 5 $ROW 5 5 3 3 3 5 5 5 $ROW 6 5 5 5 5 5 5 5 $ROW 7 5 5 5 5 5 5 5 $ROW 1 5 5 5 3 3 3 5 $ROW 2 5 5 3 3 3 3 5 $ROW 3 5 3 3 3 3 3 5 $ROW 4 5 3 3 3 3 5 5 $ROW 5 5 3 3 3 5 5 5 $ROW 6 5 5 5 5 5 5 5 $ROW 7 5 5 5 5 5 5 5 $ROW 1 5 5 5 3 3 3 5 $ROW 2 5 5 3 3 3 3 5 $ROW 3 5 3 3 3 3 3 5 $ROW 4 5 3 3 3 3 5 5 $ROW 5 5 3 3 3 5 5 5 $ROW 6 5 5 5 5 5 5 5 $ROW 7 212 -1.85 -12 u=3 0 12 u=3 208 -2.699 -13 u=5 0 13 u=5 cz pz pz px px p p p p pz pz so so 140 149.99 -149.99 25 -25 0.5 0.86602540378444 0 25 0.5 0.86602540378444 0 -25 -0.5 0.86602540378444 0 25 -0.5 0.86602540378444 0 -25 50 -50 10 20 -1 -1 0 $aluminum $beryllium metal 1 4r $ 1, 7
4 5 6 7 1 2 3 4 5 6 7 8 9 10 11 12 13
mode N m208 13027.60c m212 4009.60c imp:N 1 print sdef x=50 y=0 z=0 nps 1000
MCNP Visual Editor Manual To make this a file that can be run in MCNP, add the following lines after the mode line:
imp:n print sdef 1 0 1 1 1 1 1 1 x=50. y=0 z=0
Make sure there is a blank line at the end. On the Input Window, Click SaveUpdate.
On the Left Plot Window, click the Color checkbox to turn on color plots. On the Right Plot Window, click the Color checkbox to turn on color plots. Figure 10-59 shows the resulting file.
10.4.3
The example of Section 10.4.2 assumed the (0,0,0) lattice element was at the origin so in the above listing surfaces 4 and 5, 6 and 7, 8 and 9, 10 and 11 were created by the Visual Editor Page 164 of 288
MCNP Visual Editor Manual symmetric about the origin. This is often desired when the center of the lattice is the origin of the local universe being filled with this lattice. The spheres of surfaces 11 and 12 were centered about the origin because of this choice.
Figure 10-60 shows a hexagonal lattice with six elements across the x axis. Because there is an even number of elements, the lattice is not centered inside the bounding cylinder. To be centered, the center of the (0,0,0) element must be moved to the right side of the hexagon.
Start the Visual Editor.
Click on FileOpen and select the ihexlat3 input file. On the Main Menu, Click on Update Plots. On both plot windows, change both extents to 175.
On the Left plot window, change the lower basis vector to be 0.01 in y and 0.999 in z. On the main menu, Click Input to display the input file. This input file is identical to the input file used in the exercise in Section 10.4.2 with the following exceptions: This lattice has 5 hexagonal rows rather than 4. Both have 3 axial rows. Because of this, the fill indices are now -4:4 rather than -3:3 in the x direction. The same is true in the y direction. Page 165 of 288
MCNP Visual Editor Manual The radius of the bounding cylinder was changed from 140 to 170. This was necessary to accommodate the larger lattice. The spheres of beryllium and aluminum kept the same radius and center but are represented as an sx surface with two parameters rather than a so surface. This was done to simplify moving the center point off the origin in the discussion to follow.
Created on: Thursday, October 05, 2006 at 12:13 0 -2 -1 3 fill=9 0 2 :1 :-3 0 -4 5 -6 7 -8 9 -10 11 u=9 lat=2 $ROW 1 fill=-4:4 -4:4 -1:1 5 5 5 5 5 5 5 5 5 $ROW 1 5 5 5 5 5 3 3 3 5 $ROW 2 5 5 5 5 3 3 3 3 5 $ROW 3 5 5 5 3 3 3 3 3 5 $ROW 4 5 5 3 3 3 3 3 3 5 $ROW 5 5 5 3 3 3 3 3 5 5 $ROW 6 5 5 3 3 3 3 5 5 5 $ROW 7 5 5 3 3 3 5 5 5 5 $ROW 8 5 5 5 5 5 5 5 5 5 $ROW 9 5 5 5 5 5 5 5 5 5 $ROW 1 5 5 5 5 5 3 3 3 5 $ROW 2 5 5 5 5 3 3 3 3 5 $ROW 3 5 5 5 3 3 3 3 3 5 $ROW 4 5 5 3 3 3 3 3 3 5 $ROW 5 5 5 3 3 3 3 3 5 5 $ROW 6 5 5 3 3 3 3 5 5 5 $ROW 7 5 5 3 3 3 5 5 5 5 $ROW 8 5 5 5 5 5 5 5 5 5 $ROW 9 5 5 5 5 5 5 5 5 5 $ROW 1 5 5 5 5 5 3 3 3 5 $ROW 2 5 5 5 5 3 3 3 3 5 $ROW 3 5 5 5 3 3 3 3 3 5 $ROW 4 5 5 3 3 3 3 3 3 5 $ROW 5 5 5 3 3 3 3 3 5 5 $ROW 6 5 5 3 3 3 3 5 5 5 $ROW 7 5 5 3 3 3 5 5 5 5 $ROW 8 5 5 5 5 5 5 5 5 5 $ROW 9 212 -1.85 -12 u=3 0 12 u=3 208 -2.699 -13 u=5 0 13 u=5 cz pz pz px px p p p p pz pz sx sx N 13027.60c 170 149.99 -149.99 25 -25 0.5 0.86602540378444 0 25 0.5 0.86602540378444 0 -25 -0.5 0.86602540378444 0 25 -0.5 0.86602540378444 0 -25 50 -50 0 10 0 20 -1 $aluminum
4 5 6 7 1 2 3 4 5 6 7 8 9 10 11 12 13 mode m208
To center the lattice, the center point of the (0,0,0) element must be moved so it is on the right edge of the current lattice. This involves translating the lattice center point by translating the six lattice surfaces and the center points of the spheres inside it by half the pitch of the lattice element. In this example, the pitch is 50 so the lattice must slide 25 centimeters to the left so that the lattice center is now on surface 4.
Slide surface 4 to the left by 25 centimeters so that it now goes through the center of the lattice. Change surface 4 such that it is: px 0 Similarly, surface 5 must slide to the left by 25 centimeters. It is now 50 centimeters from the center of the lattice rather than 25.
Change surface 5 such that it is: px-50
Translating the general planes to the left is more complicated. The format of the general plane card is: p A B C D Page 167 of 288
MCNP Visual Editor Manual A, B, and C are the components of a (normalized) normal vector to the plane. These vectors are shown in Figure 10-62 as dark arrows. The A, B, C, and D parameters for each surface are shown next to the surface in Figure 10-62. Because the plane is only sliding to the left and there is no change in rotation, A, B, and C stay the same. D is the perpendicular distance from the plane to the origin (lattice center). Sliding the (0,0,0) element will change this parameter. Surfaces 4, 6, and 9 will be closer to the origin. Surfaces 5, 7, and 8 will be farther from the origin. Currently, the card for surface 6 is: p 0.5 0.8660 0 25 In this card, D=25. To translate this surface to the left by 25 centimeters, we take the dot product of the translation vector and the normal. This is added to the original value for D. The translation vector is (-25, 0, 0) which is a vector pointing left with a magnitude of 25 centimeters. The vector for the normal of surface 6 is given by the A, B, and C parameters or (0.5, 0.866, 0).
A B = (0.5,0.866,0 ) ( 25,0,0 ) = 12.5
To calculate the new D value, add this to the current D value. Dnew=Dold + AB = 25 -12.5 = 12.5
Change surface 6 such that it is: p 0.5 0.86602540378444 0 12.5
For surface 7,
A B = (0.5,0.866,0 ) ( 25,0,0 ) = 12.5
To calculate the new D value, add this to the current D value. Dnew=Dold + AB = -25 -12.5 = -37.5
Change surface 7 such that it is: p 0.5 0.86602540378444 0 -37.5
For surface 8,
A B = ( 0.5,0.866,0 ) ( 25,0,0 ) = 12.5
To calculate the new D value, add this to the current D value. Dnew=Dold + AB = 25 +12.5 = 37.5
Change surface 8 such that it is: p -0.5 0.86602540378444 0 37.5
For surface 9,
A B = ( 0.5,0.866,0 ) ( 25,0,0 ) = 12.5
To calculate the new D value, add this to the current D value. Dnew=Dold + AB = -25 +12.5 = -12.5
Change surface 9 such that it is: p -0.5 0.86602540378444 0 -12.5
MCNP Visual Editor Manual Surfaces 10 and 11 do not change because the lattice is not being moved in the axial (z) direction. Surface 12 defines one of the spheres in the lattice elements. It is shown as an sx surface. To shift it to the left by 25 cm change the x intercept (the first parameter) to -25.
Change surface 12 to be: sx -25 10
Similarly, change surface 13 to be: sx -25 20 On the Input Window, Click SaveUpdate. On the Main Menu, Click Update Plots.
11.0 Materials
Figure 11-1 shows a plot of the Materials window and the associated Material Library window and Isotope Selection window. The Visual Editor has both standard and user libraries for either neutrons or photons (see Sections 11.5 and 11.6). The standard libraries are made available to all Visual Editor users. They consist of predefined material numbers, where each material number has the associated pairs of a ZAID (identifying the MCNP cross section set to use) and the associated mass or gram relative concentration. The user libraries are created and modified by the individual user according to his specific needs. They have the same format as the standard libraries, but the user defines the material numbers subject to the constraint that they must be different than the material numbers used in the corresponding standard library. This allows users to store their commonly used materials in a file that can be accessed by the Visual Editor. It is possible to move materials from the input file to the user library and from either the standard or user library to the current input file. The various material windows allow the user to select a material from a (standard or user) library or to modify such a selected material or to conveniently create his own material to be used in the input file as described in the following Sections.
MCNP Visual Editor Manual this menu does not show up, then your MCNP DATAPATH Environment Variable or your vised.defaults file is not valid. Click on an isotope, to bring up the available cross section sets for the isotope. Choose the appropriate cross section set by clicking on it with the mouse. When you do this, that cross section set ZAID (ID) will appear under Isotope in the Isotope Description portion of the Materials window. Enter the mass fraction or atom fraction for that isotope in the material being created in the adjacent Fraction box. Then select Add to add this isotope/fraction pair to the material description, and they will appear in the material description box below the Add. Repeat this for the other isotopes in the material. Then select Register to create the material and add it to the input file. At any time during the new material creation you can change these isotope/fraction pairs, by clicking on the pair to change. Notice that the Edit check box is set with this click, indicating that you are in edit mode. Change either the isotope or fraction. To get out of edit mode and create additional isotope/fraction pairs, you must unselect the Edit check box.
11.1.1
Figure 11-2 Create the Hydrogen Isotope in Water (H2O) Start the Visual Editor. Click on DataMaterials. Verify that Create New Material Mode button is selected. It is the default.
A number 1 should already be in the Material Number box. If not, type 1 in the Material Number Box. Page 171 of 288
The first ZAID will be for the Hydrogen component of H2O. In the Material Library window, Click on 1. Hydrogen.
Click on 1001. Click on 1001.60c.
On the Material Panel, notice that the number 1001.60c has been entered in the box next to the Isotope button. In the fraction box, type 2 because there are two hydrogen atoms in H2O. The 2 is positive because an atom fraction is used. If a gram fraction were to be used, the number would be negative and the entry would be -0.111915 for the fraction of hydrogen.
Click on Add. The Isotope pair appears in the box below.
The second ZAID will be for the Oxygen component of H2O. In the Material Library window, Click on 8. Oxygen.
Click on 8016. Click on 8016.60c.
On the Material Panel, notice that the number 8016.60c has been entered in the box next to the Isotope button. In the fraction box, type 1 because there is one oxygen atom in H2O. The 1 is positive because an atom fraction is used. If a gram fraction were to be used, the number would be negative and the entry would be -0.888085 for the fraction of oxygen.
Click on Add. The Isotope pair appears in the box below. Click on Register.
The material Water appears in the material list at the top of the material panel.
MCNP Visual Editor Manual either the isotope or fraction or delete the isotope by pressing the Delete button. To get out of edit mode and enable the create mode to add additional isotope/fraction pairs, un-check the Edit check box.
Figure 11-3 Select Files to set the location of the material library and xsdir files
There are four types of material files that need to be specified in the File Locations window:
stndrd.n: Standard material file containing neutron cross section ZAIDs and relative densities that is available for all users. stndrd.p: Standard material file containing photon cross section ZAIDs and relative densities that is available for all users. usr.n: User specific material file containing neutron cross section ZAIDs and relative densities for the individual user. usr.p: User specific material file containing photon cross sections ZAIDs and relative densities for the individual user.
Typically the stndrd.n and stndrd.p files are generated for a group of people to contain a set of commonly used materials. It is a good idea to keep these files in a central location, perhaps in the same directory where you store your MCNP executable. These files should be distributed with the Visual Editor executable. Page 174 of 288
MCNP Visual Editor Manual The usr.n and usr.p files are created the first time you move materials (using the Store button on the Materials window) from your input file to the library. These files are updated with each subsequent Store, and are retained after you are though with the current input file provided you select Save on the Material Library window before leaving the Visual Editor. After entering the full path names for these files (see Figure 11-3), select the Apply menu option and a vised.defaults file will be created. The Visual Editor will read this file each time you start it up. This file must be in the same directory as the Visual Editor executable so the Visual Editor can find it.
11.6.1
In the Material Library Panel window, click on aluminum. On the Material Library Panel menu, click on Add. In the Material Panel, verify that aluminum now appears as a material that may be selected in the material list at the top of the panel.
12.0 Importances
You can set importances by choosing DataImportances from the main menu. From this Window, the importance for your problem can be set by selecting cells directly from the plot window and then setting their importance values. Figure 12-1 shows a plot of the importance window. The mode is first selected for the particle type for which the importance is being set (Photon in the example of Figure 12-1).
Figure 12-2 Particle Track Plot of Three Lead Slabs with Importance of 1
When the importances are modified to a geometric progression, the particle track plot is as displayed in Figure 12-3.
Figure 12-3 Particle Track Plot of Three Lead Slabs with Importances of 1, 8, and 64
The cell can be chosen by clicking on the cell number in the Importance panel or by clicking on the cell in the plot window.
MCNP Visual Editor Manual 9. Click in Cell 5 on the left plot window. 10. Type 64 in the Set Importance Check box. 11. Click on Register.
MCNP Visual Editor Manual 12. Change the Display to Powers of 2 and note that the importances on cells 4 and 5 change from 8 and 64 to 3 and 6.
13.0 Transformations
Transformations are a useful way to create copies of existing cells or to simplify the creation of rotated cells. Figure 13-1 shows a 40 cm cube centered at the origin and a second cube with its origin offset by 60 cm in the X and Y directions. The surfaces that bound the cell only need to be created once. The new created surfaces are given surface numbers equal to 1000 times the cell number plus the original surface number. The surface in the transformed cell that matches surface one has a surface number of 2001
To create or modify transformations, select DataTransformations from the main menu. The transformation window provides spaces to enter the elements of the transformation. When the correct coordinates have been entered, select Register to create the transformation and update the FORTRAN memory. This process may be repeated as many times as necessary for subsequent transformations. Figure 13-2 shows a view of the transformation window. The Origin button indicates if the rotation is relative the main axis or the axis being transformed to. The Units button indicates the units for the values in the rotation matrix, the default is Degrees, but this can be changed to Cosine Theta in this box. For more information on the Origin and Rotation Units options, refer to the MCNP manual.
Figure 13-3 Create a Transformation with 60 cm offset in X and Y Click on Data on the Main Menu and Select Transformation. Type 60 in the X Offset and 60 in the Y Offset and Click on Register. The transformation appears as Transformation 1 in the list at the bottom of the Transformations Panel. Click on Cell on the Main Menu to open the Cell panel. Click on Scan. Click in the cube centered at the origin. Click on Create Like on the Cell Panel.
To rotate about the Z axis, advance the X axis by 45 degrees, Type 45 in the X-X box. Advancing the X axis with respect to the original will mean that is will now be 45 degrees behind the original Y axis rather than 90 degrees behind it as it was in the start. Page 186 of 288
The Z axis will not change nor will the angle between it and the modified X axis so it remains 90 degrees which is the default (identity) value.
Type 90 in the Z-X box. Click on Register. Click on Update Plots on the Main Menu.
If the plot does not refresh correctly, Click on Input on the Main Menu to open the Input window and then click on Save-Update to refresh the memory and then Click on Update Plots.
This feature can be used to combine two input files into a larger combined input file, by renumbering the surfaces and cells of one of the input file in a range that will be beyond the maximum surface and cell number in the other input file. For example, if each of the input files contains 100 cells and 100 surfaces, the user could renumber the first input file starting with cell number 1 and surface number 1 and perhaps renumber the second input file starting at cell number 500 and surface number 500. The files could then be combined without the surface numbers conflicting between the two files. Additional work will need to be done by the user to make sure the cells, such as the outside world, do not doubly define space. The data cards will also need to be adjusted by the user to reflect the new cell and surface numbers.
To run an input file, enter the name of the input file and optionally the output file and other files involved in the run, then select Run from the menu to run the problem. This will run the MCNP that is compiled as part of the Visual Editor, it does not run the MCNP that you may have installed outside of the Visual Editor. A valid copy of the xsdir file is required to run files in the Page 189 of 288
MCNP Visual Editor Manual Visual Editor just like it is needed for running a normal MCNP input file. As the problem is running the number of particles run (NPS) and the amount of time used (CTIME) in the run so far is constantly updated at the top of the window. While running the problem, you can select the Stop button to gracefully stop the run. Notice that you can also enter options (i, x, r, p) that will be used for the run. Some options will not work such as the z option for plotting tallies. Instead you need to select the Tally Plots option from the main menu to do tally plots. If you select the option to overwrite existing files, the files that you specified will be removed before the run starts to prevent the file names from incrementing. The Visual Editor can also run input files from the command prompt, by typing a command line similar to that for MCNP such as vised inp=ipig outp=opig. This also allows the Visual Editor to be included in batch files. When the Visual Editor runs MCNP from the command prompt, it brings up the Visual Editor, along with the Run window and runs the input file inside the Run window. When the run is over, the Run window and the Visual Editor are closed.
For problems with an SDEF source, you can select to do a display of the source starting points by selecting the SDEF option. This will plot the starting source point locations for the file currently loaded in the Visual Editor. After reading an input file into the Visual Editor, the SDEF Source Plotting Panel has the following options: After reading an input file into the Visual Editor, the Particle Track Plotting Panel has the following options:
Current Directory: The directory of the input file currently loaded into the Visual Editor. Filename: The name of the input file currenly loaded into the Visual Editor. Particle Plotted (NPS): After plotting, this will display the number of particles plotted. Points Plotted: After plotting, this will display the number of dots on the screen. The meaning of the dots is dependent on the display setting. If the display setting is Collision, the dots represent collisions.
After doing a source plot, the number of particles successfully plotted will be displayed. This can be used to provide useful information about the source or the source biasing.
16.1.1
This example will display the source starting point in a sphere of Uranium 235.
Figure 16-3 SDEF Plot of U235 Sphere. Start the Visual Editor. Click on FileOpen and load the isdef input file. Click on Update Plots. Click on the Left Plot Window to make it the active plotting window.
Because this plot will simply show the starting point of this source based at the origin, the result will be a single dot displayed at the origin. To make the dot more visible, adjust the size of the pixel.
Set the Pixel Size to Size 5. Click on Plot_Source. A blue dot will appear at the origin of the sphere on the active window.
16.1.2
For both SDEF and KCODE problems, the Visual Editor can be used to plot particle events. The user must set the Number of Particles and the Distance from the Plot Plane (cm). Next, the events to be plotted must be selected in the Display box. Possible events include source points, surface crossings, tally contributions, and collision points. The default is to plot collision points. Finally, select Plot from the menu to run MCNP and generate the points. This does not run the MCNP on your system, but instead the MCNP that comes as part of the Visual Editor package. For particle track plotting, you can choose to only plot those collisions that lead to an eventual contribution to a tally. This can be helpful in determining how particles get to a particular tally. To activate this option, select the Tally Contributions Only check box. There is an additional option to indicate the tally number for which contributions will be plotted and another option for the Segment Number if an fs card is involved for the tally (1 for the first entry on the fs card, etc.). It is recommended that all tallies except the tally of interest be removed from the input file.
16.1.3
In particle track plotting, the colors will vary from the minimum color to the maximum color depending on the energy of the particle, depending on the energy or weight of the particle prior to collision. Every time a particle is plotted, the code will adjust the maximum and minimum values plotted so far and will change the color depending on the weight or energy of the particle. This is not very precise, since the max and min range will change as more particles are run. There are a number of different options that will set the particle color and size. The Color By option allows you to specify what the color of the point represents. For particle tracks, when color by is set to energy, the minimum color corresponds to a low energy event and the maximum color to a high-energy event. When color by is set to weight, low weight events will be the minimum color and high weight events will be the maximum color. You can set the size of the point plotted by changing the Point size. The default is to use the Pixel size, which is the smallest size, but does not show up on the printer very well. There are five other increasing larger point sizes that can be selected for displaying the points. Additionally, the Border check box can be selected to create a dark border around each of the points.
16.1.4
Getting source plotting and particle track plotting to work is easier if some guidelines are followed. Below is some advice on how to use Particle Track Plots more effectively. 1. For SDEF plotting, you are executing the source point generation routine. For plotting KCODE cycle generation points and particle tracks, the input file is run by the MCNP portion of Page 194 of 288
MCNP Visual Editor Manual the Visual Editor. Because of this, it is a good idea to make sure the input file does not have any fatal errors in the source, so run it in MCNP first. 2. If it runs in MCNP and still crashes while plotting in the Visual Editor, look at the output file (outp) and the outmc file to see if you can find any fatal errors. 3. KCODE cycle plotting and particle track plotting will fail if you are using a binary cross section set that is not consistent with the compiler that was used to compile the Visual Editor. In this case you will need to switch to an ascii cross section set or regenerate the binary cross sections in a compatible manner. 4. Make sure a valid xsdir is in the same directory as the input file being read by the Visual Editor. Since you are now running the code, the vised.defaults file will not be used to find the xsdir file. The xsdir in the directory where the Visual Editor executable is stored is not used for particle track plotting. 5. When doing KCODE cycle running using the Run option, you should not run the problem beyond the last cycle specified in cycles, since you will not be generating any new information. 6. Particle track plotting for tally contributions seems to work best if you only have the tallies of interest in the problem you are running.
16.1.5
In this example, a particle track plot will be displayed for the isdef input file.
Figure 16-4 Creating an SDEF Particle Track Plot Start the Visual Editor. Click on FileOpen and select the isdef input file. Click on Update Plots. Click on the Left Plot Window to make it the Active Window. Click on Particle DisplayPlot Particle Tracks on the Main Menu. Verify that the type of plot is Collision which is the default. Verify that the Point Size is set to Pixel which is the default. Click on Plot_Tracks on the Particle Display Panel Menu. The result should be as shown in Figure 16-4.
To illustrate the difference in the plot due to Pixel Size and to show the option to color by Weight, continue with these remaining steps.
Set the Color by option to Weight. Set the Point Size to Size 3. Change the minimum color. Change the maximum color. Click Plot on the Particle Display Menu.
MCNP Visual Editor Manual The Visual Editor does not currently have a method for entering the kcode information other than typing it in the input window. To add the kcode and ksrc lines, click Input. The syntax for the kcode line has been copied from the MCNP manual and is given below:
Form: KCODE NSRCK RKK IKZ KCT MSRK KNRM MRKP KC8 NSRCK number of source histories per cycle RKK initial guess for keff IKZ number of cycles to be skipped before beginning tally accumulation KCT number of cycles to be done MSRK number of source points to allocate storage for KNRM normalize tallies by 0=weight / 1=histories MRKP maximum number of cycle values on MCTAL or RUNTPE KC8 summary and tally information averaged over 0 all cycles 1 active cycles only Defaults: NSRCK=1000; RKK=1.0; IKZ=30; KCT=IKZ+100; MSRK=4500 or 2*NSRCK; KNRM=0; MRKP=6500; KC8=1 Use: This card is required for criticality calculations. The KCODE card specifies the MCNP criticality source that is used for determining keff.12
The syntax for the ksrc line has been copied from the MCNP manual and is give below.
Form: Default: Use: KSRC x1 y1 z1 x2 y2 z2 ... xi, yi, zi = location of initial source points None. If this card is absent, an SRCTP source file or SDEF card must be supplied to provide initial source points for a criticality calculation. Optional card for use with criticality calculations.
This card contains up to NSRCK (x,y,z) triplets that are locations of initial source points for a KCODE calculation. At least one point must be in a cell containing fissile material and points must be away from cell boundaries. It is not necessary to input all NSRCK coordinate points. MCNP will start approximately (NSRCK/number of points) particles at each point. Usually one point in each fissile region is adequate, because MCNP will quickly calculate and use the new fission source distribution.12
As an example of the use of kcode and ksrc lines, refer to the input file used in the example in Section 16.3.1 which is listed below:
c 1 2 1 mode n Created on: Tuesday, July 18, 2006 at 21:07 1 -1 -1 0 1 so 50
For the kcode line in the example, the IKZ(number of cycles skipped before beginning tally accumulation) and KCT (number of cycles to be done) options were altered. All others were left to the defaults. For the ksrc card, the location of the initial source point was placed at the origin which is the center of the defined sphere of U235.
After reading an input file into the Visual Editor, the KCODE Source Generation Point Display Panel has the following options:
Dirname: The directory of the input file currently loaded into the Visual Editor. Filename: The name of the input file currenly loaded into the Visual Editor. Particle Plotted (NPS): After plotting, this will display the number of particles plotted.
For a KCODE problem, the Visual Editor can be used to plot the source generation points for each cycle, where cycle 1 is defined to be the source points for the initial ksrc defined in the input. After the cycles have been specified, select the Run_To_Generate_Plot_Data option. When Run_To_Generate_Plot_Data is selected, the Visual Editor will execute MCNP and write out the cycles requested by the user. The input file will run to completion, but will only write out the requested cycles. If the user specified cycles 1-5, the code will still run for 10 cycles when Run_To_Generate_Plot_Data is selected, even though only the first 5 cycles are written to srczn files. This does not run the MCNP on your system, but instead the MCNP that comes as part of the Visual Editor package. After doing a Run_To_Generate_Plot_Data, you can plot the source generation points by selecting the Plot_Saved_Data KCODE option, which will read the srczn files and display the points on the plot.
16.3.1
In this example, a KCODE source plot will be created for a sphere of U235.
Figure 16-7 Run and Plot KCODE Start the Visual Editor. Click on FileOpen and open the file ikode. Click on Update Plots. Click on the Left Plot Window to make it the active window for the plot. Click on Particle DisplayPlot KCODE Source Generation Points on the Main Menu.
The sphere shown in the left plot window of Figure 16-7 is a cumulative plot. An animation may be plotted by selecting Animation and clicking Plot.
Close the Input Window. Click on the Right Plot Window to make it the active window for the plot.
Figure 16-8 - Choosing a Color Click the Color button. Choose a different color. Click OK.
Figure 16-9 - KCODE Plot with Blue, Size 3, Particles Change the Pixel size to Size 3. Click Plot_Saved_Data.
17.1.1
2D Plot Tab
Independent: This is the variable the will be plotted on the x (horizontal) axis. Dependent: This is the variable that will be plotted on the y (vertical) axis. Fixed Variable Bin Numbers: Specify the bin number for the fixed variable. Bin numbers may be specified for Energy (E), Cell/Surface/Detector (F), Segment (S), Cosine (C), Time (T), Multiplier(M), User-defined (U), Total vs. Direct/Flagged vs. unflagged (D). This corresponds to the MCNP FIXED command.
17.1.2
Figure 17-3 shows the Tally Plotting panel with the mesh plotting tab displayed.
Indicate the variables to plot: Choose from IJ, JK,or IK. Plot the mesh on top of the Geometry: If checked, plot the mesh. Contour Plot Parameters (See 17.1.3 The Contour Plotting Tab)
17.1.3
Figure 17-4 shows the Tally Plotting Panel with the Contour Plotting tab displayed.
Independent: This is the variable the will be plotted on the x (horizontal) axis. Dependent: This is the variable that will be plotted on the y (vertical) axis. Fixed Variable Bin Numbers: Specify the bin number for the fixed variable. Bin numbers may be specified for Energy (E), Cell/Surface/Detector (F), Segment (S), Cosine (C), Time (T), Multiplier(M), User-defined (U), Total vs. Direct/Flagged vs. unflagged (D). This corresponds to the MCNP FIXED command. Contour Plot Parameters: Min: The minimum value for the contours. The default is 5% of the range defined by the minimum and the maximum values of the dependent variable. Max: The maximum value for the contours. The default is 95% of the range defined by the minimum and the maximum values of the dependent variable. Steps: The step values for the contours. This value can be omitted.
17.1.4
Figure 17-6 shows the Tally Plotting Panel with the Fluctuation tab displayed. This allows the Visual Editor to plot the tally fluctuation chart. This corresponds to the TFC command in the MCNP/MCNPX Tally Plotting program (The table below was copied from Appendix B in the MCNP or MCNPX manual).
MCNP/MCNPX Equivalent M E F L N P S T V 1-8 1c-8c Meaning Mean Relative error Figure of merit 201 largest tallies vs x (NoNorm for frequency vs. x Cumulative number fraction of f(x) vs x Probability f(x) vs. x (No Norm for frequency vs. x) SLOPE of the high tallies as a function of NPS Cumulative tally fraction of NPS VOV as a function of NPS 1 to 8 moments of f(x)x1 to 8 vs. x (NONORM for f(x) x x1 to 8 vs. x) 1 to 8 cumulative moments of f(x)x1 to 8 vs. x MCTAL Available? Yes Yes Yes No No No No No No No No
17.1.5
Figure 17-7 shows the Tally Plotting panel with the KCODE tab displayed. This panel corresponds to the KCODE command. The information below is copied from Appendix B of the MCNPX manual. The independent variable is the KCODE cycle. The individual estimator plots start with cycle one. The average col/abs/trk-len plots start with the fourth active cycle. Plot keff or removal lifetime according to the value of i. If i= 1 2 3 4 5 11-15 16 17 18 19 k (collision) k (absorption) k (track) prompt removal lifetime (collision) prompt removal lifetime (absorption) the quantity corresponding to i-10, averaged over the cycles so far in the problem. average col/abs/trk-len keff and one estimated standard deviation average col/abs/trk-len keff and one estimated standard deviation by average col/abs/trk-len keff figure of merit average col/abs/trk-len keff relative error
17.2.1
Fna FCn En Tn Cn FQn FMn DEn/DFn EMn TMn CMn CFn SFn FSn SDn Fun TFn DDn DXT FTn FMESHn SPDTL
Tally Tally Comment Tally Energy Tally Time Cosine Print Hierarchy Tally Multiplier Dose Energy/Dose Function Energy Multiplier Time Multiplier Cosine Multiplier Cell Flagging Surface Flagging Tally Segment Segment Divisor TALLYX Input Tally Fluctuation Detector Diagnostics DXTRAN Special Treatments for Tallies Superimposed Mesh Tally Lattice Speed Tally Enhancement
380 391 392 392 393 394 395 399 3100 3100 3101 3101 3102 3102 3104 3105 3107 3108 3110 3112 3114 3116
Table 2 lists the types of tally cards supported by MCNP. The corresponding page in the MCNP manual is also listed. Not all MCNP tally cards are currently supported by the Visual Editor.
17.2.2
Fna Card
Of the cards listed in Section 17.2.1, only the first card, Fna is required. From the MCNP manual, this card has the form listed below:
1. Surface and Cell Tallies (tally types 1, 2, 4, 6, and 7) Simple Form: Fn:plS1 ... Sk General Form: Fn:plS1 (S2 ... S3) (S4 ... S5) S6 S7 ... n .........tally number.
In the card definition above, n is the tally number. Valid tally numbers are listed in the table below which was copied from the MCNP manual1.
Table 3 Valid Tally Numbers
Mnemonic
F1:N or F1:P or F1:E F2:N or F2:P or F2:E F4:N or F4:P or F4:E F5a:N or F5a:P FIP5:N or FIP5:P FIR5:N or FIR5:P FIC5:N or FIC5:P F6:N or F6:N,P or F6:P F7:N F8:P or F8:E or F8:P,E +F8:E
Tally Description
Current integrated over a surface Flux averaged over a surface Flux averaged over a cell Flux at a point or ring detector Array of point detectors for pinhole flux image Array of point detectors for planar radiograph flux image Array of point detectors for cylindrical radiograph flux image Energy deposition averaged over a cell Fission energy deposition averaged over a cell Energy distribution of pulses created in a detector Charge deposition
Fn units
particles particles/cm2 particles/cm2 particles/cm2 particles/cm2 particles/cm2 particles/cm2 MeV/g MeV/g pulses charge
Fn units
MeV MeV/cm2 MeV/cm2 MeV/cm2 MeV/cm2 MeV/cm2 MeV/cm2 jerks/g jerks/g MeV N/A
17.2.3
En Card
For the Example in Section 17.5.1 Example: Displaying a Tally Plot, an En card is also used. From the MCNP manual, this card has the form. Form: En E1 ... Ek n ...............tally number. Ei..............upper bound (in MeV) of the ith energy bin for tally n. Default:....If the En card is absent, there will be one bin over all energies unless this default has been changed by an E0 card. Use: ..........Required if the EMn card is used.
The entries on the En card must be entered in the order of increasing magnitude. If a particle has an energy greater than the last entry, it will not be tallied, but you will be warned that this has happened. If the last entry is greater than the upper energy limit Emax specified on the PHYS card, the last bin will be lowered to Emax. If there are several bins above Emax, the extra bins are eliminated.1
17.2.4
c
For the itally input card used in the example in Section 17.5.1 the following input file is used:
mode n m1 92235.66c 1 $U235 imp:n 1 0 $ 1, 2 sdef ctme 1.0 f2:n 1 e2:n 1e-4 1e-3 1e-2 1e-1 1 10 100
This is a sphere centered at the origin with a radius of 50. It contains U235. A default source is defined with an sdef command. To create a tally plot, two tally cards were added. The required F tally card specifies a neutron tally that is to measure the flux over a surface (tally type F2). It is applied to surface 1. The En tally card is applied to tally number 2 and defines energy bands at 1e-4, 1e-3, 1e-2, 1e-2, 1, 10, 100. These are specified from lowest energy to highest energy as is required by MCNP.
17.5.1
Figure 17-8 The itally Input File Start the Visual Editor. Click on FileOpen and select the file itally. Click on Update Plots. Click on Input. Verify that the file contains the F, Tally, card specifying a F2 (Flux averaged over a surface) tally measuring neutrons (F2n) and applied to surface 1. The card appears as:
f2:n 1
Verify that the file contains an E, Tally Energy, card applied to tally number 2 (the only tally in the file). The energy bands are 1e-4, 1e-3, 1e-2, 1e-2, 1, 10, 100 which are from lowest to highest as required by MCNP.
Figure 17-9 Enter Run Parameters. Click on Run on the Main Menu.
On the Run Panel, Click on Overwrite outp, mctal, and runtpe files. If this is not checked, output files will increment, outa, outb, outc, etc When there are 26 files and the alphabet starts to repeat, a fatal error will occur. For the input box, Click Browse and select itally. In the output box, type otally. In the runtpe box, type rtally. In the mctal box, type mctally.
On the Run Panel Window, click on Run. If the files specified for outp, runtpe, and mctal do not already exist, a message will be printed. The file will run for one minute which is the time specified in the input file.
Close the Run Window. Click on the Left Plot Window to select it as the active window. Click on the Rect Check box to create a rectangular window. Click on Tally Plots on the Main Menu.
On the Tally Plotting window, verify that the Runtpe box is checked. It is the default. Next to the Filename box, Click Browse and select rtally. On the Tally Plotting menu, click Read_Tally_data.
On the Tally Plotting Panel, click Options. On the Tally Options Panel, set the Axis to Loglog. On the Tally Plotting Panel, Click Plot.
Cross section plots are easier to see when the plot window has been set to rectangular so you may want to click on the Rect check box to the left of the plot window. Most of the capabilities of MCPLOT for cross section plotting as outlined in Appendix B of the MCNP manual are available using the Visual Editor interface. The titles can be changed by selecting Titles from the menu and other plot options can be set by selecting Options from the plot menu. When you change the plot parameters you will usually need to select Plot from the menu to update the plot. Only cross sections for materials and isotopes specified in the input file can be plotted.
Figure 18-2 Creating a Cross Section Plot Start the Visual Editor. Click FileOpen and select the isdef input file. Click Update Plots. Click the Rect box to create a rectangular plot. Click on Cross Section Plots to open the Cross Section Plotting Panel. Type isdef in the Input Filename box. Click Read to load the file. Click Plot to display the plot.
MCNP Visual Editor Manual Cut-away views of the geometry can also be created by using a cookie-cutter cell, a feature which already exist in MCNP for source point rejection, to define a region to cut-away from the geometry. To generate 3D ray traced image of the plot of the geometry, select 3D View..Ray Traced Image from the main menu. There are two general types of plots that can be made. The first is a color ray trace image and the second is a radiographic image. The radiographic image will generate a black and white plot that shows the density of the objects in the plot. This density can represent track length or can represent the track length times the cross section for a specific source energy. Figure 19-1 shows the Visual Editor displaying both types of plots.
MCNP Visual Editor Manual Rays will be traced from the viewpoint source to the rectangle defined by this image plane (and beyond). Inside the 3D plotting window, set the viewpoint for the 3D geometry, this viewpoint must not be on the plot plane and cannot be in a zero importance cell. Specify which cells are to be displayed in 3D. The cells can be listed with either spaces or commas separating the different cells. A range of cells can be indicated with a dash. For example 1-5 would display cells 1 through 5 in 3D. If you specify a cell that does not exist in the input file, a warning message will be printed. You need to be careful to not include the outside world as one of the cells to display in 3D, or the cell that contains the 3D source for the plot. A number of options can be set to change the look of the plot. Once these have been set, select Normal 3D plot from the menu to generate a 3D plot.
19.1.1
To use 3D Ray Traced plotting, some modifications may need to be made to the input file. Figure 19-2 shows an input file of a box with a freestanding doorway.. Page 224 of 288
MCNP Visual Editor Manual 1. If the desired viewpoint is in the outside world, the user can add a spherical cell that will contain the viewpoint and create a new outside world outside this sphere. In Figure 19-2, an outer sphere with a radius of 500 was added to contain the viewpoint so that it will not be in the outside world. 2. Materials were assigned to the box and doorway and the surrounding sphere. A 3D Ray Traced plot can not be done on input files without materials assigned. 3. The importance for the outside world was set to zero. Any cells that are to be plotted must NOT have an importance of zero. The viewpoint must be in a cell that does not have an importance of zero.
19.1.2
This example will display a Normal 3D Plot for a sphere of Uranium encased in a sphere of lead.
Figure 19-3 Normal 3D Plot of a Sphere Start the Visual Editor. Click on FileOpen and select the input file i3dplot1. Click on Update Plots.
MCNP Visual Editor Manual Set the Extents to 200 as indicated in Figure 19-3. This input file contains three spheres. The inside sphere is uranium. It is surrounded by a sphere of lead. An outer sphere of air is added to allow for a viewpoint. For the plotting to work, the viewpoint must be inside a cell that is not of zero importance (the outside world). Generally, to create the 3D plots, a large sphere must be added to the geometry to contain the viewpoint.
Click 3DViewRay Traced Image from the Main Menu.
On the 3D Ray Tracing Panel, enter 300 in each of the x, y, and z coordinates for the viewpoint. The viewpoint must not be on the plot plane. Because the active window is an XZ slice at the origin, The y coordinate must not be zero.
Enter 1, 2 in the cell number box to indicate that cells one and two will be plotted. Cell three must not be entered because it contains the viewpoint. Cell four must not be entered because it is of zero importance (the outside world). Click Normal 3D Plot.
19.1.3
This example will look at a geometry from several different view points. The geometry used in the example is a box with a freestanding doorway. Figure 19-4 shows a 3D Dynamic Display (See Section 20.0) of the input file that will be used in this exercise. Dynamic Display 3D plotting differs from the 3D Ray Traced plotting but it was felt that this three dimensional perspective would be useful providing the user with a visual representation.
Figure 19-4 3D View of Box with Freestanding Doorway Start the Visual Editor. Click on FileOpen and select the input file iviewpoint. Click on Update Plots.
In the Left Plot Window, set the y coordinate of the origin to -50 (negative 50)..
Click Update Plots.
The desired result is a 3D Plot looking into the box through the doorway. The left plot window is shown in Figure 19-6. It defines the plot plane for the 3D plot which will be an XZ slice across the front at the point where the doorway stands.
The viewpoint can not have a y coordinate of -50 because this plot window forms the basis for the 3D plot and it is an XZ slice at y=-50. The viewpoint can not be on the plot plane. An appropriate viewpoint would be positioned in front of the door as indicated by the arrow in Figure 19-7 which shows a top view of Figure 19-6. Looking at a plot with a plane perpendicular to the plot window you will use as the basis for the plot is often helpful in determining a viewpoint.
Figure 19-7 Using the Right Plot Window to set the Viewpoint for the Left Plot Window
Figure 19-7 shows the XZ and the XY plot of the geometry. The desired viewpoint is standing in front of the doorway looking into the box. The XZ plot will be the plot plane for the 3D Plot. The XY plot shows a perpendicular view. The arrow shows a cursor location that corresponds approximately to that viewpoint. The global coordinates corresponding to the cursor location are shown in the upper right corner in a magnified view. In this figure, the cursor is positioned at approximately 0,-82,0. In general, the plots are better if the viewpoint is moved further from the items to plot so choosing 0,-100,0 is better. Any value of y that is between -51 and -499 is acceptable. It must not equal -50 or it is on the XZ plot plane and it must be inside the sphere of radius 500.
To create the 3D Plot, click on 3D ViewRay Traced Image on the Visual Editor Main Menu. On the 3D Ray Tracing Panel, enter 0 for the x coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter -100 for the y coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter 0 for the z coordinate of the viewpoint. In the cells to plot box, type 1, 2 which will plot the box and the doorway. On the 3D Ray Tracing Panel, click Normal 3D Plot. The result should appear similar to Figure 19-8. At the bottom of the 3D Ray Tracing Panel, set the resolution to 1000 and click Normal 3D Plot. It will take a little longer to plot but the image will look better. Generally, the plot should be made at a resolution of 300 to verify the viewpoint and then at a higher resolution to produce a better image.
Figure 19-9 3D Plot of Box and Doorway with Viewpoint at (0, -100, 25)
Because the Z axis is vertical in the XZ plot, increasing the z coordinate raises the viewpoint. Increasing the z coordinate to 25 produces a plot similar to the one in Figure 19-9. On the 3D Ray Tracing Panel, enter 0 for the x coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter -100 for the y coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter 25 for the z coordinate of the viewpoint. On the 3D Ray Tracing Panel, click Normal 3D Plot. Figure 19 9 shows the result.
Figure 19-10 3D Plot of Box and Doorway with Viewpoint at (0, -100, -25)
Similarly, Figure 19-10 shows the geometry with the viewpoint lowered to -25. On the 3D Ray Tracing Panel, enter 0 for the x coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter -100 for the y coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter -25 (negative 25) for the z coordinate of the viewpoint. On the 3D Ray Tracing Panel, click Normal 3D Plot. Figure 19-10 shows the result.
Moving the viewpoint behind the plot plane to (0,49,0) creates a view from the inside of the box looking out through the door. On the 3D Ray Tracing Panel, enter 0 for the x coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter 49 for the y coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter 0 for the z coordinate of the viewpoint. On the 3D Ray Tracing Panel, click Normal 3D Plot. Figure 19-11 shows the result.
Figure 19-12 3D Plot of Box and Doorway with Viewpoint at (100, -200, 0)
By moving the viewpoint to the side, an angled view is generated. The viewpoint of (100, -200, 0) moves the viewpoint by 30 degrees to the right. Because the Update Plot Basis box is not checked, the 2D plot is unchanged. On the 3D Ray Tracing Panel, enter 100 for the x coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter -200 for the y coordinate of the viewpoint. On the 3D Ray Tracing Panel, enter 0 for the z coordinate of the viewpoint. On the 3D Ray Tracing Panel, click Normal 3D Plot. Figure 19-12 shows the result. On the left plot window (showing the 3D plot), click the Update button. The plot will show the 2D basis plot. The plot should match the left view of Figure 19-13. On the 3D Ray Tracing Panel, click the Update Plot Basis checkbox. On the 3D Ray Tracing Panel, click Normal 3D Plot.
Verify that the 3D plot looks the same.
On the left plot window (showing the 3D plot), click the Update button. The plot will show the 2D basis plot. The plot should match the right view of Figure 19-13. The 2D view has been changed by the 3D Ray Tracing feature.
Figure 19-13 Before and After 2D Plots with Update Plot Basis turned on.
When a 3D plot was created with Update Plot Basis checked, the underlying 2D plot was changed to match the plotting basis. It is shown in the right plot. The left plot shows the original basis. Note the basis values circled at the top of each plot.
19.6 3D Shading
If Use 3D Shading is selected, the color of each cell is darkened as the angle between the view and the reflection off the object increases, providing a 3D look. This is the default option. If Use 2D shading, is selected, the color of the cell is kept constant independent of the angle between the view and the reflection off the object.
19.10.1
The example will create a cookie cutter cell for a sphere of Uranium encased in a sphere of lead. The cookie cutter will remove one quarter of the sphere.
Figure 19-14 Create the Cookie Cutter Surfaces Start the Visual Editor. Click on FileOpen and select the file i3dplot2. Click on Update Plots.
On the Left Plot window, set both extents to 200. On the Right Plot window, set both extents to 300. To create the cut-away view, a cookie cutter cell must be created. On the Main Menu, Click on Surface. On the Surface Panel, Click on SurfacesPlanepx In the D box (for distance), Type 1. This will set the plane slightly off the axis which prevents it from interfering with parts of the geometry that are on the axis. There are none in this example, however it is good practice. On the Surface Panel, Click on SurfacesPlanepz In the D box, type 1. On the Surface Panel, click on SurfacesPlanepy. Page 238 of 288
MCNP Visual Editor Manual In the D box, type 220. On the Surface Panel, click on SurfacesPlanepy. In the D box, type -220 (negative 220). On the Surface Panel, click on SurfacesCylindercy In the R box (radius), type 220. Click on FileSave As and name the new file i3dplotcc.
Close the Surface Panel.
Figure 19-16 Set the Point of Reference and Register Click in the top right quadrant of the cylinder as indicated in Figure 19-16. This will establish the point which will set the sense of the surfaces bounding the cell.
On the Cell Panel, Click on Paste. On the Cell Panel, Click on Register.
Close the Cell Panel. Click on FileSave
19.10.2
This example will display a Normal 3D Plot for a sphere of Uranium encased in a sphere of lead with a cut-away view. For instructions on making the cookie cutter cell, see the exercise on cookie cutter cell creation that precedes this one.
Figure 19-17 Sphere with Cookie Cutter Cell Start the Visual Editor. Click on FileOpen and select i3dplot3. Click on Update Plots. Set the Extents on the Left Plot Window to 200. Set the Extents on the Right Plot Window to 300. Click on Update Plots.
Figure 19-18 Rotate the Image Click the Axial button until the cookie cutter cell is rotated to the bottom of the sphere as shown in the left panel of Figure 19-18 (about 15 clicks). This will put the cut-away view at the front of the image.
The viewpoint has the following requirements: The viewpoint must be outside the two spheres that are being plotted The viewpoint must be inside inside outer sphere of air because the viewpoint can not be in a zero importance cell (the outside world). The viewpoint also must not be on the plot plane.
To have the cut-away view positioned so it is visible, the viewpoint should be in front of the cookie cutter cell. The coordinates are not as obvious with the image rotated. To get some coordinates located in front of the cookie cutter, position (but dont click) the cursor in front of the geometry as shown in Figure 19-19. The global coordinates (see Magnified View in Figure 19-19) show that the cursor is at (approximately) 100, 0, 100. The plot will look better if the viewpoint is further away from the object so 300, 0, 300 is better. This is still inside the outer sphere of air that has a radius of 5000. Because the viewpoint cannot be in a cell of zero importance, (the outside world), the viewpoint must be inside the outer sphere. The viewpoint must also be above or below the plot plane. Because this is an XZ plot at the origin, the view point must not have a y coordinate of zero (the same as the plot plane). To correct for this, a y coordinate of 50 is chosen. The viewpoint will be at 300, 50, 300.
On the Main Menu, Click on 3D ViewRay Traced Image. On the 3D Ray Tracing Panel, type 300 in the x coordinate box for the viewpoint. On the 3D Ray Tracing Panel, type 50 in the y coordinate box for the viewpoint. On the 3D Ray Tracing Panel, type 300 in the z coordinate box for the viewpoint.
Type 1, 2 in the cells to be plotted box. Select the Show cookie cutters option as indicated in Figure 19-20.
On the 3D Ray Tracing Panel, click on Normal 3D Plot. Figure 19-21 shows the result.
Figure 19-22 3D Plot at resolution of 2000. Change the resolution of the plot to 1000. Click on Normal 3D Plot. Change the resolution of the plot to 2000. Click on Normal 3D Plot.
To create a radiographic plot, set up the geometry plot as if doing a normal 3D plot. Additionally, you must set the maximum ray length which will correspond to pure black. If this value is not known, create a plot using a temporary non-zero value then look at the output display at the bottom of the window. The maximum radiographic length as calculated by MCNP will be displayed. You can then use this value to create an accurate radiographic plot. The right plot window in Figure 19-23 shows this option. The user can also select to multiply the track length by the cross section for a given source energy. If this option is selected, both the maximum ray length and the energy of the source particle must be specified. The left plot window in Figure 19-23 shows this option for 5 MeV. Most of the plot options and features are ignored when doing the radiographic view. The only plot option that can be changed is to plot from a point source or a plane source, all other options are ignored. To generate the radiographic plot after all of the parameters have been set select Radiographic 3D from the menu.
19.13.1
This example will create two radiographic plots of a sphere of U235 encased in a sphere of lead. Figure 19-24 shows the result. The left plot utilizes the Darkness indicates (ray length) * (cross section) option. The right plot is a standard radiographic plot with a ray length of 200.
Figure 19-24 Radiographic Plot of a Sphere of U235 Encased in a Sphere of Lead. Start the Visual Editor Click on FileOpen and select the input file i3drad1. Click on Update Plots.
On both plot windows, set the Extents to 200 (See Figure 19-25).
This input file contains three spheres. The inside sphere is uranium. It is surrounded by a sphere of lead. An outer sphere of air is added to allow for a viewpoint. For the plotting to work, the viewpoint must be inside a cell that is not of zero importance (the outside world). Generally, to create the 3D plots, a large sphere must be added to the geometry to contain the viewpoint. On the Visual Editor Main Menu, Click on 3D ViewRay Traced Image.
Verify that the Right Plot Window is the active window.
On the 3D Ray Tracing Panel, set the x coordinate of the Viewpoint to 300. On the 3D Ray Tracing Panel, set the y coordinate of the Viewpoint to 300. On the 3D Ray Tracing Panel, set the z coordinate of the Viewpoint to 300. The x, y, and z coordinates of 300 place the viewpoint well outside the sphere of lead which has a radius of 100 but well inside the sphere of air which has a radius of 5000. This is required. The z coordinate of 300 raises it off the plot plane which is at zero for this xy plot.
Type cells 1 and 2 in the Cell Numbers to Plot box.
Use the default ray length of 10. On the 3D Ray Tracing Panel Menu, Click on Radiographic 3D Plot. Page 249 of 288
MCNP Visual Editor Manual Once the sphere has been plotted, observe the maximum radiographic length as printed in the bottom of the 3D Ray Tracing Panel. That portion of the panel is shown in a magnified view in Figure 19-25. The value for that length is approximately 200.
Figure 19-26 3D Radiographic Plot with Corrected Ray Length Type 200 in the Ray Length Corresponding to Pure Black box. Click on Radiographic 3D. Figure 19-26 shows the result.
Figure 19-27 3D Radiographic Plot with Darkness = Ray Length * Cross Section Click to Select the Left Plot Window as the active plot window. Move the 3D Ray Tracing Panel so that the Left Plot Window is visible. Click to select the Darkness indicates (ray length) * (cross section) option. Enter 5 MeV as the Energy of the Source. Click on Radiographic 3D. Figure 19-27 shows the result.
Figure 19-28 shows a glove box. The right plot shows a Normal 3D Plot with some of the exterior cells eliminated from the plot to show the inner detail. The plot is all the same color because all the visible cells are made of stainless steel. The left plot shows a transparent plot of the glove box. This plot contains different colors because the material inside the stainless steel tubes differs. Set up a transparency plot like a normal plot, except there are two additional parameters that need to be specified, the cell transparency and the Average Cell Thickness. The user will not typically know what these values are without first generating a transparent plot using the default values. After the plot is generated, the code will print out the average cell thickness and the maximum non-transparency. Generate the plot again using the calculated cell thickness and scaling the transparency value so that the calculated non-transparency will be less than 1. The non-transparency value indicates the maximum saturation of color that was generated. If this value is greater than 1.0, then the color goes to pure white. When this happens in the plot and the user should lower the cell transparency until the reported maximum non-transparency is less than 1.0.
19.14.1
This example will create a 3D transparent plot of four spheres inside a sphere of concrete. Figure 19-29 shows the result.
Figure 19-29 3D Transparent Plot of Five Spheres in a Concrete Sphere. Start the Visual Editor.
On the Main Menu, click on FileOpen and select the file itransparent.
Click on Update Plots.
Figure 19-30 Set the Extents to 150. Set the Extents to 150. Click Update Plots. Click on the Left Plot Window to make it the active window.
On the 3D Ray Tracing Panel, type 0 for the x coordinate for the viewpoint. On the 3D Ray Tracing Panel, type -200 for the y coordinate for the viewpoint. On the 3D Ray Tracing Panel, type 0 for the z coordinate for the viewpoint. On the 3D Ray Tracing Panel, type 1 2 3 4 5 6 to indicate that cells 1-6 are to be plotted. Use the default transparency options. On the 3D Ray Tracing Panel, Click Transparent 3D. Figure 19-31 shows the result.
At the bottom of the 3D Ray Tracing Panel, observe the values for the average trans. cell length and the maximum non-transparency as shown in Figure 19-32.
Figure 19-33 Second Transparent 3D Plot. Type 0.9 in the Cell Transparency box. Type 29 in the Average Cell box. Change the Resolution to 1500. Click on Transparent 3D.
The transparent 3D plotting parameters are often determined iteratively. For another iteration, look at the calculated values in the box at the bottom of the 3D Ray Tracing Panel. In general, cell transparency printed out by MCNP should be about 1. To get the optimum color spectrum, continue to iterate. Enter the value for the average trans. cell length in the Average cell box. The value for the cell transparency should be reduced if the maximum non-transparency printed out by MCNP from the previous plot is greater than one and increased if it is less than one.
Figure 19-34 shows the printed values after generating the plot. The current maximum nontransparency is approximately 3.8. Because 3.8 is significantly higher than one, reduce the value of 0.9 to 0.5 in the Cell Transparency Box.
Type 71 in the Average Cell Box. Click on Transparent 3D.
Observe the values from the previous run. The maximum non-transparency is about 1.343. Because 1.3 is still larger than 1, type .45 in the Cell Transparency box.
Type 95 in the Average Cell box. Click Transparent 3D.
The maximum non-transparency is now essentially 1.0 so no further iterations are necessary. These transparency options allow for the greatest spectrum of dark to light.
The dynamic 3D display can display lattices and universes. Non-universe and universe cells need to be entered in separate text boxes. There are a number of options for moving around the geometry including Roll, Pitch, and Yaw options that allow the viewpoint to moved dynamically around the model. There are also a number of visibility options for the cells including wireframe and transparent. Figure 20-2 shows a transparent view of the geometry.
The resolution used to generate the geometry can be changed, but a higher resolution will typically take longer to generate. By default, all cells that contain a material will be displayed. To display individual cells, un-select the Display Cells with Materials check box and then enter the cells to display in the Cells to Display text box.
Figure 20-3 3D Display of Box and Doorway Start the Visual Editor Click on FileOpen and select the i3ddynamic input file Click on Update Plots.
On the 3D Dynamic Plotting Panel, Click 3D Display. A new window opens and shows the box with the free standing doorway.
Click the Zoom checkbox.
Place the cursor on the 3D picture and hold the mouse button down while sliding up. This will zoom in. Similarly, holding the mouse button down while sliding down will zoom out.
Place cursor on the 3D plot and hold the mouse down to drag to the left. The object rotates.
Figure 20-5 Transparent Box and Doorway Right Click on the box to select it. On the menu that appears, click on Make Selection Transparent.
To convert the file, the user selects the Convert option to create the MCNP surfaces and MCNP cells. It is not necessary to segment the CAD file before converting, if the user has not yet selected the segment option, the code will automatically detect this and do the segmenting prior to converting the file. Once the file has been converted to MCNP, the user should then select Page 267 of 288
This conversion works for most of the CAD geometric entities including, lines, polylines, multilines, circles, arcs and ellipses and also works for the insertion of blocks. These geometric entities include most of the 2D geometries that can be created by CAD. The Visual Editor will display these geometric entities and allow the user to select any of these items and remove them from the geometry (by scanning them and selecting the Delete button) before converting them to MCNP. This can be done either before or after segmenting the surfaces. The Visual Editor will also allow the insertion of an upper and lower surface to bound the 2D geometry in the axial direction. Figure 21-2 shows an example 2D CAD file that has been converted to MCNP. The original CAD file is shown in the left plot window and displayed using the new Visual Editor CAD plotting capabilities. The converted MCNP file is shown in the right plot window. The original CAD file contains lines, polylines, polygons, multilines and circles. The resulting MCNP geometry has 88 surfaces and 31 cells. The first few lines of the resulting MCNP input file can be seen in the input window at the bottom of the figure.
The SAT format supports five different types of surfaces. MCNP has equivalents for the plane, cone (which includes cylinders), sphere, and torus, and ellipse. The program can successfully convert all these surfaces. SAT also supports a spline surface that is modeled by a third order polynomial (or greater). Because MCNP does not model above a second order polynomial, SAT splines had no direct MCNP equivalent. Figure 21-3 shows examples of some of CAD objects that can be converted.
Figure 21-4 shows a 3D display of the CAD objects (shown on the right), after they have been imported into the Visual Editor. These were then converted to MCNP. The 2D MCNP plot of the geometry is shown in the left of the figure. The top of the input file is shown on the bottom left. A number of features were included in the Visual Editor CAD conversion program to aid in the conversion of 3D CAD files, including the ability to parse a complex object made of a number of unions into simpler objects that are easy to convert and the ability to convert objects with a small number of unions or intersections. Many files created without prior intent for use with MCNP contain complexities that are not important for MCNP and as such need to be modified to meet the conversion constraints.
MCNP Visual Editor Manual 2) The CAD model must define all of space. This means that regions of air need to be defined as objects so they can be converted to the proper MCNP cell. 3) The CAD geometry should be inside a large box, or cylinder, or sphere, where the region beyond this large box, or cylinder, or sphere in the conversion will be defined as a MCNP cell for the outside world cell; i.e., with an importance of zero. 4) A CAD region is limited in its complexity, so that the resulting MCNP cell does not exceed the limits of an MCNP cell. If the cell is too complex, it must be split into simpler cells. 5) For CAD solid modeling, a limited number of unions and intersections are allowed. If an object is too complex, it must be split into a number of simpler cells. Although these constraints add some additional burden to the CAD designer, it will result in a more efficient MCNP model that is not overly complex.
21.4 Using CAD as a Graphical User Interface for MCNP with Perimeter Modeling
If a CAD file does not currently exist, the conversion program allows for the import of a simplified CAD geometry that can be converted to an MCNP format. The special format defines solids that are entirely contained inside each other or sharing a common face. This algorithm is designed for a geometry that is created with CAD by defining only the perimeter of each body. The conversion then determines each MCNP cell as the outer perimeter along with the algorithm to determine any inner perimeters for that cell.
Figure 21-5 shows an example of the display of imported bodies as read from the SAT file. The top of the building is made transparent, and the pillars and central cone have the wire frame removed so they appear solid. Details concerning the SAT file are shown in the right side of Figure 21-5, where each body displayed is identified. When the user clicks the mouse on a body in the plot window, the selected object will be identified in the bottom panel on the right. The user can rotate the 3D image and move around the object as desired, using the rotate button or the yaw, pitch, and roll buttons.
Figure 21-6 3D Display of Imported SAT Cube Start the Visual Editor.
On the CAD3D Import panel, click Convert. On the Main Menu, click on Input and view the created input file.
Figure 21-7 3D Image of imported CAD File of a Gazebo. Start the Visual Editor.
On the CAD3D Import panel, click Convert. On the Main Menu, click on Input and view the created input file. On the 3D Display Panel, Click on the Move Toward checkbox. Position the cursor on the 3D plot, hold the left mouse button down and slide up. This will zoom in. Continue sliding until the picture fills the window.
Figure 21-8 Making a Surface Transparent. Right Click on the Roof of the Gazebo and select Make Selection Transparent.
Figure 21-9 3D Display of Office SAT File Start the Visual Editor.
On the CAD3D Import panel, click Convert. On the Main Menu, click on Input and view the created input file. On the 3D Display Panel, Click on the Move Toward checkbox. Position the cursor on the 3D plot, hold the left mouse button down and slide up. This will zoom in. Continue sliding until the picture fills the window.
Because the air space in the office was very complex for MCNP to model, a wall was added in the office that separated the office (and the complex air space) into two parts. First remove the outer wall. Then remove the box on the far side of the office. Then make the box on the near side of the office transparent. With that box transparent, it is easy to see how the office was divided.
Right Click on the side wall of the office (shown in red, top left panel in Figure 21-10). In the pop-menu, click on Hide Selection.
The bottom right panel in Figure 21-10 shows the result. Using the rotate and zoom features, the user can see all aspects of the office.
Close the 3D Plot Window (the one with the 3D picture in it) by clicking the X in the top right corner. Close the 3D Cad Import window.
Figure 21-12 Setting the Right Plot Origin. Click the Origin check box on the right plot window. Click on the LEFT plot window where indicated in Figure 21-12.
To show that the CAD conversion works for large files, a 1,000-sphere case was created. Each set of 25 spheres was enclosed in a rectangular parallelepiped, to minimize the number of surfaces used in the creation of the cells in the resulting MCNP geometry. Without the parallelepipeds, the resulting air space between the 1,000 spheres would be too complex for MCNP. Figure 21-14 shows the 3D display of the spheres with the boxes hidden on the front, so the spheres can be seen, and some of the boxes set to transparent in the back. The resolution of the spheres has been reduced to enable faster geometry manipulation. The resolution used to generate a curved surface is set with the resolution text box and indicates the number of intervals to use in 360 degrees.
Figure 21-15 shows the resulting MCNP geometry and input file after the CAD file has been converted to MCNP.
Figure 21-16 1000 Spheres Inside Cube Start the Visual Editor. Click on CAD Import3D Import.
Because this file is so large, computer response may be slow. On the CAD 3D Import Panel, select Import. On the CAD 3D Import Panel, select Convert. On the Visual Editor Main Menu, select Input. On the Input Panel, click on SaveUpdate. On the 3D Plot of the cube, Right Click on the side of the cube and choose Make Selection Transparent.
Figure 21-17 shows the result. The interior boxes are necessary or the air space around the spheres is a cell too complex for MCNP to model.
Right Click again on the Outside Box and select Hide Selection. Unless the outer box is hidden, it will not let you select any of the inner boxes.
Starting with the box in front on the top row, Right Click and Select Hide Selection.
Repeat this for the second and third boxes.
On the next box, Right Click and Select Make Selection Transparent. By hiding or making the boxes transparent, it is possible to see the inner spheres.
MCNP Visual Editor Manual displayed in the input window. Modifications to the input file can be made in this window and the plot will be updated when save-update is selected.
References
R. A. Schwarz, L. L. Carter, and N. Shrivastava, "Creation of MCNP Input Files With a Visual Editor," Proceedings of the 8th International Conference on Radiation Shielding, Arlington, Texas, April 24-27, 1994, pp 454-459, American Nuclear Society, La Grange Park, Illinois(1994). L.L. Carter, R.A. Schwarz, Visual Creation of Lattice Geometries for MCNP Criticality Calculations, Transactions of the American Nuclear Society, 77, 223 American Nuclear Society, La Grange Park, Illinois (1997). R.A. Schwarz, L.L. Carter, Visual Editor to Create and Display MCNP Input Files, Trans. Amer. Nucl. Soc., 77, 311-312 American Nuclear Society, La Grange Park, Illinois (1997). R.A. Schwarz, L.L. Carter, K.E. Hillesland, V.E. Roetman, Advanced MCNP Input File Creation Using the Visual Editor, Proc. Am. Nucl. Soc. Topical, Technologies for the New Century, 2, 317-324, April, 1998, Nashville TN. L.L. Carter, R.A. Schwarz, The Visual Creation and Display of MCNP Geometries and Lattices for Criticality Problems, Trans. Amer. Nucl. Soc., American Nuclear Society, La Grange Park, Illinois (1999).
5 4 3 2 1
R.A. Schwarz, L.L. Carter, W Brown, Particle Track Visualization Using the MCNP Visual Editor, Proc. Am. Nucl. Soc. Topical Radiation Protection for Our National Priorities Medicine, the Environment and, the Legacy, 324-331, 2000, Spokane, Washington. R.A. Schwarz, L.L. Carter, Current Status Of the MCNP Visual Editor, 12th Biennial RPSD Topical Meeting, April 14-18, 2002, Santa Fe, New Mexico.
R. A. Schwarz, "Simple Visualization Techniques used to Optimize the Shielding Configuration of a Reactor on Mars," Proceedings of the 2002 Topical on Radiation Protection and Shielding, April 14-18, 2002, Santa Fe, New Mexico.
9
A.L. Schwarz, R. A. Schwarz, and L. L. Carter, "3-D Plotting Capabilities in the Visual Editor for Release 5 of MCNP," Proceedings of the 2003 Topical on Mathematical and Computational Sciences, April 6-10, 2003, Gatlinburg, Tennessee. R.A.. Schwarz, A.L.. Schwarz, and L. L. Carter, " Conversion Of Computer Aided Design (CAD) Output Files To Monte Carlo N-Particle (MCNP) Input Files," The Monte Carlo Method: Versatility Unbounded in a Dynamic Computing World, Chattanooga, TN, April 17-21, 2005 R.A.. Schwarz, A.L.. Schwarz, and L. L. Carter, " Wizards and Visualization Features for MCNP Geometries and Sources," The American Nuclear Societys 14th Biennial Topical Meeting of the Radiation Protection and Shielding Division, Carlsbad New Mexico, USA. April 3-6, 2006.
12 11 10
MCNP Manual, Revised 10/03/05. MCNPX, Version 2.5f, LA-UR-05-0891, February 23, 2005
13
A-1
25.0 Appendix A
In this sample problem, we will create a small sphere inside a cross that will be placed inside a larger sphere. Simply follow the steps shown on the next page for this creation. Timesaving note: Even though this example is reasonably straightforward, there is a high probability for a new user to make an error and lose some or all the data that was created. It is a good practice to periodically save the current input file by repeating steps 85 to 87 with a different file name each time. Alternatively, you can select Backup from the main menu and it will save the file to inpn?, where the ? is a number (inpn1, inpn2, inpn3, etc.). If an error occurs you can exit the Visual Editor and then start it up again and read in your last saved file and pick up at that step in the creation. The cell menu also has an undo option that will cancel the last operation performed when creating a cell (drags, points, paste, cut) so if an error occurs when creating a cell you can remove the last action using the undo button.
A-2
STEP
1. 2. 3.
ACTION
Start the Visual Editor Select input Enter a title before the line containing a default comment card Select Save-Update
DESCRIPTION
Use Windows Explorer to start the Visual Editor. Open the Input window. Enter the title Simple problem at the top of the input window, then PRESS RETURN. Update the Fortran memory.
4.
A-3
A-4
A-5
A-6
A-7
A-8
A-9
A-10
A-11
A-12
57.
Add the rectangular region to the cell description. Notice the description now shows the four surfaces with the proper sense set for each surface. This has been added on to the beam description using a union operator.
A-13
A-14
A-15
A-16
A-17
A-18
A-19
Create the Cell Inside the Sphere, but Outside the Cross.
80.
Create the cell inside the sphere, but outside the cross.
A-20
A-21
A-22
26.0 Appendix B
In this example you will create 4 cylinders inside a box in Turbo Cad and import the geometry into the Visual Editor. The CAD package used for this Example is Turbocad Professional 9.2. Any CAD package that can export SAT files can be used to create this geometry. Most of this exercise describes out to generate a CAD geometry that can be imported into MCNP. It is assumed that the user is not familiar with CAD geometry creation.
B-1
STEP 1. 2.
B-2
3.
B-3
4.
B-4
5.
B-5
6.
B-6
7.
B-7
8. 9.
Change the mode to SELECT. Select the cube with a mouse click.
We want to select the cube just created and make a smaller copy. Select the cube so we can make a copy
B-8
10.
Select EDIT->COPY.
B-9
11.
Select EDIT->PASTE.
B-10
12.
Resize the new box. If the size buttons do not show up, you need to set the 3D select properties.
B-11
13.
B-12
14.
Set the bottom center of the cylinder. To create a cylinder, you need a bottom base point, a radius point and a height.
B-13
15.
Set the bottom center of the cylinder. To create a cylinder, you need a bottom base point, a radius point and a height.
B-14
16.
Set the bottom center of the cylinder. To create a cylinder, you need a bottom base point, a radius point and a height.
B-15
17.
B-16
18. 19.
With the mouse, SELECT the cylinder by clicking on it. Select EDIT->COPY ENTITIES>ARRAY
B-17
20. 21.
Separate the cylinders by 80. Make the other cylinders at the same elevation.
B-18
22.
B-19
Select FILE->SAVE AS. Set the SAVE AS TYPE: to SAT Set the file type to i4cyl.sat
Bring up the file save dialog Export the file as a SAT file. Save the file.
B-20
Start the Visual Editor Select CAD IMPORT->3D IMPORT Select IMPORT. Select the file i4cyl.sat and select OPEN.
Bring up the Visual Editor Bring up the panel used to import 2D CAD files Get ready to read in the sat CAD file Read in the 3D cad file
B-21
30.
This will create the cell (cell 1) which will show up in the plot window.
B-22
In the CAD 3D IMPORT window, select CONVERT Select INPUT from the main menu. Select SAVE-UPDATE from the input window. In the right plot, select the SURF toggle button. In the right plot, select the CELL toggle button. In the right plot, set the top and bottom extents to 200 In the right plot, select UPDATE
This will convert the CAD geometry. Bring up a listing of the input file. Reset memory and update the plots. Show surface labels. Show cell labels. Expand the view to show the complete geometry. Update the display on the right.
B-23
Select FILE->SAVE AS Set the filename to i4cyl and select SAVE. Select FILE-> EXIT
Bring up the file save dialog. Set the name and save the file. Exit the visual editor.
B-24
Index 3
3D dynamic plotting 3D Radiographic Plots 3D ray traced plotting color by cell/surface color cells by material cookie cutter example cookie cutters distance shading draw lines example Normal 3D plot plane source plot basis plot to the outside world point source radiographic plots resolution shading show plot plane stop at the plot plane transparent plotting viewpoints 3D Transparent Plotting See dynamic 3D plotting See radiographic plots 223 236 236 237 237 237 236 225 223 237 236 246 237 See radiographic plots 246 237 237 246 See transparent plotting 227 See transparent plotting delete edit hide numbers register renumber scan show splitting wizard cell numbering cell sense cell window cell wizard clipboard example color color by color plotting coordinates global local cross section cross section files cross section plotting xsdir file cut 92 100 101 101 44 100 188 100 101 101 103 44 33, 92, 99 90 103 19 90 45 45 47 47 171 2 220 2
A
atom density axial 170 46
D
data materials Data Importances display example dynamic 3D plotting example options 169 177 10 260 19, 263 261
B
backup inp basis bugs 287 46 5
C
CAD Import CAD Import 2D convert delete segment segment CAD Import 3D constraints/restrictions display of graphical user interface large files parsing perimeter modeling SAT format solid modeling splines cell comments create like creation, example of 266 267 267 267 267 269 271 272 272 282 271 269, 272 270 269 271 101 101 28
E
elib environment variable estep extent 177 2 177 15, 43
F
facet File Clear Input menu option New View Open Open (do not modify input) Print Save Save As 45 50 50 50 50 50 37 51 51
I-1
G
gas177 geometry errors gram density 90 170
H
help horiz 4 46
170 170 172 91, 170 172 170 175 170 91 177 172 169 1
I
importances display options geometric factor integer checkbox scale factor setting truncating inp 9 inpcrash inpn inpn.sav inpn1 inpt input file creating, example of Input Window isotope 177 178 178 178 178 177 178 9 9 9 9 9 22 51 171
N
nlib 177
O
operating system origin example out.ps outmc outp outp3d 2 40 16 46 9 9 9
P
particle display particle track plotting color pixel size tally contributions tracks xsdir xsdir file paste plane surfaces creating, example of platform plib plot rectagular rotation set level plotting 3D ray traced cross section example KCODE source particle track SDEF source point postscript print example printing problem reporting 190 194 194 195 194 195 2 92 25 2 177 46 46 47 See 3D ray traced plotting See cross section plotting 10 200 See particle track plotting 191 29, 33 46 19 37 287
K
kcode ksrc 198, 200 198, 200
L
labels Last lattice cards creating hexagonal creating rectangular fill matrix hexagonal display hexagonal panel modifying center rectangular lattice panel universe fill values level 47 39 107 139 113 110 169 139 135 109 108 47
M
macrobody main menu 55 48
I-2
T
tally cards En 213 Fna types tally mesh tally plotting example opening file options overview plotting training transformations transparent plotting average cell thickness cell transparentcy 212 212 46 214 214 214 204 214 5 187 252 252 252
R
radiographic plots example maximum radiographic length read again rect rectangular plot Refresh register renumber resolution run189 run MCNP xsdir file 247 248 250 286 46 46 44 92, 100 188 46 2
S
Save-Update scales SDEF send to clipboard sense source plotting kcode SDEF sphere creating, example of stndrd.n stndrd.p surface comments creating deleting delta dimensions distance editing facet number hiding macrobody numbers reflective registering renumber scan scanning select showing transformation Surface window wizard surface number 51 46 191 37 33 200 191 24 9, 174 9, 174 54 52 54 55 54 54 54 45 54 55 44 52 52 188 53 52 91 54 52 51 64 44
U
undo unexpected end of file universe universe number Update Update Plots usr.n usr.p 100 11 99 91 39 38 9, 174 9, 174
V
vert vised.defaults 46 9, 171, 173
W
website weight window mesh Windows 2000 Windows Vista Windows XP 5 45 2 2 2
X
xsdir 2
Z
ZAID zoom example Zoom 171 12 39
I-3