02.04.2013 Views

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

136<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. This variable provides the CNFSUB evaluation<br />

subroutine with the number of values s<strong>to</strong>red in the par array.<br />

par A double-precision array of constants taken in order from the<br />

NORMAL_FUNCTION USER parenthetical list of the CONTACT statement.<br />

time A double-precision variable through which <strong>Adams</strong>/<strong>Solver</strong> conveys the current<br />

simulation time.<br />

Output Argument<br />

result A double-precision array that returns the value of the normal force.<br />

Extended Definition<br />

The IMPACT and POISSON force types in the CONTACT statement are usually sufficient <strong>to</strong> define the<br />

contact normal force. However, if you require another force model, you can use a CNFSUB. If the<br />

algorithms use or consist of already-existing FORTRAN-77 subroutines, CNFSUB can be made <strong>to</strong> call<br />

them.<br />

You can call utility subroutines, such as AKISPL, CUBSPL, SYSARY, and SYSFNC, from CNFSUB,<br />

<strong>to</strong> obtain information about system variables, user-defined variables, and splines.<br />

The SYSARY and SYSFNC utility subroutines set functional dependencies when the CNFSUB<br />

argument iflag is true. To compute solutions efficiently, <strong>Adams</strong>/<strong>Solver</strong> must know the other variables on<br />

which each user-defined variable depends. <strong>Adams</strong>/<strong>Solver</strong> determines these functional dependencies at<br />

the beginning of the simulation by calling CNFSUB with the argument iflag set <strong>to</strong> true. <strong>Adams</strong>/<strong>Solver</strong><br />

does this once for each CONTACT statement with a<br />

NORMAL_FUNCTION=USER() argument.<br />

During each call <strong>to</strong> CNFSUB, <strong>Adams</strong>/<strong>Solver</strong> records which calls you make <strong>to</strong> SYSARY and SYSFNC.<br />

<strong>Adams</strong>/<strong>Solver</strong> assumes that the CONTACT components depend on those <strong>Adams</strong>/<strong>Solver</strong> variables that<br />

are accessed through SYSARY and SYSFNC.<br />

Using the dflag variable<br />

Only the first value in the array is used by <strong>Adams</strong>/<strong>Solver</strong>.<br />

The use of the dflag variable is optional. Its purpose is <strong>to</strong> simply let you know that CNFSUB is being<br />

called <strong>to</strong> evaluate a partial derivative. One of the states on which the CNFSUB depends has been<br />

perturbed very slightly. In many situations, it is likely that major calculations in the CNFSUB are

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!