MCNP CLASS SERIES (SAMPLE MCNP INPUT) Jongsoon Kim

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
One Line Problem Title Card
…
Cell cards
…
.
.
…
…
Surface cards
.
.
Data cards
.
.
…
All inputs lines: up to 80 columns
Alphabetic characters: upper, lower,
or mixed case
Anything that follow $: a comment
Comment lines
† Start C somewhere in columns 1-5
† 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
Surface cards (Surface equations)
Mnemonic
Equation
Card Entries
PX
PY
PZ
S
x-D = 0
y-D = 0
z-D = 0
D
D
D
( 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
4
0
C End of cell cards
-2
3
-4
-1:2:-3:4:-5:6
5
-6
7
8
Data cards
MCNP card name
Mode
MODE
Cell and surface
Source specification
IMP:N
SDEF
Tally specification
Fn, En
Material specification
Problem cutoff
Mn
NPS
Data cards (1. MODE card)
Mode N
Neutron transport only (default)
NP
P
Neutron and neutron-induced photon transport
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
PAR = source particle type
Default is 0
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
F5:P
F4:E
Track length estimate of cell flux
Flux at a point (point detector)
F6:P
F8:P
Track length estimate of energy deposition
F8:E
Energy distribution of pulsed created in a detector
Data cards
(4.2 Tally specification cards)
…
Tally (Fn) cards
F2:N
F4:N
…
8
2
$ Flux across surface 8
$ 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
C cell cards for sample problem
8 S 0 4 4.0 0.5 $ Iron sphere
$ Oxygen 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
5 PX -5
NPS 100000
6 PX 5
$ Carbon
Parallel Virtual Machine (PVM)
…
…
…
Communication
protocols to use
MCNP5 with parallel
capabilities
Developed at Oak
Ridge National
Laboratory
PVM must be started
before MCNP can be
executed
$pvm pvm> quit Console: exit handler
called
pvmd still running
$
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
OUTP
Output for printing
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
chance in x(1± R)
† 95% chance in x (1± 2R)
† 68%
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
† Exit from pico
…
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
7014
-0.000124
-0.755268
8016
-0.231781
18000
-0.012827