Download as pdf or txt
Download as pdf or txt
You are on page 1of 85

MCNP code

 Introduction
 Simulation using MCNP
 Visual Editor
 Variance Reduction

Siriyaporn Sangaroon
25 September 2014 1
Introduction

2
The Monte Carlo Method

Monte Carlo is used to simulate statistical processes theoretically (like


the interaction of nuclear particles with materials) and is particularly
useful for complex problems that can not be modeled by computer
codes that use deterministic methods.

The individual probabilistic events


that comprise a process are
simulated sequentially.

3
Number of publications on various MC codes

Modern Radiation Transport Codes


• GEANT (CERN)
• MCNP (LANL - USA)
• SCALE / Morse / KENO (ORNL – USA)
• TRIPOLI (France)
• Answers / Monk / McBend (UK)
• PHITS (Japan)
• MCU (Russia)
• SHIELD (Russia)

4
The Monte Carlo Particle Transportation Grand
Prix, during last 10 years

5
Tools for modelling and simulation of particle transport

Used in a large number of different research fields, including applied


nuclear physics, nuclear physics, elementary particle physics, medicine
and space physics.
The simulation and modelling tools:
PENELOPE - Monte Carlo simulation package for photon and
electron transport (www.nea.fr)
MCNP - Monte Carlo package for neutron and photon simulation
(www.lanl.gov)
GEANT - Simulation package for particle transport trough matter
(geant4.cern.ch)
FLUKA - Calculation of particle transport and interactions with
matter (www.fluka.org) 6
PENELOPE

 A Code System for Monte Carlo Simulation of Electron and


Photon Transport written by Francesc Salvat, Jose M.
Fernandez-Varea, Joseph Sempau from ECM University
Barcelona (2001). Distributed through the NEA data bank
 Fortran based simulation code → possible to link with cernlib
