Last Update : 2024/04/19



Question category

1 Questions related to parameter setting
2 Questions related to error occurred in compiling or executing PHITS
3 Questions related to Tally
4 Questions related to source generation
5 Questions related to PHIG-3D
6 Other questions


1 Questions related to parameter setting
Q1.1 Input file that works before ver. 2.88 does not work after that version.
A1.1 Several revisions were made in terms of the input file format after ver. 2.89 to avoid frequently-occurring mistakes. In general, it is not necessary to change input file when PHITS is updated, but in some cases, it is necessary. If you encounter an error after the update, please check the following points.

  1. After ver. 2.89, "c" cannot be used as a comment remark in [material] section in the default setting. You have to change the comment remarks "c" in [material] to $ or #, or set icommat=1 in [parameters].
  2. After ver. 2.93, low energy neutrons are transported using nuclear data library in the default setting. Thus, you may encounter an error "There is no cross section table(s) in xsdir" even when you want to transport only photon and electrons. In that case, you have to set nucdata=0 in [parameter] to disable the use of nuclear data library.
  3. After ver. 2.96, it is not allowed to define two or more [parameter] sections in an input file.
  4. After ver. 2.96, unnecessary tallies are automatically disabled, depending on the icntl parameter. Consequently, set and infl commands are ignored when they are written in the disabled sections. When set or infl commands are ignored, PHITS outputs warning.

Q1.2 Electrons and positrons are not transported.
A1.2 Transport of electrons and positrons are ignored in the default setting because they are time consuming. If you want to transport them, you have to activate EGS5 mode by setting negs=1 in [parameters].

Q1.3 Which nuclear reaction model settings give the most accurate result?
A1.3 In general, the default models give the best results in most cases. However, it is desirable to activate RQMD (irqmd=1) for precisely simulating nucleon-nucleon interactions, and SMM (ismm=1) for precisely estimating the residual nuclide yields after high-energy nuclear reactions, though they are time consumptive.

Q1.4 What kind of simulation does event-generator mode suit for?
A1.4 Event generator mode suits simulations by which the event-by-event information is necessary to be obtained, e.g. detector response calculations and design of semi-conductor devices. It is also useful for the simulation that must determine energy and type of charged particles produced by low-energy neutron interactions. In concrete, event generator mode generally suits does the simulations using [T-Deposit], [T-LET], [T-SED], [T-Yield] and/or [T-Product] tallies. On the other hand, it is not suit for the simulations only using [T-Track] and/or [T-Cross] tallies, such as shielding calculation. See Manual "4.2.22 Event Generator Mode" section in more detail.

Q1.5 When should I change the mode for the statistical uncertainty (the setting of istdev)?
A1.5 We generally recommend the history variance mode (istdev=abs(2)), where the statistical uncertainty depends on the total history number (maxcas*maxbch), except for the case of shared-memory parallel computing, where only the batch the batch variance mode (istdev=abs(2)) can be selected. However, the computational time occasionally becomes extremely long in the history variance mode, especially in the case of tallies using a lot of memories, e.g. xyz mesh tally with very fine structure. When you perform the PHITS calculation with such conditions, please change to the batch variance mode and set maxbch to be more than 10.

