Fluent Inc. Logo return to home
next previous contents index

4.2 Edit Commands

The GAMBIT Edit command menu includes the following commands.

CommandDescription
Title Edits the current session title
File Launches a local text editor
Parameters Creates and specifies GAMBIT parameters
Defaults Edits GAMBIT program default values
Undo Undoes the most recently executed GAMBIT operation (NOTE: This command is also available on the Global Control toolpad (see "Undo" in Section 3.4.2 of this guide).)
Redo Re-executes the most recently undone GAMBIT operation (NOTE: This command is also available on the Global Control toolpad (see "Redo" in Section 3.4.2 of this guide).)

4.2.1 Title

When you select Title from the Edit command menu, GAMBIT opens the Edit Session Title form. The Edit Session Title form allows you to edit the current session title. The title for any GAMBIT session can consist of any combination of up to 80 alphanumeric characters.

Using the Edit Session Title Form

The Edit Session Title form (see below) allows you to edit the current session title. To open the Edit Session Title form, select Title from the Edit menu on the main menu bar.

The Edit Session Title form includes the following specifications.

Title: specifies the title of the current session.


4.2.2 File

When you select File from the Edit command menu, GAMBIT opens the Edit File form. The Edit File form allows you to edit any text file by means of a text editor external to GAMBIT.

To edit a text file by means of the Edit File form, you must specify the following parameters.

Parameter

Description

File Name

Name of the text file to be edited

Editor Name

Name of the editor to be used in editing the text file

Editor Options

Editor command options

Editor Command

Form of command to launch the editor

The Editor Name, Editor Options, and Editor Command specifications vary according to the editor used to edit the text file and the operating system under which GAMBIT and the editor run. To modify the default values for the editor options, select Defaults from the Edit menu on the main menu bar (see Section 4.2.4).

Using the Edit File Form

The Edit File form (see below) allows you to edit text files using an editor external to GAMBIT. To open the Edit File form, select File from the Edit menu on the main menu bar.

The Edit File form includes the following specifications.

File Name specifies the name of the text file to be edited.

Browse...

opens the Select File form, which allows you to browse existing directories and file lists and to select a file name from the lists. (See "Using the Select File Form" in Section 4.1.2).
Editor Name specifies the editor to be used to edit the specified file.
Editor Options specifies options for the editor.
Editor Command: specifies the system commands required to launch the editor. (NOTE: The parameters %e, %o, and %f represent the editor name and options and the name of the file to be edited, respectively.)


4.2.3 Parameters

Using Parameters

GAMBIT parameters constitute numeric or string constants that you can use in any modeling or meshing operation in lieu of actual numeric or string input. For example, if you define a numeric scalar parameter with a value of 6.257, you can input that parameter in the Radius text box on the Create Real Sphere form to create sphere of radius 6.257.

NOTE (1): You can use parameters in any GAMBIT operation that is executed from the Command line or from within a journal file, however you cannot use parameters to execute GAMBIT operations by means of GAMBIT GUI specification forms.

NOTE (2): To display a list of currently defined parameters, execute the following Command-line command:

parameter list When you execute the parameter list command, GAMBIT displays all currently defined parameters and their associated values in the Transcript window.

There are two methods of defining or updating any GAMBIT parameter:

The following sections describe the procedures and specifications associated with each of the methods listed above.

Edit Parameters Form Specifications

When you select the Parameters option on the Edit menu, GAMBIT opens the Edit Parameters form. The Edit Parameters form contains a list box and an input field. The list box displays all currently defined parameters. The input field contains text boxes, option buttons, and command buttons that allow you to define new parameters or to update existing parameters.

To define a new parameter, input the parameter specifications and click the Add command button. To update an existing parameter, highlight its name in the parameter list at the top of the form, then change the parameter specifications by means of the input options and click the Update command button.

NOTE: When you select an existing parameter in the list box on the Edit Parameters form, GAMBIT replaces the Add button with two buttons: Update and Delete. To re-invoke the Add button (default condition), unselect the parameter in the list box.

Specifying Parameters

To define or update any GAMBIT parameter, you must specify the following information:

Name

The parameter Name constitutes the character string by which the parameter is referenced in GAMBIT operations. You can specify any combination of alphanumeric characters and symbols (excluding spaces) as the parameter name as long as the combination represents a valid name for the operating system under which GAMBIT is running.

