DRESP3

Bulk Data Entry The DRESP3 card identifies the external function to be called and defines the parameters to be transferred to that function.

When a desired response is not available from OptiStruct, either directly or via equations, it may be calculated through external user-supplied functions implemented in shared/dynamic libraries or external files (see External Responses and Build External Libraries).

Format

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
DRESP3 ID LABEL GROUP FUNCT REGION RESP      
  DRESPM RID1 MODEL

NAME1

RID2 MODEL

NAME2

etc etc    
  VTYPE1 RID1 VOPT1 RID2 VOPT2 etc etc    
    etc              
  VTYPE2 RID1 VOPT1 RID2 VOPT2 etc etc    
    etc              
  VTYPEL1 RID1 LID1 VOPT1 RID2 LID2 VOPT2    
    etc.              
  VTYPEL2 RID1 LID1 VOPT1 RID2 LID2 VOPT2    
    etc              
  VARTYPE1 ID1 ID2 ID3 ID4 ID5 ID6 ID7  
    ID8 etc etc          
  VARTYPE2 ID1 ID2 ID3 ID4 ID5 ID6 ID7  
    ID8 etc etc          
  etc                
  VARTYPEn ID1 ID2 ID3 ID4 ID5 ID6 ID7  
    ID8              
  CELLIN CI1 CI2 CI3 etc CIn      
  CELLOUT CO              
  SENSOPT METHOD              

Alternate Format for CELLIN (cell input) Specifications

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
  CELLIN CI1 thru CIn          

Alternate Format when VARTYPE is DEIGV

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
  DEIGV EIGV1 LID1 G1 C1        
    EIGV2 LID2 G2 C2        
    etc etc etc etc        

Alternate Format when VARTYPE is USRDATA

  USRDATA STRNG  
    etc  

Definitions

Field Contents SI Unit Example
ID Response identification number. Each DRESP3 must have a unique ID with respect to all other DRESP# cards.

No default (Integer > 0)

 
LABEL User-defined name for the response. LABEL must begin with an alphabetical character.

No default (Character)

 
GROUP Defines the shared/dynamic library or external Microsoft Excel workbook to be used. 18 It references an existing LOADLIB entry in the input deck.

No default (Character)

 
FUNCT Defines the external function to be used.

No default (Character)

 
REGION Region identifier 4

Default = blank (Integer > 0 or blank)

 
RESP Defines the response to be returned by the external function.

Default = 1 (first response in the library) (Integer > 0)

 
DRESPM Indicates the beginning of a continuation line, which defines model specific response ID and Model Name pairs to be used in a Multi-Model Optimization run.  
RID# Model-specific responses identification numbers. 20  
MODEL

NAME#

User-defined model names defined on the ASSIGN, MMO entry. 20  
VTYPE# Indicates the type of variables to follow. Can be either DRESP1V or DRESP2V. 21

No default (Character)

 
RID# Identification numbers of the corresponding response defined on the preceding VTYPE# fields.

No default (Integer ≥ 0)

 
VOPT# Function type that is applied to the corresponding vector response specified via the preceding VTYPE# and RID# fields.
ATTI (Default)
Indicates that the vector is ATTI-based. For example, all grids listed on a DISP response would be passed as vector.
FREQ
Indicates that the vector is frequency-based. For example, the displacement of a given grid at all loading frequencies would be passed as vector. This is only meaningful for frequency response with blank ATTB.
ALL
Indicates that the vector is both ATTI-based and frequency-based. For example, all the internal responses spawned by the user-defined response would be passed as vector. Identical to ATTI for non-frequency response.

(Character)

 
VTYPEL# Indicates the type of variables to follow.
DRESP1LV
DRESP2LV 21

No default (Character)

 
LID# Subcase identification number for the corresponding response on the preceding RID# field.

No default (Integer ≥ 0)

 
VARTYPE# Indicates the type of variables to follow. Can be one of: DESVAR, DTABLE, DGRID, DGRIDL, DGRIDB, DEIGV, DRESP1, DRESP1L, DRESP2, DRESP2L, DVPREL1, DVPREL2, DVCREL1, DVCREL2, DVMREL1, DVMREL2, DVMBRL1, DVMBRL2, USRDATA or SLAVE. 17

No default (Character)

 
ID# When VARTYPE is DESVAR, DTABLE, DRESP1, DRESP2, DVPREL1, DVPREL2, DVCREL1, DVCREL2, DVMREL1, DVMREL2, DVMBRL1, or DVMBRL2 this list of IDs reference entities of the defined VARTYPE.

