5.11. Solution Time

Overview

Many analyses contain time dependent information, such as automobile crash simulations and unsteady flow problems. The presence of time-dependent data is indicated to EnSight through an EnSight result file, case file, or is determined directly from the data files of other formats. EnSight has the capability of displaying the model and results at any time provided for in the data. Linear interpolation between given time steps is possible as long as the geometry does not have changing connectivity over time.

EnSight keeps track of which variables and Parts have been created so that if you change time steps, variables and Parts will update appropriately. For example, assume you have created a clip plane through the combustion chamber of an engine. From this clip plane you have created two constant variables Min Temperature and Max Temperature and are displaying them in the Main View. Now change time steps. First, the geometry updates to a new crank angle position. Second, the clip plane will automatically be recalculated to fit the new geometry. Third, the Min and Max values displayed in the Graphics Window are recalculated and updated. This is all performed automatically by EnSight after you change the current time value.

It is important to distinguish between time step and solution time. An example will best illustrate this concept.

Consider a model with data for 5 different times:

Time StepSolution Time
01.0125
111.025
211.50
313.00
421.333

The time steps coincide with the number of transient data files and are integers. The solution time at each time step comes from the analysis, and does not have to be at uniform intervals. The solution time can be in any units needed, but must be consistent with the solution files. That is, if a velocity file was in terms of meters per second, then the solution time must be in terms of seconds. Hence it is not possible, for example, to have the solution time reported in degrees crank angle for a combustion case unless the corresponding solution files were also in terms of crank angle (otherwise velocity would be reported in the meaningless units of meters-per-degree-crank-angle).


Important:  EnSight will sort the solution time values and, after the sort, they must be monotonically increasing. An error will occur if any time values (represented as singe precision floats) are the same.


A Solution Time Panel gives you control over time and relates time step to solution time. You can force the time information to conform to the actual time data given at the steps, or you can allow interpolation to occur between time steps. You must be aware of the implications of such an interpolation and choose the method that is appropriate.

Also, you can see the ranges of time dependent data available and the current time that is set for the Main View. You can change time steps by either entering a new time to view, using the VCR-type single step buttons, or using the Solution Time slider bar.

The Solution Time Panel by default shows a composite timeline of all timesets from all cases. For any case, a number of different timesets can exist. Each timeset can be attached to multiple variables and/or geometry. This makes it possible to, for example, have one variable defined at t = 1.0, 2.0, 3.5 and another variable defined at t = 1.5, 2.01, 4.0. For each timeline, controls exist to specify how EnSight should interpolate the variables when time is set to a value not defined for a given timeset. Also a convergence time value can be defined to merge timesteps with time values that are very close, in the above example, 2.0 and 2.01 will be merged if the master timeline convergence time is set to 0.01.

While the default is to show a composite timeline in the Solution Time Panel, it can also display a timeline for any case loaded or the user can define their own time values as a composite of time values available across the loaded cases.

There are other places within EnSight where time information is requested. These include, traces, emitters, animated traces, flip book transient data, key frame animation transient data, and Query/Plot. Each of these use the specified Beg/End values. For functions which do not explicitly specify the time step the current display time (as defined in the Solution Time Panel) is used.

For data that is transient, the Solution Time icon will be visible. For static data that does not change over time, there will be no Solution Time icon on the Feature Icon Bar. Clicking once on the Solution Time icon opens the Solution Time panel which is used to specify time information.

Figure 5.142: Solution Time Panel Controls

Solution Time Panel Controls

Time Control Panel

Contains the Video controls and the current step or solution time values.

Video Controls

Click on the Video Playback control buttons to go back one timestep, to play in reverse, to stop, to play forward and to step forward one timestep, respectively. You can also control what happens when you reach the end - namely, the animation can, stop, can cycle to the beginning, or can bounce back and forth. This form of playing the animation is a solution time stream of the data. That is, each timestep is read from the data file without storing the animation in memory.

Beg

Value for Beginning Time Step or Simulation Time.

