Obtaining Statistics from Data in Monitors
A statistics report allows you to compute statistics from data collected by any monitor that can be plotted, including report monitors, residual monitors, physical time monitors, and the iteration monitor. You can compute the mean, sum, maximum, or minimum values of all or some of the data.
With this facility, you can answer questions such as the following (from an internal combustion engine case):
- What is the maximum value of the average cylinder pressure over the course of the simulation?
- What is the maximum pressure from each cycle in a multi-cycle simulation?
Alternatively, a two-monitor statistics report allows you to compute the covariance or correlation of two monitors.
To set up a statistics report:
- Right-click the Reports node and select .
-
To work with a base report of your own choosing:
- Create the base report for which you plan to compute statistics, for example Force.
- Create a monitor from the base report.
-
In the Monitor property, select
the monitor from which to obtain data.
The Units property of the statistics report is set automatically based on the units used by the monitor.
-
Select a type of computation from the
Statistic property:
- Mean
- Sum
- Maximum
- Minimum
- Variance:(485)
- Root Mean
Square:(486)
-
Choose the
Sample Collection Policy:
- All Samples—compute statistics using data from the entire simulation run, or all samples that follow the sample start event (explained below).
- Last N Samples—compute statistics using data from the N most recent samples of data during the simulation run. This is the sliding sample window.
- If you chose Last N Samples for the collection policy, select the Last N Samples child node and set its Sample count property—the number of samples to use.
-
You can define a
sample start event—a starting point for data collection using a custom event trigger of your choice. To do so, select an option in the
Sample start event property of the child node (either
All Samples or
Last N Samples).
The list of options in the Sample start event property consists of update events that you add to the simulation. For details on creating these events, see User-Defined Update Events. When deciding on a sample start event, consider the following:
- The sample start event establishes the beginning of the sample set that is considered for the statistics computation.
- The starting sample is the iteration for which the trigger was most recently satisfied, but not including the current iteration.
- The sample set under consideration extends to the current iteration, whatever that happens to be.
- The samples upon which the statistic is actually computed is determined by the setting of Sample Collection Policy, either All Samples or Last N Samples.
- The sample starting point resets every time the sample start event trigger is satisfied. So if you have a start event that is constantly satisfied, it resets the starting point of the sample set on every iteration.
- By default, the sample at a start event is included in the sample collection. To exclude the start event sample, de-activate Include start event sample.
-
Finally, you can select one or more additional
co-temporal monitors when computing maximum or minimum.
When you run the report, and the minimum or maximum value is found for its source monitor, the report output includes values for each of the co-temporal monitors at the point when the source monitor is at its minimum or maximum value.
This capability lets you evaluate questions such as "What is the surface temperature when the pressure is at its maximum value?"
To set up co-temporal monitors:
- Set the Statistic property to Maximum or Minimum.
- Select the Maximum or Minimum sub-node.
- In the Co-temporal Monitors property, select one or more monitors from the list.
-
Right-click the Reports node and select .
As with the statistics report, you can use this report to compute statistics from data collected by any two monitors that can be plotted.
-
To work with base reports of your own choosing:
- Create the two base reports from which you plan to compute correlation or covariance.
- Create monitors from the two base reports.
-
In the Monitor 1 and
Monitor 2 properties,
select the monitors from which to obtain data.
The Units property of the two-monitor statistics report is set automatically based on the units used by the monitors.
-
Select a type of computation from the Statistic property:
- Covariance
- Correlation
-
Choose the Sample Collection
Policy:
- All Samples—compute statistics using data from the entire simulation run, or all samples that follow the sample start event (explained below).
- Last N
Samples—compute statistics using data from the N most
recent samples of data during the simulation run. This is the sliding
sample window.
See Last N Samples Collection Policy for details about this choice.
The statistics report value is determined by whatever data you have in your sample set at whatever iteration (or time step) you are on. So if the simulation is actively iterating, and your sample set is All Samples, then the report value is determined from all the data available from the target monitor up to the current iteration. On the next iteration, the monitor has another data point (assuming that it updates on each iteration), and the statistics report value is determined from the now larger sample set.
If you have your sample filter set to Last N Samples, the report value is determined just from the most recent N data points.
You can define another monitor that collects data from the statistics report. In this way you would see how the maximum or minimum or other value is changing with each step as the simulation is iterating.
Alternatively, you can run the entire simulation first. Once the simulation is complete, you can create a statistics report and point it at any monitor that is already defined for the simulation, and which would (presumably) contain data. Run the report, and you will compute the maximum or minimum or other statistic on the data in that monitor.
In all cases, the statistics report value is determined from the available data in the monitor, subject to the filter you specified (All Samples or Last N Samples) at the moment that you run the report. If the simulation is iterating, this value could very well be changing over the course of the run.
This report uses unnormalized data, so it does not take into account the Normalization Option setting of its input monitor.
To plot the report data as the simulation proceeds, create a monitor of the statistics report and an associated plot.
Note | Simcenter STAR-CCM+ does not allow a statistics report to operate on a monitor of another statistics report or of a monitor integral report. If a monitor attempted to sample such a report, the relative order of sampling of the two monitors would not be defined. |