OS-T: 4095 Size Optimization using External Responses (DRESP3)
In this tutorial, the standard responses available in OptiStruct are passed to a HyperMath script and the newly created responses from the script are used as optimization constraints.
Since HyperMath is an interpreter, you can build custom responses without having to compile your HyperMath script.
You will load the structural model into HyperMesh. The materials, shell properties, loads and boundary conditions are already defined in this model. The thicknesses of the three components are identified as design variables. The von Mises stress of element numbers 58 and 59 (elements located on the circumference of the hole) are defined as responses, and a total volume response is defined as well.
The von Mises stress of elements 58 and 59 are passed as inputs to the HyperMath script which in turn, returns two values: the sum of the two von Mises stresses, and the average value of the two elemental von Mises stresses.
- Objective
- Minimize volume.
- Constraints
- Constraints on the sum of the von Mises stresses and the average von Mises stress.
- Design Variables
- Gauges of the three parts.

Figure 1.
Launch HyperMath
Launch HyperMesh and Set the OptiStruct User Profile
Import the Model
Set Up the Optimization
Attach the HyperMath Script Library to OptiStruct
Create Design Variables
The design variables for the thicknesses of the three components are already defined. The responses for the total volume and the von Mises stress of elements 58 and 59 have also been defined.
The DRESP3 Bulk Data Entry is not supported in the current version of HyperMesh. Therefore, these cards will be defined in the BULK_UNSUPPORTED_CARDS panel.
This defines two external responses: the sum of the von Mises stresses of elements 58 and 59 (SUMH) and the average von Mises stress for elements 58 and 59 (AVGH).
The DRESP3 responses have different IDs from the DRESP1 responses and point to the library called HLIB defined. Also, the function MYSUM is the same function name in the dresp3_simple_h.hml script.
This completes linking of the DRESP3 cards with the HyperMath Script.