ENTER_SYMBOL

This command is for the ED-EXP module.

The GES, POLY and POST modules also have a command with the same name.

Symbols are a useful feature modules to define quantities that are convenient. Symbols can be constants, variables, functions, or tables.

Syntax

enter_symbol

Prompt

Constant, Variable, Function or Table? /Function/: <Keyword>

The Keyword can be specified as CONSTANT, VARIABLE, FUNCTION, or TABLE.

  • CONSTANTS can only be entered once and is a means of using a name for a numeric value. For example, the value of 1 atmosphere in Pascal can be denoted by P0 after the command ENTER_CONSTANT P0=101325. Defined constants can be used as values in condition assignments, for example, SET-COND P=P0.
  • FUNCTIONS are expressions of state variables or other functions. These expressions are saved, and whenever a function value is requested all functions are evaluated. The reason for this is that they may depend on each other.
  • VARIABLES are similar to functions because they can also be expressions of state variables. However, contrary to functions, they are only evaluated when they are entered or if they are explicitly named in an EVALUATE_FUNCTIONS command. It is possible to enter a variable with a new expression any time. This expression is evaluated directly and its value stored as the value of the variable. Defined variables can be used as values in the SET_CONDITION command.
  • TABLES are used for listing results from the STEP or MAP commands. A table consists of a list of any number of state variables, functions, or variables. Defined tables can also be used in the POST (post-processor) module.

There is a special connection between tables and variables. If a variable is used in a table, it is evaluated for each line of the table in the TABULATE command or when the table is used in a plot.

 

Name: <Name of the symbol>

Each symbol has a unique name that must start with a letter and can have maximum 8 characters. Legal characters include letters (either UPPER or lower case), digits and underscore _. Any other special character, such as parentheses ( and ), plus +, minus -, slash / or \, full stop (.), are illegal for symbol names.

You can enter the symbol name and the value or function on the same line; these must be separated with an equal sign =, for example, TC=T-273.15 or T_C=T273.15 which stands for a definition of temperature in Celsius. Otherwise, these questions are asked.

For different types of symbols (constant, function, variable, or table), the questions have different prompts.

 

Function: <Definition for a function or variable>

Functions and variables are evaluated from an expression of state variables or other functions, constants, or variables. The expression is a FORTRAN-like expression and operators +,  -, *, = and ** can be used (** only with integer powers).

Unary functions like LOG, LOG10, EXP, SIN, COS, and ERF can also be used. An expression can be continued on more than one line. An expression should be terminated by a semicolon (;) or an empty line (press <Enter> at the next prompt).

Examples of function expressions:

  • GM(LIQUID): The Gibbs energy of liquid per mole component
  • H.T/4.184: The heat capacity of the system in calories
  • ACR(CR)/X(FCC,CR): The activity coefficient for Cr in FCC
  • T-273.15: The temperature in Celsius

&: <Continuation of the definition for the symbol>

The ampersand & means that you can continue to write the function on the new line if one line is not enough for the function. If you finish the function press <Enter> again.

 

Value: <Value for a constant>

A constant can only be assigned a numeric value once.

 

Value or expression: <Value of expression for a variable>

A variable can be assigned a numeric value or an expression. An expression is evaluated immediately and discarded. Only the numeric value is kept. This gives a possibility to save a value between calculations with different conditions because all state variables and functions are evaluated for the new conditions.

 

Variable(s): <Variable(s) in a table>

A table consists of a list of state variables or functions. One way to obtain results from a STEP command is through a table. 

Example:

ENTER TABLE K=T,X(LIQ,C),X(LIQ,CR),ACR(C)

Which means that the table called K contains four columns, i.e. the temperature, the mole fractions of C and Cr in the LIQUID phase, and the activity of C.

To show the temperature in Celsius in a table, give the command ENTER_FUNCTION TC=T-273; and then use the symbol TC in the table.

& <Continuation of the definition for the table>

The ampersand & means that you can continue to write the table on the new line if one line is not enough for the table. If you finish the table press <Enter> again.