When VARTYPE is DGRID or DGRIDB, the list is a list of GRID/Component pairs, where every second value is a component (1, 2, or 3). For example, DGRID, 11, 2 indicates the Y component of grid 11. 17.

When VARTYPE is DGRIDL, this list is a list of GRID, Component ID, and Coordinate system IDs, where every second value is a component (1, 2, or 3) and every third value is the coordinate system identification number. For example, DGRIDL, 11, 2, 1 indicates the Y component of grid 11 in a coordinate system of ID = 1. 17

When VARTYPE is DEIGV, the ID# list is replaced by a list of eigenvectors, with each line defining an eigenvector ID, a subcase ID, and a grid/component pair (where the component is one of 1, 2, 3, 4, 5 or 6).

When VARTYPE is DRESP1L or DRESP2L, the list is a list of response/subcase pairs, where every second value is a subcase ID, for example, DRESP1l, 9, 1, 9, 3 indicates response 9 calculated for subcase 1 and response 9 calculated for subcase 3.

When VARTYPE is USRDATA, the list is replaced by a user-defined character string, which is passed to the external function. This character string must be less than 32000 characters.

When VARTYPE is SLAVE, only a single ID should follow. This is the ID of another DRESP3 entry from which data should be copied.

No default (Integer ≥ 0, or Character)

 
CELLIN Indicates that a list of Microsoft Excel worksheet cell references are to follow, that define response input values. 18 19  
CI# A list of Microsoft Excel worksheet cell references that define response input values. 18 19

No default (Alphanumeric)

 
CELLOUT Indicates that a Microsoft Excel Worksheet cell reference is to follow that defines the response output value. 1819  
CO A Microsoft Excel worksheet cell reference that defines the response output value. 18 19

No default (Alphanumeric)

 
SENSOPT Indicates that the sensitivities evaluation method follows.  
METHOD Method to be used for sensitivities evaluation. 16.
NONE (Default)
Sensitivities are not provided. Full evaluations are performed at every step of the approximation process.
AUTO
Sensitivities are automatically evaluated by finite differences at the beginning of the iteration, and subsequently used in the approximation process.
USER
Sensitivities are provided by the external function at the beginning of the iteration, and subsequently used in the approximation process.
blank
 
EIGVi Eigenvector numbers.

No default (Integer > 0)

 
LIDi Subcase IDs.

No default (Integer > 0)

 
Gi Grid IDs.

No default (Integer > 0)

 
Ci Component IDs.

No default (1, 2, 3, 4, 5, or 6)

 
STRNG User-defined string to be passed to the external function.

No default (Character string < 32000 characters)

 

