Welcome to Adams/Solver Subroutines - Kxcad.net
Welcome to Adams/Solver Subroutines - Kxcad.net
Welcome to Adams/Solver Subroutines - Kxcad.net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
170<br />
<strong>Adams</strong>/<strong>Solver</strong><br />
Input Arguments<br />
id An integer variable that provides the identifier of the GFORCE statement<br />
requesting information from GFOSUB. From the identifier,<br />
<strong>Adams</strong>/<strong>Solver</strong> au<strong>to</strong>matically recognizes other information (such as the<br />
par argument) that is available in the corresponding statement.<br />
time A double-precision variable containing the current simulation time.<br />
par A double-precision array of constants taken in order from the USER<br />
parenthetical list of the GFORCE statement.<br />
npar An integer variable that indicates the number of constants you specify in<br />
the USER parenthetical list. This variable provides the GFOSUB<br />
evaluation subroutine with the number of values s<strong>to</strong>red in the par array.<br />
dflag A logical variable that <strong>Adams</strong>/<strong>Solver</strong> sets <strong>to</strong> true when it calls GFOSUB<br />
<strong>to</strong> evaluate the partial derivatives of the specified functions. Otherwise,<br />
<strong>Adams</strong>/<strong>Solver</strong> sets the dflag argument <strong>to</strong> false.<br />
iflag A logical variable that <strong>Adams</strong>/<strong>Solver</strong> sets <strong>to</strong> true when it needs the<br />
functional dependency information from GFOSUB. Functional<br />
dependencies are established with the same calls <strong>to</strong> SYSARY, and<br />
SYSFNC that are later used <strong>to</strong> compute the values of the GFORCE<br />
components. If the iflag argument is false, the values of the user-defined<br />
expressions are computed.<br />
Output Argument<br />
result A double-precision array that returns the six values of the GFORCE<br />
components.<br />
Extended Definition<br />
The GFORCE statement with a function expression is usually adequate for defining functions that<br />
represent the three translational and three rotational vec<strong>to</strong>r components of a force at a point. However, if<br />
the force and <strong>to</strong>rque expressions become lengthy and awkward, you can use a GFOSUB.<br />
You can call utility subroutines, such as AKISPL, CUBSPL, SYSARY, and SYSFNC, from GFOSUB,<br />
<strong>to</strong> obtain information about system variables, user-defined variables, and splines.<br />
The SYSARY and SYSFNC utility subroutines set up functional dependencies when the GFOSUB<br />
argument iflag is true. In order for <strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> compute solutions efficiently, it must know the<br />
<strong>Solver</strong> states on which the GFORCES depend. <strong>Adams</strong>/<strong>Solver</strong> determines these functional dependencies<br />
at the beginning of the simulation by calling GFOSUB with the argument iflag set <strong>to</strong> true. <strong>Adams</strong>/<strong>Solver</strong><br />
does this once for each GFORCE statement with a FUNCTION=USER() argument. During each call <strong>to</strong><br />
GFOSUB, <strong>Adams</strong>/<strong>Solver</strong> records the calls you make <strong>to</strong> SYSARY and SYSFNC. <strong>Adams</strong>/<strong>Solver</strong> assumes<br />
that the GFORCE components depend on those <strong>Adams</strong>/<strong>Solver</strong> states that are accessed through SYSARY<br />
and SYSFNC.