Monitors
Monitors capture data from a running simulation into file for plotting and analysis.
Monitor definition
Data (such as volume fraction, pressure, velocity, etc.) for a given
monitor region is written to a CSV file while the solver is running.
The following input is used to define monitors, preceded by the prefix mfix:
Description |
Type |
Default |
|
|---|---|---|---|
monitors |
Names of the monitors to be computed. |
Strings |
None |
Region selection
To define a monitor, a region must already be defined in the regions
inputs mfix.regions. A monitor region is a single point, plane, or volume.
Multiple regions cannot be combined for a monitor. The following input must be
preceded by the prefix mfix.monitors:
Description |
Type |
Default |
|
|---|---|---|---|
[monitor_name].region |
Specify the region in which the monitor will be computed. |
String |
None |
# regionA and regionB must be defined in the "regions" inputs section
mfix.monitors.my_monitor0.region = regionA
mfix.monitors.my_monitor1.region = regionB
Monitor data will be output to a file with name given by the input
plot_file, and the extension .csv is automatically added. The monitor
output file is in Comma Separated Value (CSV) format. The first line of the file
provides header information. The following inputs must be preceded by
the prefix mfix.monitors:
Description |
Type |
Default |
|
|---|---|---|---|
[monitor_name] |
Monitor type. |
String |
None |
[monitor_name].plot_file |
Name of the file for monitor output. |
String |
None |
[monitor_name].plot_int |
Interval in time steps for saving monitor data (0 to disable). |
Int |
0 |
[monitor_name].plot_per_approx |
Interval (approximate) in simulation time for saving
monitor data (0 to disable). Only one of |
Real |
0 |
[monitor_name].output.openmode |
Select open mode for the monitor output file. Options:
|
String |
app |
[monitor_name].output.setw |
Field width for output file. |
Int |
0 |
[monitor_name].output.setfill |
Fill character for output file. |
Char |
‘’ |
[monitor_name].output.setprecision |
Sets the decimal precision to be used to format floating-point values in the output file |
Int |
0 |
[monitor_name].output.format |
Sets the format flags. Options:
|
String |
“” |
mfix.monitors.my_monitor0.plot_file = monitor0_output
mfix.monitors.my_monitor0.plot_int = 10
mfix.monitors.my_monitor1.plot_file = monitor1_output
mfix.monitors.my_monitor1.plot_per_approx = 0.01
Monitor variables
The variables to be monitored can be specified in the inputs by including the
following input preceded by the prefix mfix.monitors:
Description |
Type |
Default |
|
|---|---|---|---|
[monitor_name].variables |
Define which variables are to be monitored by this monitor |
Strings |
None |
mfix.monitors = my_monitor0 my_monitor1
mfix.monitors.my_monitor0.variables = T_g vel_g p_g gp_y X_gk
mfix.monitors.my_monitor1.variables = density drag_y T_s txfr_vel_x
Eulerian monitors
Several different types of monitors are available. A monitor type applies an operator (for example a sum, an area integral or a volume integral) to the variable. The dimensionality of the region determines which operators are available.
The table below summarizes the nomenclature used to describe the monitor operators:
Symbol |
Description |
|---|---|
\(\phi_{ijk}\) |
Variable value at indexed cell |
\(\varepsilon_{ijk}\) |
Phase volume fraction at indexed cell |
\(\rho_{ijk}\) |
Phase density at indexed cell |
\(\vec{v}_{ijk}\) |
Phase velocity at indexed cell |
\(A_{ijk}\) |
Cross-sectional area of cell |
\(V_{ijk}\) |
Volume of indexed cell |
The following table lists all the fluid phase variables that can be monitored:
Description |
|
|---|---|
T_g |
fluid temperature |
X_gk |
fluid species mass fractions (monitor all the fluid species) |
X_gk_[species_name] |
fluid species_name mass fraction (only species species_name is monitored) |
chem_txfr_X_gk |
rate of mass transferred to the fluid phase due to heterogeneous chemical reactions (monitor all fluid species) |
chem_txfr_X_gk_[species_name] |
fluid species_name rate of mass transferred due to heterogeneous chemical reactions (only species species_name is monitored) |
chem_txfr_h |
rate of enthalpy transferred to the fluid phase due to heterogeneous chemical reactions |
chem_txfr_vel_[x|y|z] |
x, y, or z component of the rate of velocity transferred due to heterogeneous reactions |
chem_txfr_velocity |
rate of velocity transferred to the fluid phase due to heterogeneous chemical reactions (all three components) |
divtau |
divergence of the viscous stress tensor (all three components) |
divtau_[x|y|z] |
x, y, or z component of the divergence of the viscous stress tensor |
ep_g |
fluid volume fraction |
gp |
fluid pressure gradient (all three components) |
gp_[x|y|z] |
x, y, or z component of the fluid pressure gradient |
h_g |
fluid enthalpy |
ones |
value of \(\phi_{ijk}\) is set to 1 in each fluid cell |
p_g |
fluid pressure |
ro_g |
fluid density |
trac |
tracer |
txfr_beta |
drag coefficient |
txfr_gamma |
convection coefficient |
txfr_gammaTp |
convection coefficient multiplied by the solids temperature |
txfr_vel_[x|y|z] |
x, y, or z component of the interphase velocity transferred to the fluid |
txfr_velocity |
interphase velocity transferred to the fluid (all three components) |
vel_g |
fluid velocity (all three components) |
vel_g_[x|y|z] |
x, y, or z component of the fluid velocity |
vort |
fluid vorticity (all three components) |
vort[x|y|z] |
x, y, or z component of the fluid vorticity |
Uniform scalar field
The following table lists all the fluid phase space-uniform variables that can be monitored:
Description |
|
|---|---|
thermo_p_g |
fluid thermodynamic pressure |
For a uniform scalar field, the monitor data value is the value of the variable at current time:
- Uniform value
Eulerian::UniformScalarField::Value
Value of the uniform field quantity in the selected region.
\[\phi_{ijk}\]
Point region
For a point region, the monitor data value is the value of the variable at that point:
- Point value
Eulerian::PointRegion::Value
Value of the field quantity at the selected point.
\[\phi_{ijk}\]
Area or volume region
The following monitor types are valid for area and volume regions:
- Sum
Eulerian::AreaRegion::Sum
Eulerian::VolumeRegion::Sum
Sum of all values of the field quantity in the selected region.
\[\sum_{ijk}\phi_{ijk}\]- Min
Eulerian::AreaRegion::Min
Eulerian::VolumeRegion::Min
Minimum value of the field quantity in the selected region.
\[\min_{ijk} \phi_{ijk}\]- Max
Eulerian::AreaRegion::Max
Eulerian::VolumeRegion::Max
Maximum value of the field quantity in the selected region.
\[\max_{ijk} \phi_{ijk}\]- Average
Eulerian::AreaRegion::Average
Eulerian::VolumeRegion::Average
Average value of the field quantity in the selected region where \(N\) is the total number of observations (cells) in the selected region.
\[\phi_0 = \frac{\sum_{ijk} \phi_{ijk}}{N}\]- Standard deviation
Eulerian::AreaRegion::StandardDeviation
Eulerian::VolumeRegion::StandardDeviation
Standard deviation of the field quantity in the selected region where \(\phi_0\) is the average of the variable in the selected region.
\[\sigma_{\phi} = \sqrt{\frac{ \sum_{ijk} (\phi_{ijk}-\phi_{0})^2 }{N}}\]
Surface integrals
The following types are only valid for area regions:
- Area
Eulerian::SurfaceIntegral::Area
Area of selected region is computed by summing the areas of the facets that define the surface.
\[\int dA = \sum_{ijk} A_{ijk}\]- Area-weighted average
Eulerian::SurfaceIntegral::AreaWeightedAverage
Area-weighted average is computed by dividing the summation of the product of the selected variable and facet area by the total area of the region.
\[\frac{\int\phi dA}{A} = \frac{\sum_{ijk}{\phi_{ijk} A_{ijk}}}{\sum_{ijk}{A_{ijk}}}\]- Flow rate
Eulerian::SurfaceIntegral::FlowRate
Flow rate of a field variable through a surface is computed by summing the product of the phase volume fraction, density, the selected field variable, phase velocity normal to the facet \(v_n\), and the facet area.
\[\int\varepsilon\rho\phi{v_n}dA = \sum_{ijk}\varepsilon_{ijk}\rho_{ijk}\phi_{ijk} {v}_{n,ijk} A_{ijk}\]- Mass flow rate
Eulerian::SurfaceIntegral::MassFlowRate
Mass flow rate through a surface is computed by summing the product of the phase volume fraction, density, phase velocity normal to the facet \(v_n\), and the facet area.
\[\int\varepsilon\rho{v_n} dA = \sum_{ijk}\varepsilon_{ijk}\rho_{ijk}{v}_{n,ijk} A_{ijk}\]- Mass-weighted average
Eulerian::SurfaceIntegral::MassWeightedAverage
Mass flow rate through a surface is computed by summing the product of the phase volume fraction, density, phase velocity normal to the facet, and the facet area.
\[\frac{\int\varepsilon\rho\phi{v_n}dA}{\int\varepsilon\rho{v_n}dA} = \frac{\sum_{ijk}\varepsilon_{ijk}\rho_{ijk}\phi_{ijk} {v}_{n,ijk} A_{ijk}}{\sum_{ijk}\varepsilon_{ijk}\rho_{ijk} {v}_{n,ijk} A_{ijk}}\]- Volume flow rate
Eulerian::SurfaceIntegral::VolumeFlowRate
Volume flow rate through a surface is computed by summing the product of the phase volume fraction, phase velocity normal to the facet \(v_n\), and the facet area.
\[\int\varepsilon{v_n}dA = \sum_{ijk}\varepsilon_{ijk}{v}_{n,ijk} A_{ijk}\]
Volume integrals
The following types are only valid for volume regions:
- Volume
Eulerian::VolumeIntegral::Volume
Volume is computed by summing all of the cell volumes in the selected region.
\[\int dV = \sum_{ijk}{ V_{ijk}}\]- Volume integral
Eulerian::VolumeIntegral::VolumeIntegral
Volume integral is computed by summing the product of the selected field variable and the cell volume.
\[\int \phi dV = \sum_{ijk}{\phi_{ijk} V_{ijk}}\]- Volume-weighted average
Eulerian::VolumeIntegral::VolumeWeightedAverage
Volume-weighted average is computed by dividing the summation of the product of the selected field variable and cell volume by the sum of the cell volumes.
\[\frac{\int\phi dV}{V} = \frac{\sum_{ijk}{\phi_{ijk} V_{ijk}}}{\sum_{ijk}{V_{ijk}}}\]- Mass-weighted integral
Eulerian::VolumeIntegral::MassWeightedIntegral
Mass-weighted integral is computed by summing the product of phase volume fraction, density, selected field variable, and cell volume.
\[\int \varepsilon\rho\phi dV = \sum_{ijk}\varepsilon_{ijk}\rho_{ijk}\phi_{ijk} V_{ijk}\]- Mass-weighted average
Eulerian::VolumeIntegral::MassWeightedAverage
Mass-weighted average is computed by dividing the sum of the product of phase volume fraction, density, selected field variable, and cell volume by the summation of the product of the phase volume fraction, density, and cell volume.
\[\frac{\int\phi\rho\varepsilon dV}{\int\rho\varepsilon dV} = \frac{\sum_{ijk}\varepsilon_{ijk}\rho_{ijk}\phi_{ijk} V_{ijk}}{\sum_{ijk}\varepsilon_{ijk}\rho_{ijk} V_{ijk}}\]
Lagrangian monitors
Several different types of monitors are available. A monitor type applies an operator (for example, a sum, an area integral or a volume integral) to the variable. The dimensionality of the region determines which operators are available.
The table below summarizes the nomenclature used to describe the monitor operators:
Symbol |
Description |
|---|---|
\(\phi_p\) |
Variable value of the indexed particle |
\(m_p\) |
Mass of the indexed particle |
\(V_p\) |
Volume of the indexed particle |
\(\mathcal{w}_p\) |
Statistical weight of the indexed particle [1] |
The following table lists all the solids phase variables that can be monitored:
Description |
|
|---|---|
cp_s |
particle specific heat coefficient |
cpu |
particle CPU |
density |
particle density |
drag |
particle drag (all three components) |
drag_[x|y|z] |
x, y, or z component of the particle drag |
dragcoeff |
particle drag coefficient |
id |
particle id |
k_energy |
particle kinetic energy |
mass |
particle mass |
omega |
particle angular velocity (all three components) |
omega_[x|y|z] |
x, y, or z component of the particle angular velocity |
oneOverI |
inverse of particle moment of inertia |
ones |
value of \(\phi_p\) is set to 1 for each solid particle |
phase |
particle phase |
pos_[x|y|z] |
x, y, or z component of the particle position |
position |
particle position (all three components) |
radius |
particle radius |
statwt |
particle statistical weight |
T_s |
particle temperature |
txfr_X_sn |
rate of mass transferred due to heterogeneous chemical reactions (for all the species) |
txfr_X_sn_[species_name] |
solids species_name rate of transfer due to heterogeneous reactions (only species species_name is monitored) |
txfr_h |
rate of enthalpy transferred due to heterogeneous chemical reactions |
txfr_vel_[x|y|z] |
x, y, or z components of the transferred velocity due to heterogeneous reactions |
txfr_velocity |
rate of velocity transferred to the fluid phase due to heterogeneous chemical reactions (all three components) |
vel_[x|y|z] |
x, y, or z component of the particle velocity |
velocity |
particle velocity (all three components) |
volume |
particle volume |
X_sn |
particle species mass fractions (for all the solids species) |
X_sn_[species_name] |
solids species_name fraction (only species species_name is monitored) |
General particle properties
General particle properties can be obtained from area (plane) and volume regions. For area regions, all particles in Eulerian cells that intersect the plane are used in evaluating the average.
- Sum
Lagrangian::GeneralProperty::Sum
Sum of particle property \(\phi_p\) in the selected region is obtained as:
\[\sum_p w_p \phi_p\]
Mass-weighted sum
Lagrangian::GeneralProperty::MassWeightedSum
Mass-weighted sum of particle property \(\phi_p\) in the selected region is obtained as:
\[\sum_p w_p m_p \phi_p\]
- Min
Lagrangian::GeneralProperty::Min
Minimum value of particle property \(\phi_p\) is the selected region is obtained as:
\[\min_p \phi_p\]- Max
Lagrangian::GeneralProperty::Max
Maximum value of particle property \(\phi_p\) is the selected region is obtained as:
\[\max_p \phi_p\]
Averaged particle properties
Particle properties can be averaged over area (plane) and volume regions. For area regions, all particles in Eulerian cells that intersect the plane are used in evaluating the average.
- Average
Lagrangian::AveragedProperty::Average
The average value of particle property \(\phi_p\) in the selected region is calculated using the following expression. For DEM simulations, the statistical weight of a particle, \(w_p\), is one such that the sum of the weights is the total number of observations in the selected region.
\[\bar{\phi} = \frac{\sum_p w_p \phi_p}{\sum_p w_p}\]- Standard deviation
Lagrangian::AveragedProperty::StandardDeviation
Standard deviation of particle property \(phi_p\) in the selected region is calculated using the following expression. \(\bar{\phi}\) is the averaged variable in the selected region.
\[\sigma_{\phi} = \sqrt{\frac{ \sum_p w_p (\phi_p-\bar{\phi})^2 }{\sum_p w_p}}\]- Mass-weighted average
Lagrangian::AveragedProperty::MassWeightedAverage
Mass-weighted average value of particle property \(\phi_p\) in the selected region is obtained as:
\[\bar{\phi}_m = \frac{\sum_{p} w_p m_p \phi_p}{\sum_p w_p m_p }\]- Volume-weighted average
Lagrangian::AveragedProperty::VolumeWeightedAverage
Volume-weighted average value of particle property \(\phi_p\) in the selected region is obtained as:
\[\bar{\phi}_v = \frac{\sum_{p} w_p V_p \phi_p}{\sum_p w_p V_p}\]
Flow rates
For Lagrangian monitors of type FlowRate, the region of definition must be
3-dimensional. Only particles inside this volume are considered. Additionally,
a flow plane must be specified. For particles in the region of definition, their
positions are extrapolated based on current velocity to determine if they will cross
the specified flow plane in the next time step.
To specify the flow plane, the following input for a monitor [monitor_name] of
type FlowRate can be used, preceded by the prefix mfix.monitors:
Description |
Type |
Default |
|
|---|---|---|---|
[monitor_name].plane |
Specifies the plane through which the flow rate of particles in the monitoring region will be computed. |
String |
None |
- Flow rate
Lagrangian::FlowRate::FlowRate
Net flow rate of a general particle property \(\phi_p\) is computed by summing the properties of the set of particles projected to have crossed the flow plane., \(\Gamma\).
\[\sum_{p \in \Gamma} w_p \phi_p \frac{v_p}{\left|v_p\right|}\]- Mass-weighted flow rate
Lagrangian::FlowRate::MassWeightedFlowRate
Net mass-weighted flow rate is the sum of the general particle property \(\phi_p\) multiplied by the particle mass, \(m_p\) of the set of particles projected to have crossed the flow plane, \(\Gamma\).
\[\sum_{p \in \Gamma} w_p m_p \phi_p \frac{v_p}{\left|v_p\right|}\]- Volume-weighted flow rate
Lagrangian::FlowRate::VolumeWeightedFlowRate
Net volume-weighted flow rate is the sum of the general particle property \(\phi_p\) multiplied by the particle volume, \(V_p\) of the set of particles projected to have crossed the flow plane, \(\Gamma\).
\[\sum_{p \in \Gamma}\phi_p w_p V_p \frac{v_p}{\left|v_p\right|}\]
mfix.monitors = my_monitor0 my_monitor1
mfix.monitors.my_monitor0 = Eulerian::VolumeIntegral::MassWeightedIntegral
mfix.monitors.my_monitor1 = Lagrangian::Average::VolumeWeightedAverage