readcae3d

Reads data from a given file using the 3D CAE Readers. readcae3d uses the CAE readers provided with Twin Activate that require access to model information, such as corner data, averaging method, layer and coordinate system.

Attention: Valid only with Altair CAE Readers and Writers Extension

Syntax

readcae3d(filename, datatype, request, component, time, cornerdata, coordsys, averaging, layer)

readcae3d(filename, subcase, datatype, request, component, time, cornerdata, coordsys, averaging, layer)

readcae3d(filename, datatype, request, component, time, [], [], [], [])

readcae3d(filename, subcase, datatype, request, component, time, [], [], [], [])

R = readcae3d(...)

Inputs

filename
Path of the file.
Type: string
subcase
Subcase name or index in the file.
Type: string | int
datatype
Type name or index in the file.
Type: string | int
request
Request name or index, list of indices, list of names, or range of indices.
Matrix supported forms are:
[]
Extract all requests. In this case, the values are read and filled in the order that has been received by the CAE Reader, and not necessarily in ascending order of ID.
[i:j]
Extract ith to jth index (inclusive).
[i,j,k,l]
Extract the specified request indices.
Cell supported forms are:
{}
Extract all requests.
{i,j,k,l}
Extract the specified indices.
{'req1','req2','req3'}
Extract the specified requests.
Type: string | int | cell | matrix
component
Component name or index, list of indices, list of names, or range of indices.
Matrix supported forms are:
[]
Extract all components.
[i:j]
Extract ith to jth index (inclusive).
[i,j,k,l]
Extract the specified component indices.
Cell supported forms are:
{}
Extract all components.
{i,j,k,l}
Extract the specified indices.
{'req1','req2','req3'}
Extract the specified components.
Type: string | int | cell | matrix
time
Time name or index, list of indices, list of names, or range of indices.
Matrix supported forms are:
[]
Extract all time steps.
[i:j]
Extract ith to jth index (inclusive).
[i,j,k,l]
Extract the specified time step indices.
Cell supported forms are:
{}
Extract all time steps.
{i,j,k,l}
Extract the specified indices.
{'req1','req2','req3'}
Extract the specified time steps.
Type: string | int | cell | matrix
cornerdata
Flag to enable corner data or not, with values 'only', true, or false (default). [] uses the default value. Value 'only' behaves similar to the Use corner data selection in HyperView.
Type: Boolean | string
coordsys
Coordinate system from where the results will be extracted, with values 'global' (default), 'analysis' or 'elemental'. [] uses the default value.
Supported values are:
'global'
Global default coordinate system.
'analysis'
Coordinate system in which the results were defined for each individual element.
'elemental'
Coordinate system defined from the geometry, that is, the nodal connectivity of the element.
Type: string
averaging
For string format input, supported strings are averaging method values.
Matrix format input is []. For example, an empty matrix equal to the default value of the averaging method.
Struct format input is struct('average_method','Supported averaging method value string','average','supported average value string').
Averaging method, with values 'none' (default), 'simple', 'maximum', 'minimum', 'summation', 'extreme' and 'advanced'. [] uses the default value.
Averaging method supported values are:
'simple'
The tensors at the element corners are simply averaged.
'maximum'
The maximum value among the tensors at the element corners is considered.
'minimum'
The minimum value among the tensors at the element corners is considered.
'summation'
The tensors at the element corners are simply averaged.
'extreme'
The extreme value of the tensors at the element corners is considered.
'advanced'
The tensors at the element corners are advanced averaged.
Average, with values 'nodes' and 'nodes_advanced'.
For 'advanced' averaging method, default value of average is 'nodes_advanced'. For 'simple', 'maximum', 'minimum', 'summation', and 'extreme' averaging methods, the default value of average is 'nodes'
For 'advanced' averaging method, the supported average value is 'nodes_advanced'
Type: string | struct | matrix
layer
Layer of the result (if applicable), with values 'max' (default), 'min', 'extreme', 'sum', 'average', 'range', 'count', 'maxlayer', 'minlayer', 'top', 'bottom', output of getlayerindex3d, getlayername3d. [] uses the default value.
Supported values are:
'max'
Maximum value among the layers for each entity.
'min'
Minimum value among the layers for each entity.
'extreme'
Maximum absolute values among the layers for each entity.
'sum'
(Scalar) sum of all values among the layers for each entity.
'average'
(Scalar) average value among the layers which contain data for each entity.
'range'
Difference between the maximum and minimum values among the layers for each entity.
'count'
Count of the layers for the given data type.
'maxlayer'
Layer by name that contributes to the maximum value for each entity.
'minlayer'
Layer by name that contributes to the minimum value for each entity.
'top'
Top layer.
'bottom'
Bottom layer.
output of getlayerindex3d
Layer index returned by getlayerindex3d.
output of getlayername3d
Layer name returned by getlayername3d.
Type: string | int

