You are on page 1of 350

MCNP/MCNPX Visual Editor Computer Code Manual

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

For the latest information visit WWW.MCNPVISED.COM


MCNP Visual Editor Manual
MCNP Visual Editor Manual

Table of Contents
1.0 INTRODUCTION.........................................................................................................................................1
1.1 THE MCNP/MCNPX VISUAL EDITOR ........................................................................................................1
1.2 INSTALLATION NOTES .................................................................................................................................1
1.3 OPERATING SYSTEM REQUIREMENTS ..........................................................................................................2
2.0 A BRIEF OVERVIEW .................................................................................................................................3
2.1 USER RESOURCES........................................................................................................................................3
2.1.1 Utilizing this Manual ............................................................................................................................3
2.1.2 Online Help ..........................................................................................................................................4
2.1.3 The LANL MCNP Manual ....................................................................................................................4
2.1.4 The LANL MCNPX Manual..................................................................................................................5
2.1.5 The Visual Editor Website ....................................................................................................................5
2.2 CREATING GEOMETRIES ..............................................................................................................................5
2.3 THE INPUT WINDOW ...................................................................................................................................6
2.4 MODIFYING THE INPUT FILE USING AN EXTERNAL EDITOR ........................................................................6
2.5 READING AND WRITING INPUT FILES ..........................................................................................................7
2.6 SAVING FILES ..............................................................................................................................................8
2.7 AUTOMATIC BACKUPS AND ERROR HANDLING ...........................................................................................8
2.8 IMPORTANT FILES IN THE VISUAL EDITOR ..................................................................................................8
3.0 GETTING STARTED WITH TWO SIMPLE EXAMPLES ..................................................................10
3.1 EXAMPLE: DISPLAYING AND PLOTTING AN EXISTING FILE .......................................................................10
3.2 EXAMPLE: CREATE SIMPLE GEOMETRIES USING THE VISUAL EDITOR ......................................................22
4.0 THE VISUAL EDITOR PLOT WINDOWS ............................................................................................37
4.1 UPDATE .....................................................................................................................................................38
4.2 NEXT AND LAST BUTTON ..........................................................................................................................39
4.3 ZOOM CHECK BOX ....................................................................................................................................39
4.4 ORIGIN CHECK BOX ..................................................................................................................................40
4.5 CHANGING THE EXTENTS ..........................................................................................................................43
4.6 REFRESH CHECK BOX ...............................................................................................................................44
4.7 THE SURFACE AND CELL CHECK BOX .......................................................................................................44
4.8 UNUSED ....................................................................................................................................................45
4.9 COLOR CHECK BOX ..................................................................................................................................45
4.10 FACETS CHECK BOX..................................................................................................................................45
4.11 WW MESH CHECK BOX ............................................................................................................................45
4.12 RECT CHECK BOX .....................................................................................................................................45
4.13 TAL MESH CHECK BOX .............................................................................................................................46
4.14 PLOT ROTATION OPTIONS .........................................................................................................................46
4.15 SCALES CHECK BOX..................................................................................................................................46
4.16 RES TEXT BOX ..........................................................................................................................................46
4.17 PSCRIPT CHECK BOX .................................................................................................................................46
4.18 CHANGING THE BASIS ...............................................................................................................................46
4.19 VIEWING GLOBAL/LOCAL COORDINATES .................................................................................................47
4.20 SETTING CELL LABELS ..............................................................................................................................47
4.21 LEVEL PULLDOWN MENU .........................................................................................................................47
5.0 THE MAIN MENU .....................................................................................................................................48
6.0 THE FILE MENU OPTION ......................................................................................................................50
7.0 THE INPUT WINDOW..............................................................................................................................51
8.0 THE SURFACE WINDOW .......................................................................................................................51
8.1 CREATING A SURFACE ...............................................................................................................................52

i
MCNP Visual Editor Manual

8.2 EXAMPLE: CREATING THE SIMPLEST SURFACE ........................................................................................53


8.3 SCANNING A SURFACE ..............................................................................................................................53
8.4 DELETING A SURFACE ...............................................................................................................................54
8.5 EDITING A SURFACE ..................................................................................................................................54
8.6 HIDING AND SHOWING SURFACES .............................................................................................................54
8.7 SURFACE COMMENTS ................................................................................................................................54
8.8 ENTERING SURFACE DIMENSIONS IN INCHES ............................................................................................54
8.9 SURFACE DISTANCE ..................................................................................................................................54
8.10 SURFACE DELTA .......................................................................................................................................55
8.11 MACROBODY SURFACES ...........................................................................................................................55
8.12 EXAMPLE: USING ALL THE VISUAL EDITOR SURFACE CREATION TOOLS .................................................56
8.13 THE SURFACE WIZARD .............................................................................................................................64
8.13.1 Example: Creating a Rotated Ellipsoid with the Surface Wizard......................................................65
8.14 SURFACE TYPES ........................................................................................................................................70
8.14.1 Planes .................................................................................................................................................70
8.14.2 Spheres ...............................................................................................................................................72
8.14.3 Cylinders.............................................................................................................................................74
8.14.4 Cones ..................................................................................................................................................76
8.14.5 SQ Surfaces ........................................................................................................................................78
8.14.6 GQ Surfaces........................................................................................................................................79
8.14.7 Torus...................................................................................................................................................81
8.14.8 Points..................................................................................................................................................82
8.14.9 Macrobodies .......................................................................................................................................83
9.0 THE CELL WINDOW ...............................................................................................................................90
9.1 CREATING A CELL ....................................................................................................................................91
9.1.1 Material Number ................................................................................................................................91
9.1.2 Material Density .................................................................................................................................91
9.1.3 Fill Number/Universe Number ...........................................................................................................91
9.1.4 Select Surfaces....................................................................................................................................91
9.1.5 Set Cell Sense .....................................................................................................................................92
9.1.6 Paste and Cut .....................................................................................................................................92
9.1.7 Define Additional Regions..................................................................................................................92
9.1.8 Register...............................................................................................................................................92
9.2 DISCUSSION OF CELL PASTE AND CUT OPERATIONS .................................................................................92
9.2.1 Example: Cell Sense Illustration .......................................................................................................93
9.3 SPECIAL SENSE CONSIDERATIONS .............................................................................................................99
9.4 CREATING A CELL WITH UNIVERSES .........................................................................................................99
9.5 USING UNDO ...........................................................................................................................................100
9.6 REGISTER ................................................................................................................................................100
9.7 SCANNING A CELL ...................................................................................................................................100
9.8 DELETING A CELL ...................................................................................................................................100
9.9 EDITING A CELL ......................................................................................................................................101
9.10 CREATE LIKE...........................................................................................................................................101
9.11 HIDING AND SHOWING CELLS .................................................................................................................101
9.12 CELL COMMENTS ....................................................................................................................................101
9.13 SPLITTING A CELL....................................................................................................................................101
9.14 THE CELL WIZARD ..................................................................................................................................103
10.0 CREATING LATTICE CELLS ..............................................................................................................107
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
MCNP Visual Editor Manual

10.3 THE HEXAGONAL LATTICE PANELS ........................................................................................................138


10.4 CREATING A HEXAGONAL LATTICE ........................................................................................................139
10.4.1 Example: Creation of a Two Dimensional Hexagonal Lattice ........................................................141
10.4.2 Example Creation of a Three Dimensional Hexagonal Lattice ........................................................148
10.4.3 Example: Moving the Center of An Existing Hexagonal Lattice ......................................................164
10.5 SPECIAL HEX LATTICE DISPLAY OPTIONS ...............................................................................................169
11.0 MATERIALS.............................................................................................................................................169
11.1 CREATING A MATERIAL ..........................................................................................................................170
11.1.1 Example: Creating Water (H2O) .....................................................................................................171
11.2 SCANNING A MATERIAL ..........................................................................................................................172
11.3 DELETE A MATERIAL ..............................................................................................................................172
11.4 EDIT A MATERIAL ...................................................................................................................................172
11.5 THE VISED.DEFAULTS FILE ......................................................................................................................173
11.6 MATERIAL LIBRARY................................................................................................................................175
11.6.1 Example: Add the Material Aluminum from the Library.................................................................176
11.7 MATERIAL OPTIONS ................................................................................................................................177
12.0 IMPORTANCES.......................................................................................................................................177
12.1 SETTING CELL IMPORTANCES..................................................................................................................177
12.2 USING A SCALE FACTOR .........................................................................................................................178
12.3 USING A GEOMETRIC FACTOR .................................................................................................................178
12.4 THE IMPORTANCE DISPLAY .....................................................................................................................178
12.5 TRUNCATING IMPORTANCES....................................................................................................................178
12.6 AN EXAMPLE USING IMPORTANCES ........................................................................................................178
13.0 TRANSFORMATIONS............................................................................................................................183
13.1 EXAMPLE: CREATING A TRANSFORMATION ............................................................................................184
13.2 EXAMPLE: MODIFYING AN EXISTING TRANSFORMATION TO INCLUDE ROTATION...................................186
14.0 RENUMBER CELLS/SURFACES .........................................................................................................188
15.0 RUN MCNP ...............................................................................................................................................189
16.0 PARTICLE DISPLAY..............................................................................................................................190
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
MCNP Visual Editor Manual

17.3 OPENING THE TALLY FILE .......................................................................................................................214


17.4 PLOTTING THE TALLY FILE .....................................................................................................................214
17.5 TALLY PLOT OPTIONS .............................................................................................................................214
17.5.1 Example: Displaying a Tally Plot.....................................................................................................214
18.0 CROSS SECTION PLOTS.......................................................................................................................220
18.1 EXAMPLE: CROSS SECTION PLOTTING.....................................................................................................221
19.0 3D RAY TRACED PLOTTING...............................................................................................................222
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 DYNAMIC 3D DISPLAY.........................................................................................................................260
20.1 EXAMPLE: DYNAMIC 3D DISPLAY ..........................................................................................................263
21.0 CAD IMPORT...........................................................................................................................................266
21.1 2D CAD IMPORT .....................................................................................................................................267
21.2 3D CAD IMPORT .....................................................................................................................................269
21.3 CONSTRAINTS/RESTRICTIONS FOR 3D CAD CONVERSION ......................................................................271
21.4 USING CAD AS A GRAPHICAL USER INTERFACE FOR MCNP WITH PERIMETER MODELING ....................272
21.5 3D DISPLAY OF IMPORTED CAD FILES ...................................................................................................272
21.6 EXAMPLE: IMPORTING A CUBE ...............................................................................................................273
21.7 EXAMPLE: IMPORTING A MORE COMPLEX SAT FILE ..............................................................................275
21.8 EXAMPLE IMPORTING A VERY COMPLEX SAT FILE ................................................................................276
21.9 CONVERSION OF LARGE FILES ................................................................................................................282
21.10 EXAMPLE: IMPORTING 1000 SPHERES ....................................................................................................284
22.0 READ AGAIN ...........................................................................................................................................286
23.0 BACKUP INP ............................................................................................................................................287
24.0 PROBLEM REPORTING........................................................................................................................287
25.0 APPENDIX A ................................................................................................................................................2
26.0 APPENDIX B.................................................................................................................................................1

iv
MCNP Visual Editor Manual

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

v
MCNP Visual Editor Manual

FIGURE 8-11 THE SURFACE WIZARD ...........................................................................................................................64


FIGURE 8-12 A ROTATED GQ ELLIPSOID.....................................................................................................................65
FIGURE 8-13 THE SURFACE WIZARD – PANEL 1 ..........................................................................................................66
FIGURE 8-14 THE SURFACE WIZARD – PANEL 2 ..........................................................................................................66
FIGURE 8-15 THE SURFACE WIZARD – PANEL 3 ..........................................................................................................67
FIGURE 8-16 THE SURFACE WIZARD – PANEL 3 ADJUST VECTOR ...............................................................................68
FIGURE 8-17 THE SURFACE WIZARD – PANEL 4 ..........................................................................................................69
FIGURE 8-18 DISPLAY ELLIPSOID ................................................................................................................................70
FIGURE 9-1 THE CELL WINDOW ..................................................................................................................................91
FIGURE 9-2 TWO SEQUENTIAL PASTE OPERATIONS .....................................................................................................93
FIGURE 9-3 AN L SHAPED CELL. ..................................................................................................................................94
FIGURE 9-4 SURF, CELL, AND UNUSED CHECKBOXES..................................................................................................95
FIGURE 9-5 CREATING THE FIRST PASTE. .....................................................................................................................96
FIGURE 9-6 CREATING THE SECOND PASTE..................................................................................................................97
FIGURE 9-7 JUSTIFICATION FOR USING TWO PASTE OPERATIONS. ..............................................................................98
FIGURE 9-8 FINAL DISPLAY .........................................................................................................................................99
FIGURE 9-9 CELL SPLITTING OPTIONS .......................................................................................................................102
FIGURE 9-10 SET THE MODE TO CREATE ...................................................................................................................103
FIGURE 9-11 SELECT THE SURFACES .........................................................................................................................103
FIGURE 9-12 USE THE MOUSE TO SET THE SURFACE SENSE ......................................................................................104
FIGURE 9-13 SELECT PASTE TO ADD THE REGION .....................................................................................................104
FIGURE 9-14 SELECT THE OPTION TO CONTINUE TO CREATE THE SECOND REGION ..................................................104
FIGURE 9-15 DRAG ACROSS SURFACES FOR THE SECOND REGION ............................................................................104
FIGURE 9-16 SET THE SENSE FOR THE SECOND REGION ............................................................................................105
FIGURE 9-17 PASTE THE SECOND REGION .................................................................................................................105
FIGURE 9-18 SELECT THE OPTION TO CONTINUE TO CREATE THE THIRD REGION .....................................................105
FIGURE 9-19 DRAG ACROSS SURFACES FOR THE THIRD REGION ................................................................................105
FIGURE 9-20 SET THE SENSE FOR THE THIRD REGION ...............................................................................................106
FIGURE 9-21 PASTE THE THIRD REGION ....................................................................................................................106
FIGURE 9-22 SELECT FINISH TO CREATE THE CELL ...................................................................................................106
FIGURE 9-23 CREATE THE CELL ................................................................................................................................106
FIGURE 10-1 EXAMPLE LATTICE CARDS ...................................................................................................................107
FIGURE 10-2 UNIVERSE FILL VALUES .......................................................................................................................108
FIGURE 10-3 INVOKING THE RECTANGULAR LATTICE WIZARD .................................................................................109
FIGURE 10-4 THE RECTANGULAR LATTICE PANELS ..................................................................................................109
FIGURE 10-5 SELECT AXIAL INDEX -1 AND SET UNIVERSE TO 2................................................................................110
FIGURE 10-6 SELECT UNIVERSE 2 .............................................................................................................................111
FIGURE 10-7 SELECT ROW 1 AND SET UNIVERSE TO 6 ..............................................................................................111
FIGURE 10-8 SELECT I=1 AND SET UNIVERSE TO 8 ....................................................................................................112
FIGURE 10-9 SELECT J=1 AND SET UNIVERSE TO 9 ....................................................................................................112
FIGURE 10-10 CREATING A RECTANGULAR LATTICE ................................................................................................114
FIGURE 10-11 CREATING THE OUTER WORLD. ..........................................................................................................115
FIGURE 10-12 CREATING A LATTICE CELL. ...............................................................................................................116
FIGURE 10-13 CHOOSE A 2D LATTICE IN X AND Y....................................................................................................116
FIGURE 10-14 LATTICE PARAMETERS .......................................................................................................................117
FIGURE 10-15 CREATE THE SURFACE FOR UNIVERSE 2 .............................................................................................118
FIGURE 10-16 CREATE THE INSIDE OF THE SPHERE FOR UNIVERSE 2. ........................................................................119
FIGURE 10-17 RESULTING FILE .................................................................................................................................120
FIGURE 10-18 A MORE COMPLEX RECTANGULAR LATTICE ......................................................................................121
FIGURE 10-19 CREATING SURFACES FOR THE CELL THAT HOLDS THE LATTICE........................................................122
FIGURE 10-20 CREATING THE CELL THAT HOLDS THE LATTICE. ...............................................................................123
FIGURE 10-21 – SET THE UNIVERSE FILL TO 9............................................................................................................124
FIGURE 10-22 CREATING THE LATTICE CELL ............................................................................................................124
FIGURE 10-23 – DEFINE PITCH AND NUMBER OF ROWS .............................................................................................125
FIGURE 10-24 – SETTING COLUMN I=2 TO UNIVERSE 3 .............................................................................................127
FIGURE 10-25 – FILL THE REST WITH UNIVERSE 5......................................................................................................128

vi
MCNP Visual Editor Manual

FIGURE 10-26 ADD BERYLLIUM. ...............................................................................................................................129


FIGURE 10-27 – CREATE THE SPHERICAL SURFACE. ...................................................................................................130
FIGURE 10-28 – CREATING UNIVERSE 3 .....................................................................................................................130
FIGURE 10-29 – OUTSIDE WORLD FOR UNIVERSE 3 ...................................................................................................131
FIGURE 10-30 – CREATE UNIVERSE 5.........................................................................................................................132
FIGURE 10-31 – FINAL DISPLAY.................................................................................................................................134
FIGURE 10-32 LATTICE WITH AN EVEN NUMBER OF ELEMENTS .................................................................................135
FIGURE 10-33 DISPLAY WITH LATTICE CENTER MOVED TO LOWER LEFT.................................................................137
FIGURE 10-34 LATTICE WITH SPHERE ORIGINS MODIFIED. .......................................................................................138
FIGURE 10-35 INVOKING THE HEXAGONAL LATTICE WIZARD ...................................................................................138
FIGURE 10-36 THE HEXAGONAL LATTICE PANELS ....................................................................................................139
FIGURE 10-37 CREATING A HEXAGONAL LATTICE ....................................................................................................141
FIGURE 10-38 CREATING THE OUTER WORLD. ..........................................................................................................142
FIGURE 10-39 CREATING A LATTICE CELL. ...............................................................................................................143
FIGURE 10-40 CHOOSE A 2D XY HEX WITH TWO PX PLANES ...................................................................................143
FIGURE 10-41 LATTICE PARAMETERS .......................................................................................................................144
FIGURE 10-42 CREATE THE SURFACE FOR UNIVERSE 2 .............................................................................................145
FIGURE 10-43 CREATE THE INSIDE OF THE SPHERE FOR UNIVERSE 2. ........................................................................146
FIGURE 10-44 FINAL RESULT ....................................................................................................................................147
FIGURE 10-45 A MORE COMPLEX HEXAGONAL LATTICE..........................................................................................148
FIGURE 10-46 CREATING SURFACES FOR THE CELL THAT HOLDS THE LATTICE........................................................149
FIGURE 10-47 – CREATING THE CELL THAT HOLDS THE LATTICE. .............................................................................150
FIGURE 10-48 – SET THE UNIVERSE FILL TO 9............................................................................................................151
FIGURE 10-49 – CREATING THE LATTICE CELL ..........................................................................................................152
FIGURE 10-50 – DEFINE PITCH AND NUMBER OF ROWS .............................................................................................153
FIGURE 10-51 SETTING ROWS 1-3 TO UNIVERSE 3 ....................................................................................................155
FIGURE 10-52 FILL THE REST WITH UNIVERSE 5........................................................................................................156
FIGURE 10-53 TILT THE BASIS ...................................................................................................................................157
FIGURE 10-54 ADD BERYLLIUM. ...............................................................................................................................158
FIGURE 10-55 – CREATE THE SPHERICAL SURFACE. ...................................................................................................159
FIGURE 10-56 – CREATING UNIVERSE 3 .....................................................................................................................160
FIGURE 10-57 – OUTSIDE WORLD FOR UNIVERSE 3 ...................................................................................................161
FIGURE 10-58 – CREATE UNIVERSE 5.........................................................................................................................162
FIGURE 10-59 – FINAL DISPLAY.................................................................................................................................164
FIGURE 10-60 OFF-CENTER LATTICE ........................................................................................................................165
FIGURE 10-61 CHANGING THE BASIS VECTOR ...........................................................................................................165
FIGURE 10-62 TRANSLATING THE CENTER OF THE (0,0,0) ELEMENT .........................................................................167
FIGURE 11-1 THE MATERIAL CREATION WINDOWS ..................................................................................................170
FIGURE 11-2 CREATE THE HYDROGEN ISOTOPE IN WATER (H2O).............................................................................171
FIGURE 11-3 SELECT “FILES” TO SET THE LOCATION OF THE MATERIAL LIBRARY AND XSDIR FILES ..........................174
FIGURE 11-4 ADDING THE MATERIAL ALUMINUM FROM THE LIBRARY. ...................................................................176
FIGURE 12-1 THE IMPORTANCE WINDOW..................................................................................................................177
FIGURE 12-2 PARTICLE TRACK PLOT OF THREE LEAD SLABS WITH IMPORTANCE OF 1 .............................................179
FIGURE 12-3 PARTICLE TRACK PLOT OF THREE LEAD SLABS WITH IMPORTANCES OF 1, 8, AND 64 ..........................179
FIGURE 12-4 SET THE IMPORTANCE OF CELL 4 TO 8. .................................................................................................180
FIGURE 12-5 SET THE IMPORTANCE OF CELL 5 TO 64 ................................................................................................181
FIGURE 12-6 CHANGE DISPLAY TO POWER OF 2........................................................................................................182
FIGURE 13-1 USING A TRANSFORMATION CARD TO CREATE A COPIED CELL ...........................................................183
FIGURE 13-2 THE TRANSFORMATION WINDOW .........................................................................................................184
FIGURE 13-3 CREATE A TRANSFORMATION WITH 60 CM OFFSET IN X AND Y............................................................185
FIGURE 13-4 CREATE A CELL USING THE TRANSFORMATION....................................................................................185
FIGURE 13-5 MODIFYING AN EXISTING TRANSFORMATION TO INCLUDE ROTATION. ................................................186
FIGURE 13-6 CUBE WITH OFFSET AND ROTATION .....................................................................................................187
FIGURE 14-1 SURFACE/CELL RENUMBER PANEL .......................................................................................................188
FIGURE 15-1 THE RUN PANEL ...................................................................................................................................189
FIGURE 16-1 THE PARTICLE DISPLAY WINDOW ........................................................................................................190

