On this page
Worked examples
When we are working with simple geometries, we can easily calculate the volumes of cells and, for most cases, MCNP can also calculate the volumes. However, MCNP cannot calculate the volumes and areas of asymmetric, non-polyhedral, or infinite cells. (Kulesza et al.; 2022) When we begin working with complex geometries and repeated lattice structures, it is important that we have a good calculation of the cell volumes and calculation by hand can be very difficult. Fortunately, there is a simple way to use MCNP to calculate the volume for us using what is known as a stochastic volume calculation.

For a stochastic volume calculation, we are going to take our entire model and place it inside a bounding sphere that serves as an inwardly directed source. We will set the source weight equal to the cross-sectional area of the sphere, . We will also include a VOID card that will void out all the materials so the particles will pass right through all the cells without collision. Finally, we will set all the volumes for the cells in the model equal to 1 and perform a F4 volume tally. The results of the volume tally will be equal to the volume in the model. Example 6.2 is a stochastic volume tally for the pig – detector problem from Example 6.1 with three cells in the shield region.
In Example 6.2, we will add a generic block at the end of the data card sections that we can use with little modification for all our future models for volume calculations.
Example 6.2
Perform a stochastic volume calculation on the pig detector model from Example 6.1 that had three cells in the lead shielded region.
Solution: Use sphere 999 as the source surface and add the stochastic volume tally operation to the end of the Data Card section and comment out the appropriate cards. The complete input file is below:
NE361 Pig - Detector Model - Importance Variance Reduction VOLUME CALC -------------------------------------------------------------------C | This is a model of a shielded container, a "pig" with a Cs-137 |C | point source located inside. The container is a cylinder |C | 20 cm high and has an overall radius of 5.2 cm. The wall is |C | 4 cm thick lead with 0.2 cm copper. The detector is 100 cm away.|C -------------------------------------------------------------------C ************************CELL CARD BLOCK****************************1 1 -0.001297 -1 $air in middle of container2 2 -1.135E+01 1 -21 $Lead inner cylinder22 2 -1.135E+01 21 -22 $Lead layer 223 2 -1.135E+01 22 -23 $Lead layer 33 3 -1.135E+01 23 -3 $Copper outside lead4 1 -0.001297 3 -999 $air outside the copper99 0 999 $Outside sphere void graveyardC *****************************SUFACE CARD BLOCK*********************C Right cylinder on origin filled with air1 RCC 0 -10 0 0 20 0 1C Right cylinder on origin filled with lead (layer 1)21 RCC 0 -10 0 0 20 0 2.333333333C Right cylinder on origin filled with lead (layer 2)22 RCC 0 -10 0 0 20 0 3.666666666C Right cylinder on origin filled with lead (layer 3)23 RCC 0 -10 0 0 20 0 5C Right cylinder on origin filled with copper3 RCC 0 -10 0 0 20 0 5.2C Sphere outside of the problem for boundary to kill off particles999 so 105C ****************************DATA CARD BLOCK************************MODE PC XXXXXXXXXX COMMENT OUT IMP, VOL, SDEF, AND TALLY XXXXXXXXXXXXXXC importance for cells 1 2 22 23 3 4 and 99C IMP:P 1.0 2m 2m 2m 1.0 1.0 0.0C VOL 62.83185307C 279.2526705C 502.6545272C 726.057276C 128.1769803C 4847349.288C volumes cells 1 2 22 23 3 and 4C point source at the origin uniformly emittingC 0.662 MeV photons isotropicallyC SDEF POS=0 0 0 PAR=2 ERG=0.662C Point Tally at 100 cm along the x axisC F5:P 100 0 0 2 $a point tally with a 2 cm radius exclusion zoneC Fm5 3.7E9 $Multiply tally by 0.1 Cu in decays/sec to get real fluxC E5 0.661 10 T $3 energy bins – collided, uncollided, and totalC Material Dry Air at STP (w/o Taken from Attix PG 532)C XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Hover a line
Each line is read as a cell, a surface, or a data card. Tap a line on a small screen.
- ●Cell cards
- ●Surface cards
- ●Data cards
M1 6000 -0.0124 7014 -75.5267 8016 -23.1781 GAS=1C Lead at nominal density from NIST at 1.135E+01 gm/cm^3C Use the stable isotopes and abundances for natural lead fromC The Chart of the Nuclides onlineM2 82204 -0.014 82206 -0.241 82207 -0.221 82208 -0.524C Copper at nominal density from NIST at 8.960E+00 gm/cm^3C Use the stable isotopes and abundances for natural copper fromC The Chart of the Nuclides onlineM3 29063 -0.6915 29065 -0.3085NPS 1E7C *******************************************************************C Uncomment these cards to do the stochastic volume tally.C Note you must comment out the IMP, VOL, SDEF and TALLY cards above.C If present, comment out KCODE, KSRC and BURN cards as well.C Remove reflected boundary conditions if presentC Set all IMP for tally cells to 1 and VOL to 1C Wgt calculated as area of xs of plotting sphere (pi R^2)CIMP:P 1 1 1 1 1 1 0Vol 1 1 1 1 1 1F4:P 1 2 22 23 3 4 $cell names for volume tallyVOID $ Voids out all materialsSDEF SUR=999 NRM=-1 DIR=D1 WGT= 34636.05901 PAR=2SP1 -21 1C NPS 10000000
Hover a line
Each line is read as a cell, a surface, or a data card. Tap a line on a small screen.
- ●Cell cards
- ●Surface cards
- ●Data cards
The result of the tally is:
cell 1 6.27335E+01 0.0116
cell 2 2.80016E+02 0.0073
cell 22 5.02768E+02 0.0057
cell 23 7.29121E+02 0.0048
cell 3 1.29519E+02 0.0055
cell 4 4.84638E+06 0.0001The values are nearly identical to the hand calculations we performed earlier for the volumes. Now we can use the block-select mode in TextPad® to quickly copy and paste the values into the VOL block for the model and comment out the stochastic volume calculation cards and uncomment the original cards.
The stochastic volume calculation can be performed with either photons or neutrons as the source. The only requirement is that the mode of the problem is consistent with the tally type.
Temperature Effects in MCNP
As we previously discussed in Chapter 1, the cross sections for many isotopes significantly change with temperature. In section 1.6, we discussed how NJOY99 can be used to generate cross section libraries at various temperatures which we were able to view. In Example 3.3, we changed the fuel temperature within our unit cell model in NEWT to calculate the fuel temperature coefficient, , for our infinite reactor model. If the user has access to NJOY, they can use it to create user-defined cross sections to add to the cross-section library in our MCNP code. Care will have to be maintained modifying some files that are integral to how MCNP calls data and operates.
The MCNP code uses a few different files to link the working program with the data and other information it needs to calculate the problem. One file, “xsdir” is a file located in the MCNP_DATA directory. The xsdir file is a library index. It lists the cross-section file names which point to the file where the cross-section data files are located and their place on the computer. When we make new cross sections using NJOY99, we will have to add the cross-section file to the data library and add information to the xsdir file so MCNP can find our new cross-sections. Often, a user-defined cross-section will be named using a file extension that is unique, like .90c, so it does not overwrite an integral library in the program. Once completed, the new cross-section libraries can be accessed by adding the library extension to the isotope ZAID nomenclature.
Because MCNP has some temperature-specific cross sections already, can look at the effect of fuel temperature on reactivity without generating our own cross sections. We did this calculation using the NEWT module in SCALE in Example 3.3. For Example 6.3, we will model the same unit cell pin in MCNP. This pin will have the same dimensions, material compositions and boundary conditions as the NEWT model. We will run the problem 5 times. For the sake of simplicity and to get a broader range of temperatures, we will use the ENDF7 libraries of *.70C, *.71C, *.72C, *.73C and *.74C, instead of the libraries we generate using a program like NJOY99. These libraries are already in the MCNP database and correspond to 293.6, 600, 900, 1200 and 2500 K. Once complete, we will plot the k as a function of temperature and use the slope of the line to estimate the fuel temperature coefficient. Finally, we will compare the results from our MCNP model to those we calculated in SCALE.
Example 6.3
Use MCNP to model the same unit fuel pin used in Example 3.1. Perform a series of KCODE calculations changing the neutron cross section libraries for the fuel from *.70C to *.71C to *.72C to *.73C and to *.74C. Report the results for the k and variance at each temperature. Plot the results and use the same technique used in Example 3.3 to calculate the fuel temperature coefficient. Compare the results to those in Example 3.3.
Solution: First make a unit cell model for MCNP. Include a stochastic volume calculation that can be commented in and performed.
We can plot our unit cell model using either the MCNP plotter or VISED:

The plot allows us to check for errors and ensures it is consistent with the model we made in SCALE. In this case, the fuel is green, cladding is red, and the moderator is blue. The zoomed in view on the right shows the gap is present in yellow.
NE361 Single PWR Unit CellC -------------------------------------------------------------------C | This is a KCODE calculation for a single PWR unit cell pin. |C | The cell has a pitch of 1.331 cm, length of 320 cm. The fuel |C | radius is 0.385 cm. It is fueled with UO2 at 4.5 w/o enriched |C | U-235. The cladding is zirconium and the gap is He |C -------------------------------------------------------------------C ************************CELL CARD BLOCK****************************1 2 -10.2 -2 -91 90 $UO2 FUEL PELLET2 3 -6.407 2 -3 -91 90 $FUEL PIN CLAD3 4 -0.001297 3 -4 -91 90 $He IN GAP4 1 -0.715 -1 #1 #2 #3 $UNIT CELL WATER199 0 1 -999 $Void Outside of pin999 0 999 $GraveyardC OUTSIDE OF UNIT CELL (1.311 cm PITCH)C REFLECTED BOUNDARY ON ALL SIDES*1 RPP -0.6555 0.6555 -0.6555 0.6555 -160 160C CYLINDER OUTER RADIUS OF FUEL PELLET 0.385 cm2 CZ 0.385C CYLINDER OUTER RADIUS OF GAP 0.390 cm3 CZ 0.390C CYLINDER OUTER RADIUS OF CLADDING 0.461 cm4 CZ 0.461C PLANES FOR THE TOP AND BOTTOM OF FUEL ROD90 PZ -15991 PZ 159c999 so 600 $sphere for graveyard
Hover a line
Each line is read as a cell, a surface, or a data card. Tap a line on a small screen.
- ●Cell cards
- ●Surface cards
- ●Data cards
c ************************ Data Cards ****************************cIMP:n 1 1 1 1 0 0VOL 1.52396E+023.85329E+006.27137E+013.31355E+02cc ****************** Criticality and Burn Control Cards **********MODE NKCODE 2000 1.45 55 100 500KSRC 0.0 0.0 0.0M1 8016.71C -8.88100E+011001.71C -1.11900E+01MT1 LWTR.04T $H20 AT 600 KM2 92234.74C -4.69781E-0592235.74C -0.03918629192238.74C -0.8421888288016.74C -0.118577903$UO2 4.5% at 293KM3 40000.58C 1.0 $ZIRCONIUM (APPROX. FOR ZIRCALLOY)M4 2004.70C 1.0 $ HeliumPRINT -128CC *******************************************************************C Uncomment these cards to do the stochastic volume tally.C Note you must comment out the kcode, ksrc, and vol cards above.C You must change the importance from 1 1 1 1 0 0 to 1 1 1 1 1 0.C Also, remove reflected boundary conditions on surfaces 1CC Wgt calculated as area of xs of plotting sphere (pi R^2)CC Vol 1 1 1 1C F4:N 1 2 3 3C VOIDC SDEF SUR=999 NRM=-1 DIR=D1 Wgt= 1130973.35529C SP1 -21 1C nps 10000000
Hover a line
Each line is read as a cell, a surface, or a data card. Tap a line on a small screen.
- ●Cell cards
- ●Surface cards
- ●Data cards
We will leave the problem the same for all five runs except we will change the neutron library identifier from *70c - *.74c for the isotopes in the fuel. After we run the simulation at each temperature we get:
| Fuel | ||
|---|---|---|
| Temperature | ||
| (kelvin) | k | Variance |
| 293.6 | 1.47589 | 0.00203 |
| 600 | 1.46312 | 0.00172 |
| 900 | 1.45307 | 0.00236 |
| 1200 | 1.44484 | 0.00187 |
| 2500 | 1.41226 | 0.00209 |
As with all MCNP results, we include the variance in the reported value. We also use this variance for the error bars in the following plot:

When we look at the results for the KCODE calculation and compare them to the NEWT calculation for the same unit fuel pin we can make some observations. First, the MCNP values are higher for k. At room temperature, the value for MCNP is about 2% greater. In fact, all of the MCNP values are about 2% higher at the same or similar temperatures. The result is a fuel temperature coefficient that is nearly the same at k/ degree K. What this implies is there is a systematic difference between the two models. Perhaps the order of quadrature in the deterministic model has some effect. More likely is a difference in the way the fuel enrichment was calculated when we specified the enrichment in NEWT. If we were using the two models to validate each other or if we had some experimental data we were trying to match, it would be essential for us to determine the exact cause for the systemic differences and account for them.
References
Full bibliography- Kulesza, J. A., Adams, T. R., Armstrong, J. C., Bolding, S. R., Brown, F. B., Bull, J. S., Burke, T. P., Clark, A. R., Forster III, R. A., Giron, J. F., Grieve, T. S., Josey, C. J., Martz, R. L., McKinney, G. W., Pearson, E. J., Rising, M. E., Solomon Jr., C. J., Swaminarayan, S., Trahan, T. J., Wilson, S. C. and Zukaitis, A. J. (2022). MCNP Code Version 6.3.0 Theory & User Manual. https://www.osti.gov/biblio/1889957
