### 2.6.7. Restart Procedure for ANSYS Multi-field Runs

Restarting an ANSYS Multi-field run involves restarting both the ANSYS and CFX Solvers, in such as way that both continue from a consistent point in the ANSYS Multi-field run. A run cannot be restarted with new topology or mesh, but it can be restarted with different physics and/or solver settings.

For restarting the ANSYS part of the run, the key file is the database which contains the settings for the previous run. Various other files are also required for a restart to work correctly, and these will generally be present at the end of a successful run. (If the ANSYS input file for the initial run was prepared manually, it must have a `SAVE` command after the `SOLVE` command for all the required files to be generated.)

The procedure for each type of restart is listed below:

- Restart from End of Previous Run

- Restart from Intermediate Point During Previous Run

- Changing CFX Physics or ANSYS Multi-field Settings

- Changing ANSYS Physics

- Restart Limitations

#### 2.6.7.1. Restart from End of Previous Run

This is the most straightforward restart and can be performed in almost any circumstance when a run has finished normally (including when the run has been stopped manually). The procedure is as follows:

1. If you stopped the initial run before completion and want to do a restart to finish it off, then the coupling time duration will already be correct in the multi-field setup in CFX-Pre. However, if the initial run ran to completion and you now want to extend it, you must first set the coupling time duration to have an appropriate end time for the restarted run. This can be done by editing the CCL in the CFX results file from the initial run, or by rewriting the original CFX-Solver input file with the new setting (found on the Analysis Type panel).

2. Start the CFX-Solver Manager and open the Define Run dialog box. Select the CFX results file from the end of the previous run as the CFX-Solver input file if this contains the correct coupling time duration; otherwise, select the CFX-Solver input file with the correct coupling time duration and use the previous results file as an initial values file.

   The Continue History From check box should always be selected for Multi-field restarts, otherwise the Mesh Displacements will be reset to zero. See Continuing the History in the CFX-Solver Modeling Guide for further details.

3. On the MultiField tab, enable the Restart ANSYS Run toggle, and browse to find the database (*.db) from the initial run. The database can be found in the directory `run_name`.ansys from the previous run if that run was launched by the CFX-Solver Manager or the CFX-Solver script `cfx5solve`.

4. Start the run as normal. Behind the scenes, the CFX-Solver script will copy the required files from the previous ANSYS run into the new ANSYS working directory so that everything should proceed smoothly.

#### 2.6.7.2. Restart from Intermediate Point During Previous Run

You may want to restart from an intermediate point of a previous run if the run failed to complete successfully. Restarting from an intermediate point is possible only if you requested restart files to be written by both the CFX and ANSYS solvers at the same coupling step in the run history. Restart files for the CFX solver can be created as usual, by writing backup files at an appropriate frequency. Restart files for the ANSYS solver can be created using the MFOU and MFRC commands, for example:

    MFOU,10
    MFRC,50,1

The above commands create ANSYS results data every 10th coupling step (MFOU,10) and restart data every 50th coupling step, with only the most recent restart data kept (MFRC,50,1). See the ANSYS documentation for further details on these commands. When restart data is written, results data must also be written for a successful restart (the MFRC frequency must be a multiple of the MFOU frequency). The above commands can be added to the ANSYS input file directly or to a Commands object in the relevant Solution item in the tree within Simulation. The ANSYS run directory will contain a *.rdb file when restart data is written and this should be used for the restart. Assuming that the restart from an intermediate point is available, the procedure is as follows:

1. Coupling Initial Time should be left as `Automatic`. This will pick up the most recent restart time from the *.rdb file. If you want to restart from an earlier time point, the Coupling Initial Time should be set to `Value`, with the value set to the time value that you want to restart from. This can be done by editing the CCL in the “full” CFX backup (*.bak) or “full” CFX transient file (*.trn) from the initial run, or by rewriting the original CFX-Solver input file with the new setting (found on the Analysis Type panel).

2. Start the CFX-Solver Manager and open the Define Run dialog box. Select the CFX backup file or the full transient results file corresponding to the restart point as the CFX-Solver input file, or as the Initial Values file if a Solver input file has already been provided. The backup or full transient file should be consistent with the restart time used in the ANSYS *.rdb file.

   The Continue History From check box should always be selected for Multi-field restarts, otherwise the Mesh Displacements will be reset to zero. See Continuing the History in the CFX-Solver Modeling Guide for further details.

3. On the MultiField tab, enable the Restart ANSYS Run toggle, and browse to find the database (*.rdb) from the initial run. The database can be found in the directory `run_name`.ansys from the previous run if that run was launched by the CFX-Solver Manager or the CFX-Solver script `cfx5solve`.

4. Start the run as normal. Behind the scenes, the CFX-Solver script will copy the required files from the previous ANSYS run into the new ANSYS working directory so that everything should proceed smoothly. Note that when starting through the CFX-Solver Manager, the Mechanical Input File must still be specified but it is not used. When starting from the CFX-Solver script, the Mechanical Input File does not need to be provided.

