You are on page 1of 11

INTRODUCTION Executing GAMBIT Commands

1. INTRODUCTION
GAMBIT is designed for use with a mouse, but most of its operations can also be exe-
cuted by means of commands entered from the keyboard or from a journal file. The pur-
pose of this manual is to summarize the purpose, format, and use of such commands.

1.1 Executing GAMBIT Commands


GAMBIT commands can be executed from either of two sources:
• Keyboard
• Journal files
To execute a GAMBIT command from the keyboard, you must input the command on the
Command line and press Enter. (The Command line is located immediately below the
Transcript window on the GAMBIT GUI.) GAMBIT automatically checks the syntax of
any keyboard command and returns an error message in the Transcript window if the
syntax is incorrect or if the command constitutes an illegal operation. In some cases, such
error messages include a list of allowable keywords and/or input variables.
Journal files are text files each line of which constitutes a comment or GAMBIT com-
mand. The syntax of GAMBIT journal-file commands is identical to that of commands
entered by means of the keyboard. For a complete description of GAMBIT journal files
and their use, see Section 4.1.6 of the GAMBIT User’s Guide.

© 1998–2007 Fluent, Inc. All rights reserved. 1-1


Command Description Format INTRODUCTION

1.2 Command Description Format


In this manual, each GAMBIT keyboard command is summarized in its own section. Each
command summary consists of the following components.

Component Description

Purpose Describes the general purpose and function of the command

General Form Describes the command syntax, including keyword hierarchy


and variable type

Example Shows an example of the command, including one or more


keywords

Keywords Lists and describes all keywords relevant to the command

1.2.1 Interpreting Command Syntax


GAMBIT commands consist of the following components:
• Operator
• Keywords
• Variables
Operators are string expressions that represent GAMBIT operations. Keywords are string
expressions that represent either control words or options associated with GAMBIT
operations. Variables are numerical or string values that represent parameters associated
with operations and/or keywords.
In this manual, operators, keywords, and variables are represented by the Courier font
and variables are italicized. For example, a command description of the form:
vertex reflect vertex1 [ vertex2 ... ]
vector real1 real2 real3
[ origin real1 real2 real3
vertex vertex ]
[ connected ]

contains the following components.

1-2 © 1998–2007 Fluent, Inc. All rights reserved.


INTRODUCTION Command Description Format

Component Expression

Operator vertex reflect

Keywords vector
origin
vertex
connected

Variables vertex
vertex1
vertex2
real1
real2
real3

Specifying an Operator
Each operator represents a specific GAMBIT operation. For example, the vertex
summarize operator represents the operation that causes GAMBIT to display vertex
summary information in the Transcript window. When you execute any keyboard com-
mand, GAMBIT records the operator and all associated keywords and variable values in a
journal file.

Specifying Keywords
Keyword syntax consists of the following components:
• Type
• Hierarchy

Keyword type determines whether a given keyword is optional or mandatory. Keyword


hierarchy determines which keywords represent suboptions of other keywords.

Keyword Type
There are two types of command keywords:
• Optional
• Mandatory

© 1998–2007 Fluent, Inc. All rights reserved. 1-3


Command Description Format INTRODUCTION

Optional Keywords
Optional keywords are string expressions that are allowed but not required by GAMBIT
commands. For example, in the command description
edge modify edge1 [ edge2 ... ]
[ color color ]
[ mcolor color ]
[ label string ]

the keywords color, mcolor, and label are optional keywords that specify,
respectively, the color, mesh color, and label (name) for an edge.
In this manual, optional keywords are always enclosed in square brackets ([]). For
example, a command description of the form
face delete face
[ lowertopology ]
[ onlymesh ]

indicates that the lowertopology and onlymesh options are both allowed but not
required by the face delete command.
If a command includes a set of mutually exclusive optional keywords, the [] brackets
enclose the entire set. For example, a command description of the form
vertex delete vertex
[ onlymesh
onlyblend ]

indicates that the onlymesh and onlyblend keywords represent mutually exclusive
options; therefore, either option is allowed (but neither is required) by the vertex
delete command.

