114 <strong>Adams</strong>/<strong>Solver</strong> DOUBLE PRECISION DX, VZ INTEGER NUM, IPAR(2) LOGICAL ERRFLG LOGICAL PARFLG CALL ADAMS_NEEDS_PARTIALS(PARFLG) IPAR(1) = PAR(1) IPAR(2) = PAR(2) CALL SYSFNC('DX', IPAR, 2, DX, ERRFLG ) CALL SYSFNC('VZ', IPAR, 2, VZ, ERRFLG ) VALUE = DX*VZ IF(PARFLG) THEN CALL SYSPAR('DX', IPAR, 2, VZ, 1, ERRFLG) CALL SYSPAR('VZ', IPAR, 2, DX, 1, ERRFLG) ENDIF CALL ERRMES(ERRFLG,'ERROR FOR SFORCE ',ID,'STOP') RETURN END Using SYSPAR with Utility <strong>Subroutines</strong> This SFOSUB example shows how you can use SYSPAR in conjunction with utility subroutines. In this SFOSUB you have: VALUE = -IMPACT(400-DM(12,9),-VR(12,9)) or, using the nomenclature developed earlier: F = -IMPACT(400-M 1 ,-M 2 ) where M 1 = DM(12,9) and M 2 = VR(12,9). Here, you must rely on the ability of the IMPACT utility function <strong>to</strong> provide partial derivatives of its arguments. ∂ F ---------- ∂ M1 ∂ F ---------- ∂ M2 = = ∂ IMPACT -------------------------- ( 400 – M ∂ M 1′ – M2) ( – 1) 1 ∂ IMPACT -------------------------- ( 400 – M ∂ M 1′ – M2) ( – 1) 2 The implementation follows. Pay close attention <strong>to</strong> the use of the IORD argument (argument 8) <strong>to</strong> the IMPACT function. It controls whether 0th, 1st, or 2nd derivative of the impact is being requested. Learn more about the IMPACT function (C++ or FORTRAN).
SUBROUTINE SFOSUB (ID, TIME, PAR, NPAR, DFLAG, IFLAG, VALUE) INTEGER ID DOUBLE PRECISION TIME DOUBLE PRECISION PAR( * ) INTEGER NPAR LOGICAL DFLAG LOGICAL IFLAG DOUBLE PRECISION VALUE DOUBLE PRECISION DM, VR, V(3) INTEGER IPAR(2) LOGICAL ERRFLG, PARFLG IPAR(1)=12 IPAR(2)=9 CALL ADAMS_NEEDS_PARTIALS(PARFLG) CALL SYSFNC('DM', IPAR, 2, DM, ERRFLG ) CALL SYSFNC('VR', IPAR, 2, VR, ERRFLG ) IF(PARFLG) THEN CALL IMPACT(400.D0-DM,-VR,100D0,1.D2,1.5D0, 1D1,1.D0,1,V,ERRFLG) CALL SYSPAR('DM', IPAR, 2, V(1), 1, ERRFLG ) CALL SYSPAR('VR', IPAR, 2, V(2), 1, ERRFLG ) ENDIF <strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong> CALL IMPACT(400-DM,-VR,100D0,100.0D0,1.5D0,10D0,1.0D0,0,V,ERRFLG) VALUE=-V(1) CALL ERRMES(ERRFLG,'ERROR FOR SFORCE',ID,'STOP') RETURN END Using FIESUB with SYSPAR This example, involving FIESUB, shows how SYSPAR has closed the functionality gap between GFOSUB and FIESUB. In the FORTRAN 77 version of <strong>Adams</strong>/<strong>Solver</strong>, the ability <strong>to</strong> define partial derivatives of the FIELD element in a FIESUB user subroutine gives it a computational advantage over the GFORCE force element and a GFOSUB user subroutine. The FIESUB user subroutine is defined as follows: CALL FIESUB(ID, TIME, PAR, NPAR, DISP, VELO, DFLAG, IFLAG, FIELD, DFDDIS, DFDVEL) where DISP and VELO are the displacement and velocity of the I and J markers of the field element that are input <strong>to</strong> FIESUB. FIESUB computes the 6D value of the force, FIELD. Also, when DFLAG is TRUE, you must provide the partial derivatives with respect <strong>to</strong> displacement, DFDDIS, and the partial derivatives with respect <strong>to</strong> velocity, DFDVEL. Learn more about FIELD (C++ or FORTRAN). 115
- Page 1 and 2:
Welcome to Adams/Solver Subroutines
- Page 3 and 4:
Compilers and Linkers Welcome to Ad
- Page 5 and 6:
Utility Subroutines About Utility S
- Page 7 and 8:
Subroutine: Does the following: Uns
- Page 9 and 10:
Welcome to Adams/Solver Subroutines
- Page 11 and 12:
Input Arguments Welcome to Adams/So
- Page 13 and 14:
RETURN END AKISPL Welcome to Adams/
- Page 15 and 16:
Welcome to Adams/Solver Subroutines
- Page 17 and 18:
Welcome to Adams/Solver Subroutines
- Page 19 and 20:
Welcome to Adams/Solver Subroutines
- Page 21 and 22:
Use Called By Any user-written subr
- Page 23 and 24:
T1( x - x0) = x - x0 CUBSPL , Welco
- Page 25 and 26:
Output Arguments Extended Definitio
- Page 27 and 28:
Extended Definition Welcome to Adam
- Page 29 and 30:
Input Arguments Output Arguments We
- Page 31 and 32:
Input Arguments Output Arguments Ex
- Page 33 and 34:
Input Arguments Welcome to Adams/So
- Page 35 and 36:
Use Welcome to Adams/Solver Subrout
- Page 37 and 38:
GETCPU retrieves CPU time used so f
- Page 39 and 40:
GETMOD returns the current analysis
- Page 41 and 42:
Use Called by Any user-written subr
- Page 43 and 44:
Prerequisite Welcome to Adams/Solve
- Page 45 and 46:
Welcome to Adams/Solver Subroutines
- Page 47 and 48:
Welcome to Adams/Solver Subroutines
- Page 49 and 50:
C C Inputs: C INTEGER ID C C Output
- Page 51 and 52:
Welcome to Adams/Solver Subroutines
- Page 53 and 54:
Welcome to Adams/Solver Subroutines
- Page 55 and 56:
Output Arguments Welcome to Adams/S
- Page 57 and 58:
C = [-A-1B] Welcome to Adams/Solver
- Page 59 and 60:
Output Arguments Welcome to Adams/S
- Page 61 and 62:
Prerequisite STRING statement in da
- Page 63 and 64: Prerequisites None Calling Sequence
- Page 65 and 66: function. Welcome to Adams/Solver S
- Page 67 and 68: Calling Sequence CALL IMPACT (x, x'
- Page 69 and 70: Output Arguments Extended Definitio
- Page 71 and 72: Input Argument Welcome to Adams/Sol
- Page 73 and 74: Input Argument Welcome to Adams/Sol
- Page 75 and 76: Use Called By Any user-written subr
- Page 77 and 78: Use Called By SPLINE_READ Calling S
- Page 79 and 80: Input Arguments Welcome to Adams/So
- Page 81 and 82: `S232' Space-two: 2-3-2 `S313' Spac
- Page 83 and 84: Welcome to Adams/Solver Subroutines
- Page 85 and 86: Callng Sequence CALL SHF (x, x0, a,
- Page 87 and 88: Input Arguments Welcome to Adams/So
- Page 89 and 90: Calling Sequence CALL STEP5 (x, x0,
- Page 91 and 92: Welcome to Adams/Solver Subroutines
- Page 93 and 94: Welcome to Adams/Solver Subroutines
- Page 95 and 96: Welcome to Adams/Solver Subroutines
- Page 97 and 98: Welcome to Adams/Solver Subroutines
- Page 99 and 100: Welcome to Adams/Solver Subroutines
- Page 101 and 102: Welcome to Adams/Solver Subroutines
- Page 103 and 104: C INTEGER IPAR(2), N_UVX, N_UVY, N_
- Page 105 and 106: CALL NMODES(FBDYID,NQ,ERRFLG) STRIN
- Page 107 and 108: Input Arguments Welcome to Adams/So
- Page 109 and 110: Welcome to Adams/Solver Subroutines
- Page 111 and 112: F(M 1 (q), M 2 (q), ..., M N (q)) W
- Page 113: Examples Welcome to Adams/Solver Su
- Page 117 and 118: DO 100 J = 1 , 6 DFDDIS(I,J)=0.D0 D
- Page 119 and 120: Welcome to Adams/Solver Subroutines
- Page 121 and 122: Use Called By Any user-written subr
- Page 123 and 124: Input Arguments Welcome to Adams/So
- Page 125 and 126: Welcome to Adams/Solver Subroutines
- Page 127 and 128: User-Written Subroutines Welcome to
- Page 129 and 130: Input Arguments Welcome to Adams/So
- Page 131 and 132: Welcome to Adams/Solver Subroutines
- Page 133 and 134: Welcome to Adams/Solver Subroutines
- Page 135 and 136: Input Arguments Welcome to Adams/So
- Page 137 and 138: Welcome to Adams/Solver Subroutines
- Page 139 and 140: C - Evaluate Normal Force component
- Page 141 and 142: Welcome to Adams/Solver Subroutines
- Page 143 and 144: Input Arguments Welcome to Adams/So
- Page 145 and 146: Welcome to Adams/Solver Subroutines
- Page 147 and 148: Welcome to Adams/Solver Subroutines
- Page 149 and 150: Welcome to Adams/Solver Subroutines
- Page 151 and 152: Welcome to Adams/Solver Subroutines
- Page 153 and 154: Output Arguments Welcome to Adams/S
- Page 155 and 156: Welcome to Adams/Solver Subroutines
- Page 157 and 158: Input Arguments Welcome to Adams/So
- Page 159 and 160: Welcome to Adams/Solver Subroutines
- Page 161 and 162: Input Arguments Welcome to Adams/So
- Page 163 and 164: Input Arguments Welcome to Adams/So
- Page 165 and 166:
Welcome to Adams/Solver Subroutines
- Page 167 and 168:
C X rotational field torque C ... F
- Page 169 and 170:
}; int NPAR; const double* PAR; int
- Page 171 and 172:
Using the DFLAG Variable Welcome to
- Page 173 and 174:
C RESULT(2) = ... RESULT(3) = ... R
- Page 175 and 176:
GSE_UPDATE Calling Sequence Welcome
- Page 177 and 178:
Input Arguments Welcome to Adams/So
- Page 179 and 180:
Use Corresponding Statement Welcome
- Page 181 and 182:
Output Arguments scale A double-pre
- Page 183 and 184:
Welcome to Adams/Solver Subroutines
- Page 185 and 186:
Input Arguments Welcome to Adams/So
- Page 187 and 188:
Welcome to Adams/Solver Subroutines
- Page 189 and 190:
Use Corresponding Command Calling S
- Page 191 and 192:
Input Arguments Welcome to Adams/So
- Page 193 and 194:
C ENDIF C C - Create request inform
- Page 195 and 196:
Welcome to Adams/Solver Subroutines
- Page 197 and 198:
Welcome to Adams/Solver Subroutines
- Page 199 and 200:
Input Arguments Welcome to Adams/So
- Page 201 and 202:
* * SENSOR struct sAdamsSensorEval
- Page 203 and 204:
Welcome to Adams/Solver Subroutines
- Page 205 and 206:
Welcome to Adams/Solver Subroutines
- Page 207 and 208:
FORTRAN - Prototype Welcome to Adam
- Page 209 and 210:
Input Arguments Welcome to Adams/So
- Page 211 and 212:
Welcome to Adams/Solver Subroutines
- Page 213 and 214:
Welcome to Adams/Solver Subroutines
- Page 215 and 216:
C C C C C C C C C C C C C C VALUES(
- Page 217 and 218:
Input Arguments Welcome to Adams/So
- Page 219 and 220:
Welcome to Adams/Solver Subroutines
- Page 221 and 222:
Welcome to Adams/Solver Subroutines
- Page 223 and 224:
Welcome to Adams/Solver Subroutines
- Page 225 and 226:
C - Derivatives of prior first deri
- Page 227 and 228:
Welcome to Adams/Solver Subroutines
- Page 229 and 230:
C C - Subroutine initialization ---
- Page 231 and 232:
Welcome to Adams/Solver Subroutines
- Page 233 and 234:
*/ struct sAdamsVforce { int ID; in
- Page 235 and 236:
FORTRAN - Prototype Welcome to Adam
- Page 237 and 238:
Examples For an example of this sub