Вы находитесь на странице: 1из 35

# MCNP CLASS SERIES

## (SAMPLE MCNP INPUT)

Jongsoon Kim
Basic constants in MCNP
Lengths in cm
Energies in MeV
Times in shakes (10-8 sec)
Atomic densities in units of atoms/barn*-cm
Mass densities in g/cm3

## * 1 barn = 10-24 cm2

Simple sample problem
MCNP INP file
All inputs lines: up to 80 columns
One Line Problem Title Card
Alphabetic characters: upper, lower,
Cell cards
or mixed case
.
Anything that follow \$: a comment
.
Comment lines
 Start C somewhere in columns 1-5
Surface cards  At least one blank
.  A total of 80 columns long
.  Blanks filling the first five columns : a
continuation of the data from the last
name card
Data cards
.
.
Surface cards (Surface equations)

## Mnemonic Equation Card Entries

PX x-D = 0 D
PY y-D = 0 D
PZ z-D = 0 D
S ( x − x1 ) 2 + ( y − y1 ) 2 + ( z − z1 ) 2 − R 2 = 0 x1 y1 z1 R
Surface cards in a sample problem

## C beginning of surface for cube

1 PZ -5
2 PZ 5
3 PY -5
4 PY 5
5 PX -5
6 PX 5
C End of cube surfaces
7 S 0 -4 -2.5 0.5 \$ Oxygen sphere
8 S 0 4 4 0.5 \$ Iron sphere
Cell cards
1 1 -0.0014 -7 IMP:N=1
 1=> Cell number
 1=> Cell material number, Material is described on a
material card (Mn)
 -0.0014 => Cell material density
 Positive => Atom density in units of 1024 atoms/cm3
 Negative => Mass density in g/cm3

##  -7 => Specification of the geometry of the cell

 Combination with the Boolean intersection and union
operators
Cell cards in a sample problem
C Cell cards for sample problem
1 1 -0.0014 -7
2 2 -7.86 -8
3 3 -1.60 1 -2 3 -4 5 -6 7 8
4 0 -1:2:-3:4:-5:6
C End of cell cards
Data cards

## MCNP card name

Mode MODE
Cell and surface IMP:N
Source specification SDEF
Tally specification Fn, En
Material specification Mn
Problem cutoff NPS
Data cards (1. MODE card)

## Mode N Neutron transport only (default)

NP Neutron and neutron-induced photon transport
P Photon transport only
E Electron transport only
PE Photon and electron transport
N P E Neutron, neutron-induced photon and electron transport

## * If the MODE card is omitted, mode N is assumed.

Data cards
(2. Cell and surface parameters)
IMP:N card
 Cell importance parameters
 For terminating the particle's history if the importance
is zero.
 Fro geometry splitting if a particle moves to higher
importance cell
 For Russian roulette if a particle moves to lower
importance cell

*IMP: N 1 1 1 0
Data cards
(3.1 Source specification cards)

POS = x y z Default is 0 0 0
CEL = starting cell number
ERG = starting energy Default is 14 MeV
WGT = starting weight Default is 1
TME = time Default is 0
PAR = source particle type 1 for N, N P, N P E
2 for P, P E
3 for E
Data cards
(3.2 Source specification cards)
SDEF POS=0 -4 -2.5 CEL=1 ERG=14 WGT=1
TME=0 PAR=1

## => Neutron particles will start at the center of the

oxygen sphere (0, -4, -2.5), in cell 1, with an
energy of 14 MeV, and with weight 1 at time 0

## * SDEF POS=0 -4 -2.5

Data cards
(4.1 Tally specification cards)

## F1:P F1:E Surface current

F2:P F2:E Surface flux
F4:P F4:E Track length estimate of cell flux
F5:P Flux at a point (point detector)
F6:P Track length estimate of energy deposition
F8:P F8:E Energy distribution of pulsed created in a detector
Data cards
(4.2 Tally specification cards)
Tally (Fn) cards

## F2:N 8 \$ Flux across surface 8

F4:N 2 \$ Track length in cell 2

## Tally Energy (En) card

E2 1 2 3 4 5 6 7 8 9 10 11 12 13 14
E2 1 12I 14
Data cards
(5.1 Material specification cards)
Mm ZAID1 fraction1 ZAID2 fraction2 ....

## m is the material number on the cell card

Nuclide Identification Number (ZAID) : To identify
the element or nuclide desired (ZZZAAA).
 ZZZ: Atomic number of the elements of nuclide
 AAA* : Mass number of the nuclide

## * For naturally occurring elements, AAA=000.

Data cards
(5.2 Material specification cards)
Nuclide fraction
 For H20
