7.19. [ T-Userdefined ] section¶
This tally is used for estimating and outputting physical quantities that cannot be calculated by the other tallies.
To use this tally, the user must change usrtally.f and re-compile PHITS.
When [t-userdefined] is defined in an input file, PHITS calls the subroutine usrtally at each moment in the PHITS simulation, that is, with the same timing used for calling the dumpall option.
A subroutine for outputting all information is written in the default of usrtally.f, and the user can set the output so that only required information is output by revising this file.
Please see the read-me file or sample input file in /phits/utility/usrtally/ for more details.
In [t-userdefined], several parameters can be used: file, for specifying a file name; nudtvar, for specifying the number of variables udtvar(i); udtvar(i) [1], for specifying a numerical value.
These parameters can be used in the subroutine usrtally without recompiling PHITS.
value |
explanation |
file name |
Output file names used in the usrtally subroutine. A maximum of 50 files can be used, and the device numbers of these files are from 151 to 200. |
value |
explanation |
0 (default) |
The number of available udtvar(i). |
value |
explanation |
Numerical value (D=0) |
Parameters used in the usrtally subroutine. These can be defined up to i=nudtvar. |
1: file = output1.dat <-its device number is iudtf(1)=151
2: file = output2.dat <-its device number is iudtf(2)=152
3: nudtvar = 2 <-nudtvar
4: udtvar(1) = 20.0 <-udtvar(1)
5: udtvar(2) = -10.0 <-udtvar(2)
The following parameters can be used in the subroutine usrtally.
NCOL This is an intrinsic variable in the program and denotes identification of process.
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 These are the number of used PEs, Processor Elements, and ID number of each processor, respectively, in the distributed-memory parallel computing.
ipomp, npomp These are ID number of each core and the total number of used cores, respectively, in the shared memory parallel computing.
iusrtally This is a parameter to control whether the subroutine
usrtallyis used or not. If [t-userdefined] is defined in an input file, this parameter is set to 1.iudtf(50) These are device numbers of output files defined with file=. For example, if there is the earliest file defined in [t-userdefined], its device number is iudtf(1)=151.
nudtvar The number of available udtvar(i). This is given as nudtvar in the input file.
udtvar(i) These are numerical values defined as udtvar(i) in the input file. udtvar(i) up to i=nudtvar can be used. If udtvar(i) is not defined in the input file, it is set to 0.
NOCAS, NOBCH, RCASC, RSOUIN
NOCAS : current history 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 history 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 This is \(dE/dx\) for electrons at (x,y,z).
IBLZ1, IBLZ2, ILEV1, ILEV2
Meaning of IBLZ1, IBLZ2, ILEV1, and 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 crossing **ILAT1** and **ILAT2** are variables of level structure of 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 This is charge state of the particle.
NCLSTS This variable means the number of produced particle and nucleus.
MATHZ, MATHN, JCOLL, KCOLL
Meaning of MATHZ, MATHN, JCOLL, and KCOLL:
MATHZ : Z number of the mother nucleus MATHN : N number of the mother nucleus JCOLL : reaction type id1 KCOLL : reaction type id2 **JCOLL** and **KCOLL** indicate the following meaning.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 interactionMeaning of KCOLL:
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** These variables have an array and denote the information on the produced particle and nucleus.ICLUSTS 0 : nucleus 1 : proton 2 : neutron 3 : pion 4 : photon 5 : kaon 6 : muon 7 : othersJCLUSTS(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)