However, restarting from an intermediate point of a previous run is not always possible:

- Restarting from an intermediate point is limited to ANSYS runs that contain only mechanical and/or thermal physics. If the ANSYS setup contains additional physics such as electromagnetic physics, then it will not be possible.

- Restarting from an intermediate point requires a CFX full backup or full transient file for that time value in addition to having the appropriate ANSYS files for that time value.

Performing a restart from an intermediate point of a run that was itself a restart has additional limitations:

- When a run is restarted from the end of the previous run, the *.db file is copied from the initial Mechanical run to the new Mechanical working directory (assuming that you selected the *.db file from the initial Mechanical run, as is recommended). However, the *.rdb file is not copied as it is not used. Even if this second run then writes out restart files, the *.rdb file is not written out again by the Mechanical solver into the new working directory. If it is later desired to restart from one of these restart files from the second run, then the *.rdb file from the initial run must be manually copied from the initial run into the same directory as the later Mechanical restart files, before the subsequent restart can be performed.

- A run that is restarted from an *.rdb file will run using the settings from the initial run. Any subsequent changes to the Mechanical problem definition, such as at the start of the first restarted run, will be disregarded unless they are reapplied.

- If any run is a steady-state run, then subsequent runs may have problems with synchronization of the output of Mechanical restart files and the output of CFX full transient/backup files. For example, if the first run is a steady-state run, then the typical setup has ANSYS performing one load step and CFX performing multiple iterations. Therefore the total step count of CFX and ANSYS will not be the same, and files output using the MFRC command every N ANSYS steps will not necessary be synchronized with the CFX transient/backup files output every N CFX timesteps/iterations. There is no easy way to avoid this other than tightly controlling how many iterations are done by each solver to avoid the synchronization issues. For example, one way to set this up would be to have the initial steady-state case calculate N load steps (where N is the desired frequency of output of the restart files) and to either carefully limit the number of CFX iterations, or to perform the restart for CFX with Continue History off so that the CFX iteration count is started from zero again.

#### 2.6.7.3. Changing CFX Physics or ANSYS Multi-field Settings

Any physics or setup contained in the CFX definition can be modified on a restart, providing that you do not change the geometry, connectivity, mesh or boundary condition names or locations. The changes can be made by editing the CFX results file before using it in a restart, or by writing a modified CFX-Solver input file and using the previous results file as an initial values file.

#### 2.6.7.4. Changing ANSYS Physics

There is no built-in support for changing the ANSYS physics within Simulation and having it used for restarting an ANSYS Multi-field run. If you want to change the ANSYS setup for a restart, you will have to add ANSYS commands to the ANSYS input file. Commands available for an ANSYS input file are documented in the ANSYS documentation, in ANSYS Command Reference. If you are not already familiar with working with ANSYS commands, then it is recommended that you avoid this type of restart.

The recommended procedure for restarting with different ANSYS physics or solver setup is as follows:

1. Start the CFX-Solver Manager and open the Define Run dialog box. Select the appropriate CFX-Solver input file or results file for the restart.

2. On the MultiField tab, set MFX Run Mode to `Process Input File only`. Also enable the Restart ANSYS Run toggle, and browse to find the database (*.db or *.rdb) from the initial run. The database can be found in the directory `run_name`.ansys from the previous run if that run was launched by the CFX-Solver Manager or the CFX-Solver script `cfx5solve`.

3. Start the run as normal. Behind the scenes, the CFX-Solver script will create the ANSYS working directory and place a file called ANSYS.mf inside it.

4. In a text editor, edit the file ANSYS.mf to add ANSYS commands to make any changes to the physics that you require.

5. In the CFX-Solver Manager, define a new run. Select the appropriate CFX-Solver input file or results file for the restart.

6. On the MultiField tab, set MFX Run Mode to `Start ANSYS and CFX`. For ANSYS Input File, select the ANSYS.mf file that you have just been editing. Toggle off `Process ANSYS Input File`. Ensure that the Restart ANSYS Run check box is still selected, and browse to find the database (*.db or *.rdb) from the initial run. The database can be found in the directory `run_name`.ansys from the previous run if that run was launched by the CFX-Solver Manager or the CFX-Solver script `cfx5solve`.

7. Start the run. Behind the scenes, the CFX-Solver script will copy the required files from the previous ANSYS run into the new ANSYS working directory so that everything should proceed smoothly.

#### 2.6.7.5. Restart Limitations

Restarted simulations will give results that are identical to continuous simulations only if fields and loads are converged within each multi-field/coupling timestep and ANSYS solves first within each stagger/coupling iteration.

Discontinuities in the convergence history upon restarts can be eliminated by running the ANSYS field solver first within each stagger iteration, and executing two or more stagger iterations per multi-field timestep.

Release 18.2 - © ANSYS, Inc. All rights reserved.