Read abaqus input file to get the data, nodes or elements
Version 1.0.1 (8,76 ko) par
Wan Ji
This version extracts more data from abaqus input file like the nodes, elements, element types, as well as node sets, element sets.
To this abaqusInpRead function, only the inp file name is the input argument. Optional output data is available compared with last version readinp. Examples like data structure output or [node, element, elementType] form can be obtained.
Example 1 One Output Variable
If one output variable is detected by the function, it will give a struct-class output argument. The structure field contains
Parts: [n×1 struct]
Nodes: [m×1 struct]
Elements: [p×1 struct]
Materials: [q×1 struct]
NodeSets: [r×1 struct]
ElementSets: [s×1 struct]
Some important information is extracted from the abaqus inp file. Also, to the author's ability, the systematic information has not been processed properly yet.
figure(1)
clf
fileName = 'myExamInpFile.inp';
data = abaqusInpRead(fileName);
% following only works for 3-node-tri or 4-node-quad element
node = data.Nodes.Coordinates;
for i = 1:1:numel(data.Elements)
element = data.Elements(i).NodeIDList;
patch('vertices',node,'faces',element,...
'facevertexCdata',node(:,1),'facecolor','interp','edgecolor','k');
hold on
end
colormap jet
axis off
axis equal
title('Two Element Types')
Example 2 Three Output Variables
This example gives a quite easy way to get the node, element and the element type information from your inp file. But, firstly you should set all the elements to only one element type when you generate your inp file in abaqus, because the program only output the first-read nodes and elements.
figure(2)
clf
fileName = 'myExamInpFile.inp';
[node, element, elementType] = abaqusInpRead(fileName);
% following only works for 3-node-tri or 4-node-quad element
patch('vertices',node,'faces',element,...
'facevertexCdata',node(:,1),'facecolor','interp','edgecolor','k');
colormap jet
axis off
axis equal
title('Only One Element Type')
'myExamInpFile.inp' has two element type, so example 2 output a figure that lacks 4 triangle elements.
Enjoy!
Citation pour cette source
Wan Ji (2024). Read abaqus input file to get the data, nodes or elements (https://www.mathworks.com/matlabcentral/fileexchange/95908-read-abaqus-input-file-to-get-the-data-nodes-or-elements), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Créé avec
R2020a
Compatible avec les versions R2012a et ultérieures
Plateformes compatibles
Windows macOS LinuxTags
Remerciements
Inspiré par : read abaqus input file to get the nodes and elements
A inspiré : read_mesh_abaqus
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
abaqusInpRead
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.1 | Some details are provided in the description. |
||
1.0.0 |