vii
MCNP Visual Editor Manual

FIGURE 16-2 THE SDEF SOURCE PLOTTING PANEL ..................................................................................................191


FIGURE 16-3 SDEF PLOT OF U235 SPHERE. ..............................................................................................................193
FIGURE 16-4 CREATING AN SDEF PARTICLE TRACK PLOT .......................................................................................196
FIGURE 16-5 SDEF PARTICLE TRACK BY WEIGHT WITH SIZE 3 PIXEL .......................................................................197
FIGURE 16-6 KCODE SOURCE GENERATION POINT DISPLAY PANEL .......................................................................199
FIGURE 16-7 RUN AND PLOT KCODE.......................................................................................................................201
FIGURE 16-8 - CHOOSING A COLOR ............................................................................................................................202
FIGURE 16-9 - KCODE PLOT WITH BLUE, SIZE 3, PARTICLES ....................................................................................203
FIGURE 17-1 THE TALLY PLOTTING WINDOW ...........................................................................................................204
FIGURE 17-2 THE 2D PLOT TAB ................................................................................................................................206
FIGURE 17-3 THE MESH PLOTTING TAB ....................................................................................................................207
FIGURE 17-4 THE CONTOUR PLOTTING TAB ..............................................................................................................208
FIGURE 17-5 ADDITIONAL CONTOUR PLOT OPTIONS .................................................................................................209
FIGURE 17-6 THE FLUCTUATION TAB ........................................................................................................................210
FIGURE 17-7 THE KCODE TAB .................................................................................................................................211
FIGURE 17-8 THE ITALLY INPUT FILE ........................................................................................................................215
FIGURE 17-9 ENTER RUN PARAMETERS. ...................................................................................................................216
FIGURE 17-10 RUN MCNP TO GENERATE TALLY FILE ..............................................................................................217
FIGURE 17-11 READ IN THE RUNTPE FILE. .................................................................................................................218
FIGURE 17-12 SPECIFY A LOGLOG FILE .....................................................................................................................219
FIGURE 17-13 TALLY PLOT OF ITALLY INPUT FILE. ...................................................................................................220
FIGURE 18-1 THE CROSS SECTION PLOTTING WINDOW ............................................................................................221
FIGURE 18-2 CREATING A CROSS SECTION PLOT.......................................................................................................222
FIGURE 19-1 TWO DIFFERENT TYPES OF 3D RENDERING ..........................................................................................223
FIGURE 19-2 INPUT FILE FOR BOX WITH DOORWAY ..................................................................................................224
FIGURE 19-3 NORMAL 3D PLOT OF A SPHERE ...........................................................................................................225
FIGURE 19-4 3D VIEW OF BOX WITH FREESTANDING DOORWAY ..............................................................................227
FIGURE 19-5 2D VIEWS OF BOX AND DOORWAY. ......................................................................................................228
FIGURE 19-6 LEFT PLOT WINDOW .............................................................................................................................229
FIGURE 19-7 USING THE RIGHT PLOT WINDOW TO SET THE VIEWPOINT FOR THE LEFT PLOT WINDOW ....................230
FIGURE 19-8 3D PLOT OF BOX AND DOORWAY AT (0.-100,0) ...................................................................................231
FIGURE 19-9 3D PLOT OF BOX AND DOORWAY WITH VIEWPOINT AT (0, -100, 25)....................................................232
FIGURE 19-10 3D PLOT OF BOX AND DOORWAY WITH VIEWPOINT AT (0, -100, -25) ................................................233
FIGURE 19-11 BOX AND DOORWAY WITH VIEWPOINT AT (0,49,0) ............................................................................234
FIGURE 19-12 3D PLOT OF BOX AND DOORWAY WITH VIEWPOINT AT (100, -200, 0)................................................235
FIGURE 19-13 BEFORE AND AFTER 2D PLOTS WITH “UPDATE PLOT BASIS” TURNED ON. .........................................236
FIGURE 19-14 CREATE THE COOKIE CUTTER SURFACES ...........................................................................................238
FIGURE 19-15 CREATE THE COOKIE CUTTER CELL ...................................................................................................239
FIGURE 19-16 SET THE POINT OF REFERENCE AND REGISTER ...................................................................................240
FIGURE 19-17 SPHERE WITH COOKIE CUTTER CELL ..................................................................................................241
FIGURE 19-18 ROTATE THE IMAGE ............................................................................................................................242
FIGURE 19-19 DETERMINE THE COORDINATES FOR THE VIEWPOINT. .......................................................................243
FIGURE 19-20 SET THE 3D PLOT PARAMETERS. ........................................................................................................244
FIGURE 19-21 3D PLOT WITH COOKIE CUTTER CELL ................................................................................................245
FIGURE 19-22 3D PLOT AT RESOLUTION OF 2000. .....................................................................................................246
FIGURE 19-23 RADIOGRAPHIC PLOTS OF A CASK .......................................................................................................247
FIGURE 19-24 RADIOGRAPHIC PLOT OF A SPHERE OF U235 ENCASED IN A SPHERE OF LEAD. ..................................248
FIGURE 19-25 INITIAL RADIOGRAPHIC PLOT .............................................................................................................249
FIGURE 19-26 3D RADIOGRAPHIC PLOT WITH CORRECTED RAY LENGTH .................................................................250
FIGURE 19-27 3D RADIOGRAPHIC PLOT WITH DARKNESS = RAY LENGTH * CROSS SECTION ...................................251
FIGURE 19-28 TRANSPARENT 3D PLOT OF A GLOVE BOX .........................................................................................252
FIGURE 19-29 3D TRANSPARENT PLOT OF FIVE SPHERES IN A CONCRETE SPHERE. ..................................................253
FIGURE 19-30 SET THE EXTENTS TO 150. ..................................................................................................................254
FIGURE 19-31 INITIAL 3D TRANSPARENT PLOT .........................................................................................................255
FIGURE 19-32 VALUES FOR A TRANSPARENCY PLOT.................................................................................................256
FIGURE 19-33 SECOND TRANSPARENT 3D PLOT. ......................................................................................................257

viii
MCNP Visual Editor Manual

FIGURE 19-34 CALCULATED VALUES FROM SECOND PLOT. ......................................................................................258


FIGURE 19-35 THIRD 3D TRANSPARENT PLOT ..........................................................................................................259
FIGURE 19-36 FOURTH 3D TRANSPARENT PLOT .......................................................................................................260
FIGURE 20-1 DYNAMIC 3D DISPLAY .........................................................................................................................261
FIGURE 20-2 DYNAMIC 3D DISPLAY WITH A TRANSPARENT GEOMETRY ...................................................................262
FIGURE 20-3 3D DISPLAY OF BOX AND DOORWAY ....................................................................................................263
FIGURE 20-4 ROTATE OBJECT. ...................................................................................................................................265
FIGURE 20-5 TRANSPARENT BOX AND DOORWAY.....................................................................................................266
FIGURE 21-1 CAD GEOMETRY BEFORE AND AFTER SEGMENTATION .........................................................................267
FIGURE 21-2 CAD GEOMETRY BEFORE AND AFTER CONVERSION ..............................................................................268
FIGURE 21-3 ASSORTED CAD OBJECTS DRAWN IN A CAD PACKAGE ......................................................................270
FIGURE 21-4 CAD OBJECTS IN THE VISUAL EDITOR AFTER CONVERSION.................................................................271
FIGURE 21-5 3D CAD VISUALIZATION .....................................................................................................................273
FIGURE 21-6 3D DISPLAY OF IMPORTED SAT CUBE..................................................................................................274
FIGURE 21-7 3D IMAGE OF IMPORTED CAD FILE OF A GAZEBO. ...............................................................................275
FIGURE 21-8 MAKING A SURFACE TRANSPARENT. ....................................................................................................276
FIGURE 21-9 3D DISPLAY OF OFFICE SAT FILE ........................................................................................................277
FIGURE 21-10 REMOVING EXTERIOR WALLS ............................................................................................................278
FIGURE 21-11 SETTING THE LEFT PLOT ORIGIN. .......................................................................................................279
FIGURE 21-12 SETTING THE RIGHT PLOT ORIGIN. .....................................................................................................280
FIGURE 21-13 2D PLOT OF THE CONVERTED OFFICE FILE.........................................................................................281
FIGURE 21-14 3D DISPLAY OF 1,000-SPHERE GEOMETRY.........................................................................................282
FIGURE 21-15 MCNP GEOMETRY WITH 1,000 SPHERES............................................................................................283
FIGURE 21-16 1000 SPHERES INSIDE CUBE ...............................................................................................................284
FIGURE 21-17 1000 SPHERES WITH OUTER BOX TRANSPARENT................................................................................285
FIGURE 21-18 MAKING THE INNER BOXES HIDDEN OR TRANSPARENT. ....................................................................286

ix
MCNP Visual Editor Manual

List of Tables

TABLE 1-1 OPERATING SYSTEM COMPATIBILITY ..........................................................................................................2


TABLE 2 INPUT FILES USED IN THIS MANUAL ...............................................................................................................3
TABLE 2-3 FILES USED BY THE VISUAL EDITOR ............................................................................................................8
TABLE 4 – VALID LABEL TYPES USED BY MCNP........................................................................................................47
TABLE 5-1 OVERVIEW OF THE MAIN MENU OPTIONS AND THEIR PURPOSE ................................................................48
TABLE 2 MCNP/MCNPX TALLY CARDS12 ...............................................................................................................212
TABLE 3 VALID TALLY NUMBERS .............................................................................................................................213

10
MCNP Visual Editor Manual

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.

1.2 Installation Notes


For many applications, the Visual Editor executable can be used as distributed. The most current
information about resolving any installation problems is on the website at
http://www.mcnpvised.com/HelpAndSupport/HelpAndSupport.html.

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.

1.3 Operating System Requirements


The development of the Windows Visual Editor utilized computers running a Windows 2000 and
a Windows XP platform. For best performance, it is recommended that users run the Visual
Editor in Windows 2000 or Windows XP. The Visual Editor has not been tested on Windows
Vista. Table 1-1 below lists the different operating systems and what is known about its
compatibility with the Visual Editor. If an operating system is not listed, then the code has not
been tested on that platform and its functionality is not known.

Table 1-1 Operating System Compatibility


Operating System Compatibility
Windows Vista The Visual Editor has not been tested on Vista. Its behavior on that
platform is unknown. As of 2007, there are not any plans to test the
Visual Editor extensively on the Vista platform. If you are using Vista
and encounter difficulties, please report them to Randy at
mailto:randyschwarz@mcnpvised.com?subject=Vista Platform Problems.
Windows 2000 Most compatible, this is the Visual Editor development platform.
Windows XP Most compatible, this is also a development platform and should be just as
stable.
Windows NT Somewhat unstable, not recommended.
Windows 98 Very unstable, not recommended.
Windows 95 Very unstable, not recommended.

Page 2 of 288
MCNP Visual Editor Manual

2.0 A Brief Overview


2.1 User Resources
2.1.1 Utilizing this Manual
A new user with no previous experience with MCNP/MCNPX should read the MCNP or
MCNPX manual to become familiar with the terminology and conventions used by
MCNP/MCNPX. At a minimum, Chapter 1 Overview and the Chapter 1 – Primer sections in the
MCNP manual are recommended or Section 1 – Introduction in the MCNPX manual.
In this manual, the new Visual Editor user with some experience with MCNP/MCNPX and with
an operating system of Windows 2000 or XP should start with Section 3.0 Getting Started with
Two Simple Examples. The first example, 3.1 Example: Displaying and Plotting an Existing File
provides step-by-step instructions on the use of the Visual Editor’s powerful plotting and display
features. The second example, 3.2 Example: Create Simple Geometries Using the Visual Editor,
explains input file creation. Both examples should be understandable to users with little or no
experience with the Visual Editor or MCNP.
More experienced users can research individual topics by utilizing the Table of Contents or the
Index.

2.1.1.1 Input Files Used In this Manual


The input file names, and where they are used in this manual, are listed in Table 2.
These files can be downloaded from the Visual Editor website at:
www.mcnpvised.com/sample_exercises/sample_exercises.html
Table 2 Input Files Used In This Manual
Filename Use of the File
1000spheres_in_boxes.sat CAD SAT file for CAD import exercise. See Section 21.10.
cube.sat CAD SAT file of a simple cube for CAD import exercise. See
Section 21.6.
i3ddynamic Used for the 3D dynamic display of a box with a free-standing
doorway. See Section 20.1.
i3dplot1 Creating a 3D Ray Traced plot of a sphere of Aluminum. See
Section 19.1.2.
i3dplot2 Create a cookie cutter cell for use with a sphere of Uranium encased
in a sphere of Lead. See Section 19.10.1.
i3dplot3 Create a cut-away view of a sphere of Uranium encased in a sphere
of Lead using a cookie cutter cell. See Section 19.10.2.
i3drad1 Create two radiographic plots of a sphere of U235 encased in a
sphere of lead. See Section 19.13.1.
iex1 An overview of plotting features in the Visual Editor. See Section
3.1.
iex2 An overview of the input file creation features in the Visual Editor.
See Section 3.2.

Page 3 of 288
MCNP Visual Editor Manual

ihexlat1 Final result for an exercise that creates a simple 2D hexagonal


lattice. See Section 10.2.1.
ihexlat2 Final result for an exercise that creates a simple 3D hexagonal
lattice. See Section 10.2.2.
ihexlat3 An off-center hexagonal lattice. The exercise will move the
hexagonal lattice to center it. See Section 10.4.3.
ikode A sphere of uranium with a KCODE source for KCODE source
plotting. See Section 16.3.1.
isdef A sphere of uranium with a SDEF source for SDEF source plotting.
See Section 16.1.1.
isense 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.
islab Three infinite slabs of lead between a ource and the outside world.
The exercise illustrates setting importances. See Section 12.6.
isqulat1 Final result for an exercise that creates a simple 2D square lattice.
See Section 10.2.1.
isqulat2 Final result for an exercise that creates a simple 2D square lattice.
See Section 10.2.2
isqulat21 An off-center square lattice. The exercise will move the square
lattice to center it. See Section 10.2.3.
itally Create a Tally Plot of a sphere of Uranium. See Section 17.5.1.
itransform 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.
itransparent Four small spheres inside a sphere of concrete. The example will
create a transparent plot of the geometry. See Section 19.14.1.
iviewpoint Used for an exercise explaining how to choose a viewpoint for use
in a 3D Ray Traced Plot. See Section19.1.3.

2.1.2 Online Help


The contents of this manual are also contained in the Visual Editor Help package, and can be
accessed by selecting Help…Help Topics from the main menu. The help package contains a
table of contents and is searchable. Additionally, each of the individual windows has a help
button that will take the user to the appropriate section of the help package.

2.1.3 The LANL MCNP Manual


The MCNP manual, authored by LANL, provides in-depth information about MCNP. This
manual supplements that information by covering topics specific to the Visual Editor and by
providing general information about MCNP where it necessary for understanding of Visual
Editor features.

Page 4 of 288
MCNP Visual Editor Manual

2.1.4 The LANL MCNPX Manual


The MCNPX manual, authored by LANL, provides in-depth information about MCNPX. This
manual supplements that information by covering topics specific to the Visual Editor and by
providing general information about MCNPX where it necessary for understanding of Visual
Editor features.

2.1.5 The Visual Editor Website


The Visual Editor website (www.mcnpvised.com) contains the most recent development
information (new features, known bugs, new and unique uses of existing features). Several
training classes are offered and formal training is recommended due to the complex nature of the
MCNP/MCNPX software and of the Visual Editor.

2.2 Creating Geometries


To create a new geometry using the Visual Editor, you create surfaces by selecting Surface from
the main menu and following the instructions beginning in Section 8.0 for the surface window –
even experienced users may find it convenient to just use the surface wizard discussed in Section
8.13 to create new surfaces. These surfaces can then be used to create cells, by selecting Cell
from the main menu and following the instructions beginning in Section 9.0 for the cell window.
A Cell Wizard, discussed in Section 9.14, is also available to aid in the creation of cells.
For users who are comfortable creating files in an external editor (for example, Microsoft
WordPad or Microsoft Word) see Section 2.4.

Page 5 of 288
MCNP Visual Editor Manual

2.3 The Input Window

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 File…Open 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.

2.4 Modifying the Input File Using an External Editor


The user can create or modify an input file using an external editor while viewing it in the
Visual Editor. To use this approach:
In the External Editor

