MovingStatistic#

class MovingStatistic[source]#

Bases: Flow360BaseModel

MovingStatistic class for moving statistic settings in ProbeOutput, SurfaceProbeOutput, SurfaceIntegralOutput and ForceOutput.

Note

The window size is defined by the number of data points recorded in the output.

  • For steady simulations, the solver outputs a data point once every 10 pseudo-steps. A moving_window_size = 10 therefore covers 100 pseudo-steps, and start_step is automatically rounded up to the nearest multiple of 10.

  • For unsteady simulations, the solver outputs a data point for every physical step. A moving_window_size = 10 covers 10 physical steps.

Notes

  • When method is set to “standard_deviation”, the standard deviation is computed as a sample standard deviation normalized by \(n-1\) (Bessel’s correction), where \(n\) is the number of data points in the moving window.

  • When method is set to “range”, the difference between the maximum and minimum values of the monitored field in the moving window is computed.

Example

Define a moving statistic to compute the standard deviation in a moving window of 10 data points, with the initial 100 steps skipped.

>>> fl.MovingStatistic(
...     moving_window_size=10,
...     method="standard_deviation",
...     start_step=100,
... )

Attributes

moving_window_size: int#

The size of the moving window in data points over which the statistic is calculated. Must be greater than or equal to 2.

Default:

10

method: Literal['mean', 'min', 'max', 'standard_deviation', 'range']#

The statistical method to apply to the data within the moving window.

Default:

'mean'

start_step: int#

The number of steps (pseudo or physical) to skip at the beginning of the simulation before the moving statistics calculation starts. For steady simulations, this value is automatically rounded up to the nearest multiple of 10, as the solver outputs data every 10 pseudo steps.

Default:

0