![]() | Specifies an expression for a differential equation or defines the argument list for the user-written subroutine that defines the differential equation. To define the equation with an expression, follow FUNCTION with an equal sign and the expression. To define the equation with a user-written subroutine, follow FUNCTION with an equal sign, the character string USER, and the argument list (r1[,...,r30]) of values and system variables to be passed to the user-written subroutine DIFSUB. In a function expression, the system variable DIF(i) is the value of the dependent variable defined by the DIFF/i statement. DIF1(j) is the first derivative of the dependent variable defined by the DIFF/j statement. Note that the FUNCTION argument must either be the last argument in the DIFF statement or be followed by a backslash (\). |
IC=r1[,r2] | Specifies the initial value of the user-defined variable and, optionally, an approximate value of the initial time derivative. The value r1 is the value of the user-defined variable at the start of the simulation. If you enter an implicit equation, r2 may also need to be specified, which is an approximate value of the time derivative of the user-defined variable at the start of the simulation. Adams Solver (FORTRAN) might adjust the value of the time derivative when it performs an initial conditions analysis. Entering an initial value for the time derivative helps Adams Solver (FORTRAN) converge to a desired initial conditions solution. You do not need to supply r2 when you enter a explicit equation since Adams Solver (FORTRAN) can compute the initial time derivative directly from the equation. Adams Solver (FORTRAN) requires you to enter r1. Default: 0 |
IMPLICIT | Indicates that the function expression or DIFSUB subroutine defines the implicit form of a differential equation. Adams Solver (FORTRAN) assumes that either the expression or user-written subroutine defines the explicit form of the equation if IMPLICIT is not specified. In this case, the time derivative of the state variable is set to the value of FUNCTION. |
ROUTINE=libname::subname | Specifies an alternative library and name for the user subroutine DIFSUB. Learn more about the ROUTINE Argument. |
STATIC_HOLD | Indicates that the DIFF state is not permitted to change during static and quasi-static analysis. |
= f (y, u, t)
is the time derivative of the user-defined state variable, y is the user-defined state variable itself, and u is a vector of Adams Solver-defined state variables.
, u, t)Caution: | ■Although you can currently use a DIFF statement to define an implicit, algebraic (rather then differential) equation, Adams Solver (FORTRAN) might not allow this in the future. You should use VARIABLE statements to define algebraic equations instead. ■During a static analysis, Adams Solver (FORTRAN) finds equilibrium values for user-defined differential variables (DIFFs, GSEs, LSEs, and TFSISOs), as well as for the displacement and force variables. This changes the initial conditions for a subsequent analysis. Adams Solver (FORTRAN) sets the time derivatives of the user-defined variables to zero if STATIC_HOLD is not specified during a static analysis, and uses the user-supplied initial-condition values only as an initial guess for the static solution. Generally, the final equilibrium values are not the same as the initial condition values. Adams Solver (FORTRAN) then uses the equilibrium values of the user-defined variables as the initial values for any subsequent analysis, just as with the equilibrium displacement and force values. However, the user-specified initial conditions are retained as the static equilibrium values if STATIC_HOLD is specified. Thus, the final equilibrium values are the same as the user-specified initial conditions. Note that this does not guarantee that the time derivatives of the user-defined variable are zero after static analysis. |
+ 2y - 4 = sin (t), y(0) = 1.75
as shown below.
= -2y + 4 + sin (t)
+ 2y - 4 - sin (t) = 0