Page 6 of 288
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 File…Open(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

2.5 Reading and Writing Input Files


The attempt is made to read the MCNP/MCNPX input file and write out the same information to
the inpn file. If the input file is created outside the Visual Editor, you will find that when you
save it, the Visual Editor will change the order of the lines in the input file. If the user does not
want the Visual Editor to change the input file, they can open up the input file with the
File…Open(do not modify input) option. In this mode, however, the creation capabilities of
the Visual Editor are disabled and the Visual Editor is only used for plotting. See Section 2.4
and Section 22.0 for more information about this mode.
Below is the order in which the Visual Editor writes out the input file:
1. Title card
2. Cell Cards

Page 7 of 288
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 File…Open (do not modify input)
option or by using the Read Again option

2.6 Saving Files


When doing a Save – Update command, the Visual Editor writes out the input to a temporary
file name called inpn. When you are ready to save the file to a permanent file, use the
File…Save command or the File…SaveAs command.

2.7 Automatic Backups and Error Handling


The Visual Editor will automatically back up the file every five minutes to a file called
“inpn.sav”, so if the Visual Editor crashes, you will not lose more than 5 minutes of work. Also,
if the Visual Editor encounters a MCNP fatal error that it can not recover from, it will try to save
the input into a file called “inpcrash”.
Error and information messages are sent to the text window that is located under the main menu.

2.8 Important Files in the Visual Editor


Table 2-3 shows a list of the files used by the Visual Editor. The Visual Editor prints out a
number of auxiliary files. Because of this, you may want to run the Visual Editor in its own
directory and transfer the input files you are creating or working on to that directory.
Table 2-3 Files used by the Visual Editor
File Name Description

Page 8 of 288
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 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.
inpn1, inpn2, By selecting “backup” from the main menu a new inpn? (inpn1, inpn2, inpn3,
inpn3, … …) file is created representing the contents of the current file being worked on.
inpn.sav 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.
inpcrash 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.
outp, outq, … 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.
inpt Temporary file used for 3D plotting and collision point plotting.
outp3d Output file for 3D plotting.
outmc 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.
vised.defaults 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.
stndrd.n Standard material file containing neutron cross sections available for all users.
stndrd.p Standard material file containing photon cross sections available for all users.
usr.n User specific material file containing neutron cross sections for the individual
user.
usr.p User specific material file containing photon cross sections for the individual
user.

Page 9 of 288
MCNP Visual Editor Manual

3.0 Getting Started with Two Simple Examples


The Visual Editor can greatly simplify input file creation. Its powerful visualization and plotting
capabilities also make it very useful for displaying and plotting existing files. Section 3.1gives a
step-by-step example of displaying and plotting an existing file. An example file is provided.
Section 3.2 provides detailed instructions on making a simple geometry.

3.1 Example: Displaying and Plotting an Existing File


In this example, a simple object will be read in from a file and displayed. Figure 3-1 shows the
final result.

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 Created on: Monday, June 26, 2006 at 13:09
1 0 (-1 -2 -3 -4 -5 -6 -7 )
2 0 (-1 -9 -10 -11 -12 -13 -14 )
3 0 (1 -16 -17 -18 -19 -20 )

Page 10 of 288
MCNP Visual Editor Manual

4 0 (20 -9 -2 -11 -4 -26 )


5 0 (1 :2 :3 :4 :5 :6 :7 )(1 :9 :10 :11 :12 :13 :14 )
(-1 :16 :17 :18 :19 :20 )(-20 :9 :2 :11 :4 :26 )

1 p 0 0 -1 -20
2 p -1 0 0 -7.5
3 p 0 -1 0 -7.5
4 p 1 0 0 17.5
5 p 0 1 0 17.5
6 p -0.51555198952256 0 0.85685829989522 21.839109075437
7 p 0.5 0 0.86602540378444 34.730762113533
8 p 0 0 -1 -20
9 p -6.1230317691119e-017 -1 0 17.5
10 p 1 -6.1230317691119e-017 0 -7.5
11 p 6.1230317691119e-017 1 0 -7.5
12 p -1 6.1230317691119e-017 0 17.5
13 p -3.1567412104755e-017 -0.51555198952256 0.85685829989522
34.727908813501
14 p 3.0615158845559e-017 0.5 0.86602540378444 22.230762113533
15 p 0 0 1 20
16 p 1 0 0 20
17 p 0 -1 0 20
18 p -1 0 0 20
19 p 0 1 0 20
20 p 0 0 -1 20
21 p 0 0 1 -20
22 p 0 -1 0 17.5
23 p -1 0 0 -7.5
24 p 0 1 0 -7.5
25 p 1 0 0 17.5
26 p 0 0 -1 30

mode N
imp:N 1 3r 0 $ 1, 5

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
MCNP Visual Editor Manual

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 File…Open… 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
MCNP Visual Editor Manual

Figure 3-4 Using Zoom to Magnify the Image


You should see a rectangle.

Figure 3-5 Result After Using Zoom

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.

Figure 3-6 Result after using Zoom Twice on Both Windows

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.

Figure 3-7 Result after Adjusting Extents

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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 File…Print… 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 View…Dynamic 3D Display… as shown in Figure 3-12.

Page 19 of 288
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

Figure 3-14 Dynamic 3D Plot of Cube Geometry

Figure 3-15 Rotated Cube Geometry Plot


When you are finished, exit the Visual Editor by clicking on File…Exit…

Page 21 of 288
MCNP Visual Editor Manual

3.2 Example: Create Simple Geometries Using the Visual Editor


This section will contain step by step instructions for creating an input file using the Visual
Editor. For this example, a cube within a sphere will be created. Figure 3-16 displays the
finished geometry.

Figure 3-16 Final Result of Geometry Creation Example.

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.

Figure 3-17 Startup Configuration for the Visual Editor

Page 23 of 288
MCNP Visual Editor Manual

Creating a Sphere

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
MCNP Visual Editor Manual

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 Surface…Plane…px. 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
MCNP Visual Editor Manual

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 Surface…Plane…py.
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 Surface…Plane…pz.
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
MCNP Visual Editor Manual

Create the Cube Cell

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

Figure 3-31 Geometry with Three Cells Created


Figure 3-31 shows the completed cells. Valid MCNP cells are shown in black.

4.0 The Visual Editor Plot Windows


The Visual Editor starts up with two default plot windows. Additional plot windows can be
created by selecting File…New View.
Figure 4-1 shows an expanded view of a Visual Editor plot window and the various plotting
options available on the top and side of the plot window. Also shown is the menu that is
displayed when you right click in the plot window. The top portion of this menu can be used to
change some of the plot parameters. Also, included in this menu are some shortcuts to common
surface and cell operations.
To print out a hard copy of a plot, select File…Print from the main menu and it will send the
contents of the currently selected window to the printer. To include plots in a document, right
click in the plot window and select the Send to Clipboard option. Then go into the text
document and select paste to paste.

Page 37 of 288
MCNP Visual Editor Manual

Figure 4-1 Plot Window Options

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.

4.2 Next and Last Button


The Last button enables you to go back to prior plots. Once you have used the Last button, the
Next button allows you to return to the view you had before you clicked Last. For instance, if
you use the Zoom button to zoom in on a region in the geometry, the Last button will take you
back to the “Unzoomed” view. All of the plot parameters are saved when the plot is changed
and Last will go backwards through the sequence of plots. The parameters changed by Origin,
Zoom and Basis can all be recalled with Last. Last remembers the last 1000 plots made for each
plot window.

4.3 Zoom Check Box

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
MCNP Visual Editor Manual

4.4 Origin Check Box

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.

Figure 4-5 Buss Cask Input File Plotted at the Origin

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
MCNP Visual Editor Manual

4.5 Changing the Extents

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
MCNP Visual Editor Manual

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.

4.6 Refresh Check Box


The Refresh check box defaults to the checked “on” position. Turn this check box off if you do
not want to update the plot window when cells or surfaces are modified or when Update Plots is
selected from the main menu. There are times when you may not want to update a particular
plot window. For example, you might want to turn off plotting if the view contains a large lattice
that is time consuming to plot. Be careful when you use this check box to turn off plotting, since
the plot will not be updated until you turn this check box on again.

4.7 The Surface and Cell Check Box


When the Surface check box is turned on, surface numbers will appear on the plots next to their
respective surface. If the check box is turned off, surface numbers do not appear. Next to the
surface check box is a text box where you can enter the font size to use for the surface label.
Increase this number to increase the label size
When the Cell check box is turned on, cell numbers will appear inside the cells. The meaning
of the “cell” number is determined by the cell label that has been selected. As with surface
numbers, the size of the font used for cell numbers can be changed by changing the number in
the text box.

Page 44 of 288
MCNP Visual Editor Manual

4.8 Unused
This check box displays surfaces that are not currently used as part of a cell.

4.9 Color Check Box


This check box will enable color plotting. The color can be set to represent Materials or any of
the items specified by the Color By option, as shown in Figure 4-1 Plot Window Options.

4.10 Facets Check Box


When displaying macrobody surfaces, this check box will change the display to include the
surface facet number when a macrobody surface is involved.

4.11 WW Mesh Check Box


By checking this check box, the weight window mesh will be displayed if this option is used in
the active input file.

4.12 Rect Check Box

Figure 4-9 Rectangular Display with Scales

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.

4.13 Tal Mesh Check Box


By checking this check box, the tally mesh will be displayed if the input file contains a tally
mesh.

4.14 Plot Rotation Options


The 2D plots can be rotated through three different angles. Selecting Axial will rotate the plot in
a counter clockwise direction around the axial axis pointing out of the plot window. The default
rotation angle is 15 degrees. The Vert option will rotate the 2D view along the angle between
the horizontal and axial vector. This will cause the view to rotate around the vertical axis. The
Horiz option will rotate the 2D view along the angle between the vertical and axial vector. This
will cause the view to rotate around the horizontal axis.

4.15 Scales Check Box


The Scales pull down menu allows you to display a border around the geometry plot or a grid
across the plot. This can only be seen if the Rect check box has been set. Figure 4-9 shows a
rectangular plot with the border feature turned on.

4.16 Res Text Box


The resolution text box sets the resolution for color plots. The default value is 300. The
maximum value is 3000. The higher the resolution, the better the color resolution on a color
plot. The drawing time will increase as this value increases.

4.17 Pscript Check Box


When this checkbox is selected, a postscript file is written to the out.ps file when the current
active plot when it is updated. This works for general geometry plots, particle collision plots and
3D plots.

4.18 Changing the Basis


One of the advantages of multiple plots is the ability to view the same geometry with multiple
cross sectional slices. This is especially helpful with complex three-dimensional geometries.
The first three text entries of the basis represent the horizontal axis vector of the plot and the
lower three text entries of the basis represent the vertical axis vector of the plot. The text entries
can be changed by hand and the plot will be updated to the indicated basis vectors by selecting
the Update button or Update Plots menu option to redraw the plots. The left plot in the Editor
defaults to an xz basis and the right defaults to a xy basis. Figure 4-7 shows a cask with the left
plot using an xz basis and the right plot using a xy basis. A Basis pull down menu is available in
the top left portion of the plot window with the choices of xy, xz, yx, yz, zx, and zy.
The basis menu is also available by clicking the right button in the plot window. The basis can
also be entered by hand by setting the six basis vectors and then selecting the Update button or
Update Plots menu option to redraw the plots. The code will normalize each basis vector and
adjust them, if necessary, to be normal.

Page 46 of 288
MCNP Visual Editor Manual

4.19 Viewing Global/Local Coordinates


The Global/Local menu determines how the displayed coordinates at the top of the plot window
are to be interpreted. With local set, the coordinates are for the universe prior to being
transformed because of a transformation or a fill, otherwise the coordinates are relative to the
origin of the geometry.

4.20 Setting Cell Labels


Selecting the Labels button with the right mouse button will bring up menu which lists the cell
labels recognized by MCNP. These labels are defined in the MCNP manual as: 12
Table 4 – Valid Label Types Used By MCNP
CEL cell names
IMP:p importances
RHO atom density
DEN mass density
VOL volume
FCL:p forced collision
MAS mass
PWT photon-production weight
MAT material number
TMPn temperature (n=index of time)
WWNn:p weight window lower bound (n=energy or time interval)
EXT:p exponential transform
PDn detector contribution (n=tally number)
DXC:p DXTRAN contribution
U universe
LAT lattice type
FILL filling universe
NONU fission turnoff
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.

4.21 Level Pulldown Menu


The level pulldown menu allows you to hide lower levels of a lattice for complex geometries that
have lattices inside of lattices, such as a reactor core filled with fuel assemblies. The geometry
will only be plotted to the level specified. Level 1 is the top level, normal geometries will plot at
this level. Level 3 will go down one universe level, level 5 will go down two universe levels.

Page 47 of 288
MCNP Visual Editor Manual

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.

5.0 The Main Menu


The main menu appears at the top of the screen and can be used to execute almost any command
in the Visual Editor.

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 Description
File Used to open and save MCNP input files. File…New 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 Plots Update both plot windows.
Surface Bring up the surface window to scan, create or modify surfaces.
Cell Bring up the cell window to scan, create or modify cells.
Data Menu for some data cards: materials, importances, transformations.
Run Enable the running of MCNP input files.
Particle Display Bring up the source window that allows for source point display and particle
track plotting.
Tally Plots 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)
Cross Section Allow the plotting of MCNP cross sections. This is the same capability that
Plots currently exists when requesting MCPLOT (mcnp inp=filename ixz options)
3D View 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.
CAD Import Import a CAD 2D DXF or 3D sat file.
Read_again 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.
Backup Creates a backup file that sequentially increases (inpn1, inpn2, …).
Options Parameters to set plot, file open, and file generation options.
View Select the active plot window.
Help Shows the version number, along with access to this manual in electronic
form, including an index and search ability.

Page 49 of 288
MCNP Visual Editor Manual

