STRESS INVARIANT output from Abaqus to Matlab (Record key 12)
In this example a simple Abaqus model is analysed and results are retrieved by postprocessing the results *.fil file generated by Abaqus using Matlab. For more information please see the Documentation of Abaqus2Matlab toolbox.
Contents
Run Abaqus model
Change current directory to Abaqus working directory
a = strfind(S,'\');
cd(S(1:a(end)-1))
Copy the input file to be run by Abaqus into the Abaqus working directory
copyfile([S,'\AbaqusInputFiles\12.inp'],[S(1:a(end)-1),'\12.inp'],'f')
Run the input file 12.inp with Abaqus
!abaqus job=12
Pause Matlab execution to give Abaqus enough time to create the lck file
pause(10)
If the lck file exists then halt Matlab execution
while exist('12.lck','file')==2 pause(0.1) end
Postprocess Abaqus results file with Matlab
Assign all lines of the fil file in an one-row string (after Abaqus analysis terminates)
Rec = Fil2str('12.fil');
Obtain the desired output data
out = Rec12(Rec)
out = 1.0e+02 * Columns 1 through 3 4.061555702785962 4.073403386134805 -1.414195909500122 4.061555702785962 4.073403386134903 -1.414195909500122 4.061555702785962 4.073403386134778 -1.414195909500122 4.061555702785962 4.073403386134851 -1.414195909500122 3.193311370303528 3.208366862915000 -1.414195963541667 3.193311370303528 3.208366862915026 -1.414195963541667 3.193311370303528 3.208366862914992 -1.414195963541667 3.193311370303528 3.208366862915013 -1.414195963541667 0.649397204551838 0.651516979540990 -0.198075229326884 0.649397204551838 0.651516979540977 -0.198075229326884 0.649397204551838 0.651516979541000 -0.198075229326884 0.649397204551838 0.651516979540986 -0.198075229326884 0.502761880957109 0.505496937966988 -0.198075227737427 0.502761880957109 0.505496937966985 -0.198075227737427 0.502761880957109 0.505496937966991 -0.198075227737427 0.502761880957109 0.505496937966987 -0.198075227737427 3.214688524285443 3.223693443690140 -1.167404429117838 3.214688524285443 3.223693443690125 -1.167404429117838 3.214688524285443 3.223693443690162 -1.167404429117838 3.214688524285443 3.223693443690162 -1.167404429117838 2.540939520207082 2.552322619903017 -1.167404403686523 2.540939520207082 2.552322619903012 -1.167404403686523 2.540939520207082 2.552322619903023 -1.167404403686523 2.540939520207082 2.552322619903023 -1.167404403686523 1.404670646180374 1.409399125427969 -0.411221001942952 1.404670646180374 1.409399125427979 -0.411221001942952 1.404670646180374 1.409399125427981 -0.411221001942952 1.404670646180374 1.409399125427976 -0.411221001942952 1.082715924005927 1.088843442654792 -0.411220995585124 1.082715924005927 1.088843442654795 -0.411220995585124 1.082715924005927 1.088843442654795 -0.411220995585124 1.082715924005927 1.088843442654794 -0.411220995585124 2.608740746304634 2.615707800050301 -0.992264410654704 2.608740746304634 2.615707800050278 -0.992264410654704 2.608740746304634 2.615707800050305 -0.992264410654704 2.608740746304634 2.615707800050337 -0.992264410654704 2.074591696863577 2.083345800031589 -0.992264429728190 2.074591696863577 2.083345800031583 -0.992264429728190 2.074591696863577 2.083345800031591 -0.992264429728190 2.074591696863577 2.083345800031598 -0.992264429728190 2.028851005816763 2.035826468696583 -0.576645317077637 2.028851005816763 2.035826468696490 -0.576645317077637 2.028851005816763 2.035826468696531 -0.576645317077637 2.028851005816763 2.035826468696414 -0.576645317077637 1.559040913914464 1.568107642383290 -0.576645304361979 1.559040913914464 1.568107642383266 -0.576645304361979 1.559040913914464 1.568107642383276 -0.576645304361979 1.559040913914464 1.568107642383245 -0.576645304361979 Columns 4 through 6 0.048461459150465 0.072261424064630 4.121864845285271 0.048461459150368 0.072261424064728 4.121864845285271 0.048461459150493 0.072261424064602 4.121864845285272 0.048461459150420 0.072261424064676 4.121864845285271 0.334631342102081 0.364958343505838 3.542998205017080 0.334631342102054 0.364958343505866 3.542998205017080 0.334631342102089 0.364958343505830 3.542998205017080 0.334631342102067 0.364958343505852 3.542998205017080 -0.020517268580997 -0.016256754398345 0.630999710959993 -0.020517268580984 -0.016256754398358 0.630999710959993 -0.020517268581007 -0.016256754398334 0.630999710959993 -0.020517268580993 -0.016256754398349 0.630999710959993 0.027737749945796 0.033253245353699 0.533234687912785 0.027737749945800 0.033253245353696 0.533234687912785 0.027737749945793 0.033253245353702 0.533234687912785 0.027737749945798 0.033253245353698 0.533234687912785 0.086811229509921 0.104897384643534 3.310504673200061 0.086811229509936 0.104897384643519 3.310504673200061 0.086811229509898 0.104897384643557 3.310504673200060 0.086811229509898 0.104897384643557 3.310504673200060 0.308989771133697 0.331911048889159 2.861312391036714 0.308989771133702 0.331911048889154 2.861312391036714 0.308989771133690 0.331911048889167 2.861312391036714 0.308989771133690 0.331911048889167 2.861312391036714 -0.061747106239680 -0.052241907119752 1.347652019188289 -0.061747106239690 -0.052241907119742 1.347652019188289 -0.061747106239692 -0.052241907119740 1.347652019188289 -0.061747106239687 -0.052241907119745 1.347652019188289 0.044152888429075 0.056513767242429 1.132996331083867 0.044152888429073 0.056513767242431 1.132996331083867 0.044152888429072 0.056513767242432 1.132996331083867 0.044152888429074 0.056513767242430 1.132996331083867 0.115698350836978 0.129688730239854 2.731406150887279 0.115698350837002 0.129688730239829 2.731406150887279 0.115698350836974 0.129688730239858 2.731406150887279 0.115698350836942 0.129688730239890 2.731406150887279 0.291942345803302 0.309562797546377 2.375288145834891 0.291942345803308 0.309562797546371 2.375288145834891 0.291942345803300 0.309562797546379 2.375288145834891 0.291942345803292 0.309562797546387 2.375288145834891 -0.106638047809636 -0.092614421844402 1.929188420886948 -0.106638047809542 -0.092614421844496 1.929188420886948 -0.106638047809583 -0.092614421844455 1.929188420886948 -0.106638047809465 -0.092614421844574 1.929188420886949 0.047844601049559 0.066139068603531 1.615952243432848 0.047844601049582 0.066139068603507 1.615952243432848 0.047844601049572 0.066139068603517 1.615952243432848 0.047844601049603 0.066139068603486 1.615952243432849 Column 7 4.061398802093875 4.061398802093872 4.061398802093875 4.061398802093873 3.192987327763640 3.192987327763639 3.192987327763640 3.192987327763640 0.649365757399281 0.649365757399281 0.649365757399281 0.649365757399281 0.502693803753469 0.502693803753469 0.502693803753468 0.502693803753469 3.214574047534318 3.214574047534319 3.214574047534318 3.214574047534318 2.540706890829171 2.540706890829171 2.540706890829171 2.540706890829171 1.404598283172199 1.404598283172199 1.404598283172199 1.404598283172199 1.082557148796421 1.082557148796421 1.082557148796421 1.082557148796421 2.608656336919981 2.608656336919982 2.608656336919981 2.608656336919981 2.074423321160811 2.074423321160811 2.074423321160811 2.074423321160811 2.028741952251763 2.028741952251766 2.028741952251764 2.028741952251768 1.558799377199638 1.558799377199640 1.558799377199639 1.558799377199641
Verify output
Check number of attributes
nAttr=size(out,2)
nAttr = 7
Check the number of entries
nEntr=size(out,1)
nEntr = 48
Check class of output
cOut=class(out)
cOut = double
____________________________________________________ Copyright (c) 2016 by George Papazafeiropoulos Captain, Infrastructure Engineer, Hellenic Air Force Civil Engineer, M.Sc., Ph.D. candidate, NTUA Email: gpapazafeiropoulos@yahoo.gr Website: http://users.ntua.gr/gpapazaf/