The “LoadCase” modules corresponds to the concept of load case. In our post-processing program, a load case corresponds to the definition of a set of Results, and their association to a DataBase. The Results can be directly read from an “op2” Nastran Result file, or produced by linear combination of elementary Results.
LoadCase module has only one member data: @@dbList. This Hash contains a list of DataBases used for the post-processing.
Several methods are defined:
In the example, the method reads Groups from a Patran session files. Then, other Groups are defined by topological operations. The “version” argument is not used because all the DataBases contain the same Group definition. (Generally, Groups defined in different DataBases are not the same.)
The “createGroups” method is used when a new DataBase is defined.
Note that the programming of this “proc” has been done in such a way that it can easily be switched to read Samcef result. This is the reason which the list of load cases to be processed is given in a Hash argument.
When the two “proc” objects have been defined, they can be used by the definition of operations to load, yield and destroy Results. This is done in a case statement. One comments below several examples of uses:
“thermo_const” is the “version” argument of the iterator. One first retrieves the DataBase corresponding to orbital (thermo-elastic) load cases by calling “getDb” method. Then, one specifies which op2 file is to be read. Finally, the list of load cases to be read and post-processed is build. Finally, the proc is called.
First, the DataBase is prepared and elementary load cases are read from “unit_xyz.op2”. Then the “postCombili” proc objects is called with the appropriate arguments to generate the linear combination of Results. At the end of the calculations, the elementary results are removed from the DataBase.
A peculiar case of iterator is defined by calling each iterator and yielding the returned parameters given in the block: