Allen CDNE

Computational Design in Nuclear Engineering · Allen

Download the PDF

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

Download the PDF

Chapter 5 · Introduction to MCNP 6.2

Building the Input Deck– Data Cards VOL and SDEF

On this page

Chapter 5 · 3 / 89 min readPDF page 138

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

After the geometry of the model is completely defined, we can finish our model by completing the Data Card section. Remember, we already made some data cards when we defined the materials for the model. As described in Table 5.1, the data block section follows a single blank line delimiter after the cell block. In addition to the materials, the Data Card section can include parameters for the cells, source definitions, burnup cards, tally cards, and print controls.

As a technique, we will use a VOL card to define the volume for all of the cells in our problem. MCNP is capable of calculating the area and volume of many cells, however there are some geometries that it cannot adequately define such as asymmetric, non-polyhedral, or infinite cells. In order to adequately define all of the cells, we will demonstrate the use of a stochastic volume calculation in the next chapter. For the simple geometries in this chapter, we can easily calculate the volumes by hand. To specify the volume for each cell in the Data Card section write the following:

Input
VOL   value1  value2  value3…

Each value is the volume for the cells defined in the Cell Block in cm3^3. The values are in the order that cells are listed.

Another method to specify the volume of the cells is in the cell parameters, like we did with the importance using a VOL=(value) where the value is the volume in cm3^3. If we use the stochastic volume calculation, it is easier to specify the volume in the Data Card section.

The definition of the source is just as important to the problem as the definition of the geometry. Within MCNP, the SDEF command controls the source command. Table 5.5. is a list of the variables for the SDEF command that are used if other than the default value is needed to define the source.

Table 5.6. Source Variable for the SDEF Command

