Reports
=======

MFIX-Exa provides several options for reporting data from the solver.

Particle size distribution
--------------------------

The particle size distribution (PSD) can be reported for different regions in the model. This feature requires
a region already defined in the regions inputs, and only volume regions are valid for PSD reports.
Each report must be associated with a single region; combining multiple regions in one report is not supported.

The following inputs are defined using the prefix ``mfix.reports``:

+--------------------+------------------------------------------------------+-------------+-----------+
|                    | Description                                          |   Type      | Default   |
+====================+======================================================+=============+===========+
| diameter           | Names of the PSD reports                             |  Strings    | None      |
+--------------------+------------------------------------------------------+-------------+-----------+


The following inputs are defined using the prefix ``mfix.reports.diameter.[report_name]``:

+--------------------+------------------------------------------------------+-------------+-----------+
|                    | Description                                          |   Type      | Default   |
+====================+======================================================+=============+===========+
| region             | Region to compute the size distribution              |  String     | None      |
+--------------------+------------------------------------------------------+-------------+-----------+
| int                | Number of time steps between report outputs.         |  Int        | None      |
|                    | Cannot be used with ``per_approx``.                  |             |           |
+--------------------+------------------------------------------------------+-------------+-----------+
| per_approx         | Simulation time (in seconds) between report outputs. |  Real       | None      |
|                    | Cannot be used with ``int``.                         |             |           |
+--------------------+------------------------------------------------------+-------------+-----------+
| bins               | Number of bins in PSD discretization                 |  Int        | None      |
+--------------------+------------------------------------------------------+-------------+-----------+
| min                | Minimum particle size included in discretized PSD    |  Real       | None      |
+--------------------+------------------------------------------------------+-------------+-----------+
| max                | Maximum particle size included in discretized PSD    |  Real       | None      |
+--------------------+------------------------------------------------------+-------------+-----------+


A sample :ref:`inputs snippet<inputs_psd_report_ex>` for outputting the particle size distribution
is given below. Two regions are created that span the left and right sides of the domain, and used
to create two reports. The ``left-side`` report is a PSD consisting of 32 bins between 30-3000 microns
that is output every 50 time steps. The ``right-side`` report is a PSD consisting of 64 bins between
30-3000 microns that is output every 0.5 seconds of modeled time.

.. _inputs_psd_report_ex:

.. code-block:: bash
   :caption: Snippet of inputs for particle size distribution reports.

   # Define two regions for collecting report data
   # -------------------------------------------------------------
   mfix.regions = ... left right

   regions.left.lo  = 0.00  0.00  0.00
   regions.left.hi  = 0.05  0.10  0.10

   regions.right.lo  = 0.05  0.00  0.00
   regions.right.hi  = 0.10  0.10  0.10

   # Define two particle size distribution reports
   # -------------------------------------------------------------
   mfix.reports.diameter = left-side  right-side

   mfix.reports.diameter.left-side.region  = left

   mfix.reports.diameter.left-side.int  =    50
   mfix.reports.diameter.left-side.bins =    32
   mfix.reports.diameter.left-side.min  =    30.0e-6
   mfix.reports.diameter.left-side.max  =  3000.0e-6

   mfix.reports.diameter.right-side.region  = right

   mfix.reports.diameter.right-side.per_approx =  0.5
   mfix.reports.diameter.right-side.bins =       64
   mfix.reports.diameter.right-side.min  =       30.0e-6
   mfix.reports.diameter.right-side.max  =     3000.0e-6
