top of page
If using this toolbox for research or industrial purposes, please cite:
Advances in Engineering Software. Vol 105. March 2017. Pages 9-16. (2017)
Abaqus2Matlab v.3.0
A new way to post-process FEA
bottom of page
Dear Yadav,
The orientation associated with each principal stress is given in terms of the three components of the vector that is parallel to the principal stress considered. The three components of this vector are simply its projections along the global X-, Y- and Z- axes.
You can find the direction cosine angles (in radians) of the orientation vector of each principal stress by the following code, as a continuation of the code of my previous post:
% Direction cosine angles of the orientation of the first % principal stress (rad)
phi11=acos(or1(1)/norm(or1));
phi12=acos(or1(2)/norm(or1));
phi13=acos(or1(3)/norm(or1));
% Direction cosine angles of the orientation of the second
% principal stress (rad)
phi21=acos(or2(1)/norm(or2));
phi22=acos(or2(2)/norm(or2));
phi23=acos(or2(3)/norm(or2));
% Direction cosine angles of the orientation of the third
% principal stress (rad)
phi31=acos(or3(1)/norm(or3));
phi32=acos(or3(2)/norm(or3));
phi33=acos(or3(3)/norm(or3));
Dear sir
thank you very much for reply
Is these stress orientation in radians or degree?
I would like to it convert into the degree
Thank you sir
with regards
Radheshyam
Dear Yadav,
Let's assume that the stress tensor is given by equation (1) in the following:
(1)
How do we assemble the stress data that are loaded by Abaqus2Matlab from a fil file into the format shown in eq. (1)? An example input file which when run in Abaqus stress results are written both in odb and fil files is as follows (paste the options in a text editor, then save it as temp.inp, then run it in Abaqus):
*HEADING
VERIFICATION OF ABAQUS STRESS OUTPUT TO MATLAB (S, RECORD KEY 11)
*RESTART,WRITE,FREQ=5
*NODE, NSET=BOT
1,0.,0.,0.
2,1.,0.,0.
3,1.,1.,0.
4,0.,1.,0.
*NODE, NSET=TOP
5,0.,0.,1.
6,1.,0.,1.
7,1.,1.,1.
8,0.,1.,1.
*NSET, NSET=BACK
1,4,5,8
*NSET, NSET=LHS
1,2,5,6
*ELEMENT, TYPE=C3D8, ELSET=EL2
101,1,2,3,4,5,6,7,8
*SOLID SECTION, ELSET=EL2, MATERIAL=ELAS
*MATERIAL,NAME=ELAS
*ELASTIC
128.571429, 0.28571429
*STEP, INC=10, UNSYMM=YES, NAME=STEP-1
*STATIC, DIRECT
1., 10.
*BOUNDARY
BACK,1
LHS, 2
BOT, 3
*DLOAD
EL2, P4, -300.0
*FILE FORMAT, ASCII
*EL FILE
S
*OUTPUT, FIELD
*ELEMENT OUTPUT, ELSET=EL2
S,
*OUTPUT, HISTORY
*ELEMENT OUTPUT, ELSET=EL2
S,
*END STEP
The Abaqus2Matlab code (v.2.0) for loading the stress results from the results file temp.fil, goes as follows:
% Load results from Abaqus results file temp.fil out=readFil('temp.fil',11);
Stotal=out{1,1};
% Size of output
n=size(Stotal,1);
% Number of analysis steps
nSteps=1;
% Number of analysis increments
nIncr=10;
% Number of elements for which the fil output is written
nEle=1;
% Number of integration points per C3D8 element
nIntPoints=8;
% Assemble information about stress output in Abaqus
% First column: step number
% Second column: increment number
% Third column: element number
% Fourth column: integration point number
index=zeros(n,4);
c=1;
for i=1:nSteps
for j=1:nIncr
for k=1:nEle
for m=1:nIntPoints
index(c,1)=i;
index(c,2)=j;
index(c,3)=k;
index(c,4)=m;
c=c+1;
end
end
end
end
Imagine now that you want to take the stress tensor S of the 5th integration point of the C3D8 element at the 9th increment of the Abaqus analysis. You have the following code:
% Find the row to which the queried result corresponds ind=(ismember(index(:,2),9)) & (ismember(index(:,4),5));
indQuery=find(ind); % Take the stress result at that row
S0=Stotal(indQuery,:); % Assemble the stress tensor
S=[S0(1),S0(4),S0(5);
S0(4),S0(2),S0(6);
S0(5),S0(6),S0(3)];
The Matlab code that is used for the calculation of the principal stresses (S1, S2 and S3) and their orientations (or1, or2, or3) is as follows:
% Eigen-analysis of stress tensor
[V,D]=eig(S);
% Value of principal stress 1
S1=D(1,1);
% Orientation of principal stress 1
or1=V(:,1);
% Value of principal stress 2
S2=D(2,2);
% Orientation of principal stress 2
or2=V(:,2);
% Value of principal stress 3
S3=D(3,3); % Orientation of principal stress 2
or3=V(:,3);
Please let me know if the above procedure works for you. I hope you enjoy it!
Best regards,
George
Dear George sir
Thank you for reply.
May you built one MATLAB code with abaqus2matlab for calculating for eigenvalues and eigenvectors of the stress tensor that give the principal stress values and orientations
Dear Radheshyam Yadav Have you checked the following link:
https://abaqus2matlab.wixsite.com/abaqus2matlab/forum/abaqus2matlab-users-forum/can-we-extract-stress-orientation
This shows the way in which you can take the stress tensor (S), principal stresses (SP) and stress invariants (SINV) from an Abaqus fil file using Abaqus2Matlab v.1.0. After extracting these Abaqus results, it is quite straightforward to obtain the principal stress orientations. The eigenvalues and eigenvectors of the stress tensor give the principal stress values and orientations.
Please let me know if the above helps you.
Best regards.