2.1. Installation and execution on Windows OS

2.1.1. Installation on Windows OS

  1. If you have an older version of PHITS, please make a backup of your edited files and install the new version in the same folder (overwrite installation is recommended). During the installation, only the address file (xsdir.jnd) can be selected to be overwritten or not, and if overwritten, a backup of the old file is automatically created.

  2. Double-click phits_win_setup.exe in the win folder of the PHITS package.

  3. Specify the installation folder (c:/phits is recommended).

  4. Select the required software. We encourage you to select New Installation if you are installing PHITS for the first time on your PC, or PHITS Upgrade if you are updating the software (see Recommended software below).

  5. Installation is finished.

  6. To check whether PHITS has been installed properly, right-click /phits/lecture/basic/lec01/lec01.inp and select send toPHITS.

  7. Check whether xz_track_all.eps is created or not.

(Note) The names of the installation files and folders must contain no space characters; otherwise installation and execution will fail.

The installer phits_win_setup.exe performs the following processes:

  1. If an editor is selected for installation, install that editor and associate it with *.inp and *.out files. Also, modify the configuration file so that PHITS and PHIG-3D can be executed directly from that editor.

  2. If Ghostscript is selected, run the Ghostscript installer.

  3. If SumatraPDF is selected, run the SumatraPDF installer.

  4. Install Visual C++ Redistributable Package required to run PHIG-3D.

  5. Extract phits.7z to the specified installation folder.

  6. Add the folder phits/bin (which contains the PHITS executable files) to the user environment variable PATH.

  7. Add the environment variable PHITSPATH (this eliminates the need to specify file(1) in the input file).

  8. Create shortcuts of four batch files - phits.bat, angel.bat, and phig3d.bat in the phits/bin folder, and dchain.bat in the phits/dchain-sp/bin folder - to the sendto folder.

  9. Copy app/7za.exe to the phits/bin folder for preparing the installation of JENDL-5.

2.1.2. Execution on Windows OS

The PHITS code can be executed either via File Explorer (previously known as Windows Explorer) using send toPHITS or via Command Prompt.

2.1.2.1. Executing PHITS via the Windows send to Function

Right-click the PHITS input file in File Explorer and select send toPHITS. As the shortcut for phits.bat in the phits/bin folder has been created during installation, the PHITS code will be initiated and start simulations.

2.1.2.2. Executing PHITS from the Command Line

PHITS can be executed by command lines in Command Prompt (also known as cmd.exe or cmd), the command-line interpreter on Windows operating systems as shown in Fig. 2.1.1.

command prompt

Fig. 2.1.1 Example of how to execute PHITS via Command Prompt.

To execute PHITS, use the cd command to go to the directory of where the input is, and then type the following commands in the terminal:

phits.bat phits.inp

where phits.inp is your input file name (e.g., lec01.inp). As command histories can be retrieved by pressing the ↑ key in the terminal, it is convenient to use the same input file name when you want to repeatedly execute PHITS.