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.
<strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong><br />
set <strong>to</strong> true. During each call <strong>to</strong> VFOSUB, <strong>Adams</strong>/<strong>Solver</strong> records which calls you make <strong>to</strong> SYSARY and<br />
SYSFNC and assumes that the resulting values are dependent only on those <strong>Adams</strong>/<strong>Solver</strong> variables<br />
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 them 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 rotational representation that does not encounter a singularity.<br />
Caution: • When the iflag argument is true, you must make all the calls <strong>to</strong> SYSARY and<br />
SYSFNC as are made <strong>to</strong> compute the component values of the VFORCE. This<br />
ensures that <strong>Adams</strong>/<strong>Solver</strong> has the proper functional dependencies. In general,<br />
failure <strong>to</strong> account for dependencies in the VFORCE components can make it<br />
difficult for <strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> converge <strong>to</strong> a solution and/or can force<br />
<strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> take small integration steps. Both of these effects usually cause<br />
large increases in execution time.<br />
FORTRAN - Pro<strong>to</strong>type<br />
• When the iflag argument is true, SYSARY and SYSFNC return zero values.<br />
Computations that divide by these values result in fatal errors when you execute<br />
<strong>Adams</strong>/<strong>Solver</strong>. You should check for nonzero values or ensure that the iflag<br />
argument is set <strong>to</strong> false before dividing by these values.<br />
A sample structure for VFOSUB is shown next. The comments explain how the subroutine works.<br />
&<br />
SUBROUTINE VFOSUB(ID, TIME, PAR, NPAR, DFLAG,<br />
IFLAG, RESULT)<br />
C<br />
C === Type and dimension statements ===================<br />
C<br />
C - External variable definitions -----------<br />
C<br />
INTEGER ID<br />
DOUBLE PRECISION TIME<br />
DOUBLE PRECISION PAR(*)<br />
INTEGER NPAR<br />
LOGICAL DFLAG<br />
LOGICAL IFLAG<br />
DOUBLE PRECISION RESULT(3)<br />
C<br />
C ID Identifier of calling VFORCE statement<br />
C TIME Current time<br />
C PAR Array containing passed parameters<br />
C NPAR Number of passed parameters<br />
C DFLAG Differencing flag<br />
C<br />
C<br />
IFLAG<br />
RESULT<br />
Initial pass flag<br />
Array (dimension 3) of computed VFORCE<br />
C components returned <strong>to</strong> ADAMS<br />
231