### 2.6.2. General Procedure

The steps that take place when a full ANSYS Multi-field run (where MFX Run Mode is set to `Start ANSYS and CFX`) is launched from the CFX-Solver Manager are listed below.

1. User supplies CFX-Solver input file and ANSYS input file.

2. If the ANSYS input file does not already contain multi-field settings, then Process ANSYS Input File must be selected, and a new "multi-field" file with extension .mf is created in the ANSYS working directory. This processing step is described more fully in Processing the ANSYS Input File.

3. The ANSYS Solver is launched, reading input from the new .mf file if it was created in the previous step, or from the original ANSYS input file if that file already contained the multi-field settings.

4. CFX-Solver is launched and is already set up to communicate with ANSYS Solver. The full range of parallel and other solver options (such as double precision) is available for CFX-Solver when run as part of an ANSYS Multi-field run.

5. The run executes.

Many of these steps can be performed separately if required. The workflow and reasons for doing this are described in the following sections:

- Starting ANSYS CFX and ANSYS Separately

- Process ANSYS Input File Only

- Directory Structure

- Starting an ANSYS Multi-field Run from the Command Line

If a run is to be restarted, a different procedure applies. This described in Restart Procedure for ANSYS Multi-field Runs.

#### 2.6.2.1. Starting ANSYS CFX and ANSYS Separately

The normal procedure for launching an ANSYS Multi-field run from CFX-Solver Manager launches both CFX-Solver and ANSYS Solver. However, there are certain circumstances when you may want to launch them separately. In particular, you may want to run the two solvers on different machines. In this case, you can use the CFX-Solver Manager to start each solver separately. The procedure is as follows:

1. Ensure that the ANSYS input file and CFX-Solver input file for the run are present on the machine on which you want to run ANSYS Solver. Start CFX-Solver Manager on this machine.

2. Start the ANSYS run with MFX Run Mode set to `Start ANSYS only`.

3. Ensure that the CFX-Solver input file for the run is present on the machine on which you want to run CFX-Solver. Start CFX-Solver Manager on this machine.

4. Start the CFX run with MFX Run Mode set to `Start CFX only`. You will need to supply a host name and port number that tell the CFX-Solver how to communicate with the ANSYS solver that is already running. Host Name is the machine on which the ANSYS Solver was started. Port Number is determined by the ANSYS Solver when it starts, and can be read from the file `jobname`.port in the ANSYS working directory once the ANSYS Solver has started. If the CFX-Solver Manager was used to start the ANSYS Solver, then the port number appears in the CCL under `EXECUTION CONTROL/SOLVER STEP CONTROL/PROCESS COUPLING/Host Port`.

Note that this procedure effectively sets up two separate runs as far as the CFX-Solver Manager is concerned; each can be monitored as a separate run.

If you do not have CFX-Solver Manager installed on the machine where ANSYS Solver is going to run, you can start the ANSYS Solver from the ANSYS CFX Launcher instead. In this case, the appropriate host name and port number are displayed in a dialog box from the ANSYS Launcher as the argument `-cplg-host `Port_Number`@`Host_Name``.

#### 2.6.2.2. Process ANSYS Input File Only

The processing of an ANSYS input file is a procedure that takes a solid physics setup in the form of an ANSYS input file and a multi-field setup from a CFX-Solver input file, and combines them into a new ANSYS input file that contains both the solid physics setup and the multi-field setup. The new ANSYS input file has a name of the form `jobname`.mf and can be used to start the ANSYS Solver as part of an ANSYS Multi-field run.

Usually the processing takes place as part of launching the ANSYS Solver from the CFX-Solver Manager. However, you may want to do it as a preprocessing step if, for some reason, you want to modify or check the new ANSYS input file before use, or if you want to use it outside of the CFX-Solver Manager. This is also a necessary part of restarting an ANSYS Multi-field run with a change to the solid physics. For details, see Restart Procedure for ANSYS Multi-field Runs. The procedure for a non-restart run is as follows:

1. Ensure that the ANSYS input file and CFX-Solver input file for the run are present and start the CFX-Solver Manager.

2. Perform the processing by defining a new run, setting MFX Run Mode to `Process Input File only`.

3. Use the new ANSYS input file `jobname`.mf in the ANSYS working directory as desired.

If you subsequently want to use this file to start the ANSYS Solver, then click the MultiField tab of the Define Run dialog box, specify the new file as the ANSYS input file and clear Process ANSYS Input File.

The processing step is described more fully in Processing the ANSYS Input File.

#### 2.6.2.3. Directory Structure

For a normal CFX run (not an ANSYS Multi-field run), you must specify a working directory in the Define Run dialog box. This defaults to the directory from which the CFX-Solver Manager was started.

Once the run is started, a run name is generated. This is the name of the CFX-Solver input file with the extension removed and a three-digit number added. The number is usually 001 if this is the first time CFX-Solver Manager is used for this CFX-Solver input file. In general, it is the lowest number that prevents files from previous runs being overwritten.

While the run is in progress, a CFX working directory with the name `jobname`.dir will exist within the CFX working directory, which contains the temporary files for CFX-Solver. When the run has finished, you will find the files `run_name`.res and `run_name`.out in the CFX working directory, and in certain circumstances (generally when transient results files or backup files are present) a directory `run_name` will also be present.

This directory structure is unchanged for the CFX part of an ANSYS Multi-field run. However, a new directory `run_name`.res is also created in the CFX working directory. This directory is used as the ANSYS working directory by the ANSYS solver, and all files generated by ANSYS will be placed in this directory, including the ANSYS results file.

Almost all files produced by ANSYS have a name of the form `jobname`.* (the exception is the ANSYS GST file, which will always be called `ANSYS.gst` when a run is started from the CFX-Solver Manager or ANSYS Launcher). ANSYS Multi-field runs started from the CFX-Solver Manager have a default jobname of `ANSYS`. So, for example, the results file will be ANSYS.rst for a case involving structural physics or ANSYS.rth for a case involving only thermal physics. Note also that all text output generated by the ANSYS solver (that is, standard error and standard output) is written to the `ANSYS.stdout` file. These files will be in the directory `run_name`.ansys. The jobname can be specified explicitly if you start the ANSYS Multi-field run from the command line. For details, see Starting an ANSYS Multi-field Run from the Command Line.

#### 2.6.2.4. Starting an ANSYS Multi-field Run from the Command Line

An ANSYS Multi-field run can be started from the command line using the `cfx5solve` command. For example:

    cfx5solve -def file.def -double -mfx-run-mode "Start\ ANSYS\ and\ CFX" \
       -ansys-input file.inp -ansys-arguments "-np\ 2"

This starts both solvers using the files specified, running CFX in double-precision and using two partitions for ANSYS. Note that the escape character "\" is used before spaces in the arguments as shown and is necessary on some systems.

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