************************************************** FAQ ************************************************** Questions related to parameter setting ================================================== .. _faq-e-ver288diff: 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. - After ver. 2.89, c\_ (here \_ is a space), 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]. - 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 [parameters] to disable the use of nuclear data library. - After ver. 2.96, it is not allowed to define two or more [parameters] sections in an input file. - 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. .. _faq-e-electrontransport: 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,2 in [parameters]. .. _faq-e-defaultreactionmodel: 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 JQMD-2.0 (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. .. _faq-e-eventgeneratormode: Q1.4: What kind of simulation is the event-generator mode suited to? A1.4: Event generator mode is best suited to simulations in which it is necessary to obtain event-by-event information, e.g., detector response calculations and the design of semi-conductor devices. It is also useful for simulations in which the energies and types of charged particles produced by low-energy neutron interactions must be determined. Specifically, event generator mode is generally most suited to simulations using [T-Deposit], [T-LET], [T-SED], [T-Yield], and/or [T-Product] tallies. On the other hand, it is not suited to simulations only using [T-Track] and/or [T-Cross] tallies, such as shielding calculations. See PHITS manual "5.2.27 Event Generator Mode" for further details. .. _faq-e-istdevswitch: Q1.5: When should the mode for statistical uncertainty (the setting of istdev) be changed? A1.5: We generally recommend using the history variance mode (istdev=-2 or 2), in which the statistical uncertainty depends on the total history number (maxcas*maxbch), except in the case of shared-memory parallel computing, in which only the batch variance mode (istdev=-1 or 1) can be selected. However, the computational time occasionally becomes extremely long in history variance mode, especially in for tallies using a large number of memories, e.g., an xyz mesh tally with very fine structure. When performing a PHITS calculation under such conditions, please switch to batch variance mode and set maxbch to be greater than 10. .. _faq-e-othernucleardata: Q1.6: Is it possible to use nuclear data libraries other than JENDL in PHITS? A1.6: Yes. PHITS can use nuclear data libraries written in ACE format, i.e., the format readable by MCNP. However, the procedure differs between neutron libraries below 20~MeV and other libraries. The following are instructions on how to use a new nuclear data library in PHITS: #. For neutron libraries below 20 MeV. #. 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); #. 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; #. 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. #. For other libraries such as proton, deuteron, photo-nuclear reaction, high energy neutron libraries, etc. #. 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; #. 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; #. 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 ACE format can be downloaded from the link below. https://nucleardata.lanl.gov/ace/lib80x The package contains two address files, xsdir and xsdir\_2.0, but only xsdir is compatible with PHITS. After copying it into xsdir.jnd, if any data span two lines, replace + with ptable. .. _faq-e-photonuclearstats: Q1.7: Is there any effective way to improve the statistics of particles such as neutrons and radionuclides produced by photo-nuclear reactions? A1.7: By using the pnimul parameter, photonuclear reactions can be made more likely than other reactions such as Compton scattering. For example, when pnimul=2.0, the probability of a photonuclear reaction is doubled, while the weights of particles generated by the photonuclear reaction are reduced to one-half. Because this changes particle weights, it should not be used when event-by-event information is needed. Also, if pnimul is set too large, for example above 100, the behaviors of photons and electrons may be distorted. Therefore, when using this parameter, please make sure that photon and electron quantities such as fluxes and doses do not change significantly. Questions related to errors occurred in compiling or executing PHITS ==================================================================== .. _faq-e-compileerror: Q2.1: I got an error in compiling PHITS. How can I correct this to finish compiling? 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 free of charge as explained in ``phits/document/OneAPI-Fortran-manual.pdf``. Intel Fortran is recommended because PHITS compiled by Intel Fortran is much faster than that by gfortran. See PHITS manual "10 Compilation of PHITS" for further details. .. _faq-e-segfault: 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 \$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. .. _faq-e-inflerror: Q2.3: An error occurred when I tried to use infl: in my PHITS input file. A2.3: When PHITS is executed directly from the executable file without using a batch file (``phits.bat``) or a script file (``phits.sh``), the first line of the input file must be written as ``file=input-file-name`` in order to use the infl: command. Alternatively, you may prepare another file and write ``file=regular-PHITS-input-file-name`` in its first line, and then execute PHITS using that file. .. _faq-e-linuxnewline: Q2.4: An error occurred when I tries to execute PHITS on a Linux console, but I can execute it on Windows using the same input file. A2.4: This error could have many causes, but the most likely one is a difference in the line endings between Linux and Windows. If the input file is prepared in a Windows computer and transferred to a Linux system using FTP software, the status of the transfer mode must be checked, i.e., ASCII mode must be selected in the FTP software. .. _faq-e-cygwin: Q2.5: Can PHITS be executed on Cygwin? A2.5: Yes. Please refer to the Cygwin option in the PHITS makefile. However, we have not confirmed execution with the latest version. .. _faq-e-ifxorgfortran: Q2.6: Which is more suitable for compiling PHITS, Intel Fortran (ifx) or gfortran? A2.6: We basically recommend using Intel Fortran because it is faster. However, on Mac systems Intel Fortran cannot be used, so gfortran is required. .. _faq-e-mpiopenmp: Q2.7: How should the distributed memory parallel computing (MPI) or shared memory parallel computing (OpenMP) be set depending on the situation? A2.7: Calculation using MPI is generally faster than calculation using OpenMP if the MPI protocol is installed in the computer. However, because the protocol is not generally pre-installed in Windows or Mac OS systems as a default setting, we recommend the use of OpenMP for executable files. To perform PHITS calculation on huge memories such as high energy nuclear data files or voxel phantoms, the hybrid MPI-OpenMP setting must be used to avoid the possible memory shortages that could occur if only MPI were to be used. In the hybrid setting, the number of MPI processes should be increased, but only up to the point at which the used memory does not overflow the capacity of the computer. Note that PHITS uses a number of CPU cores appropriate to the number of OpenMP processes to control the MPI processes. For example, to set the number of OpenMP processes to eight on a computer with 128 CPU cores, the maximum number of MPI processes can be specified as 128/8-1 = 15. .. _faq-e-dchainfile: Q2.8: When running DCHAIN, an error such as "The specified file cannot be found" is displayed. A2.8: If the DCHAIN input file or the PHITS input file containing the infl: command is placed in a folder whose name includes full-width (double-byte) characters, it will not work properly. In that case, please change the folder name to use only half-width (single-byte) characters. .. _faq-e-lostparticle: Q2.9: I got many warning messages about lost particles. What should I do? A2.9: 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. #. 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. #. 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 ``phits/lecture/advanced/voxel`` for more details. #. 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 set [importance], please try to increase deltb, which is a tiny travel distance used to avoid particle splitting exactly on region boundaries 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. .. _faq-e-libiomp5: Q2.10: I fail to execute PHITS with OpenMP parallelization in Linux. The library libiomp5.so is required. A2.10: 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 Ubuntu case, you can install the library by .. code-block:: console 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 .. code-block:: console cd /usr/lib/x86_64-linux-gnu/ and make a symbolic link to libiomp5.so .. code-block:: console sudo ln -s libomp.so.5 libiomp5.so With this, you should be able to execute PHITS with OpenMP parallelization. .. _faq-e-glibc234: Q2.11: PHITS execution fails in Linux with an error GLIBC\_2.34 not found. A2.11: 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 PHITS manual "10.3 Compilation on Linux OS" ). .. _faq-e-phitsbug: Q2.12: I encountered symptoms that are clearly PHITS bugs, such as abnormal termination and infinite loops of calculations. What should I do? A2.12: 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. In the case of infinite loops, please identify the random seed that reproduces the issue with one history by following the steps below: #. Open the batch.out file created when PHITS was hanging. #. Copy the line next initial random seed, for example: .. code-block:: console bitrseed = 1111111100000000100001111000001011001100011000101101000011001000 #. and paste it into the [parameters] section of your input file. #. Set idmprijk=1 in the [parameters] section. #. Run PHITS again with the revised input file. #. Copy the bitrseed written in the rijkdmp.inp file (or rijkdmp***.inp for MPI parallel calculation) and paste it into the [parameters] section. #. Run PHITS again and check whether PHITS hangs again with the first history. .. _faq-e-crossreferencingcells: Q2.13: I get the error message "There is a possibility of cross referencing cells Please check the cells using #". What is the cause of this? A2.13: Two possible causes can be considered. One is that the regions excluded by # overlap each other, as in the example below: .. code-block:: console 1 0 -10 #2 2 0 -11 #1 Another cause is that you are using too many # in the definition of a single cell, or that too many regions are being excluded by #all. When you exclude regions using #, PHITS internally expands them into expressions with surface numbers and allocates memory. The more complicated the definition of the regions excluded by # becomes, the more likely this error is to occur. In addition, excessive use of # can also slow down the calculation. Therefore, if you need to use roughly more than 20 # in a single region, we recommend splitting the region into multiple regions so that the number of # used in each region is reduced. Questions related to Tallies ================================================== .. _faq-e-heatdepositdiff: Q3.1: What is the difference between the [t-heat] and the [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. .. _faq-e-ionfluencediff: Q3.2: The ion fluence calculated by [t-track] or [t-cross] is different from that in older versions. A3.2: Since Version 3.36, the default energy unit for tally outputs of ions has been changed, and the default value of **iMeVperN** is now 1 (MeV/n). Therefore, when you inspect energy-dependent results in **[t-track]** or **[t-cross]**, the interpretation of the horizontal axis and the unit may differ even if you use the same input as in older versions. If you want to compare with older versions or keep the results in the conventional MeV notation, explicitly set **iMeVperN=0** in **[parameters]**. .. _faq-e-letsedstrange: Q3.3: Results obtained by [T-LET] and/or [T-SED] tally are strange. A3.3: When specifying the material for LET calculation using letmat, if that material is used in the PHITS geometry, the density is taken from the value used in the geometry. For example, if you want to calculate the LET distribution for energy deposition in water vapor as a function of LET in liquid water (1 :math:`{\rm g/cm}^3`), you need to define two water materials in the [material] section, using one in the PHITS geometry and the other for letmat. The density of the material used for letmat should be specified by absolute material density values. For example, for water with a density of 1 :math:`{\rm g/cm}^3`, set H -0.1118983441 O -0.8881016559. For further details, please refer to the recommended input file ParticleTherapy. Also, in the case of [t-let], if the LET mesh width is set too fine, the results may become jagged, so please avoid using too fine a mesh width, roughly finer than about 10 meshes per decade. .. _faq-e-tallyerror: Q3.4: How can the statistical uncertainty be estimated from the tally output? A3.4: In Version 2.50 and later the standard deviations or standard errors are correctly output in the tally results. See PHITS manual "5.2.2 Number of history and Bank" for details. .. _faq-e-dumpparallel: Q3.5: Can the dump function be used when executing PHITS in distributed memory parallel computing? A3.5: This is possible from version 2.30 onward. Please ask the PHITS office for more information on its detailed usage. .. _faq-e-regxyzmeshdiff: Q3.6: Tally results in boxes obtained using mesh=reg and mesh=xyz are inconsistent with each other. A3.6: PHITS automatically calculates the volume of tally regions only in the cases of mesh=xyz or r-z. Thus, if mesh=reg is set and the [volume] section is not specified, the volume of the tally region is assumed to be 1 :math:`{\rm cm^3}` . .. _faq-e-depositoverincident: Q3.7: Why do some events deposit energies greater than the incident energy when using [t-deposit] with the output=deposit option. A3.7: When exothermic nuclear reactions occur, 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=t0 based on the output of the algorithm for onsidering the energy straggling of charged particles in PHITS. In such case, it is necessary to set mesh=reg in [t-deposit] and define cells corresponding to each xyz or r-z mesh in the [cell] section. .. _faq-e-switchxzaxis: 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: .. code-block:: console trcl = 0 0 0 0 0 1 0 1 0 1 0 x-txt = x [cm] y-txt = z [cm] Then, you will see eps file rotated by 90 degree. .. _faq-e-manytalliesslow: Q3.9: Computational time becomes longer when I set up many tallies in my input file. 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. .. _faq-e-sumovererror: Q3.10: Is it possible to easily output the statistical error of the sum-over data? A3.10: In Version 3.35 and later this error is output in the tally results. .. _faq-e-stdcutmesh: 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. .. _faq-e-mcnptally: Q3.12: I would like to know the PHITS tallies corresponding to MCNP ones. A3.12: The corresponding PHITS tallies are as follows. - 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** .. _faq-e-crossmeshdiff: 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. A3.13: Surface area must be defined in [t-cross] with mesh=reg, otherwise the area is always assumed to be 1.0 :math:`{\rm /cm^2}` . 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. Questions related to source generation ================================================== .. _faq-e-isotropicsourcenorm: Q4.1: How should PHITS outputs be normalized when using an isotropic source (s-type=9, dir=-all)? A4.1: The isotropic source generated by PHITS is defined so that the fluence inside the specified sphere becomes :math:`1/\pi/r_1^2`, where :math:`r_1` is the inner radius of the sphere. Therefore, to convert the tally output (/source) to unit fluence, multiply the result by :math:`\pi r_1^2`. Note also that the generation of an isotropic source uses weighted sampling, so it is not suitable for event-by-event calculations such as detector response calculations. If you need such calculations, use dir=iso instead. .. _faq-e-sourceshift: Q4.2: What should be done if the source region recognized by PHITS is shifted from the intended region? A4.2: When defining a surface source or a point source, if the source surface or point exactly coincides with a surface used in the cell definition, PHITS may misidentify the source region. To avoid this problem, define the source so that it is slightly shifted from the surfaces used in the cell definition. A similar issue can also occur when a beam is generated exactly parallel to a specific surface. .. _faq-e-advantgsb: Q4.3: Is it possible to use the source energy spectrum bias function (SB card in MCNP) created by ADVANTG in PHITS? A4.3: Yes, it is possible. As shown in the example below, you must define the source energy spectrum using **e-type=4**, and then specify the relative number of particles to be generated from each energy bin using **p-type**. .. code-block:: console e-type=4 ne = 3 0.0 2.0 1.0 1.5 2.0 1.0 3 p-type=1 1.0 2.0 3.0 .. _faq-e-spontfission: Q4.4: When simulating spontaneous fission, which is preferable to use: the ispfs option or an RI source (e-type = 28 or 29 with proj = neutron)? A4.4: It depends on the purpose. If you need correlations among multiple neutrons emitted in a single spontaneous-fission event (e.g., for calculating a detector response function), you should set ispfs = 1 so that multiple neutrons are generated simultaneously within one history. On the other hand, if the absolute activity (Bq) is known and you want to output tally results per unit time (second), or if you want to calculate contributions from other radiation types such as gamma rays and alpha particles at the same time, using e-type is more convenient. Also, note that the neutron energy spectrum is sampled from the Watt distribution for the ispfs option, whereas for e-type it is sampled from the group-wise data stored in DECDC. Therefore, if you wish to reproduce a smooth neutron energy spectrum, we encourage you to use the ispfs option. Questions related to PHIG-3D ================================================== .. _faq-e-vcomp140: 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 from website below. https://www.microsoft.com/en-US/download/details.aspx?id=53840 If this cannot resolve the above error, please contact the phits office. Other questions ================================================== .. _faq-e-commercialuse: 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. .. _faq-e-unhandledphysics: 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 in PHITS manual "Appendix A List of physical processes that cannot be handled by PHITS" . .. _faq-e-installerdeleted: 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. .. _faq-e-techquestions: Q6.4: Where should I ask technical questions about PHITS? A6.4: Please first try the AI trained specifically for PHITS (https://x.gd/WAynQ). If your issue is not resolved there, please ask your question either on the PHITS forum (https://meteor.nucl.kyushu-u.ac.jp/phitsforum/) or via the official PHITS contact page (https://phits.jaea.go.jp/contact).