6.0 The File Menu Option

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.
File…New View will open up a new plot window with the plot parameters set to default values.
File…Open 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.
File…Open (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”.
File…Clear 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

File…Save and File…Save 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.

7.0 The Input Window


To bring up the input window, select Input from the main menu. This will bring up a text
window that shows the entire contents of the input file. If an input file has not yet been read in,
it will show a single default comment card indicating the current date.
As surfaces and cells are created, they will show up in this input window. At any time, the user
can type any valid MCNP data into the input window and then select Save-Update to reset the
FORTRAN memory and update the plots. This gives the user the freedom to work either with
the Visual Editor interface tools or to work in text mode.
The Visual Editor does not individually handle all MCNP data cards at this time. Data cards
individually recognized by the Visual Editor are cells, surfaces, materials, importances, and
transformation. Data cards that are not individually recognized by the Visual Editor are read in
from an input file, and are copied directly over into the input window. Currently, the only way
to change these data cards is to change them by hand in the input window and then select Save-
Update to update the FORTRAN memory with the modifications that have been made.
It is important to note that doing a Save-Update in the input window, saves the file out to a
temporary file called “inpn”. The user must select File…Save or File…Save As to save the file
to permanent storage.

8.0 The Surface Window


Figure 8-1 shows the surface window. This window is used to create new surfaces, delete
surfaces and modify surfaces. The operation that is being performed is determined by the mode
shown at the top of the surface window. The default mode is Create new which will create a
new surface -- even experienced users may find it convenient to just use the surface wizard
discussed in 8.13 The Surface Wizard to create new surfaces. All recognized MCNP surface
types can be created or modified.

Page 51 of 288
MCNP Visual Editor Manual

Figure 8-1 The Surface Window

8.1 Creating a Surface


To create a new surface, first select a surface type, either by clicking on the Surface menu option
or doing a right click in the gray area of the window as demonstrated in Figure 8-1. All surface
types will show up including surfaces defined by points and macrobody surfaces.
The problem surface number will be set by default when creating a surface. The editor uses the
last valid surface number and increments it by one. The surface coefficients are typically entered
by hand. For some of the simple surfaces you can use the mouse to set the coefficients to an
approximate value by clicking on the screen. For example, for a simple sphere (SO surface), you
can set the radius, by clicking on the screen.
You can indicate that the surface is a reflective surface by clicking on the Reflective check box.
You can assign a transformation to the surface, by either entering the transformation number in
by hand or clicking on the Transformation button to bring up a list of available transformations
for the input file. When you select a transformation, the problem number of the transformation is
placed in the transformation text box.
Select Register from the menu to create the surface and add it to the input file. Once a surface
is created, the mode changes to Create like which will default to creating additional surface, just
like the one that was created.

Page 52 of 288
MCNP Visual Editor Manual

8.2 Example: Creating the Simplest Surface


This example creates a spherical surface.

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.

8.3 Scanning a Surface


You scan a surface, by clicking on the Scan mode and then dragging the mouse across the
surface in the plot window. You can alternatively type the surface number in by hand. When
you scan a surface, all the information about that surface is displayed in the surface window.

Page 53 of 288
MCNP Visual Editor Manual

8.4 Deleting a Surface


To delete a surface you first need to scan it in, by dragging across it with a mouse or by entering
the surface number when in scan mode. Once the surface has been scanned in successfully, it
can be deleted by selecting Delete from the menu. If the surface is used as part of a cell, the
Visual Editor will not let you delete it. Since macrobody surfaces introduce many complexities,
you cannot Delete a macrobody surface from the menu, but instead must manually delete it from
the Input File window and select Save-Update.

8.5 Editing a Surface


To edit a surface, you first need to scan the surface in and then change the mode to Edit. In edit
mode you can change the surface parameters, including the surface type. Once you are done
editing the surface, select Register to update the surface in the input file and update the plot
windows.

8.6 Hiding and Showing Surfaces


The surface hide and show menu options are used to hide and show surfaces. A surface that is
shown will appear as an infinite surface and it will show up, even if it is not part of any cell.
In order to make cells, the Visual Editor needs to show these infinite surfaces that are not part of
any cell. The surface number for an infinite surface will have an “*” by it when displayed in the
plot window. It should not be confused with a reflective surface which also has a “*”. Once a
surface is used in a cell, it becomes a finite surface and the “*” is removed from the label and it
looks like it would in a normal MCNP plot window.
When you first enter the Visual Editor or when you do a Save – Update from the input window,
all of the unused surfaces are hidden unless the Unused check box is selected. You need to
select the Show->Unused option or check the Unused box to show the unused surfaces if you
need them for creating cells.

8.7 Surface Comments


The dollar comment ($) is in line with the surface description and is limited to 40 characters.
The comment card is on its own line and can be 80 characters long. Both dollar comments and
surface comments can be entered for each surface.

8.8 Entering Surface Dimensions in Inches


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.

8.9 Surface Distance


In scan mode, click on the Distance check box to have the Visual Editor calculate the distance
between two simple surfaces (planes, spheres, cylinders). Click the first check box and drag
across the first surface and then click the second check box and drag across the second surface

Page 54 of 288
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.

8.10 Surface Delta


The Surface Delta button lets you create a new surface relative to an existing surface. Set the
mode to Scan and drag across the existing surface. Next change the mode to Create Like and
enter a value for the surface delta. Click on the Surface Delta button and this amount is added to
the surface coefficient. This only works for simple surfaces such as planes, spheres and
cylinders. For spheres and cylinders the delta is added to the radius coefficient. This value will
be in inches if inches is selected.

8.11 Macrobody Surfaces


All macrobody surfaces are supported and can be created, both in the surface window and in the
surface wizard. If problems occur when creating or modifying macrobody surfaces, typically
because of coincident surfaces, do a Save-Update in the input window to reset the FORTRAN
memory and the plots.

Page 55 of 288
MCNP Visual Editor Manual

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 Surfaces…Plane…px.
In the D, distance, textbox, type 20 for 20 centimeters.
On the Surface Panel, Click Register.

Page 56 of 288
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

Figure 8-9 Create a Macrobody Truncated Right Angle Cone


On the Surface Panel, Click Surface…Macro…TRC.
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 it’s base at 0, 0, -30 with a height of 60 centimeters. It’s
radius at the base is 40 and it’s radius at the top is 20.
Click Register.

Page 62 of 288
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

8.13 The Surface Wizard


Figure 8-11 The Surface Wizard shows a view of the Surface Wizard. The surface wizard can
be used to walk the user through the process of creating a surface. This can be particularly
useful for creating macrobody surfaces. The Wizard also includes some options for creating
some specialized quadratic surfaces including ellipsoids and a slanted cylinder.

Figure 8-11 The Surface Wizard

Page 64 of 288
MCNP Visual Editor Manual

8.13.1 Example: Creating a Rotated Ellipsoid with the Surface Wizard.


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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

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 Surface Types


The Visual Editor supports all MCNP surface types.

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:
x−D=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:
y−D=0
Example:
D=5
Resultant input line.
1 py 5

pz plane: Normal to the Z axis


This surface requires the following parameters:
D = the distance along the specified axis to the point where the
plane intersects.
Equation:
z−D=0
Example:
D=5
Resultant input line.
1 pz 5

Page 71 of 288
MCNP Visual Editor Manual

plane using intercepts – Surface Wizard Only


This surface requires the following parameters:
x=x intercept, y=y intercept, z=z intercept
For a 2D plane, only two entries are required.
Equation:
The surface wizard converts the intercepts to the parameters
A, B, C, and D for a general plane using the equations
below.
A= 1 B= 1
Qx Qy
C= 1 D= 1
Qz Q
  1 2  1 2  1 2 
Q =    +   +   
 x   y   z  
 
Example:
x=70.7107, y=70.7107, z=blank
Resultant input line.
1 p 0.70710678118655 0.70710678118655 0 50.000016171613
plane using points
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
MCNP Visual Editor Manual

sphere centered on the x axis (sx)


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

sphere centered on the y axis (sy)


This surface requires the following parameters:
R = radial distance from the center.
y = displacement distance along the y axis.
Equation:
x 2 + ( y − y ') + z 2 − R 2 = 0
2

Example:
y=75
R=50
Resultant input line.
1 sy 75 50

sphere centered on the z axis (sz)


This surface requires the following parameters:
R = radial distance from the center.
z = displacement distance along the z axis.
Equation:
x 2 + y 2 + ( z − z ') − R 2 = 0
2

Example:
z=75
R=50
Resultant input line.
1 sz 75 50

Page 73 of 288
MCNP Visual Editor Manual

general sphere
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

parallel to the y axis


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
MCNP Visual Editor Manual

parallel to the z axis


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
MCNP Visual Editor Manual

on the z axis
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:
( y − y ')2 + (z − z ')2 − t (x − x') = 0
Example: (Using the Wizard)
x=10, y=20, z=30, θ=15, type=0
Resultant input line.
1 k/x 10 20 30 0.071796769720193 0

parallel to the y 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:
(x − x')2 + (z − z ')2 − t ( y − y') = 0
Example: (Using the Wizard)
x=10, y=20, z=30, θ=15, type=0
Resultant input line.
1 k/y 10 20 30 0.071796769720193 0

Page 76 of 288
MCNP Visual Editor Manual

parallel to the z 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:
(x − x')2 + ( y − y ')2 − t (z − z ') = 0
Example: (Using the Wizard)
x=10, y=20, z=30, θ=15, type=0
Resultant input line.
1 k/z 10 20 30 0.071796769720193 0

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
MCNP Visual Editor Manual

on the z axis
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
MCNP Visual Editor Manual

Other SQ
This surface requires the following parameters:
A, B, C, D, E, F, G = see equation
x, y, z = center point for the object
Equation:
A(x − x') + B( y − y ' ) 2 + C ( z − z ' ) 2 + 2 D( x − x' )
2

+ 2 E ( y − y ') + 2 F ( z − z ') + G = 0
2 2

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.
1 sq 0.0004 0.00027777777777778
0.00020408163265306 0 0 0 -1 10 20 30

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
2 2 2 2 2 2
A' = A' ' u1 + B ' ' u2 + C ' ' u3 B ' = A' ' v1 + B ' ' v2 + C ' ' v3
D ' = 2( A' ' u1v1 + B' ' u2v2 + C ' ' u3v3 )
2 2 2
C ' = A' ' w1 + B' ' w2 + C ' ' w3
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.
1 gq 0.00083331883973211 0.00083331883973211

Page 79 of 288
MCNP Visual Editor Manual

0.00083331838298198 -0.00055554175809403 -0.00055554084459378 -


0.00055554084459378 0.0055547151068111 -0.038888873644354 -
0.083332407585503 3.9722010412298

GQ Slanted Cylinder – Surface Wizard Only


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
MCNP Visual Editor Manual

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
 
(x − x') +  ( y − y ') + (z − z ') − A  − 1 = 0
2 2
2

B2 C2
Example:
(x, y, z)=(50,0,0)
A=40, B=20, C=10
Resultant input line.
3 tx 50 0 0 40 20 10

elliptical or circular torus parallel to the y axis


This surface requires the following parameters:
x, y, z = coordinates for the center of the torus.
A=See tx torus.
Equation:
2
 
( y − y ') +  (x − x') + (z − z ') − A  − 1 = 0
2 2
2

B2 C2
Example:
(x, y, z)=(50,0,0)
A=40, B=20, C=10
Resultant input line.
3 ty 50 0 0 40 20 10

Page 81 of 288
MCNP Visual Editor Manual

elliptical or circular torus parallel to the z axis


This surface requires the following parameters:
x, y, z = coordinates for the center of the torus.
A=See tx torus.
Equation:
2
 
(z − z ') +  (x − x') + ( y − y ') − A  − 1 = 0
2 2
2

B2 C2
Example:
(x, y, z)=(50,0,0)
A=40, B=20, C=10
Resultant input line.
3 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
2 2
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 x 8 2 7 1
2 x 7 3 8 3 9 2
3 x 7 1 8 1 9 2

Page 82 of 288
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

BOX - arbitrarily oriented orthogonal box


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

ELL - ellipsoid from foci and major axis length


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
MCNP Visual Editor Manual

HEX – simplified right hexagonal prism


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

IBOX – infinite box


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
MCNP Visual Editor Manual

RCC – right circular cylinder


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

REC – right elliptical cylinder


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
MCNP Visual Editor Manual

RHP – right hexagonal prism


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 z-
axis 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 z-
planes 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
MCNP Visual Editor Manual

RPP – rectangular parallelepiped


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
MCNP Visual Editor Manual

TRC – truncated right-angle cone


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
MCNP Visual Editor Manual

WED – wedge
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

9.0 The Cell Window


Figure 9-1 shows the cell window. After the appropriate surfaces have been created, select Cell
from the main menu to create a cell using these surfaces. In the cell window you can create, edit,
or delete cells. The default mode is Create New for creating new cells. You also have options
for creating cell lattices, and splitting a cell for biasing. For more information about cell lattices,
see Section 10.0 Creating Lattice Cells.
In Color mode, the cells will be colored according to their material. However, the default black
and white (B&W) mode is usually preferable since the plots are generated much more rapidly in
black and white. In both Color and B&W mode, geometry errors are shown as dotted surfaces in
red. These lines are easier to see in B&W mode.

Page 90 of 288
MCNP Visual Editor Manual

Figure 9-1 The Cell Window

9.1 Creating A Cell


Below are the basic steps for defining a cell when the cell window is active. The editor selects a
new default problem cell number when you open the cell window or after you register a cell, but
you can change this if you prefer to use a different cell number.

9.1.1 Material Number


Enter the material number for the cell from the keyboard, or bring up a list of defined materials
by clicking on the material button, then click on the desired material -- this enters both the
material and its default density into the cell window. The material must be defined to appear in
the material list window. To set the density, the material must be used someplace else in the
input file, the editor will get density from other cells that use the material. If the material has not
been used before, you will need to enter the density by hand. Note: you may want to simplify
things by not using materials in the initial geometry model (just voids), but this does have the
disadvantage that the material regions will not show up by color on the plots.

9.1.2 Material Density


Enter the material density from the keyboard (positive if atom density and negative if gram
density) if not set by selecting the material using the material button.

9.1.3 Fill Number/Universe Number


Enter fill number and/or universe number for the cell if required for the cell.

9.1.4 Select Surfaces


Drag the mouse across each relevant surface on the plots to select the bounding surfaces for a
simple object. A simple object is one where the sense (+/-) of the surfaces bounding the object is
the same everywhere inside the object. When doing a surface drag, verify that the editor found
the surface by looking to see if the surface is displayed in the white area at the bottom of the cell
window. If the drag was not successful, the error message "drag failed" will be displayed in this
area, in which case you need to try to do the drag again. Occasionally, when there are
inconsistencies in the geometry, a surface will not appear or there will not be a response when
the mouse is dragged across the surface. Do a "show" on this surface and the drag should work.
You may need to keep showing surfaces after each cell is registered until this inconsistency is
removed.

Page 91 of 288
MCNP Visual Editor Manual

9.1.5 Set Cell Sense


Click the left mouse button inside the object to indicate the sense of the surfaces for the object.
Note that some of the surface numbers in the white area will change sign.

9.1.6 Paste and Cut


Choose the Paste button (with the left mouse button) to add this simple object to the cell
description, or the Cut button to cut out this simple object from the cell being formed. The cell
message box now shows the surfaces with senses (and unions if needed) of the partial cell card.

9.1.7 Define Additional Regions


Repeat steps 9.1.4-9.1.6 for each Paste or Cut operation until the cell is completely defined.
You can also enter Not “cell numbers" if appropriate.

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.

9.2 Discussion of Cell Paste and Cut Operations


The bounding surface description of the cell is defined through a series of Paste and Cut
operations. The Paste operation allows a complex geometry to be created by pasting together
simple concave objects such as parallelepipeds, spheres, cylinders, or more general shapes. The
Cut operation allows the user to remove a piece from inside of the currently defined cell. For
example; to create a cell outside a cube but inside a sphere, the first step is to define the outer
spherical portion of the cell by crossing the spherical surface with the mouse and then setting the
sense with the mouse and doing a paste operation. Next remove the inner cube by crossing each
of its six surfaces with the mouse, clicking inside the cube to set the sense of the surfaces and
then using the Cut operation to remove the cube from the cell description. Finally select register
to create the cell. See Creating the Cell Inside the Sphere and Outside the Cube in Section 3.2
Example: Create Simple Geometries Using the Visual Editor for detailed instructions.
The reason that only simple shapes can be used in creating a cell with paste operations is that the
sense of all the surfaces must be the same for the region bounded by all the surfaces for each
paste. For example, in Figure 9-2, to create the L shaped cell, you will need to do two sequential
paste operations. First add the left rectangular region to the cell description by dragging across
surfaces 1, 2, 3, and 6, setting the sense by selecting a point in the center of these four surfaces,
and then selecting paste. Second, add the other rectangular region of the right plot by dragging
across surfaces 2, 3, 4, and 5, selecting a point in the center of these surfaces, then selecting
paste. Finally, select Register to create the cell consisting of the union of these two rectangular
regions. For complete details, see the example in the next section.

Page 92 of 288
MCNP Visual Editor Manual

Figure 9-2 Two Sequential Paste Operations


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.

9.2.1 Example: Cell Sense Illustration


This example shows the creation of an L shaped cell. The material Lead is added to the cell to
allow it to be plotted in color.

Page 93 of 288
MCNP Visual Editor Manual

Figure 9-3 An L shaped cell.


Start the Visual Editor.
On the Main Menu, Click on File…Open… and open the isense file.
The input file is as follows:
c Created on: Monday, June 26, 2006 at 09:26

1 px -80
2 px -40
3 py 80
4 py 40
5 px 80
6 py -80
7 pz 40
8 pz -40

mode N
m252 82206.60c -0.242902 $lead
82207.60c -0.223827 82208.60c -0.53327

Page 94 of 288
MCNP Visual Editor Manual

Figure 9-4 Surf, Cell, and Unused checkboxes.


On both the left and right plot windows, Click on the Surf, Cell, and Unused checkboxes.

Page 95 of 288
MCNP Visual Editor Manual

Figure 9-5 Creating the first paste.


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
MCNP Visual Editor Manual

Figure 9-6 Creating the second paste.


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
MCNP Visual Editor Manual

Figure 9-7 Justification for Using Two Paste Operations.


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
MCNP Visual Editor Manual

Figure 9-8 Final Display


Figure 9-8 shows the final display.

9.3 Special Sense Considerations


To set the sense for the cell, it is important that the location for the sense be inside the region
being defined in all three dimensions. Because the sense is set within a 2D plot window, the user
must be sure that the sense is not on a surface and that it is inside the region that is being defined
in the third dimension. For example, if the sense is being set in the XY plot window, the user
must be sure the z elevation of the XY plot is inside the region being defined.

9.4 Creating a Cell with Universes


The cell transformation number, universe number, and fill number should also be appropriately
set. These options introduce complications in defining the geometry since the geometry creation
is dynamic on the plots, so certain rules need to be followed consistently to enable the creation of
such cells.
As a general rule you need to use the following sequence in creating cells involving universes,
fills, and transformations for a cell that is part of a universe that fills a cell:
1. Create the fill cell first at the origin, but do not include the transformation. If the plots
are too messy around the origin, you may need to use the Hide option to hide some cells,
and possibly surfaces, on the plots. In the cell window set the value for fill.

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.
3. 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.
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.5 Using Undo


A useful feature of the cell window is the Undo button. This button allows you to correct
mistakes prior to a register. Both drags and clicks (to set the cell sense) can be "un-done" in
reverse sequence one at a time. Even after a cell is registered the undo button can be used to
undo drags and clicks by scanning the cell and editing it.

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 File…Save or backup the file by selecting the Backup menu option.

9.7 Scanning a Cell


You scan a cell, by clicking on the Scan mode and then clicking inside a cell in the plot window.
You can alternatively type the cell number in by hand. When you scan a cell, all the information
about that cell is displayed in the cell window.

9.8 Deleting a Cell


To delete a cell you first need to scan it in, by selecting the cell in the plot window with the
mouse. Once the cell has been scanned in successfully, it can be deleted by selecting Delete
from the menu. If the cell is used in another cell as a not (#) cell, the Visual Editor will not let
you delete it.

Page 100 of 288


MCNP Visual Editor Manual

9.9 Editing a Cell


To edit a cell, you first need to scan the cell in and then change the mode to Edit. In edit mode
you can change the cell parameters. Once you are done editing the cell, select Register to
modify the cell in the input file and update the plot windows.
While in edit mode, if the cell was created with the Visual Editor, you can use the Undo option
to undo the operations used to create the cell. This may not work on a complex cell created
outside the Visual Editor.
In edit mode you can select Clear to clear the cell description and start over defining the cell
from scratch. The Clear button only clears the cell description, none of the other cell parameters
are changed.
You can also manually edit the cell by changing the cell description by hand and then selecting
Register when you are done modifying the cell.

9.10 Create Like


You can use the Create Like mode to create a new cell similar to an existing cell. A common
application of this is to create a new cell like a cell that already exists, but with a transformation.
To use the Create Like option, you need to first Scan in a cell and then change the mode to
Create Like. The Visual Editor will automatically update the cell number to the next valid
number. At this point you can specify the cell parameters that you want to be different and then
register the cell to create it.

9.11 Hiding and Showing Cells


The cell Hide and Show main menu options are used to hide and show cells. This option is not
used very much, but can be used to define an object at the origin (To be transformed later) over
an existing geometry, by hiding the existing geometry.

9.12 Cell Comments


The dollar comment ($) is in line with the cell description and is limited to 40 characters. The
comment card is on its own line and can be 80 characters long. Both dollar comments and cell
comments can be entered for a cell.

9.13 Splitting a cell


Another feature available in the cell window is Cell Splitting which is a menu option. This
allows you to divide a cell equally (by thickness, not by volume) into a specified number of
smaller cells. This is useful for setting importances in a thick shield.
To use cell splitting, create the cell that is to be divided, then, instead of selecting Register,
select Cell Splitting. Once this button is selected, another window comes up that allows you to
specify the number of splits (number of cells created) and in some cases the type of splitting to
be done. The editor will already know the type of cell being split so you should never need to
change this. See Figure 9-9 for an example of splitting a cylinder created by cz surface 1 and pz

Page 101 of 288


MCNP Visual Editor Manual

surfaces 2 and 3.

Figure 9-9 Cell Splitting Options


For a cell that will be split into n cells, possible geometry types for the splitting include:
1. 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.
2. Sphere where n-1 radial surfaces are inserted inside a sphere surface.
3. 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.
4. 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.
5. 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.

Page 102 of 288


MCNP Visual Editor Manual

6. Slab, where a large parallelepiped region is divided with n-1 surfaces in the x, y, or z
direction as specified by the user.
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.

9.14 The Cell Wizard


Figure 9-10 through Figure 9-23shows a series of plots of the cell wizard being used to create a
cell. The cell Wizard will take the user through the process of creating a cell a step at a time.
The Figures below show the steps that the Wizard will take to generate a cell composed of three
paste operations. The first region is created in Figure 9-10 through Figure 9-14. The second
region is created in Figure 9-15 through Figure 9-18. The third region is created in Figure 9-19
through Figure 9-23.
The current active plot is shown in the wizard. This plot is for display purposes only, the
“dragging over the surfaces” and “setting the sense with the mouse” is done in the main plot
windows.

Figure 9-10 Set the Mode to Create

Figure 9-11 Select the Surfaces

Page 103 of 288


MCNP Visual Editor Manual

Figure 9-12 Use the Mouse to Set the Surface Sense

Figure 9-13 Select Paste to Add the Region

Figure 9-14 Select the Option to Continue to Create the Second Region

Figure 9-15 Drag across Surfaces for the Second Region

Page 104 of 288


MCNP Visual Editor Manual

Figure 9-16 Set the Sense for the Second Region

Figure 9-17 Paste the Second Region

Figure 9-18 Select the Option to Continue to Create the Third Region

Figure 9-19 Drag across surfaces for the Third Region

Page 105 of 288


MCNP Visual Editor Manual

Figure 9-20 Set the Sense for the Third Region

Figure 9-21 Paste the Third Region

Figure 9-22 Select Finish to Create the Cell

Figure 9-23 Create the Cell

Page 106 of 288


MCNP Visual Editor Manual

10.0 Creating Lattice Cells


1 0 -1 2 -3 4 -5 6 u=9 lat=1 1 0 -1 2 -3 4 -5 6 -7 8 u=9 lat=2
fill=-2:2 -2:2 -1:1 fill=-3:3 -3:3 -1:1
5 5 5 5 3 $ROW 1 5 5 5 5 5 5 5 $ROW 1
5 5 5 5 3 $ROW 2 5 5 5 3 3 3 5 $ROW 2
5 5 5 5 3 $ROW 3 5 5 3 3 3 3 5 $ROW 3
5 5 5 5 3 $ROW 4 5 3 3 3 3 3 5 $ROW 4
5 5 5 5 3 $ROW 5 5 3 3 3 3 5 5 $ROW 5
5 5 5 5 3 $ROW 1 5 3 3 3 5 5 5 $ROW 6
5 5 5 5 3 $ROW 2 5 5 5 5 5 5 5 $ROW 7
5 5 6 5 3 $ROW 3 5 5 5 5 5 5 5 $ROW 1
5 5 5 5 3 $ROW 4 5 5 5 3 3 3 5 $ROW 2
5 5 5 5 3 $ROW 5 5 5 3 3 3 3 5 $ROW 3
5 5 5 5 3 $ROW 1 5 3 3 3 3 3 5 $ROW 4
5 5 5 5 3 $ROW 2 5 3 3 3 3 5 5 $ROW 5
5 5 5 5 3 $ROW 3 5 3 3 3 5 5 5 $ROW 6
5 5 5 5 3 $ROW 4 5 5 5 5 5 5 5 $ROW 7
5 5 5 5 3 $ROW 5 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

Rectangular Lattice Card Hexagonal Lattice Card

Figure 10-1 Example Lattice Cards


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 3 $ROW 1 (-2,-2,-1) (-1,-2,-1) (0,-2,-1) (1,-2,-1) (2,-2,-1) $ROW 1
5 5 5 5 3 $ROW 2 (-2,-1,-1) (-1,-1,-1) (0,-1,-1) (1,-1,-1) (2,-1,-1) $ROW 2
5 5 5 5 3 $ROW 3 (-2,0,-1) (-1,0,-1) (0,0,-1) (1,0,-1) (2,0,-1) $ROW 3
5 5 5 5 3 $ROW 4 (-2,1,-1) (-1,1,-1) (0,1,-1) (1,1,-1) (2,1,-1) $ROW 4
5 5 5 5 3 $ROW 5 (-2,2,-1) (-1,2,-1) (0,2,-1) (1,2,-1) (2,2,-1) $ROW 5
5 5 5 5 3 $ROW 1 (-2,-2,0) (-1,-2,0) (0,-2,0) (1,-2,0) (2,-2,0) $ROW 1
5 5 5 5 3 $ROW 2 (-2,-1,0) (-1,-1,0) (0,-1,0) (1,-1,0) (2,-1,0) $ROW 2
5 5 6 5 3 $ROW 3 (-2,0,0) (-1,0,0) (0,0,0) (1,0,0) (2,0,0) $ROW 3
5 5 5 5 3 $ROW 4 (-2,1,0) (-1,1,0) (0,1,0) (1,1,0) (2,1,0) $ROW 4
5 5 5 5 3 $ROW 5 (-2,2,0) (-1,2,0) (0,2,0) (1,2,0) (2,2,0) $ROW 5
5 5 5 5 3 $ROW 1 (-2,-2,1) (-1,-2,1) (0,-2,1) (1,-2,1) (2,-2,1) $ROW 1
5 5 5 5 3 $ROW 2 (-2,-1,1) (-1,-1,1) (0,-1,1) (1,-1,1) (2,-1,1) $ROW 2
5 5 5 5 3 $ROW 3 (-2,0,1) (-1,0,1) (0,0,1) (1,0,1) (2,0,1) $ROW 3
5 5 5 5 3 $ROW 4 (-2,1,1) (-1,1,1) (0,1,1) (1,1,1) (2,1,1) $ROW 4
5 5 5 5 3 $ROW 5 (-2,2,1) (-1,2,1) (0,2,1) (1,2,1) (2,2,1) $ROW 5

Figure 10-2 Universe Fill Values


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

Page 108 of 288


MCNP Visual Editor Manual

10.1 The Rectangular Lattice Panels

Figure 10-3 Invoking the Rectangular Lattice Wizard


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 The Rectangular Lattice Panels


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

Page 109 of 288


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 Using the Lattice Fill Matrix


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
Select Axial Index: Selects cells matching the axial parameter.

Figure 10-5 Select Axial index -1 and Set Universe to 2


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.

Page 110 of 288


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.

Figure 10-6 Select Universe 2

Select Rows: selects all elements in radial rows around the (0,0,0) element as shown in Figure
10-7 Select Row 1.

Figure 10-7 Select Row 1 and Set Universe to 6

Page 111 of 288


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.

Figure 10-8 Select I=1 and Set Universe to 8

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.

Figure 10-9 Select J=1 and Set Universe to 9

Page 112 of 288


MCNP Visual Editor Manual

10.2 Creating a Rectangular (hexahedra) Lattice


Creating a Rectangular Lattice involves several steps.
1. Create the surfaces and cell that will bound the lattice. The lattice definition is infinite
and it will be cut off at the boundary of the bounding cell. In Figure 10-10 below, the
rectangular lattice is bounded by a sphere of radius 80. Cell 1 is the outside world. Cell
two is the inside of the sphere. Cell 2 will contain the lattice.
2. Designate the cell that will contain the lattice to be “fill”ed with the cell that is the lattice.
In the example below this is Cell 2, the inside of the sphere. This is done by entering the
universe number of the lattice in the fill box. In the example in Section 10.2.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.2.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.2.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.2.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).

10.2.1 Example Creation of a Two Dimensional Rectangular Lattice


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.

Page 113 of 288


MCNP Visual Editor Manual

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 Main Menu, Click on Cell.

Page 114 of 288


MCNP Visual Editor Manual

Figure 10-11 Creating the Outer world.


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.

Page 115 of 288


MCNP Visual Editor Manual

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.

Page 116 of 288


MCNP Visual Editor Manual

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 Rectangular Lattice Panel.

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


MCNP Visual Editor Manual

Close the Cell Lattice Panel if it does not close automatically.

Figure 10-15 Create the Surface for Universe 2


On the Main Menu, Click Surface…Cylinder…cz.
In the radius box, type 13.
On the Surface Panel, click Register.
Close the Surface Panel.

Page 118 of 288


MCNP Visual Editor Manual

Figure 10-16 Create the inside of the sphere for Universe 2.


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


MCNP Visual Editor Manual

Figure 10-17 Resulting File


Figure 10-17 shows the result.
The input file is below:
c Created on: Monday, October 23, 2006 at 19:16
1 0 1
2 0 -1 fill=1
3 0 -2 3 -4 5 u=1 lat=1
fill=-2:3 -2:3 0:0
2 2 2 2 2 2 $ROW 1
2 2 2 2 2 2 $ROW 2
2 2 2 2 2 2 $ROW 3
2 2 2 2 2 2 $ROW 4
2 2 2 2 2 2 $ROW 5
2 2 2 2 2 2 $ROW 6
4 0 -6 u=2
5 0 6 u=2

1 so 80
2 px 15
3 px -15
4 py 15
5 py -15
6 cz 13

Page 120 of 288


MCNP Visual Editor Manual

10.2.2 Example: A More Complex Rectangular Lattice.

Figure 10-18 A More Complex Rectangular Lattice


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.

Page 121 of 288


MCNP Visual Editor Manual

Figure 10-19 Creating Surfaces for the Cell that Holds the Lattice.
Start the Visual Editor.
Change the extents to 155.
Create the Cube that will Hold the Lattice.
On the Main Menu, Click on Surface.
On the Surface Panel, click on Surface…px.
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.
Similarly, enter the following surfaces:
A px surface at -124.99.
A py surface at 124.99.
A py surface at -124.99
A pz surface at 149.99
A pz surface at -149.99.
Close the Surface Panel.

Page 122 of 288


MCNP Visual Editor Manual

Figure 10-20 Creating the Cell that Holds the Lattice.


On the Main Menu, Click on Cell.
Create the Cell Inside the Box
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 Paste.
Click on Register.
Create the Cell Outside the Box
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.

Page 123 of 288


MCNP Visual Editor Manual

Figure 10-21 – Set the Universe Fill to 9


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.

Page 124 of 288


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.

Page 125 of 288


MCNP Visual Editor Manual

Type 5 for Horizontal Rows.


Type 5 for Vertical Rows.
Type 3 for Axial Rows.
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 “0’s. 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.

Page 126 of 288


MCNP Visual Editor Manual

Figure 10-24 – Setting Column I=2 to Universe 3


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.

Page 127 of 288


MCNP Visual Editor Manual

Figure 10-25 – Fill the rest with Universe 5


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 Save…Update.
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

Figure 10-26 Add Beryllium.


On the Main Menu, Click on Data…Materials
On the Materials Panel, Click on Library.
On the Material Library, Click on Beryllium metal.
Click on Add.
On the Material Library, Click on Aluminum.
Click on Add.
Close the Material Library panel.
Close the Materials Panel.
Close the Cell Panel.

Page 129 of 288


MCNP Visual Editor Manual

Figure 10-27 – Create the spherical surface.


On the Main Menu, Click Surface.
On the Surface Panel, Click Surfaces…Sphere…so.
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.

Page 130 of 288


MCNP Visual Editor Manual

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-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.

Page 131 of 288


MCNP Visual Editor Manual

Figure 10-30 – Create Universe 5.


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 Save…Update.

Page 132 of 288


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 Created on: Wednesday, September 27, 2006 at 12:33
1 0 -5 2 -1 6 -3 4 fill=9
2 0 5 :-2 :1 :-6 :3 :-4
3 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
4 212 -1.85 -13 u=3
5 0 13 u=3
6 208 -2.699 -14 u=5
7 0 14 u=5

1 px 124.99
2 px -124.99
3 py 124.99
4 py -124.99
5 pz 149.99
6 pz -149.99
7 px 25
8 px -25
9 py 25
10 py -25
11 pz 50
12 pz -50
13 so 10
14 so 20

mode N
m212 4009.60c -1 $beryllium metal
m208 13027.60c -1 $aluminum

To make this a file that can be run in MCNP, add the following lines after the “mode” line:
imp:n 1 0 1 1 1 1 1 1
print
sdef x=15. y=0 z=0

Add the following line after the material definitions:


nps 1000

Make sure there is a blank line at the end.

Page 133 of 288


MCNP Visual Editor Manual

On the Input Window, Click Save…Update.

Figure 10-31 – Final Display.


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.

Page 134 of 288


MCNP Visual Editor Manual

10.2.3 Modifying the Center of an Existing Lattice


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 Lattice with an even number of Elements


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 File…Open… 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:

Page 135 of 288


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.
The input file for this example is as shown below:
c Created on: Tuesday, October 03, 2006 at 09:31
1 0 -5 2 -1 6 -3 4 fill=9
2 0 5 :-2 :1 :-6 :3 :-4
3 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
4 212 -1.85 -13 u=3
5 0 13 u=3
6 208 -2.699 -14 u=5
7 0 14 u=5

1 px 99.9
2 px -99.9
3 py 99.9
4 py -99.9
5 pz 149.9
6 pz -149.9
7 px 25
8 px -25
9 py 25
10 py -25
11 pz 50
12 pz -50
13 s 0 0 0 10
14 s 0 0 0 20

mode N
m212 4009.60c -1 $beryllium metal
m208 13027.60c -1 $aluminum
imp:N 1 0 1 4r $ 1, 7
print
sdef x=15 y=0 z=0
nps 1000

Page 136 of 288


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
On the Input Window, Click Save…Update.

Figure 10-33 Display with Lattice Center Moved to Lower Left


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

Page 137 of 288


MCNP Visual Editor Manual

Change surface 14 to: s -25 -25 0 20


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 Save…Update

Figure 10-34 Lattice with Sphere Origins Modified.


Figure 10-34 shows the lattice with the spheres properly repositioned.

10.3 The Hexagonal Lattice Panels

Figure 10-35 Invoking the Hexagonal Lattice Wizard

Page 138 of 288


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 The Hexagonal Lattice Panels


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)

10.4 Creating a Hexagonal Lattice


Creating a Hexagonal Lattice involves several steps.
1. Create the surfaces and cell that will bound the lattice. The lattice definition is infinite
and it will be cut off at the boundary of the bounding cell. In Figure 10-37 below, the
hexagonal lattice is bounded by a sphere of radius 80. Cell 1 is the outside world. Cell
two is the inside of the sphere. Cell 2 will contain the lattice.
2. Designate the cell that will contain the lattice to be “fill”ed with the cell that is the lattice.
In the example below this is Cell 2, the inside of the sphere. This is done by entering the

Page 139 of 288


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.

Page 140 of 288


MCNP Visual Editor Manual

10.4.1 Example: Creation of a Two Dimensional Hexagonal Lattice


This example will create a two dimensional hexagonal lattice inside a sphere. Inside the lattice
elements is a cylinder.

Figure 10-37 Creating a Hexagonal Lattice


Start the Visual Editor.
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 Main Menu, Click on Cell.

Page 141 of 288


MCNP Visual Editor Manual

Figure 10-38 Creating the Outer world.


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


MCNP Visual Editor Manual

Figure 10-39 Creating a Lattice Cell.


To create the third cell that will hold the lattice,
Type 1 in the Universe text box.
Choose Hex Lattice as indicated in Figure 10-39.

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.

Page 143 of 288


MCNP Visual Editor Manual

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.

Page 144 of 288


MCNP Visual Editor Manual

Figure 10-42 Create the Surface for Universe 2


On the Main Menu, Click Surface…Cylinder…cz.
In the radius box, type 8.
On the Surface Panel, click Register.
Close the Surface Panel.

Page 145 of 288


MCNP Visual Editor Manual

Figure 10-43 Create the inside of the sphere for Universe 2.


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.

Page 146 of 288


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.

Figure 10-44 Final Result


Figure 10-44 shows the result.

Page 147 of 288


MCNP Visual Editor Manual

10.4.2 Example Creation of a Three Dimensional Hexagonal Lattice

Figure 10-45 A More Complex Hexagonal Lattice


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.

Page 148 of 288


MCNP Visual Editor Manual

Figure 10-46 Creating Surfaces for the Cell that Holds the Lattice.
Start the Visual Editor.
Change the extents to 160.
Create the Cylinder that will Hold the Lattice.
On the Main Menu, Click on Surface.
On the Surface Panel, click on Surface…cz.
In the R (radius) box, type 140.
Click Register.
Similarly, enter the following surfaces:
A pz surface at -149.99.
A pz surface at 149.99.
By choosing 149.99 rather than 150 we guarantee that the lattice boundary will not exactly match
the surfaces of the cell that holds it.
Close the Surface Panel.

Page 149 of 288


MCNP Visual Editor Manual

Figure 10-47 – Creating the Cell that Holds the Lattice.


On the Main Menu, Click on Cell.
Create the Cell Inside the Cylinder
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 Paste.
Click on Register.
Create the Cell Outside the Cylinder
Drag across the surfaces as indicated in Figure 10-47
Click inside the cylinder 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)

Page 150 of 288


MCNP Visual Editor Manual

Click on Register.

Figure 10-48 – Set the Universe Fill to 9


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.

Page 151 of 288


MCNP Visual Editor Manual

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.

Page 152 of 288


MCNP Visual Editor Manual

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.
On the Cell Lattice Panel, Click Register.

Page 153 of 288


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 “0’s. 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.

Page 154 of 288


MCNP Visual Editor Manual

Figure 10-51 Setting Rows 1-3 to Universe 3


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.

Page 155 of 288


MCNP Visual Editor Manual

Figure 10-52 Fill the rest with Universe 5


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.

Page 156 of 288


MCNP Visual Editor Manual

Figure 10-53 Tilt the Basis


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.

Page 157 of 288


MCNP Visual Editor Manual

Add the Materials

Figure 10-54 Add Beryllium.


On the Main Menu, Click on Data…Materials
On the Materials Panel, Click on Library.
On the Material Library, Click on Beryllium metal.
Click on Add.
On the Material Library, Click on Aluminum.
Click on Add.
Close the Material Library panel.
Close the Materials Panel.

Page 158 of 288


MCNP Visual Editor Manual

Figure 10-55 – Create the spherical surface.


On the Main Menu, Click Surface.
On the Surface Panel, Click Surfaces…Sphere…so.
Type 10 in the Radius (R) box.
Click Register.
Type 20 in the Radius (R) box.
Click Register.
Close the Surface Panel.

Page 159 of 288


MCNP Visual Editor Manual

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.

Page 160 of 288


MCNP Visual Editor Manual

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.

Page 161 of 288


MCNP Visual Editor Manual

Figure 10-58 – Create Universe 5.


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.
On the Main Menu, Click Input.

Page 162 of 288


MCNP Visual Editor Manual

On the Input window, Click Save…Update.

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 Created on: Thursday, October 05, 2006 at 12:13
1 0 -2 -1 3 fill=9
2 0 2 :1 :-3
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
4 212 -1.85 -12 u=3
5 0 12 u=3
6 208 -2.699 -13 u=5
7 0 13 u=5

1 cz 140
2 pz 149.99
3 pz -149.99
4 px 25
5 px -25
6 p 0.5 0.86602540378444 0 25
7 p 0.5 0.86602540378444 0 -25
8 p -0.5 0.86602540378444 0 25
9 p -0.5 0.86602540378444 0 -25
10 pz 50
11 pz -50
12 so 10
13 so 20

mode N
m208 13027.60c -1 $aluminum
m212 4009.60c -1 $beryllium metal
imp:N 1 0 1 4r $ 1, 7
print
sdef x=50 y=0 z=0
nps 1000

Page 163 of 288


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 1 0 1 1 1 1 1 1
print
sdef x=50. y=0 z=0

Add the following line after the material definitions:


nps 1000

Make sure there is a blank line at the end.


On the Input Window, Click Save…Update.

Figure 10-59 – Final Display.


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 Example: Moving the Center of An Existing Hexagonal Lattice


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 Off-Center Lattice


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 File…Open… and select the ihexlat3 input file.
On the Main Menu, Click on Update Plots.
On both plot windows, change both extents to 175.

Figure 10-61 Changing the Basis Vector


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.
The input file for this example is as shown below:
c Created on: Thursday, October 05, 2006 at 12:13
1 0 -2 -1 3 fill=9
2 0 2 :1 :-3
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
4 212 -1.85 -12 u=3
5 0 12 u=3
6 208 -2.699 -13 u=5
7 0 13 u=5

1 cz 170
2 pz 149.99
3 pz -149.99
4 px 25
5 px -25
6 p 0.5 0.86602540378444 0 25
7 p 0.5 0.86602540378444 0 -25
8 p -0.5 0.86602540378444 0 25
9 p -0.5 0.86602540378444 0 -25
10 pz 50
11 pz -50
12 sx 0 10
13 sx 0 20

mode N
m208 13027.60c -1 $aluminum

Page 166 of 288


MCNP Visual Editor Manual

m212 4009.60c -1 $beryllium metal


print
sdef x=50 y=0 z=0
nps 1000

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.

Figure 10-62 Translating the Center of the (0,0,0) Element

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 + A•B = 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 + A•B = -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 + A•B = 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 + A•B = -25 +12.5 = -12.5
Change surface 9 such that it is: p -0.5 0.86602540378444 0 -12.5

Page 168 of 288


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 Save…Update.
On the Main Menu, Click Update Plots.

10.5 Special Hex Lattice Display Options


The Visual Editor allows you to hide lower levels of a lattice by selecting the appropriate level
number for the plot. For a complex geometry with a universe in a universe, it is possible to plot
only the top universe by setting the plot level to 1. This can significantly reduce the plotting
time for plots where the internal details do not need to be plotted.
The Visual Editor also allows you to display the coordinates for the universe by setting the
global check box to local. This will show the actual coordinates for which the surfaces were
created prior to being moved by a transformation or by being included in a universe.
There are a number of useful things that can be plotted for a hex lattice that can be found under
the lat menu of the cell label button. You can plot the universe number for each lattice location,
or various indices.

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.

Page 169 of 288


MCNP Visual Editor Manual

Figure 11-1 The Material Creation Windows

11.1 Creating a Material


Prior to creating any materials in the input file, you must set the mode (N, P, E, etc.) for the
problem. Set the mode by clicking Data…Mode on the main menu and choosing the
appropriate mode or by typing the mode card in the Input window and selecting Save-Update.
If you do not do this, the mode will default to neutron.
The materials are created by choosing the Data…Materials menu option. This brings up a
Materials window. If any materials have already been defined in the input file, they will appear
in the upper portion of this window. At this point you can either read in materials from the
material libraries or create new materials to eventually include in the input file.
For a new material, a Material Number will automatically appear in the Material Description
portion of the Materials window. You can optionally change this to some other material number
subject to the constraint that the number you select must not already be used in the input file.
You then need to specify a Material Name and a Material Density (positive if atom density and
negative if gram density) in the Material Description portion of the Materials window. The
material density will be the default used on cell cards for that material when it is selected in the
cell window.
The new material composition is generated by specifying each isotope of the material and its
mass fraction (negative) or atom fraction (positive). To do this, click on Isotope: in the Isotope
Description portion of the Materials window. This brings up a table of the elements. Select an
element with the left mouse button to bring up a menu showing the isotopes for that element. If

Page 170 of 288


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 Example: Creating Water (H2O)


This example gives step-by-step instructions for the creation of water.

Figure 11-2 Create the Hydrogen Isotope in Water (H2O)


Start the Visual Editor.
Click on Data…Materials.
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


MCNP Visual Editor Manual

Type Water in the Material Name box.


Type -1 in the Material Density box to set the density to one which is the accepted value.
Click on the Isotope button to bring up the Material Library window. If the Material Library
window is blank or does not appear, there is a problem with the MCNP DATAPATH
Environment Variable or the vised.defaults file. Please see Section 11.5 for more information.
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.

11.2 Scanning a Material


There is no scan mode in the Materials window, instead whenever you click on one of the
materials its composition is listed in the lower white portion of the Materials window.

11.3 Delete a Material


To delete a material from the input file, you need to click on the material in the Materials
window and then select the Delete option from the menu. This will delete the material, provided
it is not used by any cell.

11.4 Edit a Material


To Edit a material, click on the material in the Materials window, set the mode to Edit and then
click on the isotope-fraction pair that you want to change. This will activate the Edit check box
indicating that an isotope-fraction pair is being edited. At this point you can make changes to

Page 172 of 288


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.

11.5 The vised.defaults File


The Visual Editor needs to know where to find the material files in order for the material
windows/libraries to work. The Visual Editor also needs to know where xsdir is, to allow for the
selection of cross section sets from the Isotope window.
The Visual Editor will try to determine the location of the material files from the MCNP
“DATAPATH ” environment variable. If this does not work, you need to specify the location of
the material library with the vised.defaults file. To create a vised.defaults file, bring up the
Materials window, by selecting Data…Materials and then select Files from the Materials
window. This will bring up a window like that shown in Figure 11-3. Enter the full path for the
location of each of the different files.

Page 173 of 288


MCNP Visual Editor Manual

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 Material Library


You can transfer materials from the material libraries by selecting the Library menu option from
the Materials window to bring up the Material Library window. Then select the materials you
want to include in your input file from the library of materials (hold down the ctrl key to select
various materials or the shift key to select a sequence of materials). If the materials do not show
up then the MCNP DATAPATH Environment Variable or the vised.defaults file is not correctly
defined. After you have chosen the materials you want to add from the library, select Add in the
Material Library window to transfer the materials from the library to the input file.
When the materials are first transferred to the input file, a default density is assigned to each
material. When selecting the material in a cell using the Material button on the Cell window,
this default density is used for the cell density. However, if you go out of the Visual Editor and
come back in, or do a Save-Update operation in the Input window, these default densities are
lost and the editor must then look to see if the material is used in the input file to get the density
off the cell card. If the material is not used, the density will not be known and you will have to
set it by hand.
Caution: The standard materials compositions and densities have been selected from what is
desired in a typical application. This requires a judgment in most cases. A composition and
density that may be perfectly acceptable in most applications may be very unacceptable in a
special application. Trace element activation or temperature, for example, may mean important
differences. When using standard materials, the user should always carefully review the
acceptability of these materials.
To add materials to the material library, select the materials from the Materials window that you
want to place in the library and then select Store from the menu to transfer those materials to the
user library. They will be placed in usr.n if they are neutron materials and they will be placed in
usr.p if they are photon materials. Within the Material Library window, you need to select Save
to update the user files or else the user files are not updated.

Page 175 of 288


MCNP Visual Editor Manual

11.6.1 Example: Add the Material Aluminum from the Library.

Figure 11-4 Adding the Material Aluminum from the Library.


Start the Visual Editor.
Click on Data…Materials to open the Material Panel.
Click on Library on the Material Panel menu.
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.

Page 176 of 288


MCNP Visual Editor Manual

11.7 Material Options


If you click on the Options check box in the Materials window, a number of text boxes will
appear that allow you to fill in additional material options such as gas, estep, nlib, plib, elib.
Refer to the MCNP manual for more information on these.

12.0 Importances
You can set importances by choosing Data…Importances 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-1 The Importance Window

12.1 Setting Cell Importances


The importance window allows you to set the importance of individual cells or groups of cells.
You can select individual cells on the plot or drag across a series of cells. Alternatively you can
click on desired cells in the lower left hand portion of the “Importances” window or you can
enter an importance value in “Find Importance” and it will select the cells with that importance.
Once the cells have been selected, you can set them to a specific importance value by clicking on
the “Set Importance” check box and then entering a value for the importance. Select “Register”
to update the input file and the plots.

Page 177 of 288


MCNP Visual Editor Manual

12.2 Using a Scale Factor


You can multiply the selected importance by a scale factor, by selecting the Factor check box
and selecting the Scale Factor option. Next, enter the multiplication factor into the Factor text
box and all the selected importances will be multiplied by this factor. Select Register to update
the input file and the plots.

12.3 Using a Geometric Factor


To set the importances using a geometric factor, select the Factor check box and then select the
Geometric Factor option. To use the geometric factor you need to identify the starting
importance and the factor to use in the appropriate text boxes. The Visual Editor remembers the
sequence in which the cells were selected which can be used to assign a geometric factor to the
importances. The Editor will use the starting importance as the importance for the first cell
selected. For each additional cell selected, it multiplies the previous importance by the
geometric factor. For example, if the starting importance is 4 and the geometric factor is 2, the
first six selected cells would have importances of 4, 8, 16, 32, 64, and 128.

12.4 The Importance Display


If the display is set to Decimal, the importances are shown as decimal numbers as shown in
Figure 12-1. If the display is set to Power of 2, the importances are shown as powers of 2, so 2,
4, 8, 16 becomes 1, 2, 3, 4.

12.5 Truncating importances


When generating importances using a factor, especially a geometric factor that is not an integer,
it is sometimes desirable to truncate the importances to an integer. If the Integer check box is
selected, all the importances will be truncated to the nearest integer. Be careful when using this
option, since all values below 1 will be set to zero.

12.6 An Example Using Importances


This example uses the islab input file. The islab file consists of three infinite lead slabs between
a source and the outside world. When the importances for the source and the three lead slabs are
set to 1 (and the outside world is set to zero), a particle track plot of the geometry is shown in
Figure 12-2.

Page 178 of 288


MCNP Visual Editor Manual

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

Page 179 of 288


MCNP Visual Editor Manual

Start the Visual Editor.


Open the islab input file.
Click on Update Plots This will display the geometry.
Check the Surf and Cell checkboxes. Turn on Surface and Cell numbers.
Click on Data…Importances to display the Importances window. Note that all importances are
set to 1.
Click on Cell 4 to highlight it.
Click on the Set Importance check box.
Type 8 in the box next to the Set Importance check box.
Click Register to register the new importance.
Figure 12-4 shows the result..

Figure 12-4 Set the Importance of Cell 4 to 8.


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.

Page 180 of 288


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.

Figure 12-5 Set the Importance of Cell 5 to 64

Page 181 of 288


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.

Figure 12-6 Change Display to Power of 2

Page 182 of 288


MCNP Visual Editor Manual

13.0 Transformations

Figure 13-1 Using a Transformation Card to Create a Copied Cell


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

Page 183 of 288


MCNP Visual Editor Manual

Figure 13-2 The Transformation Window

To create or modify transformations, select Data…Transformations 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.

13.1 Example: Creating a Transformation


As an example, a second cube that is offset and rotated in the X and Y direction will be created
from a cube centered at the origin.
Open the file itransform.
Click on Update Plots.

Page 184 of 288


MCNP Visual Editor 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.

Figure 13-4 Create a Cell Using the Transformation

Page 185 of 288


MCNP Visual Editor Manual

Type 1 in the Transformation box on the Cell Panel for the transformation that was just created.
Alternately, the user could click on the Transformations button and select the desired
transformation from the list.
Click on Register.
Click on Update Plots.
The result should look like Figure 13-1.

13.2 Example: Modifying an Existing Transformation to include


Rotation.
To add a 45 degree rotation about the Z axis, return to the Transformation window by Clicking
on Data…Transformation if it is not currently displayed.
Click on Transformation 1 in the bottom window.
Click on Edit on the menu of the Transformation Window.

Figure 13-5 Modifying an Existing Transformation to include Rotation.


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


MCNP Visual Editor Manual

Type -45 (negative 45) in the Y-X’ box.


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.

Figure 13-6 Cube with Offset and Rotation


Figure 13-6 shows the result.

Page 187 of 288


MCNP Visual Editor Manual

14.0 Renumber Cells/Surfaces


The surface and cell numbers in the input file can be renumbered by bringing up the renumber
panel shown in Figure 14-1. The user indicates the starting cell number and starting surface
number to use when the cells and surfaces are renumbered and the Visual Editor will renumber
the cells and surfaces in the input file.

Figure 14-1 Surface/Cell Renumber Panel


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.

Page 188 of 288


MCNP Visual Editor Manual

15.0 Run MCNP


The Run window can be displayed by selecting Run from the main menu. The Run window
will allow you to run input files without going outside the Visual Editor. Figure 15-1 shows a
view of the Run window.

Figure 15-1 The Run Panel


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.

16.0 Particle Display


To display source points or particle tracks, select Particle Display from the Main Menu.
Figure 16-1 shows the two options available from the Particle Display Menu option. The two
options are Plot Particle Tracks and Plot KCODE Source Generation Points.
The points are projected onto the 2D plot plane defined by the currently active plot for both
options. The distance from the plot plane defaults to 100. The user can change this value. If a
particle event occurs outside this range it is not plotted.

Figure 16-1 The Particle Display Window

Page 190 of 288


MCNP Visual Editor Manual

16.1 SDEF Source Plotting and Particle Track Plotting

Figure 16-2 The SDEF Source Plotting Panel


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.

Page 191 of 288


MCNP Visual Editor Manual

Number of Particles to Plot: Specify the number of particles to plot. Initially, this defaults to
1000.
Distance from the Plot Plane(cm): Determines how far away from the plot plane points will be
plotted. Initally, this defaults to 100. Since the plot represents a 2-D plane through the
geometry, all points at the defined distance away form the plot plane will be projected onto the
plot. Because of this, it is possible to see source points on the plot plane for source geometries
that do not show up in the plot.
Regenerate when plot changes: If checked, the SDEF display will regenerate when the plot
changes. For example, if the user zooms in on a specific region, the SDEF plot will be rerun for
that area.
Display: Select the type of information to display. The available options are: source points,
surface crossings, tally contributions, and collision points or various combinations of these
options.
Color By: Select either Energy or Weight. For Energy, the particles will be plotted in red for
high energy and blue for low energy. For Weight, the particles will be plotted in red for high
weight particles and blue for low weight particles.
In the List box, specify the following for each particle.
Type: The type of particle.
Show Tracks: Show the track that the particle travels. An “X” indicates that the particle will be
shown. Click to add or remove an X.
Use: If checked, the minimum and maximum are used. Click to set the X or to remove it.
min: specify minimum energy or minimum weight to be plotted.
max: specify maximum energy or maximum weight to be plotted.
Point Size: specify the size of the point to plot. 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.
Tracks: An X indicates tracks will be shown. Click to set the X or to remove it.
Min Col: The color that corresponds to the minimum energy or weight to be plotted..
Max Col: The color that corresponds to the maximum energy or weight to be plotted..
Track Color (RGB): specify the color for the tracks. Enter values for Red, Green, and Blue
that are between 0 and 250. The defaults are: 250, 150, 150.
Track Thickness: Specify track thickness.
Add Border: Adds a black outline around the points plotted if this box is checked.
Outside the List Box, specify:
Only for NPS: Specify the particle numbers to show tracks for.

Page 192 of 288


MCNP Visual Editor Manual

Show to 5 Max Energy tracks: Show only the tracks for the particles having the five highest
energy levels.
Show top 5 Max Weight Tracks: Show only the tracks for the particles having the five highest
weights.
Tally Contributions Only: Plot only those points that lead to a tally.
Tally Number: Plot only those points generated from the specified tallies.
Segment Number: Plot only those points attributed to the specified segments.
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 Example – SDEF Source Plotting


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 File…Open and load the isdef input file.
Click on Update Plots.
Click on the Left Plot Window to make it the active plotting window.

Page 193 of 288


MCNP Visual Editor Manual

Click on Particle Display…Plot Particle Tracks.


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 Particle Track Plotting


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 Setting Point Color and Size


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 Suggestions for more accurate Particle Track Plots


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 Example: SDEF Particle Track Plotting


In this example, a particle track plot will be displayed for the isdef input file.

Page 195 of 288


MCNP Visual Editor Manual

Figure 16-4 Creating an SDEF Particle Track Plot


Start the Visual Editor.
Click on File…Open 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 Display…Plot 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.

Page 196 of 288


MCNP Visual Editor Manual

Figure 16-5 SDEF Particle Track by Weight with Size 3 Pixel


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.
Figure 16-5 shows the result.

16.2 Running KCODE


To plot the source generation points for each cycle in a KCODE problem, the Visual Editor must
first RUN the problem to generate the srcz files for each cycle. For this to be successful, the
input file must be valid and free of errors. The file must contain a kcode and a ksrc data card.

Page 197 of 288


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: KSRC x1 y1 z1 x2 y2 z2 ...
xi, yi, zi = location of initial source points
Default: 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.
Use: 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 Created on: Tuesday, July 18, 2006 at 21:07
1 1 -1 -1
2 0 1

1 so 50

mode n

Page 198 of 288


MCNP Visual Editor Manual

kcode 1000 1.000000 5 30


ksrc 0.000000 0.000000 0.000000
m1 92235.66c 1 $U235
imp:n 1 0 $ 1, 2
ctme 5.0

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.

16.3 KCODE Source Plotting

Figure 16-6 KCODE Source Generation Point Display Panel


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.

Page 199 of 288


MCNP Visual Editor Manual

Distance from the Plot Plane(cm): Determines how far away from the plot plane points will be
plotted. Initally, this defaults to 100. After the initial run, this number will default to the number
used in the previous run. Since the plot represents a 2-D plane through the geometry, all points
at the defined distance away form the plot plane will be projected onto the plot. Because of this,
it is possible to see source points on the plot plane for source geometries that do not show up in
the plot.
Regenerate when plot changes: If checked, the KCODE display will regenerate when the plot
changes. For example, if the user zooms in on a specific region, the KCODE plot will be rerun
for that area.
Cycles: Specify the number of cycles for the problem to run. The cycle numbers must be
monotonically increasing separated by blanks or commas or a dash to represent a range of cycles.
(e.g. 1-5 to indicate cycles 1 through 5). The source points per cycle are written out as a set of
source files with names srcz”n”, where the “n” represents the cycle number.
Plot Mode: The KCODE particle plot can be made in two different modes, either Cumulative
or Animate. If the Cumulative option is selected, all of the source points generated for all of
the selected cycles are plotted, giving a cumulative source point density plot. If the Animate
option is selected, the source generation points for each cycle are plotted then erased to plot the
next set of points, producing an animation of the source generation points for the specified
cycles.
Color By: Select either Energy or Weight. For Energy, the particles will be plotted in red for
high energy and blue for low energy. For Weight, the particles will be plotted in red for high
weight particles and blue for low weight particles.
min: specify minimum energy or minimum weight to be plotted.
max: specify maximum energy or maximum weight to be plotted.
Point Size: specify the size of the point to plot. 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.
Add Border: Adds a black outline around the points plotted if this box is checked.
Steps for Creating a KCODE Plot
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 srcz”n” 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 srcz”n” files and display
the points on the plot.

Page 200 of 288


MCNP Visual Editor Manual

Caution: It is up to the user to verify that the source points from the srcz”n” files correspond to
the geometry being plotted.

16.3.1 Example: KCODE Source Plotting


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 File…Open 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 Display…Plot KCODE Source Generation Points on the Main Menu.
As shown in Figure 16-7:
Type 1-30 in the Cycles box to specify how many cycles to run.
Click Run_To_Generate_Plot_Data on the KCODE Source Generation Point Display Plotting
Menu. This will run the input file in MCNP.

Page 201 of 288


MCNP Visual Editor Manual

Click Plot_Saved_Data on the KCODE Source Generation Point Display 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.

Page 202 of 288


MCNP Visual Editor Manual

Figure 16-9 - KCODE Plot with Blue, Size 3, Particles


Change the Pixel size to Size 3.
Click Plot_Saved_Data.
Figure 16-9 shows the result.

Page 203 of 288


MCNP Visual Editor Manual

17.0 Tally Plots


The Visual Editor will allow the plotting of MCNP tallies. In general it makes available the
plotting capabilities currently available in the MCPLOT plotting package discussed in Appendix
B of the MCNP manual. Figure 17-1 shows the tally plot window along with the two additional
windows used to set the titles and tally plotting parameters.

Figure 17-1 The Tally Plotting Window

17.1 The Tally Plotting Panel


Figure 17-2 shows the Tally Panel with the 2D plot tab. For more information on any of these
options, see Appendix B of the MCNP manual. Where possible, the MCNP/MCNPX equivalent
command for MCPLOT is listed.
Current Directory: Shows the current directory. This is determined by the directory the
current input file resides in.
Runtpe: Read the runtpe file specified to get the tally data. The filename may be typed or
selected using the browse button. If the dump number is not specified, the last dump is read. .
This corresponds to the MCNP option RUNTPE.

Page 204 of 288


MCNP Visual Editor Manual

Mctal: Read the mctal file specified to get the tally data. The filename may be typed or selected
using the browse button. This corresponds to the MCNP option RMCTAL.

Write mctal file: Write the tally data in the current runtpe dump to a mctal file with the
specified name. This corresponds to the MCNP option WMCTAL.

Dump No.: Specify the dump number to be read from the runtpe file. If no number is specified,
the last dump is read.
Tally number to Plot: Specify which tally to plot as defined by the number of one of the Fn
cards in the input file. The default is the first (lowest numbered) neutron tally in the problem. If
there are no neutron tallies, then the default is the lowest numbered photon tally. Similarly, the
default is the lowest numbered electron tally if no neutron or photon tallies exist. This
corresponds to the MCNP TALLY command.
Perturbation Number: Plot the specified perturbation number associated with the tally. The
number entered corresponds to the number on a PERT card. This corresponds to the MCNP
PERT command.
Print IPTAL array: Display the IPTAL array for the current tally. This corresponds to the
MCNP IPTAL command.

Page 205 of 288


MCNP Visual Editor Manual

Figure 17-2 The 2D Plot Tab

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.

Page 206 of 288


MCNP Visual Editor Manual

Figure 17-3 The Mesh Plotting Tab

17.1.2 The Mesh Plotting Tab (MCNPX Only)


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)

Page 207 of 288


MCNP Visual Editor Manual

Figure 17-4 The Contour Plotting Tab

17.1.3 The Contour Plotting Tab


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.

Page 208 of 288


MCNP Visual Editor Manual

Figure 17-5 Additional Contour Plot Options


As shown in Figure 17-5, the following additional entries can be specified:
Log: The contour levels will be equally spaced between cmin and cmax. Cstep values are
inbetween.
NoLine: Do not draw lines around contours.
Line: Draw lines around contours (default).
Color: Make a color contour plot (default).
NoColor: Do not use color. Draw line contours only.
All: The contours are normalized to min and max values of the entire tally.
NoAll: The contours are normalized to min and max values of the variables designated as
“fixed” in the list to the left.13

Page 209 of 288


MCNP Visual Editor Manual

Figure 17-6 The Fluctuation Tab

17.1.4 The Fluctuation Tab


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 Meaning MCTAL
Equivalent Available?
M Mean Yes
E Relative error Yes
F Figure of merit Yes
L 201 largest tallies vs x (NoNorm for frequency vs. x No
N Cumulative number fraction of f(x) vs x No
P Probability f(x) vs. x (No Norm for frequency vs. x) No
S SLOPE of the high tallies as a function of NPS No
T Cumulative tally fraction of NPS No
V VOV as a function of NPS No
1-8 1 to 8 moments of f(x)∗x1 to 8 vs. x No
(NONORM for f(x)∗Δ x ∗ x1 to 8 vs. x)
1c-8c 1 to 8 cumulative moments of f(x)∗x1 to 8 vs. x No

Page 210 of 288


MCNP Visual Editor Manual

Figure 17-7 The KCODE Tab

17.1.5 The KCODE Tab


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 k (collision)
2 k (absorption)
3 k (track)
4 prompt removal lifetime (collision)
5 prompt removal lifetime (absorption)
11-15 the quantity corresponding to i-10, averaged over the cycles so far in the problem.
16 average col/abs/trk-len keff and one estimated standard deviation
17 average col/abs/trk-len keff and one estimated standard deviation by
18 average col/abs/trk-len keff figure of merit
19 average col/abs/trk-len keff relative error

Page 211 of 288


MCNP Visual Editor Manual

17.2 Entering Tally Cards


To run a Tally plot, the input file must contain at least one tally card. From the MCNP manual,
the table below lists the current valid types of tally cards. The page references are from the
MCNP manual and apply to the version listed in the References. For more complete
information, the user is advised to read the section on Tally Cards in the MCNP manual.

17.2.1 Tally Card Types


Table 2 MCNP/MCNPX Tally Cards12
Mnemonic Card Type Page
(MCNP Manual)

Fna Tally 3–80


FCn Tally Comment 3–91
En Tally Energy 3–92
Tn Tally Time 3–92
Cn Cosine 3–93
FQn Print Hierarchy 3–94
FMn Tally Multiplier 3–95
DEn/DFn Dose Energy/Dose Function 3–99
EMn Energy Multiplier 3–100
TMn Time Multiplier 3–100
CMn Cosine Multiplier 3–101
CFn Cell Flagging 3–101
SFn Surface Flagging 3–102
FSn Tally Segment 3–102
SDn Segment Divisor 3–104
Fun TALLYX Input 3–105
TFn Tally Fluctuation 3–107
DDn Detector Diagnostics 3–108
DXT DXTRAN 3–110
FTn Special Treatments for Tallies 3–112
FMESHn Superimposed Mesh Tally 3–114
SPDTL Lattice Speed Tally Enhancement 3–116

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.

Page 212 of 288


MCNP Visual Editor Manual

pl ........N or P or N,P or E
Si ........problem number of surface or cell for tallying, or T.12

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 Tally Description Fn units ∗Fn units
F1:N or F1:P or Current integrated over a surface particles MeV
F1:E
F2:N or F2:P or Flux averaged over a surface particles/cm2 MeV/cm2
F2:E
F4:N or F4:P or Flux averaged over a cell particles/cm2 MeV/cm2
F4:E
F5a:N or F5a:P Flux at a point or ring detector particles/cm2 MeV/cm2
FIP5:N or FIP5:P Array of point detectors for pinhole flux particles/cm2 MeV/cm2
image
FIR5:N or FIR5:P Array of point detectors for planar radiograph particles/cm2 MeV/cm2
flux image
FIC5:N or FIC5:P Array of point detectors for cylindrical particles/cm2 MeV/cm2
radiograph flux image
F6:N or F6:N,P or Energy deposition averaged over a cell MeV/g jerks/g
F6:P
F7:N Fission energy deposition averaged over a cell MeV/g jerks/g
F8:P or F8:E or Energy distribution of pulses created in a pulses MeV
F8:P,E detector
+F8:E Charge deposition charge 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 Example: Entering the Tally Cards


For the itally input card used in the example in Section 17.5.1 the following input file is used:
c Created on: Tuesday, July 18, 2006 at 21:07

Page 213 of 288


MCNP Visual Editor Manual

1 1 -1 -1
2 0 1

1 so 50

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.3 Opening the Tally File


To display tally plots, you first need to read in a valid runtpe or mctal file. In the top of the tally
window, indicate the type of file and its name. Next select Start from the menu. This will cause
MCNP to read in the file so it will be ready to do tally plots.

17.4 Plotting the Tally File


At this point you can select Plot from the menu to generate the default tally plot. Set plot titles
and plot axis titles in the panel obtained from selecting Titles at the top of the Tally Plotting
window. Choose plot options, such as loglog, in the panel obtained from selecting Options at
the top of the Tally Plotting window. These two panels can be left open.
Tally 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.

17.5 Tally Plot Options


Most of the capabilities of MCPLOT 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, also discussed in Appendix B, 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.

17.5.1 Example: Displaying a Tally Plot


This example will plot a tally applied to a sphere containing U235.

Page 214 of 288


MCNP Visual Editor Manual

Figure 17-8 The itally Input File


Start the Visual Editor.
Click on File…Open… 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.

Page 215 of 288


MCNP Visual Editor Manual

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.

Page 216 of 288


MCNP Visual Editor Manual

Figure 17-10 Run MCNP to generate Tally File


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.

Page 217 of 288


MCNP Visual Editor Manual

Figure 17-11 Read in the runtpe file.


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.

Page 218 of 288


MCNP Visual Editor Manual

Figure 17-12 Specify a Loglog file


On the Tally Plotting Panel, click Options.
On the Tally Options Panel, set the Axis to Loglog.
On the Tally Plotting Panel, Click Plot.

Page 219 of 288


MCNP Visual Editor Manual

Figure 17-13 Tally Plot of itally Input File.


Figure 17-13 shows the resulting Tally Plot.

18.0 Cross Section Plots


The Visual Editor will allow the plotting of MCNP cross sections. In general it makes available
the plotting capabilities currently available in the MCPLOT plotting package discussed in
Appendix B of the MCNP manual. Figure 18-1 shows the cross section plot window.
To display cross section plots, you first need to read in a valid input file. Click Browse and
select the name of the file at the top of the cross section plotting window. Next select
Read_Cross_Sections from the menu. This will cause MCNP to read in the file so it will be
ready to do cross section plots. At this point you can select Plot from the menu to generate the
default cross section plot.

Page 220 of 288


MCNP Visual Editor Manual

Figure 18-1 The Cross Section Plotting Window


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.

18.1 Example: Cross Section Plotting


This example will produce a cross section plot of a sphere containing U235.

Page 221 of 288


MCNP Visual Editor Manual

Figure 18-2 Creating a Cross Section Plot


Start the Visual Editor.
Click File…Open 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.

19.0 3D Ray Traced Plotting


To create a 3D image, MCNP is used to transport particles from a user specified viewpoint to a
plotting plane specified by the user. Within the MCNP code is all the logic necessary to
determine what cells are encountered in the ray’s path. The color of the cell is set to the cell’s
material composition.
Because this approach uses the MCNP transport routines, it is possible to view 3D plots of any
MCNP geometry including those containing lattices, universes, fills and macrobodies.

Page 222 of 288


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.

Figure 19-1 Two Different Types of 3D Rendering

19.1 3D Color Plots


To create a 3D color plot, you first must have a completely defined input file that will execute
without fatal errors. This option will not work on partial files.
• Read the input file into the Visual Editor.
• Then set a 2D plot window that will become the image plane of the 3D plot with the
appropriate (x,y,z) origin and the desired extents.

Page 223 of 288


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 Preparing the Input File

Figure 19-2 Input file for Box with Doorway


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 Example: Creating a Normal 3D Plot


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 File…Open and select the input file i3dplot1.
Click on Update Plots.

Page 225 of 288


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 3DView…Ray 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.
Figure 19-3 shows the result.

Page 226 of 288


MCNP Visual Editor Manual

19.1.3 Example: Setting Viewpoints


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 File…Open… and select the input file iviewpoint.
Click on Update Plots.

Page 227 of 288


MCNP Visual Editor Manual

Figure 19-5 2D views of Box and Doorway.


In the Left Plot Window, set the y coordinate of the origin to -50 (negative 50)..
Click Update Plots.
Figure 19-5 shows the result.
Choosing the Viewpoint
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.

Page 228 of 288


MCNP Visual Editor Manual

Figure 19-6 Left Plot Window


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.

Page 229 of 288


MCNP Visual Editor Manual

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.

Page 230 of 288


MCNP Visual Editor Manual

Figure 19-8 3D Plot of Box and Doorway at (0.-100,0)


To create the 3D Plot, click on 3D View…Ray 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.

Page 231 of 288


MCNP Visual Editor Manual

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.

Page 232 of 288


MCNP Visual Editor Manual

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.

Page 233 of 288


MCNP Visual Editor Manual

Figure 19-11 Box and Doorway with Viewpoint at (0,49,0)


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.

Page 234 of 288


MCNP Visual Editor Manual

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.

Page 235 of 288


MCNP Visual Editor Manual

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.2 3Update the Plot Basis


To generate a 3D plot, MCNP needs to make sure the view is orthogonal to the plot plane and
will adjust the basis to make this happen. The basis vectors used for the plot are shown. If you
check on the Update Plot Basis check box, the plot basis vectors will be updated to reflect these
new values.

19.3 Color by Cell/Surface


If the Color by cell option is set, the color represents the material in the cell. This is the default
option. If Color by surface is selected then each surface will be shown in a different color.

19.4 Draw Lines Around Cells


If Draw lines around cells is selected, a black line is drawn around each cell. This is the default
option. If No lines around cells is selected, only the color shading of the cells is shown.

19.5 Color Cells by Material


If Color cells by material is selected, each cell is colored according to its material type. This is
the default option. If Do not color cells is selected, the cells are not colored. If you also select
to not draw lines, then nothing is plotted.

Page 236 of 288


MCNP Visual Editor Manual

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.7 Distance Shading


If Use distance shading is selected, cells that are further away become darker. This is the
default option. If No distance shading, is selected, the cells stay the same color independent of
the distance away from the view.

19.8 Point/Plane Source Type


If Point source is selected, the source points for the rays are all generated from the view
specified by the user. This is the default option. If Plane source is selected, the source points
are generated on a plane that intersects the view and is parallel to the plot plane. This will
generate a plot as seen from an infinite viewpoint.

19.9 Show the Plot Plane


If Hide the plot plane image is selected, particles do not stop at the plot plane, but continue
until they enter the outside world. This is the default option.
If Show plot plane image is selected, the plot plane image will be shown if a 3D cell has not
been found by the time the ray hits the plot plane. This allows for the combination of both 2D
and 3D plotting. For this option to work, you also need to set the “Stop at the plot plane” option.

19.10 Hide/Show Cookie Cutters


A cookie cutter cell is the last cell on the list. It must not have any shared surfaces with any
other (non-cookie cutter) cell. Surfaces used to create the cookie cutter cell must be unique
because duplicate surfaces are deleted by MCNP. To create a cookie cutter cell that cuts to the
axis, create a plane with an offset of 0.01 rather than zero if the geometry already contains a
plane on the axis.
If Hide cookie cutters is selected, the cookie cutter cell is ignored and will not be used to create
a cut away view of the geometry. This is the default option.
To create a cut away view of a 3D image, create a cookie cutter cell as described in the MCNP
manual. Then select Show cookie cutters to cut out everything inside the cookie cutter cell.

19.10.1 Example: Creating a Cookie Cutter Cell for a Sphere.


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.

Page 237 of 288


MCNP Visual Editor Manual

Figure 19-14 Create the Cookie Cutter Surfaces


Start the Visual Editor.
Click on File…Open 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 Surfaces…Plane…px
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 Surfaces…Plane…pz
In the D box, type 1.
On the Surface Panel, click on Surfaces…Plane…py.

Page 238 of 288


MCNP Visual Editor Manual

In the D box, type 220.


On the Surface Panel, click on Surfaces…Plane…py.
In the D box, type -220 (negative 220).
On the Surface Panel, click on Surfaces…Cylinder…cy
In the R box (radius), type 220.
Click on File…Save As… and name the new file i3dplotcc.
Close the Surface Panel.

Figure 19-15 Create the Cookie Cutter Cell


On the Main Menu, Click on Cell
Drag the mouse across all five surfaces as indicated in Figure 19-15.

Page 239 of 288


MCNP Visual Editor Manual

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 File…Save…

19.10.2 Example: Creating a 3D Plot with a Cut-Away View


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.

Page 240 of 288


MCNP Visual Editor Manual

Figure 19-17 Sphere with Cookie Cutter Cell


Start the Visual Editor.
Click on File…Open 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.

Page 241 of 288


MCNP Visual Editor Manual

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.

Page 242 of 288


MCNP Visual Editor Manual

Figure 19-19 Determine the Coordinates for the ViewPoint.


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 don’t 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.

Page 243 of 288


MCNP Visual Editor Manual

Figure 19-20 Set the 3D Plot Parameters.


On the Main Menu, Click on 3D View…Ray 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.

Page 244 of 288


MCNP Visual Editor Manual

Figure 19-21 3D Plot with Cookie Cutter Cell

Page 245 of 288


MCNP Visual Editor Manual

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.
Figure 19-22 shows the result.

19.11 Plot to the Outside World/Plot Plane


If Plot to the outside world is selected, this will create all 3D images of all the cells found until
the ray hits the outside world. This is the default option.
If Stop at the plot plane is selected, the ray tracing will stop at the plot plane and will optionally
show the plot plane image if Show plot plane image is enabled.

19.12 Plot Resolution


The Res text box sets the resolution that will be used to generate the 3D ray-traced image. The
default is 300. The higher this number the better the 3D image will look, however, higher
resolutions take a long time to generate.

Page 246 of 288


MCNP Visual Editor Manual

19.13 3D Radiographic Plots

Figure 19-23 Radiographic plots of a Cask


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.

Page 247 of 288


MCNP Visual Editor Manual

19.13.1 Example: Creating a Radiographic Plot.


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 File…Open… and select the input file i3drad1.
Click on Update Plots.
On both plot windows, set the Extents to 200 (See Figure 19-25).

Page 248 of 288


MCNP Visual Editor Manual

Figure 19-25 Initial Radiographic Plot


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 View…Ray 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.

Page 250 of 288


MCNP Visual Editor Manual

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.

Page 251 of 288


MCNP Visual Editor Manual

19.14 3D Transparent Plots

Figure 19-28 Transparent 3D Plot of a Glove Box


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.

Page 252 of 288


MCNP Visual Editor Manual

19.14.1 Example: Creating a Transparent 3D Plot.


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 File…Open… and select the file itransparent.
Click on Update Plots.

Page 253 of 288


MCNP Visual Editor Manual

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 Main Menu, Click on 3D View…Ray Traced Image.

Page 254 of 288


MCNP Visual Editor Manual

Figure 19-31 Initial 3D Transparent Plot


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.

Page 255 of 288


MCNP Visual Editor Manual

Figure 19-32 Values for a Transparency Plot.


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.

Page 256 of 288


MCNP Visual Editor Manual

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.

Page 257 of 288


MCNP Visual Editor Manual

Figure 19-34 Calculated Values from Second Plot.


Figure 19-34 shows the printed values after generating the plot. The current maximum non-
transparency 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.

Page 258 of 288


MCNP Visual Editor Manual

Figure 19-35 Third 3D Transparent Plot


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.

Page 259 of 288


MCNP Visual Editor Manual

Figure 19-36 Fourth 3D Transparent Plot


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.

20.0 Dynamic 3D Display


The Visual Editor has a dynamic 3D display option that will generate a 3D geometry that can be
rotated with the mouse and the transparency of the cells can be set. Figure 20-1 shows a
geometry of a cask generated using this feature.

Page 260 of 288


MCNP Visual Editor Manual

Figure 20-1 Dynamic 3D Display


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.

Page 261 of 288


MCNP Visual Editor Manual

Figure 20-2 Dynamic 3D Display with a Transparent 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.

Page 262 of 288


MCNP Visual Editor Manual

20.1 Example: Dynamic 3D Display


This example will display a dynamic 3D plot of a box with a freestanding doorway. Figure 20-3
shows the result.

Figure 20-3 3D Display of Box and Doorway


Start the Visual Editor
Click on File…Open and select the i3ddynamic input file
Click on Update Plots.

Page 263 of 288


MCNP Visual Editor Manual

On the Visual Editor Main Menu, click on 3D View…Dynamic 3D Display.


Type 1 2 in the Cells to Display box.
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.

Page 264 of 288


MCNP Visual Editor Manual

Figure 20-4 Rotate object.


Click the Rotate Checkbox.
Place cursor on the 3D plot and hold the mouse down to drag to the left. The object rotates.

Page 265 of 288


MCNP Visual Editor Manual

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.

21.0 CAD Import


The Visual Editor can read and convert some 2D DXF and 3D SAT CAD files to an MCNP
input file.

Page 266 of 288


MCNP Visual Editor Manual

21.1 2D CAD Import


An algorithm was created to read in a CAD DXF file using a dialog added to the MCNP Visual
Editor. To access the panel for importing a 2D CAD file, the user needs to select CAD
import…2D Import from the main menu. This will bring up the CAD Import panel. The user
can then select Import to read in a CAD DXF file. The CAD geometry can then be displayed
prior to converting it to an MCNP format by selecting the Update button for one of the plots.
For every line that crosses another line, the Visual Editor will segment the lines. This is
necessary to prevent multiply defined spaces in the MCNP geometry. It also allows the user to
remove a line segment using the scan and delete options on the CAD import panel. To segment
the lines, the user selects Segment from the CAD Import panel. Figure 21-1shows a plot of the
surfaces before and after segmenting. Notice that both the lines and circles are segmented. The
geometry has still not been converted to an MCNP format. At this point the user could choose to
delete a segment by scanning the segment in and then choosing the delete option.

Figure 21-1 CAD geometry before and after segmentation


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


MCNP Visual Editor Manual

Input from the main Visual Editor menu and do a Save-Update in the resulting Input File panel
to display the MCNP plots.
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.

Figure 21-2 CAD geometry before and after conversion

Page 268 of 288


MCNP Visual Editor Manual

21.2 3D CAD Import


The 3D conversion capability allows for importing 3D CAD geometries that were created in
CAD using “perimeter modeling” or “solid modeling”. The type of import should be set in the
3D CAD import window, prior to importing the geometry.
“Perimeter modeling” 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. Perimeter modeling
requires that the CAD bodies be completely contained inside each other, although they can share
one or more common face. With perimeter modeling unions and intersections are not allowed.
An example of perimeter modeling is shown in Appendix B.
“Solid modeling” allows for a CAD model where all space is defined, including void spaces, but
doubly defined space is not allowed. This is the type of model that is typically used for
manufacturing. With solid modeling a minimum number of subtractions and unions are allowed.
For conversion to MCNP, perimeter modeling is preferred because the CAD geometry is simpler
and much more reliable for conversion. This document will focus on perimeter modeling unless
otherwise stated.
The 3D CAD file must be exported from CAD in a SAT format in order to be read into the
Visual Editor. The SAT format was used because it is a universal format that can be written and
read by most CAD packages.

Page 269 of 288


MCNP Visual Editor Manual

Figure 21-3 Assorted CAD Objects Drawn in a CAD Package


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.

Page 270 of 288


MCNP Visual Editor Manual

Figure 21-4 CAD Objects in the Visual Editor after Conversion


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.

21.3 Constraints/Restrictions for 3D CAD Conversion


Because CAD programs place no real world restrictions on the geometry created, it was
necessary to define what constraints must be applied on the CAD software so that the resulting
SAT file could be converted to a valid MCNP geometry.
1) Each CAD surface must be expressed as a general (second order) quadratic in x, y, and z.
Splines cannot currently be converted.

Page 271 of 288


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.

21.5 3D Display of Imported CAD Files


Once the geometry has been imported, a 3D visualization of the CAD geometry is displayed.
The user can use the mouse to move around the geometry and change the visibility of individual
cells (hidden, solid, transparent, or wireframe). Each cell is displayed in a different color to help
differentiate between the different imported bodies.

Page 272 of 288


MCNP Visual Editor Manual

Figure 21-5 3D CAD Visualization


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.

21.6 Example: Importing a Cube


This example will import a cube that was created in AutoCAD and exported as a SAT file.

Page 273 of 288


MCNP Visual Editor Manual

Figure 21-6 3D Display of Imported SAT Cube


Start the Visual Editor.
Click on CAD Import…3DImport.
On the CAD 3D Import panel, click Import.
Select the cube.sat file and click OK.
On the CAD3D Import panel, click Convert.
On the Main Menu, click on Input and view the created input file.

Page 274 of 288


MCNP Visual Editor Manual

21.7 Example: Importing a More Complex SAT File


This example will import a CAD drawing of a Gazebo with a tree. This SAT file was provided
by the architectural office of Richard Manke. The file was created using AutoCAD.

Figure 21-7 3D Image of imported CAD File of a Gazebo.


Start the Visual Editor.
Click on CAD Import…3DImport.
On the CAD 3D Import panel, click Import.
Select the gazebo.sat file and click OK.
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.

Page 275 of 288


MCNP Visual Editor Manual

Figure 21-8 Making a Surface Transparent.


Right Click on the Roof of the Gazebo and select Make Selection Transparent.

21.8 Example Importing a Very Complex SAT File


This example will import a CAD drawing of a furnished office. This SAT file was provided by
the architectural office of Richard Manke. The file was created using AutoCAD.

Page 276 of 288


MCNP Visual Editor Manual

Figure 21-9 3D Display of Office SAT File


Start the Visual Editor.
Click on CAD Import…3DImport.
On the CAD 3D Import panel, click Import.
Select the office.sat file and click OK.
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.

Page 277 of 288


MCNP Visual Editor Manual

Figure 21-10 Removing Exterior Walls


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.

Page 278 of 288


MCNP Visual Editor Manual

Right Click on the side wall of the office (shown in red, top right panel in Figure 21-10). In the
pop-menu, click on Hide Selection.
Right Click on the side wall of the office (shown in red, bottom left panel in Figure 21-10). In
the pop-menu, click on Make Selection Transparent.
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.
On the Input Window, click Save…Update.

Figure 21-11 Setting the Left Plot Origin.


On the Main Menu, click Update Plots.
Set the Extents to 16 on the left plot window.
Set the Extents to 18 on the right plot window.
Set the left plot origin to x=11, y=0, z=6.

Page 279 of 288


MCNP Visual Editor Manual

Set the right plot origin to x=13, y=9, z=0.


Click the Origin check box on the left plot window.
Click the RIGHT plot window where indicated in Figure 21-11.

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.

Page 280 of 288


MCNP Visual Editor Manual

Figure 21-13 2D Plot of the Converted Office File.


Figure 21-13 shows the result.

Page 281 of 288


MCNP Visual Editor Manual

21.9 Conversion of Large Files

Figure 21-14 3D Display of 1,000-Sphere Geometry


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.

Page 282 of 288


MCNP Visual Editor Manual

Figure 21-15 MCNP Geometry with 1,000 Spheres


Figure 21-15 shows the resulting MCNP geometry and input file after the CAD file has been
converted to MCNP.

Page 283 of 288


MCNP Visual Editor Manual

21.10 Example: Importing 1000 Spheres


This example will import a TurboCAD drawing of 1000 spheres encased in boxes.

Figure 21-16 1000 Spheres Inside Cube


Start the Visual Editor.
Click on CAD Import…3D 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 Save…Update.
On the 3D Plot of the cube, Right Click on the side of the cube and choose Make Selection
Transparent.

Page 284 of 288


MCNP Visual Editor Manual

Figure 21-17 1000 Spheres with Outer Box 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.

Page 285 of 288


MCNP Visual Editor Manual

Figure 21-18 Making the Inner Boxes Hidden or Transparent.


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.

22.0 Read again


Some users may decide that they want to use their own text editor instead of the one provided in
the Visual Editor. You can do this to some extent by opening the input file in your favorite text
editor, then opening the same file in the Visual Editor. The Visual Editor has been configured to
allow it to read a file in use by another program. After making changes by hand to the input file
in the text editor and saving the updated file in the text editor, select Read_again in the input
window and it will read the input file again and update the plot windows to reflect changes that
have been made.
Alternatively, the file can be opened with the File…Open (do not modify input) option which
will read in the input file without modifying it. This will disable the creation capability of the
Visual editor (surfaces, cells, materials, etc.) but the visualization features will still be available
(2D plots, 3D plots, particle tracks, etc.). In this mode, the unmodified input file will be

Page 286 of 288


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.

23.0 Backup Inp


Backup Inp takes what is in memory and writes it out to the file inpn1, inp2, inp3, … which
sequentially increases like other MCNP output files. This will allow the user to recover if an
error occurs that causes the Visual Editor to crash. It will also allow the user to keep track of
previous versions of the same file making it possible to go back to an earlier version if something
goes wrong.

24.0 Problem Reporting


The Visual Editor is constantly being upgraded to fix problems in the code. Some problems are
known and have not yet been fixed because they do not occur very often. A list of bugs will be
maintained on the Visual Editor web site at www.mcnpvised.com. Before reporting a bug, make
sure you check the outp and outmc files to see if it can provide some additional information
about the problem.

References
1
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).
2
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).
3
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).
4
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.
5
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).

Page 287 of 288


MCNP Visual Editor Manual

6
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.
7
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.
8
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.
10
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
11
R.A.. Schwarz, A.L.. Schwarz, and L. L. Carter, " Wizards and Visualization Features for
MCNP Geometries and Sources," The American Nuclear Society’s 14th Biennial Topical
Meeting of the Radiation Protection and Shielding Division, Carlsbad New Mexico, USA. April
3-6, 2006.
12
MCNP Manual, Revised 10/03/05.

13
MCNPX, Version 2.5f, LA-UR-05-0891, February 23, 2005

Page 288 of 288


MCNP Visual Editor Manual

A-1
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

Start the Visual Editor

STEP ACTION DESCRIPTION


1. Start the Visual Editor Use Windows Explorer to start the Visual Editor.
2. Select input Open the “Input” window.
3. Enter a title before the Enter the title “Simple problem” at the top of the input window, then PRESS
line containing a default RETURN.
comment card
4. Select “Save-Update” Update the Fortran memory.

A-3
MCNP Visual Editor Manual

Create the small sphere


5. Select “Surface” from the Get ready to create surfaces.
main menu.
6. In the surface window set Set the radius of the default “so” surface to 20.
R to 20.
7. In the surface window, Create the surface, which will now appear in the plots.
select “Register”.

A-4
MCNP Visual Editor Manual

Set the Surface Labels.


8. Set the Surface label size Make the labels larger so they can be seen.
to 30 in the left window.
9. Click on “Surf” in the left Show surface labels.
plot window.
10. Set the Surface label size Make the labels larger so they can be seen.
to 30 in the right window.
11. Click on “Surf” in the right Show surface labels.
plot window.

A-5
MCNP Visual Editor Manual

Create a cell consisting of the small sphere.


12. Select “Cell” from the Get ready to create cell 1 inside the small sphere.
main menu
13. Drag across the sphere in Select the sphere surface. The “1” appears on white area of cell panel.
the left plot window.
14. Click the mouse inside the Set the sense for the surface of the sphere. “POINT ACCEPTED –Select Past or
sphere. Cut” appears on white area of cell panel.
15. Select “Paste” Add the sphere to the cell description.
16. Select “Register” Create the sphere cell.

A-6
MCNP Visual Editor Manual

Set the Cell Labels.


17. Set the Cell label size to 40 Make the labels larger so they can be seen.
in the left window.
18. Click on “Cell” in the left Show cell labels.
plot window.
19. Set the Cell label size to 40 Make the labels larger so they can be seen.
in the right window.
20. Click on “Cell” in the right Show cell labels.
plot window.

A-7
MCNP Visual Editor Manual

Set the Surface Type to PZ


21. In the “Cell” window, select “Close” Close the cell window to reveal the surface window.
22. In the “Surface” window, select “Activate” Make the surface window the active window. You can also just
click on the top of the surface window to activate it.
23. In the surface window select “Surfaces- Set the surface type to “pz”.
>Plane->pz”

A-8
MCNP Visual Editor Manual

Create the PZ surfaces for the cross.


24. Set D to –80 Set the pz coefficient to –80 for the bottom of the cross.
25. In the surface window, select “Register”. Create the surface, only the left plot is updated.
26. Set D to -25 Set the pz coefficient to –25, notice the type is still “pz”.
27. In the surface window, select “Register”. Create the surface, only the left plot is updated.
28. Set D to 25 Set the pz coefficient to 25.
29. In the surface window, select “Register”. Create the surface, only the left plot is updated.
30. Set D to 80 Set the pz coefficient to 80.
31. In the surface window, select “Register”. Create the surface, only the left plot is updated.

A-9
MCNP Visual Editor Manual

Create the PX surfaces for the cross.


32. In the surface window select “Surfaces- Set the surface type to “px”.
>plane->px”
33. Set D to -80 Set the px coefficient to –80 for the left side of the cross.
34. In the surface window, select Create the surface, only the left plot is updated.
“Register”.
35. Set D to -25 Set the px coefficient to –25, notice the type is still “px”.
36. In the surface window, select “Register”. Create the surface, only the left plot is updated.
37. Set D to 25 Set the px coefficient to 25.
38. In the surface window, select “Register”. Create the surface, only the left plot is updated.
39. Set D to 80 Set the px coefficient to 80.
40. In the surface window, select “Register”. Create the surface, only the left plot is updated.

A-10
MCNP Visual Editor Manual

Create the sphere outside the cross.


41. In the surface window select “Surface->so” Set the surface type to “so”.
42. Set R to 99 Set the radius of the outer sphere to 99 cm.
43. In the surface window, select “Register”. Create the surface, only the left plot is updated.

A-11
MCNP Visual Editor Manual

Add the horizontal beam to the cell description.


44. In the “Surface” window, select “Close” Make the surface window go away, we will not need it
anymore.
45. Select “Cell” from the main menu Get ready to create cell 1 inside the small sphere.

46. Drag across surface 6 Define the four surfaces of the horizontal beam of the cross.
47. Drag across surface 9 Define the four surfaces of the horizontal beam of the cross.
48. Drag across surface 3 Define the four surfaces of the horizontal beam of the cross.
49. Drag across surface 4 Define the four surfaces of the horizontal beam of the cross.
50. Click the mouse at a point inside the four Set the sense for the surfaces of the horizontal beam.
surfaces such as near the center of the sphere
51. Select “Paste” Add the rectangular region to the cell description. Notice the
description now shows the four surfaces with the proper sense
set for each surface.

A-12
MCNP Visual Editor Manual

Add the vertical beam to the cell description.


52. Drag across surface 2 Define the four surfaces of the vertical beam of the cross.
53. Drag across surface 5 Define the four surfaces of the vertical beam of the cross.
54. Drag across surface 7 Define the four surfaces of the vertical beam of the cross.
55. Drag across surface 8 Define the four surfaces of the vertical beam of the cross.
56. Click the mouse inside the Set the sense for the surfaces of the vertical beam.
four surfaces such as near
the center of the sphere.
57. Select “Paste” 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
MCNP Visual Editor Manual

Cut out the inner sphere.


58. Drag across surface 1 Cut out the inner sphere.
59. Click the mouse inside Set the sense for the sphere.
surface 1
60. Select “cut” Remove the inner sphere from the cell description.

A-14
MCNP Visual Editor Manual

Terminate the Cell at the Outer sphere.


61. Drag across surface 10 Select the outer sphere.
62. Click the mouse outside Set the sense for the outer sphere..
surface 10
63. Select “cut” Terminate the cross at the edge of the sphere in the y direction.

A-15
MCNP Visual Editor Manual

Create the Cross Cell.


64. In the cell window, select Create cell 2 consisting of the region inside the cross and sphere, but outside the
“Register”. small inner sphere. Notice the outer sphere disappeared because the current
view of the geometry does not cut through the outer sphere.

A-16
MCNP Visual Editor Manual

Create the Region Inside the Sphere, but Outside the Cross.
65. In the right plot, drag across Define the outer boundary of the cell.
surface 10.
66. In the right plot, click inside surface 10 to Set the sense for the outer sphere. We click inside to add the
set the sense. sphere to the cell description.
67. Select “Paste” Add the all inside the outer sphere to the cell description.

A-17
MCNP Visual Editor Manual

Cut out the Horizontal Beam


68. Drag across surface 6 Define the four surfaces of the horizontal beam of the cross.
69. Drag across surface 9 Define the four surfaces of the horizontal beam of the cross.
70. Drag across surface 3 Define the four surfaces of the horizontal beam of the cross.
71. Drag across surface 4 Define the four surfaces of the horizontal beam of the cross.
72. Click the mouse inside the Set the sense for the surfaces of the horizontal beam.
four surfaces.
73. Select “Cut” Remove the rectangular region from the cell description. Notice the description
now shows the four surfaces with the proper sense set for each surface.

A-18
MCNP Visual Editor Manual

Cut out the Vertical Beam


74. Drag across surface 2 Define the four surfaces of the vertical beam of the cross.
75. Drag across surface 5 Define the four surfaces of the vertical beam of the cross.
76. Drag across surface 7 Define the four surfaces of the vertical beam of the cross.
77. Drag across surface 8 Define the four surfaces of the vertical beam of the cross.
78. Click the mouse inside the Set the sense for the surfaces of the vertical beam.
four surfaces.
79. Select “Cut” Remove the rectangular region from the cell description. Notice the description
now shows the four surfaces with the proper sense set for each surface. This has
been removed from the sphere using an intersection operator (a space).

A-19
MCNP Visual Editor Manual

Create the Cell Inside the Sphere, but Outside the Cross.
80. In the cell window, Create the cell inside the sphere, but outside the cross.
select “Register”

A-20
MCNP Visual Editor Manual

Create the Outside World.

81. In the right plot, drag Define the outer boundary of the cell.
across surface 10.
82. In the right plot, click Set the sense for the outer sphere. We click inside to define the region to cut out
inside surface 10 to set the for the outside world.
sense.

83. Select “Cut” Remove the sphere from the cell description, which will define everything but
the sphere.

84. Select “Register” Create the outside world cell.

A-21
MCNP Visual Editor Manual

Save the File


85. Select “File->Save” from Get ready to save the file
the main menu.
86. Enter the file name Enter a name for the file.
“isimple”
87. Select “Save” Save the file.
88. Select “File->Exit” Exit out of the Visual Editor.

A-22
MCNP Visual Editor Manual

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
MCNP Visual Editor Manual

START TURBO CAD

STEP ACTION DESCRIPTION


1. Start Turbo Cad Bring up Turbo Cad
2. Select NEW FROM Get ready to create a new file.
SCRATCH

B-2
MCNP Visual Editor Manual

CHOOSE TO CREATE A BOX

3. Change the body type to a box Set the mode to create a box.

B-3
MCNP Visual Editor Manual

MAKE A CUBE 200 ON A SIDE

4. Set the first vertex to (-100, -100, You define a box using three vertices.
-100) PRESS RETURN.

B-4
MCNP Visual Editor Manual

MAKE A CUBE 200 ON A SIDE

5. Set the second vertex to (100, You define a box using three vertices.
100, -100) PRESS RETURN.

B-5
MCNP Visual Editor Manual

MAKE A CUBE 200 ON A SIDE

6. Set the second vertex to (100, You define a box using three vertices.
100, 100) PRESS RETURN.

B-6
MCNP Visual Editor Manual

CHANGE THE VIEW

7. Set the view to a 3D view. Show the box as a 3D object.

B-7
MCNP Visual Editor Manual

MAKE A CUBE 14 ON A SIDE

8. Change the mode to SELECT. We want to select the cube just created and make a
smaller copy.
9. Select the cube with a mouse Select the cube so we can make a copy
click.

B-8
MCNP Visual Editor Manual

COPY THE CUBE

10. Select EDIT->COPY. Copy the cube.

B-9
MCNP Visual Editor Manual

PASTE THE CUBE

11. Select EDIT->PASTE. Make a copy of the box

B-10
MCNP Visual Editor Manual

RESIZE THE CUBE

12. Change the size in X, Y, and Z Resize the new box. If the size buttons do not show
from 200 to 140. PRESS up, you need to set the 3D select properties.
RETURN.

B-11
MCNP Visual Editor Manual

CREATE A CYLINDER

13. Set the mode to cylinder creation Get ready to make a cylinder.

B-12
MCNP Visual Editor Manual

CREATE A CYLINDER

14. Set the bottom of the cylinder at Set the bottom center of the cylinder. To create a
(40,40,-70) PRESS RETURN. cylinder, you need a bottom base point, a radius point
and a height.

B-13
MCNP Visual Editor Manual

CREATE A CYLINDER

15. Set a point on the radius at: Set the bottom center of the cylinder. To create a
(65,40,-70) PRESS RETURN. cylinder, you need a bottom base point, a radius point
and a height.

B-14
MCNP Visual Editor Manual

CREATE A CYLINDER

16. Set the height to 100. Set the bottom center of the cylinder. To create a
PRESS RETURN. cylinder, you need a bottom base point, a radius point
and a height.

B-15
MCNP Visual Editor Manual

MAKE AN ARRAY OF CYLINDERS

17. Set the mode to SELECT Change to select mode, so we can copy the cylinder

B-16
MCNP Visual Editor Manual

SELECT THE CYLINDER

18. With the mouse, SELECT the Select the cylinder


cylinder by clicking on it.
19. Select EDIT->COPY ENTITIES- Get set to make an array of cylinders
>ARRAY

B-17
MCNP Visual Editor Manual

CREATE AN ARRAY OF CYLINDERS

20. Set the XSTEP and YSTEP to - Separate the cylinders by 80.
80
21. Set the ZSTEP to 0. Make the other cylinders at the same elevation.

B-18
MCNP Visual Editor Manual

CREATE A PLANE AT 30 CM

22. PRESS RETURN, to make the Create the array.


array

B-19
MCNP Visual Editor Manual

SAVE THE FILE

23. Select FILE->SAVE AS. Bring up the file save dialog


24. Set the SAVE AS TYPE: to SAT Export the file as a SAT file.
25. Set the file type to i4cyl.sat Save the file.

B-20
MCNP Visual Editor Manual

IMPORT THE FILE INTO THE VISUAL EDITOR

26. Start the Visual Editor Bring up the Visual Editor


27. Select CAD IMPORT->3D Bring up the panel used to import 2D CAD files
IMPORT
28. Select IMPORT. Get ready to read in the sat CAD file
29. Select the file i4cyl.sat and select Read in the 3D cad file
OPEN.

B-21
MCNP Visual Editor Manual

MAKE ALL OBJECTS TRANSPARENT

30. In the 3D PLOT window, select This will create the cell (cell 1) which will show up in
MAKE ALL TRANSPARENT the plot window.

B-22
MCNP Visual Editor Manual

CONVET THE FILE

31. In the CAD 3D IMPORT This will convert the CAD geometry.
window, select CONVERT
32. Select INPUT from the main Bring up a listing of the input file.
menu.
33. Select SAVE-UPDATE from the Reset memory and update the plots.
input window.
34. In the right plot, select the SURF Show surface labels.
toggle button.
35. In the right plot, select the CELL Show cell labels.
toggle button.
36. In the right plot, set the top and Expand the view to show the complete geometry.
bottom extents to 200
37. In the right plot, select UPDATE Update the display on the right.

B-23
MCNP Visual Editor Manual

SAVE THE FILE

38. Select FILE->SAVE AS Bring up the file save dialog.


39. Set the filename to i4cyl and Set the name and save the file.
select SAVE.
40. Select FILE-> EXIT Exit the visual editor.

B-24
MCNP Visual Editor Manual

Index
delete 100
3 edit 101
hide 101
3D dynamic plotting See dynamic 3D plotting numbers 44
3D Radiographic Plots See radiographic plots register 100
3D ray traced plotting 223 renumber 188
color by cell/surface 236 scan 100
color cells by material 236 show 101
cookie cutter example 237 splitting 101
cookie cutters 237 wizard 103
distance shading 237 cell numbering 44
draw lines 236 cell sense 33, 92, 99
example 225 cell window 90
Normal 3D plot 223 cell wizard 103
plane source 237 clipboard
plot basis 236 example 19
plot to the outside world 246 color 90
point source 237 color by 45
radiographic plots See radiographic plots color plotting 45
resolution 246 coordinates
shading 237 global 47
show plot plane 237 local 47
stop at the plot plane 246 cross section 171
transparent plotting See transparent plotting cross section files 2
viewpoints 227 cross section plotting 220
3D Transparent Plotting See transparent plotting xsdir file 2
cut 92
A
atom density 170 D
axial 46 data
materials 169
B Data
Importances 177
backup inp 287 display
basis 46 example 10
bugs 5 dynamic 3D plotting 260
example 19, 263
options 261
C
CAD Import
CAD Import 2D
266
267
E
convert 267 elib 177
delete segment 267 environment variable 2
segment 267 estep 177
CAD Import 3D 269 extent 15, 43
constraints/restrictions 271
display of 272
graphical user interface 272 F
large files 282 facet 45
parsing 271 File
perimeter modeling 269, 272 Clear Input 50
SAT format 270 menu option 50
solid modeling 269 New View 50
splines 271 Open 50
cell Open (do not modify input) 50
comments 101 Print 37
create like 101 Save 51
creation, example of 28 Save As 51

I-1
MCNP Visual Editor Manual

Update 38 material
files 8 atom density 170
fill number 91 creating 170
deleting 172
density 91, 170
G edit 172
gas177 gram density 170
geometry errors 90 library 175
gram density 170 name 170
number 91
options 177
H scanning 172
materials 169
help 4 MCNP 1
horiz 46

I N
nlib 177
importances 177
display options 178
geometric factor 178 O
integer checkbox 178
scale factor 178 operating system 2
setting 177 origin 40
truncating 178 example 16
inp 9 out.ps 46
inpcrash 9 outmc 9
inpn 9 outp 9
inpn.sav 9 outp3d 9
inpn1 9
inpt
input file
9 P
creating, example of 22 particle display 190
Input Window 51 particle track plotting
isotope 171 color 194
pixel size 194
tally contributions 195
K tracks 194
kcode 198, 200 xsdir 195
ksrc 198, 200 xsdir file 2
paste 92
plane surfaces
L creating, example of 25
platform 2
labels 47 plib 177
Last 39 plot
lattice rectagular 46
cards 107 rotation 46
creating hexagonal 139 set level 47
creating rectangular 113 plotting
fill matrix 110 3D ray traced See 3D ray traced plotting
hexagonal display 169 cross section See cross section plotting
hexagonal panel 139 example 10
modifying center 135 KCODE source 200
rectangular lattice panel 109 particle track See particle track plotting
universe fill values 108 SDEF source 191
level 47 point 29, 33
postscript 46
M print
example 19
macrobody 55 printing 37
main menu 48 problem reporting 287

I-2 2
MCNP Visual Editor Manual

pscript 46
T
tally cards
R En 213
radiographic plots 247 Fna 212
example 248 types 212
maximum radiographic length 250 tally mesh 46
read again 286 tally plotting
rect 46 example 214
rectangular plot 46 opening file 214
Refresh 44 options 214
register 92, 100 overview 204
renumber 188 plotting 214
resolution 46 training 5
run189 transformations 187
run MCNP transparent plotting 252
xsdir file 2 average cell thickness 252
cell transparentcy 252

S
U
Save-Update 51
scales 46 undo 100
SDEF 191 unexpected end of file 11
send to clipboard 37 universe 99
sense 33 universe number 91
source plotting Update 39
kcode 200 Update Plots 38
SDEF 191 usr.n 9, 174
sphere usr.p 9, 174
creating, example of 24
stndrd.n 9, 174
stndrd.p 9, 174
V
surface vert 46
comments 54 vised.defaults 9, 171, 173
creating 52
deleting 54
delta 55 W
dimensions 54 website 5
distance 54 weight window mesh 45
editing 54 Windows 2000 2
facet number 45 Windows Vista 2
hiding 54 Windows XP 2
macrobody 55
numbers 44
reflective 52 X
registering 52
renumber 188 xsdir 2
scan 53
scanning
select
52
91
Z
showing 54 ZAID 171
transformation 52 zoom
Surface example 12
window 51 Zoom 39
wizard 64
surface number 44

I-3 3

You might also like