During the calculation, you can have FLUENT create an animation of contours, vectors, XY plots, monitor plots (residual, statistic, force, surface, or volume), or the mesh (useful primarily for moving mesh simulations). Before you begin the calculation, you will specify and display the variables and types of plots you want to animate, and how often you want plots to be saved. At the specified intervals, FLUENT will display the requested plots, and store each one. When the calculation is complete, you can play back the animation sequence, modify the view (for grid, contour, and vector plots), if desired, and save the animation to a series of hardcopy files or an MPEG file
Instructions for defining a solution animation sequence are provided in
Section 25.20.1. Sections 25.20.1 and 25.20.1 describe how to play back and save the animation sequences you have created, and Section 25.20.1 describes how to read a previously-saved animation sequence into FLUENT.
Defining an Animation Sequence
You can use the Solution Animation panel (Figure 25.20.1) to create an animation sequence and indicate how often each frame of the sequence should be created. The Animation Sequence panel (Figure 25.20.2), opened from the Solution Animation panel, allows you to define what each sequence displays (e.g., contours or vectors of a particular variable), where it is displayed, and how each frame is stored.
You will begin the animation sequence definition in the Solution Animation panel (Figure 25.20.1).
Solve Animate Define...
The procedure is as follows:
| Note that the
FLUENT metafiles created for each frame in the animation sequence contain information about the entire scene, not just the view that is displayed in the plot. As a result, they can be quite large. By default, the files will be stored to disk. If you do not want to use up disk space to store them, you can instead choose to store them in memory. Storing them in memory will, however, reduce the amount of memory available to the solver. Note that the playback of a sequence stored in memory will be faster than one stored to disk.
| An advantage to saving the animation sequence using the
PPM Image option is that you can use the separate pixmap image files for the creation of a single GIF file. GIF file creation can be done quickly with graphics tools provided by other third-party graphics packages such as
convert. For example, if you save the PPM files starting with the string
sequence-2, and you are using the
ImageMagick software, you can use the
convert command with the
-adjoin option to create a single GIF file out of the sequence using the following command.
convert -adjoin sequence-2_00*.ppm sequence2.gif
When FLUENT is iterating, the active graphics window is set to this window to update the plot. If you want to maintain each animation in a separate window, specify a different Window ID for each.
The first time that you select Contours, Vectors, or XY Plot, or one of the monitor types if you select Monitor, FLUENT will open the corresponding panel (e.g., the Contours panel or the Vectors panel) so you can modify the settings and generate the display. To make subsequent modifications to the display settings for any of the display types, click the Properties... button to open the panel for the selected Display Type.
| You must click
Plot to initialize the scene to be repeated during the calculation.
See below for guidelines on defining display properties for grid, contour, and vector displays.
Note that, when you click OK in the Animation Sequence panel for a sequence, the Active button for that sequence in the Solution Animation panel will be turned on automatically. You can choose to use a subset of the sequences you have defined by turning off the Active button for those that you currently do not wish to use.
Guidelines for Defining an Animation Sequence
If you are defining an animation sequence containing grid, contour, or vector displays, note the following when you are defining the display:
Playing an Animation Sequence
Once you have defined a sequence (as described in Section 25.20.1) and performed a calculation, or read in a previously created animation sequence (as described in Section 25.20.1), you can play back the sequence using the Playback panel (Figure 25.20.3).
Solve Animate Playback...
Under Animation Sequences in the Playback panel, select the sequence you want to play in the Sequences list. To play the animation once through from start to finish, click the "play'' button under the Playback heading. (The buttons function in a way similar to those on a standard video cassette player. "Play'' is the second button from the right--a single triangle pointing to the right.) To play the animation backwards once, click the "play reverse'' button (the second from the left--a single triangle point to the left). As the animation plays, the Frame scale shows the number of the frame that is currently displayed, as well as its relative position in the entire animation. If, instead of playing the complete animation sequence, you want to jump to a particular frame, move the Frame slider bar to the desired frame number, and the frame corresponding to the new frame number will be displayed in the graphics window.
| For smoother animations, turn on the
Double Buffering option in the
Display Options panel (see Section
28.2.7). This will reduce screen flicker during graphics updates.
Additional options for playing back animations are described below.
Modifying the View
If you want to replay the animation sequence with a different view of the scene, you can use your mouse to modify (e.g., translate, rotate, zoom) it in the graphics window where the animation is displayed. Note that any changes you make to the view for an animation sequence will be lost when you select a new sequence (or reselect the current sequence) in the Sequences list.
Modifying the Playback Speed
Different computers will play the animation sequence at different speeds, depending on the complexity of the scene and the type of hardware used for graphics. You may want to slow down the playback speed for optimal viewing. Move the Replay Speed slider bar to the left to reduce the playback speed (and to the right to increase it).
Playing Back an Excerpt
You may sometimes want to play only one portion of a long animation sequence. To do this, you can modify the Start Frame and the End Frame under the Playback heading. For example, if your animation contains 50 frames, but you want to play only frames 20 to 35, you can set Start Frame to 20 and End Frame to 35. When you play the animation, it will start at frame 20 and finish at frame 35.
"Fast-Forwarding'' the Animation
You can "fast-forward'' or "fast-reverse'' the animation by skipping some of the frames during playback. To fast-forward the animation, you will need to set the Increment and click the fast-forward button (the last button on the right--two triangles pointing to the right). If, for example, your Start Frame is 1, your End Frame is 15, and your Increment is 2, when you click the fast-forward button, the animation will show frames 1, 3, 5, 7, 9, 11, 13 and 15. Clicking on the fast-reverse button (the first button on the left--two triangles pointing to the left) will show frames 15, 13, 11,...1.
If you want the playback of the animation to repeat continuously, there are two options available. To continuously play the animation from beginning to end (or from end to beginning, if you use one of the reverse play buttons), select Auto Repeat in the Playback Mode drop-down list. To play the animation back and forth continuously, reversing the playback direction each time, select Auto Reverse in the Playback Mode drop-down list.
To turn off the continuous playback, select Play Once in the Playback Mode list. This is the default setting.
Stopping the Animation
To stop the animation during playback, click the "stop'' button (the square in the middle of the playback control buttons). If your animation contains very complicated scenes, there may be a slight delay before the animation stops.
Advancing the Animation Frame by Frame
To advance the animation manually frame by frame, use the third button from the right (a vertical bar with a triangle pointing to the right). Each time you click this button, the next frame will be displayed in the graphics window. To reverse the animation frame by frame, use the third button from the left (a left-pointing triangle with a vertical bar). Frame-by-frame playback allows you to freeze the animation at points that are of particular interest.
Deleting an Animation Sequence
If you want to remove one of the sequences that you have created or read in, select it in the Sequences list and click the Delete button. If you want to delete all sequences, click the Delete All button.
| Note that if you delete a sequence that has not yet been saved to disk (i.e., if you selected
In Memory under
Storage Type in the
Animation Sequence panel), it will be removed from memory permanently. If you want to keep any animation sequences that are stored only in memory, you should be sure to save them (as described in Section
25.20.1) before you delete them from the
Sequences list or exit
Saving an Animation Sequence
Once you have created an animation sequence, you can save it in any of the following formats:
Note that, if you are saving hardcopy files or an MPEG file, you can modify the view (e.g., translate, rotate, zoom) in the graphics window where the animation is displayed, and save the modified view instead of the original view.
Solution Animation File
If you selected Metafile or PPM Image under Storage Type in the Animation Sequence panel, then FLUENT will save the solution animation file for you automatically. It will be saved in the specified Storage Directory, and its name will be the Name you specified for the sequence, with a .cxa extension (e.g., pressure-contour.cxa). In addition to the .cxa file, FLUENT will also save a metafile with a .hmf extension for each frame (e.g., pressure-contour_0002.hmf). The .cxa file contains a list of the associated .hmf files, and tells FLUENT the order in which to display them.
If you selected In Memory under Storage Type, then the solution animation file ( .cxa) and the associated metafiles ( .hmf) will be lost when you exit from FLUENT, unless you save them as described below.
You can save the animation sequence to a file that can be read back into FLUENT (see Section 25.20.1) when you want to replay the animation. As noted in Section 25.20.1, the solution animation file can be used for playback in FLUENT independent of the case and data files that were used to generate it.
To save a solution animation file (and the associated metafiles), select Animation Frames in the Write/Record Format drop-down list in the Playback panel, and click the Write button. FLUENT will save a .cxa file, as well as a .hmf file for each frame of the animation sequence. The filename for the .cxa file will be the specified sequence Name (e.g., pressure-contour.cxa), and the filenames for the metafiles will consist of the specified sequence Name followed by a frame number (e.g., pressure-contour_0002.hmf). All of the files ( .cxa and .hmf) will be saved in the current working directory.
You can also generate a hardcopy file for each frame in the animation sequence. This feature allows you to save your sequence frames to hardcopy files used by an external animation program such as ImageMagick. As noted above, you can modify the view in the graphics window before you save the hardcopy files.
To save the animation as a series of hardcopy files, follow these steps:
| Do not click the
Save... button in the
Graphics Hardcopy panel. You will save the hardcopy files from the
Playback panel in the next step.
It is also possible to save all of the frames of the animation sequence in an MPEG file, which can be viewed using an MPEG decoder such as mpeg_play. Saving the entire animation to an MPEG file will require less disk space than storing individual window dump files (using the hardcopy method), but the MPEG file will yield lower-quality images.
As noted above, you can modify the view in the graphics window before you save the MPEG file.
To save the animation to an MPEG file, follow these steps:
FLUENT will replay the animation and save each frame to a separate scratch file, and then it will combine all the files into a single MPEG file. The name of the MPEG file will be the specified sequence Name with an .mpg extension (e.g., pressure-contour.mpg), and it will be saved in the current working directory.
Reading an Animation Sequence
If you have saved an animation sequence to a solution animation file (as described in Section 25.20.1), you can read that file back in at a later time (or in a different session) and play the animation. Note that you can read a solution animation file into any FLUENT session; you do not need to read in the corresponding case and data files. In fact, you do not need to read in any case and data files at all before you read a solution animation file into FLUENT.
To read a solution animation file, click the Read... button in the Playback panel. In the resulting Select File dialog box, specify the name of the file to be read.