Outputs

R
Output in matrix format. The first dimension of the matrix stores the requests, the second dimension stores the different components and the third dimension stores the different time steps.
Type: matrix

Example 1

Example with default arguments to query all components from all requests from the first subcase and the first type:

R = readcae3d('tutorials/Comp-plate-1LC.h3d',1,1,[],[],[],[],[],[],[])
R = 
slice(:, :, 1) = 

1.41119  -29.42254  63.96678  70.42319
1.40949  -19.27447  42.20516  46.41947
1.40967  -19.24108  42.13372  46.34066
1.40985  -19.20770  42.06228  46.26185
1.41003  -19.17431  41.99084  46.18304
1.41021  -19.14092  41.91941  46.10423
1.41040  -19.10754  41.84797  46.02542
1.41059  -19.07415  41.77653  45.94662
1.41076  -19.04077  41.70510  45.86782
1.41095  -19.00738  41.63366  45.78901
(...)

Example 2

Example with default arguments to query component 'X' from all requests from the the subcase 'Subcase 1 (LC-Tens)', type 'Displacement', using the analysis coordinate system:

R = readcae3d('tutorials/Comp-plate-1LC.h3d','Subcase 1 (LC-Tens)','Displacement',[],'X',[],[],'analysis',[],[])
R = 
slice(:, :, 1) = 

1.41119
1.40949
1.40967
1.40985
1.41003
1.41021
1.41040
(...)

Example 3

Example with default arguments to query all components from the first request from the the subcase 'Subcase 1 (LC-Tens)', type 'Displacement', using simple averaging method:

R = readcae3d('tutorials/Comp-plate-1LC.h3d','Subcase 1 (LC-Tens)','Displacement',1,[],[],[],[],'simple',[])
Warning: averaging method is not applicable for vectors and will be ignored
	  R = 
	  slice(:, :, 1) = 
1.41119  -29.42254  63.96678  70.42319

Example 4

Example with default arguments to query all components from the first request from the the subcase 'Subcase 1 (LC-Tens)', type 'Displacement', enabling corner data, which is not applicable for scalars:

R = readcae3d('tutorials/Comp-plate-1LC.h3d','Subcase 1 (LC-Tens)','Displacement',1,[],[],true,[],[],[])
R = 
	  slice(:, :, 1) = 

1.41119  -29.42254  63.96678  70.42319

Example 5

Example with corner data value 'only' option:

R=readcae3d('tutorials/bullet.op2',1,3,[],'vonMises',[],'only',[],'simple',[]);
maxval=max(R)
minval=min(R)
maxval = 15492.6846
minval = 75.8540039

Example 6

Example with averaging input struct:

R=readcae3d('tutorials/bullet.op2',1,3,[],'vonMises',[],'only',[],struct('average_method','simple','average','nodes_advanced'),[]);
maxval=max(R)
minval=min(R)
maxval = 15075.5029
minval = 70.1039734

Example 7

Example with layer index:

layerindex = getlayerindex3d('tutorials/flatPlateModelingTechniques_OS.h3d',1,2,'Z2');
R=readcae3d('tutorials/flatPlateModelingTechniques_OS.h3d',1,2,[],1,[],[],[],[],layerindex);
maxval=max(R)
minval=min(R)
maxval = 34037.4961
minval = 26.2207851

Example 8

Example with layer name:

 layername = getlayername3d('tutorials/flatPlateModelingTechniques_OS.h3d',1,2,2);
R=readcae3d('tutorials/flatPlateModelingTechniques_OS.h3d',1,2,[],1,[],[],[],[],layername);
maxval=max(R)
minval=min(R)
maxval = 34037.4961
minval = 26.2207851

Comments

The result files coming from the following simulations are not supported yet:

  • Multibody Simulation
  • RADIOSS
  • abstat

Coordinate system is not applicable for scalars and is ignored with a user warning.

Averaging method is not applicable for vectors and is ignored with a user warning.

Layer is not applicable for vectors and is ignored with a user warning.

Corner data is not applicable for scalars. An averaging method should be given if corner data is set to true.