Welcome to Adams/Solver Subroutines - Kxcad.net
Welcome to Adams/Solver Subroutines - Kxcad.net
Welcome to Adams/Solver Subroutines - Kxcad.net
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
234<br />
<strong>Adams</strong>/<strong>Solver</strong><br />
npar An integer variable that indicates the number of constants you specify in the<br />
USER parenthetical list. The primary purpose of the npar argument is <strong>to</strong><br />
provide VTOSUB 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 VTOSUB <strong>to</strong><br />
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 functional<br />
dependency of the user-defined expressions. You set functional<br />
dependencies with the same calls <strong>to</strong> the SYSARY and SYSFNC utility<br />
subroutines that are made <strong>to</strong> compute the values of the user-defined<br />
expressions (see SYSARY and SYSFNC). If the iflag argument is false, the<br />
values of the user-defined expressions are computed.<br />
Output Arguments<br />
result A double-precision array of length 3 that returns the x-, y-, and z-components<br />
of the VTORQUE.<br />
Extended Definition<br />
You can often use the VTORQUE statement with function expressions sufficient <strong>to</strong> define the three<br />
rotational vec<strong>to</strong>r components of a <strong>to</strong>rque at a point. However, if the <strong>to</strong>rque expressions become lengthy<br />
and awkward, you can use a VTOSUB evaluation subroutine. If the algorithms use or consist of already<br />
existing FORTRAN-77 subroutines, VTOSUB can be made <strong>to</strong> call them.<br />
You can call utility subroutines, such as AKISPL, CUBSPL, SYSARY and SYSFNC, from VTOSUB <strong>to</strong><br />
obtain information about system variables, user-defined variables, and splines. See AKISPL, CUBSPL,<br />
SYSARY, and SYSFNC.<br />
The SYSARY and SYSFNC utility subroutines au<strong>to</strong>matically set functional dependencies when the<br />
VTOSUB argument iflag is true. In order for <strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> compute solutions efficiently, it must<br />
know on which other variables each user-defined variable depends directly. <strong>Adams</strong>/<strong>Solver</strong> determines<br />
these functional dependencies at the beginning of the simulation by calling VTOSUB with the argument<br />
iflag set <strong>to</strong> true. <strong>Adams</strong>/<strong>Solver</strong> does this once for each VTORQUE statement with a<br />
FUNCTION=USER() argument.<br />
During each call <strong>to</strong> the VTOSUB evaluation subroutine, <strong>Adams</strong>/<strong>Solver</strong> records which calls you make <strong>to</strong><br />
SYSARY and SYSFNC and assumes that the resulting values are dependent on only those <strong>Adams</strong>/<strong>Solver</strong><br />
variables accessed through the SYSARY and SYSFNC calls.<br />
Tip: If the SYSARY or SYSFNC utility subroutines are called <strong>to</strong> access angular displacements,<br />
the values returned by these may contain discontinuities. To avoid the discontinuities, use<br />
the RCNVRT utility subroutine <strong>to</strong> convert the rotational angles from Euler angles <strong>to</strong> some<br />
other coordinate system that does not encounter a singularity.