The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program....

27
ICRM– GSWG Meeting, Paris 27-28 November 2006 The PENELOPE Computer code The PENELOPE Computer code The PENELOPE Computer code M.J. Anagnostakis Nuclear Engineering Department National Technical University of Athens

Transcript of The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program....

Page 1: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The PENELOPE Computer codeThe PENELOPE Computer codeThe PENELOPE Computer code

M.J. AnagnostakisNuclear Engineering Department

National Technical University of Athens

Page 2: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The PENELOPE code system

PENetration and Energy LOss of Positrons and Electrons in matter

performs Monte Carlo simulation of coupled electron and photon transport in arbitrary materials

It was developed by:

F. Salvat, J.M. Fernandez-Varea and J. Sempaufrom

Facultat de Fisica (ECM). Universitat de Barcelona.Diagonal 647. 08028 Barcelona. Spain

Page 3: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Code characteristics

The simulation algorithm is based on a scattering model that combines numerical databases with analytical cross-section models for the different interaction mechanisms and is applicable to energies (kinetic energies in the case of electrons and positrons) from 50 eV to 1 GeV. PENELOPE generates random electron-photon showers in complex material structures consisting of any number of distinct homogeneous regions (bodies) of different compositions.

Page 4: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Code characteristics

The considered interactions and the corresponding differential cross sections are the following:

Elastic scattering of electrons and positrons.Inelastic collisions of electrons and positrons.Bremsstrahlung emission by electrons and positrons.Positron annihilation.Inner-shell ionisation by electron and positron impact.Coherent (Rayleigh) scattering of photons.Incoherent (Compton) scattering of photons.Photoelectric absorption of photons.Electron-positron pair production.

Page 5: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Code characteristics

The simulation of photon transport follows the usualdetailed procedure, i.e. all the interaction events in a photon history are simulated in chronological succession.The simulation of electron and positron tracks is performed by means of a mixed (class II) algorithm. Individual hard elastic collisions, hard inelastic interactions and hard bremsstrahlung emission aresimulated in a detailed. The track of a particle between successive hard interactions, or between a hardinteraction and the crossing of an interface is generated as a series of steps of limited length.

Page 6: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Code structure

Main program (User code)

PENELOPE subroutines

Page 7: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Example of MAIN programs

In principle, the user should provide the MAIN program for each specific geometry. The distribution package includes various examples of MAIN programs for simple geometries (slab and cylindrical) and for general quadric geometries, with limited scoring and variance reduction options. The 2005 version includes the MAIN programs:

PenslabPencylPenmain

the 2006 version ….

Page 8: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The MAIN program penslabThe program PENSLAB simulates electron/photon showers within amaterial slab. It illustrates the use of the simulation routines for the simplest geometry (as geometry operations are very simple, thisprogram is faster).PENSLAB generates detailed information on many quantities and distributions of physical interest.The slab is limited by two planes.Primary particles of a given kind are emitted from a point source either with fixed energy or with a specified energy spectrum. The initial direction of the primary particles is sampled uniformly inside a cone and with central axis in the specific direction.

Page 9: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The MAIN program pencylThe program PENCYL simulates electron-photon showers in multilayered cylindrical structures. The system consists of one orseveral layers of given thicknesses. Each layer contains a number of concentric homogeneous rings. The geometrical structure is symmetrical about the Z-axis.Primary particles of a given kind are emitted from the active volume of the source, either with fixed energy or with a specified energy spectrum. The initial direction of the primary particles is sampled uniformly inside a cone of and with central axis in a specific direction.The program can simulate two different types of sources:– An external source with uniform activity over a cylindrical

volume.– A set of internal sources spread over specified bodies, each

one with uniform activity concentration.

Page 10: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The MAIN program penmainThis is a generic main program that performs simulations ofelectron-photon transport in complex material structures. PENMAIN is devised to allow occasional users to employ PENELOPE without having to write their main program. The geometry of the material system is described by means of the package PENGEOM, which is able to handle complicated geometries very efficiently The operation of PENMAIN is completely controlled from the input data files.Although it is impossible to cover all possible cases with a ''closed'' program, PENMAIN is flexible enough to solve a broad class of practical problems.

Page 11: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

How to run the code

Write (in fortran) or modify the Main program.Prepare the necessary input data files (to describe the geometry, the materials etc). –The program ‘material’ is used for the material data

file preparation.–Auxiliary programs such as gview2d and gview3d

may be used to check the correctness of the geometry data file (ASCII file).

Compile and link the Main program with the PENELOPE subroutines.Run the code with the input data files.

Page 12: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

How to run the code

A dump/resume option allows the user to stop the simulation at any time and to resume it from the last dumping point in a completely consistent way. The program can also write simulation results in the output files at regular time intervals. This option is useful to check the progress of long simulations. It also allows running theprogram with a long execution time and stopping it when the required statistical uncertainty has been reached.

Page 13: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Input data files

The input data file the user has to prepare are:The file.mat to describe the materials used.The file.geo to describe the geometry of the systemThe file.in to initiate various parameters (number of showers, detectors used, source type and energy, number of bins etc)

Page 14: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Main input data fileTITLE Response of a Ge detector.

>>>>>>>> Source definition.SKPAR 2 [Primary particles: 1=electron, 2=photon, 3=positron]SENERG 4.5e4 [Initial energy (monoenergetic sources only)]SPOSIT 0 0 1.1 [Coordinates of the source]SDIREC 0 0 [Beam axis direction angles, in deg]SAPERT 180 [Beam aperture, in deg]

