PHITS

PHITS
Multi-Purpose Particle and Heavy Ion Transport code System
Basic Lecture I:
Geometry and Source Definition
May 2015 revised
title
1
Purpose of This Lecture
Learn input format of PHITS, and how to
define simple geometry and source term
You can obtain this kind of results at the end of this lecture
(Particle fluence around cylindrical water irradiated by 290 MeV proton beam)
Purpose
2
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
3
Format of PHITS input
Calculation condition can be specified by text file
Input file consists of several sections
[ Section Name ] ←start of this section
Basic format
keyword(parameter) = value or character
(“space” means nothing)
parameter1
or
parameter2
parameter3 …
• Parameters are separated by “space”
• You can write 200 characters in one line
• Insert more than 6 spaces in successive line
Parameters can be given in mathematic equations: e.g. 1.0+exp(-2.0)
General description
4
Input support command
*You can write sections in arbitrary order
[
]off
skip this section
qp:
skip from this line to the next section
q:
equivalent to [end] section
Comment marks
C in the first 5 column of the line
$ and # in the middle of the line
(but # cannot be used in the [cell] and [surface] sections)
General description
5
Main components of input
• In the PHITS simulation, you have to specify
the geometry of 3-dimensional virtual space
and information of source particles, and then
you can tally various quantities by simulating
particle motions in the virtual space
⇒ ① Geometry
Three
fundamental
② Source
components
③ Tally
See sample input “lec01.inp”
General description
6
Result of the sample input
track_xz.eps
phits.out
Version Number
Display of the result
Summary of the calculation
General description
7
phits.out
Output File
 PHITS Logo + Version information
 Input Echo
• Echo of the parameters specified in the input file
• Description of the parameter and its default value is also written
 Memory status
• You can check how many memories are used in the calculation
 Batch information (You will learn about “Batch” in Lecture 3)
 Summary of PHITS simulation
• Numbers of events such as source generation and nuclear reaction
occurred
• Information on transported particles
• Numbers of secondary particles generated
• CPU time
• Numbers of library data and reaction models used
Error information is usually given in the console Window,
but occasionally in the output file!
General description
8
Sample input
[Title]
lec01.inp
title comments
[Parameters]
define parameters
[Source]
define source
[Material]
define materials
[Surface]
define surfaces
[Cell]
define cells
[T-Track]
track length tally
[End]
This consists of
8 sections.
② Source
Production of particles
① Geometry
Definition of 3D virtual
space
③ Tally
Observation of quantities
General description
9
List of “section”
General description
10
List of tally
※ You can set several tallies at once to obtain
various information on the particle transport.
General description
11
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
12
3D virtual space in PHITS
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.0
101 -1
This part usually takes
the longest time to
make an input file
-10
10
• 3D virtual space consists of a number of cells
defined in the XYZ coordinate space
• You can use infinite space. But, you have to fill
them with certain material (, or define them as void).
Geometry (General definition)
13
How to setup geometry
You can setup 3D virtual space using GG (General
Geometry) or CG(Combinational Geometry) concepts,
but only GG concept will be described in this tutorial !
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.0
101 -1
-10
10
Three steps to make geometry
1) define material [Material] section
2) define surface [Surface] section
3) define cell [Cell] section
Geometry (General definition)
14
Define material
Material number, (Atom & density)…
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.0
101 -1
1H
: 16O = 2 : 1
⇒ H2O(water)
-10
10
Several ways to express material
• 1H 2.0 16O 1.0 (Positive density: Atomic ratio)
•1H -2.0/18.0 16O -16.0/18.0 (Negative density: mass ratio)
• 1001 2.0 8016 1.0 (Atom can be expressed by Z*1000 + A)
Geometry (General definition)
15
Define surface
•Surface number, Shape, Parameters
•Parameters are expressed in the unit of “cm”
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.
101 -1
10
-10
surface of sphere (so)
having its center at the
origin of the XYZ
coordinate system with
radius of 10 cm
Various types of surfaces can be used in PHITS
• s, so (Sphere)
• px, py, pz (plane)
• cx, cy, cz (cylinder)
•rpp (rectangular)
etc. (see Manual 4.6)
Geometry (General definition)
16
Define cell
Cell number, material number, density, surface numbers
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.0
101 -1
-10
10
100: Cell number
1 : Material number
-1. : Material density
= 1.0 g/cm3
(If positive, =1024 atoms/cm3)
-10 : Inside surface 10
101: Cell number
-1 : Outer region
(density is not necessary)
10 : Outside surface 10
Geometry (General definition)
17
Confirmation of your geometry
lec01.inp
[Parameters]
icntl = 8
file(6) = phits.out
Set 8
when you confirm
the geometry
Procedure for confirming your geometry
1. Change “icntl” parameter in the
[Parameters] section.
2. Execute PHITS
3. See an eps file“track_xz.eps”
track_xz.eps
Geometry (General definition)
18
Exercise 1
Change the radius of the surface to 20 cm.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
10.
[Cell]
100
1 -1.0
101 -1
-10
10
Geometry (General definition)
19
Answers 1
Change the radius of the surface to 20 cm.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
20.
[Cell]
100
1 -1.0
101 -1
-10
10
track_xz.eps
Is the radius of the
sphere 20 cm?
Geometry (General definition)
20
Definition of a new surface
• Define a surface of a sphere with 5 cm radius and its center
in the origin of the XYZ coordinate system.
• “10” in the 1st line of [Surface] section is “surface number”.
Let’s use “11” for new surface number.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
20.
11 so
5.
[Cell]
100
1 -1.0
101 -1
-10
10
Geometry (General definition)
21
Exercise 2
Add spherical water cell with 5 cm radius to the system.
• “100” in the 1st line of [Cell] section is “cell number”.
Let’s use “102” for new cell number.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
20.
11 so
5.
[Cell]
100
1 -1.0 -10
101 -1
10
102 *** *** ***
Geometry (General definition)
22
Answer 2
Add spherical water cell with 5 cm radius to the system.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
20.
11 so
5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
-10
10
-11
Some part of cell 100 overlaps cell 102.
⇒ Overlapped region!!
PHITS always identifies the region where the
tracing particle in, so PHITS confuses when one
location is defined by more than 2 regions.
(geometry error file: xz_track_all.err)
track_xz.eps
Overlapped region is
painted in black.
Geometry (General definition)
23
Geometry error
(undefined region)
You can use infinite space. But, you have to fill them
with certain material (or define them as void).
Undefined region is painted in purple.
(There may be cases where the other
defined region disappeared.)
Geometry (General definition)
24
Geometry error file
When a geometry error occurs, PHITS outputs
a error file (.err) where information on the error
is outputted.
track_xz.err
x, y, z coordinates where
the geometry error occurs.
Errors of cell definition in EPS Page No. = 1
Overlapped Cell IDs x, y, z coodinates
(Cells 0
0 indicate undefined region)
100
102 -4.847761E+00 1.234568E-11 -1.211940E+00
100
102 -4.847761E+00 1.234568E-11 -1.009950E+00
100
102 -4.847761E+00 1.234568E-11 -8.079602E-01
・・・ ・・・ ・・・ ・・・
Cell numbers
causing the error.
Even if only one error occurs,
many lines are written.
Geometry (General definition)
25
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
26
Cell definition
using Boolean operators
Cell can be defined by surfaces and
cells using Boolean operators
example
A(+11)
A(-11)
Geometry (Boolean Operator)
27
Boolean operator (AND)
Cells are basically defined using AND (“blank”).
lec01.inp
Add ‘+11’ to the definition of the cell 100.
(+ can be omissible.)
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
20.
11 so
5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
-10 11
10
-11
Inside of “10”and outside of “11”
track_xz.eps
True answer of
the 2nd exercise.
Geometry (Boolean Operator)
28
Boolean operator (NOT)
You can use NOT (“#”) to exclude a region.
lec01.inp
equivalent
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
-10 11
10
-11
Rewrite another representation using #.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
-10 #102
10
-11
Exclude the region
of the cell number
102 from the inside
of the surface 10.
*Cells are usually defined by using surface numbers,
but are also defined by cell numbers with #.
Geometry (Boolean Operator)
29
Extension of virtual space
3D virtual space should be wide
enough to describe particle transport.
Change 20cm to 500cm.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
500.
11 so
5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
-10 #102
10
-11
track_xz.eps
Geometry (Boolean Operator)
30
Exercise 3
Where is cell “103” in the right panel?
lec01-3.inp(use this file)
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
500.
11 so
5.
12 sz
11. 5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
-10 #102 #103
10
-11
-12
sphere having its
center in the XYZ
coordinate (0, 0, 11)
with radius of 5 cm
track_xz.eps
Geometry (Boolean Operator)
31
Answer 3
Where is cell “103” in the right panel?
lec01.inp
[Material]
mat[1] 1H 2 16O 1
[Surface]
10 so
500.
11 so
5.
12 sz
11. 5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
-10 #102 #103
10
-11
-12
sx, sy, sz can be used.
Universal expression s is used with the XYZ
coordinate of its center and its radius.
track_xz.eps
Geometry (Boolean Operator)
32
Exercise 4
Correct a geometry error.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
Change the center
of this sphere
-10 #102 #103
10
-11
-12
An overlap of the two spheres causes the
geometry error (overlapped region).
← Let’s exclude this overlap region from cells
102&103 and create a new cell 104
Expected result
track_xz.eps
Geometry (Boolean Operator)
33
Answer 4
Correct a geometry error.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
104
1 -1.0
-10
10
-11
-12
-11
#102 #103 #104
12
11
-12
An example of answers
track_xz.eps
Geometry (Boolean Operator)
34
Boolean operator (OR)
lec01.inp
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
104
1 -1.0
[Cell]
100
1 -1.0
101 -1
102
1 -1.0
103
1 -1.0
104
1 -1.0
-10
10
-11
-12
-11
#102 #103 #104
12
11
-12
equivalent
-10
10
-11
-12
-11
#(-11 : -12)
12
11
-12
Boolean operator
“OR” is expressed
by “:”.
NOT(#) is easier to use, but it costs more memories in PC
It is better to express cells using “AND” and “OR” operators
Geometry (Boolean Operator)
35
Onion geometry
onion.inp
[Material]
mat[1] 1H 2 16O 1
[Material]
mat[1] 1H 2 16O 1
[Surface]
11 so
5.
12 so
10.
13 so
15.
14 so
20.
15 so
25.
[Surface]
11 so
5.
12 so
10.
13 so
15.
14 so
20.
15 so
25.
[Cell]
101
1 -1.
102
1 -1.
103
1 -1.
104
1 -1.
105
1 -1.
106
1 -1.
[Cell]
101
1 -1.
102
1 -1.
103
1 -1.
104
1 -1.
105
1 -1.
106
1 -1.
-11
-12 #101
-13 #101 #102
-14 #101 #102 #103
-15 #101 #102 #103 #104
15
11
12
13
14
15
-11
-12
-13
-14
-15
A bad example of PHITS input file using
unnecessary “#”s → Become time consuming!
Geometry (Boolean Operator)
36
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
37
How to make a box
A box can be defined using 6 planes
Geometry (cell with many surfaces)
38
Definition of 6 surfaces of cube
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
13 px
-5.
14 px
5.
15 py
-5.
16 py
5.
17 pz
-16.
18 pz
-6.
px:Perpendicular
plane to X-axis
y
5
x
z
px 5.0
Geometry (cell with many surfaces)
39
Exercise 5
Let’s define a rectangular.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
13 px
-5.
14 px
5.
15 py
-5.
16 py
5.
17 pz
-16.
18 pz
-6.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105
101 -1
10
102
1 -1.0 -11 12
103
1 -1.0 -12 11
104
1 -1.0 -11 -12
105
1 -1.0 13 -14 15 -16 17 -18
+side
-side
To distinguish between two regions
divided by a plane, symbols “+” or “-”
are used.
X=x0
X axis
Let’s execute PHITS and see the result to confirm
whether a cube is correctly defined or not.
Geometry (cell with many surfaces)
40
Answer 5
Let’s define a rectangular.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
13 px
-5.
14 px
5.
15 py
-5.
16 py
5.
17 pz
-16.
18 pz
-6.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105
101 -1
10
102
1 -1.0 -11 12
103
1 -1.0 -12 11
104
1 -1.0 -11 -12
105
1 -1.0 13 -14 15 -16 17 -18
track_xz.eps
Geometry (cell with many surfaces)
41
How to make a cylinder
A cylinder can be defined using an infinite
cylindrical tube and two planes
Geometry (cell with many surfaces)
42
Exercise 6
Let’s define a cylinder.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
13 px
-5.
14 px
5.
15 py
-5.
16 py
5.
17 pz
-16.
18 pz
-6.
19 cz
1.
20 pz
-19.
21 pz
19.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 13 -14 15 -16 17 -18 #106
106
1 -1.0 -19 20 -21
The inside and outside correspond to
“-” and “+” symbols, respectively.
Let’s execute PHITS and see the result to confirm
whether a cylinder is correctly defined or not.
Geometry (cell with many surfaces)
43
Answer 6
Let’s define a cylinder.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
13 px
-5.
14 px
5.
15 py
-5.
16 py
5.
17 pz
-16.
18 pz
-6.
19 cz
1.
20 pz
-19.
21 pz
19.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 13 -14 15 -16 17 -18 #106
106
1 -1.0 -19 20 -21
track_xz.eps
Geometry (cell with many surfaces)
44
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Homework
• Summary
Contents
45
Macro body
How to make boxes
zmax
Z
Y
X
xmin
zmin
xmax
ymin
ymax
How to make cylinders
Radius: r
Vector from (vx vy vz)
to center coordinate of
top face: (hx hy hz)
[Surface]
・
・
・
22 rpp xmin xmax ymin ymax zmin zmax
[Surface]
・
・
・
23 rcc vx vy vz hx hy hz r
Center coordinate of
bottom face: (vx vy vz)
Macrobody and SimpleGEO
46
Exercise 7
Let’s define the rectangular by using macro-body.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
$ 13 px
-5.
$ 14 px
5.
$ 15 py
-5.
$ 16 py
5.
$ 17 pz
-16.
$ 18 pz
-6.
19 cz
1.
20 pz
-19.
21 pz
19.
22 rpp -5. 5. -5. 5. -16. -6.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 -22 #106
106
1 -1.0 -19 20 -21
The inside and outside correspond to
“-” and “+” symbols, respectively.
Let’s confirm the same result as the previous one.
Geometry (cell with many surfaces)
47
Answer 7
Let’s define the rectangular by using macro-body.
lec01.inp
[Surface]
10 so
500.
11 so
5.
12 sz
8. 5.
$ 13 px
-5.
$ 14 px
5.
$ 15 py
-5.
$ 16 py
5.
$ 17 pz
-16.
$ 18 pz
-6.
19 cz
1.
20 pz
-19.
21 pz
19.
22 rpp -5. 5. -5. 5. -16. -6.
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 -22 #106
106
1 -1.0 -19 20 -21
track_xz.eps
Geometry (cell with many surfaces)
48
SimpleGEO
• GUI interface to make geometry of many Monte Carlo codes
• A free software developed in CERN (registration required*)
Simple GEO + Recommendation setting of PHITS (\simplegeo)
http://theis.web.cern.ch/theis/simplegeo/
Macrobody and SimpleGEO
49
How to use SimpleGEO
1. Setup your geometry by placing spheres, rectangles, cylinders etc.
2. Convert the geometry into PHITS input format (only [cell] and [surface]
sections), using macro bodies
3. Copy the output geometry and paste into PHITS input file
4. Execute PHITS
5. Import the tally output file into SimpleGEO, and draw the results
combined with 3D geometry
Examples of SimpleGEO + PHITS results
Macrobody and SimpleGEO
50
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
51
How to add materials
Add a new material number and define a composition
ratio or isotopic ratio of the material in [material] section.
(Density should be given in [cell] section.)
• gold(density: 19.32 g/cm3)
197Au 100
• copper(density: 8.93 g/cm3)
63Cu 0.6915
65Cu 0.3085
• air(density: 1.20x10-3 g/cm3)
14N 8
16O 2
• polyethylene(density: 0.9 g/cm3)
12C 2
1H 4
Geometry (How to add material)
52
Exercise 8
Change the material in the cell “106”.
• Set copper with an isotopic ratio of 63Cu:65Cu =
0.6915 : 0.3085 and its density to be 8.93 g/cm3
• Define the material number 2 in [material] section
and the material is used in [cell] section.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
mat[2] ******
・・・ ・・・ ・・・ ・・・
[Cell]
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 -22 #106
106
1 -1.0 -19 20 -21
*Each material (number)
has own color.
Let’s execute PHITS and
see the result.
Geometry (How to add material)
53
Answer 8
Change the material in the cell “106”.
• Set copper with an isotopic ratio of 63Cu:65Cu =
0.6915 : 0.3085 and its density to be 8.93 g/cm3
• Define the material number 2 in [material] section
and the material is used in [cell] section.
lec01.inp
[Material]
mat[1] 1H 2 16O 1
mat[2] 63Cu 0.6915 65Cu 0.3085
・・・ ・・・ ・・・ ・・・
For metal, its isotopic ratio
[Cell]
should be given explicitly.
100
1 -1.0 -10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 -22 #106
106
2 -8.93 -19 20 -21
track_xz.eps
Geometry (How to add material)
54
Change the colors
lec01.inp
[Mat
mat
1
2
Name Color]
name
color
Water
pastelblue
Copper darkred
You can specify the name
and color of each material
(number).
track_xz.eps
Geometry (How to add material)
55
Color definition
Definition in Angel
Geometry (How to add material)
56
How to make a void cell
lec01.inp
[Cell]
100
0
-10 #102 #103 #104 #105 #106
101 -1
10
102
1 -1.0 -11 12 #106
103
1 -1.0 -12 11 #106
104
1 -1.0 -11 -12 #106
105
1 -1.0 -22 #106
106
2 -8.93 -19 20 -21
Material number for void = 0
track_xz.eps
(Material number for outer region = -1)
Density should not be inputted for those cells
Geometry (How to add material)
57
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
58
Main components of input
• In the PHITS simulation, you have to specify
the geometry of 3-dimensional virtual space
and information of source particles, and then
you can tally various quantities by simulating
particle motions in the virtual space
⇒ ① Geometry
[Source]
② Source
define source
③ Tally
Source
59
Types of sources
• Radio-Isotope (RI) facilities
→ Point isotropic source
• Accelerator facilities
→ Pencil or broad beam for certain direction
→ Cone beam source
• Radioactive waste and internal exposure
→ Volume isotropic source
• Cosmic-ray and external exposure
→ Isotropic irradiation within certain area
Source
60
Definition of sources
• Shape of source distribution
← select from source volume type
(point, cylindrical, spherical etc.)
• Energy of source particle
← mono-energy or having spectrum
• Kind of source particle
← neutron, photon, proton, heavy-ion etc.
• Direction of source particle
← isotropic, directional, cone shape etc.
Source
61
Shape and energy of source
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 0.0
= 0.
= 0.
= 150
[ S o u r c e ] section
: definition of sources
s-type: Define source type
= 1 mono-energy,
cylindrical shape
What information is required in definition of a cylinder?
Source
62
Definition of cylinder source
The main direction of PHITS is z-axis.
Z-axis
r0: radius of cylinder
Z1: maximum Z
(r1: inner radius)
X,Y coordinate of center
position: (x0, y0)
Z0: minimum Z
Source
63
Extension of cylinder source
Z-axis
The main direction of PHITS is z-axis.
Z-axis
Z-axis
z0 = z1
Example:
z0 = 5.0
z1 = 5.0
cylinder
Circle
Source
z0 = z1,
r0 = 0.0
point
64
Exercise 9
Execute the transport calculation.
lec01-9.inp(use this file)
[Parameters]
icntl = 8
0
file(6) = phits.out
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 0.
= 0.
= 0.
= 150
Check
transport
geometry
calculation
Point source at
the origin (0,0,0)
Source
65
Answer 9
Execute the transport calculation.
lec01-9.inp(use this file)
[Parameters]
icntl = 0
file(6) = phits.out
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 0.
= 0.
= 0.
= 150
transport
calculation
Point source at
the origin (0,0,0)
track_xz.eps
Source
66
Exercise 10
Let’s make a circle source with a radius of 1cm.
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 0.
= 0.
= 0.
= 150
Source
67
Answer 10
Let’s make a circle source with a radius of 1cm.
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 1.
= 0.
= 0.
= 150
The radius of the beam
is 1cm.
track_xz.eps
Source
68
Energy of source
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
=1
= 1.0
= 0.
= 0.
= 150
s-type = 1
mono-energy,
cylindrical shape
Unit in “MeV/u”
e0: energy (MeV/u)
s-type = 4
having energy spectrum,
cylindrical shape
You can set any spectrum
(see Manual 4.3.15)
Source
69
Kind of source particle
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
=1
= 1.0
= 0.
= 0.
= 150
proj: kind of sources
You can specify kind of
source by ‘symbol’ or
‘kf-code’.
When you use radionuclides
as sources, you have to set
the kind of their emitted
particles, such as ‘photon’.
Source
70
Exercise 11
Let’s set a neutron source of 100 MeV.
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= proton
= 1.0
= 1.
= 0.
= 0.
= 150
Source
71
Answer 11
Let’s set a neutron source of 100 MeV.
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= neutron
= 1.0
= 1.
= 0.
= 0.
= 100
Neutron can penetrate
materials easily.
track_xz.eps
Source
72
Direction of source particle
(polar angle)
The main direction of PHITS is z-axis.
Z-axis
dir = 1
q degrees
dir: direction cosine along the z-axis
※ special
dir = all isotropic source
dir = -all isotropic irradiation
dir = cos q
*Polar coordinate system
Source
73
Direction of source particle
(azimuthal angle)
The main direction of PHITS is z-axis.
Z-axis
phi: angle from x-axis(degree!)
q degrees
dir = cos q, phi = f
f degrees
X-axis
*Polar coordinate system
Source
74
Spread of source beam
dom: solid angle(degree!)
dom = d
d degrees
Source
75
Source direction and
parameters
Source
76
Exercise 12
Let’s set a point isotropic source at the XYZ
coordinate (0, 0, 10).
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= neutron
= 1.0
= 1.
= 0.
= 0.
= 100
Source
77
Answer 12
Let’s set a point isotropic source at the XYZ
coordinate (0, 0, 10).
lec01.inp
[Sou
s-type
proj
dir
r0
z0
z1
e0
rce]
=1
= neutron
= all
= 0.
= 10.
= 10.
= 100
When s-type=1, you can set
a isotropic source by dir=all.
track_xz.eps
Source
78
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
79
Summary
• The main components of PHITS input file are
“Geometry”, “Source” and “Tally”
• “Geometry” is defined by [material], [surface] and
[cell] sections, and you can define various 3D shapes
based on the GG concept
• “Source” is defined by shape, kind, energy and
direction of source particles
• “Tally” is used for specifying what kind of quantities
you have to deduced from the PHITS simulation
You will learn more about “Tally” in phits-lec02-en.ppt
Summary
80
Table of Contents
• General Description
• Geometry
•
•
•
•
•
General definition
Boolean operator
How to define cell with many surfaces
Macrobody and SimpleGEO
How to add material
• Source
• Summary
• Homework
Contents
81
Home work (Geometry)
• Make a cylinder with a 20 cm diameter and a 50 cm height
filled with water. The outside of the cylinder is void
• Confirm the geometry
3D space
Y-axis
R-axis
X-axis
Z-axis
Start with “Phits\lecture\homework\homework.inp”
Homework
82
Homework (source)
• Set proton beam of 290 MeV/u with a 2.5 cm radius,
and incident the beam to the bottom of the cylinder
• Execute the transport calculation
Y-axis
R-axis
source
X-axis
Homework
Z-axis
83