Note: | Use mixed case names for the Adams subroutine names when using the C style interface. For the default subroutine name capitalize the first letter and have the remaining letters lower case; Cffsub for example. Doing this ensures that Adams Solver correctly distinguishes a C style subroutine from Fortran and calls with the appropriate interface. |
area | A double-precision variable that specifies the value of the contact area. |
dflag | A logical variable that Adams Solver sets to true when it calls CFFSUB to evaluate the partial derivatives of the specified functions. Otherwise, Adams Solver sets the dflag argument to false. |
id | An integer variable that provides the identifier of the CONTACT statement requesting information from CFFSUB. From the identifier, Adams Solver automatically recognizes other information (such as the par argument) that is available in the corresponding statement. |
iflag | An integer variable that Adams Solver sets to indicate why the routine is being called: ![]() Adams Solver sets iflag to 3 when it needs the functional dependency of the user-defined variable. The functional dependencies are set with the same calls to the SYSARY and SYSFNC utility subroutines that are made to compute the value of the user-defined variable. If iflag is 0, Adams Solver computes the value of the user-written variable. When your user-defined subroutine has static data that needs to be saved and restored to support the Adams Solver commands Save and Reload, then call the serialization functions for your data when iflag is set to 7, and the un-serialization functions when iflag is set to 9. Note: In simple subroutines where serializing data is not needed, you can declare iflag as a logical variable. In this case you declare your dependencies when Adams Solver sets iflag to true, and compute the subroutine's value when Adams Solver sets iflag to false. |
loci | A double-precision array that specifies the vector from the reference marker of the CONTACT I Geometry (IGEOM) to the contact point on IGEOM. Expressed in the coordinate system of the reference marker of IGEOM. Note: In Flex Body Contact, loci is a node location on the Flex Body. There can be multiple nodes in each incident. The subroutine will be called for each node. |
locj | A double-precision array that specifies the vector from the reference marker of the CONTACT J Geometry (JGEOM) to the contact point on JGEOM. Expressed in the coordinate system of the reference marker of JGEOM. Note: In Flex Body Contact, locj is a node location on the Flex Body. There can be multiple nodes in each incident. The subroutine will be called for each node. |
nforce | A double-precision variable that specifies the value of the contact normal force. |
npar | An integer variable that indicates the number of constants you specify in the USER parenthetical list. This variable provides the CFFSUB evaluation subroutine with the number of values stored in the par array. |
par | A double-precision array of constants taken in order from the FRICTION_FUNCTION USER parenthetical list of the CONTACT statement. |
time | A double-precision variable through which Adams Solver conveys the current simulation time. |
x | A double-precision array that specifies the values of the contact deformation. (1) - Translational deformation since the beginning of contact along the x-axis of the contact I incident marker. (2) - Translational deformation since the beginning of contact along the y-axis of the contact I incident marker. (3) - Rotational deformation since the beginning of contact about the z-axis of the contact I incident marker. |
xdot | A double-precision array that specifies the slip velocities at the contact point. (1) - Translational slip velocity along the x-axis of the contact I incident marker. (2) - Translational slip velocity along the y-axis of the contact I incident marker. (3) - Relative angular velocity of contacting surfaces about the z-axis of the contact I incident marker. Note: The contact incident I-marker is always oriented such that the x-axis is in the direction of slip. This means that the marker orientation is changing as the direction of slip changes. Therefore, the velocity along the y-axis (which is XDOT(2)) will always be zero. |
result | A double-precision array that returns the three components of the friction force. (1) - Translational force along the x-axis of the contact I incident marker. (2) - Translational force along the y-axis of the contact I incident marker. (3) - Rotational torque about the z-axis of the contact I incident marker. |
Tip: | If the SYSARY or SYSFNC subroutines are called to access angular displacements, the values returned by CFFSUB may contain discontinuities. Discontinuities occur if there is an Euler singularity. To avoid the Euler singularity (and thus the discontinuities), use the RCNVRT utility subroutine to convert the rotational angles from Euler angles to some other coordinate system that does not encounter a singularity. ■If the calculations always use the same SYSARY and SYSFNC calls through the whole simulation, and you have no initialization to do, you do not need to check the flag argument at all. You can just call SYSARY and/or SYSFNC, compute the user-defined variable value, and return to Adams Solver (FORTRAN) |
Caution: | When the iflag argument is not zero: ■You must make all the calls to SYSARY and SYSFNC as they are made to compute the component values of the CONTACT statement. This ensures that Adams Solver has the proper functional dependencies. In general, failure to account for dependencies in the CONTACT statement components can make it difficult for Adams Solver to converge to a solution and/or can force Adams Solver to take small integration steps, potentially causing large increases in execution time. ■SYSARY and SYSFNC return zero values for system and user-defined variables. When you use Adams Solver, computations that divide by these values result in fatal errors. You should check for nonzero values, or ensure the iflag argument is set to zero, before dividing by these values. |