DIFF

The DIFF command redefines and/or lists the characteristics of a DIFF statement. The implicit/explicit nature of a DIFF element may not be changed, for example, the IMPLICIT option in the database may not be changed.

Format

 

Argument

 
Redefines an expression or redefines the list of constants passed to a user-written subroutine, for example, DIFSUB.
IC=r1[,r2]
Redefines the value of the differential state. If you specify r2, the value of r2 will be used to start the computation of the derivative value of the differential state.
STATIC_HOLD
Redefines the differential state to remain constant during static and quasi-static simulations. Notice the STATIC_HOLD argument may not be changed (once a differential state is defined as STATIC_HOLD, it will remain STATIC_HOLD for the rest of the simulation).
DYNAMIC_HOLD
Redefines the differential state to remain constant during dynamic simulations. Notice the DYNAMIC_HOLD argument may not be changed (once a differential state is defined as DYNAMIC_HOLD, it will remain DYNAMIC_HOLD for the rest of the simulation).
ROUTINE=libname::subname
Specifies an alternative library and name for the user subroutine DIFSUB.
Learn more about the ROUTINE Argument.
LIST
Lists the current values of the data defining the differential state.

Extended Definition

The DIFF command allows you to list and/or modify the characteristics of a differential state. Adams Solver (C++) allows you to modify most of the characteristics set in the DIFF statement.
After changes to a DIFF element are processed, Adams Solver (C++) will also reprocess the numerical solutions to accommodate the changes set in this command.

Examples

 
DIFF/99, FUNCTION=-2*DIF(99) + SIN(TIME), LIST
DIFF/34, DYNAMIC_HOLD, LIST
See other available SIMULATE commands.