To reference a parameter in any GAMBIT operation, you must precede the parameter name with a dollar-sign symbol-that is, "$". For example, if you define a numeric scalar parameter named "R1" and use the parameter to specify the radius of a sphere, the Command line (or journal) command must adhere to the following syntax:

volume create sphere radius $R1
GAMBIT provides a number of predefined constants and functions that can be used in conjunction with or in the definition of parameters. Appendix B of this guide describes all such constants and functions available in GAMBIT.

NOTE: All arithmetic expressions that involve the definition or use of parameters must be enclosed in parentheses. For example, to create a sphere the radius of which is twice the value of the parameter $R1, you must execute the following command:

volume create sphere radius ($R1*2)

Type

The parameter Type determines the general characteristic of the parameter value. There are three types of GAMBIT parameters:

Numeric parameters represent numerical values. String parameters represent strings of alphanumeric characters and/or symbols. Untyped parameters may constitute either numbers or characters.

Form

The parameter Form defines whether the parameter constitutes an individual value or as a set of values. There are two forms of GAMBIT parameters:

Scalar parameters represent individual values. Array parameters represent sets of values.

Value

Parameter Value specifications differ according to parameter Form. Scalar parameters each represent a single value. Array parameters are associated with sets of values any one of which can be referenced by a GAMBIT operation. The following sections describe the procedures required to specify the values of scalar and array parameters.

NOTE: GAMBIT provides a number of predefined constants and functions that can be used in the definition of parameters. Appendix B of this guide describes all such constants and functions available in GAMBIT.

Specifying Scalar Parameters

To define the value of a scalar parameter, specify its numeric or string value in the Value text box on the Edit Parameters form.

Specifying Array Parameters

To define the values associated with an array parameter, you must specify two types of information:

Indices define the dimensions of the array associated with the parameter. The values specifications constitute the individual values associated with each element of the array.

Specifying Array Parameter Indices

When you define an array parameter, you must specify the dimensions of the array. To specify the dimensions of an array, you must specify its indices. Each individual index specification consists of the following two components:

The starting point determines the first number used in the numbering of the array dimension. The range determines the total number of elements associated with the dimension. For example, if you specify a one-dimensional array parameter named "x" such that it possesses a starting point of 0 and a range of 3, GAMBIT defines the parameter x as a 1 3 array with array elements x(0), x(1), and x(2).

There are two ways of defining the starting points and ranges for any parameter:

Index Declaration Text Box

Starting points and ranges employed in the Index Declaration text box, you must conform to the following input convention:

[ S1:R1, S2:R2, ... ]

where S1 and R1 represent the starting point and range, respectively, for the first array index, and S2 and R2 represent the starting point and range for the second array index. For example, if you specify the dimensions of a parameter named "$radius" as follows:

[0:2,3:3]
GAMBIT defines $radius such that it contains the following elements:

$radius[0,3] $radius[0,4] $radius[0,5]
$radius[1,3] $radius[1,4] $radius[1,5]
Define Array Indices Form

For a description of the procedures required to specify array dimensions by means of the Define Array Indices form, see "Using the Define Array Indices Form," below.

Specifying Array Parameter Values

To specify a set of values for an array parameter, you must perform the following operations:

  1. Define the parameter.
  2. Highlight (left-click) its name in the parameter list box.
  3. Click the Values command button
When you click the Values command button, GAMBIT opens the Define Array Values form. For a description of the procedures required to specify array parameter values by means of the Define Array Values form, see "Using the Define Array Values Form," below.

NOTE: The Values command button appears in the input field of the Edit Parameters form when you highlight an array parameter in the list box.

Using the Edit Parameters Form

The Edit Parameters form allows you to define and update GAMBIT parameters. To open the Edit Parameters form (see below), select Parameters from the Edit menu on the main menu bar.

The Edit Parameters form consists of two components:

List Box

The list box displays information that describes all currently defined parameters. It contains the following information for each parameter:

Input Field

The input field on the Edit Parameters form includes the following specifications.

Name: specifies the parameter name.
Type: -------------------------
Numeric
String
Untyped
specifies the parameter type.
Form: -------------------------
Scalar
Array
specifies the parameter form.

Specifying Scalar Parameters

Value specifies the parameter value .

Specifying Array Parameters

When you select the Form:Array option, the input field on the Edit Parameters form appears as shown below.

The input field includes the following fields and options.

Index Declaration specifies the array dimensions.

Indices

opens the Define Array Indices form.

Values

opens the Define Array Values form.

General Operations

Add

defines a new parameter according to the current specifications and displays the parameter in the parameter list box.