Mandatory Keywords
Mandatory keywords are string expressions that are required by the commands with
which they are associated. For example, in the command description:
edge create [ edge ] fillet edge1 edge2
parameters real1 real2
radius real
[ trim
notrim ]

the keywords parameters and radius are mandatory keywords, because they are
required in order to execute the command. The keywords trim and notrim, on the other
hand, are optional keywords and are not required by the command.

1-4 © 1998–2007 Fluent, Inc. All rights reserved.


INTRODUCTION Command Description Format

Sets of mutually exclusive, mandatory keywords are always enclosed in braces ({}). For
example, a command description of the form
edge create [ edge ] circle
{ threepoints vertex1 vertex2 vertex3
center2points vertex1 vertex2 vertex3 }

indicates that you must specify either the threepoints keyword or the
center2points keyword in order to execute the edge create circle command.

Keyword Hierarchy
Keyword hierarchy determines which keywords represent suboptions of other keywords.
In this manual, keyword hierarchy is represented by means of indentation. For example, a
command description of the form
vertex connect vertex1 vertex2
[ virtual
[ tolerance real ] ]

indicates that the keyword virtual is allowed but not required by the vertex
connect command and that the keyword tolerance represents a suboption of the
virtual option.

Specifying Variables
Most commands and keywords are associated with variables. Variables represent numeri-
cal values or string expressions that define parameters that are allowed or required by
commands or keyword options. For example, in a command description of the form
vertex create [ vertex ] hardpoint face face
coordinates real1 [ real2 [ real3 ] ]

the variables vertex and face represent string expressions (entity labels), and the vari-
ables real1, real2, and real3 represent real, non-integer numbers (spatial coordi-
nates).

Optional Variables
Optional variables represent values that are allowed but not required by their associated
commands or keywords. In this manual, optional variables are always enclosed in square
brackets ([]). In the example shown above, for instance, the variables vertex, real2,
and real3 are optional, but the variables face and real1 are required.

© 1998–2007 Fluent, Inc. All rights reserved. 1-5


Command Description Format INTRODUCTION

Nested Brackets
Some commands and keywords allow or require more than one variable specification. In
this manual, nested square brackets ([[]]) indicate the hierarchy of multiple variables
associated with a single command or keyword. For example, in the vertex create
command description shown above, you can specify real1 without specifying real2
and real3, but you cannot specify real2 without also specifying real1. Likewise, you
cannot specify real3 without also specifying real1 and real2.

Ellipses
In this manual, some specifications of optional variables include ellipses (...). Ellipses
indicate that you can specify more than one variable for the associated command or key-
word. For example, a command description of the form
vertex modify vertex1 [ vertex2 ... ]

indicates that, to execute the vertex modify command, you must specify at least one
vertex label (vertex1) but you may also specify any number of additional vertex labels
(vertex2, vertex3, etc.).

Variable Types
There are three types of variables associated with GAMBIT commands:
• String
• Integer
• Real

The command descriptions in this manual include allowable ranges for each variable.
When you specify a string variable, you must enclose the string expression in double
quotation marks—for example,
vertex modify "vertex.7" .
When you specify an integer variable, you must not include a decimal point. (NOTE: If
you input a non-integer in field that requires an integer variable, GAMBIT truncates the
input value.)
When you specify a real variable, you can (but are not required to) include a decimal
point.
The following table summarizes the variables used in this manual.

1-6 © 1998–2007 Fluent, Inc. All rights reserved.


INTRODUCTION Command Description Format

Variable Description Type Example

vertex Vertex label String "vertex.1"

edge Edge label String "edge.3"

face Face label String "face.16"

volume Volume label String "volume.7"

group Group label String "group.2"

system Coordinate system label String "c_sys.1"

blayer Boundary layer String "blayer.5"

axis Axis name String "x"

real Real number Non-integer 6.7

integer Real number Integer 11

option Option number Integer 2

color Color name* String "red"

node Node number Integer 1034

* Color names are listed in the following table.

© 1998–2007 Fluent, Inc. All rights reserved. 1-7


Command Description Format INTRODUCTION

Some GAMBIT commands require the specification of a color variable. For example,
the following command changes the color of a vertex named vertex.2 to purple:

vertex modify "vertex.2" color "purple"