Cur

Value for Current Time Step or Simulation Time. The slider can be used to select a value for the Current Time Step field.

End

Value for Ending Time Step or Simulation Time.

Solution Time Panel

Figure 5.143: Solution Time Panel

Solution Time Panel


Display time annotation

Toggles an annotation in the graphics area of the Master Time value which is the time value EnSight is requesting variable values and geometry display. This can be different from the Analysis_Time variable which is the time in the dataset that EnSight is using continuous time for changing geometry datasets and your Master Time is a time value between two time values in the dataset and the Analysis_time is either the upper or lower dataset time value. Click on the Annot Tab to the left of the graphics area to move, modify, etc. this annotation.

Scale Type

A pulldown menu to specify use of existing time steps, or allow EnSight to linearly interpolate to show any time step. Choices are:

Discrete

Can only change time to defined steps.

Continuous

Can change time to any time, including times between steps. Only available if do not have changing geometry connectivity transient case.

Units

A pulldown menu to specify whether to use and display:

Step

which will be an integer showing time as step data. Will show NOSTEP if in Continuous mode and current time is not at a given time step. Current time will automatically change to keep within range Begin/End range. The default beginning and ending simulation times correspond to the first and last time steps specified in the results.

Simulation Time

which will be a real number showing true simulation time. Current time will automatically change to keep within the Begin/End range. The default beginning and ending simulation times correspond to the first and last times specified in the results.

# of Cycles

For cyclic transient analysis, the solution is often computed for one cycle only. It is often desirable to be able to visualize more than one cycle. This is possible only if the first and last timesteps contain the same information. By default, EnSight assumes one cycle.

Step increment

Specifies the incremental time which will be applied to the current time each time the slider stepper buttons are used.

Solution timeline control

This section of the dialog will exist only if multiple cases are loaded. It controls which timeline will be shown in the Solution Time Panel and how a time change will effect each loaded case.

Player

One timeline can be designated the Player, which is the timeline which will be shown in the Solution Time Panel

Timeline

The name of the timeline. Cannot be edited by the user and is for information purposes only.

Active

Toggle on if the Case will be updated when a time change occurs.

Sync

If the Master is the Player, the Sync is always set to Time - meaning the active cases will be updated to the time set by the user.

If the Player is set to one of the cases, Sync can be one of:

None - The other cases will not be modified when time changes

Time - The other active cases will be modified to the appropriate time step when the user changes time

Relative - The other active cases will be modified to a new time value but offset the current time difference

Timeset Details...

will open the Timeset Details dialog which will contain two tabs.

Figure 5.144: Timeset Details Dialog - Timesets Tab

Timeset Details Dialog - Timesets Tab


Master timeline convergence time

A tolerance value used to determine if two different times should be treated as the same time. For example 2.0 and 2.01 in two different timesets will be treated as the same time if the convergence time is set to 0.01. Time values in the same timeset are not merged.

This is true for the default master timeline which is composed from all the time steps across all the timesets as well as any user specified timeset from the 'Which timesets(s)' list designated as the master time line by the Master timeline toggle.


Note:  The master timeline is by default the total number of unique time values across all the timesets.


Which Timeset(s)

Selects the timesets to be viewed.

This is a list of both specified and composed time sets which include

a. all time sets as defined by the associated data set and corresponding reader (ie. for EnSight Case format - as defined in the EnSight Gold Case file),

b. all time sets composed internally in EnSight such as when parts and variables of different time sets are used to create a new part or variable.

Each time set selection indicates the order in which the it was created and referenced; the case number to which it belongs (ie. C1 = the first case); and in general, which type of part data (ie. Mod=Model or Mea=Measured) and geometry (Geo) and/or variables (Var) with which it is associated. All other selections reflect the settings of this selection.


Note:  Multiple selections display up to five multiple Timeset scales.


Set Selected Timesteps

Allows modification of all selected timesets.

