Assigns values to user-named parameters.

Compatible Products: – | Pro | Premium | Enterprise | Ent PP | Ent Solver | DYNA

Argument Descriptions


An alphanumeric name used to identify this parameter. Par can contain up to 32 characters, beginning with a letter and containing only letters, numbers, and underscores. Examples: ABC A3X TOP_END

Command names, function names, label names, component and assembly names, etc., are invalid, as are parameter names beginning with an underscore (for example, _LOOP).

Parameter names ending in an underscore are not listed by the *STATUS command. Array parameter names must be followed by a subscript, and the entire expression must be 32 characters or less. Examples: A(1,1) NEW_VAL(3,2,5) RESULT(1000)

There is no character parameter substitution for the Par field. Table parameters used in command fields (where constant values are normally given) are limited to 32 characters.


Numerical value or alphanumeric character string (up to 32 characters enclosed in single quotes) to be assigned to this parameter. Examples: A(1,3)=7.4 B='ABC3' Can also be a parameter or a parametric expression. Examples: C=A(1,3) A(2,2)=(C+4)/2. If VALUE is the table array name, the subscripts are the values of the primary variables and the table is evaluated at these specified index values.

If blank, delete this parameter. Example: A= deletes parameter A.


If Par is an array parameter, values VAL2 through VAL10 (up to the last nonblank value) are sequentially assigned to the succeeding array elements of the column. Examples: *SET,A(1,4),10,11 assigns A(1,4)=10, A(2,4)=11, and *SET,B(2,3),'file10','file11' assigns B(2,3)='file10', B(3,3)='file11'.


Assigns values to user-named parameters that can be substituted later in the run. The equivalent (and recommended) format is

Par = VALUE,VAL2,VAL3, . . . , VAL10

which can be used in place of *SET,Par,  ... for convenience.

This command is valid in any processor.

Parameter Definitions

Parameters (numeric or character) can be scalars (single valued) or arrays (multiple valued in one, two, or three dimensions). An unlimited number of parameter names can be defined in any run. For very large numbers of parameters, it is most efficient to define them in alphabetical order.

Parameter values can be redefined at any time. Array parameters can also be assigned values within a do-loop (*DO) for convenience. Internally programmed do-loop commands are also available with the *VXX commands (*VFILL). Parameter values (except for parameters ending in an underscore) can be listed with the *STATUS command, displayed with the *VPLOT command (numeric parameters only), and modified with the *VEDIT command (numeric parameters only).

Older program-provided macro files can use parameter names that do not begin with an underscore. Using these macros embedded in your own macros may cause conflicts if the same parameter names are used.

Parameters can also be resolved in comments created by the /COM command (see /COM for complete documentation). A parameter can be deleted by redefining it with a blank VALUE. If the parameter is an array, the entire array is deleted. Parameters can also be defined by a response to a query with the *ASK command or from an "ANSYS-supplied" value with the *GET command.

Array Parameters

Array parameters must be dimensioned (*DIM) before being assigned values unless they are the result of an array operation or defined using the implied loop convention.

Undefined scalar parameters are initialized to a near-zero value. Numeric array parameters are initialized to zero when dimensioned, and character array parameters are initialized to blank.

An existing array parameter must be deleted before it can be redimensioned.

Array parameter names must be followed by a subscript list (enclosed in parentheses) identifying the element of the array. The subscript list can have one, two, or three values (separated by commas). Typical array parameter elements are A(1,1), NEW_VAL(3,2,5), RESULT(1000). Subscripts for defining an array element must be integers (or parameter expressions that evaluate to integers). Non-integer values are rounded to the nearest integer value.

All array parameters are stored as 3-D arrays with the unspecified dimensions set to 1. For example, the 4th array element of a 1-dimensional array, A(4), is stored as array element A(4,1,1).

Arrays adhere to standard FORTRAN conventions.

Numerical Parameter Substitution

