MCNP class series (Sample MCNP...

35
MCNP CLASS SERIES (SAMPLE MCNP INPUT) Jongsoon Kim

Transcript of MCNP class series (Sample MCNP...

Page 1: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

MCNP CLASS SERIES(SAMPLE MCNP INPUT)

Jongsoon Kim

Page 2: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Basic constants in MCNP

Lengths in cmEnergies in MeVTimes in shakes (10-8 sec)Atomic densities in units of atoms/barn*-cmMass densities in g/cm3

* 1 barn = 10-24 cm2

Page 3: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Simple sample problem

Page 4: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 5: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Surface cards (Surface equations)

Mnemonic Equation Card EntriesPX x-D = 0 DPY y-D = 0 DPZ z-D = 0 DS 0)()()( 22

12

12

1 =−−+−+− Rzzyyxx Rzyx 111

Page 6: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 7: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Cell cards

1 1 -0.0014 -7 IMP:N=11=> Cell number1=> 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 cellCombination with the Boolean intersection and union operators

Page 8: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 9: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 10: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards (1. MODE card)

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

Mode N Neutron transport only (default)

N P Neutron and neutron-induced photon transport

P Photon transport only

E Electron transport only

P E Photon and electron transport

N P E Neutron, neutron-induced photon and electron transport

Page 11: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards (2. Cell and surface parameters)

IMP:N card Cell importance parametersFor terminating the particle's history if the importance is zero.Fro geometry splitting if a particle moves to higher importance cellFor Russian roulette if a particle moves to lower importance cell

*IMP: N 1 1 1 0

Page 12: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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 E2 for P, P E3 for E

Page 13: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards(3.2 Source specification cards)

SDEF POS=0 -4 -2.5 CEL=1 ERG=14 WGT=1TME=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

Page 14: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 15: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards(4.2 Tally specification cards)

Tally (Fn) cards

F2:N 8 $ Flux across surface 8F4: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

Page 16: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards(5.1 Material specification cards)

Mm ZAID1 fraction1 ZAID2 fraction2 ....

m is the material number on the cell cardNuclide Identification Number (ZAID) : To identify the element or nuclide desired (ZZZAAA).

ZZZ : Atomic number of the elements of nuclideAAA* : Mass number of the nuclide

* For naturally occurring elements, AAA=000.

Page 17: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards(5.2 Material specification cards)

Nuclide fractionFor H20M6 1000 2 8000 1M6 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 fractionFraction < 0, weight fraction

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

Page 18: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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

Page 19: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Data cards(6. Problem cutoffs)

To terminate execution of MCNPNPS n

History cutoff cardsn is the number of histories to transportMCNP will terminate after NPS histories

Page 20: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Sample problem summary

Sample Problem Input Deck

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 Surface cards for sample problem

1 PZ -5

2 PZ 5

3 PY -5

4 PY 5

5 PX -5

6 PX 5

7 S 0 -4 -2.5 0.5 $ Oxygen sphere

8 S 0 4 4.0 0.5 $ Iron sphere

C Data cards for sample problem

IMP:N 1 1 1 0

SDEF POS=0 -4 -2.5

F2:N 8 $ Flux across surface 8

F4:N 2 $ Track length in cell 2

E0 1 12I 14

M1 8016 1 $ Oxygen 16

M2 26000 1 $ Natural iron

M3 6000 1 $ Carbon

NPS 100000

Page 21: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Parallel Virtual Machine (PVM)

Communication protocols to use MCNP5 with parallel capabilitiesDeveloped at Oak Ridge National LaboratoryPVM must be started before MCNP can be executed

$pvm

pvm> quit

Console: exit handler

called

pvmd still running

$

Page 22: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

How to run MCNP (I)

MCNP uses several files for input and outputFile names cannot be longer than 8 charactersFile INP must be present as a local fileMCNP 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.

Page 23: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

How to run MCNP (II)

MCNP execution line has the following form:1 CPU

mcnp5.pvm i=sim01 o=sim01o > sim01.out &

4 CPUmcnp5.pvm i=sim01 o=sim01o > sim01.out tasks 3x1 &

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

Page 24: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

After MCNP execution

Before After

sim01 sim01.out, sim01o, runtpe

Page 25: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

RUNTPE file

It looks like junk!Just delete it.

Page 26: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Tally plot using RUNTPE

Page 27: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

sim01.out (MCNP running status file)

I like thisline.

Page 28: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

sim01o (MCNP output file)

Page 29: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Tallies

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

Page 30: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Estimation of Monte Carlo errors(I)

MCNP tallies are normalized to be per starting particlePrinted output accompanied by relative errorEstimated relative error defined to be one estimated standard deviation of the mean SThe Central Limit Theorem states that as N approaches infinity

68% chance in 95% chance in

x

)1( Rx ±)21( Rx ±

Page 31: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Estimation of Monte Carlo errors (II)

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

Guidelines for Interpreting the Relative Error R

Ref.: MCNP manualRelative error

Page 32: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Estimation of Monte Carlo errors (III)

For a well-behave tally, R will be proportional to

• where N is number of histories.

To halve R, we must increase the total number of histories fourfold.

N/1

Page 33: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Practice 1. Running with a higher NPS

Increase NPS from 1e5 to 1e6 at sim01Open sim01 using picoReplace 100000 at NPS line with 1e6Save as sim02Exit from pico

Running sim02 using parallel computing capability: $mcnp5.pvm i=sim02 o=sim02o > sim02.out tasks 3x1 &

Page 34: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

Practice 1.

4 CPUsare running

Page 35: MCNP class series (Sample MCNP Input)moreira.tamu.edu/BAEN625/Labs-HMW_files/Simple_MCNP_Input1C3.… · Basic constants in MCNP Lengths in cm Energies in MeV Times in shakes (10-8

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