The following table lists the names of all colors available in GAMBIT.

adobered goldenrod maroon purple

aquamarine green mediumaquamarine red

beige greenyellow mediumblue rosybrown

black grey mediumpurple royalblue

blue hotpink mediumseagreen saddlebrown

blueviolet khaki mediumslateblue salmon

brown lawngreen mediumspringgreen sandybrown

burlywood lightblue mediumturquoise seagreen

cadetblue lightcoral mediumvioletred sienna

chocolate lightcyan olivedrab skyblue

coral lightgoldenrodyellow orange slateblue

cyan lightgoldenrodyellow orangered springgreen

darkgreen lightgreen orchid steelblue

darkkhaki lightpink palegoldenrod tan

darksalmon lightsalmon palegreen thistle

darkslateblue lightseagreen paleturquoise tomato

darkturquoise lightskyblue palevioletred turquoise

deeppink lightslateblue peru violet

deepskyblue lightsteelblue pink white

dodgerblue lightyellow plum yellow

firebrick limegreen powderblue yellowgreen

gold magenta

1-8 © 1998–2007 Fluent, Inc. All rights reserved.


INTRODUCTION Command Description Format

Multiple Variables
Some of the command descriptions presented in this manual include multiple variables—
that is, two or more variables that correspond to a given command or keyword. When a
command or keyword includes more than one variable of a given type, each variable is
distinguished from the others by a trailing number attached to the variable type specifica-
tion. For example, in the command description
edge create [ edge ] circle
{ threepoints vertex1 vertex2 vertex3
center2points vertex1 vertex2 vertex3 }

the edge variable does not include a trailing number, because GAMBIT allows you to
specify only one edge label for the edge create circle command. The vertex
variable type specifications, on the other hand, are represented as vertex1, vertex2,
and vertex3 to indicate that you must specify three individual vertices in order to
execute either the threepoints or center2points option.

1.2.2 Example Command Description


As an example of the interpretation principles outlined above, consider the following
command description.
coordinate create [ system ]
[ cartesian
cylindrical
spherical ]
{ rotation
[ oldsystem system ]
[ offset real1 [ real2 [ real3 ] ]
[ axis1 axis1 angle1 real1
[ axis2 axis2 angle2 real2
[ axis3 axis3 angle3 real3 ] ] ]
vertices vertex1 vertex2 vertex3 }

The following outline illustrates the correct interpretation of the command description
shown above in terms of what is required and/or allowed by the command.

© 1998–2007 Fluent, Inc. All rights reserved. 1-9


Command Description Format INTRODUCTION

Summary
• You can specify a system label (system).
• You can specify only one of the following three keywords:
cartesian
cylindrical
spherical
There are no variables or suboptions associated with any of these three keywords.
• You must specify one of the following two keywords:
rotation
vertices
 If you specify the rotation keyword, you can specify any of the following three
keyword/variable combinations:
oldsystem system
offset real1
axis1 axis1 angle1 real1
• If you specify offset real1, you can also include one or two other real
variables in the command—that is, you can specify the keyword/variable com-
bination in one of the following three forms:
offset real1
offset real1 real2
offset real1 real2 real3
• If you specify axis1 axis1 angle1 real1, you can also specify the fol-
lowing keyword/variable combination
axis2 axis2 angle2 real2
If you specify axis2 axis2 angle2 real2, you can also specify the fol-
lowing keyword/variable combination
axis3 axis3 angle3 real3
 If you specify the vertices keyword, you must specify three vertex labels
(vertex1, vertex2, and vertex3)

Example
The following example represents a valid GAMBIT coordinate create command.
coordinate create "c_sys.5" rotation offset 5.5 3.7

1-10 © 1998–2007 Fluent, Inc. All rights reserved.


INTRODUCTION Command Reference Guide—Outline

1.3 Command Reference Guide—Outline


The following table summarizes the contents of this guide.

Chapter Contents

1 INTRODUCTION

2 GEOMETRY COMMANDS

3 MESH COMMANDS

4 ZONE COMMANDS

5 TOOLS COMMANDS

6 MISCELLANEOUS COMMANDS

© 1998–2007 Fluent, Inc. All rights reserved. 1-11

You might also like