7.19. [ T-Userdefined ] セクション¶
ユーザー定義タリーは、通常のタリーでは得ることができない様々な物理量をタリーする機能です。
各ユーザーが PHITS のソースファイル usrtally.f を Fortran 言語を用いて変更し、求める物理量を書き出します。
このため、ソースファイルのコンパイルが必要となります。
インプットファイルで [t-userdefined] セクションを定義することにより、PHITS 実行時に subroutine usrtally を通過するようになります。
通過のタイミングは dumpall の書き出しと同じで、あらゆるイベントが発生した時です。
本タリーの基本的な考え方として、subroutine usrtally で示されている変数を if 文等の条件で選別してカウントすることで、求める物理量を引き出します。
この subroutine で扱うことができる変数を以下で説明しますが、中には値を変更すると PHITS の計算がおかしくなる変数もあるので、十分に注意してください。
本タリーの具体的な利用方法については、\phits\utility\usrtally フォルダにある readme やサンプルインプットを参照してください。
[t-userdefined] セクションでは、書き出し用ファイル名を与える file、subroutine usrtally で使用できるパラメータの数を指定する nudtvar、およびそのパラメータの値 udtvar(i) [1] が定義できます。
これらは再コンパイルせずに変更できる変数です。
value |
explanation |
|
|
value |
explanation |
0 (default) |
定義する udtvar(i) の数です。 |
value |
explanation |
numerical value (D=0) |
|
1: file = output1.dat <-装置番号は151で、subroutine usrtally内ではiudtf(1)
2: file = output2.dat <-装置番号は152で、subroutine usrtally内ではiudtf(2)
3: nudtvar = 2 <-subroutine usrtally内ではnudtvar
4: udtvar(1) = 20.0 <-subroutine usrtally内ではudtvar(1)
5: udtvar(2) = -10.0 <-subroutine usrtally内ではudtvar(2)
以下が subroutine usrtally 内で示されている変数です。
NCOL これはプログラムの中の変数で、粒子輸送のタイミングの認識変数です。
NCOL 1 : start of calculation 2 : end of calculation 3 : end of a batch 4 : source 5 : detection of geometry error 6 : recovery of geometry error 7 : termination by geometry error 8 : termination by weight cut-off 9 : termination by time cut-off 10 : geometry boundary crossing 11 : termination by energy cut-off 12 : termination by escape or leakage 13 : (n,x) reaction 14 : (n,n'x) reaction 15 : sequential transport only for tally 16 : surface cross for WW of xyz mesh
npe, me それぞれメモリ分散型並列計算時の並列 PE (Processor Element) 数と、各 Element の識別番号です。
ipomp, npomp それぞれメモリ共有型並列計算時のスレッド識別番号と、使用している全スレッド数です。
iusrtally
subroutine usrtallyへの通過をコントロールするパラメータです。インプットファイルに [T-Userdefined] セクションがあれば 1 になっています。iudtf(50) file で定義したファイルの装置番号 151-200 です。
nudtvar nudtvar として定義した数です。使用できる udtvar(i) の上限値です。
udtvar(i) udtvar(i) で定義した値です。i=nudtvar まで使用できます。インプットファイルで定義していない udtvar(i) には 0 が入っています。
NOCAS, NOBCH, RCASC, RSOUIN
NOCAS : current event number in this batch NOBCH : current batch number RCASC : real number of NOCAS+maxcas*(NOBCH-1) RSOUIN : sum of the weight of source particle
NO, IDMN, ITYP, KTYP, JTYP, MTYP, RTYP, OLDWT
NO : cascade id in this event IDMN : material id ITYP : particle type KTYP : particle kf-code JTYP : charge number of the particle MTYP : baryon number of the particle RTYP : rest mass of the particle (MeV) OLDWT : weight of the particle at (x,y,z)
QS 電子の阻止能 (\(dE/dx\)) です。
IBLZ1, IBLZ2, ILEV1, ILEV2
IBLZ1 : cell id at (x,y,z) IBLZ2 : cell id after crossing ILEV1 : level structure id of the cell at (x,y,z) ILEV2 : level structure id of the cell after crossingILAT1 と ILAT2 は、階層構造をもつ CELL の変数です。
COSTH, UANG(1), UANG(2), UANG(3), NSURF
COSTH : cosine of an angle of incidence in a surface crossing UANG(1,2,3) : x,y,z component of a normal vector of its surface, respectively NSURF : internal number of the surface This is different from the surface number defined in **[surface]**.
NAME, NCNT(1), NCNT(2), NCNT(3)
NAME : collision number of the particle NCNT(1,2,3) : values of counter 1, 2, and 3
WT, U, V, W
WT : weight of the particle at (xc,yc,zc) U, V, W : unit vector of momentum of the particle
E, T, X, Y, Z
E : energy of the particle at (x,y,z) (MeV) T : time of the particle at (x,y,z) (nsec) X, Y, Z : position coordinate of the preceding event point (cm)
EC, TC, XC, YC, ZC
EC : energy of the particle at (xc,yc,zc) (MeV) TC : time of the particle at (xc,yc,zc) (nsec) XC, YC, ZC : position coordinate of the particle (cm)
SPX, SPY, SPZ
SPX, SPY, SPZ : unit vector of spin direction of the particle
NZST 粒子がもつ電荷 (charge state) です。
NCLSTS 衝突もしくは崩壊による生成粒子の個数です。原子核も含みます。
MATHZ, MATHN, JCOLL, KCOLL
MATHZ : Z number of the mother nucleus MATHN : N number of the mother nucleus JCOLL : reaction type id1 KCOLL : reaction type id2
JCOLL と KCOLL はそれぞれ次のような意味を持ちます。
JCOLL 0 : nothing happen 1 : Hydrogen collisions 2 : Particle Decays 3 : Elastic collisions 4 : High Energy Nuclear collisions 5 : Heavy Ion reactions 6 : Neutron reactions by data 7 : Photon reactions by data 8 : Electron reactions by data 9 : P,d,a, and photo-nuclear reactions by data 10 : Neutron event mode 11 : Delta Ray production 12 : Muon atomic interaction 13 : Photon reactions by EGS5 14 : Electron reactions by EGS5 15 : Photon photonuclear interaction 16 : Negative muon captured by nucleon 17 : Muon photonuclear interaction 18 : Electron recoil by track structure mode 19 : Muon pair production (photon -> mu+ mu-) 20 : User defined interaction
KCOLL 0 : normal 1 : high energy fission 2 : high energy absorption 3 : low energy n elastic 4 : low energy n non-elastic 5 : low energy n fission 6 : low energy n absorption
ICLUSTS, JCLUSTS, QCLUSTS, JCOUNT これらの変数は、各生成粒子の情報を記述するもので、NCLSTS だけ繰り返し、また、それぞれの変数も以下のように配列を持ちます。
ICLUSTS 0 : nucleus 1 : proton 2 : neutron 3 : pion 4 : photon 5 : kaon 6 : muon 7 : others
JCLUSTS(i) i = 0 : angular momentum = 1 : proton number = 2 : neutron number = 3 : ityp = 4 : status of the particle, 0: real, <0: dead = 5 : charge number = 6 : baryon number = 7 : kf code = 8 : isomer level (0: ground state, 1: first isomer, 2: second isomer)
QCLUSTS(i) i = 0 : impact parameter = 1 : x-component of unit vector of momentum = 2 : y-component of unit vector of momentum = 3 : z-component of unit vector of momentum = 4 : e_tot = sqrt(p^2 + m^2) (GeV) = 5 : rest mass (GeV) = 6 : excitation energy (MeV) = 7 : kinetic energy (MeV) = 8 : weight = 9 : time (nsec) = 10 : x coordinate (cm) = 11 : y coordinate (cm) = 12 : z coordinate (cm)