Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-Purpose Particle and Heavy Ion Transport code System

Similar presentations


Presentation on theme: "Multi-Purpose Particle and Heavy Ion Transport code System"— Presentation transcript:

1 Multi-Purpose Particle and Heavy Ion Transport code System
PHITS Multi-Purpose Particle and Heavy Ion Transport code System Useful Functions PHITS講習会 入門実習 Feb revised Title 1

2 Table of Contents [transform] [magnetic field] [counter]
PHITS講習会 入門実習 Table of Contents 2

3 [transform] section You can translate and/or rotate the geometries defined in [source], [surface], [cell], [magnetic field] sections as well as r-z and xyz meshes defined in any tally. Z Y Rotation X XYZ coordinate system Translation [transform] 3

4 How to use In the case of M=1, 𝐵 1 = cos 𝑥 ′ ,𝑥 𝐵 2 = cos 𝑥 ′ ,𝑦
After making [transform] section, you can use this function by setting trcl=n in [cell], [source], and so on. [ T r a n s f o r m ] Trn O1 O2 O3 B1 B2 B3 B4 B5 B6 B7 B8 B9 M In the case of M=1, 𝐵 1 = cos 𝑥 ′ ,𝑥 𝐵 2 = cos 𝑥 ′ ,𝑦 𝐵 3 = cos 𝑥 ′ ,𝑧 𝐵 4 = cos 𝑦 ′ ,𝑥 𝐵 5 = cos 𝑦 ′ ,𝑦 𝐵 6 = cos 𝑦 ′ ,𝑧 𝐵 7 = cos 𝑧 ′ ,𝑥 𝐵 8 = cos 𝑧 ′ ,𝑦 𝐵 9 = cos 𝑧 ′ ,𝑧 𝑥′ 𝑦′ 𝑧′ = 𝐵 1 𝐵 2 𝐵 3 𝐵 4 𝐵 5 𝐵 6 𝐵 7 𝐵 8 𝐵 𝑥 𝑦 𝑧 𝑂 1 𝑂 2 𝑂 3 n: ID of transformation O1,O2,O3: Displacement vector B1~B9: Elements of rotation matrix M: Parameter to change the equation of the transformation(The case of M=1 is shown here.) [transform] 4

