fncnam | A character variable that specifies the name of the function whose data is being requested from SYSARY. The legal values for fncnam are derived from the list of functions available to you in the FUNCTION= expression construct. Any one of the following character strings is legal. ![]() |
![]() | |
![]() | |
ipar | An integer array of size nsize that contains the parameter list for function fncnam. The table below defines the appropriate parameter list types and dimensions for the different functions available. |
nsize | An integer variable that gives the number of parameters that the function fncnam requires. Its value is dependent on the function name. See the table below for the number of parameters that function fncnam requires. |
errflg | A logical variable that returns as true if an error occurred during your call to SYSARY. |
nstates | An integer variable that returns the number of values Adams Solver has put in states. The value returned in this variable is as defined in the table below. Note: An integer variable, not a constant, must be used here to prevent a programing memory violation error. |
states | A double-precision array whose size depends on the fncnam (see the table below) that contains the values that SYSARY returns. When the iflag argument in the user subroutine is true or when input errors are found, states contains zeros. |
fncnam: | nsize: | nstates: | states: |
|---|---|---|---|
DISP | 1-3 | 6 | states(1) = DX(i1[,i2,i3]) states(2) = DY(i1[,i2,i3]) states(3) = DZ(i1[,i2,i3]) states(4) = PSI(i1[,i2]) states(5) = THETA(i1[,i2]) states(6) = PHI(i1[,i2]) |
TDISP | 1-3 | 3 | states(1) = DX(i1[,i2,i3]) states(2) = DY(i1[,i2,i3]) states(3) = DZ(i1[,i2,i3]) |
RDISP | 1-2 | 3 | states(1) = PSI(i1[,i2]) states(2) = THETA(i1[,i2]) states(3) = PHI(i1[,i2]) |
Q | 1 | NMODES* | -- |
UVX** | 2 | 3 | -- |
UVY** | 2 | 3 | -- |
UVZ** | 2 | 3 | -- |
DC** | 2 | 9 | -- |
VEL | 1-4 | 6 | states(1) = VX(i1[,i2,i3,i4]) states(2) = VY(i1[,i2,i3,i4]) states(3) = VZ(i1[,i2,i3,i4]) states(4) = WX(i1[,i2,i3]) states(5) = WY(i1[,i2,i3]) states(6) = WZ(i1[,i2,i3]) |
TVEL | 1-4 | 3 | states(1) = VX(i1[,i2,i3,i4]) states(2) = VY(i1[,i2,i3,i4]) states(3) = VZ(i1[,i2,i3,i4]) |
RVEL | 1-3 | 3 | states(1) = WX(i1[,i2,i3]) states(2) = WY(i1[,i2,i3]) states(3) = WZ(i1[,i2,i3]) |
QDOT | 1 | NMODES* | -- |
ACC | 1-4 | 6 | states(1) = ACCX(i1[,i2,i3,i4]) states(2) = ACCY(i1[,i2,i3,i4]) states(3) = ACCZ(i1[,i2,i3,i4]) states(4) = WDTX(i1[,i2,i3,i4]) states(5) = WDTY(i1[,i2,i3,i4]) states(6) = WDTZ(i1[,i2,i3,i4]) |
TACC | 1-4 | 3 | states(1) = ACCX(i1[,i2,i3,i4]) states(2) = ACCY(i1[,i2,i3,i4]) states(3) = ACCZ(i1[,i2,i3,i4]) |
RACC | 1-4 | 3 | states(1) = WDTX(i1[,i2,i3,i4]) states(2) = WDTY(i1[,i2,i3,i4]) states(3) = WDTZ(i1[,i2,i3,i4]) |
QDDOT | 1 | NMODES* | |
FORCE | 1-3 | 6 | states(1) = FX(i1[,i2,i3]) states(2) = FY(i1[,i2,i3]) states(3) = FZ(i1[,i2,i3]) states(4) = TX(i1[,i2,i3]) states(5) = TY(i1[,i2,i3]) states(6) = TZ(i1[,i2,i3]) |
TFORCE | 1-3 | 3 | states(1) = FX(i1[,i2,i3]) states(2) = FY(i1[,i2,i3]) states(3) = FZ(i1[,i2,i3]) |
RFORCE | 1-3 | 3 | states(1) = TX(i1[,i2,i3]) states(2) = TY(i1[,i2,i3]) states(3) = TZ(i1[,i2,i3]) |
PINPUT | 1 | n*** | states(1) = PINVAL(i1,1) states(2) = PINVAL(i1,2) states(3) = PINVAL(i1,3) . . . states(n) = PINVAL(i1,n) |
POUTPUT | 1 | n*** | states(1) = POUVAL(i1,1) states(2) = POUVAL(i1,2) states(3) = POUVAL(i1,3) states(n) = POUVAL(i1,n) |
ARRAY | 1 | n*** | states(1) = ARYVAL(i1,1) states(2) = ARYVAL(i1,2) states(3) = ARYVAL(i1,3) . . . states(n) = ARYVAL(i1,n) |
FXTDISP | 1 | 3 | states(1) to states(3) return the x, y and z components (respectively) of the global position of the BCS of a FLEX_BODY. |
FXDC | 1 | 9 | states(1) to states(9) return the direction cosine matrix of the BCS of a FLEX_BODY. The values are returned in column order (for example, the first three values are the entries of the first column.) |
FXTVEL | 1 | 3 | states(1) to states(3) return the x, y and z components (respectively) of the global translational velocity of the BCS of a FLEX_BODY. |
FXRVEL | 1 | 3 | states(1) to states(3) return the x, y and z components (respectively) of the global angular velocity of the BCS of a FLEX_BODY. |
*NMODES (see NMODES) is the number of active modes defined for that flex body. You can use the utility subroutine NMODES to determine the number of active modes. The ipar(1) array must contain the id of the flex body of interest. **Assume that the ipar array contains two markers, I and J. You can specify either I or J to be zero. In that case, the marker specified as zero defaults to the ground coordinate system. ***Size as specified in the PINPUT, POUTPUT, or ARRAY statement. | |||
Value | Description |
|---|---|
0 | Normal function evaluation |
1 | Expression construction (Adams Solver C++ only) |
3 | Mapping dependencies |
5 | Expression destruction (Adams Solver C++ only) |
7 | Expression serialization |
9 | Expression un-serialization |
Tip: | 1. Use SYSFNC to access individual states. Quite often, user-defined values depend on a single-system state such as the x component of the displacement between two markers, or the z component of the velocity between two markers. While you can use SYSARY to access the individual components, a single call to SYSFNC is convenient and more efficient. The use of SYSFNC is therefore recommended under these circumstances. 2. Use RCNVRT to convert rotational displacements Euler angles to any other angle representation, for example Adams AX, AY, AZ projected angles. CALL SYSFNC (`RDISP', IPAR, 2, ANGLES, NSTATE, ERRFLG) CALL RCNVRT (`EULER', ANGLES, `AXAYAZ', ANGLES, ISTAT) Use SYSFNC to access individual states.Quite often, user-defined values depend on a single-system state such as the x component of the displacement between two markers. While you may use SYSARY to access the individual components, a single call to SYSFNC is convenient and more efficient. The use of SYSFNC is therefore recommended under these circumstances. |
Caution: | When the iflag argument is 1 or 3, you must be sure to make the same SYSARY calls as when actually computing the results. Adams Solver passes a parameter iflag to each user-written subroutine (xxxSUB). It indicates to you whether Adams Solver is calling the subroutine for an initialization pass (iflag = 1 or 3) or for a function evaluation (iflag = 0). You must construct user-written subroutines such that all calls to SYSARY that are made during the simulation are also invoked when the iflag argument is 1 or 3. Adams Solver uses this information to construct the correct Jacobian matrix. User-written subroutines should not call SYSARY when iflag = 5, 7 or 9. When unit vectors ('UVX', 'UVY', 'UVZ') are requested, it is possible, due to numerical roundoff, that the vectors are not of exactly unit length. It is up to the author of the user-written subroutine to ensure that these roundoff differences do not cause errors. For example, the term sqrt(1.0-UVX(1)^2-UVX(2)^2) can fail due to a negative argument for the sqrt() function. Similarly, the direction cosine matrix ('DC') may not be perfectly orthogonal. |