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 />
nsize An integer variable that gives the number of parameters that the function<br />
fncnam requires. Its value is dependent on the function name. See the table<br />
above for the number of parameters that function fncnam requires.<br />
Output Arguments<br />
errflg A logical variable that returns as true if an error occurred during your call<br />
<strong>to</strong> SYSARY.<br />
nstates An integer variable that returns the number of values <strong>Adams</strong>/<strong>Solver</strong> has<br />
put in states. Note that an integer variable must be used here for<br />
<strong>Adams</strong>/<strong>Solver</strong> <strong>to</strong> return the number of states. The value returned in this<br />
variable is as defined in the table above.<br />
states A double-precision array whose size depends on the fncnam (see the table<br />
above) that contains the values that SYSARY returns. When the iflag<br />
argument in the user subroutine is true or when input errors are found,<br />
states contains zeros.<br />
Extended Definition<br />
SYSARY returns a set of system states or s<strong>to</strong>res the dependencies of the user value on the set of system<br />
states. You can use the system state values <strong>to</strong> compute the instantaneous values of a user-defined<br />
function; <strong>Adams</strong>/<strong>Solver</strong> uses the dependency on state variables <strong>to</strong> create the matrix of partial derivatives<br />
(Jacobian) of the system states with respect <strong>to</strong> the <strong>Adams</strong>/<strong>Solver</strong> state variables. <strong>Adams</strong>/<strong>Solver</strong> uses the<br />
Jacobian matrix in several analysis computations.<br />
When called from a force evaluation subroutine or from VARSUB, SYSARY returns the current<br />
predicted values of the state. SENSUB is called only after a completed integration state, so SYSARY<br />
returns the converged values when called from SENSUB. REQSUB is called at output steps and, like<br />
SENSUB, SYSARY returns the converged values when called from REQSUB. Therefore, the values<br />
returned from SYSARY are the current values of the state; whether they are the predicted values, or the<br />
corrected values, depends on where you are when calling SYSARY.<br />
You should use SYSFNC (see SYSFNC) <strong>to</strong> access a single system state corresponding <strong>to</strong> one modeling<br />
element.<br />
Where SYSFNC evaluates one <strong>Adams</strong>/<strong>Solver</strong> function, SYSARY evaluates several with one call. For<br />
example, <strong>to</strong> evaluate DX(12,10,99), DY(12,10,99) and DZ(12,10,99), you call SYSARY with:<br />
• fncnam='TDISP'<br />
• ipar(1)=12<br />
• ipar(2)=10<br />
• ipar(3)=99<br />
• nsize=3<br />
97