Animating Solution Views

You can animate the transient and steady state solution data that is stored in a simulation history file.

For transient solutions, you can view the solution data against time. For steady state solutions, you can view a slideshow of the different snapshots. To control the animation of a recorded solution, use one of the following techniques:

Select a mode from the drop-down list of the Animation Mode property:

  • State Index -- solution states as shown in the solution history
  • Iterations -- solution steps for a steady simulation
  • Time Steps -- solution steps for an unsteady simulation
  • Solution Time -- elapsed time of the calculations

Your selection adds a sub-node with the name of the selected mode to the Animation sub-node of the solution view. For example if you select State Index, the new sub-node is named State Index Animation. Define the recorded solution view animation parameters in the properties of the sub-node.

Recorded solution view animations are controlled in the same way as standard scene animations. Similarly, you can record a copy of the animation to disk as you would with a normal scene.

For more details on how the parameters in the Write animation dialog affect the playback of the recorded movie, see Defining Playback Settings for Recorded Movies.

More details on what each property controls are provided below. Note that the properties that are shown below are for the State Index Animation node. The name of the Start and End properties vary depending on what Animation Mode you selected.

Cycle Time

Specifies the time that it takes to loop through all the state indexes.

Auto-Range

Controls whether the values of the Start Index and End Index properties are automatically populated when playing the animation.

Activated

The values of Start Index and End Index are automatically filled in when playing the animation.

Deactivated

The values of Start Index and End Index are not automatically filled in. These values must be entered manually.

Start Index

The state index for which the animation starts.

End Index

The state index for which the animation ends.

Animating Vectors and Sweeping Section Planes in Solution History Views

You can view animated vectors or sweeping section planes in the scene at any of the saved states.

The sweeping rate for plane sections is specified with a Cycle Time, like in the solution view animation. For both types of animation, the animation attribute of the scene specifies a target frame rate in frames per second (fps). It is called the target frame rate because a scene can be too complicated to draw at the rate you specified.

Together, the Cycle Time and the Target frame rate (fps) determine how many frames of the animation are used to animate the effect and the total number of frames in the animation. For example, if the Cycle Time is 10 seconds and the Target frame rate (fps) is 25 fps, the total number of frames in one cycle is 250 frames (10 * 25).

Plane sweeps and vector animations interpolate the positions of their objects at each frame to build a smooth animation. Solution state changes do not interpolate between states that are stored in the simulation history file. Scenes can therefore change abruptly when switching from one state to the next.

Animating Streamline Tracers in Solution History Views

You can view animated streamlines in the scene at any of the saved states. If you have a streamline (or constrained streamline) derived part in a simulation, use the following procedure to view the streamlines in a solution history playback.

  1. Prepare the solution history:
    1. In the Inputs property of the solution history node, select the streamline derived part.
    2. Select the desired scalar or vector field functions in the Functions property.
  2. Run the simulation for at least one iteration or time-step. This part of the process is required so that a solution state is saved in the solution history file.
  3. Select the streamline displayer node of the desired scene, and set Representation to the solution view.
  4. Select the Animations sub-node of the streamline displayer node, and set Animation Mode to Tracers.

    The Animation toolbar is associated with the streamline displayer.

  5. View the solution history with the streamlines one of two ways:
    • Play the animation using the controls in the Animation toolbar.
    • Choose to view individual states of the solution history by selecting the solution view node and adjusting any of the following properties:
      • State Name, using the drop-down list
      • State Index, using the slider or a numeric entry
      • Iteration (for steady cases), using the slider or a numeric entry
      • Time Step (for transient cases), using the slider or a numeric entry

Following the Moving Object with the Camera View

After recording motion (including the managed coordinate systems) in a simulation history (.simh) file, you can use the recorded motion and coordinate system data to define the camera view. To set up the scene:

  1. Open the [scene] > Attributes node and click on View. Set the Coordinate System Representation property to the representation that was created with the simulation history.

    Also make sure that the Coordinate System property of the view is set to the motion managed coordinate system. For more information on motion managed coordinate systems, see Rigid Motion Models Reference.

  2. Set the Representation property of other objects in the scene, where applicable, to the same representation as the view:
    • Displayer(s) that you are using for the animation
    • The Attributes > Annotations > Solution Time node (if you have the solution time annotation included in the scene)

Controlling the Animation Playback

If the animation settings are such that the number of frames in the animation is less than the number of states between the Start Index and End Index, some states are skipped. On the other hand, if the animation settings are such that the number of frames in the animation is greater than the number of states between the Start Index and End Index, states are repeated on multiple frames of the animation.

When an applied solution view has the animation enabled, you can also use the Animation toolbar to animate through the solution states.

As with vector and plane sweep animations, the Animation toolbar can be used to pause an animation that is playing. When paused, the frame stepping buttons are enabled so that you can step through the animation forward or backward one frame at a time. The following behavior can be observed:

  • In the case where the number of frames in the animation is less than the number of states between the Start Index and End Index, pressing the forward button skips over one or more states.
  • In the case where the number of frames in the animation is greater than the number of states between the Start Index and End Index, you need to press the forward button several times to advance to the frame so that the next state appears. If there are vector animations or plane section sweep animations that are enabled in the scene, their animations change from one frame to the next. If there are no vector or plane section sweep animations, the frame stepping buttons appear to be doing nothing, especially when the same state is repeated over several frames.

Defining Playback Settings for Recorded Movies

The playback settings for recorded movies are controlled in the Write animation dialog. The settings that affect the recorded movie are:

  • Frame Rate - this property controls the playback of the recorded movie. Higher frame rates take longer to write, and result in a larger file size for the movie.
  • Start Time - this property sets the time at which the recorded solution data starts writing to the simulation history file. For example if the fluid interaction you are interested in starts after 5 s of recorded solution data, then it is recommended that you set the movie to start recording at 5 s.
  • Animation Length - this property defines the length of the recorded movie. This parameter must match the recorded Cycle Time if you want the movie to play once, otherwise the animation loops, and plays the same content multiple times. For example if the Cycle Time is 20 s, and the Animation Length is set to 60 seconds, the animation plays the same content 3 times (60/20).

If you want the recorded movie to play back at the normal speed (not slowed down/speed up), the Animation Length must match the Cycle Time. Some examples are provided below:

Cycle Time (s)

Number of States

Animation Length (s)

Frame Rate (fps)

Playback Speed

10

250

10

25

x1

10

250

20

25

x1 (looped twice)

10

500

20

25

x0.5

10

500

10

25

x1

10

500

5

50

x2