Update

modifies the currently highlighted parameter according to the current specifications.

Delete

deletes the currently highlighted parameter.

Close

closes the Edit Parameters form.

Using the Define Array Indices Form

The Define Array Indices form allows you to specify the starting point and range of an array parameter. To open the Define Array Indices form (see below), click the Indices command button on the Edit Parameters form.

The Define Array Indices form consists of two columns of text boxes labeled Start and Range. The values in the Start and Range columns for any row define the starting point and range for the corresponding dimension (Dim #).

The Define Array Indices form includes the following specifications:

Array Parameter: displays the name of the array parameter for which the displayed Start and Range value are defined.
Dim # (column) specifies dimension numbers.
Start specifies array dimension starting points (see above).
Range specifies array dimension ranges (see above).

Reset

resets the Define Array Indices form fields to their previous values.

Using the Define Array Values Form

The Define Array Values form allows you to specify the values corresponding to the elements of an array parameter. To open the Define Array Values form (see below), highlight an array parameter in the parameter list on the Edit Parameters form and click the Values command button.

The Define Array Values form consists of two columns labeled Index and Value and an input field in the lower section of the form. To specify or modify the value for any element, highlight the corresponding entry in the Value list, then input its value in the Value text box and press Enter.

The Define Array Values form includes the following specifications:

Array Name: displays the name of the array parameter for which the displayed values are defined.
Index (column) displays the dimension numbers corresponding to each array element.
Value (column) displays the currently defined array element values.
Modify item: -------------------------
Index: displays the index number of the currently highlighted array element.
Value specifies the value for the currently highlighted array element.

Accept

defines the array values as currently displayed.

Parameter Commands

To define or update a parameter by means of the Command-line command or from with a journal file, you must execute a command of the following general form:

$p = x
where p and x represent the name and value, respectively, of the parameter. For example, the command,
$length = 5.33
defines a parameter named "length" as a numerical parameter with a value of 5.33. Similarly, the command,
$comp_name = "pipe07"
defines a string parameter named "comp_name" with the value of "pipe07".

NOTE: GAMBIT allows you to specify parameter names by means of operations and functions such as those described in Appendix B. For example, if you define the following parameters:
$a = "edge"
$b = 1
and specify the operation
$($a + ntos($b) + "_len") = 7.5
GAMBIT defines a numeric parameter named "edge1_len" and assigns to it a value of 7.5.

Assigning the Parameter Type

GAMBIT automatically assigns a parameter type that corresponds to the value of x. For instance, in the examples described above, GAMBIT defines $length and $comp_name as numeric and string parameters, respectively.

Defining Array Parameters

The method by which array parameters are defined depends, in part, on whether the parameters are singly or multiply dimensioned.

Singly Dimensioned Parameters

GAMBIT provides two methods for defining singly dimensioned array parameters.

You can implicitly define a singly dimensioned array parameter by including a list of values delineated by commas when specifying the parameter. For example, if you execute the command,
$faces = "face.1", "face.121", "face.37"
GAMBIT defines a singly dimensioned array parameter, named $faces, that contains three elements. The values of array elements 1, 2, and 3 are "face.1", "face.121", and "face.37", respectively. Similarly, if you execute the command,
$coords = 9, -133
GAMBIT defines a singly dimensioned array parameter, named $coords, that contains two elements with values of 9 and -133.

To explicitly define a singly dimensioned array parameter, you must employ the procedures similar to those for multiply dimensioned array parameters (see below).

Multiply Dimensioned Parameters

To define a multidimensional array parameter by means of a Command-line parameter command or from within a journal file, you must first declare the array. The array-declaration command is of the following form:

declare $p [{n}:m]
where, (NOTE: The square brackets ([]) are part of the required syntax; the other brackets indicate that the variable n is optional.)

For example, if you execute the following command:

declare $pipelength[4]
GAMBIT creates a one-dimensional array named "pipelength" that contains the following four elements: Similarly, if you execute the following command:
declare $duct[0:2]
GAMBIT creates a one-dimensional array named "duct" that contains two elements: Finally, if you execute the following command:
declare $radius[0:2,3:3]
GAMBIT defines an array named "$radius" such that it contains the following elements:

$radius[0,3] $radius[0,4] $radius[0,5]
$radius[1,3] $radius[1,4] $radius[1,5]

4.2.4 Defaults

When you select Defaults from the Edit command menu, GAMBIT opens the Edit Defaults form. The Edit Defaults form allows you to modify GAMBIT program defaults-such as entity colors, mesh schemes and parameters, and working directories. The form also allows you to load, customize, and save default settings.

Using the Edit Defaults Form

The Edit Defaults form (see below) allows you to modify default values for GAMBIT program variables and to load and save initialization files. To open the Edit Defaults form, select Defaults from the Edit menu on the main menu bar.

The Edit Defaults form consists of the following types of components:

Default definition subforms allow you to view and modify default settings for specific categories of GAMBIT program variables. The file command buttons and text boxes on the Edit Defaults form allow you to load, save, and/or print initialization (.ini) files that contain program variable default settings.

The following sections describe the specifications and procedures associated with each of the two component types listed above.

Default Definition Subforms

The following summarizes each of the default definition subforms that are included in the Edit Defaults form.

Subform Title Description
CAD Pro/ENGINEEER startup command
FILE_IO Boundary and continuum type labels; FIDAP and UNS defaults; IGES import options
GEOMETRY Entity colors; face-merging criteria
GLOBAL File and directory locations; memory allocation; maximum undo/redo levels; solver
GRAPHICS Graphics display colors and options; mouse button mode
GUI Graphical user interface (GUI) parameters
LABEL Automatic labels
MESH Mesh colors, schemes, and parameters; mesh element types
TOOLS Coordinate-system type; ruler and grid parameters; sizing-function parameters
TURBO Turbo modeling defaults

To display a specific default definition subform, click the corresponding tab on the Edit Defaults form. For example, to display the TOOLS default definition subform shown above, click the TOOLS tab on the Edit Defaults form.

NOTE: For a list of the available GAMBIT default variables, see Chapter 6 of the GAMBIT Command Reference Guide.

Each default definition subform contains the following components:

The following sections describe each of the components listed above.

Radio Buttons

Each default definition subform contains a field of one or more radio buttons. Each radio button is associated with a specific subset of GAMBIT program variables. For example, the TOOLS default definition subform contains the following radio buttons:

To access the defaults that are associated with any of the radio buttons listed on a default definition subform, click the radio button.

NOTE: If the number of radio buttons corresponding to any default definition subform exceeds the maximum number displayable on the form, GAMBIT displays horizontal and vertical scroll bars in the upper portion of the form. To view the hidden radio buttons, either resize the form or use the scroll bars to display the portion of the radio button field that contains the hidden buttons.

Scroll List

When you click any of the radio buttons, GAMBIT displays a scroll list that contains the corresponding subset of program variables. For example, if you click the INTERVAL radio button on the MESH default definition subform, GAMBIT displays the following variables in the scroll list:

The default definition form scroll list contains the following three columns:

The Variable column includes the names of all variables in the current subset. The Value column contains the current setting for each variable listed. The Description column contains a description of each variable and/or default value and a list of available options.

Edit Command Buttons and Text Boxes

When you highlight (left-click) any program variable displayed in the scroll list, GAMBIT displays its name and current value in the text boxes located at the bottom of the default definition subform. To modify the value of the currently highlighted program variable, input the new value in the Value text box and click Modify. To reset the program variable to its default value, click Reset.

File Commands

The bottom section of the Edit Defaults form contains file command buttons and text boxes that allow you to load, save, and print GAMBIT initialization files. The file command section includes the following options.

Load

loads the initialization file that is currently specified in adjacent text box.
Load specifies the name of the initialization file to be loaded.

NOTE: During the program startup procedure GAMBIT, automatically loads the initialization file

$HOME/GAMBIT.ini

if it exists.

Browse ...

opens the Select File form, which allows you to browse existing directories and file lists and to select a file name from the lists. (See "Using the Select File Form" in Section 4.1.2.)

Save

saves current program variable values to the initialization file specified in the adjacent text box. (NOTE: The saved initialization file includes only those variables the values of which differ from the standard GAMBIT default program variables.)
Save specifies the name of the initialization file to be saved.

NOTE: If the file name specified in the Save text box corresponds to the name of an existing file, GAMBIT prompts you to confirm that you want to overwrite the existing file. If you do not want to overwrite the existing file, specify a new name in the Save text box.

Browse...

opens the Select File form, which allows you to browse existing directories and file lists and to select a file name from the lists. (See "Using the Select File Form" in Section 4.1.2.)

Close

closes the Edit Defaults session and saves current values.

Print

prints the current program variable default values to the default printer.


next previous contents index © Fluent, Inc. 11/27/01