Q1.6 Is it possible to use nuclear data libraries other than JENDL-4.0?
A1.6 Yes. PHITS can use nuclear data libraries that are written in the ACE format, i.e., the MCNP format. Note that the instruction changes for neutron libraries below 20 MeV and others. The following are instructions on how to use a new nuclear data library in PHITS:
  1. For neutron libraries below 20 MeV.
    1. Using a text editor, open the xsdir file contained in the package of the new nuclear data library and copy all nuclear data addresses (e.g., 1001.80c 0.999167 xdata/endf71x/H/1001.710nc 0 1 4 17969 0 0 2.5301E-08)
    2. Using a text editor, open the file xsdir.jnd included in the PHITS data folder and paste the copied addresses below directory around the 180th line: above the first address information of JENDL-4.0 (1001.50c 0.999167 neu/H_001.j40n_300K 0 1 1 30720 0 0 2.585E-08) because PHITS automatically finds the data library of the previously written nucleus in xsdir.jnd;
    3. create a new folder with the appropriate name written in the address file in the PHITS XS folder and copy the data files from the new nuclear data library to the created folder.

  2. For other libraries such as proton, deuteron, photo-nuclear reaction, high energy neutron libraries, etc.
    1. Using a text editor, open the xsdir file contained in the package of the new nuclear data library and copy all nuclear data addresses (e.g., 1001.80c 0.999167 xdata/endf71x/H/1001.710nc 0 1 4 17969 0 0 2.5301E-08) and then using a text editor, open the file xsdir.jnd included in the PHITS data folder and paste the copied addresses at the end of the file;
    2. Create a new folder with the appropriate name written in the address file in the PHITS XS folder and copy the data files from the new nuclear data library to the created folder;
    3. Explicitly specify the library ID using lib(i) in the [parameters] section of your PHITS input file (e.g., lib(2)=80c for the above example) and set the maximum energy of the library using dmax(i). If the nuclear data libraries are not available for certain nuclides specified in [material], PHITS automatically employs the nuclear reaction models for the nuclides.
The latest version of ENDF (ENDF/B-VIII.0) in the ACE format can be downloaded from the link below. https://nucleardata.lanl.gov/ace/lib80x/ There are two xsdir files (xsdir & xsdir_2.0) in the package, but only xsdir is compatible with PHITS.

Q1.7 How can I obtain neutron fluxes emitted from photonuclear reactions with a good statistical uncertainty?
A1.7 You can bias the photonuclear cross section using the pnimul parameter. For example, the probability to cause photo-nuclear reaction becomes double when you set pnimul=2.0, and the weights of secondary particles emitted from the photonuclear reaction are 0.5. If you set very high value for pnimul, e.g. above 100.0, the photon fluxes might be changed. Thus, please check whether the photon fluxes does not change very much when you use this parameter.

Q1.8 I cannot restart PHITS simulation due to error related to the inconsistency of tally. Why?
A1.8 It is due to the loss of significant digit in the PHITS input file. In that case, you have to set ireschk=1, then PHITS skips the consistency check.


2 Questions related to error occurred in compiling or executing PHITS
Q2.1 I got an error in compiling PHITS. How can I compile PHITS ?
A2.1 Intel Fortran Compiler 11.1 (or later) and gfortran 4.7 (or later) can be used. Note that the PHITS office recommends using Intel Fortran Compiler 11.1 (or later). Intel fortran of OneAPI is available for free of charge. Intel Fortran is recommended because PHITS compiled by Intel Fortran is much faster than that by gfortran. See Manual "2.4 Compilation using make command for Windows, Mac, and Linux" section in more detail.

Q2.2 Access violation or Segmentation fault occurred during the execution of PHITS.
A2.2 It is probably due to a bug related to memory usage in PHITS. Please append {\tt \$DBG=1} to the first line of the input file that causes the problem and run PHITS in debug mode. If you get any error messages, please send the messages to PHITS office, together with the information on your machine environment. If you used your own compiled version of PHITS, please recompile PHITS in the debug mode (change DEBUG? = false to true in makefile), execute the debug mode with your input file, and send the error message to the office.

Q2.3 An error occurred when I try to use infl: in my PHITS input file.
A2.3 When infl: command is used in your PHITS input file (let name input.dat), you have to type file=input.dat at the first line of input.dat file. Or you have to make another input file (let name phits.in) whose first line is file=input.dat, and use phits.in as the input file of the PHITS. See Manual "2.7 Executable file" section in more detail.

Q2.4 An error occurred when I try to execute PHITS on Linux or Unix console, but I can execute it on Windows using the same input file.
A2.4 Many reasons are considered to cause the error, but the most probable one is the difference of "return code" used in Linux (or Unix) and Windows. If you prepare your input file in your Windows computer, and transfer to your Linux (or Unix) system using FTP software, you have to check the status of transfer mode; i.e. you have to select "ASCII mode" in your FTP software.

Q2.5 Can PHITS be executed on Cygwin?
A2.5 Yes, you can. You can find the Cygwin option in "makefile" of PHITS.

