====== Ansys CFD-Post / CFX Help ====== * See CFD-Post: https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v252/en/cfd_post/cfd_post.html * See CFX: https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v252/en/cfx_intr/i1302231.html CFD-Post / CFX is included with ANSYS as part of our Newcastle University licensing agreement to all users of the HPC facilities. ---- ===== Running ===== To use ANSYS CFD-Post on Comet, please read the main [[:advanced:software:ansys|ANSYS guide]] first. ---- ===== CFD-Post tools ===== The following tools/commands are included with the CFD-Post component of ANSYS on Comet. ==== cfdpost ==== This is a **graphical** tool and must be run from the Comet [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service. Start a VNC Desktop session as normal, open the terminal application from the bottom bar and run: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfdpost The ''cfdpost'' application will launch: {{:advanced:ansys_cfdpost_cfdpost.png?800|}} A guide to the ''cfdpost'' application interface is available here: https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v252/en/cfd_post/i1298305.html ---- ==== cfx5 ==== This is a **graphical** tool and must be run from the Comet [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service. Start a VNC Desktop session as normal, open the terminal application from the bottom bar and run: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5 The ''cfx5'' application will launch: {{:advanced:ansys_cfdpost_cfx5.png?800|}} ---- ==== cfx5adapt ==== The documentation for this tool is incomplete ---- ==== cfx5cmds ==== The ''cfx5cmds'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5cmds -help Name: cfx5cmds Purpose: Edit the CFX-5 Command Language stored in a CFX-5 Solver Input File Synopsis: cfx5cmds -read|-write|-edit -definition -text [-help] [-verbose] [] denotes an optional argument. | separates mutually exclusive arguments. ... following an argument indicates that it may be repeated. <> denotes that substitution of a suitable value is required. All other arguments are keywords, some of which have a short form. Arguments: -read Read the command file from an ANSYS CFX Solver Input File and put it into a text file, which must not already exist. -write Write parameters contained in the text file to the ANSYS CFX Solver Input File. -edit Edit an ANSYS CFX Solver Input File using the CFX Solver File Editor -definition -def Use as the CFX-5 Solver Input File. -ccl -text Use as the command text file. Changes that affect the way the mesh is defined, or that affect the way the physics CCL relates to the topology of the mesh stored in the solver input file, cannot be made using the -ccl option. For example, locators for applying physics cannot be modified using the -ccl option. Such changes can, however, be made in CFX-Pre. -help -h Print this message. -verbose -v Specifying this option may result in additional output being sent to the UNIX standard output file (normally the screen). ---- ==== cfx5control ==== The ''cfx5control'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5control -help Name: cfx5control Purpose: Dynamic control of the ANSYS CFX Solver Synopsis: cfx5control -backup cfx5control -edit-commands [-no-backup] cfx5control -inject-commands [-no-backup] cfx5control -reset-priority cfx5control -stop [] denotes an optional argument. | separates mutually exclusive arguments. ... following an argument indicates that it may be repeated. <> denotes that substitution of a suitable value is required. All other arguments are keywords, some of which have a short form. Arguments: Specifies a directory in which the ANSYS CFX solver is currently running, such as StaticMixer_004.dir. -backup Instructs the ANSYS CFX solver running in the named directory to write a backup file. -edit-commands Reads the current CFX Command Language in use by the run, and starts the Command File Editor with it. When the editing is finished, the solver will re-read the updated Command Language. -inject-commands Reads the CFX Command Language data from the named file, and arranges for the ANSYS CFX Solver to read it in place of the existing Command Language for that run. Changes that affect the way the mesh is defined, or that affect the way the physics CCL relates to the topology of the mesh stored in the solver input file, cannot be made using this option. For example, locators for applying physics cannot be modified using this option. Such changes can, however, be made in CFX-Pre. -no-backup When used with -edit-commands or -inject-commands, the solver will not write a backup file before reading the new Command Language. -reset-priority -renice Resets the runtime priority of the ANSYS CFX Solver. should be one of: CFX Levels Nice increment Windows Priority Idle (0) 19 Low Low (1) 7 BelowNormal Standard (2) 0 Normal High (3) 0 AboveNormal This applies to all processes in a parallel run. A numeric setting is also accepted as shown in the CFX column. If the current priority level is the same as then there is no effect. Administrative privileges are required to increase the priority from a lower level to a higher level. -stop Tells the ANSYS CFX Solver running in the given directory to stop at the end of the current timestep. ---- ==== cfx5dfile ==== The ''cfx5dfile'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5dfile -help Name: cfx5dfile Purpose: Access CFX Data Files (Definition, Results and Commands) Synopsis: cfx5dfile [-read-monitor | -write-monitor ] [-compare-cmds | -diff-cmds | -read-cmds] [-list-csv-data | -extract-all-csv-data | -extract-csv-data -function | -extract-csv-data -filename | -read-csv-data -function | -read-csv-data -filename | -write-csv-data -function -filename ] [-read-parinfo] [-read-pre-state] [-read-resinfo] [-read-trninfo] [-remove-exec-control] [-output ] [-help] [-verbose] [] denotes an optional argument. | separates mutually exclusive arguments. ... following an argument indicates that it may be repeated. <> denotes that substitution of a suitable value is required. All other arguments are keywords, some of which have a short form. Arguments: Names a CFX data file to work with. Depending on the options chosen, this may be a Definition (".def") file, Results (".res") file, text file containing a Command Language listing (".ccl"), or a (".cfx") file generated by CFX Pre. -compare-cmds Compares the Command Language in and and sends a list of differences to the standard output, in a Command Language-like format. Parameters which have changed are listed, with the old value, an arrow "->", and the new value. -diff-cmds This option works exactly as -compare-cmds, except that if differences are found it sets the return value to 1; if no differences are found, the return value is 0. This makes it useful for scripting purposes. -extract-all-csv-data Reads all csv data, and saves it to a set of files in the current directory. If any of the files exist locally they will not be overwritten. -extract-csv-data -function -extract-csv-data -filename Reads the csv data associated with a specified file name or function name and saves it to the file name associated with the csv data in the current directory. -function Specify a profile function name. For use with other csv data handling options. -filename Specify a csv file name. For use with other csv data handling options. -list-csv-data Gives a list of the csv data stored in a file, which can be extracted with the -extract-csv-data or -read-csv-data options. -output Rather than sending output to the standard output, save it to the given file. -read-cmds Reads the CFX Command Language from the file, and sends it to the standard output (but see -output). -read-monitor Reads the most recent set of monitor point and residual data from the results file (which will include the combined results from all previous runs), and sends it to the standard output. If the file contains no monitor point data, nothing will be displayed. -read-parinfo Reads the parallel job information from the results file and sends it to standard output. -read-pre-state Reads the CFX Command Language representation of the saved CFX-Pre state from the file, which should normally be a .cfx file from CFX-Pre, and sends it to the standard output. -read-csv-data -function -read-csv-data -filename Reads the csv data associated with a specified file name or function name and sends it to the standard output, or to the file specified with the -output switch. -read-resinfo Reads the results information (history) dataset from the file, and prints it to the standard output. -read-termcond Reads the run termination conditions from a results file and prints them to the standard output. -read-trninfo Reads the transient results information (history) dataset from the file and prints it to the standard output. -remove-exec-control Removes the SIMULATION CONTROL/EXECUTION CONTROL CCL -user-point -user-point-cloud -user-line -user-line-cloud -user-surface Specify a user location. May be used wherever the -function option is permitted. For use with other csv data handling options. -write-monitor Inserts the monitor point data from the specified file into the results file. To concatenate multiple files, repeat the -write-monitor switch. Note that the data is written to the correct dataset for the final timestep in the supplied data. If the results file already contains monitor data for a different time step, that data will not be overwritten, but may become inaccessible. If the existing data is from a later timestep than the new file supplied, the new file will be hidden by the existing data. -write-csv-data -function -filename Writes the csv data contained in the named file to the specified CFX data file. The function name must also be specified. If cfx5dfile is used to modify a file, details of this action are recorded to a change log, which is stored in the file. ---- ==== cfx5gtmconv ==== The ''cfx5gtmconv'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5gtmconv -help gtmconvert: =========== The gtmconvert utility can be used to convert between a number of target mesh file formats. It can be used to perform standalone mesh import or to convert a GTM database into a definition file that can be viewed in CFX-Post. If appropriate physics CCL is available it can also be use to create a definition that can be run in a solver. In this case the exported mesh obeys the constraints imposed on it by the solver and the physics model. Basic usage: ------------ The basic way of invoking the conversion program is as follows: gtmconvert.exe [OPTIONS] SOURCE TARGET [AUXILIARY..] Where OPTIONS are optional options. SOURCE and TARGET are the names of the files to be converted from and to respectively. AUXILIARY is the name of one or more auxiliary files that might be used in the conversion process. The options can be mixed in with the files but the order of the files is important. The first file is always taken as the source while the second is the target. Any third or subsequent files if present are assumed to be auxiliary files. The method for specifying files and the permitted file types for source, target and auxiliary files are discussed later. The same file should not be used twice unless it is being used as a source and auxiliary file. By default gtmconvert will not modify an existing target file. To change this use either the -o(verwrite) or -a(ppend) options to replace or add to the existing file. Currently the append option will only work if the target is a GTM database. Only one of these options should be specified. Specifying source, target and auxiliary files: ---------------------------------------------- Source, target and auxiliary files can be specified in a number of ways. Firstly then can be given directly with no additional arguments. The program will then try and determine their file type automatically from their extension. my.def Files which have no extension but whose names are identical to their normal extension will be identified correctly e.g. "def", "res", "grd" and "bcf". def While this allows a useful shortcut gtmconvert may not always be able to determine the type correctly. To allow for this files may also be proceeded by a file type option that specifies the file type e.g. -def my.res.bak Each file type has a standard type option that is generally the same as the default file extension for the file type. In addition to this some of file types have an alternative type option that corresponds to the current naming convention for import filters. -Def my.res.bak Both sets of type options were introduced to make the utility easier to use. Their effect is identical except when their is an alternative direct import route into the GTM and that type of file is being imported. In this case the standard option will use the direct route while the alternative will force the generic GetMesh import filter route to be run. At the current time this distinction only applies to the import of definition files; -def does direct import while -Def will cause ImportDef.exe to be run. The permitted file types and options are listed in a later section. Options: -------- The options that can be given to gtmconvert are as follows: -a | -append Append the new information to an existing file. If this is specified and the file does not exist then it will be created. -o | -overwrite Force the target file to be over-written. If the file does not exist then this flag has no effect. This will take precedence over the append option if they are both specified. -help Outputs this help text. -ig Generic options to the GetMesh mesh import executable. If there is more than one argument then they should be quoted to form a single argument e.g. "-v -T0.1". See GetMesh for more details of allowable options. If the process does not require mesh import then this option is ignored. -is Specific options to the mesh import filter executable. If there is more than one argument then they should be quoted to form a single argument e.g. "-3 -f -v". See individual import filters for more details of allowable options. If the process does not require mesh import then this option is ignored. -node_reordering Specifies the sort of node re-ordering that should be performed when a definition file is written out. This is an optional argument; if it is omitted then no node re-ordering will be performed. The ordering should be one of the following pairs of keys: CM | CuthillMcKee | CMA | CuthillMcKeeAscending | CMD | CuthillMcKeeDescending | RCM | ReverseCuthillMcKee | RCMA | ReverseCuthillMcKeeAscending | RCMD | ReverseCuthillMcKeeDescending -element_reordering Specifies the sort of element re-ordering that should be performed when a definition file is written out. This is an optional argument; if it is omitted then no element re-ordering will be performed. The ordering should be one of the following pairs of keys: AE | AlignElements -nsDirect Named Selection generation options to use when importing a -nsContacts mesh from ANSYS Meshing. See documentation on importing -nsSuffix1 ANSYS Meshing files into CFX-Pre for details. Specify -nsSuffix2 -nsDirect to create Named Selections from direct connections and/or -nsContacts to create Named Selections from contacts. Use -nsSuffix1 and -nsSuffix2 to specify the suffixes used to form the new names. If the suffixes contain spaces then they should be quoted and any initial space for the suffix should be included directly in the suffix specification.e.g. " Side 1". -simplification Specifies a file which should contain CCL to control how the mesh is simplified when it is written out to the definition file. This is an optional argument; if it is omitted then no mesh simplification will be performed. The CCL file should contain the TOPOLOGY SIMPLIFICATION object and must follow the rules defined for this object in RULES.EXTRA. In addition, it may also contain the NODE ORDERING object and so control the sort of node re-ordering that should be performed when a definition file is written out. If the "-node_reordering" argument is also specified, the argument takes priority over any CCL read from this file. -nthreads The number of threads to use when performing I/O to a GTM database and/or reading from a CFX-results file. -tolerance Relative tolerance to use for any mesh matching. If you are operating on an existing GTM database this will not effect the value that is stored in the database. -units Default units to use if no units are available. If this is missing and unit information is required but not available then metres, "m", are used by default. This is needed when writing a definition file for which no target CCL containing the solver units has been supplied in either a .cfx or .ccl file. It is also needed if you attempt to import from a mesh file format that does not contain any unit information. -v | -verbose Produces verbose output. This argument can be repeated to get higher levels of verbose output. -version Prints version information and terminates. -working_directory Changes the working directory that will be used to write any intermediate temporary files. This option may be abbreviated to -wd. Auxiliary files: ---------------- There are a number of possible auxiliary files. o Firstly there are files that are used to supply the physics CCL that should be used when writing a runnable definition file. This physics information will be used to modify the mesh that is written out. There are five possible file types: -cfx A CFX-5 case file, .cfx, containing ["G/COMMANDS", "EVERY", 0]. -def A CFX-5 definition file, .def, containing ["G/COMMANDS", "EVERY", 0]. -res A CFX-5 results file, .res, containing ["G/COMMANDS", "EVERY", 0]. If any of these file types are given then all their datasets are copied into the resulting definition file before the new mesh data is added. If this is not the desired behaviour then use the -cmd file type: -cmd Any CFX-5 file containing the data set ["G/COMMANDS", "EVERY", 0]; .cfx, .def or .res. This only copies the physics CCL data set, ["G/COMMANDS", "EVERY", 0], into the new file. Finally we have the -ccl file type: -ccl A plain ASCII text file containing CCL, .ccl. This can be used to supply the CCL directly. o Other possible auxiliary files are CFX-TASCflow boundary condition files, .bcf, and general command initialisation files, .gci. These can be used to supply region definition information when importing a CFX-TASCflow grid coordinates file, .grd. These are offered as an alternative to supplying the "-b bcf" and "-g gci" options to the import filter via the -is option. You must not specify the same file as both an auxiliary file and using the -is option. Recognised file types: ---------------------- Source and target files Option Extensions Alt. option Description Internal type -gtm .gtm GTM database TYPE_GTM -def .def .res -Def CFX-5 Def/Res file TYPE_CFX5 -gmo .gmo CFX-5 intermediate file TYPE_GMO -geo .geo -CFX4 CFX-4 TYPE_CFX4 -grd .grd -GRD CFX-TASCflow v2 TYPE_TASCFLOW -bg+ .bg+ -Bladegen CFX-BladeGenPlus TYPE_BLADEGEN -cfx5 .cfx5 -CFX5 CFX 5.1 TYPE_CFX51 -gem .gem -GEM CFX-TfC 1.3 TYPE_TFC -cdb .cdb -ANSYS ANSYS TYPE_ANSYS -cgns .cgns .cgn -CGNS CGNS TYPE_CGNS -out .out .neutral -Patran PATRAN Neutral TYPE_PATRAN -grid .grid .gri .pdc -PDC GridPro/az300 TYPE_GRIDPRO -msc .msc .nas -MSC MSC/Nastran TYPE_NASTRAN -icem .icem -ICEM ICEM CFX TYPE_ICEM -unv .unv -IDEAS IDEAS Universal TYPE_IDEAS -geom .geom .case -Ensight Ensight TYPE_ENSIGHT -fv .fv -Fieldview Fieldview TYPE_FIELDVIEW -gridgen -Gridgen Pointwise Gridgen TYPE_GRIDGEN -plo .plo -Plot3d Plot-3D TYPE_PLOT3D -msh .msh .cas -Fluent Fluent TYPE_FLUENT -generic .vmi -Generic CFX generic file format TYPE_GENERIC -user User Import file TYPE_USER -dsdb .dsdb .cmdb -cmdb Simulation database TYPE_DSDB -cff .msh. .cas. -CFF Common Fluids Format TYPE_CFF where may be from cff CFX fsp FENSAP h5 Fluent Mesh or Solve lb Fluent Lattice Boltzmann App ice Fluent IC Engine App for Forte poly Polyflow Auxiliary files Option Extensions Alt. option Description Internal type -def .def .res -Def CFX-5 Def/Res file TYPE_CFX5 -cfx .cfx CFX-5 Case file TYPE_CFX -ccl .ccl ASCII CCL file TYPE_CCL -bcf .bcf CFX-TASCflow v2 boundary TYPE_BCF condition file -gci .gci CFX-TASCflow v2 general TYPE_GCI command initialisation -cmd G/COMMANDS file TYPE_COMMNDS Examples: --------- o To import the definition file my.def into the GTM database test.gtm use: gtmconvert.exe my.def test.gtm or gtmconvert.exe -def my.def -gtm test.gtm If the database already exists and you are trying to add the mesh from the definition file to it use the append option. gtmconvert.exe -a my.def test.gtm o To import a TASCflow mesh consisting of a grid file, grd, and a boundary condition file, bcf, into a GTM database use: gtmconvert.exe -is "-3 -b bcf" grd test.gtm or gtmconvert.exe -is "-3" grd test.gtm bcf o To convert a GTM database into a pseudo definition file that can be viewed in the post-processor use gtmconvert.exe test.gtm viewable.def This converts all assemblies into domains (zones), 3D primitive regions into subdomains (volume patches) and 2D primitive regions into boundaries (boundary condition patches). No domain interfaces (zone interfaces) are created. o To write a definition file that can be run in the solver from a .cfx file and a GTM database use. gtmconvert.exe test.gtm my.def physics.cfx or gtmconvert.exe test.gtm my.def physics.def or gtmconvert.exe test.gtm my.def physics.ccl Depending on whether your physics CCL is in a case, def/res or plain ASCII text file. This form of conversion has more potential for error as the physics locations may not map onto appropriate locations in the GTM database. Also no physics checking is performed so it is assumed that yout physics CCL is complete and consistent. o If you are really certain of your region names and your physics CCL then you can convert directly from a mesh file to a runnable definition file. gtmconvert.exe my.cgns my.def my.ccl This can even be used to refresh the mesh in a definition file if the physics has changed in a way that will require a change in mesh for example by changing a subdomain to a domain. If the CCL has been modified in the original file use. gtmconvert.exe my.def my_new.def my.def Alternatively if the new physics is in a different file use. gtmconvert.exe my.def my_new.def my.ccl or gtmconvert.exe my.def my_new.def my.cfx Tips: ----- o To get verbose information out of the mesh import process add -v options to both the -is and -ig options. For example gtmconvert.exe -is -v -ig -v vmi1.grid vmi1.gtm Alternatively increase the verbosity to level 2. gtmconvert.exe vmi1.grid vmi1.gtm -v -v o Normally definition files will be imported directly into a GTM database if they can be. To force the ImportDef.exe import filter to be used via GetMesh specify the file type explicitly with the -Def option. For example gtmconvert.exe -Def my.def my.gtm Current capabilities: --------------------- Currently gtmconvert can perform the following conversions: o All file types except gtm -> gtm. o All file types -> def with or without physics. ---- ==== cfx5launch ==== The ''cfx5launch'' tool has //identical behaviour// to running ''cfx5''. This is a **graphical** tool and must be run from the Comet [[advanced:software:x11|X11 desktop session]] using our [[advanced:interactive|Open OnDemand]] service. Start a VNC Desktop session as normal, open the terminal application from the bottom bar and run: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run cfx5launch The ''cfx5'' application will launch: {{:advanced:ansys_cfdpost_cfx5.png?800|}} ---- ==== cfx5viewer ==== The documentation for this tool is incomplete The ''cfx5viewer'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run ---- ==== cfxdsdbreader ==== The documentation for this tool is incomplete The ''cfxdsdbreader'' tool can be run from the command line interactively or in a Slurm batch job. It can also be run from a VNC Desktop session. Run the tool as follows: $ source /nobackup/shared/containers/ansys.2025r2.sh $ container.run ---- [[:advanced:software:ansys|Back to ANSYS]] [[:advanced:software|Back to Software]]