HyperWorks Solvers

DRESP3

DRESP3

Previous topic Next topic No expanding text in this topic  

DRESP3

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Bulk Data Entry

DRESP3 – Design Response via External User-supplied Functions

Description

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 Reponses). The DRESP3 card identifies the external function to be called and defines the parameters to be transferred to that function.

Format

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

DRESP3

ID

LABEL

GROUP

FUNC

REGION

RESP

 

 

 

 

DRESPM

RID1

MODEL
NAME1

RID2

MODEL
NAME2

...

...

 

 

 

VTYPE1

RID1

VOPT1

RID2

VOPT2

...

...

 

 

 

 

...

 

 

 

 

 

 

 

 

VTYPE2

RID1

VOPT1

RID2

VOPT2

...

...

 

 

 

 

...

 

 

 

 

 

 

 

 

VTYPEL1

RID1

LID1

VOPT1

RID2

LID2

VOPT2

 

 

 

 

...

 

 

 

 

 

 

 

 

VTYPEL2

RID1

LID1

VOPT1

RID2

LID2

VOPT2

 

 

 

 

...

 

 

 

 

 

 

 

 

VARTYPE1

ID1

ID2

ID3

ID4

ID5

ID6

ID7

 

 

 

ID8

...

...

 

 

 

 

 

 

VARTYPE2

ID1

ID2

ID3

ID4

ID5

ID6

ID7

 

 

 

ID8

...

...

 

 

 

 

 

 

...

 

 

 

 

 

 

 

 

 

VARTYPEn

ID1

ID2

ID3

ID4

ID5

ID6

ID7

 

 

 

ID8

 

 

 

 

 

 

 

 

CELLIN

CI1

CI2

CI3

...

CIn

 

 

 

 

CELLOUT

CO

 

 

 

 

 

 

 

 

SENSOPT

METHOD

 

 

 

 

 

 

 

Alternate format for CELLIN (cell input) specifications

 

CELLIN

CI1

thru

CIn

 

 

 

 

 

Alternate format when VARTYPE is DEIGV

 

DEIGV

EIGV1

LID1

G1

C1

 

 

 

 

 

 

EIGV2

LID2

G2

C2

 

 

 

 

 

 

...

...

...

...

 

 

 

 

Alternate format when VARTYPE is USRDATA

 

USRDATA

STRNG

 

 

 

...

 

 

Field

Contents

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 (Comment 18). It references an existing LOADLIB entry in the input deck.

No default (Character)

FUNC

Defines the external function to be used.

No default (Character)

REGION

Region identifier (Comment 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 (Comment 20)

MODEL
NAME#

User-defined model names defined on the ASSIGN, MMO entry (see comment 20).

VTYPE#

Indicates the type of variables to follow. Can be either DRESP1V or DRESP2V (Comment 21).

No default (Character)

RID#

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

No default (Integer > 0)

VOPT#

The function type that is applied to the corresponding vector response specified via the preceding VTYPE# and RID# fields. Can be either ATTI, FREQ, or ALL.

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.

Default = ATTI (Character)

VTYPEL#

Indicates the type of variables to follow. Can be either DRESP1LV or DRESP2LV (Comment 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 (Comment 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 (Comment 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 (Comment 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 (Comments 18 and 19).

CI#

A list of Microsoft Excel worksheet cell references that define response input values (Comments 18 and 19).

No default (Alphanumeric)

CELLOUT

Indicates that a Microsoft Excel Worksheet cell reference is to follow that defines the response output value (Comments 18 and 19).

CO

A Microsoft Excel worksheet cell reference that defines the response output value (Comments 18 and 19).

No default (Alphanumeric)

SENSOPT

Indicates that the sensitivities evaluation method follows.

METHOD

Method to be used for sensitivities evaluation (Comment 16).

NONE (or blank): 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.

Default = NONE (or 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 DESGBL.
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's 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 = WCOMB, WFREQ, and COMP 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.

Examples:

dresp2_dgrid

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.

Example:

dresp2_dgridl

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. See External Responses in the User’s Guide for further information.
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.

See Also:

Bulk Data Section

Guidelines for Bulk Data Entries

Bulk Data Entries by Function

The Input File