Post-processing#

This subsection controls the post-processing other than the forces and torque on the boundary conditions. Default values are

subsection post-processing
  set verbosity                        = quiet
  set output frequency                 = 1

  #---------------------------------------------------
  # Fluid dynamic post-processing
  #---------------------------------------------------
  # Kinetic energy calculation
  set calculate kinetic energy         = false
  set kinetic energy name              = kinetic_energy

  # Average velocities calculation
  set calculate average velocities      = false
  set initial time for average velocity = 0.0

  # Average temperature calculation
  set calculate average temperature and heat flux        = false
  set initial time for average temperature and heat flux = 0.0

  # Pressure drop calculation
  set calculate pressure drop          = false
  set pressure drop name               = pressure_drop
  set inlet boundary id                = 0
  set outlet boundary id               = 1

  # Flow rate at boundaries calculation
  set calculate flow rate              = false
  set flow rate name                   = flow_rate

  # Enstrophy calculation
  set calculate enstrophy              = false
  set enstrophy name                   = enstrophy

  # Viscous dissipation
  set calculate viscous dissipation    = false
  set viscous dissipation name         = viscous_dissipation

  # Pressure power
  set calculate pressure power         = false
  set pressure power name              = pressure_power

  # Others
  set smoothed output fields           = false

  #---------------------------------------------------
  # Physical properties post-processing
  #---------------------------------------------------
  set calculate apparent viscosity     = false
  set apparent viscosity name          = apparent_viscosity

  #---------------------------------------------------
  # Multiphysics post-processing
  #---------------------------------------------------
  # Tracer postprocessing
  set calculate tracer statistics      = false
  set tracer statistics name           = tracer_statistics
  set calculate tracer flow rate       = false
  set tracer flow rate name            = tracer_flow_rate

  # Thermal postprocessing
  set postprocessed fluid              = both
  set calculate temperature statistics = false
  set temperature statistics name      = temperature_statistics
  set calculate heat flux              = false
  set heat flux name                   = heat_flux

  # Multiphase postprocessing
  set calculate barycenter             = false
  set barycenter name                  = barycenter_information
  set calculate mass conservation      = true
  set mass conservation name           = mass_conservation_information

  # Other Cahn-Hilliard postprocessing
  set calculate phase statistics       = false
  set phase statistics name            = phase_statistics
  set calculate phase energy           = false
  set phase energy name                = phase_energy

  #---------------------------------------------------
  # Multiphase post-processing
  #---------------------------------------------------
  # CFD-DEM postprocessing
  set calculate volume phases          = false
  set phase volumes name               = phase_volumes

end
  • verbosity: enables the display of the post-processing values in the terminal. This does not affect the printing of output files. Choices are: quiet (default, no output) or verbose (output at every iteration).

  • output frequency: frequency at which the enabled post-processing is outputted in the respective file. For output frequency = 1 (default value), results are outputted at each iteration.

  • calculate kinetic energy: controls if calculation of kinetic energy is enabled.
    • kinetic energy name: output filename for kinetic energy calculations.

    • The kinetic energy \({E}_k\) is calculated as

    \[{E}_k = \frac{1}{2 \Omega} \int_{\Omega} \mathbf{u} \cdot \mathbf{u} \ \mathrm{d} \Omega\]

    with \(\Omega\) representing the volume of the domain and \(\mathbf{u}\) the velocity.

  • calculate average velocities: controls if calculation of time-averaged velocities is enabled.
    • initial time for average velocity: initial time used for the average velocities calculations.

  • calculate average temperature and heat flux: controls if calculation of time-averaged temperature and time-averaged heat flux is enabled.
    • initial time for average temperature and heat flux: initial time used for the average temperature and heat flux calculations.

Tip

The initial time for average temperature and heat flux or initial time for average velocity can be modified before restarting a simulation. If the initial time for average temperature heat flux or initial time for average velocity parameters are greater than the simulation time at the restart, the time-averaged temperature and heat flux are reinitialized. This approach allows the use of completed simulations as initial conditions while still enabling the computation of time-averaged quantities.

  • calculate pressure drop: controls if calculation of the pressure drop from the inlet boundary to the outlet boundary is enabled.
    • inlet boundary id and outlet boundary id: define the IDs for inlet and outlet boundaries, respectively.

    • pressure drop name: output filename for pressure drop calculations.

    • The pressure drop \(\Delta p\) and total pressure drop \(\Delta p_\text{total}\) are calculated as:

    \[\Delta p = \frac{ \int_{\Gamma_\text{inlet}} p \mathrm{d} \Gamma}{\int_{\Gamma_\text{inlet}} 1 \mathrm{d} \Gamma} - \frac{ \int_{\Gamma_\text{outlet}} p \mathrm{d} \Gamma}{\int_{\Gamma_\text{outlet}} 1 \mathrm{d} \Gamma}\]
    \[\Delta p_\text{total} = \frac{ \int_{\Gamma_\text{inlet}} (p + \frac{1}{2} \mathbf{u} \cdot \mathbf{u}) \mathrm{d} \Gamma}{\int_{\Gamma_\text{inlet}} \mathrm{d} \Gamma} - \frac{ \int_{\Gamma_\text{outlet}} (p + \frac{1}{2} \mathbf{u} \cdot \mathbf{u}) \mathrm{d} \Gamma}{\int_{\Gamma_\text{outlet}} \mathrm{d} \Gamma}\]

    with \(\Gamma\) representing the boundary, \(\mathbf{u}\) the velocity and \(p\) the pressure.

  • calculate flow rate: controls if calculation of the volumetric flow rates at every boundary is enabled.
    • flow rate name: output filename for flow rate calculations.

    • The flow rate \(Q\) is calculated as such, with \(\Gamma\) representing the boundary, \(\mathbf{u}\) the velocity and \(\mathbf{n}\) the vector normal to the surface:

