increment

class czmtestkit.py_modules.increment

Bases: object

Read and store matrices written to Abaqus/CAE .msg file.

Attributes

increment.step_time (float): Step time fraction of the increment [optional].

increment.start (int): Line number corresponding to the first line of the increment.

increment.stop (int): Line number corresponding to the last line of the increment.

increment.fileName (str): path to the .msg file including the file name and extension.

increment.outInst (list): data objects with matrix/arrays from the .msg file corresponding to the increment found using the increment.find_lineNumbers() and increment.find_data() methods.

increment.data (dict): Data from the increment organized into a dict. Keys of the dict indicate the keyword used to find the data and the Values of the dict carry lists of corresponding data objects.

Methods Summary

find_data()

Fetch values of the matrices/arrays corresponding to data class instances in increment.outInst.

find_lineNumbers(key, length, shape)

Find a keyword and create data class instance for each occurance of the keyword between increment.start and increment.stop in the .msg file. The data instances are appended to increment.outInst attribute. (See increment class for an example.)

Methods Documentation

find_data()

Fetch values of the matrices/arrays corresponding to data class instances in increment.outInst. (See increment class for an example.)

Note

This funciton only fetches and reshapes the values of data instances. data instances must have already been defined using increment.find_lineNumbers() method before executing this method.

find_lineNumbers(key, length, shape)

Find a keyword and create data class instance for each occurance of the keyword between increment.start and increment.stop in the .msg file. The data instances are appended to increment.outInst attribute. (See increment class for an example.)

Parameters

key (str): Keyword to find the matrix/array of interest. Ideally, this should indicate the vairable name of the matrix/array printed to the .msg file.

length (int): Number of lines the matrix extends to, starting from the line containing the Keyword.

shape (tuple): Shape of the matrix.

shape[0] (int): number of rows.

shape[1] (int): number of columns.

Tip

This method can be executed multiple times with different keywords. Since the data class instances store the keywords and the line numbers, the values can be systematically retrived. See increment.find_data().

Note

This funciton only creates data instances and finds line numbers corresponding to required matrix. data.findValue() has to be executed to fetch the actual values. Use increment.find_data() to do this automatically for all the instances in increment.outInst.

Warning

increment attributes increment.type, increment.start, and increment.stop must be defined to execute the increment.find_lineNumbers() method.