These settings are the multi-timeline way of setting the left/between/right settings. You select all the timesets you want to edit in the "which timesets" list and then use this interface.

Range

Specified range affecting the entire time set interval Step definition, i.e. step definition

a. Between steps: between the steps,

b. Left of: to the left of the entire time set interval,

c. Right of: to the right of the entire time set interval.

Applies to all timesets selected.

Step Defn.

Specifies which time value to use in the specified Range, i.e.

**pick one***: directions to select an option below...

Right: Always use the Right time step value,

Left: Always use the Left time step value,

Interpolate: Always interpolate between left and right time step values (when possible *),

Nearest: Always use the nearest time step value (when possible *),

Undefined: Always set the specified range as undefined.

UserNote: Applies to all timesets selected, as opposed to below 'Left of Step Defn', 'Between steps defn.', and the 'Right of step defn' buttons that apply to only one time scale. Some selections may be 'greyed-out' depending on definition.

Show Scale As

Specifies the markers (green tics) of the timeset scale shown to be time steps

a. Full time range: within the full range of the combined timeset intervals

b. Timeset's range: restricted to just the timeset range.

The change will not take effect until the Update Selected Timeset(s) button is pressed.

Defined For

Lists all of the variables and/or geometry attached to the Timeset.

Left/Right of Step Defn.

When the Current time is less than the Timeset's minimum time, the attached variables will use the Nearest values or become Undefined.

Between Steps Defn.

When the Current time is between the Timeset's minimum and maximum time values, but not defined, the attached variables will use the Right/ Left, Interpolate, or Nearest values, or become Undefined.

Update selected timeset(s)

Must be selected in order to update any changed Timeset.

Timeset Details... Master time Tab

Figure 5.145: Timeset Details Dialog - Master Time Tab

Timeset Details Dialog - Master Time Tab


Use default master timeline

Toggle on if EnSight should create the composite timeline across the loaded cases.

Use custom master timeline

Toggle on if you wish to create your own master timeline. If enabled, the two columns and other buttons will be active.

Custom master timeline column

Any time values listed in the column can be selected, either individually or by shift/control click operations.

Select all

Select all of the time values in the Custom master timeline column.

Delete

Deletes the selected times from the Custom master timeline column.

Reset

Resets the Custom master timeline values to be the default master timeline.

Apply

Creates the master timeline with the time values shown.

Save to file...

Saves the time values to a file.

Load from file...

Loads the time values from a file.

Case timeline

Set the pulldown list to any case that exists. Once set, the time values for that case will be shown in the column. And time value in the column can be selected, either individually or by standard shift/control click operations.

Select all

Selects all of the time values in the Case timeline column

Left arrow icon

Adds the time values selected in the Case timeline column to the Custom master timeline column.

Monitor for new timesteps

For transient solutions where EnSight is viewing the data as the solver is running, it is possible that new timesteps can be added to the timeline while EnSight is viewing the data. This option is only available if the data reader supports the capability. Therefore, most often, this pulldown will be grayed out, as this capability is unavailable for most data formats.

Figure 5.146: Monitor for New Timesteps

Monitor for New Timesteps


EnSight has an ability to monitor for newly available timesteps, as a solution is proceeding. This is a form of simulation co-processing and is referred to as simulation monitoring, or simply, monitoring. It can be advantageous, for example, to monitor a transient simulation to review ongoing results, or to terminate an errant simulation early, rather than wait for the completion.

For ease of implementation, EnSight relies on a cooperative approach to determine when new time steps are available (described later) rather than a post processing API embedded within the solver because it is frequently impossible to modify the solver code (especially for commercial solvers).

To inform EnSight that simulation monitoring is available for a given data set, the data reader must simply tell EnSight that there are a maximum number of timesteps. For EnSight Case Gold, this is accomplished simply by adding a line in the ASCII text case file as follows.

For EnSight Case format data, the Case file's TIME section needs to include the line:

maximum time steps: 100