Q2.6 Which is suitable for compiling PHITS, Intel fortran or gfortran?
A2.6 We basically recommend Intel fortran compiler because it can make a faster executable file of PHITS than gfortran. When you use gfortran, you had better set "-O0", namely NOT use optimization options, because there is a possibility that the executable file with the optimization doesn't work correctly. Therefore, the executable file compiled by Intel fortran is averagely 3-5 times as fast as that by gfortran. Furthermore, there is a problem that gfortran of the latest version cannot compile PHITS (see A2.1). Note that Intel fortran compiler is not a free-ware (also Linux version).

Q2.7 How should I set the distributed memory parallel computing (MPI) or the shared memory parallel computing (OpenMP) depending on the situation?
A2.7 The calculation using MPI is basically faster than that using OpenMP, if the MPI protocol is installed in the computer. However, because the protocol is not installed in usual computers of Windows and Mac OS in the default setting, we recommend the use of the executable file with OpenMP. If you want to perform the PHITS calculation using a huge memory such as high energy files of nuclear data and voxel phantom, you have to use the setting of a hybrid MPI-OpenMP, because there is a possibility of a memory shortage of the computer in the case using MPI only. In the hybrid setting, you should increase the number of MPI processes as much as the used memory is not over the capacity of the computer. Note that PHITS uses CPU cores of the number of OpenMP processes to control the MPI processes. For example, when you use a computer having 128 CPU cores and set the number of the OpenMP processes to 8, you can specify the maximum number of the MPI processes is 128/8-1 = 15.

Q2.8 I got many warning messages about lost particles. What should I do?
A2.8 Several reasons can be considered as the cause of this problem. The most probable reason is wrong definition of your geometry, such as double-defined and undefined regions. Please check your geometry using [t-gshow] or icntl=8. You may also have to check the following issues.
  1. If you set the location of source particles exactly on (or source direction exactly parallel to) a boundary of certain cells, you have to slightly change the definition of your source.
  2. If you rotate a lattice structure by [transform], you have to set the size of outer frame surface to be slightly smaller than the lattice structure inside it. Please see Advanced Lecture: Making Voxel Phantom in more detail.
  3. If you set [weight window] (or [t-wwg] to generate it) with mesh = xyz that exactly overlaps with a boundary of certain cells, you have to slightly change the definition of the xyz mesh. Please be especially careful if you are using parameters to link geometry boundary and xyz-mesh ranges. After version 3.34, if the maximum and minimum xyz mesh values for [weight window] and [t-wwg] are defined as integers, the minimum value is shifted by -1*deltxyz and the maximum value by +2*deltxyz from the integer.
If you cannot figure out the reason of lost particles, but the frequency of lost particles is not so high (approximately less than once per several 1000 histories), you can ignore the message. It is probably due to the loss of significant digit.

Q2.9 I fail to execute PHITS with OpenMP parallelization in Linux. The library "libiomp5.so" is required.
A2.9 In order to execute PHITS with OpenMP parallelization, you may be required to install the libiomp5.so library. In this case, please install the libomp-dev library by using installation software provided in each Linux distribution. For instance, for Ubutu case, you can install the library by
 sudo apt-get install libomp-dev
This will create a library
 /usr/lib/x86_64-linux-gnu/libomp.so.5
Then please move to this directory
 cd /usr/lib/x86_64-linux-gnu/
and make a symbolic link to libiomp5.so
 sudo ln -s libomp.so.5 libiomp5.so
With this, you should be able to execute PHTIS with OpenMP parallelization.

Q2.10 PHITS execution fails in Linux with an error "GLIBC_2.34 not found".
A2.10 The executable files for Linux in the PHITS package are using updated GLIBC library. Therefore PHITS execution fails in a computer with older version of Linux OS such as Ubuntu 20.04 LTS. To solve this problem, you need to update OS of your PC or recompile PHITS under your environment by yourself. Some Fortran compiler such as Intel Fortran or Gfortran is required for recompilation. The source code of PHITS is located at phits/src. Please properly set the value of ENVFLAGS in makefile according to your environment and compile PHITS using make command (please see also Sec. 10.3 of the PHITS manual).