>>>>>>>> Material data and simulation parameters.NMAT 2 [Number of different materials, .le.10]SIMPAR 1 4.5e2 4.5e1 4.5e2 0.1 0.1 4.5e2 4.5e1 [M,EABS,C1,C2,WCC,WCR]SIMPAR 2 4.5e2 4.5e1 4.5e2 0.1 0.1 4.5e2 4.5e1 [M,EABS,C1,C2,WCC,WCR]

The following material data file must be copied from directory …. to the working directory.PFNAME Ge_geom3.mat [Material definition file, 20 chars]

>>>>>>>> Geometry definition file.GEOMFN Ge_geom3.geo [Geometry definition file, 20 chars]

>>>>>>>> Emerging particles. Energy and angular distributions.NBE 1e3 4.5e4 100 [E-interval and no. of energy bins]NBTH 45 [No. of bins for the polar angle THETA]NBPH 18 [No. of bins for the azimuthal angle PHI]

>>>>>>>> Energy deposition detectors (up to 5).ENDDET 1e3 4.5e4 100 [Energy window and number of channels]EDBODY 1 [Active body; one line for each body]

>>>>>>>> Job propertiesRESUME dump1.dat [Resume from this dump file, 20 chars]DUMPTO dump1.dat [Generate this dump file, 20 chars]DUMPP 60 [Dumping period, in sec]TIME 6.0e5 [Allotted simulation time, in sec]

Page 15: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Typical Geometry input file3in*3in cylindrical NaI detector, with Al case and Al2O3

reflecting layer.0000000000000000000000000000000000000000000000000000000000000000SURFACE ( 1) Cylinder R=3.81INDICES=( 1, 1, 0, 0,-1)X-SCALE=( 3.810000000000000E+00, 0)Y-SCALE=( 3.810000000000000E+00, 0)…….0000000000000000000000000000000000000000000000000000000000000000SURFACE ( 6) Plane Z=0.00INDICES=( 0, 0, 0, 1, 0)…….0000000000000000000000000000000000000000000000000000000000000000BODY ( 1) NaI CRYSTAL.MATERIAL( 1)SURFACE ( 1), SIDE POINTER=(-1)SURFACE ( 6), SIDE POINTER=(+1)SURFACE ( 7), SIDE POINTER=(-1)0000000000000000000000000000000000000000000000000000000000000000MODULE ( 2) Al2O3 reflecting layer.MATERIAL( 2)SURFACE ( 2), SIDE POINTER=(-1)SURFACE ( 5), SIDE POINTER=(+1)SURFACE ( 7), SIDE POINTER=(-1)BODY ( 1)0000000000000000000000000000000000000000000000000000000000000000END 0000000000000000000000000000000000000000000000000000000

Page 16: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

For the description of complicated

geometries several types of surfaces

are used

Page 17: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

View of a geometry file

Page 18: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Complicated geometries

The code is able to handle complicated geometries

Page 19: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The detectors

Several types of detectors are included in the code in order to record various parameters and distributions:

Impact detectors. The main characteristics of the particles coming in the detector are recorded.Energy deposition detectors. The energy of a particle that is deposited in the detector is recorded.Dose enclosure. To record the dose distribution within a specific system volume.

Page 20: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Output data files

Two general types of files are produced:Files with the main parameters of the simulation and several useful information such as average values (e.g. penmain.dat)Files with space or energy distribution for various parameters, such as energy distribution of the deposited energy on a detector (e.g. pm_spc_enddet.dat)

Page 21: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The pm_spc_enddet.dat file

# Results from PENMAIN. Output from energy-deposition detector # 1# 1st column: deposited energy (eV).# 2nd column: probability density (1/(eV*particle)).# 3rd column: statistical uncertainty (3 sigma).

1.250000E+03 8.438092E-08 6.094833E-091.750000E+03 9.661004E-08 6.521530E-092.250000E+03 1.003766E-07 6.647436E-092.750000E+03 9.690354E-08 6.531428E-093.250000E+03 9.822428E-08 6.575785E-093.750000E+03 1.000831E-07 6.637711E-094.250000E+03 9.705029E-08 6.536371E-09

Page 22: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Energy deposition spectrum in an energy detector

1e-012

1e-011

1e-010

1e-009

1e-008

1e-007

1e-006

1e-005

0.0001

0 100000 200000 300000 400000 500000 600000 700000 800000

P(E

)

E

Energy spectrum from energy-deposition detector #1

'pm_spc_enddet_1.dat' u 1:2:3

Page 23: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Typical graph output file of the pendoses user code

1.6e+006

1.8e+006

2e+006

2.2e+006

2.4e+006

2.6e+006

2.8e+006

3e+006

3.2e+006

3.4e+006

0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02

dose

(eV/

(g/c

m**

2))

depth (cm)

Depth dose distribution

'psddose.dat' u 1:2:3

Page 24: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Auxiliary programsThe PENELOPE package includes some auxiliary programs such as:–The program shower for the visual representation of

the simulation in real time.–The program tables for the creation of tables of energy

dependent quantities such as linear attenuation coefficients etc. –The program wgnuplot for the the graphical

representation of the energy dependent quantities.

Page 25: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

The program shower

Page 26: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Typical graph from program tables

1e-008

1e-006

0.0001

0.01

1

100

10000

1e+006

0.1 1 10 100 1000 10000 100000 1e+006

mu

(cm

**2/

g)

Energy (keV)

Photon mass attenuation coefficients

Rayleigh Compton

PhotoabsorptionPair production

Total

Page 27: The PENELOPE Computer code - nucleide.org · PENELOPE without having to write their main program. ¾The geometry of the material system is described by means of the package PENGEOM,

ICRM– GSWG Meeting, Paris 27-28 November 2006

Thank you very much for your attention …