You can request ANSYS Fluent to automatically save case and data files at specified intervals during a calculation. This is especially useful for time-dependent calculations, since it allows you to save the results at different time steps, flow times, or crank angles (for in-cylinder simulations) without stopping the calculation and performing the save manually. You can also use the autosave feature for steady-state problems, and thus examine the solution at different stages in the iteration history.
Automatic saving is specified using the Autosave Dialog Box (Figure 3.2: The Autosave Dialog Box), which is opened by clicking the button next to the Autosave Every text box in the Calculation Activities task page.
Calculation Activities
Specify how often you would like to save your modified files by entering the frequency in the Save Data File Every number-entry field. Save Data File Every is set to zero by default, indicating that no automatic saving is performed.
For transient in-cylinder simulations, specify whether you want to save the data by Time Steps or Crank Angles.
If you choose to save the case file only if it is modified, then select If Modified During the Calculation or Manually under When the Data File is Saved, Save the Case File. Note that the case file will be saved whether you make a manual change, or if ANSYS Fluent makes a change internally during the calculation. If you choose to save the case file every time the data file is saved, then select Each Time.
Important: To save only the data files, use the following TUI option:
file → auto-save → case-frequency → if-mesh-is-modified
This will result in the options in the When the Data File is Saved, Save the Case group box being disabled in the Autosave dialog box. In essence, this TUI command forces ANSYS Fluent to the save case file only when the mesh is modified. It does not disable case file saving, but reduces it to an absolute minimum. This is necessary to do so since you cannot read a data file without a case file containing a matching mesh.
For steady-state solutions, specify the frequency in iterations. For transient solutions, specify it in time steps (unless you are using the explicit time stepping formulation, in which case specify the frequency in iterations). For transient in-cylinder solutions, you can choose to specify the frequency in crank angles. If you define a frequency of 5, for example, a case file is saved every 5 iterations, time steps, or crank angles.
If you have limited disk space, restrict the number of files saved by ANSYS Fluent by selecting the Retain Only the Most Recent Files option. When selected, enter the Maximum Number of Data Files you would like to retain. Note that the case and data files are treated separately with regard to the maximum number of files saved when overwriting. For example, if the value of Maximum Number of Data Files is set to five, ANSYS Fluent saves a maximum of five case and five data files, irrespective of the frequency. After the maximum limit of files has been saved, ANSYS Fluent begins overwriting the earliest existing file.
Note: When the Retain only the Most Recent Files option is selected, the solution history currently in memory will be discarded and the solution history reset.
If you have generated data (either by initializing the solution or running the calculation) you can view the list of standard quantities that will be written to the data file as a result of the autosave, and even select additional quantities for postprocessing in alternative applications. Click the button to open the Data File Quantities dialog box, and make any necessary selections. For details, see Setting Data File Quantities.
Enter a root name for the autosave files in the File
Name text box. When the files are saved, a number will be appended to this root
name to indicate the point at which it was saved during the calculation: for steady-state
solutions, this will be the iteration number, whereas for transient solutions it will be
either the time step number, flow time, or crank angle (depending on your selection in the
step that follows). An extension will also be automatically added to the root name
(.cas or .dat). If the specified
File Name ends in .gz or
.Z, appropriate file compression is performed. For details about
file compression, see Reading and Writing Compressed Files. For details on
autosaving files in the hierarchical data format (HDF), see Reading and Writing Files Using Hierarchical Data Format (HDF).
For transient calculations, make a selection from the Append File Name with drop-down list to indicate whether you want the root file name to be appended with the time-step, flow-time or crank-angle (see Figure 3.2: The Autosave Dialog Box). If you select either of the latter two, you can set the Decimal Places in File Name to determine the ultimate width of the file name.
Consider a transient case for which you want to save your case
and data files at known time steps. The procedure you would follow
is to first set the frequency in the Save Data File Every text box. Select Each Time if you want both
case and data files saved at the same interval. Then enter my_file for the File Name. Finally,
select time-step from the Append File
Name with drop-down list. An example of the resulting files
saved would be
my_file-0005.cas
my_file-0005.dat
indicating that these files were saved at the fifth time step.
You can revise the instructions for the previous example to instead save case and data files at known flow times, by selecting flow-time from the Append File Name with drop-down list. The default Decimal Places in File Name will be six. An example of the resulting files saved would be
my_file-0.500000.cas
my_file-0.500000.dat
indicating that these files were saved at a flow time of 0.5 seconds.
For steady-state and transient cases, you have the option of
automatically numbering the files (as described in Automatic Numbering of Files), and thereby include
further information about when the files were saved. This involves
the addition of special characters to the File Name. For example, you may want the file names to convey the flow times
with their corresponding time steps (transient cases only). Select time-step from the Append File Name with, and enter a File Name that ends with -%f to automatically number the files with the flow
time. Thus, entering a File Name of filename-%f could result in a saved case file named filename-000.500000-0010.cas. The conventions used in
this example can be explained as follows:
filename- is the file name
you entered when autosaving your solution.
000.500000 is the result
of the special character %f added to the
file name, and is the flow time. This flow time has a field width
of ten characters, which allows for six decimal places (as discussed
in Automatic Numbering of Files).
-0010 is the appended time-step, as designated by the selection in the Append File Name with drop-down list.
.cas is the file extension
automatically added when using the autosave option.
All of the autosave inputs are stored in memory when you click in the Autosave dialog box, and can then be saved with the case file.