Q2.11 I encountered symptoms that are clearly PHITS bugs, such as infinite loops and abnormal termination of calculations. What should I do?
A2.11 Please append $DBG=1 to the first line of the input file that causes the problem and run PHITS in debug mode. If you get any error messages, please send the messages to PHITS office, together with the information on your machine environment.


3 Questions related to Tally
Q3.1 What is the difference between [t-heat] and [t-deposit] tallies?
A3.1 These two tallies essentially produce the same values of deposition energies. After version 3.05, [t-deposit] gives the deposition energies not only by ionization of charged particles but also kerma of neutral particles. Thus, we do not recommend to use [t-heat] after that version.

Q3.2 The track length or fluence of heavy ions calculated by [T-Track] or [T-Cross] is strange.
A3.2 It might be due to the miss-define of the energy mesh in the tally section. The energy of heavy ions should be defined in MeV in the tally section, although it should be written in MeV/u in the [Parameters] section.

Q3.3 Results obtained by [T-LET] and/or [T-SED] tally are strange.
A3.3 You have to check the density of material selected by letmat. If you select the material that is not used in your geometry, you have to define its absolute atomic densities (1H 6.893407e-2 16O 3.446704e-2) in [Material] section. See ParticleTherapy.inp in recommendation.zip as example. In addition, if you set a very fine mesh (more than 10 meshes per decade) in [t-let], the results might have zigzag structure. In that case, you have to widen the LET mesh.

Q3.4 How can we estimate the statistical uncertainty from the tally output?
A3.4 Version 2.52 or later, the standard deviations or standard errors are correctly outputted in the tally results. See Manual "4.2.2 Number of history and bank" section in detail.

Q3.5 Can I use "dump" function when I execute PHITS in the distributed memory parallel computing?
A3.5 From version 2.30, it works. Please ask PHITS office about its detailed usage.

Q3.6 Tally results in a box obtained using "mesh=reg" and "mesh=xyz" are inconsistent with each other.
A3.6 PHITS automatically calculate the volume of tally regions only in the cases of mesh = xyz or r-z. Thus, if you set "mesh=reg" and you do not specify [volume] section, the volume of the tally region is assumed to be 1 cm3.

Q3.7 Why do some events deposit energies greater than the incident energy using [t-deposit] with "output=deposit" option?
A3.7 When exothermic nuclear reaction occurs, the total energy of secondary particles becomes greater than the incident energy. Such events are also observed when mesh = xyz or r-z and nedisp≠0. This is due to the algorithm for considering the energy straggling of charged particle in PHITS. In that case, you have to set mesh = reg in [t-deposit], and define cells that correspond to each xyz or r-z mesh in [cell] section.

Q3.8 Can I switch x and z axes in 2D drawing of the tally results?
A3.8 Yes. For that purpose, you have to swap x-type and z-type mesh information, and add the following 3 lines:
trcl = 0 0 0 0 0 1 0 1 0 1 0 0
x-txt = x [cm]
y-txt = z [cm]
Then, you will see eps file rotated by 90 degree.

Q3.9 Computational time becomes longer when I set up many tallies in my input file. What can I do?
A3.9 You can decrease the computational time by setting istdev = 1 (batch variance mode) or italsh = 1 (sharing tally memory, only for OpenMP), particularly when you define tally consuming large memory size. In addition, [t-yield] and [t-dchain] cost numerous computational time between PHITS 2.94 and 3.24. If you feel your simulation using [t-yield] and [t-dchain] is too slow, please contact PHITS office. We will provide the latest version.

Q3.10 Is it possible to easily output the statistical error of the sum-over data?
A3.10 No. You have to set another tally to directly output the sum-over data by setting the mesh number equal to 1.

Q3.11 Is it possible to stop the PHITS simulation when the statistical errors of the tally data only for certain meshes become lower than stdcut?
A3.11 No. When stdcut is set, PHITS checks the statistical errors of all data in the tally. Thus, you have to limit the meshes only to the regions of your interest in the case of specifying stdcut in the tally.

