CFX-4
Introductory Training (Dec 1999)
7-1
CFX-4.3 V4.3.1H
Lecture 7
CFX Command File &
CFX-Setup
CFX-4
Introductory Training (Dec 1999)
7-2
CFX-4.3 V4.3.1H
CFX Command File
? A command file (m##.fc) is required to run
CFX-4
The command file defines
> Problem characteristics
> Physical models and parameters
> Material properties
> Equation solvers
> Convergence criteria 收敛标准
> Boundary conditions
> Output options.
CFX-4
Introductory Training (Dec 1999)
7-3
CFX-4.3 V4.3.1H
CFX Command File
? The Command Language
Uses commands (starting with >>)
Commands may have subcommands
Keywords qualify the command
Keywords may be followed by integers,real
numbers,characters.
CFX-4
Introductory Training (Dec 1999)
7-4
CFX-4.3 V4.3.1H
CFX Command File
? The top level commands are
>>CFX4
>>MODEL TOPOLOGY (may be not necessary)
>>MODEL DATA
>>SOLVER DATA
>>CREATE GRID (may be not necessary)
>>MODEL BOUNDARY CONDITIONS
>>OUTPUT OPTIONS
>>STOP
CFX-4
Introductory Training (Dec 1999)
7-5
CFX-4.3 V4.3.1H
Case Study
/* This command file has been set up */
/* for the T junction example */
>>CFX4
>>OPTIONS
THREE DIMENSIONS
BODY FITTED GRID
CARTESIAN COORDINATES
TURBULENT FLOW
HEAT TRANSFER
INCOMPRESSIBLE FLOW
STEADY STATE
USE DATABASE
>>MODEL DATA
>>MATERIALS DATABASE
>>SOURCE OF DATA
PCP
>>FLUID DATA
FLUID 'AIR'
MATERIAL TEMPERATURE 2.8800E+02
MATERIAL PHASE 'GAS'
>>TITLE
PROBLEM TITLE 'MY FIRST CFX-4 COMMAND FILE'
CFX-4
Introductory Training (Dec 1999)
7-6
CFX-4.3 V4.3.1H
Case Study
>>SOLVER DATA
>>PROGRAM CONTROL
MAXIMUM NUMBER OF ITERATIONS 200
OUTPUT MONITOR POSITION 0.107 0.0476 0.0275
MASS SOURCE TOLERANCE 1.0000E-06
>>MODEL BOUNDARY CONDITIONS
>>INLET BOUNDARIES
PATCH NAME 'INLET1'
/* NORMAL VELOCITY 4.0000E-01 */
W VELOCITY 4.0000E-01
K 3.2000E-04
EPSILON 1.5260E-05
TEMPERATURE 3.0500E+02
>>INLET BOUNDARIES
PATCH NAME 'INLET2'
/* NORMAL VELOCITY 6.0000E-01 */
W VELOCITY -6.0000E-01
K 7.2000E-04
EPSILON 5.1520E-05
TEMPERATURE 2.9500E+02
>>WALL BOUNDARIES
PATCH NAME 'WALL1'
TEMPERATURE 2.8800E+02
>>STOP
CFX-4
Introductory Training (Dec 1999)
7-7
CFX-4.3 V4.3.1H
Referring to Patches
? Both 2D & 3D patches can be referred to in the
command file to specify boundary conditions or
physical properties.
? Patch names are used for
Inlets,pressure boundaries,walls,conducting
boundaries,sources,body forces,resistances.
? Patch group numbers are used for:
Mass flow boundaries,conducting solids,porous
regions
If more than two patches of the same type are
used,distinct group numbers must be re-
assigned,numbers must be consecutive.
CFX-4
Introductory Training (Dec 1999)
7-8
CFX-4.3 V4.3.1H
Referring to Patches
? Examples:
Mass flow boundaries
>>MODEL TOPOLOGY
>>MODIFY PATCH
OLD PATCH NAME ‘OUTLET2’
NEW PATCH GROUP NUMBER 2
...
>>MODEL BOUNDARY CONDITIONS
>>MASS FLOW BOUNDARIES
>>FLUX
FLUXES 0.3 0.7
FRACTIONAL MASS FLOW SPECIFIED
...
Porous regions
>>MODEL TOPOLOGY
>>MODIFY PATCH
OLD PATCH NAME ‘POROUS2’
NEW PATCH GROUP NUMBER 2
...
>>MODEL DATA
>>PHYSICAL PROPERTIES
>>POROUS REGION PARAMETERS
PATCH GROUP NUMBER 1
VOLUME POROSITY 0.4
>>POROUS REGION PARAMETERS
PATCH GROUP NUMBER 2
VOLUME POROSITY 0.5
...
>>SOURCES
PATCH NAME ‘POROUS2’
ENTHALPY 200.0
PER UNIT VOLUME
...
CFX-4
Introductory Training (Dec 1999)
7-9
CFX-4.3 V4.3.1H
CFX-Setup
A command file can be created & edited by
? Using CFX-Setup
? Using an editor.
CFX-4
Introductory Training (Dec 1999)
7-10
CFX-4.3 V4.3.1H
CFX-Setup
? CFX-Setup is accessed within the
Environment.
? 3 levels to tailor the complexity of the program
to your experience and need
Beginner (default),Intermediate,Advanced.
? Files can be read in & displayed
Command file,geometry file.
? Select Active Keywords to toggle on or off
keywords.
? Order of working
From left to right,relevant options become
available later on.