The following applies to any line that is not a Power Syntax (or action) line.
(That is, any line that does not start with a !
or
>
.)
Everything in the file is sensitive to case.
Case sensitivity is not ideal for users typing in many long parameter names,
but it is essential for bringing the Ansys CFX Expression Language (CEL) into
CCL. This is because some names used to define CCL objects (such as
Machine Data
) are used to construct corresponding CEL
names.
For simplicity and consistency, we recommend the following convention is used in the standard code and its documentation:
singletons and object types use upper case only
parameter names, and pre-defined object names, are mixed case. We try to follow these conventions:
Major words start with an upper case letter, while minor words such as prepositions and conjunctions are left in lower case ("Number of Blade Blocks", for example).
Case is preserved for familiar names (for variables "k" or "r", or for the abbreviation "RNG", for example).
user object names conventions are left to you to choose.
Names of singletons, types of objects, names of objects, and names of parameters all follow the same rules:
In simple syntax, a CCL name must be at least one character. This first character must be alphabetic; there may be any number of subsequent characters and these can be alphabetic, numeric, space or tab.
The effect of spaces in CCL names is:
Spaces appearing before or after a name are not considered to be part of the name.
Single spaces appearing inside a name are significant.
Multiple spaces and tabs appearing inside a name are treated as a single space.
Nothing in the file is sensitive to indentation. The indentation is used, however, when displaying contents of the file for easier reading.
The #
character is used for commenting. Any text to
the right of this character is treated as a comment. Any characters may be used
within comments.
If a line ends with the character \
the following
line is linked to the existing line. There is no restriction on the number of
continuation lines.
A named object consists of an object type at the start of a line, followed by
a :
followed by an object name. Subsequent lines may define
parameters and child objects associated with this object. The object definition
is terminated by the string "END"
on a line by
itself.
Object names must be unique within the given scope, and the name must not contain an underscore.
A singleton object consists of an object type at the start of a line, followed
by a :
. Subsequent lines may define parameters and child
objects associated with this object. The object definition is terminated by the
string "END"
on a line by itself.
The difference between a singleton object and a named object is that (after the data has been processed), a singleton can appear just once as the child of a parent object, whereas there may be several instances of a named object of the same type defined with different names.
A parameter consists of a parameter name at the start of a line, followed by
an =
, followed by a parameter value. A parameter may
belong to many different object types. For example Transparency
= 0.6
may belong to a hub geometry object and
Transparency = 0.0
may belong to a volume mesh
analysis object. Both refer to the same definition of transparency in the rules
file.
All parameter values are initially handled as data of type string, and should first of all conform to the following definition of permitted string values:
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.
The characters
$
and#
have a special meaning. A string beginning with$
is evaluated as a Power Syntax variable, even if it occurs within a simple syntax statement. This is useful for performing more complex Power Syntax variable manipulation, and then using the result as part of a parameter or object definition. The appearance of#
anywhere in the CCL file denotes the start of a comment.The characters such as
[
,]
,{
and}
are special only if used in conjunction with$
. Following a$
, such characters terminate the preceding Perl variable name.Other characters that might be special elsewhere in Power Syntax are escaped automatically when they appear in parameter values. For example,
@
,%
and&
are escaped automatically.Parameter values can contain commas, but if the string is processed as a list or part of a list then the commas may be interpreted as separators (see below under list data types).
Some examples of valid parameter values using special characters in Power Syntax are:
Estimated cost = \$500 Title = Run\#1 Sys Command = "echo ’Starting up Stress solver’ ; fred.exe &" Temporary = $myArray[4] Option = $myHash{"foo"} Fuel = C${numberCatoms}H${numberHatoms}
Parameter values for data types other than string additionally conform to one of the following definitions.
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. Example usage:
names = one, two, three, four
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. Example usage:
b = 32
A single precision real number that may be specified in integer, floating point or scientific format, followed optionally by a dimension. Units use the same syntax as CEL.
Expressions can include commas inside function call argument lists. Example usage:
a = 12.24 a = 1.224E01 a = 12.24 [m s^-1]
A real may also be specified as an Expression such as:
a = myvel^2 + b a = max(b,2.0)
List of reals, comma separated. Note that all items in the list must have the same dimensions. Those items that are expressions can include commas inside function call argument lists, and the enclosed commas are 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]
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
). Example usage:
answer = 1