The line may appear anywhere within the TIME section. Currently, the number specified is not used. Indeed, the user may not know a priori how many times might be generated by the solver. Simply the presence of this line, with a value of 1 or greater, within the Case file indicates to EnSight that simulation monitoring should be offered as an available option to the EnSight user.

For forward compatibility with future EnSight enhancements to simulation monitoring, the user should specify the maximum number of time steps if known, or, otherwise, set it to a sufficiently large value (for example, 1000 or 10000). Since the number is used to allocate modestly sized data structures in the EnSight Server (or EnSight SOS), it should not be set to an unreasonably large value.

In a User Defined Reader, simply add another function as follows and return a value of 1 or greater.

int USERD_get_max_time_steps(void);

This function should return 1 or greater to indicate that simulation monitoring should be made available for the particular data set. It should try to return the maximum number of expected time steps for the data set or a value sufficiently large. The actual value may be used at a later date.

You can turn on monitoring at the time that the data is loaded or you can turn it on later in your session. To turn it on at loading, in the FileOpen dialog, Advanced interface toggle on, under the Time options tab, you will find a Monitor for new timesteps pulldown (see Figure 5.147: File → Open Dialog, Advanced Interface, Time Options Tab) with the following choices:

Off - Don't monitor the data set for new time steps

Jump to end - Monitor for new time steps and jump to the last time step available

Stay at current - Monitor for new time steps but don't change the current time step

Choose your option, but note that if the user defined reader does not support this option, or if the .casefile does not contain the proper keyword, then your choice will be ignored. To turn it on during your session see Solution Time.

Cooperative Monitoring

As noted earlier EnSight's implementation of simulation monitoring doesn't require modifications to the solver. Instead, EnSight monitors the specified data set for new time steps. The advantage of this approach is that modifications aren't needed to the solver. However, for this to work reliably, the solver and/or data format must appropriately update data files so that the data files are always available for reading and are syntactically complete.

For example, if a user wishes to use EnSight Case format data, the .case file must be "complete" and syntactically correct at all times; it can never be partially written, given that EnSight may currently be trying to read it. Furthermore, any time steps referenced in the .case file must exist. Since EnSight's simulation monitoring is cooperative, the preferred approach to guaranteeing the constraints on the data file is to first write any geometry and/or variable files for the new time step(s), then create a new case file using a temporary name containing the new time information, and finally replace the original case file with the new case file. While EnSight is monitoring for new time steps, it will periodically reopen the .case file, reread it, and then read any new geometry and/or variable files. This approach guarantees that the data files are wholly intact and available for reading at all times without needing special APIs or operating system file locking.

The programmer may find the Linux/Mac OS X system function rename(char *oldName, char *newName) useful for renaming a file. Similarly, the MS Windows API includes the same rename() function or the MoveFile() native function can be used.

Other formats may have other appropriate approaches for amending data sets with new data. For example, formats such as ExodusII may support simultaneous reading and writing which can be used by the EnSight UDR API. Or, on a long solution, a given reader may choose to only update the solution time if there has been a several minute hiatus since the last file was last updated. Or a reader may choose to conservatively remain 'one timestep behind' the last output timestep file, to avoid reading a partially written solution file.

If you have questions about a specific format and this feature, please contact Ansys Support.

Batch Command File Playback

If EnSight is instructed to play a command file, it will handle time steps as it always has. However, if the command file contains the command:

solution_time: monitor_for_new_steps jump_to_end

- or -

solution_time: monitor_for_new_steps stay_at_current

and a later EnSight command specifies a time step that currently doesn't exist, EnSight will wait until that time step becomes available. The EnSight console output indicates this is happening.

Figure 5.147: File → Open Dialog, Advanced Interface, Time Options Tab

File → Open Dialog, Advanced Interface, Time Options Tab

Off

Do not look for new timesteps

Jump to End

When one or more new timesteps become available, automatically change time to the last timestep.

Stay at Current

When one or more new timesteps become available, update the master timeline to indicate a new End time value, but do not change timesteps.