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.
222<br />
<strong>Adams</strong>/<strong>Solver</strong><br />
<strong>to</strong> the system variables have been pre-computed and s<strong>to</strong>red in the program for use in the system Jacobian<br />
when the particular constraint is involved.<br />
When you write a UCOSUB, equations of motion are added <strong>to</strong> the set of equations <strong>Adams</strong>/<strong>Solver</strong><br />
generates for the standard constraint statements. You must provide the first and second derivatives of the<br />
constraint relationship with respect <strong>to</strong> the set of variables. You must code the constraint relationship in<br />
the implicit form. For information on implicit forms, see DIFF statement (C++ or FORTRAN).<br />
Caution: • When selecting the displacements or the velocities of the part principal axes for the<br />
constraint, remember that the part principal axes are not always identical <strong>to</strong> those<br />
of the part center-of-mass marker (CM). The following list summarizes the<br />
circumstances in which the part principal axes may differ from those of the part<br />
center-of-mass marker.<br />
Structure<br />
• When the PART statement does not include the CM argument, the principal<br />
axes default <strong>to</strong> the body coordinate system.<br />
• Whenever the center-of-mass marker z-axis is parallel <strong>to</strong> the z-axis of the<br />
ground reference frame at time zero, <strong>Adams</strong>/<strong>Solver</strong> permutes the internal<br />
representation of the principal axes by 90-degree rotations <strong>to</strong> avoid an Euler<br />
matrix singularity.<br />
• If the IP argument in the PART statement includes products of inertia,<br />
<strong>Adams</strong>/<strong>Solver</strong> computes the inertial representation of the principal axes so that<br />
the products of inertia become zero.<br />
• When specifying an IM marker, <strong>Adams</strong>/<strong>Solver</strong> computes the principal axes,<br />
which may or may not be the axes of the CM marker.<br />
• When the iflag argument is true, <strong>Adams</strong> sets q <strong>to</strong> zero. When you execute<br />
<strong>Adams</strong>/<strong>Solver</strong>, computations that divide by these values result in fatal errors.<br />
Before dividing by q values, you should check for nonzero values or ensure the<br />
iflag argument is false.<br />
A sample structure for UCOSUB is shown next. The comments explain how the subroutine works.<br />
SUBROUTINE UCOSUB (ID, TIME, Q, PAR, NPAR,<br />
& IDRSEL, IFLAG, SCALAR, ARRAY,<br />
& XMATRX)<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 Q( 30 )<br />
DOUBLE PRECISION PAR( * )<br />
INTEGER NPAR