\[Q = \int_{\Gamma} \mathbf{n} \cdot \mathbf{u} d \Gamma\]
  • calculate enstrophy: controls if the volume-averaged enstrophy is calculated.
    • enstrophy name: output filename for enstrophy calculations.

    • The enstrophy \(\mathcal{E}\) is calculated as

    \[\mathcal{E} = \frac{1}{2 \Omega} \int_{\Omega} \mathbf{\omega} \cdot \mathbf{\omega} \mathrm{d} \Omega\]

    with \(\Omega\) representing the volume of the domain and \(\mathbf{\omega}\) the vorticity.

  • calculate viscous dissipation: controls if the viscous dissipation is calculated.
    • viscous dissipation name: output filename for the viscous dissipation calculations.

    • The viscous dissipation is calculated as

    \[\frac{1}{\Omega} \int_{\Omega} \mathbf{\tau} : \nabla\mathbf{u} \mathrm{d} \Omega\]

    with \(\Omega\) representing the volume of the domain and \(\mathbf{\tau}\) the deviatoric stress tensor.

  • calculate pressure power: controls if the pressure power is calculated.
    • pressure power name: output filename for the pressure power calculations.

    • The pressure power is calculated as

    \[\frac{1}{\Omega} \int_{\Omega} \nabla p \cdot \mathbf{u} \mathrm{d} \Omega\]

    with \(\Omega\) representing the volume of the domain, \(\mathbf{u}\) the velocity and \(p\) the pressure.

  • smoothed output fields: controls if the Qcriterion field will be smoothed using an L2-projection over the nodes. The same will shortly be applied to the Vorticity.

  • calculate apparent viscosity: controls if parameter calculation of an apparent viscosity is enabled, when using a non Newtonian flow (see section Physical properties - Rheological Models). This is mainly used to define the Reynolds number a posteriori.
    • apparent viscosity name: output filename for apparent viscosity calculations.

  • calculate tracer statistics: controls if calculation of tracer statistics is enabled. Statistics include: minimum, maximum, average and standard-deviation.

    Warning

    Do not forget to set tracer = true in the Multiphysics subsection of the .prm.

    • tracer statistics name: output filename for tracer statistics calculations.

  • postprocessed fluid: fluid domain used for thermal postprocesses. Choices arefluid 0, fluid 1, or both (default).
    • For monophasic simulations (set VOF = false in Multiphysics), both and fluid 0 are equivalent and the temperature statistics are computed over the entire domain.

    • For multiphasic simulations (set VOF = true in Multiphysics), temperature statistics can be computed over the entire domain (both) or inside a given fluid only (fluid 0 or fluid 1), with the fluid IDs defined in Physical properties - Two Phase Simulations.

    Note

    The output files will have a suffix depending on the postprocessed fluid: fluid_0, fluid_1 and all_domain.

  • calculate temperature statistics: controls if calculation of temperature statistics is enabled. Statistics include: minimum, maximum, average and standard-deviation.

    • temperature statistics name: output filename for temperature statistics calculations.

    Example of temperature statistics table:

     time  min    max    average std-dev
    0.0000 0.0000 3.9434  0.1515  0.6943
    0.2000 2.5183 4.9390  3.3917  0.7229
    
  • calculate heat flux: controls if calculation of heat flux is enabled. If enabled, these quantities are postprocessed:

    1. the total heat flux \(q_{tot}\) for each Heat Transfer boundary condition. The total heat flux on a boundary \(\Gamma\) is defined as:

    \[q_\text{tot} = \int_\Gamma (\rho C_p \mathbf{u} \mathbf{T} - k \nabla \mathbf{T}) \cdot \mathbf{n}\]

    The output table is appended with one column per Heat Transfer boundary condition, named bc_i where i is the index of the boundary in the parameter file.

    1. the convective heat flux \(q_\text{conv}\) for each Heat Transfer boundary condition. The convective heat flux on a boundary \(\Gamma\) is defined as:

    \[q_\text{conv} = \int_\Gamma h (\mathbf{T}-\mathbf{T}_\infty)\]

    The output table is appended with one column per Heat Transfer boundary condition, named bc_i where i is the index of the boundary in the parameter file.

    1. the thermal energy (\(\mathbf{Q} = m c_p \mathbf{T}\)) over the domain defined by postprocessed fluid.

    2. if there is a Nitsche Immersed Boundary, the total heat fluxes on each solid: \(q_\text{nitsche} = \beta_\text{heat} \left( \mathbf{T}_\text{nitsche} - \mathbf{T} \right)\)

    The output table is appended with one column per solid, named nitsche_solid_i where i is the index of the nitsche solid in the parameter file.

    Warning

    Do not forget to set enable heat boundary condition = true in the Nitsche Immersed Boundary subsection of the .prm.

    • heat flux name: output filename for heat flux calculations.

      Example of heat flux table:

       time  total_flux_bc_0 convective_flux_bc_0 thermal_energy_fluid flux_nitsche_solid_0
      0.0000          0.0000               0.0000               0.0000            1000.0000
      1.0000         -0.9732               0.0000               1.4856               0.9732
      
  • calculate barycenter: calculates the barycenter of fluid 1 and its velocity in VOF and Cahn-Hilliard simulations. The barycenter \(\mathbf{x}_b\) and its velocity \(\mathbf{v}_b\) are defined as:

    \[\mathbf{x_b} = \frac{\int_{\Omega} \psi \mathbf{x} \mathrm{d}\Omega }{\int_{\Omega} \psi \mathrm{d}\Omega}\]
    \[\mathbf{v_b} = \frac{\int_{\Omega} \psi \mathbf{u} \mathrm{d}\Omega }{\int_{\Omega} \psi \mathrm{d}\Omega}\]

    where \(\psi \in [0,1]\) is the filtered phase indicator for VOF simulations.

    For Cahn-Hilliard the formula is slightly different since the phase order parameter \(\phi\) belongs to the \([-1,1]\) interval:

    \[\mathbf{x_b} = \frac{\int_{\Omega} 0.5(1-\phi) \mathbf{x} \mathrm{d}\Omega }{\int_{\Omega} 0.5(1-\phi) \mathrm{d}\Omega}\]
    \[\mathbf{v_b} = \frac{\int_{\Omega} 0.5(1-\phi) \mathbf{u} \mathrm{d}\Omega }{\int_{\Omega} 0.5(1-\phi) \mathrm{d}\Omega}\]

    where \(\phi\) is the phase order parameter.

  • barycenter name: name of the output file containing the position and velocity of the barycenter for VOF and Cahn-Hilliard simulations. The default file name is barycenter_information.

  • calculate mass conservation: calculates the mass and momentum of both fluids for VOF simulations.

  • mass conservation name: name of the output file containing the mass of both fluids for VOF simulations. The default file name is mass_conservation_information.

  • calculate phase statistics: outputs Cahn-Hilliard phase statistics, including minimum, maximum, average, integral of the phase order parameter, and the volume of each phase.

    Warning

    calculate phase statistics = true only works with the Cahn-Hilliard solver.

  • phase statistics name: name of the output file containing phase order parameter statistics from Cahn-Hilliard simulations. The default file name is phase_statistics. It is stored in the output folder with in a .dat file.

  • calculate phase energy: outputs Cahn-Hilliard phase energies, including bulk energy, interface energy and total energy. The energies are computed as follow:

    \[E_{bulk} = \int_{\Omega} (1-\phi^2)^2 \mathrm{d}\Omega\]
    \[E_{interface} = \int_{\Omega} 0.5\epsilon^2|\nabla \phi |^2 \mathrm{d}\Omega\]
    \[E_{total} = E_{bulk} + E_{interface}\]

    where \(\epsilon\) is the numerical interface thickness. Note that these energies are not homogeneous to physical energies. Nonetheless, they are a convenient way to track the system’s evolution.

    Warning

    calculate phase energy = true only works with the Cahn-Hilliard solver.

  • phase energy name: name of the output file containing phase energies from Cahn-Hilliard simulations. The default file name is phase_energy.

  • calculate phase volumes: outputs total volume of fluid phase and total volume of solid phase in CFD-DEM simulation. These volumes are computed as follow:

    \[V_{fluid} = \int_{\Omega} \varepsilon_f \mathrm{d}\Omega\]
    \[V_{solid} = \int_{\Omega} (1 - \varepsilon_f) \mathrm{d}\Omega\]

    where \(\varepsilon\) is the void fraction. This is a convenient way to check if the volume of each phase is conserved.

    Warning

    calculate phase volumes = true only works with the lethe-fluid-particle solver.

  • phase volumes name: name of the output file containing phase energies from Cahn-Hilliard simulations. The default file name is phase_volumes.