Q3.12 I would like to know the PHITS tallies corresponding to MCNP ones.
A3.12 Please see below for the answer.
F1: Surface Current = [t-cross] with output = current
F2: Surface Flux = [t-cross] with output = flux
F4: Track Length cell flux = [t-track]
F4: with FM card: Reaction number = [t-interact],[t-yield],[t-product]
F5: Flux at a point and ring = [t-point]
F6: Energy Deposition = [t-deposit] with output = dose
F8: Pulse Height = [t-deposit] with output = deposit

Q3.13 Tally results obtained from [t-cross] with mesh=reg are inconsistent with the corresponding data obtained from [t-cross] with mesh=xyz or r-z.
Surface area must be defined in [t-cross] with mesh=reg, otherwise the area is always assumed to be 1.0 cm2. If a boundary of geometry coincides with a tally plane at cylindrical surface in r-z mesh or at a rotated surface in xyz mesh, the tally results might be underestimated due to the problem of significant digit. In such cases, the mesh size should be changed slightly so that it does not coincide with the boundary plane.


4 Questions related to source generation
Q4.1 How can we normalize PHITS outputs when I use the isotropic source (s-type=9 with dir = -all)?
A4.1 If there is nothing inside the sphere of the isotropic source, the fluence inside the sphere is normalized to 1/(pi*r12) (/source), where r1 is the radius of the sphere. Thus, if you would like to convert the tally output (/source) to the unit fluence, you have to multiply the result with pi*r12. It should be noted that the weight control method is employed in generating the isotropic source, and thus, the event-by-event information cannot be derived from the simulation using the isotropic source. If you would like to obtain event-by-event information for isotropic irradiation, you have to set "dir = iso" in the [source] section.

Q4.2 What should be done if a source particle is not created in the desired location in a cell?
A4.2 To set the source generating surface (or point) precisely on the surface of a certain cell, PHITS sometimes mis-identifies the cell where it should be located. In this case, the source surface should be moved so that it differs slightly from the cell surface.


5 Questions related to PHIG-3D
Q5.1 When starting PHIG-3D on Windows, it stops with the error message of "VCOMP140.DLL not found".
A5.1 Please install Microsoft Visual C++ 2015 redistributable package(https://www.microsoft.com/en-US/download/details.aspx?id=53840). If this cannot resolve the above error, please contact the phits office.

Q5.2 PHIG-3D does not start when we define "set: cXX [X.X]" at the beginning of the sentence in input file.
A5.2 Please define "set:cXX[X.X]" at later line than [Parameters] section.

Q5.3 In the [Material] section, when we write "C" at the beginning of the sentence in input file, an error maggesage of "too few material input" is displayed. For example, an error will occur in the following situations.
  mat[5]
        C 2 H 4
A5.3 Please revise as follow.
  mat[5]   C 2 H 4

Q5.4 When I try to start PHIG-3D on Mac, I get an error message Cannot be opened because the developer cannot be verified.
A5.4 Please select the PHIG-3D executable file, right-click while holding down the Control key, and select Open from the shortcut menu to launch it. You can also grant permissions from System Preferences → Security and Privacy.

Q5.5 A Not enough free memory error occurs when I press draw button.
A5.5 Please stop other applications that may consume a lot of memory in your computer. If you still observe the same error even after stopping the applications, please click Setting in the left tab and reduce Points/cell parameter.


6 Other questions
Q6.1 Can I use PHITS for commercial purpose?
A6.1 Basically yes. You can use PHITS for commercial purposes such as the design of radiation detector to be sold, and radiation shielding calculation for the accelerator facilities for medical use. However, you have to make an onerous contract if you want to sell a product that includes the executable file of PHITS, such as the treatment planning system based on PHITS. In that case, please contact us.

Q6.2 What kinds of physical processes cannot be handled by PHITS?
A6.2 PHITS cannot handle interactions involved with more than (or equal to) two moving particles such as particle collision experiments, transports and generations of non-ionizing radiation such as visible light, and change of chemical or material properties after irradiation. More detailed information can be found here.

Q6.3 I would like to install PHITS to my new computer, but I cannot find the installer. What can I do?
A6.3 Please send a message to PHITS office via "contact" page by selecting "PHITS upgrade patch request" and writing "I would like to install PHITS in a new PC" in the column of "PHITS version". We will check your registration status and send the latest package in free of charge if you are registered, or ask you to submit application form if not.