(doesn't require knowledge of fortran for simulation only)
 Used mainly in medical physics
 Easy to install and operate. Doesn't require large resources.
(~250MB)

7
GEANT

 Geant4 is a software using an Object-Oriented environment (C++)


 Many requirements taken into account, from heavy ion physics to
medical applications
 A large degree of flexibility is provided
 Toolkit

8
FLUKA
 1962: MC code(s) for high-energy proton beams J. Ranft (Leipzig) and H.
Geibel (CERN)
 1970: Study of event-by-event fluctuations in calorimeters =>
FLUktuierende Kaskade, Mainly used for radiation shielding studies
 1970-1987: Development by J. Ranft and J.H. M๖hring (Leipzig) with
significant contributions from P. Aarnio and J. Routti (Helsinki), J.M.
Zazula (Cracow) and A. Fass๒ and G.R. Stephenson (CERN)
 1989-: A. Ferrari and P.R. Sala (INFN Milano), together with A. Fass and J.
Ranft, transforms FLUKA into a general purpose MC code
 2003: CERN-INFN Collaboration Agreement
 2006: Many improvements, free format input, nice tools…
 2011: Gfortran option available 9
MCNP

 Developed at Los Alamos over 5 decades


 100s of man years development
 Stands for Monte Carlo Neutrons and Particles
 Generate particles with arbitrary energy, direction and species
 These are tracked through arbitrary 3D geometry
 Physics of the interactions of the particles well modelled
 Use tallies to see what went where

10
My work on MCNP Simulation (2013-2014)

 Liquid scintillator (together NRESP code): Response Neutron 2.45


function, Efficiency MeV (and g-rays)
 Neutron camera for MAST
 Experimental hall,
MAST
 NCU Geometries
 Neutron flux, emissivity
profile
 Shielding (materials)
 Scattered neutron
(in/back scattered)
Conceptual design of the Neutron Camera  Background g-ray
(neutron capture)
Upgrade for MAST Upgrade
 … 11
Simulation using MCNP

12
MCNP Simulation
 Last release of MCNP5 (version 1.60) (NPE)
 Last release of MCNPX (version 2.7.0)
o Capable of tracking 34 particle types
o Energy range:
 Neutron: 0.01 MeV – 20 MeV
 Photon: 1 keV – 100 GeV
 Electron: 1 keV – 1 GeV
 MCNP6
o Essential features of MCNPX and MCNP5 available in MCNP6
o MCNP6 Version 1.0 released Aug 2013.

13
Applications

 Homeland Security  Health Physics


 Detector Responses, Including  Criticality Safety
Electrons  Magnetic Fusion Neutronics
 Medical  Activation and Decommissioning
 Shielding -- neutron and photon  Space and Accelerator
 Reactor Physics Neutronics  Energy Deposition
 Well Logging -- source, detector

14
Documentation

15
Compiling

 Executables available for all officially supported systems


–Unix (Sun)
–Linux (Intel, PGI)
–Windows XP, Vista, Windows 7 (Intel)

 How to install (Windows)


- After installed, copy folder “MCNP_DATA” to C:\MCNP\

16
Execution

17
Execution

18
Input file

1. Word pad
2. The Visual Editor for Monte Carlo N-Particle : code for visually creating
and graphically displaying input files for MCNP

19
Input file

TITLE CARD
CELL CARDS
SURFACE CARDS
DATA CARDS

Whatever isn’t a surface or cell card.


 Source sdef, kcode
 Tallies f2, f4, f6, …
 Materials m1, m2, …
 Variance Reduction imp, wwg, …
 Problem terminate nps, ctme
20
 Peripheral cards mode, phys, …
Surface Cards

*MCNP5_manual_VOL_II page 3-1321


Surface Card Format

22
Cell Cards

Once you have defined surfaces, then you combine those surfaces into
cells using the intersection and/or the union of surfaces.
 Cells are the basic unit of MCNP geometry
 Cells are defined by Surfaces
 Cartesian Coordinate System
 Must account for all phase space
 Every xyz point will lie either on a surface or within a uniquely
defined cell.
 At least one cell will describe the “outside world”, exterior to
the problem cells (with importance of zero).
23
All phase space defined

24
Cell Card Format

25
Boolean Intersection

26
Boolean Union

27
Order Of Operations

28
Example (2 cubes nested)

29
Macrobodies Simplify Cell Descriptions

 With Macrobodies a cube is a single surface


 Inside a macrobody is negative sense
 Outside a macrobody is positive sense

30
Macrobodies

31
2 Cube Example with Macrobodies

32
MACROBODIES (cont)

33
Macrobody Limitations

 Limited Number of Macrobodies


 May want / need to use both surfaces & bodies
 Still need to understand Boolean Operators
 Macrobodies have eccentricities
o Specifying a facet for SSR & SSW
o Specifying a facet for a flagged surface (fatal)
o Items that may involve a facet in PTRAC
o Surface sense changed for some Macrobody facets

34
Data Cards

35
Mn (Material) Card

36
Importances

Either an IMP or WWN card is required; most of the other cards are for 37
optional variance reduction techniques
The Visual Editor for Monte Carlo N-Particle

Surface

*Note:
Visual
Editor
Macro
body Surface wizard 38
Cell

*Note:
Visual
Editor

39
More Problem Cutoff Options
STOP card/stop<inp> file

40
MODE Card

41
MCNP Particles

42
Auxiliary Input Files (READ Card)

• SSR/SSW
43
Source Description

44
SDEF Description

45
SDEF1 Input File
Plot source

Plot track

46
Checking The Source (output)

47
First 50 Particles

48
SDEF Description

49
SI, SP, SB, and DS CARDS

50
Specific SDEF Example
on Plasma Fusion

51
Tallies

Definitions

52
Tally Types

53
Basic Tally Format

54
Additional Tally Capabilities

55
Visual Editor
The Visual Editor for Monte Carlo N-Particle : code for visually
creating and graphically displaying input files for MCNP

* The default location is C:\MCNP

56
What is the Visual Editor?

57
Complete Interface for MCNP

58
Complete Interface for MCNP

59
60
Example geometry
BOX (x=0.525 cm, y=0.03 cm, z=12cm)
Electron source

BOX (x=0.525 cm, y=0.03 cm, z=0.1cm)


Attenuator (Tungsten) 61
Source (sdef)

62
Plot Tracks

63
Tally

Unit 1/cm2 per


Electron flux
(5x10^8)
64
Tally

65
Variance Reduction

66
Definitions

67
Ten Statistical Checks (Output file)

68
Variance reduction techniques used to improve
efficiency

Either an IMP or WWN card


is required; most of the
other cards are for
optional variance
reduction techniques

69
Cell Importance Cards: IMP
The importance of a cell is used to
terminate the particle’s history if the
Y axis importance is zero, for geometry
splitting and Russian roulette to help
Simple Geometry particles move to more important
regions of the geometry.
Slab of lead divided into
10 cell by planes
Tally:
f1:p 20

(Current integrated over a surface,


unit in particles)
Source:
sdef sur 10 vec 0 1 0
dir=d1 erg 100 par p

70
Example 1: imp:p 1 10r 0
All cell in side the universe have the important = 1

FOM = 290

71
Example 2: Random the cell importance value
Tally
21 1 -11 -30 10 -11 imp:p=2
22 1 -11 -30 11 -12 imp:p=4
23 1 -11 -30 12 -13 imp:p=8 Source
24 1 -11 -30 13 -14 imp:p=16
25 1 -11 -30 14 -15 imp:p=32
26 1 -11 -30 15 -16 imp:p=64
27 1 -11 -30 16 -17 imp:p=128
28 1 -11 -30 17 -18 imp:p=256
29 1 -11 -30 18 -19 imp:p=512
30 1 -11 -30 19 -20 imp:p=1024
31 0 (-10:30:20) -31 imp:p=1
32 0 31 imp:p=0
Cell 21 ........... 30

FOM = 4806 (very high) but it did not pass 1 of 10 statistical checks 72
Weight Window Cards
Weight windows can be either cell-based or mesh-based.

Weight windows: Cell-based (from previous example)


 Using Weight Window Generation: WWG
wwg 1 21 invokes cell- or mesh-based weight window generator
(typically a source cell)
problem tally number

*.e file are generated to use for the next run


From the first run
wwe:p 1.0000E+02
wwn1:p 5.0000E-01 1.6259E-01 4.5190E-02 1.3010E-02 4.0550E-03
1.3200E-03 5.2000E-04 2.1000E-04 1.0500E-04 5.0000E-05
0.0000E+00 -1.0000E+00

Run Statitic FOM


1 7/10 273
2 10/10 4091 Use *.e file from run #1
3 10/10 4674 Use *.e file from run #2 73
Weight windows: Mesh-based

Geometry Mesh for weight window


cell flux (F4)
Weight windows: Mesh-based
AIR
HDPE

LEAD

Neutron capture
in HDPE

2.5 MeV neutron from


outer surface of the
sphere
74
weight window
Neutron: 1st run Neutron: 7th run

Gamma: 7th run

75
Tally plots
ctme 1 (min)
No weight window
neutron gamma
(imp = 0, 1)

With weight window neutron gamma

76
Note

77
78
79
80
81
82
83
84
Beam* SDEF Example

85

You might also like