USER REQUEST variable can now be accessed in the Adams data set using the VARVAL command. Currently supported user request routines are 1102, 1090, 1141, 1114, 1117, 1118, 902, 1141 and 1101. This feature is useful in situations such as the design of control systems in Adams models. The Oncenter Control analysis in Adams Car uses the same principle with different branch id's (1610, 1611). Given a USER REQUEST statement of the following form:
REQ/id, FUNC=USER(par_list)
where:
id | = | REQUEST statement id |
par_list | = | parameter listing required by USER REQUEST statement |
A variable can be created in the data set by using the following statement:
VAR/id, FUNC=USER(1106,col,par_list)
where:
id | = | VARVAL statement id |
col | = | column number of variable to be returned from a given Adams USER REQUEST in the .out file (Use columns 2, 3, 4, 6, 7, 8). |
par_list | = | parameter listing (must be same as above) |
As shown here, if the value of the first parameter passed to the VARSUB routine is 1106, the VARSUB passes the third through 30th parameter on to the REQSUB. The REQSUB returns an array of values corresponding to the columns of the REQUEST statement. The value for the column number given by the second parameter is then returned by the VARSUB. Be careful to use the OUTPUT column number, and not the REQUEST file column number:
OUTPUT FILE Column Number | REQUEST FILE Column Number |
1 | NOT USED |
2 | 1 |
3 | 2 |
4 | 3 |
5 | NOT USED |
6 | 4 |
7 | 5 |
8 | 6 |
A example of the above utility is shown below:
REQ/1050,FUNC=USER(1020,3,0.22482,0.0088512)
VAR/1050,FUNC=USER(1106,4,1020,3,0.22482,0.0088512)
In this example VAR/1050 is defined as OUTPUT column 4 (REQ column 3) of REQUEST/1050 (left rear tire force).