If the parameter name Par is input in a numeric argument of a command, the numeric value of the parameter (as assigned with *SET, *GET, =, etc.) is substituted into the command at that point. Substitution occurs only if the parameter name is used between blanks, commas, parentheses, or arithmetic operators (or any combination) in a numeric argument. Substitution can be prevented by enclosing the parameter name Par within single quotes ( ' ), if the parameter is alone in the argument; if the parameter is part of an arithmetic expression, the entire expression must be enclosed within single quotes to prevent substitution. In either case the character string will be used instead of the numeric value (and the string will be taken as 0.0 if it is in a numeric argument).

A forced substitution is available in the text fields of the /TITLE, /STITLE, /TLABEL, /AN3D, /SYP (ARG1--ARG8), and *ABBR commands by enclosing the parameter within percent (%) signs. Also, parameter substitution can be forced within the file name or extension fields of commands having these fields by enclosing the parameter within percent (%) signs. Array parameters (*DIM) must include a subscript (within parentheses) to identify the array element whose value is to be substituted, such as A(1,3). Out-of-range subscripts result in an error message. Non-integer subscripts are allowed when identifying a TABLE array element for substitution. A proportional linear interpolation of values among the nearest array elements is performed before substitution. Interpolation is done in all three dimensions.

Note:  Interpolation is based upon the assigned index numbers which must be defined when the table is filled (*DIM).

Character Parameter Substitution

Most alphanumeric arguments permit the use of character parameter substitution. When the parameter name Par input, the alphanumeric value of the parameter is substituted into the command at that point. Substitution can be suppressed by enclosing the parameter name within single quotes ( ' ). Forced substitution is available in some fields by enclosing the parameter name within percent (%) signs. Valid forced substitution fields include command name fields, Fname (filename) or Ext (extension) arguments, *ABBR command (Abbr arguments), /TITLE and /STITLE commands (Title argument) and /TLABEL command (Text argument). Character parameter substitution is also available in the *ASK, /AN3D, *CFWRITE, *IF, *ELSEIF, *MSG, *SET, *USE, *VREAD, and *VWRITE commands. Character array parameters must include a subscript (within parentheses) to identify the array element whose value is to be substituted.

Parameter Expressions

If a parameter operation expression is input in a numeric argument, the numeric value of the expression is substituted into the command at that point. Allowable operation expressions are of the form

E1oE2oE3 ...oE10

where E1, E2, etc. are expressions connected by operators (o). The allowable operations (o) are

+ - * / ** < >

For example, A+B**C/D*E is a valid operation expression. The * represents multiplication and the ** represents exponentiation.

Note:   Exponentiation of a negative number (without parentheses) to an integer power follows standard FORTRAN hierarchy conventions; that is, the positive number is exponentiated and then the sign is attached. Thus, -4**2 is evaluated as -16. If parentheses are applied, such as (-4)**2, the result is 16.

A parameter is evaluated as a number within parentheses before exponentiation. Exponentiation of a negative number to a non-integer power is performed by exponentiating the positive number and prepending the minus sign, for example, -4**2.3 is -(4**2.3). The < and > operators allow conditional substitution. For example, E1<E2 substitutes the value of E1 if the comparison is true or the value of E2 if the comparison is false.

Do not use spaces around operation symbols, as “ *” (a space and a star) makes the remainder of the line a comment. Operation symbols (or symbols and signs) cannot be immediately adjacent to each other. Parentheses can be used to separate symbols and signs, to determine a hierarchy of operations, or for clarity. For example, use A**(-B) instead of A**-B. Numbers ending with +0nn or -0nn are assumed to be of exponential form (as written on files by some computer systems) so that 123-002 is 123E-2 while 123-2 is 121. Avoid inputting this form of exponential data directly. The default hierarchy follows the standard FORTRAN conventions, namely:

  • operations in parentheses (innermost first)

  • then exponentiation (right to left)

  • then multiplication or division (left to right)

  • then unary association (such as +A or -A)

  • then addition or subtraction (left to right)

  • then logical evaluations (left to right).

Expressions (E) can be a constant, a parameter, a function, or another operation expression (of the form E1oE2oE3 ...oE10). Functions are of the form FTN(A) where the argument (A) can itself be of the form E1oE2oE3 ...oE10. Operations are recursive to a level of four deep (three levels of internally nested parentheses). Iterative floating point parameter arithmetic should not be used for high precision input because of the accumulated numerical round off-error. Up to 10 expressions are accepted within a set of parenthesis.

Valid functions (which are based on standard FORTRAN functions where possible) are:

ATAN2(Y,X)Arctangent (Y/X) with the sign of each component considered
SINH(X)Hyperbolic sine
COSH(X)Hyperbolic cosine
TANH(X)Hyperbolic tangent
SQRT(X)Square root
ABS(X)Absolute value
SIGN(X,Y)Absolute value of X with sign of Y. Y=0 results in positive sign
NINT(X)Nearest integer
MOD(X,Y)Remainder of X/Y Y=0 returns zero (0)
LOG(X)Natural log
LOG10(X)Common log
RAND(X,Y)Random number, where X is the lower bound, and Y is the upper bound
GDIS(X,Y)Random sample of Gaussian distributions, where X is the mean, and Y is the standard deviation
LWCASE(CPARM)Lowercase equivalent of character parameter CPARM
UPCASE(CPARM)Uppercase equivalent of character parameter CPARM
VALCHR(CPARM)Numeric value of character parameter CPARM (If CPARM is a numeric parameter, returns 0.0)
CHRVAL(PARM)Character value of numerical parameter PARM. For ABS(PARM) < 10, character value format is F8.5; for 10   ABS(PARM) < 1000, format is F8.3; for 1,000   ABS(PARM)< 10,000,000, format is F8.0. For 10,000,000 PARM < 100,000,000, format is also F8.0. Otherwise result is 0.0 and is not a character value.
IBSET(b1,n2)Set the n2 bit in value b1 (bits are numbered from 0 to 31)
IBCLR(b1,n2)Clear the n2 bit in value b1
BTEST(b1,n2)Test the n2 bit in value b1 (return true (1.0) if bit is set)
BITAND(b1,b2)Bitwise AND of value b1 and b2
BITOR(b1,b2)Bitwise OR of value b1 and b2
BITXOR(b1,b2)Bitwise XOR of value b1 and b2
BITSET(b1,b2)Set the b2 bits in b1
BITCLEAR(b1,b2)Clear the b2 bits in b1

Function arguments (X,Y, etc.) must be enclosed within parentheses and can be numeric values, parameters, or expressions. Input arguments for angular functions must evaluate to radians by default. Output from angular functions are also in radians by default. See the *AFUN command to use degrees instead of radians for the angular functions. See the *VFUN command for applying these parameter functions to a sequence of array elements. Additional functions, called "get functions" are described with the *GET command. For SINH, COSH, TANH, and EXP, if X > 80, the value returned is zero.

Menu Paths

Utility Menu>Parameters>Scalar Parameters

Release 18.2 - © ANSYS, Inc. All rights reserved.