![]() | Specifies an expression or defines and passes constants to a user-written subroutine to define a variable. If you want to define the variable with an expression, FUNCTION must be followed with an equal sign and the expression. If you want to define the variable with a user-written subroutine, FUNCTION must be followed with an equal sign, the character string USER, and the selected values (r1[,...,r30]) that Adams Solver (FORTRAN) passes to the user-written subroutine VARSUB. |
IC=r | Specifies an approximate initial value for the VARIABLE. Adams Solver (FORTRAN) may adjust the value of IC when it performs an initial condition analysis. Entering an accurate value for IC may help Adams Solver (FORTRAN) converge to the initial conditions solution. |
ROUTINE=libname::subname | Specifies an alternative library and name for the user subroutine VARSUB Learn more about the ROUTINE Argument. |
Caution: | ■Use caution when defining a VARIABLE statement that is dependent on another VARIABLE statement or on an Adams Solver (FORTRAN) statement that contains functions. If a defined system of equations does not have a stable solution, convergence may fail for the entire Adams Solver (FORTRAN) model. The following example refers to this type of VARIABLE statement: VARIABLE/1, FUNCTION= VARVAL(1)+1 When looked at as an algebraic equation, it looks like the following: V=V+1. However, when Adams Solver (FORTRAN) tries to solve this equation using the Newton-Raphson iteration, the solution diverges and Adams Solver (FORTRAN) displays a message on the screen indicating that the solution has failed to converge. ■The IC argument should be used whenever a zero value might cause a floating point exception or lead Adams Solver (FORTRAN) away from the desired solution. |