# Plotfiles and other output

The following inputs must be preceded by the prefix `mfix` and control frequency and naming of plotfile generation as well as whether the EB geometry or level set should be written, and if the particles should be written out in Ascii format (for debugging).

| Description | Type | Default
--- | --- | --- | ---
plot_int | Frequency of plotfile output; if -1 then no plotfiles will be written at this frequency | Int | -1
plot_per_approx | Time period of plotfile output (approximate); does not modify dt if -1 then no plotfiles will be written at this frequency | Real | -1
plotfile_on_restart | Write a plotfile when we restart (only used if plot_int>0) | Bool | false
plot_file | Prefix to use for plotfile output | String | plt
par_ascii_file | Prefix to use for ascii particle output | String | par
par_ascii_int | Frequency of ascii particle output; if -1 then no particle ascii files will be written | Int | -1
par_ascii_per_approx | Time period of the ascii particle output (approximate); if -1 then particle ascii files will not be written at this frequency | Real | -1
file_digits | Number of digits to use in plotfile (plt[0-9]+) and checkpoint (chk[0-9]+) filenames. | Int | 5
ascent_int | Frequency of ascent pipeline; if -1 then ascent will not be called. | Int | -1
ascent_per_approx | Time period of the ascent pipeline (approximate); if -1 then ascent will not be called. | Real | -1

The following inputs must be preceded by the prefix `mfix` and control which variables will be written in plotfiles.

| Description | Type | Default
--- | --- | --- | ---
plt_regtest | Plot all variables (overrides all other plot flags) | Int | 0
plt_drag_p | Plot particle drag force | Int | 0
plt_ep_g | Plot fluid volume fraction | Int | 1
plt_gradp_g | Plot gradient of fluid pressure | Int | 0
plt_mu_g | Plot fluid molecular viscosity | Int | 0
plt_omega_p | Plot particle angular velocity | Int | 0
plt_p_g | Plot fluid pressure | Int | 0
plt_phase | Plot particle type | Int | 0
plt_radius | Plot particle radius | Int | 0
plt_ro_g | Plot fluid density | Int | 0
plt_ro_p | Plot particle density | Int | 0
plt_statwt | Plot particle (parcel) statistical weight | Int | 0
plt_T_g | Plot fluid temperature | Int | 0
plt_T_p | Plot particle temperature | Int | 0
plt_vel_g | Plot fluid velocity data | Int | 1
plt_vel_p | Plot particle velocity | Int | 1
plt_volfrac | Plot Eulerian grid volume fraction (from cut cells) | Int | 0
plt_vort | Plot vorticity | Int | 0

The following inputs must be preceded by the prefix `mfix` and control whether the EB geometry or level set should be written:

| Description | Type | Default
--- | --- | --- | ---
write_ls | Write a plotfile holding the level set and volfrac. If enabled, it will only be written once, after initialization or restart | Bool | false
write_eb_surface | Write out the EB geometry in vtp format. If enabled, it will only be written once, after initialization or restart | Bool | false
plt_geom | Write a plotfile holding the EB geometry data. If true, it will only be written once,after initialization or restart | Bool | false

Ascent has been integrated into MFIX-Exa for in situ visualization. For codes that have been built with Ascent support, the following input must be preceded by the prefix `ascent` and specifies the ascent actions for fluid and/or particles. The frequency which these are called is controlled by ascent_int or ascent_per_approx, see above. Note that if an ascent pipeline is being included in a GPU build/run, then you must enable managed memory, i.e., set amrex.the_arena_is_managed = true.

| Description | Type | Default
--- | --- | --- | ---
actions | yaml file of the ascent actions (ex. ascent_actions.yaml). If no file name is provided, then calls to Ascent are skipped. | String |

The following inputs must be preceded by the prefix `mfix.solids` and allow to write additional plotfiles which contain only solids variables in specific regions at fixed timesteps or approximated simulation times. All these parameters are user-defined.

| Description | Type | Default
--- | --- | --- | ---
regions | Specify regions that will be used for plotfiles | String |
[region] | Specify which solids phases will be plotted | String |
[region].plot_int | Specify timestep frequency for plotting the file | Int | 0
[region].plot_per_approx | Specify time interval frequency for plotting the file | Real | 0
[region].plt_regtest | Plot all variables (overrides all other plot flags) | Int | 0
[region].plt_cp_s | Plot particle specific heat coefficient | Int | 0
[region].plt_drag_p | Plot particle drag force | Int | 0
[region].plt_h_s_txfr | Plot particle interphase enthalpy transfer | Int | 0
[region].plt_mass | Plot particle mass | Int | 0
[region].plt_mass_sn_txfr | Plot particle interphase mass transfer | Int | 0
[region].plt_omega_p | Plot particle angular velocity | Int | 0
[region].plt_omoi | Plot inverse of particle momentum of inertia | Int | 0
[region].plt_phase | Plot particle phase | Int | 0
[region].plt_radius | Plot particle radius | Int | 0
[region].plt_ro_p | Plot particle density | Int | 0
[region].plt_state | Plot particle state | Int | 0
[region].plt_statwt | Plot particle statistical weight | Int | 0
[region].plt_T_p | Plot particle temperature | Int | 0
[region].plt_vel_p | Plot particle velocity | Int | 0
[region].plt_vel_s_txfr | Plot particle interphase velocity transfer | Int | 0
[region].plt_volume | Plot particle volume | Int | 0
[region].plt_X_s | Plot particle species mass fractions | Int | 0

For each region with name [region] specified in the inputs, it will be saved a plotfile with name “partsXXXXX_[region]”, where XXXXX stands for the timestep number.

Below is an example for specifying the inputs to plot solids data in a given region.

    mfix.solids.regions = my_region

    mfix.solids.my_region.plot_int = 10
    mfix.solids.my_region.plt_vel_p = 1