One provides here an example for the reading of optimization results. The first steps of the example consists in the creation of a NastranDb object, and the attachment of an XDB file:
Remark, that the reading of the Nastran finite element model from a BDF file is not necessary to access optimization results.
In the Nastran examples, one provides two optimization runs:
The two runs lead to similar kinds of outputs, including the history of design variables. Only, the topometric optimization generates automatically design variables (for example, one variable per element). Then, the numbering of design variables kind by awkward.
The printing of design variables history is done with the following ruby instructions:
In this case, one prints the history of all design variables, and for all steps. (“nil” values are passed for corresponding arguments of the “getAttachmentDesVarHistory” method.) If you do the same with “sol200_b.xdb”, file, you will obtain a very long output as the number of design variables can be very large for topometric optimization.
The definition of constraints is printed as follows:
And the corresponding histories are obtained as follows:
Here, the history is printed for all optimization steps, as the corresponding parameter is not provided.
And similarly, the objective history is printed as follows:
You can remark that when a topometric optimization is calculated by Nastran as a design variable optimization. (Nastran defines automatically one design variable per element.)
The example is provided in file "RUBY/EX21/printSol200Infos.rb".