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.
<strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong><br />
FIESUB output must be strictly a function of the values in arrays disp and velo. Consequently, FIESUB<br />
may not call the SYSARY or SYSFNC utility subroutine. FIESUB may call other utility subroutines,<br />
such as AKISPL, and CUBSPL, that do not introduce a dependency on <strong>Solver</strong> states.<br />
Caution: • The dfddis and dfdvel arrays must always be positive semidefinite. <strong>Adams</strong>/<strong>Solver</strong><br />
does not warn you if the dfddis array, the dfdvel array, or both, are not positive<br />
semidefinite. An array A is positive semidefinite if xT A x > 0 for all x ¹ 0.<br />
FORTRAN - Pro<strong>to</strong>type<br />
• Don't attempt <strong>to</strong> make any of the six field components dependent on system<br />
variables other than those FIESUB passes through the arguments disp, velo, and<br />
time. This rule prohibits calls <strong>to</strong> the utility subroutines SYSARY and SYSFNC.<br />
Failure <strong>to</strong> comply with this rule does not produce error messages, but greatly<br />
reduces the integration step sizes, increases the CPU time, and decreases the<br />
probability of convergence <strong>to</strong> a solution.<br />
• If FIESUB returns the six field components without their correct derivatives,<br />
simulation times may correspondingly increase, and the probability of<br />
convergence <strong>to</strong> a solution decreases.<br />
• If AKISPL, CUBSPL, or any of the <strong>Adams</strong>/<strong>Solver</strong> utility subroutines are used,<br />
don't forget <strong>to</strong> involve the derivatives returned by these subroutines when the<br />
FIESUB derivatives are evaluated.<br />
• Field components with continuous derivatives are desirable. Discontinuous<br />
derivatives cause a reduction of integration step size at the discontinuity, and may<br />
cause <strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> fail <strong>to</strong> converge <strong>to</strong> a solution.<br />
• When the iflag argument is true, <strong>Adams</strong>/<strong>Solver</strong> sets the disp and velo arguments <strong>to</strong><br />
zeros. When you execute <strong>Adams</strong>/<strong>Solver</strong>, computations that divide by these values<br />
result in fatal errors. You should check for nonzero values, or ensure the iflag<br />
argument is false, before dividing by disp or velo values.<br />
A sample structure for FIESUB is shown next. The comments explain how the subroutine works.<br />
SUBROUTINE FIESUB (ID, TIME, PAR, NPAR, DISP,<br />
& VELO, DFLAG, IFLAG, FIELD,<br />
& DFDDIS, DFDVEL )<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 />
DOUBLE PRECISION DISP( 6 )<br />
DOUBLE PRECISION VELO( 6 )<br />
LOGICAL DFLAG<br />
165