Accessing Field Data from Previous Time-Steps or Iterations
A field history is a type of field monitor that stores a finite number of past values (or samples) of a field function, captured at moments defined by its update policy, for a given set of input regions or boundaries (or both).
You can create a field history of a scalar, vector, or symmetric tensor field function. The field function monitored by a field history is selected on creation, and cannot be changed afterwards.
Like all field monitors, field histories sample and store their data at the cells belonging to selected regions (for region inputs), or faces belonging to selected boundaries (for boundary inputs).
You set the number of previous states you wish to store using the sliding sample window size. Simcenter STAR-CCM+ allocates sufficient memory to store these N samples each in their own field function. For example, if you choose to store Temperature for 3 previous states, then Simcenter STAR-CCM+ creates the following 3 field functions:
- History of Temperature Sample 0
- History of Temperature Sample 1
- History of Temperature Sample 2
The field function with the lowest sample number is the most recent state saved. If for example, you trigger a sample on iteration, then History of Temperature Sample 0 would have the temperature data as it existed at the end of the most recently completed iteration. History of Temperature Sample 1 would have the temperature data as it existed at the end of one iteration further back, and so on.
You are not constrained to store samples only on iterations or time-steps. You can define custom update policies. For example, you could define an update policy that samples only once in a simulation, and makes that data available for the remainder of the simulation.
For examples of how field histories can be used, see Field Histories Example: Pressure-Time Derivatives.
-
To create a field history, do either of the following:
- Right-click the Monitors node and select New Field History. In the Select Field Function dialog, select the field function.
- Right-click any field function under Create Field History. and select
-
To select parts for which to sample the field function values, edit the
Parts property.
Field histories store subsequent samples in the same region cell. Thus if field histories are used with moving mesh problems, the field history sample value in a cell is the value of the field function being sampled at the location where the cell was when the sample was taken.
Note When deciding on parts, consider the memory implications of your choice. For example, if you choose an entire region with 100,000 cells, and you specify 10 data points per cell, you might consider the resulting amount of data points unmanageable. -
Decide on the sliding sample window size. This setting governs how many samples
of the input field function the field history retains. See Using a Sliding Sample Window.
As for the previous step, consider the implications of your choice relative to the amount of memory available on the machine on which the simulation runs.
-
Specify the trigger event for the updates. See Changing the Trigger Event and Sampling Frequency.
The field history is ready to begin sampling field function values. It includes read-only properties that provide you with detailed information about the field history. For details, see Field History Reference.
- To prevent updates for a particular field history, deactivate the Enabled property.
Output field functions for samples
that have not yet been collected cannot be post-processed. Attempting to show them
in a scalar displayer, for instance, returns a gray result, and attempting to run a
report on them results in unable to compute
error messages. If you
need to define a field function that can always be post-processed in terms of an
output field function of a field history, use the alternateValue
field function operator and provide an alternate value appropriate to your
particular use case.