5 Convenient Way to Use You can use the following sample to easily transform the coordinate. [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[0] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr cos(c10/180*pi)*cos(c20/180*pi) sin(c10/180*pi)*cos(c30/180*pi)+cos(c10/180*pi)*sin(c20/180*pi)*sin(c30/180*pi) sin(c10/180*pi)*sin(c30/180*pi)-cos(c10/180*pi)*sin(c20/180*pi)*cos(c30/180*pi) -sin(c10/180*pi)*cos(c20/180*pi) cos(c10/180*pi)*cos(c30/180*pi)-sin(c10/180*pi)*sin(c20/180*pi)*sin(c30/180*pi) cos(c10/180*pi)*sin(c30/180*pi)+sin(c10/180*pi)*sin(c20/180*pi)*cos(c30/180*pi) sin(c20/180*pi) -cos(c20/180*pi)*sin(c30/180*pi) cos(c20/180*pi)*cos(c30/180*pi) 1 Rotation angles around X-, Y-, and Z-axes. X-, Y-, and Z components for translation [transform] 5

6 Example transform.inp [transform] 6 Execute to see the geometry.
[ M a t e r i a l ] mat[1] H 2 O 1 [ S u r f a c e ] 10 so 11 cz 12 pz 13 pz [ C e l l ] #101 Let’s rotate the cylinder around Y-axis by 30 degrees. track_xy.eps Cylinder with radius of 5cm and height of 10cm track_xz.eps [transform] 6

7 Example (Rotation) transform.inp [transform] 7
[ S u r f a c e ] 10 so 11 cz 12 pz 13 pz [ C e l l ] trcl=1 #101 [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[30] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[0] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ Rotation angles around X-, Y-, and Z-axes. Transformation of cell 101 by tr1. X-, Y-, and Z-components for the translation. Let’s rotate the cylinder around Y-axis by 30 degrees! track_xz.eps [transform] 7

8 Example (translation)
transform.inp [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[30] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[30] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ Rotation angles around X-, Y-, and Z-axes. X-, Y-, and Z-components for the translation. In the case of M=1, the translation is performed after the rotation. Move this cylinder along the positive direction of the Z-axis by 50 cm! track_xz.eps [transform] 8

9 Exercise 1 transform.inp [transform] 9
Let’s rotate the cylinder around Y-axis by 45 degrees, then transform it along with X-axis by 10 cm and Z-axis by 45 cm! [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[45] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ [ T r a n s f o r m ] set: c10[0] $ angle of around Z (degree) set: c20[30] $ angle of around Y (degree) set: c30[0] $ angle of around X (degree) tr ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ track_xz.eps [transform] 9

10 Exercise 2 Construct the geometry shown below by adding 3 cells. Do not change [surface] section. Change [cell] & [transform] section. In [transform] section, copy & paste lines below set: c10[*] by 3 times, and assign each transform equation by tr2, tr3, tr4, respectively. track_xz.eps [transform] 10

11 Table of Contents [transform] [magnetic field] [counter]
PHITS講習会 入門実習 Table of Contents 11

12 [magnetic field] section
You can set magnetic fields (dipole and quadrupole) in certain region in PHITS geometry to bend and deflect the charged particle trajectories. Example of dipole magnet: Homogeneous magnetic field F=ev×B [magnetic field] 12

13 [magnetic field] section
You can set magnetic fields (dipole and quadrupole) in certain region in PHITS geometry to bend and deflect the charged particle trajectories. Example of quadrupole magnet: Converge charged particle trajectory N S X-axis Y-axis Schematic image of quadrupole magnet [magnetic field] 13

14 Direction of Magnetic Field
How to use After making [magnetic field] section, you can use this function by setting imagnf=1 in [parameters]. [ Magnetic Field ] reg typ gap mgf trcl *For electrons and positrons, this function is available only when you use EGS5 (after PHITS version 2.90). reg: cell ID to set the magnetic field typ: dipole (=2) or quadrupole (=4) gap: half distance between magnet in cm (not used for dipole but need to be input) mgf: strength of magnetic field in kG trcl: transform ID Direction of Magnetic Field Y-axis (positive direction) for dipole →positive charged particle bends to the negative direction of X-axis when it is going to the positive direction of Z-axis For quadrupole →positive charged particle converges along to X-axis and diverges along to Y-axis when it is going to the positive direction of Z-axis [magnetic field] 14

15 Example magfield.inp [magnetic field] 15
Check geometry and perform simulation by setting icntl=0. [ S o u r c e ] s-type = 1 proj = proton dir = 1 r0 = 2.5 z0 = -10. z1 = -10. e0 = 290 [ S u r f a c e ] 10 so 11 cz 12 pz 13 pz [ C e l l ] trcl=1 trcl=2 trcl=3 trcl=4 #101 #102 #103 #104 track_xz.eps [magnetic field] 15

16 Example for Dipole Magnet
magfield.inp [ P a r a m e t e r s ] icntl = 0 maxcas = 100 maxbch = 10 imagnf = 1 file(6) = phits.out ・ ・ ・ ・ ・ ・ [magnetic field] reg typ gap mgf [ P a r a m e t e r s ] icntl = 0 maxcas = 100 maxbch = 10 $ imagnf = 1 file(6) = phits.out ・ ・ ・ ・ ・ ・ [magnetic field] reg typ gap mgf track_xz.eps [magnetic field] 16

17 Example for Quadrupole Magnet
magfield.inp [ P a r a m e t e r s ] icntl = 0 maxcas = 100 maxbch = 10 imagnf = 1 file(6) = phits.out ・ ・ ・ ・ ・ ・ [magnetic field] reg typ gap mgf [ P a r a m e t e r s ] icntl = 0 maxcas = 100 maxbch = 10 imagnf = 1 file(6) = phits.out ・ ・ ・ ・ ・ ・ [magnetic field] reg typ gap mgf track_xz.eps [magnetic field] 17

18 Exercise1 magfield.inp [magnetic field] 18
Check divergence of particles along to the Y-axis! magfield.inp [ T - T R A C K ] mesh = xyz x-type = 2 nx = 100 xmin = -25. xmax = 25. y-type = 2 ny = 100 ymin = -25. ymax = 25. z-type = 1 nz = 1 part = proton ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ file = track_xy.out [ T - T R A C K ] mesh = xyz x-type = 2 nx = 100 xmin = -25. xmax = 25. y-type = 2 ny = 100 ymin = -25. ymax = 25. z-type = 1 nz = 3 part = proton ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ file = track_xy.out track_xz.eps track_xy.eps [magnetic field] 18

19 Exercise2 [magnetic field] 19
Bend and converge the beam to hit the cell 101 like the picture below (You do not have to consider the divergence of beam along to Y-axis). Set two difference magnetic fields. Control the beam by changing the direction and strength of the magnetic fields. track_xz.eps [magnetic field] 19

20 Table of Contents [transform] [magnetic field] [counter]
PHITS講習会 入門実習 Table of Contents 20

21 What is “Counter” in PHITS?
Each particle has its own “Counter” number to identify what it has been experienced, such as entering, exiting from, reacting in, and reflected by a certain region. To investigate the origin of tallied particle → What are the difference between particles Produced in each region? Tally When a particle collides in a region, count = counter +1. [counter] 21

22 How to use After making [counter] section, you can use this function by setting ctmin(i), ctmax(i) in each tally section (i is counter ID). [ C o u n t e r ] counter = 1 part = neutron proton reg in out coll ref Counter: counter ID (up to 3) part: Countered particle (Particle type followed by this counter) Event Types in: Enter the cell out: Exit from the cell coll*: React in the cell ref: Reflected by the cell Cells for activating this counter Action 0: Nothing happens 10000: Set counter = 0 Other: Counter = Counter + Number *You can distinguish further detailed channels for coll. (See the next slide.) [counter] 22

23 classification of coll
coll is classified as nucl, atom, and dcay. Furthermore, nucl and atom have 3 and 8 channels, respectively. coll: reactions nucl: nuclear interactions elst: elastic scatterings iels: inelastic scatterings fiss: fissions atom: atomic interactions delt: generation of delta-rays fluo: generation of fluorescence x-rays auge: generation of Auger electrons brem: Bremsstrahlung phel: photoelectric effects cmpt: Compton scatterings pprd: production of electron-positron pairs anih: annihilation of electron-positron pairs dcay: particle decays [counter] 23

24 Example counter.inp [counter] 24
Check geometry and perform simulation by setting icntl=0. [ M a t e r i a l ] MAT[ 1 ] H 2 O 1 MAT[ 2 ] N 8 O 2 MAT[ 3 ] Cu 1 [ C e l l ] trcl=1 trcl=2 e trcl=3 trcl=4 #101 #102 #103 #104 ・ ・ ・ ・ ・ ・ [ C o u n t e r ] counter = 1 part = proton reg in out coll ref track_xz.eps [counter] 24

25 Example counter.inp [counter] 25 From 110 to 101 cross.eps
[ T - C r o s s ] title = Particle current using [T-cross] tally mesh = reg reg = 1 non r-in r-out area e-type = 3 emin = 1.0 emax = ne = 30 unit = 1 axis = eng file = cross.dat output = current part = proton angel = ymin[1.E-06] ymax[1.E-02] epsout = 1 From 110 to 101 cross.eps [counter] 25

26 Example counter.inp [counter] 26
Add conditions related the counter option to the [t-cross] section! ctmin(1)=1, ctmax(1)=1 counter.inp [ C o u n t e r ] counter = 1 part = proton reg in out coll ref [ T - C r o s s ] ・ ・ ・ ・ ・ ・ file = cross-c1.dat output = current part = proton angel = ymin[1.E-06] ymax[1.E-02] epsout = 1 ctmin(1) = 1 ctmax(1) = 1 cross-c1.eps Min & Max values of the counter ID1 for tallied particle Scattered protons only in the region 102 are tallied. [counter] 26

27 Exercise 1 counter.inp [counter] 27
Add neutron to “part” in the [t-cross] section to consider their origin. [ C o u n t e r ] counter = 1 part = proton reg in out coll ref [ T - C r o s s ] ・ ・ ・ ・ ・ ・ file = cross-c1.dat output = current part = proton neutron angel = ymin[1.E-06] ymax[1.E-02] epsout = 1 ctmin(1) = 1 ctmax(1) = 1 [ C o u n t e r ] counter = 1 part = proton reg in out coll ref [ T - C r o s s ] ・ ・ ・ ・ ・ ・ file = cross-c1.dat output = current part = proton angel = ymin[1.E-06] ymax[1.E-02] epsout = 1 ctmin(1) = 1 ctmax(1) = 1 cross-c1.eps Neutrons can also be estimated with the condition as in the protons. [counter] 27

28 Exercise 2 Let’s tally scattered particles from the 103 and 104 regions as in 102. Define counter 2 and 3 in the [counter] section to count events occurred in 103 and 104, respectively. Copy & paste the [t-cross] section (2 times), and set a condition of counter 2 and 3. (change their output file names) tally [counter] 28

29 Answer 2 counter.inp [counter] 29 cross-c2.eps cross-c3.eps
・ ・ ・ ・ ・ ・ counter = 2 part = proton reg in out coll ref counter = 3 [ T - C r o s s ] file = cross-c2.dat output = current part = proton neutron angel = ymin[1.E-06] ymax[1.E-02] epsout = 1 ctmin(2) = 1 ctmax(2) = 1 cross-c2.eps cross-c3.eps No reaction occurs in the air region. Protons scattered from 104 are very little. [counter] 29

30 Summary You can set up complex geometries as well as source and tallies using [transform] section. You can simulate the particle trajectories in magnetic fields using [magnetic field] section. You can analyze the simulation results in more detail using [counter] section. 《休憩はさむ》 まとめ Summary 30


Download ppt "Multi-Purpose Particle and Heavy Ion Transport code System"

Similar presentations


Ads by Google