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

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 />

If [u,v] are the parameters corresponding <strong>to</strong> the current point on the surface, and [u*, v*] are the<br />

parameters for the closest material point on the surface <strong>to</strong> [u,v], the penalty force that is applied in the<br />

[u,v] domain is:<br />

F = -K * [(u-u)2 + (v-v*)2]<br />

K = 108<br />

At this time, you have no control over the stiffness parameter, K.<br />

Caution: Define the SURFACE only as a function of u, v. Do not make calls <strong>to</strong> the SYSARY and<br />

SYSFNC utility subroutines <strong>to</strong> access other system variables.<br />

FORTRAN - Pro<strong>to</strong>type<br />

A sample structure for SURSUB is shown next. The comments explain how the subroutine works.<br />

SUBROUTINE SURSUB ( ID, PAR, NPAR, U, V, IORD, IFLAG,<br />

& VALUES, IERR )<br />

C<br />

C Inputs:<br />

C<br />

INTEGER ID<br />

DOUBLE PRECISION PAR( * )<br />

INTEGER NPAR<br />

DOUBLE PRECISION U,V<br />

INTEGER IORD<br />

LOGICAL IFLAG<br />

C<br />

C Outputs:<br />

C<br />

DOUBLE PRECISION VALUES( * )<br />

INTEGER IERR<br />

C<br />

C+---------------------------------------------------------------*<br />

C<br />

C ID<br />

Identifier of calling CURVE statement<br />

C PAR Array containing passed parameters<br />

C NPAR Number of passed parameters<br />

C U,V Curve parameter value<br />

C IORD Derivative order of value <strong>to</strong> be returned<br />

C IFLAG Initialization pass flag<br />

C VALUES Derivative values of CURVE returned <strong>to</strong> ADAMS<br />

C IERR Return flag; 0 =(U,V) on surface<br />

1 =(U,V) outside surface<br />

C<br />

C+---------------------------------------------------------------*<br />

C<br />

C Local Variables:<br />

C<br />

...<br />

C<br />

213

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

Saved successfully!

Ooh no, something went wrong!