Overview of The CFX Command Language (CCL)
Overview of The CFX Command Language (CCL)
2. Actions.
3. Power Syntax.
State and Session files contain object definitions using CCL. In addition
Session files can contain CCL action commands. The CCL written to
these files can be viewed and modified in a text editor. You can also
use a text editor to create your own Session and State files to read into
CFX-Post using CCL.
CCL Syntax
Basic Terminology
Objects and parameters may be placed in any order, provided that the
information is set prior to being used further down the file. If data is set
in one place and modified in another the latter definition overrides the
first.
In CFX-Post, all object definitions are only one object level deep (i.e.
Objects contain parameters, but not other objects).
Case Sensitivity
Case sensitivity is not ideal for users typing in many long parameter
names, but it is essential for bringing the CFX Expression Language
(CEL) into CCL. This is because some names used to define CCL
objects (such as Fluids, Materials and Additional Variables) are used
to construct corresponding CEL names. Case sensitive CEL names
have been in use since CFX-5.2 (e.g. t = time and T = temperature).
For simplicity and consistency, we recommend the following
convention is used in the standard code and its documentation:
Indentation
The “#” character is used for this. Any text to the right of this character
will be treated as comments. Any characters may be used within
comments.
Continuation character
If a line ends with the character “\” the following line will be linked to the
existing line. There is no restriction on the number of continuation lines.
Named Objects
Object names must be unique within the given scope, and the name
must not contain an underscore.
Singleton Objects
Parameters
Lists
Lists are used within the context of parameter values and are comma
separated.
Parameter values
All parameter values are initially handled as data of type String, and
should first of all conform to the following definition of allowed String
values:
String
• Any characters can be used in a parameter value.
• String values or other parameter type values are normally unquoted.
If any quotes are present, they are considered part of the value.
Leading and trailing spaces are ignored. Internal spaces in
parameter values are preserved as given, although a given
application is free to subsequently assume a space condensation
rule when using the data.
Parameter values for data types other than String, will additionally
conform to one of the following definitions.
String List
A list of string items separated by commas. Items in a String List should
NOT contain a comma unless contained between parentheses. One
exception can be made if the String List to be is interpreted as a Real
List (see below). Otherwise each item in the String List follows the
same rules as String data.
Integer
Sequence of digits containing no spaces or commas. If a real is
specified when an integer is needed the real is rounded to the nearest
integer.
Integer List
List of integers, comma separated.
Real List
List of reals, comma separated. Note that all items in the list must have
the same dimensions. Those items which are expressions, are allowed
to include commas inside function call argument lists, and the enclosed
commas will be ignored when the list is parsed into individual items.
Example usage:
a = 1.0 [m/s], 2.0 [m/s], 3.0 [m/s], 2.0*myvel, 4.0 [cm/s]
Logical
Several forms are acceptable: YES or TRUE or 1 or ON are all
equivalent; NO or FALSE or 0 or OFF are all equivalent; initial letter
variants Y, T, N, F are accepted (O is not accepted (for On/Off); all case
variants are accepted. The preferred form, recommended for GUI
output files and for user documentation is, Yes/No. Logical strings are
also case insensitive (YeS, nO)
Logical List
List of Logicals, comma separated.
Escape character
You can modify an existing object by entering the object definition with
the modified parameter settings into the Command Editor window.
Only those parameters which are to be changed need to be entered.
All other parameters will remain unchanged.
The following table contains the quantitative function available for use
with CEL. The operation performed by the function and the arguments
accepted are also shown. A detailed description of the calculation
performed by each function is not provided here, see Function
Selection (p. 128) for this information.
area
area[_<Axis>]()@<Location>
areaAve
areaAve[_<Axis>](<Expression>)@<Location>
Example: areaInt_y_Frame2(Pressure)@boundary1
calculates the pressure force acting in the y-direction of the
coordinate frame Frame2 on the locator boundary1. This differs
from a calculation using the force function which calculates the total
force on a wall boundary (i.e. viscous forces on the boundary are
included).
ave
ave(<Expression>)@<Location>
The ave function can be used on Point, 1-D, 2-D and 3-D locations.
See ave (p. 131) for a function description.
count
count()@<Location>
The count function is valid for point, 1-D, 2-D and 3-D locations. See
count (p. 132) for a function description.
force
[<Fluid>.]force_<Axis>()@<Location>
forceNorm
[<Fluid>.]forceNorm_<Axis>()@<Location>
Returns the per unit width force on the specified line in the direction of
the specified axis. An error will be raised if the location specified is not
one-dimensional. See forceNorm (p. 133) for a function description.
length
length()@<Location>
lengthAve
lengthAve(<Expression>)@<Location>
A 1-D or 2-D location must be specified. See lengthAve (p. 134) for
a function description.
massFlow
[<Fluid>.]massFlow()@<Location>
Computes the mass flow through the specified 2-D location. See
massFlow (p. 134) for a function description.
massFlowAve
[<Fluid>.]massFlowAve(<Expression>)@<Location>
massFlowInt
[<Fluid>.]massFlowInt(<Expression>)@<Location>
maxVal
maxVal(<Expression>)@<Location>
minVal
minVal(<Expression>)@<Location>
Valid only for Point locators, this will return the value of a variable at a
given location. See probe (p. 135) for a function description.
sum
sum(<Expression>)@<Location>
torque
[<Fluid>.]torque_<Axis>()@<Location>
volume
volume()@<Location>
volumeAve
volumeAve(<Expression>)@<Location>
volumeInt
volumeInt(<Expression>)@<Location>
CEL Constants
The following System Variables are available for use with CEL when
defining expressions:
Name Meaning
x Direction 1 in Reference Coordinate Frame
y Direction 2 in Reference Coordinate Frame
z Direction 3 in Reference Coordinate Frame
r 2 2
Radial spatial location, r = x +y
t Time
u Velocity in the x coordinate direction
v Velocity in the y coordinate direction
w Velocity in the z coordinate direction
p (absolute) Pressure
vf Volume Fraction
ke Turbulent kinetic energy
ed Turbulent eddy dissipation
eddy viscosity Eddy Viscosity
T Temperature
sstrnr Shear strain rate
density Density
viscosity Dynamic Viscosity
Cp Specific Heat Capacity at Constant Pressure
cond Thermal Conductivity
enthalpy Specific Enthalpy
The r, theta t and subdomain values in the above table can only be
used if the variables associated with them are output from the solver. r
and theta are not calculated by CFX-Post from x, y, z but expressions
to do so can be defined. subdomain is not usually defined in
CFX-Post.