Ansys CFX-Solver

This node allows you to use the Ansys CFX solver within an optiSLang workflow, automating the following functions:

  • Specifying CFX Expression Language (CEL) expressions as input parameters.

  • Executing the Computational Fluid Dynamics (CFD) solution.

  • Using monitor points as output parameters, including monitor points defined using CEL expressions.

You can also use two other CFX nodes:

Setup

The node can be configured manually or by using a wizard. The reference case must be a CFX definition (.def) or results (.res) file. Suitable expressions and monitor points must be defined to provide the required parameters and responses, as described below. Prior to use, ensure that the reference case runs successfully and generates reliable results.

Solver Wizard Setup

  1. Drop the Solver wizard onto the Scenery pane to set up new process chain, or onto an existing subsystem to extend a solver chain, as described in Solver Wizard.

  2. From the list of solvers, select Ansys CFX-Solver.

  3. Select your CFX model file (.def or .res) and click Open.

    A parametric system containing a preconfigured Ansys CFX-Solver node is created automatically.

  4. Double-click the Ansys CFX-Solver node to open its edit dialog box, where you can register parameters and responses and commit further configuration adjustments.

Parameters

Input parameters can be any expression defined in CFX in the Expressions section. The reference case must be configured such that all required inputs are defined as expressions. For details, see the Expressions section in the CFX-Pre User’s Guide. Available input parameters are listed in the Inputs list after the reference file is loaded.

Responses

The availability of outputs depends on the reference file type:

Reference File TypeOutput Availability
Definition (.def)User-defined monitor points only
Results (.res)All monitor data

Although some monitor data is generated by default, it will usually be necessary to create suitable user defined monitor points for the required outputs. For details, see the Output Control section in the CFX-Pre User’s Guide.

The following image shows an example of the inputs and outputs available for a results file, with expressions and user defined monitor points:

Parallelization

Several options are available to enable parallelization:

  • Design points may be processed concurrently using the Additional Options > Maximum in parallel option.

  • The Advanced Options >Designs per execution option is also supported, although its use does not currently provide any performance advantage.

  • Additionally, the CFX-Solver may be run in parallel for each design point, by specifying appropriate Custom Solver Arguments. In such cases the mesh will also be partitioned for each design point independently, unless specific measures are taken for partitioning the mesh more efficiently (for example, a separate Ansys CFX-Partitioner node positioned upstream in the workflow). Note that not all cases benefit from solver parallelization. The mesh size is a particularly important consideration. For more information see Using the Solver in Parallel in the CFX Solver Modeling Guide.

These parallelization options may be used in combination for optimal utilization of the available hardware.

Settings

This node provides the following settings:

NameDefault ValueDescription
Set Custom CFX Root DirectoryFalseSpecifies whether a custom CFX root directory will be set. Unless enabled, the auto-detected default value shown in CFX Root Directory will be used.
CFX Root DirectoryCFX root directory if found in same installation as optiSLang.

Allows you to specify the root directory of the CFX installation. In most cases where CFX and optiSLang are present in the same installation, the value of this setting will be pre-populated. You only need to change the CFX root directory if using a CFX installation in a different location.

Environment variables can be used in the path string to improve project portability. The patterns %VAR% and ${VAR} will be substituted with variable values, irrespective of the operating system.

Copy Reference FileFalseSpecifies whether the reference file will be copied into each design point directory. Unless enabled, a small text file of the same name is created in each design point directory and the CFX-Solver will instead use the reference file which conserves disk space, especially if the reference file is large.
Set Execution ControlFalse

Specifies whether execution control settings will be set. This setting controls the visibility of the Edit button and the Custom Solver Arguments setting.

The Edit button opens the CFX-Solver Manager, allowing many execution control settings to be edited. For details, see The Define Run Dialog Box in the CFX-Solver Manager User's Guide.

 
Custom Solver ArgumentsEmpty

Optional. Allows you to create additional command line arguments used for each run of the CFX solver, for example, to specify additional execution control options. For details of these options, see Starting the CFX-Solver from the Command Line in the CFX-Solver Manager User's Guide.

In most cases, custom solver arguments will not be needed as the Edit button allows many execution control settings to be edited from the CFX-Solver Manager.

Initialization OptionClear Generated Data

Specifies how any existing solution data will be handled.

  • Clear Generated Data

    Removes any existing solution data before running the design point solution.

  • Continue from Latest

    Uses the most recent data to provide initial values for the design point solution.

Keep Latest Solution Data OnlyTrueFor each design point, keep only the latest solution data. Data from earlier solutions will be deleted from the design point working directory.
Accepted Termination ConditionsFalse

This check box and the associated subordinate check boxes allow you to precisely adjust the conditions under which optiSLang will declare a finished design point successful or failed. This group of settings affects only how a finished CFX-Solver run is interpreted, and not how the run is started, executed, or terminated. The (default) collapsed setting has the same effect as the expanded state with subordinate check boxes activated as in the following image. The success label will be attributed based on a logical OR combination of all conditions checked in the sub-selection.

By default, the only termination condition selected is All target criteria reached and Run duration reached (Maximum simulation time).

 
Run Options

This node has general Run Options. The number of supported options is individual for each node.

Supported Versions

See the Supported Versions table.

Known Issues and Limitations

Console Error Messages

When used on Linux, messages may be output to the console where optiSLang was started. The messages are of the form:

SyntaxError: JSON.parse: Parse error

These messages do not affect the functionality of the plugin and can be ignored.