Using sliding sample window

Written in 2020. Menus and defaults may differ in newer releases.

In short

Field function monitors in Simcenter STAR-CCM+ (mean, max, min, sum, variance and co-variance) can use a sliding sample window over the last N iterations or time steps. In our wake example a Field mean monitor with a 200-iteration window gives a steady average velocity at a point where the flow keeps fluctuating.

There are several useful field function-monitors in Simcenter STAR-CCM+. The field function monitors available are:

  • Field co-variance — computes the co-variance of two field functions.
  • Field max — obtains the highest value of a field function for the selected part.
  • Field mean — obtains the average value of a field function for the selected part.
  • Field min — obtains the lowest value of a field function for the selected part.
  • Field sum — provides the total value of a field function for the selected part.
  • Field variance — computes the variance of a field function.

You can control these field functions using sliding sample window. The sliding sample window is the N most recent samples of data, (based on iteration or time-step depending on setup), during the simulation.

To evaluate this set of samples for a field function monitor, you need to activate the Enable Sliding Sample Window property of that monitor first.

This adds the Sliding Window node to the object tree under the parent field function monitor node. To specify the number of samples (the “window”), select this node and set the Sliding Sample Window Size property to the desired value in the properties window.

Example case

To show how this function can be useful imagine a simple case where a cylindrical pipe is crossing a slab and flow passes this cylinder, see the picture bellow.

Slab domain with a cylinder across it, 5 m/s inlet and pressure outlet

In a case like this the velocity will not stabilise in the wake that is formed behind the obstacle. There will be transient effects in the flow. Something like the set of pictures below show.

Velocity magnitude in the cylinder wake at four stages, three iterations apart

However, if we still are interested in the average flow field over let us say 200 iterations, we can use the sliding sample window to evaluate the results. Assume that we evaluate the velocity in not only the entire field, but we also monitor the velocity in a specific point. See the picture below.

Velocity magnitude around the cylinder with the monitor point marked in the wake

In our simulation we will monitor the velocity behind the obstacle, but we will also monitor the average velocity in the same point, over the last 200 iterations.

Create our monitor

To create the monitor, simply right click and create a new Field mean monitor (it can be any of the field function monitors). Under properties, tic in enable sliding sample window and set the number to 200.

New Field Mean monitor with Enable Sliding Sample Window ticked and window size set to 200

We now have the monitor and we can create a field function pointing to that monitor and plot it in a scalar scene as we do with the velocity in each iteration. Create a new field function, name it properly and set the definition to point to the previously created monitor.

Field function Field_mean_sliding with its definition pointing to the sliding sample monitor

To evaluate our point value, simply create a report and select the previously created point and make sure you select the field function previously created. We can now plot the point velocity and the point velocity averaged over the last 200 iterations in the same graph.

Sliding_sample_velocity report using Field_mean_sliding on the point part

After running this simple case for about 500 iterations we can compare the velocity field and the values associated with our point. The result can look something like below.

Point velocity against its 200-iteration sliding average, with instantaneous and averaged velocity scenes

I hope this has been a useful tip. And as usual do not hesitate to contact me at robin.victor@volupe.com or at support@volupe.com if you have any questions in relation to this or anything else regarding Simcenter STAR-CCM+.

Read also:
STAR-CCM+ field function syntax, part 1
STAR-CCM+ field function syntax, part 2
Finding the center of a circle in Simcenter STAR-CCM+
Simcenter STAR-CCM+ version 2020.3 news part5
How to transform Display views

Working with Simcenter STAR-CCM+?

More Simcenter STAR-CCM+ articles

All 254 Simcenter STAR-CCM+ articles

Robin Victor and seven other application specialists write here.

Loading

We use your address only to send these emails and never pass it to Siemens or other partners. Every email has an unsubscribe link. Privacy policy