readodb (+FEA)


Purpose

Import data from Abaqus ODB files.

Syntax

f=readodb('filename')
f=readodb
[f,fname,odbdir,sel]=readodb('*.odb','dironly','range',RANGE_CELL,'silent','noprogbar','headeronly')

Description

READODB reads data from an Abaqus ODB. History data will be imported as imat_fn and Field data will be imported as imat_shp or a result object, depending on the data type. Several optional input arguments are supported.

'silent' Suppress all output messages
'noprogbar' Don't display progress bar at all
'dironly' Get the ODB directory and return it in a structure. This is the same structure that gets returned in the 3rd output argument ODBDIR. This structure is detailed below.
'headeronly' Only read headers, no data.
'range' Specifies what data to read. The following argument must be an Nx2 cell array, described in more detail below.
'asresult' Force all field output to be an imat_result object.
'mergeinst' Merge all instances into a single result. This only applies to imat_result output.

 

The range specifier must be an Nx2 cell array, where N is the number of different data types to read. The first column must contain a string specifying the data source. The data source must either be 'xydata' or the step name (key).

If the data source is 'xydata', the second column argument must be a numeric vector containing the indices of the xyData to read. An empty matrix tells READODB to read all of the xyData.

If the data source is a step, the second column argument must be an nx2 cell array. The first element in this cell array must be the string 'history' or 'field'. Note that you can only read one 'history' and one 'field' type per step per call to READODB.

 

Type

Description

'history' The second element in this cell array must be a numeric vector containing the indices of the historyObjects to read. An empty matrix tells READODB to read all of the historyObjects associated with this step. The output will be returned as an imat_fn.
'field' The second element in this cell array must be a numeric vector containing the indices of the frames to read. An empty matrix tells READODB to read all of the frames associated with this step. The optional second element in this cell array contains the data type(s) to read. If it is not provided, READODB will read all of the supported data types available in each frame. If it is specified, it must be a string or cell array of strings containing the data types to be read. To see if a datatype in your ODB is currently supported, open the ODB with READODB and click on the Select Subset button and view the Data Types list. The datatypes listed here are supported.

 

Translational and rotational data types will be combined in a single output. Nodal displacement output will be returned as an imat_shp. All other field output will be returned as a result object. If there are multiple instances, the coefficients for each instance will be stored in a separate result. In this case the output will be MxN, where M is the number of frames selected for that data type, and N is the number of instances. Different data types will be returned as separate cells in the output. The instance name will be stored in IDLine2.

F is the resulting data. If multiple output types are requested, F will be a cell array containing the various outputs. FNAME is an optional output string containing the filename read.

ODBDIR is an optional output structure containing the ODB directory contents. The structure fields are

.filename Name of ODB (string)
.nxydata Number of xyData objects in the ODB (scalar)
.xydatakeys Names of the xyData objects (cell array)
.nstepdata Nx2 array, where N is the number of steps containing supported data. The first column contains the number of historyObjects in that step, and the second contains the number of fieldObjects in the step.
.stepkeys Names of the steps (cell array)
.desc Step descriptions (cell array)
.domain Step domain (cell array)
.procedure Step procedure (cell array)

 

SEL is a cell array of the same format as RANGE_CELL containing the range specifiers for the data that was selected to read.

Examples

>> data=readodb('range',{'xydata',1:10; 'Step-2',{'history',[1 3 10]}});
>> data=readodb('range',{'Step-1',{'field',[1 3 5]}});
>> data=readodb('range',{'Step-1',{'field',1:10,'U'}});
>> data=readodb('range',{'Step-1',{'field',[1 3 10]};'Step-2',{'field',1:20,{'U','UR'}}});
>>

See Also

readnas, readunv, readadf, setunits, getunits