flow360.MovingStatistic#

class MovingStatistic[source]#

Bases: Flow360BaseModel

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

Notes

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

  • For steady simulations, the solver typically outputs a data point once every 10 pseudo steps. This means a moving_window_size = 10 would cover 100 pseudo steps. Thus, the start_step value is automatically rounded up to the nearest multiple of 10 for steady simulations.

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

  • 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,
... )

moving_window_size: Annotated[int, Strict(strict=True)] = 10#

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

Constraints:
  • ge = 2

  • strict = True

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

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

start_step: Annotated[int, Ge(ge=0)] = 0#

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.

Constraints:
  • ge = 0

type_name: Literal['MovingStatistic'] = 'MovingStatistic'#