Chapter 1: Introduction to the Ansys CFX Tutorials

The CFX tutorials are designed to introduce general techniques used in CFX and to provide tips on advanced modeling.

The initial tutorials introduce general principles used in CFX, including setting up the physical models, running CFX-Solver and visualizing the results in CFD-Post; the later tutorials highlight specialized features of CFX.

This manual contains the following tutorials:

1.1. Setting the Working Directory and Starting Ansys CFX in Stand-alone Mode

Before you start CFX-Pre, CFX-Solver Manager, or CFD-Post, set the working directory. The procedure for setting the working directory and starting Ansys CFX in stand-alone is listed below:

  1. Start the Ansys CFX Launcher.

    You can start the launcher in any of the following ways:

    • On Windows:

      • From the Start menu, select All Programs > ANSYS 2024 R2 > Fluid Dynamics > CFX 2024 R2.

      • In a Command Prompt that has its path set up correctly to run CFX, enter cfx5 (otherwise, you will need to type the full pathname of the cfx5 command).

    • On Linux, enter cfx5 in a terminal window that has its path set up to run CFX.

  2. Specify the Working Directory in the launcher window.

  3. Click the CFX-Pre 2024 R2 button.

  4. If you were directed here at some point during a tutorial, return to that location.


Note:  All tutorials assume that the CFX run history and multi-configuration options, under the Load Results File dialog box in CFD-Post, is set to Load only the last results.


1.2. Running Ansys CFX Tutorials Using Ansys Workbench


Tip:  You may find it useful to open the Ansys CFX help from the Ansys CFX Launcher (which does not take up a license).


1.2.1. Setting Up the Project

  1. Start Ansys Workbench.

    • To launch Ansys Workbench on Windows, click the Start menu, then select All Programs > Ansys 2024 R2 > Workbench 2024 R2.

    • To launch Ansys Workbench on Linux, open a command line interface, type the path to runwb2 (for example, ~/ansys_inc/v242/Framework/bin/Linux64/runwb2), then press Enter.

  2. From the main menu, select File > Save As.

  3. In the Save As dialog box, browse to a working directory and specify a filename for the project.

  4. Click Save.

  5. In the Toolbox pane, open Component Systems and double-click CFX. A CFX system opens in the Project Schematic.


    Note:  You use a CFX component system because you are starting with a mesh. If you want to create the geometry and mesh, you will start with a Fluid Flow (CFX) system.


  6. Type in the new name, such as System 1, to replace the highlighted text below the system.

    Alternatively, you can right-click the first cell in the system and select Rename. The name will be highlighted. Now you can change the highlighted text by typing in the new name.

  7. In the Project Schematic, right-click the Setup cell and select Edit to launch CFX-Pre.

  8. Continue from the section of the tutorial that provides instructions for defining the case using CFX-Pre. The section is typically named Defining the Case Using CFX-Pre.

1.2.2. Writing the CFX-Solver Input (.def) File

When running Ansys CFX within Ansys Workbench, no action is required for this section of the tutorial. The required files are automatically transferred between the cells within the CFX component system. Continue from Obtaining the Solution Using CFX-Solver Manager.

1.2.3. Obtaining the Solution Using CFX-Solver Manager

Once the simulation setup is complete, the Solution cell prompts you to refresh it. To refresh that cell:

  • Right-click the Solution cell and select Refresh.


    Note:  If the Solution cell displays a prompt to perform an update, ignore it and proceed to the next step.


To obtain a solution, you need to launch the CFX-Solver Manager and subsequently use it to start the solver:

  1. Right-click the Solution cell and select Edit.

    The CFX-Solver Manager appears with the Define Run dialog box displayed.

  2. Continue from the Obtaining a Solution Using CFX-Solver Manager section of the tutorial.

1.2.4. Viewing the Results Using CFD-Post

When CFX-Solver has finished, a completion message appears in a dialog box. Click OK.

Alternatively, a message saying This run of the Ansys CFX-Solver has finished is displayed in the final line of the CFX-Solver Output file in the CFX-Solver Manager.

Once CFX-Solver has finished, you can use CFD-Post to review the finished results. At this point, the Results cell in Ansys Workbench prompts you to refresh:

  1. Right-click the Results cell and select Refresh.

  2. When the refresh is complete, right-click the Results cell and select Edit to open CFD-Post.

  3. Continue from the Viewing the Results in CFD-Post section of the tutorial.

If this is the final section of your tutorial, continue from Closing the Applications. If you are running Ansys CFX tutorials with a sequence of multiple simulations, continue from Creating CFX Component Systems for Multiple Simulations.

1.2.5. Creating CFX Component Systems for Multiple Simulations

Now that you have set the physics in the initial state, you will duplicate the CFX component system created earlier and edit the physics in the new system. To duplicate the existing CFX component system:

  1. In the Ansys Workbench Project Schematic, right-click the first cell in System 1 and select Duplicate.

    A new system named Copy of System 1 will appear in the Project Schematic.

  2. Type in the new name System 2 to replace the highlighted text below the system.

  3. Click the Solution cell of System 1 and drag it to the Solution cell of System 2.

    You will now see a line, indicating a transfer connection, going from Solution cell of System 1 to the Solution cell of System 2.

  4. Once you have set up the new CFX component system, continue from Step 5 of Setting Up the Project.


    Note:  In the tutorial, ignore the steps that tell you to set the initial values file in the Define Run dialog box for CFX-Solver Manager. Dragging the solution cell between systems automatically sets the initialization options in CFX-Solver Manager.


1.2.6. Closing the Applications

Close Ansys Workbench (and the applications it launched) by selecting File > Exit from Ansys Workbench. Ansys Workbench prompts you to save all your project files.

1.3. Changing the Display Colors

If viewing objects in Ansys CFX becomes difficult due to contrast with the background, you can change the colors for improved viewing. The color options are set in different places, depending on how you run CFX:

  1. Select Edit > Options.

    The Options dialog box appears.

  2. Adjust the color settings under CFX-Pre > Graphics Style (for CFX-Pre) or CFD-Post > Viewer (for CFD-Post).

  3. Click OK.

  4. If you were directed here at some point during a tutorial, return to that location.

1.4. Editor Buttons

The Ansys CFX interface uses editors to enter the data required to set up and post-process a simulation. The editors have standard buttons, which are described next:

  • Apply applies the information contained within all the tabs of an editor.

  • OK is the same as Apply, except that the editor automatically closes.

  • Cancel and Close both close the editor without applying or saving any changes.

  • Reset returns the settings for the object to those stored in the database for all the tabs. The settings are stored in the database each time the Apply button is clicked.

  • Defaults restores the system default settings for all the tabs of the edited object.

1.5. Using Help

To open the ANSYS Help, select Help > Contents.

Context-sensitive help is provided for many of the details views and other parts of the interface. To invoke the context-sensitive help for a particular details view or other feature, ensure that the window is active, place the mouse pointer over the feature, and press F1. Not every area of the interface supports context-sensitive help.