Reporting Overall Mass Conservation

To compute the overall mass conservation for steady or incompressible flow simulations, you can create a mass flow report and include all inflow and outflow boundaries as input parts for the report. To be accurate in terms of mass conservation, the reported value is ideally zero at the converged solution state.

In unsteady compressible flows, mass can theoretically be accumulated inside the computational domain over time. Due to this fact, a mass flow report over all flow boundaries does not necessarily need to be zero for mass conservation. Instead, the following value is ideally zero at the end of each timestep:

m i m b a l a n c e ( t ) = m i n i t i a l m ( t ) + m ˙ i n ( t ) d t m ˙ o u t ( t ) d t

where:

  • m i n i t i a l is the initial total mass inside the solution domain.
  • m ( t ) is the total mass inside the solution domain at time t .
  • m ˙ i n ( t ) d t is the integral of the incoming mass flow rate from the inlets over time.
  • m ˙ o u t ( t ) d t is the integral of the outgoing mass flow rate through the outlets over time.
To report mass conservation for steady or incompressible flows:
  1. Right-click the Reports node and select New Report > Flow / Energy > Mass Flow.
  2. Select the newly created report and set Parts to the inlet and outlet boundaries in your simulation.
    In fact, you can select all boundaries in your simulation—for non-flow boundaries the value is zero, so that the mass conservation is still reported correctly.
  3. Analyze the mass flow report:
    • For an instantaneous calculation using the current simulation data, right-click the report and select Run Report.

      Simcenter STAR-CCM+ writes the mass conservation to the Output window.

    • For tracking how the mass conservation evolves as the simulation progresses, right-click the report and select Create Monitor and Plot from Report.

      The plot opens in the Graphics window and updates continuously as the solution progresses.

To report mass conservation for unsteady compressible flows:
  1. Create a report for the total mass inside the domain:
    1. Right-click the Reports node and select New Report > User > Volume Integral.
    1. Select the newly created report and set the following properties:
      Property Setting
      Field Function Density
      Parts Set all fluid regions in your simulation.
    2. Rename the report to Total Mass Inside Domain.
      After initialization, running this report gives you the value of m i n i t i a l . During the simulation this report gives you the value of m ( t ) .
  2. Create a report for the instantaneous mass imbalance:
    1. Create a mass flow report as described in Steps 1 and 2.
    2. Rename the report to Instantaneous Mass Imbalance.
    3. Right-click the report and select Create Monitor from Report.
      This action creates a monitor node called InstantaneousMassImbalanceMonitor.
    4. Right-click the Reports node and select New Report > Metrics > Monitor Integral Report.
    5. Select the newly created report and set the following properties:
      Property Setting
      Integrand InstantaneousMassImbalanceMonitor
      Variable Physical Time
    6. Rename the report to Monitor Integral Report on Instantaneous Mass Imbalance Report.
      This report gives you the value of m ˙ i n ( t ) d t m ˙ o u t ( t ) d t in mass units.
  3. Create a report for the mass imbalance:
    1. Right-click the Reports node and select New Report > User > Expression.
    2. Select the report and set Definition as follows:
      <m_initial>-${TotalMassInsideDomainReport}-${MonitorIntegralReportonInstantaneousMassImbalanceReport}

      where you replace <m_initial> with the value of the Total Mass Inside Domain report after initialization.

      The sign of the terms in the expression report are based on the fact that in Simcenter STAR-CCM+ incoming mass flow from the inlet is calculated as a negative value and the outgoing mass flow from the outlet is calculated as a positive value.