VariableMeaningDefault
CELcelldetermined from XXX, YYY, ZZZ and possibly UUU, VVV, WWW
SURsurface0 (means cell source)
ERGenergy (MeV)14 MeV
DIRμ\mu, the cosine of the angle between VEC and UUU, VVV, WWW. The azimuthal angle is always sampled uniformly in [0, 2 ]Volume case: μ\mu is sampled uniformly in [-1.1] (isotropic). Surface case: p(μ\mu) = 2μ\mu for μ\mu [0, 1] (cosine distribution).
VECreference vector for VECVolume case: required unless isotropic. Surface case: vector normal to the surface with sign determined by NRM.
NRMsign of the surface normal1
POSreference point for positioning sampling0, 0, 0
RADradial distance of the position from POS or AXS0
EXTCell case: distance from POS along AXS. Surface case: cosine of angle from AXS0
AXSreference vector for EXT and RADno direction
Xx-coordinate of positionno X
Yy-coordinate of positionno Y
Zz-coordinate of positionno Z
CCCcookie-cutter cellno cookie-cutter cell
ARAarea of surface (required only for direct contributions to point detectors from a plane surface sourcenone
WGTparticle weight1
EFFreference efficiency criterion for position sampling0.01
PARtype of particle source emits= 1 (neutron) if MODE N or P or N P E; = 2 (photon) if MODE P; = 3 (electron) if MODE E

The MCNP User’s Manual has examples of complicated sources and description of the SDEF command line. This description is typically challenging for new users to understand. Often problems can be described with simple source definitions. The following source definitions from An MCNP Primer by Shultis and Faw are excellent examples for simple sources. (Shultis; 2011)

Two Point Isotropic Sources at Different Positions

Screenshot 1
MCNP input — Screenshot 2 — mcnp, hover a line
C ---- Source: two point isotropic 1-MeV photon sources on x-axis
SDEF ERG=1.00 PAR=2 POS=d5 $ energy, particle type, location
SI5 L -10 0 0 10 0 0 $ (x,y,z) cords of the two pt sources
SP5 .75 .25 $ relative strengths of each source

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

Note: The label 5 in the distribution d5 links to the SI5 and SP5 cards

Point Isotropic Source with Discrete Energy Photons

Screenshot 3
MCNP input — Screenshot 4 — mcnp, hover a line
C ---- Source: point isotropic source with 4 discrete photon energies
SDEF POS 0 0 0 ERG=d1 PAR=2 $ location, energy, particle type
SI1 L .3 .5 1. 2.5 $ the 4 discrete energies (MeV)
SP1 .2 .1 .3 .4 $ frequency of each energy

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

Point Isotropic Source with a Histogram of Energies

Screenshot 5
MCNP input — Screenshot 6 — mcnp, hover a line
C ---- Source: point isotropic source 4 histogram energy bins
SDEF POS 0 0 0 PAR=2 ERG=d1 $ location, particle type, energy
SI1 H .1 .3 .5 1. 2.5 $ histogram boundaries
SP1 0 .2 .4 .3 .1 $ probabilities for each bin

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

Point Isotropic Source with a Continuum of Energies

Screenshot 7
MCNP input — Screenshot 8 — mcnp, hover a line
C ---- Source: point isotropic with Maxwellian energy spectrum
SDEF POS 0 0 0 PAR=2 ERG=d1 $ location, particle type, energy
SP1 -2 0.5 $ Maxwellian spectrum (2) with tem a=0.5 MeV

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

Point Isotropic Source with Tabulated Energy Distribution

Screenshot 9
MCNP input — Screenshot 10 — mcnp, hover a line
C ---- Source: continuum energies tabulated at discrete energies
SDEF POS 0 0 0 PAR=2 ERG=d1 $ location, particle type, energy
SI1 A 1 2 3 4 5 6 7 $ tabulated energies E1 ...E7
SP1 0 .2 .27 .3 .28 .18 0 $ distribution values f(Ei)

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

Two Point Sources with Different Energy Distributions

Screenshot 11
MCNP input — Screenshot 12 — mcnp, hover a line
C ---- 2 pt iso sources: src 1 (4-bins) src 2 (4 discrete Ei)
SDEF PAR=2 POS=d1 ERG FPOS d2 $ particle type, energy, location
SI1 L -10 0 0 10 0 0 $ cords of srcs on x-axis
SP1 .4 .6 $ rel strengths of sources
DS2 S 3 4 $ energy distributions
SI3 H .1 .3 .5. 1. 2.5 $ E bin limits src 1
SP3 D 0 .2 .4 .3 .1 $ bin prob for src 1
SI4 L .3 .5 .9 1.25 $ discrete Ei for src 2
SP4 .20 .10 .30 .40 $ rel freq for src 2

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

Rectangular Parallelepiped Parallel to Axes

Screenshot 13
MCNP input — Screenshot 14 — mcnp, hover a line
C ---volumetric monoenergetic source inside a rectangular parallelepiped
SDEF X=d1 Y=d2 Z=d3 ERG=1.25 PAR=2 $ location, energy, par type
SI1 -10. 10. $ x-range limits for source volume
SP1 0 1 $ uniform probability over x-range
SI1 -15. 15. $ y-range limits for source volume
SP1 0 1 $ uniform probability over y-range
SI1 -20. 20. $ z-range limits for source volume
SP1 0 1 $ uniform probability over z-range

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

Source in a Complex Cell: Enclosing RPP Rejection Method

Screenshot 15
MCNP input — Screenshot 16 — mcnp, hover a line
C --- Cell 8 is some complex cell in which a monoenergetic isotropic
C volumetric source exists. A rectangular parallelepiped envelops
C this cell (MCNP does NOT check this!). Points, randomly picked
C in the rectangular parallelepiped, are accepted as source points
C only if they are inside cell 8.
C
SDEF X=d1 Y=d2 Z=d3 ERG=1.25 PAR=2 CEL=8 $ location, energy, par type
C NOTE: source parallelepiped is larger than cell 8, and hence
C source positions sampled outside cell 8 are rejected.
SI1 -12. 12. $ x-range limits for source volume
SP1 0 1 $ uniform probability over x-range
SI1 -11. 11. $ y-range limits for source volume
SP1 0 1 $ uniform probability over y-range
SI1 -13. 13. $ z-range limits for source volume
SP1 0 1 $ uniform probability over z-range

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

Source in a Complex Cell: Enclosing Sphere Rejection Method

Screenshot 17
MCNP input — Screenshot 18 — mcnp, hover a line
C --- Cell 8 is some complex cell in which a monoenergetic isotropic
C volumetric source exists. A sphere envelops this cell (MCNP
C does NOT check this!). Points, randomly picked in the sphere,
C are accepted as source points if they are inside cell 8
C
SDEF POS=0 0 0 RAD=d1 CEL=8
SI1 0 20. $ radial sampling range: 0 to Rmax (=20 cm)
SP1 -21 2 $ weighting for radial sampling: here r^2

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

Line Source (Degenerate Rectangular Parallelepiped)

Screenshot 19
MCNP input — Screenshot 20 — mcnp, hover a line
C --- Line monoenergetic photon source lying along x-axis
C This uses a degenerate Cartesian volumetric source.
C
SDEF POS=0 0 0 X=d1 Y=0 Z=0 PAR=2 ERG=1.25
SI1 -10 10 $ Xmin to Xmax for line source
SP1 -21 0 $ uniform sampling on line Here x^0

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

Disk Source (Degenerate Cylindrical Source)

Screenshot 21
MCNP input — Screenshot 22 — mcnp, hover a line
C --- disk source in x-y plane centered at the origin.
C This is a degenerate cylindrical volume source.
C
SDEF POS=0 0 0 AXS=0 0 1 EXT=0 RAD=d1 PAR=2 ERG=1.25
SI1 0 11 $ radial sampling range: 0 to Rmax
SP1 -21 1 $ radial sampling weighting: r^1 for disk source

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

Plane Source (Degenerate Rectangular Parallelepiped)

Screenshot 23
MCNP input — Screenshot 24 — mcnp, hover a line
C --- rectangular plane source centered on the origin and perpendicular
C to the y-axis. This uses a degenerate Cartesian volumetric source.
C
SDEF POS=0 0 0 X=d1 Y=d2 Z=0 PAR=2 ERG=1.25
SI1 -10 10 $ sampling range Xmin to Xmax
SP1 0 1 $ weighting for x sampling: here constant
SI2 -15 15 $ sampling range Ymin to Ymax
SP1 0 1 $ weighting for y sampling: here constant

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

Disk Source (Degenerate Cylindrical Source)

Screenshot 25
MCNP input — Screenshot 26 — mcnp, hover a line
C --- disk source in x-y plane centered at the origin.
C This is a degenerate cylindrical volume source.
C
SDEF POS=0 0 0 AXS=0 0 1 EXT=0 RAD=d1 PAR=2 ERG=1.25
SI1 0 11 $ radial sampling range: 0 to Rmax
SP1 -21 1 $ radial sampling weighting: r^1 for disk source

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

Plane Source (Degenerate Rectangular Parallelepiped)

Screenshot 27
MCNP input — Screenshot 28 — mcnp, hover a line
C --- rectangular plane source centered on the origin and perpendicular
C to the y-axis. This uses a degenerate Cartesian volumetric source.
C
SDEF POS=0 0 0 X=d1 Y=d2 Z=0 PAR=2 ERG=1.25
SI1 -10 10 $ sampling range Xmin to Xmax
SP1 0 1 $ weighting for x sampling: here constant
SI2 -15 15 $ sampling range Ymin to Ymax
SP1 0 1 $ weighting for y sampling: here constant

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

Disk Source (Degenerate Cylindrical Source)

Screenshot 29
MCNP input — Screenshot 30 — mcnp, hover a line
C --- line source (degenerate cylindrical volumetric source)
SDEF POS=0 0 0 AXS=1 0 0 EXT=d1 RAD=0 PAR=2 ERG=1.25
SI1 -10 10 $ axial sampling range: -X to X
SP1 -21 0 $ axial sampling weighting: here constant

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

Monodirectional Disk Source

Screenshot 31
MCNP input — Screenshot 32 — mcnp, hover a line
C --- disk source perpendicular to z-axis uniformly emitting
C 1.2-MeV neutrons monodirectionally in the + z-direction
C
SDEF POS=0 0 0 AXS=0 0 1 EXT=0 RAD=d1 PAR=1 ERG=1.2
VEC=0 0 1 DIR=1
SI1 0 16 $ radial sampling range: 0 to Rmax
SP1 -21 1 $ radial sampling weighting: r^1 for disk source

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

Point Source Collimated into a Cone of Direction

Screenshot 33
MCNP input — Screenshot 34 — mcnp, hover a line
C --- Point isotropic 1.5 MeV photon source collimated into
C an upward cone. Particles are confined to an upward
C (+z axis) cone whose half-angle is a cos(0.9) = 25.8
C degrees about the z-axis. Angles are with respect to
C the vector specified by VEC
C
SDEF POS=0 0 0 ERG=1.25 PAR=2 VEC=0 0 1 DIR=d1
SI1 -1 0.9 1 $ histogram for cosine bin limits
SP1 0 0.95 0.05 $ frac. Solid angle for each bin
SB1 0. 0. 1. $ source bias for each bin

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

With this conical source, tally normalization is per source particle in 4π\pi steradians. To normalize the tally per source particle in the cone, put WGT=1/fsa2 on the SDEF card, where fsa2 is fraction solid angle of the cone (0.05 in the above example). Calculate the fsa by using the cosine bin limits and taking the following:

[(1−−1)−(1−0.9)]2=0.95\frac{[(1--1)-(1-0.9)]}{2}=0.95
[(1−0.9)−(1−1)]2=0.05\frac{[(1-0.9)-(1-1)]}{2}=0.05

The Primer has more specifications for multiple volumetric sources and some other sources that are not repeated here. The User’s Manual also has many examples of a variety of sources and additional options and cases that are beyond the scope of this text. As a good practice, use the PRINT 110 card in the Data Card section. This option prints the locations, directions, and energies of the first 50 particles to be printed in the output.

Criticality Source

One additional source that we will cover does not have a specific geometry associated with it. That is the KCODE and KSRC source definitions used for criticality calculations. The definition of a criticality model takes a slightly different form than the previous examples. To use a criticality source, there must be fissile material in the model. The criticality source consists of two cards, KCODE and KSRC. Table 5.6 lists the parameters for the KCODE card and their descriptions. The default parameter is used unless another value is specified. The KCODE card has the following form (Kulesza et al.; 2022):

Table 5.7. Input parameters for KCODE data card.

Input ParameterDescription
nsrckNumber of source histories per cycle. (DEFAULT: nsrck=1000)
rkkInitial guess for keffk_{eff}. (See Note 1.) (DEFAULT: rkk=1.0)
ikzNumber of cycles to be skipped before beginning tally accumulation. (DEFAULT: ikz=30)
kctTotal number of cycles to be done. If kct=0, never terminate on the number of cycles, but terminate on time. (DEFAULT: kct=ikz+100)
msrkNumber of source pints for which to allocate storage (See Note 2.) (DEFAULT: msrk=maximum of 4500 or 2 x nsrck)
knrmControls normalization of tallies. If knrm=0, normalize tallies by weight. (DEFAULT) If knrm=1, normalize tallies by number of histories.
mrkpMaximum number of cycle values on MCTAL or RUNTPE files. (DEFAULT: mrkp=6500)
kc8Controls the number of cycles over which summary to average. If kc8=0, average over all cycles. (See Note 3.) If kc8=1, average over active cycles only. (DEFAULT)

Note 1: If in the first cycle the source being generated overruns the current source, the initial guess (rkk) is probably too low. The code then proceeds to print a comment, continues without writing a new course calculates keffk_{eff}, reads the initial source back in, and begins problem using keffk_{eff} instead of rkk. If the generated source again overruns the current source after the first cycle, the job terminates and either a better initial guess (rkk) or more source space (msrk) should be specified on the next try.

Note 2: If an SRCTP file with a larger value of msrk is read for the initial source, the larger value is not used.

Note 3: Setting the parameter kc8 to zero causes tallies and summary table information to be for both active and inactive cycles and should not be used. Setting kc8 = 0 also results in strange MCTAL file normalization.

Figure 5.7. Top view of example MCNP model of a PWR assembly. Fuel rods are green, control rod guide tubes are red, and the center instrument guide tube is filled with water which is blue.
Figure 5.7. Top view of example MCNP model of a PWR assembly. Fuel rods are green, control rod guide tubes are red, and the center instrument guide tube is filled with water which is blue.

The second required card for a criticality source is the KSRC card which specifies the criticality source points. These are the locations for the initial points for the KCODE calculation. They must be located in a region in the model where there is fissile material. The KSRC card has the following form:

Input
KSRC	x1 y1 z1    x2 y2 z2...

where x y z are the locations of the initial source points. For small models, like our unit cell, we can use just one source point. For larger models, like a reactor core, multiple points will be needed throughout the core to get the criticality calculation started.

An example for a criticality source for a small single assembly model displayed in Figure 5.7 is presented below:

Input
KCODE   2000    1.3     5       55      500
 KSRC    1.443     0.0     0.0

In this case, the initial guess for k is 1.3 and the location for the source starting point is slightly off the origin by the value of the rod pitch (1.443 cm) because the center rod location did not have fissile material in it. The center of the model in Figure 5.7 is an instrument guide tube filled with water.

Video for this sectionMCNP KCODE Source Definition
Video for this sectionMCNP SDEF Source Definition
  • 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
  • Shultis, J. K. ; Faw, R. E. (2011). An MCNP Primer, Department of Mechanical and Nuclear Engineering, Manhattan, KS. https://mcnp.lanl.gov/pdf_files/Book_MonteCarlo_2011_ShultisFaw_AnMCNPPrimer.pdf

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

Download the PDF