.. _[t-volume]: [ T-Volume ] section ================================================== When you set **mesh=reg** in tally sections, you have to give volumes of each cell to estimate results in the unit of (/volume). PHITS has a function of automatic calculation to obtain the volumes using **[t-volume]**. In this function, PHITS calculates the volumes by performing a Monte Carlo integration with setting the material of each cell to be void and a special source region. **[t-volume]** is effective only when setting **icntl=14** in the **[parameters]** section. Only one **[t-volume]** section can be set in one input file. The format of parameters in **[t-volume]** is as follows. .. rst-class:: no-caption-number .. list-table:: **mesh** :header-rows: 0 * - value - explanation * - **reg** - Mesh type. Only **reg** can be set. A mesh type subsection is required below this option. .. rst-class:: no-caption-number .. list-table:: **file** :header-rows: 0 * - value - explanation * - ``file name`` - Define file names. .. rst-class:: no-caption-number .. list-table:: **resfile** :header-rows: 0 * - value - explanation * - (omitted, D=file) - Define a file name of the past tally in the restart calculation. .. rst-class:: no-caption-number .. list-table:: **r-out** :header-rows: 0 * - value - explanation * - (omitted, D=0.0) - Radius of the outer void [cm]. .. include:: ./commontally/title.rst .. rst-class:: no-caption-number .. list-table:: **method** :header-rows: 0 * - value - explanation * - (omitted, D=0) - Option for Monte Carlo integration. **0**: By particle track lengths. **1**: By source points. .. rst-class:: no-caption-number .. list-table:: **s-type** :header-rows: 0 * - value - explanation * - **1, 2** - Source type for volume calculation. **1**: Sphere source. The coordinates of the sphere, **x0**, **y0**, **z0**, and its radius, **r0**, have to be defined. **2**: Rectangular solid source. The coordinates **x0**, **x1**, **y0**, **y1**, **z0**, and **z1** have to be defined. .. rst-class:: no-caption-number .. list-table:: **x0, y0, z0** :header-rows: 0 * - value - explanation * - - Coordinates. .. rst-class:: no-caption-number .. list-table:: **x1, y1, z1** :header-rows: 0 * - value - explanation * - - Coordinates. .. rst-class:: no-caption-number .. list-table:: **r0** :header-rows: 0 * - value - explanation * - - Radius. .. include:: ./commontally/stdcut.rst The source type in the volume calculation is specified by **s-type**. In **s-type=1**, the source generates on a sphere of the center coordinates **(x0,y0,z0)** and the radius **r0** with the inward direction. This is the same condition as **dir=-all** in **s-type=9** of the **[source]** section. In **s-type=2**, the source uniformly generates on surfaces of a rectangular solid which are defined by 6 planes, **x=x0**, **x1**, **y=y0**, **y1**, **z=z0**, and **z1**. Its direction is inward. In either case, you have to set the source region to be large so as to cover all specified cells. Attention: the boundaries in **[t-volume]** must be smaller than the boundaries of the geometry. There must not be any 'outside' cells, **-1**, inside these boundaries. When executing PHITS using **[t-volume]**, the information on the source used in the volume calculation is output in **[source]** of the summary file **file(6)**, default ``phits.out``. **[source]** written in the input file of PHITS is not output in the summary file. An example of **[t-volume]** is as follows. .. code-block:: text :caption: Example of **[t-volume]** 1: [ T - V o l u m e ] 2: mesh = reg # mesh type is region-wise 3: reg = 101 102 103 104 105 4: file = volume.out # file name of output for [volume] 5: s-type = 1 # 1: Sphere source, 2: Rectangular source 6: x0 = 0.0 # (D=0.0) x of sphere center 7: y0 = 0.0 # (D=0.0) y of sphere center 8: z0 = 0.0 # (D=0.0) z of sphere center 9: r0 = 50.0 # radius of sphere **[t-volume]** section should have the setting of **mesh=reg**. The cell numbers should be specified after **reg=**. By setting **s-type** and the related parameters such as **x0**, you can define the special source region for the volume calculation. Note that the source region should be set to cover all cells specified in **reg=**, otherwise the calculated volumes would be wrong. On the contrary, if you set an extremely large source region, the statistical uncertainties of the calculated results would be large. The obtained volumes are output in a file named by **file=**. The format of the output file is as follows. .. code-block:: text :caption: Output format of **[t-volume]** [ T - V o l u m e ] off mesh = reg # mesh type is region-wise .... .... .... .... .... .... .... .... [ V o l u m e ] non reg vol non 1 101 5.0370E+02 0.2909 2 102 2.4727E+03 0.1634 .... .... .... .... .... .... .... .... # Information for Restart Calculation .... .... .... .... .... .... .... .... Because the volumes are output in the format of the **[volume]** section, the results can be used in the main calculation with **icntl=0** by the **infl** command. Here, values of the last column in **[volume]** are statistical uncertainties, relative values. If the uncertainties are large, you can perform the restart calculation by adding **istdev=-1** or **-2** in the **[parameters]** section, because the output file of **[t-volume]** has information for the restart mode.