ENTER_SYMBOL
This command is for the POLY module.
There are also GES and POST module commands with the same name.
Symbols are a useful feature of the POLY and POST modules to define quantities that are convenient. Symbols can be constants, variables, functions or tables.
Functions or tables (with defined functions as values) can be entered in the POST module after a stepping or mapping calculation, for purposes of plotting such entered functions or tables as axis variables.
Within the POLY module, symbols are normally defined prior to an equilibrium calculation (enforced by a C_E command), stepping calculation (enforced by the command STEP_WITH_OPTIONS) or mapping calculation (enforced by MAP). These can be entered after an equilibrium calculation; however, for defined functions, variable or tables, it requires using EVALUATE_FUNCTIONS before showing the corresponding values in the calculated equilibrium state.
The symbols entered in the POST module are not saved in the currently-loaded POLY3 workspaces. Therefore, if you want to apply such symbols in other similar calculations for the same defined system, you must use the ENTER_SYMBOL command prior to the STEPPING or MAPPING calculation in the POLY module.
See example 44for an example of using variables and functions.
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
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, 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 Examples of function expressions:
&: <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 & <Continuation of the definition for the table> The ampersand |