Comments

  1. DRESP3 entries are referenced from the subcases through one of DESOBJ, DESSUB, or DESGLB.
  2. DRESP3 entries must have unique identification numbers with respect to DRESP2 and DRESP1 entries.
  3. DRESP1L, DRESP2L define a response defined with a DRESP1 or DRESP2, respectively, and a SUBCASE. The SUBCASE number 0 should be used for global responses.
  4. Responses with the same region identifier are grouped together into the same region. If the region identifier is blank, then a separate region is formed for each DRESP3 definition. The RTYPE EXTERNAL on the DSCREEN definition refers to DRESP3 responses. It is important to ensure that responses with the same region identifier reference similar external responses. For further information, refer to Constraint Screening in the User Guide.
  5. Any number of VARTYPE# continuation lines can be defined. The order in which the VARTYPE# continuation lines are listed on the DRESP2 card is not specified. The same VARTYPE# can be repeated any number of times, in any position, on the card.
  6. The entries on the DRESP3 card are assigned to the parameters passed to the external function in the order that they occur.
  7. DRESPi and DRESPiL cards cannot be mixed on one DRESP3 definition.
  8. If DRESP1L, DRESP2L is used for a constrained DRESP3, DESGLB must be used to identify the DRESP3.
  9. If DRESP1L, DRESP2L is used in a DRESP3 objective function, then the DESOBJ that references the DRESP3 must be defined before the first subcase.
  10. If the DRESP3 data is referenced by DESOBJ data, the DESOBJ data must be above the first SUBCASE if:
    • DRESP3 contains DRESP1L, DRESP2L data
    • DRESP3 contains no DRESP1, DRESP2 or DRESP1L, DRESP2L data
    • DRESP3 contains DRESP1, DRESP2 global responses

    The DESOBJ data must be in the correct static or eigenvalue SUBCASE if the DRESP3 contains static or eigenvalue DRESP1 responses.

  11. DRESP1 of RTYPE = WCOMP, WFREQ, and COMB cannot be referenced by DRESP3 data.
  12. The RESP field may be used to request a specific response from the external function. External functions can be implemented to compute any number of responses and to return any subset of these responses. This approach has two main benefits:
    • There is no need to write a specific external function for each response that you want computed. One general function may be written instead. In many cases, this allows for easier code maintenance and better code reusability.
    • OptiStruct will automatically group responses which point to the same external function, and which use the same set of input data. The external function will only be called once for that group of responses, which may save computational time in the library.
  13. The SLAVE continuation line indicates that the input data (DESVAR, and so on) for the current DRESP3 card is identical to the input data of the master DRESP3 card. There cannot be any other continuation line when SLAVE is used.

    This simplifies the DRESP3 definition and reduces potential errors when modifying input decks, either via the HyperMesh interface or manually. Also, as explained above, OptiStruct will group responses that share the same input data.

  14. The data in the STRNG field is character string based. It provides a convenient way to pass constants to the external response server routines. The maximum number of characters allowed in 32000.
  15. The eigenvector values provided on the DEIGV continuation are normalized against the mass matrix. No sensitivities are calculated for these values.
  16. Performance of the sensitivity evaluation method is problem dependent, and selection of a method depends on the number of arguments and the cost of each evaluation. The default method works best for most problems. However, if the approximation module is observed to be very slow with the default, AUTO or USER can be tried.

    USER: This setup is more complex as it requires user-calculated gradients. However, since finite differences are not used, it can improve the quality of those gradients and may also increase the speed at which those gradients are calculated.

  17. The DGRID and DGRIDB VARTYPE's can be used to select grid point locations as variables to be passed to the specified equation or function. The grid point locations are specified as a list of Grid point ID/Component pairs where every second value is a component. The Grid point ID's are unique grid point identification numbers (ID) and Components are the grid point locations X1, X2, and X3 fields on the GRID Bulk Data Entries.


    Figure 1. Examples

    DGRIDB:

    The VARTYPE DGRIDB can be used to select grid point locations in the basic coordinate system. The basic coordinate system is the default rectangular coordinate system in OptiStruct.

    DGRID:

    The VARTYPE DGRID can be used to select the grid point locations in the local coordinate system of each grid point. This local coordinate system may be specified by the CP field of the GRID Bulk Data Entry for a particular grid point of interest. All local (or user-defined) coordinate systems are directly or indirectly based on the default basic coordinate system.

    The VARTYPE DGRIDL can be used to select grid point locations as variables to be passed to the specified equation or function with respect to a user-defined coordinate system. The grid point locations are specified as a list of Grid point ID, Components, and Coordinate system IDs, where every second value is a component and ever third value is a user-defined coordinate system ID. The Grid point ID's are unique grid point identification numbers (ID) and Components are the grid point locations X1, X2, and X3 fields on the GRID Bulk Data Entries.


    Figure 2. Example

    DGRIDL:

    The VARTYPE DGRIDL can be used to select the grid point locations in a user-defined coordinate system for each component. This user-defined coordinate system may be specified as every third value. All local (or user-defined) coordinate systems are directly or indirectly based on the default basic coordinate system.

  18. An external Microsoft Excel workbook can be referenced on the GROUP field via the LOADLIB I/O Options Entry.
  19. Multiple CELLIN continuation lines can be specified; each CI# entry on the CELLIN continuation lines corresponds to responses (ID#) defined on the VARTYPE# continuation lines. For further information, refer to External Responses in the User Guide.
  20. Multiple RID-Model Name pairs can be specified on a single DRESPM continuation line. These responses can be used similar to responses defined via the VARTYPE# -ID# entries. ASSIGN, MMO can be used to identify the filename of the model and the user-defined Model Name that contains the referenced response definition.
  21. The VTYPE#, RID#, and VOPT# fields can be used to identify the DRESP1 and DRESP2 responses to be passed as vectors to the DRESP3 entry. The VTYPEL#, RID#, LID#, and VOPT# fields can be used to identify the subcase-specific DRESP1 and DRESP2 responses to be passed as vectors to the DRESP3 entry.