Chapter 3: Using Parameters

Parameters are APDL variables (they are more similar to FORTRAN variables than to FORTRAN parameters). It is not necessary to explicitly declare the parameter type. All numeric values (whether integer or real) are stored as double-precision values. Parameters that are used but not defined are assigned a near-zero, or "tiny," value of approximately 2-100. For example, if parameter A is defined as A=B, and B is not defined, then A is assigned the tiny value.

Mechanical APDL uses two types of parameters: scalar and array. The first part of this chapter discusses information that is applicable to both types. Starting with Array Parameters, the information is specific to array type parameters. APDL commands used to define parameters in general and array parameters specifically are listed in Chapter 2 of the Command Reference.

Character strings (up to eight characters long) can be assigned to parameters by simply enclosing the string in single quotes. APDL also provides several types of array parameters: numeric, character, string and table (a special numeric type that automatically interpolates values).

You can use a parameter (instead of a literal number or character string) as an argument to any Mechanical APDL command; the parameter is evaluated and its current value is used for that argument. For example, if you assign the value 2.7 to a parameter named AA and then issue the command

N,12,AA,4

the Mechanical APDL program interprets the command as

N,12,2.7,4

(which defines node 12 at X=2.7 and Y=4).


Note:  If array, table, or character parameters are used within a macro or input file, those parameters should be dimensioned (if array or table) and defined within that macro or input file. If you fail to follow this practice, Mechanical APDL generates error messages indicating that those parameters are undefined. Mechanical APDL generates the error messages even if the parameters lie within unexecuted *IF statements, as parameter substitution occurs before the branching for the *IF is checked.