M6 1000 2 8000 1
M6 1000 -0.333 8000 -0.667
 For Air, Dry (near sea level)*
M7 6000 -0.000124 7000 -0.755268 8000 -0.231781 &
18000 -0.012827
 Fraction > 0, atomic fraction
 Fraction < 0, weight fraction

## * From ESTAR (http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html)

Data cards
(5.3 Material specification cards)
The material cards for the sample problem

M1 8016 1 \$ Oxygen 16
M2 26000 1 \$ Natural iron
M3 6000 1 \$ Carbon
Data cards
(6. Problem cutoffs)
To terminate execution of MCNP
NPS n
 History cutoff cards
 n is the number of histories to transport

##  MCNP will terminate after NPS histories

Sample problem summary
Sample Problem Input Deck 7 S 0 -4 -2.5 0.5 \$ Oxygen sphere
C cell cards for sample problem 8 S 0 4 4.0 0.5 \$ Iron sphere
1 1 -0.0014 -7
2 2 -7.86 -8 C Data cards for sample problem
3 3 -1.60 1 -2 3 -4 5 -6 7 8 IMP:N 1 1 1 0
4 0 -1:2:-3:4:-5:6 SDEF POS=0 -4 -2.5
F2:N 8 \$ Flux across surface 8
C Surface cards for sample problem F4:N 2 \$ Track length in cell 2
1 PZ -5 E0 1 12I 14
2 PZ 5 M1 8016 1 \$ Oxygen 16
3 PY -5 M2 26000 1 \$ Natural iron
4 PY 5 M3 6000 1 \$ Carbon
5 PX -5 NPS 100000
6 PX 5
Parallel Virtual Machine (PVM)
Communication
protocols to use \$pvm 
MCNP5 with parallel pvm> quit 
capabilities
Developed at Oak Console: exit handler
Ridge National called
Laboratory pvmd still running
PVM must be started \$
before MCNP can be
executed
How to run MCNP (I)
MCNP uses several files for input and output
File names cannot be longer than 8 characters
File INP must be present as a local file
MCNP will create OUTP and RUNTPE
Default File Name in MCNP Description
INP Problem input specification

## RUNTPE* Binary start-restart data for expanded

output printing, continue run, tally printing

## * After MCNP execution, RUNTPE has to be deleted.

How to run MCNP (II)
MCNP execution line has the following form:
1 CPU
mcnp5.pvm i=sim01 o=sim01o > sim01.out & 
4 CPU
mcnp5.pvm i=sim01 o=sim01o > sim01.out tasks 3x1 & 

## sim01: MCNP input file

sim01o: MCNP output file
sim01.out: MCNP running status file
> : What is printed on a monitor put into the following file.
& : Background running
After MCNP execution

Before After
sim01 sim01.out, sim01o, runtpe
RUNTPE file

## It looks like junk!

Just delete it.
Tally plot using RUNTPE
sim01.out (MCNP running status file)

I like this
line.
sim01o (MCNP output file)
Tallies

## F2 tally (1/cm2) F4 tally (1/cm2)

Estimation of Monte Carlo errors(I)
MCNP tallies are normalized to be per starting
particle
Printed output accompanied by relative error
Estimated relative error defined to be one
estimated standard deviation of the mean Sx
The Central Limit Theorem states that as N
approaches infinity
 68% chance in x(1± R)
 95% chance in x (1± 2R)
Estimation of Monte Carlo errors (II)

## Guidelines for Interpreting

the Relative Error R

## Range of R Quality of the Tally

0.5 to 1.0 Not meaningful
0.2 to 0.5 Factor of a few
0.1 to 0.2 Questionable
< 0.10 Generally reliable
< 0.05 Generally reliable for point
detectors

## Ref.: MCNP manual

Relative error
Estimation of Monte Carlo errors (III)

## For a well-behave tally,

R will be proportional
to 1/ N
• where N is number of
histories.
To halve R, we must
increase the total
number of histories
fourfold.
Practice 1. Running with a higher NPS

## Increase NPS from 1e5 to 1e6 at sim01

 Open sim01 using pico
 Replace 100000 at NPS line with 1e6

 Save as sim02

## Running sim02 using parallel computing capability:

\$mcnp5.pvm i=sim02 o=sim02o > sim02.out tasks 3x1 &
Practice 1.

4 CPUs
are running
Practice 2.
At the sample problem, replace carbon with air in
the cube box and compare results.
(Density of air = 0.001205 g/cm3)
 Atomic weight composition of air

6000 -0.000124
7014 -0.755268
8016 -0.231781
18000 -0.012827